1.HTTP请求相关
在info.plist 右键 -》OpenAs -》Source Code ->
加入
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
2.didFinishLaunchingWithOptions里加入导航页,导致奔溃相关
*** Assertion failure in -[UIApplication _runWithMainScene:transitionContext:completion:]
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 方法里面添加引导页代码,如下这段代码是添加引导页的,把这段代码注释掉就正常了。
加导航页,可以在设置了rootController 的相关界面,进行判断,再add。
3.奔溃问题
*** Assertion failure in -[UIApplication _runWithMainScene:transitionContext:completion:]
在Info.plist中,可以找到:“Main
- - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
- // Override point for customization after application launch.
- self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; //全屏window
- self.window.backgroundColor = [UIColor whiteColor]; //白色背景
- [self.window makeKeyAndVisible]; //
- return YES;
- }
3.真机问题相关
以前的项目 放到Xcode7中运行时可能会遇到以下错误:You must rebuild it with bitcode enabled (Xcodesetting ENABLE_BITCODE)
未来Watch应用须包含Bitcode,iOS不强制,但Xcode7默认会开启Bitcode。
如何适配?
方法一:更新library使包含Bitcode,否则会出现以下中的警告;
1
|
(
null
): URGENT: all bitcode will be dropped because
‘/Users/myname/Library/Mobile Documents/com~apple~CloudDocs/foldername/appname/GoogleMobileAds.framework/GoogleMobileAds(GADSlot+AdEvents.o)‘
was built without bitcode. You must rebuild it
with
bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode
for
this
target. Note: This will be an error
in
the future.
|
方法二:关闭Bitcode
工程设置中 buildingsetting 中搜索bitcode 选择no