我想添加一个AppleWatch-Extension到我当前的项目。我正在使用这个podfile:
def shared_pods
pod 'RealmSwift', '2.0.2'
end
target 'Target-iOS' do
platform :ios, '9.0'
use_frameworks!
...
shared_pods
end
target 'Target-MensaWidget' do
platform :ios, '9.0'
use_frameworks!
shared_pods
end
target 'Watch Extension' do
platform :watchos, '2.0'
use_frameworks!
shared_pods
end
在pod install
之后,我会在控制台中得到这个警告:
[!] [Xcodeproj] Generated duplicate UUIDs:
当我尝试构建项目时,我得到这个错误:
Undefined symbols for architecture i386:
"realm::BpTreeBase::replace_root(std::__1::unique_ptr<realm::Array, std::__1::default_delete<realm::Array> >)", referenced from:
我还尝试在Watch-Target中使用$(inherited)。
我正在使用Xcode 7.3.1和pod版本0.39.0
任何想法?
Realm也出现了同样的错误。通过清理cocoapods缓存,我消除了错误"Undefined symbols for architecture i386":
pod cache clean --all
rm -rf ~/Library/Caches/CocoaPods
pod deintegrate
pod setup
pod install
最有效的解决方案是删除单个Pod:
rm -rf Pods/Target Support Files/RealmJS
当你清理构建时,重新安装pod (pod deintegrate, rm -rf ~/Library/Caches/CocoaPods, rm -rf pods) -那么新的构建需要更多的时间