Watchkit&境界0.92.3 [英] Watchkit & Realm 0.92.3

查看:150
本文介绍了Watchkit&境界0.92.3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Swift在Xcode 6.3和iOS10.10.3下整合新的Realm-DB(领域0.92.3)基本上适用于iPhone(不适用于Apple-Watch)。 Watchkit(即Apple-Watch)下相同领域框架的集成还不起作用。

The Swift integration of a new Realm-DB (realm 0.92.3) under Xcode 6.3 and iOS10.10.3 basically works for the iPhone (not for the Apple-Watch yet). The integration of the same realm-framework under Watchkit (i.e. Apple-Watch) does not work yet.

RealmSwift.framework集成(拖入)嵌入式二进制文件如 here1 here2
见下面的截图:

The RealmSwift.framework is integrated (dragged into) the Embedded-Binaries as described here1 and here2. See screenshot below :

使用模拟器运行Watchkit-App时会出现以下错误:

When running the Watchkit-App with the simulator the following error occurs :

dyld: Library not loaded: @rpath/libswiftCore.dylib
  Referenced from: /Users/XXX/Library/Developer/CoreSimulator/Devices/3FE99-9-4C4C2/data/Containers/Bundle/Application/8B4-DF19F34-222973/MyApp.app/PlugIns/MyApp WatchKit Extension.appex/MyApp WatchKit Extension
  Reason: image not found
(lldb) 

还有什么问题???

主要的框架 - 搜索路径 - 应用已设置。 MyApp Watchkit Extension和MyApp Watchkit App的设置未设置。设置它们不会改变上述错误。什么仍然缺少???

The Framework-Search-Path of the main-app is set. The ones for MyApp Watchkit Extension and MyApp Watchkit App are not set. Setting them does not change the above error. What is still missing ???

推荐答案

我建议你使用CocoaPods。

I would recommend that you use CocoaPods.

我是这样做的,使用动态框架,但是当我尝试使用Xcode的Organizer将我的应用程序提交到iTunes Connect时,由于嵌套框架,我无法做到。 Realm.framework在RealmSwift.framework中,这对Apple来说不合适。所以我尝试尝试但没有任何帮助...

I did it like you did, with dynamic frameworks, but when I try to submit my application to iTunes Connect using Xcode's Organizer, I could not because of the nested frameworks. Realm.framework is inside RealmSwift.framework, and that is not okay with Apple. So I try and try but nothing helped…

然后我使用了CocoaPods,一切正常。

Then I used CocoaPods and everything worked as it should.

以下是CocoaPods安装的说明:

Here are instructions for CocoaPods installation:

Install CocoaPods 0.37.1 or later ([sudo] gem install cocoapods).
In your Podfile, add use_frameworks! and pod 'RealmSwift' to your main and test targets.
From the command line, run pod install.
Use the .xcworkspace file generated by CocoaPods to work on your project!

这篇关于Watchkit&境界0.92.3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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