我是新手,第一次写技术类总结。
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 来源:南峰子的技术博客
3
. 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 双击导入 然后正常了
意思是注册远程通知:不支持 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 来源:南峰子的技术博客
3
. 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 双击导入 然后正常了