Reputation: 18581
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?
Upvotes: 5
Views: 4401
Reputation: 8739
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
Upvotes: 2
Reputation: 1787
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.
Upvotes: 3
Reputation: 1802
You need to install Realm using Cocoapods and this pods:
pod 'Realm', git: 'https://github.com/realm/realm-cocoa.git', branch: 'master'
pod 'RealmSwift', git: 'https://github.com/realm/realm-cocoa.git', branch: 'master'
and while running the application don't select convert to swift 3
Upvotes: 0