IOS10 fit (Must SEE) _ios

Source: Internet
Author: User

I. Engineering changes

1. Project configuration

When you open the project directly using Xcode8beta, you will find that there is a problem with your provisonfile configuration, due to minor changes to the project configuration in Xcode8.

In the General tab of the Xcode8 engineering configuration, the original team option is replaced with the more detailed signing option.

Checked: Project-> target-> General

Xcode8 before Team option


Xcode8 before Provisionfile option


Change to signing option after Xcode8


2. Swift version

If you use Swift in your Xcode7 project, the following option will appear when you use Xcode8 to open the project, select Convert:

After you choose Convert, you will be able to select the swift version.

If you choose the 3.0 version of the SWIFT option, there is still a part of you that needs to be manually fitted after the convert is over.

If you don't want to spend time on the swift version, you can choose the swift2.3 version, convert doesn't convert anything, and your project can work as usual in Xcode7.

At this time we choose swift2.3:

After choosing the swift version, select your project target:

Wait for a moment:

Select Update to end the call:

Second, the application of matching

1. Permission Configuration

As people focus on privacy protection, it seems that every generation of Apple products have a corresponding embodiment-more stringent device and data access rights control.
In IOS10, if your app wants access to users ' cameras, albums, microphones, contacts, and so on, it needs to be configured, or it will be crash directly.

You need to add some device privileges to your app in Info.plist.

To find info first, you can add a key value pair directly here:

You can also find the Info.plist file, and then open it using the SourceCode method:

Some common permissions configuration options:

"//Camera <key>NSCameraUsageDescription</key> <string>app need your permission to access albums </string>//albums <key >NSPhotoLibraryUsageDescription</key> <string>app Need your permission to access the camera </string>//Microphone: <key> nsmicrophoneusagedescription</key> <string>app Need your permission to access the microphone </string>//communications record <key> Nscontactsusagedescription</key> <string>app requires your consent to access the communications </string> ' other Permissions configuration options: '//Location <key >NSLocationUsageDescription</key> <string>app requires your consent to access location </string>//access location during use <key> Nslocationwheninuseusagedescription</key> <string>app requires your consent to access location </string>//Always access location < Key>nslocationalwaysusagedescription</key> <string>app requires your consent to always access the location </string>//Calendar <key >NSCalendarsUsageDescription</key> <string>app Need your permission to access Calendar </string>//Reminders <key> nsremindersusagedescription</key> <string>app Need your permission to access reminders </string>//Sports and Fitness <key>NSMotionUsageDescription</key> <string>app need your consent to access sports and fitness </string>//Health updates <key>NSHealthUpdateUsageDescription</key> <string>app Need your permission to access health updates </string>//health Sharing < key>nshealthshareusagedescription</key> <string>app Need your permission to access health sharing </string>//Bluetooth <key> Nsbluetoothperipheralusagedescription</key> <string>app requires your consent to access Bluetooth </string>//Media repositories <key >NSAppleMusicUsageDescription</key> <string>app Need your permission to access the media database </string> ""

2. Font Change

iOS10 font has changed, which causes some text in the original wide-high constraints may appear incomplete or white, need to check.

3. Push notification

After iOS10, you want to receive push notifications normally, additional configuration is required:

The above is a small set to introduce the IOS10 adaptation (Must see), font fit and compile the problem and solution, hope to help everyone, if you have any questions please give me a message, small series will promptly reply to everyone. Here also thank you very much for the cloud Habitat Community website support!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.