Construct area for Swift 3 & Xcode 8

I perform the steps outlined here to create an area that will be used in iOS project. I'm 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 specified would result in an empty fat file 

Why is this happening?

+5
source share
3 answers

Can you try these updated instructions that should work for the Beta 3?

  • Clone the Realm Cocoa git repository: git clone https://github.com/realm/realm-cocoa.git
  • Open Xcode project. Click the project Realm , then RealmSwift , then tab "Build Settings" and set the Use Legacy Swift Language Version to Yes (if you are creating for Swift 2.3) or No (if you are creating for Swift 3).
  • From the directory containing the git repository, run the following command: sh build.sh TARGET , where TARGET is one of the following: ios-swift , osx-swift , tvos-swift or watchos-swift , to you, depending on what platform build.
  • Once assembly is complete, navigate to the "build", and then the directory named for the platform for which you have created (for example, "ios").
  • Open the directory "swift-2.3" or "swift-3.0" (depending on which version you have created).
  • Drag RealmSwift.framework and Realm.framework in the project in accordance with step 2 in the instructions here and follow steps 3 and 4.

If they do not work, please post a comment.

+3
source

To get a version of Swift 3 Realm and RealmSwift , I was clearly aimed at master , set the submodules at true and include hook post_install to install the version of Swift:

 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 https://github.com/realm/realm-cocoa.git', branch: 'master', submodules: true 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 https://github.com/realm/realm-cocoa.git', branch: 'master', submodules: true 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 3.0' 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 
+2
source

You need to install the Realm, using Cocoapods these elements:

pod 'Realm', the git: ' https://github.com/realm/realm-cocoa.git ', branch: 'master'

pod 'RealmSwift', the git: ' https://github.com/realm/realm-cocoa.git ', branch: 'the master'

and when starting the application do not select convert to swift 3

0
source

All Articles