我正在使用通过CocoaPods安装的ZXingObjC库。现在我添加了Fabric和Crashlytics,所以我的pod文件看起来像这样:
platform :ios, '8.0'
use_frameworks!
target 'Project' do
pod 'ZXingObjC', '~> 3.0'
pod 'Fabric'
pod 'Crashlytics'
end
target 'ProjectTests' do
end
之前我使用的是桥接头,但我将CocoaPods更新为0.38.2。我有构建项目的问题所以我正在寻找答案,我发现我不再需要使用CocoaPods桥接标题,我可以使用:
import ZXingObjC
它仍然没有工作,所以我只删除Pods文件夹的内容并运行pod install
命令,现在它正在工作。我可以建立项目。但是我仍然有重复课程的问题。推出应用程序后,我收到许多警告:
Class ZXAI013103decoder is implemented in both
/private/var/mobile/Containers/Bundle/Application/06B79252-5593-4B8F-81F6-626C4886B2E7/Project.app/Frameworks/ZXingObjC.framework/ZXingObjC and
/private/var/mobile/Containers/Bundle/Application/06B79252-5593-4B8F-81F6-626C4886B2E7/Project.app/Project.
One of the two will be used. Which one is undefined.
哪里可能是问题?该库看起来工作正常,但我仍然想解决这些问题。谢谢你的帮助
P.s。:我有部署目标7.0的iOS,我在构建可能与我的问题相关的项目时收到这些警告:
ld: warning: embedded dylibs/frameworks are only supported on iOS 8.0 and later (@rpath/ZXingObjC.framework/ZXingObjC)
ld: warning: embedded dylibs/frameworks are only supported on iOS 8.0 and later (@rpath/Pods_GexPay.framework/Pods_GexPay)