swift - RealmSwift 和 watchos2

标签 swift realm watchos-2

使用 RealmSwift-0.97.0 和 watchos2,第一次尝试运行我的 Watchkit-App 时出现以下错误:

dyld: Library not loaded: @rpath/Realm.framework/Realm
Referenced from: /Users/....

Reason: image not found

可能是什么错误?

我正在使用以下 podfile 将 RealmSwift 合并到我的项目中:

xcodeproj 'iSquash.xcodeproj'
workspace 'iSquash.xcworkspace'
platform :ios, '9.0'
inhibit_all_warnings!

source 'https://github.com/artsy/Specs.git'
source 'https://github.com/CocoaPods/Specs.git'

use_frameworks!
link_with 'iSquash', 'iSquash WatchKit Extension'

def shared_pods
      pod 'Realm'
      pod 'RealmSwift'
end

target 'iSquash' do
    shared_pods
end

target 'iSquashTests' do
    shared_pods
end

target 'iSquash WatchKit Extension' do
    platform :watchos, '2.0'
    shared_pods
end

我之前已经成功使用过相同的 podfile(使用 Watchos1.2 和早期版本的 RealmSwift...) 任何帮助表示赞赏!谢谢!

最佳答案

找到了解决方案......

不再需要早期版本的 RealmSwift 和 watchos1.0 所需的旧运行脚本!

enter image description here

关于swift - RealmSwift 和 watchos2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34621712/

相关文章:

ios - Realm 将 List<> 对象添加到现有对象

ios - 如何保存多个对象,在 Realm 中为每个项目创建不同的行

ios - 适用于 iOS 和 WatchOS 应用程序的类(class)?

swift - 如何从其他类访问字符串数组

ios - 实时人脸检测不起作用

mongodb - 本地数据库+服务器数据库-React Native

ios - watch OS 2 信标监控和测距

ios - 我可以构建自己的网络框架(依赖于 AFNetworking)作为 watchOS2 框架吗?

ios - NSPointerArray 基础知识

swift - 导航栏下的黑色 View