Now on Apple's official website, we can already download to Xcode8 's GM version, plus 9.14 early morning, Apple will formally launch IOS10 system push, on this occasion, iOS10 adaptation is imminent, do not know Xcode8 beat version, Children's shoes have wood to download come and try it? As far as my use is concerned, the overall impression is that Apple is still in the pit, but it has been improving. Let me just say that the iOS10 and the Xcode8 use some points of attention.
First, certificate management
After opening the project with Xcode8, it is obvious that this is a new feature of Apple that can help us manage certificates automatically. We recommend that you check this automatically manage signing (Ps.) but in the BEAT2 version I use, completely can not, GM version unexpectedly fantastic and good. )
Let me tell you about the problems that may arise:
1.Xcode without a developer account set
The solution is: everyone in the Xcode preferences, add an Apple account, you can.
2. The device machine is not added to the developer's device.
The solution is: everyone in the official website to add the device into the development machine, accompany the description file to re-next description file.
3. Normal situation: Xcode Configure the image after login to the developer account, wait patiently.
Diagram after waiting for completion
Ii. Considerations for Xib Documents
After you use Xcode8 to open the Xib file, a prompt appears.
You can choose Choose Device.
Then everyone will find the layout ah, frame chaos, only need to update frame. Such as
Note: If you follow the above steps and open xib with Xcode7, the error will be reported.
Workaround: Need to delete xib inside
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
This sentence, as well as the < document > ToolsVersion and < plugIn > version in your normal xib file values, but not recommended to do so, in the Xcode8 out, I hope everyone quickly get started, full update. This is the same as XCODE5 to Xcode6, there are changes, but still want to learn as soon as possible, adapt Yo!
Third, code and API note
After using Xcode8, some of the code may not be compiled, specifically I would like to talk about the problems I encountered.
Proxy method for 1.UIWebView:
* * Note to delete Nserror in front of the nullable, otherwise error.
- (void)webView:(UIWebView *)webView didFailLoadWithError:(nullable NSError *)error{ [self hideHud];}
Iv. Workarounds for code annotations not available
This is because Apple solves Xcode ghost and blocks the plugin.
Workaround
Open terminal, command run: sudo/usr/libexec/xpccachectl
Then you have to restart the computer to take effect
Note: The Xcode8 has a built-in annotation feature, where
The shortcut keys are set here
Seemingly Xcode8 canceled the function of the three-party plug-in, specific can refer to the next Xcode8 Source Editor
V. Permissions and Related Settings
Note that when added, there is no space at the end
We need to open the Info.plist file to add a description of the appropriate permissions, or the program will crash on IOS10.
Specific example:
麦克风权限:Privacy - Microphone Usage Description 是否允许此App使用你的麦克风?相机权限: Privacy - Camera Usage Description 是否允许此App使用你的相机?相册权限: Privacy - Photo Library Usage Description 是否允许此App访问你的媒体资料库?通讯录权限: Privacy - Contacts Usage Description 是否允许此App访问你的通讯录?蓝牙权限:Privacy - Bluetooth Peripheral Usage Description 是否许允此App使用蓝牙?语音转文字权限:Privacy - Speech Recognition Usage Description 是否允许此App使用语音识别?日历权限:Privacy - Calendars Usage Description 是否允许此App使用日历?定位权限:Privacy - Location When In Use Usage Description 我们需要通过您的地理位置信息获取您周边的相关数据定位权限: Privacy - Location Always Usage Description 我们需要通过您的地理位置信息获取您周边的相关数据定位的需要这么写,防止上架被拒。
Six, the font becomes larger, the original frame needs to fit
After some friends remind, found that the original 2 words in the program width is 24, now 2 words need 27 width to show.
Hope to have a solution to the friend, comments sue me yes, thank you
Seven, push to send
such as the section, do not forget to open. All the push platform, whether it is the aurora or what, to receive the push, this must be opened yo??
After that, you should be able to receive the push. In addition, the Aurora Push also launched a new version, you can also update.
PS. Apple has made a lot of changes to the push, I hope that we have more access to review, processing the agent method of push has changed.
// 推送的代理[<UNUserNotificationCenterDelegate>]
IOS10 received notification is no longer in
[Application:didreceiveremotenotification:] method to deal with, IOS10 launch new proxy method, receive and process all kinds of notifications (local or remote)
- (void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions))completionHandler { //应用在前台收到通知 NSLog(@"========%@", notification);}- (void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)())completionHandler { //点击通知进入应用 NSLog(@"response:%@", response);}
I will update the article later and give a detailed explanation of the push.
8. Screen for messy bugs
After updating the Xcode8, the newly created project will print a bunch of logs that are inexplicable to read.
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,
The shielding method is as follows:
Xcode8 inside Edit scheme-> Run--Arguments, in the environment variables inside add
Os_activity_mode = Disable
If you have written or printed log, please check the checkmark again, you can solve the
Suitable for iOS10 and Xcode8