below to introduce you to the next iOS10 and Xcode8 use some attention points, together to see!
First, certificate management
After opening the project with Xcode8, it is obvious that the following figure, this is Apple's new features, can help us automate the management of certificates. We recommend that you tick this automatically manage signing (Ps. But in the BEAT2 version of the time I used, completely can not, GM version unexpectedly wonderful again. )
Let me say a few questions that may arise:
1.Xcode screenshot with no developer account set
The solution is: everyone in the Xcode preferences, add an Apple account, you can.
2. A screenshot of the device machine not added to the developer's device
The solution is: everyone in the official website to add the device into the development machine, accompanied by the description of the file can be described again.
3. Normal situation: Xcode configuration Login Developer account after the picture, patiently waiting.
Figure after waiting to finish
Ii. Notes on Xib documents
When you open the Xib file using Xcode8, the following illustration appears.
We choose choose Device can be.
Then you will find the layout ah, frame chaos, only need to update the frame can be. The following figure
Note: If you follow the steps above, when you open the Xib with Xcode7, you will report an error.
Solution: Need to delete xib inside
<capability name= "Documents saved in the Xcode 8 format" mintoolsversion= "8.0"/>
This sentence, and change the version in ToolsVersion and < plugIn > in < document > to the values in your normal xib file
, but do not recommend this, after Xcode8 out, I hope everyone is quick to start, full update. This is the same as XCODE5 to Xcode6, there are changes, but still need to learn as soon as possible, adapt Yo!
Third, code and API attention
After using Xcode8, some of the code may not be compiled, specifically I would like to say that I encountered problems.
1.UIWebView Proxy Method:
* * Note to delete the Nserror front of the nullable, otherwise the error.
-(void) WebView: (UIWebView *) WebView Didfailloadwitherror: (Nullable Nserror *) error
{
[self hidehud];
}
Four, code comments can not be used to solve the solution
This is because Apple solves Xcode ghost and shields the plugin.
Solving method
Open terminal, command run: sudo/usr/libexec/xpccachectl
Then you must reboot the computer to take effect.
Note: The Xcode8 is built with the ability to open annotations, located here
The shortcut keys are set here
Seemingly Xcode8 canceled the function of the three-party plug-ins, specific can be consulted under Xcode8 Source Editor
V. Permissions and Related Settings
Note that when you add, there are no spaces at the end.
We need to open the Info.plist file to add a description of the appropriate permissions, otherwise the program will crash on the iOS10.
The following figure:
Microphone Permissions: Privacy-microphone Usage Description allow this app to use your microphone?
Camera permissions: Privacy-camera Usage Description allow this app to use your camera?
Album Permissions: Privacy-photo library Usage Description allow this app to access your media database? Address Book permissions: privacy-contacts
Usage Description allow this app to access your address Book?
Bluetooth permissions: Privacy-bluetooth peripheral Usage Description Xu Yun This app to use Bluetooth?
Voice-text permissions: Privacy-speech recognition Usage Description allow this app to use speech recognition?
Calendar permissions: Privacy-calendars Usage Description allow this app to use the calendar?
Location permissions: Privacy-location when in the use Usage Description we need to obtain information about your surroundings through your geographic location
Location permissions: privacy-location Always Usage Description We need to obtain information about your surroundings through your geographic location.
Positioning needs to be so written to prevent the shelves from being rejected.
Six, the font size, 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 the.
Hope to have a solution friend, comment on me yes, thank you
Vii. Push and send
Don't forget to open the part of the diagram below. All push platform, no matter is the aurora or what, want to receive push, this is must open yo ✌️
Then you should be able to receive a push. In addition, the Aurora Push also launched a new version, you can also update.
PS. Apple this time on the push has made a great change, I hope that we read more lookup, processing the agent method of push also changed.
Push Agent
[<unusernotificationcenterdelegate>]
IOS10 received a notice no longer in the
[Application:didreceiveremotenotification:] method to deal with, iOS10 introduce new agent methods, receive and process various notifications (local or remote)
-(void) Usernotificationcenter: (unusernotificationcenter *) Center willpresentnotification: (unnotification *) Notification Withcompletionhandler: (void (^) (unnotificationpresentationoptions)) Completionhandler {//application received notification in the foreground NSLog (@ "========%@", notification);} -(void) Usernotificationcenter: (unusernotificationcenter *) Center Didreceivenotificationresponse: ( Unnotificationresponse *) Response Withcompletionhandler: (void (^) ()) Completionhandler {//Click on notification to enter application NSLog (@ "Response: %@ ", response);}
The above is a small set for you to introduce the development of iOS suitable for iOS10 and Xcode8 attention, I hope to help you, 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!