Manipulate application permissions on iOS 8 simulator

The same question as this> , but for iOS 8.

While xctests is running, how can I guarantee that permissions are granted / denied programmatically?

Is the same TCC.db used? If so, since there are no directories $HOME/Library/Application Support/iPhone Simulator/8.x , where is it moved to?

0
source share
1 answer

Thanks to the username tbd, TCC.db is still in use, but is now located in

$HOME/Library/Developer/CoreSimulator/Devices/$DEVICEID/data/Library/TCC/

The access table schema is the same.

 NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *dbPath = [paths firstObject]; for (int ii = 0; ii < 5; ii++) { dbPath = [dbPath stringByDeletingLastPathComponent]; } dbPath = [[[dbPath stringByAppendingPathComponent:@"Library"] stringByAppendingPathComponent:@"TCC"] stringByAppendingPathComponent:@"TCC.db"]; 

Please note that TCC is intended only for access to accounts (contacts, mail, etc.), and not for all permissions.

+1
source

Source: https://habr.com/ru/post/971563/


All Articles