使用shareSDK来做第三方分享,模拟器运行良好,但是5s真机一直报错,好像里面的腾讯API是不支持64位
开发环境:
xcode:5.1.1
真机调试:iPhone5s
使用cocoapods管理第三方库
报错:
加入shareSDK后,添加shareSDK相关代码,添加腾讯的API后,报错xxxxxxxxxnot find arm64。Architectures你删除arm64后cocoapods添加的某些库报错找不到什么符号等等。各种这是Architectures各种报错。最后实在不行只有去求助国外大神们,原来cocoapods和微信,QQ的API冲突了。
解决cocoapods在64位iOS7系统下面的警告问题
现在编写iOS程序,引用到第三方包,运用cocoapods进行包管理已经成为了一个趋势了,但是最近运用cocoapods构建的应用却在64bit的iOS7系统中有警告的产生,具体的警告信息如下面所示:
Pods was rejected as an implicit dependency for ‘libPods.a’ because its architectures ‘i386’ didn’t contain all required architectures ‘x86_64’
具体的解决方案如下:在TAGETS =》 Build Settings 中重新设置值.
自己的工程和Pods工程都需要进行上述的设置.
Despite the lack of universal 64-bit support among 3rd-party pods, CocoaPods still includes the arm64
architecture (via ARCHS_STANDARD_INCLUDING_64_BIT
) in its generated targets’ build settings. This can cause problems if your app’s dependencies don’t support arm64
, or you only want to build for armv7
and armv7s
for other reasons.
Fortunately, there’s a quick and easy automated fix. Just add the following to the bottom of your Podfile
to revert the ARCHS
build setting to ARCHS_STANDARD
:
# Remove 64-bit build architecture from Pods targets
post_install do |installer|
installer.project.targets.each do |target|
target.build_configurations.each do |configuration|
target.build_settings(configuration.name)['ARCHS'] = '$(ARCHS_STANDARD_32_BIT)'
end
end
end
所以在podfile的结尾加上:下面代码
post_install do |installer| installer.project.targets.each do |target| target.build_configurations.each do |configuration| target.build_settings(configuration.name)['ARCHS'] = '$(ARCHS_STANDARD_32_BIT)' end end end