NSCameraUsageDescription in iOS 10.0 runtime crash?

After iOS 10 you have to define and provide a usage description of all the system’s privacy-sensitive data accessed by your app in Info.plist as below: Calendar Key : Privacy – Calendars Usage Description Value : $(PRODUCT_NAME) calendar events Reminder : Key : Privacy – Reminders Usage Description Value : $(PRODUCT_NAME) reminder use Contact : … Read more

How to determine when Settings change on iOS

You can listen for NSUSerDefaultsDidChange-notifications with this: [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(defaultsChanged) name:NSUserDefaultsDidChangeNotification object:nil]; Whenever the NSUserDefaults changes, defaultsChanged will be called. Don’t forget to call [[NSNotificationCenter defaultCenter] removeObserver:self]; when you want to stop listening for these notifications (you should also do this when object gets deallocated).

iOS 10 – Changes in asking permissions of Camera, microphone and Photo Library causing application to crash

[UPDATED privacy keys list to iOS 13 – see below] There is a list of all Cocoa Keys that you can specify in your Info.plist file: https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html (Xcode: Target -> Info -> Custom iOS Target Properties) iOS already required permissions to access microphone, camera, and media library earlier (iOS 6, iOS 7), but since iOS … Read more

How to localise a string inside the iOS info.plist file?

You should use InfoPlist.strings file to localize values of Info.plist. To do this, go to File->New->File, choose Strings File under Resource tab of iOS, name it InfoPlist, and create. Open and insert the Info.plist values you want to localize like: NSLocationWhenInUseUsageDescription = “Description of this”; Now you can localize InfoPlist.strings file with translations. Select the … Read more