iOS7.1以及iOS9.2与之前的不同

先说下要适配iOS9要做的事:

1.更改http为https 

两种方案:

一.公司后台服务器更改;

二.作为开发者,可在Xcode暂时退回到http协议.  开发者更改方法如下:

1.在Info.plist中添加App Transport Security Settings (或NSAppTransportSecurity), 类型Dictionary。
2.在App Transport Security Settings下添加Allow Arbitrary Loads (或NSAllowsArbitraryLoads), 类型Boolean,值设为YES.

 

2.对于使用ShareSDK第三方登录或分享,对iOS9的适配

可参考官方文档详细介绍:                     适配iOS 9系统                 

包括:https协议支持,关闭bitcode支持,添加Scheme白名单.

 

3.Xcode7报错:Assertion failure in -[UIApplication _runWithMainScene:transitionContext:completion:]

    从iOS9开始,Xcode7需要所有UIWindow在makeKeyAndVisible之前必须有一个rootViewController,否则报以上错误。

    解决方案:

    UIViewController *emptyView = [[UIViewController allocinit];

    self.window.rootViewController = emptyView;

    [self.window makeKeyAndVisible];

 

4.Xcode7打开旧项目FrameWork文件夹下的.dylib库缺失,添加方法

     项目Target中Link Binary With Libraries  点击下方 “+”添加,  显示搜索页面,在此搜.dylib搜不出来(只能搜到同名的.tbd), 需点击 Add Other,出现文件目录页面 (正常情况通过Finder同样找不到.dylib文件,因该文件是隐藏文件。需按快捷键 CMD+Shift+G,输入/usr/lib后进入隐藏界面,然后添加需要的.dylib即可。

 

5.Xcode7 真机测试,真机出现"unavailable"字样,Could not find developer disk image.

stackoverflower答案: 点击查看

解决方案:
先关闭Xcode.再从Xcode 6.4中,拷贝8.4 (12H141)文件夹到Xcode 7的对应目录下.
Xcode 6.4路径为:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport

Xcode 7路径为:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
重新打开Xcode 7,打开项目,需要等一会,等到菊花不转了,才能运行。

 

6.App上传Appstore错误

ERROR ITMS-90049:"This bundle is invalid. The bundle identifier contains disallowed characters. [See the section of the Application Programming Guide entitled The Application Bundle.]"


解决方案:  
在项目导航栏搜索Info.plist文件

 
查找第三方的info.plist文件,如ShareSDK中的腾讯Bundle文件下的Info.plist文件。
在该文件下添加或者修改以下几个字段:
  • Bundle version
  • Bundle identifier
  • Bundle versions string, short
需要和系统自带的Info.plist文件一样。 如下图

 

7.App上传Appstore错误

invalid package Applications built with SDK 9.0 or later must be packaged as proper IPA files.

解决方案:
按照错误提示原先上传的是.zip文件,现在需要上传 .ipa文件。也就是需要将打包成的app在打包成ipa文件就可以了。
具体步骤:
1、新建文件夹 Payload 
2、将xcode编译好的app放在Payload文件夹中
3、压缩Payload文件夹为 .zip文件,然后重命名为 .ipa  重新上传即可
 
附快捷shell脚本:  将脚本放在Release-iphones文件夹下,运行该脚本就可将app转换为ipa。
1
2
3
4
5
6
7
8
9
10
#!/bin/bash
APPNAME= "appName"
ZIPNAME= "zipName"
IPANAME= "ipaName"
 
mkdir  ./ipa/Payload
cp -r ./${APPNAME}.app ./ipa/Payload
cd ipa
zip -r ${ZIPNAME} *
mv ${ZIPNAME}.zip ${IPANAME}.ipa

 

8.App上传Appstore错误

ERROR ITMS-90535 Unexpected CFBundleExecutable Key. 

 解决方案:

1,用XCode 6.4的Product -> Archive,再提交到AppStore。
2,在Stackoverflow上也有相关的解决办法,就是把无用的CFBundle删除掉。 点击查看
在工程里面搜索info.plist,可以先搜索info,找到第三方的info.plist文件,删除里面的Executable file对应的一整行,包括值。
例如: 找到腾讯的info.plist  

 
 
删除箭头指向的一行,即可.

 
9.未解决问题,哪位大神看到
<1> 真机运行启动时崩溃,并非100%出现,出现率在80%左右,不清楚是什么原因,有知道的解答一下或者给个思路
dyld`gdb_image_notifier:

 ->  0x2be590cc <+0>: bx     lr

 在网上看到的答案:

选 Project,然后进 BuildPhases,然后进 LinkBinaryWithLibraries. 找到 GLKit.Framework ,把它的 status 更改为 optional 就 ok.(如果没有GLKit.Framework, 添加一个再设置)

因bug无法重现,无法验证以上方法是否可行.

 

<2>Xcode7.1真机测试启动崩溃,模拟器正常,添加Enable Address Sanitizer调试,崩溃在启动页.

暂时解决办法: 用Xcode 6.3.2运行打包即可.

libclang_rt.asan_ios_dynamic.dylib`__asan::AsanDie:
->  0x5e8240 <+0>:   push   {r4, r5, r7, lr}  //代码崩溃在此行
    0x5e8242 <+2>:   add    r7, sp, #0x8
    0x5e8244 <+4>:   dmb    ish

打印信息如下:

AddressSanitizer debugger support is active. Memory error breakpoint has been installed and you can now use the 'memory history' command.
==891==Shadow memory range interleaves with an existing memory mapping. ASan cannot proceed correctly. ABORTING.
==891==ASan shadow was supposed to be located in the [0x3ffff000-0x5fffffff] range.
==891==Process memory map follows:
    0x3af88000-0x3af89000    /usr/lib/libgcc_s.1.dylib
    0x3da44000-0x434ec000    /usr/lib/libgcc_s.1.dylib
    0x36556000-0x3655f000    /System/Library/PrivateFrameworks/MobileBluetooth.framework/MobileBluetooth
    0x3cf7c000-0x3cf7d000    /System/Library/PrivateFrameworks/MobileBluetooth.framework/MobileBluetooth
    0x3da44000-0x434ec000    /System/Library/PrivateFrameworks/MobileBluetooth.framework/MobileBluetooth
    0x34a47000-0x34a4e000    /System/Library/PrivateFrameworks/BluetoothManager.framework/BluetoothManager
    0x3c671000-0x3c673000    /System/Library/PrivateFrameworks/BluetoothManager.framework/BluetoothManager
    0x3da44000-0x434ec000    /System/Library/PrivateFrameworks/BluetoothManager.framework/BluetoothManager

........省略中间部分

    0x3b1a3000-0x3b2f5000    /usr/lib/libicucore.A.dylib
    0x3d91a000-0x3d92c000    /usr/lib/libicucore.A.dylib
    0x3da44000-0x434ec000    /usr/lib/libicucore.A.dylib
    0x3b92b000-0x3b9c2000    /usr/lib/libsqlite3.dylib
    0x3d977000-0x3d979000    /usr/lib/libsqlite3.dylib
    0x3da44000-0x434ec000    /usr/lib/libsqlite3.dylib
    0x005b0000-0x00604000    /var/mobile/Applications/D0115D17-C682-41AD-8E5C-D9DA83CF1053/wojsww.app/Frameworks/libclang_rt.asan_ios_dynamic.dylib
    0x00604000-0x00a60000    /var/mobile/Applications/D0115D17-C682-41AD-8E5C-D9DA83CF1053/wojsww.app/Frameworks/libclang_rt.asan_ios_dynamic.dylib
    0x00a60000-0x00aa0000    /var/mobile/Applications/D0115D17-C682-41AD-8E5C-D9DA83CF1053/wojsww.app/Frameworks/libclang_rt.asan_ios_dynamic.dylib
    0x005ad000-0x005ae000    /Library/MobileSubstrate/MobileSubstrate.dylib
    0x005ae000-0x005af000    /Library/MobileSubstrate/MobileSubstrate.dylib
    0x005af000-0x005b0000    /Library/MobileSubstrate/MobileSubstrate.dylib
    0x00010000-0x00014000    /var/mobile/Applications/D0115D17-C682-41AD-8E5C-D9DA83CF1053/wojsww.app/wojsww
    0x00014000-0x00370000    /var/mobile/Applications/D0115D17-C682-41AD-8E5C-D9DA83CF1053/wojsww.app/wojsww
    0x00370000-0x003f4000    /var/mobile/Applications/D0115D17-C682-41AD-8E5C-D9DA83CF1053/wojsww.app/wojsww
    0x003f4000-0x005ac000    /var/mobile/Applications/D0115D17-C682-41AD-8E5C-D9DA83CF1053/wojsww.app/wojsww
==891==End of process memory map.
AddressSanitizer report breakpoint hit. Use 'thread info -s' to get extended information about the report.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值