Updated the summary of problems encountered in xcode8 and ios10

Xcode8 and ios10 have been updated. App permissions to access users' cameras, albums, microphones and address books need to be reconfigured. Otherwise, opening compilation in xcode8 will directly crash@ H_ 419_ 1@

Need to be in info Add some device permissions required by app in plist@ H_ 419_ 1@

camera NSCameraUsageDescription@H_419_1 @

album NSPhotoLibraryUsageDescription@H_419_1 @

mail list NSContactsUsageDescription@H_419_1 @

Always access location NSLocationAlwaysUsageDescription@H_419_1 @

position NSLocationUsageDescription@H_419_1 @

Access location during use NSLocationWhenInUseUsageDescription@H_419_1 @

Microphone NSMicrophoneUsageDescription@H_419_1 @

Access Bluetooth NSBluetoothPeripheralUsageDescription@H_419_1 @

Access calendar NSCalendarsUsageDescription@H_419_1 @

Access media database NSAppleMusicUsageDescription@H_419_1 @

Visit health sharing NSHealthShareUsageDescription@H_419_1 @

Access health updates NSHealthUpdateUsageDescription@H_419_1 @

Visit sports and fitness NSMotionUsageDescription@H_419_1 @

Access reminders NSRemindersUsageDescription@H_419_1 @

Don't mention: from January 1, 2017, HTTPS is mandatory. By default, all newly submitted apps are not allowed to use nsallowsarbitraryloads to bypass ATS restrictions. Secure transmission no longer supports SSLv3. It is recommended to disable SHA1 and 3DES algorithms as soon as possible@ H_ 419_ 1@

Error posted below: @ h_ 419_ 1@

Q1: ios10 photo album camera flash back problem: @ h_ 419_ 1@

The system photo album and camera functions are called under ios10 system. In case of flash back, the log description is as follows: @ h_ 419_ 1@

This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info. plist must contain an NSPhotoLibraryUsageDescription key with a string value explaining to the user how the app uses this data.@ H_ 419_ 1@

Solution: in info Add @ h under plist file_ 419_ 1@

Camera permissions < key > nscamerausagedescription < key > @ h_ 419_ 1@


cameraDesciption

@H_ 419_ 1@

Album permission < key > nsphotolibrayusagedescription < key > @ h_ 419_ 1@


photoLibraryDesciption

@H_ 419_ 1@

Q2: IOS 10 flash back due to apple health @ h_ 419_ 1@

If Apple health is invoked in app, there will be flash back in iOS10. The reason reported by the console is: terminating app due to uncaught exception 'nsinvalidargumentexception', reason: 'nshealthupdateusagedescription must be set in the app's info plist in order to request write authorization.'@ H_ 419_ 1@

This is because we're going to be in info Plist file declares the permission of apple health, so in info Add the following key to plist: @ h_ 419_ 1@

Request to write < key > nshealthupdateuseagedescription < key > @ h_ 419_ 1@


some string value stating the reason

@H_ 419_ 1@

Request to read < key > nshealthshareusagedescription < key > @ h_ 419_ 1@


some string value stating the reasonPaste_ Image. png

@H_ 419_ 1@

Q3: the messy ones printed by Xcode bug@H_419_1 @

After updating xcode8, new projects will print a bunch of inexplicable logs For example, @ h_ 419_ 1@

subsystem: com. apple. UIKit,category: HIDEventFiltered,enable_ level:0,persist_ level:0,default_ ttl:0,info_ ttl:0,debug_ ttl:0,generate_ symptoms:0,enable_ oversize:1,@H_ 419_ 1@

The shielding method is as follows: @ h_ 419_ 1@

Edit scheme - > Run - > arguments in xcode8, and add @ h in environment variables_ 419_ 1@

OS_ ACTIVITY_ Mode = disable. The screenshot is as follows: (there is really no iPhone4) @ h_ 419_ 1@

@H_ 419_ 1@@H_ 419_ 1@

After that, you can print normally as before@ H_ 419_ 1@

The above is a summary of the problems encountered in xcode8 and ios10 updated by Xiaobian. I hope it will help you. If you have any questions, please leave me a message and Xiaobian will reply to you in time. Thank you very much for your support for the programming tips website@ H_ 419_ 1@

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>