Testing permissions for microphone / push in iOS app - ios

Usually, I was able to test different flows for mic / push permission on iOS by deleting the app and then launching again from XCode. However, recently I am unable to do so because even after deleting the app, when I relaunch the app, instead of asking for permission, it somehow brings back the permissions that I had given to the deleted app. This means it is impossible for me to test alternate flows for asking permission. Has anyone else faced this problem? Can someone guide me to getting back to being asked for permission?

Related

iOS permissions cache after reinstall app

while testing i noticed one interesting thing,I’m using Microphone ,location, camera Permissions in my app and asking for permissions from a user. When i install app for first time i sees default asking permissions pop up. And everything work fine. But if i will remove app from phone and install it again and again the permissions popups wont appear , but all working fine. if i visit app settings all permissions are granted already(which was given in last installation).
is this happen because of cache issues?. and how to resolve this issue ?

App Tracking Transparency permission is not prompting when trying to download the application in the App Store through the Apple Ad

We Added the ATT(App Tracking Transparency) into our latest Application release, and everything worked fine except for one thing.
When our users try to download the application in the App Store through the Apple Ad specifically, the ATT permission isn't prompting and the data tracking permission is set to disabled by default.
When we try to download on the same device not through the Apple Ad, when we ran the application we see the ATT permission when we launch the application
If anyone has any input or value to add for this issue it will be very helpful and appreciated.
iOS seems to cache the ATT permission for a while.
Try to restart your iOS device after the app was installed via "apple ads click" and then removed.
After the reboot of your iOS device and installing the app from app store the permission prompt should appear.
My permission appears again after I restart my device as #Jochen Holzer suggested.
Note: The permission always appear after uninstall > install in my colleague, but restarting the device is needed in my case. I assume that we have different version. Mine is 14.4 and hers is 14.1
want to upvote his answer but I lack of point

What are some possible reasons that UNUserNotificationCenter.current().requestAuthorization might not prompt?

What are some possible reasons that UNUserNotificationCenter.current().requestAuthorization might not prompt?
I have some users that are not receiving the prompt for permission at all. I've even tried to change the app bundle Id in TestFlight to see if they would get the prompt but to no avail.
I've tried resetting permission via https://developer.apple.com/library/archive/technotes/tn2265/_index.html#//apple_ref/doc/uid/DTS40010376-CH1-TNTAG42 as well.
Notification permission settings does not get listed within the app settings on iOS which leads me to believe it isn't necessarily rejected.
Any help would be greatly appreciated. I don't think this is a code issue as the call is fairly straightforward.
Asking for provisional permissions causes the permission prompt for notifications not to show on iOS < 12.
If the user has rejected the permission for your app before, then the dialog won't show either.
Even though the problem was caused by something silly; I think it would still be worthwhile to share the problem resolution.
We have a WK WebView iOS app. On our Angular side, we try to detect whether or not the environment is currently iOS native app before trying to prompt the user for permission. We do this detection by setting a flag in local storage (I don't really have all the details as it is not my code - I'm just the reviewer). Between the loading of the native app, the WebView and angular code, we couldn't reliably ensure that things are handled synchronously.
The detection failed - so we never prompt the user.
Thanks again for the help.

Access is not requested again after reinstalling the app in iOS12

After updating to iOS12 and testing the apps build in Xcode 9, we found out that after deleting and reinstalling the app - the user is not prompt again with a question regarding access to the Camera or Gallery.
On iOS11, every time the app is installed, iOS asks for permission.
I tested few random apps from AppStore to see how they behave and the conclution is - some of them do reset the access and some don't. So, I'm completely lost.
Also, as an info, but I'm not 100% sure about this: when there is a time period between deleting and installing the app (more than 1h), even on iOS 12 is asking for permission.
Is there any change there in iOS 12? Do you have any clue how to keep iOS 11 behaviour instead?
Thanks!
The only certain way to test the authorization request process again after deleting your app is (and always has been) to go to the Settings app and choose General -> Reset -> Reset Location & Privacy. This is a major pain because you've now reset all your location and privacy settings.
My other suggestion (and it's only a suggestion) is that you try restarting the device after deletion of the app. Maybe, just maybe, this will cause the device to write something out to disk that will cause it to forget about its previous authorization of this app.

iOS Application - intercept when a user deletes the app from device

I'm developing an apple iOS application using Xcode.
How to know if a user removed an application from his iPhone/iPad Device?
thank you
If you have several your apps on device - you can use SHARED KEYCHAIN to detect marker you've written in deleted app. Shared keychain can be accsessed by apps sharing same keychain access group. Or you can get approximate statistics using some statistics framework by checking whether some application stopped logging any events for a long period of time.
No you cannot. The only thing you can catch is first run of your app. There is no obvious reason for knowing when your app is uninstalled (except of spamming users). You can just keep stats to see your app usage if that's the case.
No, an app cannot detect when it is being deleted from the device.
An app runs in a sandbox / secure container. (Almost) everything outside that sandbox is just a 'mystery' for the app. Your app shouldn't need to know, so IF this is an issue at all, it is basically just a design issue for you to deal with.

Resources