随笔 - 35  文章 - 21  trackbacks - 0
<2012年4月>
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345

常用链接

留言簿

随笔分类

随笔档案

文章分类

搜索

  •  

最新评论

阅读排行榜

评论排行榜

1 Launch Keychain Access from your local Mac and from the login keychain, filter by the Certificates category. You will see an expandable option called “Apple Development Push Services”
2 Right click on “Apple Development Push Services” > Export “Apple Development Push Services ID123″. Save this as apns-dev-cert.p12 file somewhere you can access it. There is no need to enter a password.
3 The next command generates the cert in Mac’s Terminal for PEM format (Privacy Enhanced Mail Security Certificate):
openssl pkcs12 -in apns-dev-cert.p12 -out apns-dev-cert.pem -nodes -clcerts
posted @ 2012-05-29 11:07 lincode 阅读(714) | 评论 (0)编辑 收藏

这个 bug 在 xcode 4.3 以下会出现,4.3 以后已经修正了。
解决方法为:找到 target 的图标,更改其 Other Linker Flags 为: -all_load 或 -force_load
-force_load,后跟随一个文件位置,可以更精确地加载所需文件。
 
苹果的解释为 : http://developer.apple.com/library/mac/#qa/qa1490/_index.html

简单点说就是,Objective-C 的动态特性使得需要,为链接器添加一个标签(设置 Other Linker Flags 为 -ObjC)来解决通过 Category 向类添加方法的问题。
但这个标签 -ObjC 在 64 位 和 iOS 中有问题,需要使用 -all_load 或 -force_load。

总结如下:
如果,第三库中没有 category,Other Linker Flags 无需设置
如果,第三方库中有 category,需要设置为 -ObjC
如果,某些 Xcode 版本中,出现问题,修改设置为 -all_load
posted @ 2012-04-23 14:56 lincode 阅读(1796) | 评论 (0)编辑 收藏