<span id="Label3"></p><p><p>Recently did the iOS 9 adaptation, The program has a lot of warnings also did some processing, write out to give you First.</p></p><p><p><strong>one, IOS 9 Adaptation</strong></p></p><p><p><strong>Question One:</strong></p></p><p><p><error>: Cgcontextsavegstate:invalid Context 0x0. If you want to see the backtrace, please set Cg_context_show_backtrace environmental variable.</p></p>Error reason: set the App's status bar style using the old way, in Info.plist set the view controller-based status bar appearance to no, the default is yes, the general type of iOS6 use this way, ios7,8 is also compatible, but by the iOS9 the warning was reported. Previously we used code to<code><code>[[UIApplication sharedApplication]setStatusBarStyle:UIStatusBarStyleLightContent];</code></code>We used to change the status by the above code color solutions:: 1. Delete the original setup code<code><code>[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];</code></code>2. Modify the mode to set the view controller-based status bar appearance to yes, and then use the new way to implement the style of the status bar. 3. If you are using<strong><strong>Uinavigationcontroller Just</strong></strong>To add [[uinavigationbar appearance] setbarstyle:uibarstyleblack] in Appdelegate.<p><p><strong>Question Two:</strong></p></p><p><p><code>-canOpenURL: failed <span class="hljs-keyword">for URL: <span class="hljs-string">"weixin://app/wx9c8771d3c07dfd30/" - error: <span class="hljs-string">"This app is not allowed to query for scheme weixin"</span></span></span></code></p></p><p><p><span class="hljs-string">Workaround:</span></p></p>Info.plist Join <key>LSApplicationQueriesSchemes</key> <array> <string>urlscheme1</string > <string>urlscheme2</string> <string>urlscheme3</string> <string>urlscheme4< /string> </array><strong><strong>question Three:</strong></strong>Bitcode cause: Xcode7 and above will turn on Bitcode by Default.<br>Workaround:<br>1. Update the library to include bitcode, or the above warning will appear.<br>2. Turn off Bitcode,build Settings "," Enable bitcode "to" NO "<strong><strong>question Four:</strong></strong>APP Transport Security has blocked a cleartext HTTP (/http) resource load since it is Insecure. Temporary exceptions can be configured via your App's info.plist file. in iOS9, the original HTTP protocol was changed to the HTTPS protocol, and the request data was encrypted using TLS1.2 ssl. Workaround: Join key<key>nsapptransportsecurity</key> <dict> <key> in Info.plist nsallowsarbitraryloads</key> <true/> </dict> reference: https://developer.apple.com/library/ Prerelease/ios/releasenotes/general/whatsnewinios/articles/ios9.html#//apple_ref/doc/uid/ Tp40016198-dontlinkelementid_13<strong><strong>ii. Elimination of warning</strong></strong><strong><strong>Warning 1</strong></strong>: Warning:no rule to process file ' .../bbcommmunityverify.h ' of type sourcecode.c.h for architecture arm64 workaround: It can be seen that a certain . h file is out of the question, delete the file in build Phases-Compile Sources<strong><strong>Warning 2:</strong></strong>Warning:automatic Preferred Max Layout Width before IOS 8.0 condition: The warning would appear if (1) you ' re using auto Layo ut, (2) "Automatic" is set to a multiline label [you can check this in the size inspector for the label], and (3) your Deployment Target < IOS 8. The above means that the warning appears on the three conditions 1. Use auto layout 2.label multiple lines and set To. Automatic 3. version is lower than iOS 8. Workaround:<span class="cnblogs_code_copy"><span class="cnblogs_code_copy"></span></span><pre><pre>1-(void) layoutsubviews {2 <br>Self.label.preferredMaxLayoutWidth = availablelabelwidth; 4 [super layoutsubviews]; 5}</pre></pre><span class="cnblogs_code_copy"><span class="cnblogs_code_copy"></span></span><p><p>The first call to would evaluate the constraints on the <code>[super layoutSubviews]</code> label (since It's a direct subview) and change its frame Acco Rdingly. At this point the width is useful; The height was set using the Label's intrinsic content size, which in turn relied on a preferred max layout width value th At are now Stale.</p></p>Now we know the actual width of the label, we set this as its max layout width. internally, This causes the label to invalidate its intrinsic content size; When it's next queried, it'll has the accurate height for its current width. With all layout information on place, we call<code><code>[super layoutSubviews]</code></code>Again. probably means the first [super layoutsubviews]; Get width, Then set self.label.preferredMaxLayoutWidth, and the second is used to calculate the number of Rows. Reference Link: http://stackoverflow.com/questions/25398312/ Automatic-preferred-max-layout-width-is-not-available-on-ios-versions-prior-to-8<strong><strong>Warning 3:</strong></strong>Directory not found for option '-f/applications/xcode.app/contents/developer/platforms/iphonesimulator.platform/ Developer/sdks/iphonesimulator9.0.sdk/developer/library/frameworks ' warning is removed as follows: 1 select project, Compile (targets) 2 Select Build Settings Menu 3 Find the library search Paths and the framework search paths,-l find the library search paths,-f Find the framework search Paths Delete the compilation report Warni Ng's path is OK reference link: http://stackoverflow.com/questions/32630967/warning-when-i-update-to-xcode-7/32658881#32658881<strong><strong>Warning 4:</strong></strong>Warning:plain Style Unsupported in a Navigation item workaround: 1. Find file, Open as source code search<code><code>style=“plain" </code></code><code><code> 2.修改<barButtonItem key="rightBarButtonItem" style="plain" id="juB-DL-F9i"></code></code><code><code> 为</code></code><code><code><barButtonItem key="rightBarButtonItem" id="juB-DL-F9i"></code></code>namely Delete<code><code>style=“plain"</code></code>Reference Link: http://stackoverflow.com/questions/10945859/ Plain-style-unsupported-in-a-navigation-item-warning-with-my-customized-bar-bu<strong><strong>Warning 5</strong></strong>: Warning:scene is unreachable due to lack of entry points and does not having an identifier for runtime access Via-instan Tiateviewcontrollerwithidentifier: Error Reason: an unreachable controller exists in the Storyboard. Neither initial controller, nor idenifier; solution: useless on the deletion, useful words add identifier;<strong><strong>Warning 6:</strong></strong>Warning:frame for "Phone Text Filed" would be different at run time this simple, layout report yellow, update the layout can be set shortcut keys ...<p><p>IOS9 Fit MARK</p></p></span>
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service