Just run the time also feel puzzled, so hang up, Google has just started to solve the problem of camera crash, and later HealthKit problem also understand, originally all only need to fill in info in the corresponding key can be
The correspondence is:
<key>NSCameraUsageDescription</key>
<string>cameraDesciption</string>
<key>NSContactsUsageDescription</key>
<string>contactsDesciption</string>
<key>NSMicrophoneUsageDescription</key>
<string>microphoneDesciption</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>photoLibraryDesciption</string>
Explain these keys.
Nscamerausagedescription-----Camera
Nscontactsusagedescription-----Camera
Nsmicrophoneusagedescription-----Microphone
Nsphotolibraryusagedescription-----Album
There's one more long-healthKit problem.
Collapse in this method:
/*register the type of data you want to read or write, or modify it in the Health app*/[Self.healthstore requestauthorizationtosharetypes:nil readtypes:readdatatypes Completion:^ (BOOL success, Nserror *error) { if(!success) {NSLog (@"%@\n\n%@", error, [error userInfo]); return ; } Else { //Dispatch_async (Dispatch_get_main_queue (), ^{//[Self.window.rootViewController PRESENTVIEWCONTROLLER:TABVC animated:yes Completion:nil]; // }); } }];
The workaround is to add these two keys:
The following is the official document comparison table, you query the desired key
Xcode8 Run IOS10 version of the simulator will be a lot of crashes, such as the use of cameras, microphones, health data, etc.