Now, we can download the GM version of Xcode8 on apple’s official website. In addition, apple will officially release the push of iOS10 on the morning of September 14, at this moment, the adaptation of iOS10 is imminent. I don’t know Xcode8 beat version, have you downloaded it and tried it? As far as I’m concerned, apple still sucks, but it’s improving all the time. Let me talk about iOS10 adaptation and Xcode8 use some points to note.
I. Certificate management
After opening the project with Xcode8, the most obvious thing is the following image, which is a new apple feature that helps us automatically manage certificates. Automatically manage Signing (Ps). But when I used the Beat2 version, it didn’t work at all, and the GM version magically worked.)
QQ20160913-8. PNG – 96.9 kB
Here’s what could go wrong:
1. Screenshot of Xcode without a developer account
QQ20160913-0. PNG – 38.5 kB
The solution is to add your Apple account to your Xcode preferences.
2. Screenshots of devices without adding the developer’s Device
QQ20160913-2. PNG – 33.7 kB
The solution is: after you add the device to the development machine on the official website, you can go to the next description file with the following description file.
3. Normal :Xcode configures the picture after logging in to the developer account, wait patiently.
QQ20160913-1. PNG – 25.1 kB
After the wait is complete
QQ20160913-3.png-27kB
Ii. Precautions for Xib files
When you open the XIB file using Xcode8, the following prompts appear.
QQ20160913-9. PNG – 41.7 kB
You can just Choose Choose Device. And then you’ll notice that the layout, the frame is messed up, and you just need to update the frame. The following figure
QQ20160913-11. PNG – 113.2 kB
- Note: If you open the Xib using Xcode7 after following the above steps, an error will be reported.
QQ20160913-12. PNG – 32.3 kB
- Solution: Delete the Xib
Copy the code
This, along with changing the version in toolsVersion in < document > and version in < plugIn > to the value in your normal XIB file
However, it is not recommended to do so. After Xcode8 comes out, I hope everyone can get started quickly and update everyone. This is the same as Xcode5 to Xcode6, there are changes, but still need to learn as early as possible, as soon as possible to adapt!
Iii. Code and Api attention
Some of the code might not compile with Xcode8, so I’ll talk about the problems I encountered. UIWebView proxy method: ** Nullable must be removed before NSError, otherwise error will be reported.
- (void)webView:(UIWebView *)webView didFailLoadWithError:(nullable NSError *)error
{
[self hideHud];
}Copy the code
Fourth, code comments can not use the solution
This is because Apple solved xcode ghost and blocked the plugin. Solution Open the terminal and run the sudo /usr/libexec/xpccachectl command. Then restart the PC to take effect
Note: Xcode8 has a built-in feature to enable comments, located here
QQ20160914-3.png
The shortcut Settings are here
QQ20160914-2.png
It seems that Xcode8 has removed the function of tripartite plug-ins. For details, check out the Xcode8 Source Editor
5. Permissions and related Settings
Please note that when you add it, you don’t have Spaces at the end and we need to open the info.plist file to add the permissions, otherwise it will crash in iOS10. The details are as follows:
QQ20160914-0.png
Microphone permission: privacy-microphone Usage Description Is this App allowed to use your Microphone? Privacy-camera Usage Description Whether to allow this App to use your Camera? Does privacy-Photo Library Usage Description allow this App to access your media Library? Privacy-contacts Usage Description Does this App allow access to your address book? Bluetooth permission: privacy-Bluetooth Peripheral Usage Description Whether this App is allowed to use Bluetooth?
Privacy-speech Recognition Usage Description Whether to allow the App to use Speech Recognition? Privacy-calendars Usage Description Whether this App is allowed to use a calendar?
Location permission: privacy-location When In Use Usage Description We need to obtain the Location permission of relevant data around you through your geographical Location information: Privacy-location Always Usage Description We need to obtain relevant data around you through your geographical Location information.
6. The font becomes larger, and the original frame needs to be adapted
After some friends remind, found that the original 2 word width is 24, now 2 words need 27 width to display. Hope to have a solution to the friend, comment to tell me, thank you
Seven, push
Don’t forget to open the section below. All push platforms, whether aurora or what, in order to receive push, this is a must open yo ✌️
QQ20160914-4.png
After that, you should be able to get a push. In addition, there is a new version of aurora Feed, so you can also update it.
PS. Apple has made a big change to push this time, and I hope you can check it out more. The proxy method for handling push has also changed.
// Push proxy []Copy the code
IOS10 received notice is no longer in application: didReceiveRemoteNotification: method to deal with, iOS10 launched a new proxy method, receiving and processing of various types of notification (local or remote)
- (void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification WithCompletionHandler: void (^) (completionHandler UNNotificationPresentationOptions)) {/ / application at the front desk informed NSLog (@ "= = = = = = = = % @". notification); }- (void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)())completionHandler { NSLog(@"response:%@", response); }Copy the code
I’ll update this post later with a more detailed explanation of push.
8. Eliminate clutter bugs
When Xcode8 is updated, new projects will print a bunch of logs that don’t make sense. Such as these
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,Copy the code
Xcode8: Edit Scheme > Run > Arguments; Environment Variables: Add OS_ACTIVITY_MODE = Disable
QQ20160914-8.png
If you still print log after writing, please re-check the check box and you can solve the problem
If you have any questions, please comment to me. If it is good, I hope you can follow me. Thank you