维护IOS项目时遇到的一些问题

我是新手,第一次写技术类总结。
1 .   registerForRemoteNotificationTypes: is not supported in iOS 8.0 and later.
意思是注册远程通知:不支持 ios8.0  及以上版本的设备
所以在
- ( BOOL )application:( UIApplication  *)application didFinishLaunchingWithOptions:( NSDictionary  *)launchOptions
{
// ios 8.0    以上版本
     if ([[[ UIDevice   currentDevice ] systemVersion ] floatValue ] >= 8.0 )
    {
        [[ UIApplication   sharedApplication ] registerUserNotificationSettings :[ UIUserNotificationSettings   settingsForTypes :
        ( UIUserNotificationTypeSound  |
          UIUserNotificationTypeAlert  |
          UIUserNotificationTypeBadge )
          categories : nil ]];
    } else { // ios 8.0 以下版本
        [[ UIApplication   sharedApplication ] registerForRemoteNotificationTypes :
          UIRemoteNotificationTypeBadge  |
          UIRemoteNotificationTypeSound  |
          UIRemoteNotificationTypeAlert  ];
    }
    [[ UIApplication   sharedApplication ] registerForRemoteNotifications ];


添加支持 Ios 8.0 及以上的代码
运行:问题解决

2. 
/Utils/JPush/lib/libPushSDK.a(APService.o)' does not contain 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. for architecture arm64

    因为第三方库不支持BitCode 
 进入Build Settings -> Build Option -> Enable BitCode 改为NO
参考: 理解Bitcode:一种中间代码    http://www.cocoachina.com/ios/20150818/13078.html   来源:南峰子的技术博客


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.   
大概意思是: 系统阻止了 Http 明文请求的发送
为什么会阻止 HttP 请求的发送呢: IOS9  新增的 App Transport Security  特性   默认是不允许不安全的请求的发送  
解决:在 plist  文件中加入
<key> NSAppTransportSecurity </key>
<dict>
<key> NSAllowsArbitraryLoads </key>
<true/>

</dict>
YES  是允许运行不安全的请求

4. 
1.在打包完毕要发布的时候发现无法正常打包 后来进入钥匙串访问:显示“ 此证书的签发者无效”  
一开始以为自己误删了,结果全部是签发无效 查阅网上资料 
原来苹果更新的安全证书  Apple Worldwide Developer Relations Certification Authority (AppleWWDRCA.cer)   这个证书没有及时的更新 然后在开发者中心 重新下载了一份  https://developer.apple.com/certificationauthority/AppleWWDRCA.cer    双击导入    然后正常了

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值