[iOS 12] Even if the app was deleted, permissions states are still in a "cache" after been already set up/asked

Originator:sorinjc
Number:rdar://45635464 Date Originated:October 29, 2018
Status:Open Resolved:
Product:iOS 12 Product Version:iOS 12.0.1
Classification:Xcode/iOS Reproducible:Always
 
Summary:
On iOS 12 with a build from Xcode 10 / or release built with Xcode 10, I've noticed that permissions status are "saved" by the system, even if we delete the app. It's mainly a big issue during iOS app development / QA testing to improve contextual screen for permission or retest it. 
The issue seems not to happen with an app on the App Store, and not happen before iOS 12.

Steps to Reproduce:
1- Create and install/run an app which requests a Microphone or Photo Capture permission to the user (as a developer on Xcode or with an AdHoc Release from Xcode 10).
2- User/developer granted or not the access.
3- User/developer delete the app.
4- Re-install/run the app on the device.
5- Go to settings: Permissions status are still set up with the grant access as user choose before.

Expected Results:
Permission statuses have to be reset after a fresh install on DEBUG or AdHoc/InHouse release.

Actual Results:
Go to settings: permissions statuses are still set up with the grant access as user choose before, even after a fresh app install.

Version/Build:
Real device : iPhone XS 256Gb, iOS 12.0.1 (16A405)
Not reproduced when running on a device below iOS 12.

Configuration:
Xcode 10.0 (10A255)

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!