建立Swift 3&的领域Xcode 8 [英] Build realm for Swift 3 & Xcode 8

查看:61
本文介绍了建立Swift 3&的领域Xcode 8的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在按照此处给出的步骤来构建要用于一个iOS项目,我正在使用Xcode 8 beta 3:

I am following the steps given here to build realm to be used in an iOS project, I am using Xcode 8 beta 3 :

我收到这些警告:

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)

和这个错误

Lipo: -remove's specified would result in an empty fat file

为什么会这样?

推荐答案

您可以尝试这些更新的说明,该说明适用于Beta 3吗?

Can you try these updated instructions, which should work for Beta 3?

  1. 克隆Realm可可git存储库:git clone https://github.com/realm/realm-cocoa.git
  2. 打开Xcode项目.单击Realm项目,然后单击RealmSwift目标,然后单击构建设置"选项卡,然后将Use Legacy Swift Language Version设置为Yes(如果是为Swift 2.3进行构建)或No(如果是为Swift 3进行构建).
  3. 从包含git存储库的目录中,运行以下命令:sh build.sh TARGET,其中TARGET是以下项之一:ios-swiftosx-swifttvos-swiftwatchos-swift,具体取决于什么您要构建的平台.
  4. 构建完成后,进入"build"目录,然后进入以您构建平台(例如"ios")命名的目录.
  5. 打开"swift-2.3"或"swift-3.0"目录(取决于构建的版本).
  6. 按照说明RealmSwift.framework和Realm.framework拖入项目. "nofollow>此处,然后执行步骤3和4.
  1. Clone the Realm Cocoa git repository: git clone https://github.com/realm/realm-cocoa.git
  2. Open the Xcode project. Click on the 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).
  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, depending on what platform you are building for.
  4. Once the build has completed, go to the 'build' directory, then the directory named after the platform for which you built (e.g. 'ios').
  5. Open the 'swift-2.3' or 'swift-3.0' directory (depending on which version you built for).
  6. Drag 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.

这篇关于建立Swift 3&的领域Xcode 8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆