I am following the steps given here to build realm to be used in an iOS project, I am using Xcode 8 beta 3 :
I get these warnings :
ld: warning: ignoring file .../Realm.framework/Realm, missing required architecture x86_64 in file .../Realm.framework/Realm (2 slices)
ld: warning: ignoring file .../RealmSwift.framework/RealmSwift, missing required architecture x86_64 in file .../RealmSwift.framework/RealmSwift (2 slices)
and this error
Lipo: -remove's specified would result in an empty fat file
Why is this happening?
Can you try these updated instructions, which should work for Beta 3?
git clone https://github.com/realm/realm-cocoa.git
Realm
project, then the RealmSwift
target, then the 'Build Settings' tab, and set Use Legacy Swift Language Version
to Yes
(if building for Swift 2.3) or No
(if building for Swift 3).sh build.sh TARGET
, where TARGET
is one of the following: ios-swift
, osx-swift
, tvos-swift
, or watchos-swift
, depending on what platform you are building for.RealmSwift.framework
and Realm.framework
into your project, as per step 2 in the instructions here, and do steps 3 and 4.If these don't work please do post a comment.
In order to get Swift 3 versions of Realm
and RealmSwift
, I had to explicitly target master
, set submodules
to true
, and include a post_install
hook to set the Swift version:
use_frameworks!
target 'TARGET_NAME' do
pod 'Realm', git: 'https://github.com/realm/realm-cocoa.git', branch: 'master', submodules: true
pod 'RealmSwift', git: 'https://github.com/realm/realm-cocoa.git', branch: 'master', submodules: true
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '3.0'
end
end
end
end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With