Crash on Xcode 8.0 GM iPhone Simulator (iOS 10)
When I run my project on real device , everything works fine.
But when I try to run it on the simulators(iOS 10,iPhone 7 && iPhone 6) ,the app crashed and no debugger messages in the Debugger Output.
The crashed Thread look like this
I want to know what the
means , and how to fix the problem?
- Toolbar with “Previous” and “Next” for Keyboard inputAccessoryView
- Extract 2 strings from an NSString separated by a special character
- Not automatically login to Google+ using UIWebView (iOS)?
- Will apps that use telprompt be rejected
- detect the appear and disappear of international keyboard
- -: message sent to deallocated instance
3 Solutions Collect From Internet About “Crash on Xcode 8.0 GM iPhone Simulator (iOS 10)”
Are you using a feature that requires user approval (like Camera, Location, etc)? TCC handles access to such resources and a crash in
__CRASHING_DUE_TO_PRIVACY_VIOLATION__ usually means you aren’t fulfilling the requirements to use that feature.
Make sure you have the usage description key for any of those features in your Info.plist file. iOS 10 now absolutely requires you supply descriptions such as:
<key>NSCameraUsageDescription</key> <string>For taking selfies!</string>
It is probably working on your device because you previously granted permission. If you delete the app and wait 24 hours (or install on a different device that has never had the app installed before) you’d probably see the same thing on device. (Different services have different policies for whether permission disappears quickly or is saved for a while to allow for reinstalls).
There is a nice Technical Q&A page on developer.apple.com that describes the frameworks that require a usage description and lists the relevant key(s) for each framework and the class/function/selector(s) involved.
In addition to @russbishop’s answer:
You need to do the same thing for accessing gallery as well.
<key>NSPhotoLibraryUsageDescription</key> <string>$(PRODUCT_NAME) needs access to use your photo library</string>
Totally opposite to your case, I was getting this same crash on device but not on simulator.
In addition to all above answers:
For me it was the camera and microphone, NSCameraUsageDescription and NSMicrophoneUsageDescription.
If you want to record video you should add both of them.
- UISearchController's search bar overlaps first tableview cell
- To change the color of unselected UITabBar icon in iOS 7?
- How can my app jump to iOS default mailbox?
- Get current view controller from the app delegate (modal is possible)
- DebugLog Format string is not a string literal
- pbxcp issue, file not found but it's definitely there
- IO6 doesn't call -(BOOL)shouldAutorotate
- how to return a var in swift
- Is there any shorthand way to write CGPoint, CGRect, etc?
- Class Name with a “+”
- How can Create Model class in swift and get values form model class in another class
- iPhone TBXML Looping And Parsing Data
- Do we need to use 2 Storyboard for a Universal app?
- IOS Enterprise Distribution Through OTA
- Take a picture on iPhone without showing controls