Network request error.
Upgrading Xcode 7.0 found network access failed.
Output error message
#warning: 获取app配置信息失败: The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.
Reason: IOS9 introduced the new feature app Transport Security (ATS).
Details: App Transport Security (ATS)
The new feature requires that the network access within the app must use the HTTPS protocol.
But now the company's project is using the HTTP protocol, using private encryption to ensure data security. It is not immediately possible to change to HTTPS protocol transfer.
Finally, the following solutions are found:
在Info.plist中添加NSAppTransportSecurity类型Dictionary。在NSAppTransportSecurity下添加NSAllowsArbitraryLoads类型Boolean,值设为YES
2f5721b6-2c74-4b59-84b3-7d77c541038f.pngBitcode Problems
Cause: Xcode7 and above will turn on Bitcode by default.
Bitcode What is specific is not explained.
Workaround:
1. Update the library to include Bitcode, or the above warning will appear.
2. Close the Bitcode, simple and rude.
Build Settings”->”Enable Bitcode”改成"NO"。
20150917113544983.jpgProject operation error is as follows
<Error>: CGContextSaveGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
<Error>: CGContextTranslateCTM: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
<Error>: CGContextRestoreGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
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.
Workaround:
Delete the original setup code
//设置状态栏的白色 [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
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.
2f5721b6-2c74-4b59-84b3-7d77c541038f.png
Write the following method in your custom navigation controller:
Set the status bar (bright color) white
-(UIStatusBarStyle)preferredStatusBarStyle{ return UIStatusBarStyleLightContent;}
Remember to clean or remove the application to run again
iOS 9 simulator after upgrading Xcode 7 direct error when starting program
The error is as follows
***** Assertion failure in -[UIApplication _runWithMainScene:transitionContext:completion:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3505.16/UIApplication.m:3294**
Reason:
The new SDK does not allow overly complex operations to be done before setting up Rootviewcontroller, resulting in didfinishlaunchingwithoptions not set after the end of the Rootviewcontroller
Xcode7 requires all UIWindow must be set up immediately first Rootviewcontroller
Workaround:
Re-assign a value after setting a Rootviewcontroller first
UIWindow *window = [[UIWindowalloc] initWithFrame:[UIScreenmainScreen].bounds];window.rootViewController = [UIViewController new];
Bug with project adaptation to IOS9