Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Undefined symbols for architecture i386 with Realm for WatchOS

I want to add an AppleWatch-Extension to my current Projekt. I´m using this 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

After pod install I will get this warning in my console:

[!] [Xcodeproj] Generated duplicate UUIDs:

When I try building the Project I get this error:

Undefined symbols for architecture i386:
  "realm::BpTreeBase::replace_root(std::__1::unique_ptr<realm::Array, std::__1::default_delete<realm::Array> >)", referenced from:

I also tried using $(inherited) in the Watch-Target.

I'am Using Xcode 7.3.1 and pod version 0.39.0

Any Ideas?

like image 277
kimbl Avatar asked Oct 31 '16 09:10

kimbl


1 Answers

I got the same error for Realm. I got rid of the error "Undefined symbols for architecture i386" by cleaning cocoapods cache:

pod cache clean --all
rm -rf ~/Library/Caches/CocoaPods
pod deintegrate
pod setup
pod install
like image 81
Andrei Marcu Avatar answered Oct 18 '22 00:10

Andrei Marcu