1 push
When Xcode is upgraded to 8, many people are not receiving the push. I can't get token. A friend did not find the reason for an hour. Just because you see .... I realized that Xcode would be notified if I didn't open it. But by 8 (must be opened to receive the push). It seems that we are not.
The following popularized the difference between IOS10 and the previous push
Previous notifications for IOS 9
1. When calling a method, some methods make it difficult to distinguish and write wrong methods, which makes the developer sometimes very distressed.
2. The path that the app captures notifications at run time and non-runtime is not consistent.
3. When applied to the foreground, remote notifications cannot be displayed directly, and further processing is required.
4. Notifications that have been issued cannot be updated, the content is not changed when it is issued, and only simple text presentation, extensibility is not very good at all.
Notifications starting with IOS 10
1. All relevant notifications have been consolidated into the Usernotifications.framework framework.
2. Added cancellation, update, mid-way can also modify the content of the notice.
3. The notification is not a simple text, you can add videos, pictures, custom notification display and so on.
4.iOS 10 is easier to manage than previous notifications and has been optimized for large scale, which is a good thing for developers.
5.iOS 10 starting with the optimization of permissions issues, it is easier to request permissions (local and remote notifications are integrated in one method).
2 Problems with font adaptation
The lab fonts before iOS 9 can be displayed full, but by the time Ios10 found that the font display is not complete. It's going to fit. The app will change with the font size of the phone system.
The simple and brutal way to do this is to keep him from changing the font of the phone system.
Label.adjustsfontforcontentsizecategory = YES;
3 Xcode 8 Run print a bunch of useless things xcode 8 problem, the workaround is to set os_activity_mode:disable such as:
4 Xcode8 What is the comment shortcut key, command+/?
Workaround:
Because Apple solves Xcode ghost. Block the plugin. Workaround
Command run: Sudo/usr/libexec/xpccachectl
Then you have to restart the computer to take effect
5 Color issues, IOS 10 Apple officially recommends that we use sRGB because of its better performance and richer colors.
The two new APIs in the Uicolor class are as follows:
+ (Uicolor *) colorwithdisplayp3red: (cgfloat) displayp3red green: (cgfloat) Green Blue: (cgfloat) Blue Alpha: (cgfloat) Alpha Ns_available_ios (10_0); -(Uicolor *) initwithdisplayp3red: (cgfloat) displayp3red green: (cgfloat) Green Blue: (cgfloat) Blue Alpha: (cgfloat) Alpha Ns_available_ios (10_0);
6 Judging version issues
recommended for [[Uidevice Currentdevice] systemversion]
Swift with
If #available (IOS 10.0, *) {
IOS 10.0.
Print ("IOS 10.0");
} else
{
}
;
7 Problems with HTTPS
The default non-HTTs network in IOS 9 is forbidden, and of course we can also set Nsallowsarbitraryloads to Yes to disable ATS. However, iOS 10 from January 1, 2017 Apple does not allow us to skip ATS through this method, that is, forcing us to use HTTPS, if not, submit the app may be rejected. But we can use Nsexceptiondomains to open HTTP for a specific domain name, which can be easily audited.
8 Privacy rights
IOS 10 began to more strict privacy rights, if you do not set up will directly crash, and now a lot of crash problems, the general solution is to add the corresponding key-value in the Info.plist file.
<!--Albums--<Key>nsphotolibraryusagedescription</Key><String>app need your consent in order to access the album</String><!--camera--<Key>nscamerausagedescription</Key><String>app requires your consent to access the camera</String><!--Microphones--<Key>nsmicrophoneusagedescription</Key><String>app requires your consent to access the microphone</String><!--location--<Key>nslocationusagedescription</Key><String>app requires your consent in order to access the location</String><!--access to location during use--<Key>nslocationwheninuseusagedescription</Key><String>app requires your consent in order to access the location during use</String><!--always access location-<Key>nslocationalwaysusagedescription</Key><String>app requires your consent in order to always access the location</String><!--calendar--<Key>nscalendarsusagedescription</Key><String>app need your consent to access the calendar</String><!--reminders--<Key>nsremindersusagedescription</Key><String>app requires your consent in order to access reminders</String><!--sports and fitness--<Key>nsmotionusagedescription</Key><String>app need your consent in order to access sports and fitness</String><!--Health Updates-<Key>nshealthupdateusagedescription</Key><String>app requires your consent in order to access the health update</String><!--health Sharing--<Key>nshealthshareusagedescription</Key><String>app need your consent to access health sharing </string> <!--bluetooth-- <key> Nsbluetoothperipheralusagedescription</key> <String>app need your consent to access Bluetooth </ string> <!--Media Archive- <key>nsapplemusicusagedescription</key> <String>app requires your consent in order to access the Media Library </string>
Or
Compatible with iOS 10, upgrade the xcode8 out of a bunch of problem solutions, and some adaptation.