dyld:未加载库:@ rpath / ...原因:使用简单的Hello world应用程序找不到图像

时间:2016-05-25 23:50:50

标签: xcode swift cocoapods

在尝试使用CocoaPods并遵循basic instructions时使用SwiftCSV时遇到了一些麻烦。

从XCode 7.3.1中的模板创建OS X的简单Hello世界控制台应用程序后,我打开了一个终端窗口并导航到项目文件夹并发出了pod init

然后,我通过在目标部分添加以下行来编辑Podfile:

  pod "SwiftCSV"

然后我执行了pod install,成功完成了。

在XCode中加载生成的.xcworkspace后,当我运行应用程序时,出现以下错误:

dyld: Library not loaded: @rpath/SwiftCSV.framework/Versions/A/SwiftCSV
  Referenced from: /Users/paolomarini/Library/Developer/Xcode/DerivedData/BundleGeneratorSwift-egsxgxpdiuvqrfddzyzcxnwltulk/Build/Products/Debug/BundleGeneratorSwift
  Reason: image not found
Program ended with exit code: 9

请注意,我没有在Podfile中指定平台,因为我无法弄清楚OS X的正确值是什么.Podfile如下所示:

# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'

target 'BundleGeneratorSwift' do
  # Comment this line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for BundleGeneratorSwift
  pod "SwiftCSV"
end

谢谢,
保罗

0 个答案:

没有答案