我在 Xcode 8.2.1 中创建了一个命令行工具项目,然后我运行pod init
并添加RealmSwift
到它。之后pod install
,我打开了.xcworkspace
文件。
该项目编译正常,但在运行时出现以下错误:
dyld: Library not loaded: @rpath/Realm.framework/Versions/A/Realm
Referenced from: /Users/myuser/Library/Developer/Xcode/DerivedData/myproject-eqotetgxsfjvxjfevywenvddnfdm/Build/Products/Debug/myproject
Reason: image not found
Program ended with exit code: 9
我怎样才能在这里使用 cocoapods?