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. )
qq20160913-8.png-96.9kb
Let me tell you about the problems that may arise:
1.Xcode without a developer account set
qq20160913-0.png-38.5kb
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.
qq20160913-2.png-33.7kb
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.
qq20160913-1.png-25.1kb
Diagram after waiting for completion
qq20160913-3.png-27kb
Ii. Considerations for Xib Documents
After you use Xcode8 to open the Xib file, a prompt appears.
qq20160913-9.png-41.7kb
You can choose Choose Device.
Then everyone will find the layout ah, frame chaos, only need to update frame. Such as
qq20160913-11.png-113.2kb
qq20160913-12.png-32.3kb
Workaround: Need to delete xib inside
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
This, as well as changing the version in < document > ToolsVersion and < plugIn > to the value in your normal xib file
, but it is not recommended to do so, after Xcode8 out, I hope we all 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
Qq20160914-3.png
The shortcut keys are set here
Qq20160914-2.png
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:
Qq20160914-0.png
Microphone Permissions: Privacy-microphone usage Description Do you want to allow this app to use your microphone?
Camera permissions: Privacy-camera usage Description Do you want to allow this app to use your camera?
Album Permissions: Privacy-photo library Usage Description Do you want to allow this app to access your media library? Address Book permissions: privacy-contacts Usage Description Do you want to allow this app to access your contacts?
Bluetooth permissions: Privacy-bluetooth Peripheral usage Description Do you Xu Yun this app to use Bluetooth?
Voice to text permissions: Privacy-speech recognition usage Description allow this app to use speech recognition?
Calendar permissions: Privacy-calendars usage Description Do you want to allow this app to use the calendar?
Location permissions: Privacy-location when on use Usage Description we need to get relevant data about you from your location
Location rights: Privacy-location always Usage Description We need to get data about you from your location
The positioning needs to be written so as to prevent the shelves from being rejected.
Note that when added, there is no space at the end
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??
Qq20160914-4.png
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 launches new proxy method, receives and processes various notifications (local or remote)
//应用在前台收到通知 NSLog(@"========%@", notification);
}
//点击通知进入应用 NSLog(@"response:%@", response);
}
I will update the article later and give a detailed explanation of the push.
iOS Development iOS10 Push Tutorials (Basic): Http://www.jianshu.com/p/f5337e8f336d:iOS Development iOS10 Push (Advanced 1): http://www.jianshu.com/p/3d602a60ca4f
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
Qq20160914-8.png
If you have written or printed log, please check the checkmark again, you can solve the
9.
Xcode8 print a lot of irrelevant content
Just upgraded to Xcode8 and found that the console printed a lot of things.
Example:subsystem:com.apple.network, Category:, enable_level:0, persist_level:0, default_ttl:0, info_ttl:0, Debug_ttl : 0, generate_symptoms:0, enable_oversize:0, Privacy_setting:2, enable_private_data:0
Solution: such as
// Product–>Scheme–>Edict Scheme;
如果没有OS_ACTIVITY_MODE就添加,如果有,就设置Value为disable,并且打钩.
Suitable for iOS10 and xcode8-b