与xcode 8的Cocoapods集成问题

时间:2017-02-15 02:20:37

标签: swift3 cocoapods xcode8 ios10

我一直在尝试使用Cocoapods和https://github.com/opalorange/OpalImagePicker的功能集成到我的项目中。

但是,我总是会遇到'没有这样的模块'OpalImagePicker'或'Class不可用的错误,找不到此模块的Swift声明。

我以某种方式(一次)完成了整合工作,但它现在又回到了错误。

我所做的只是将我的项目方案更改为OpalImagePicker模块并运行直到它成功并返回我的项目并清理+构建并继续删除并添加“Link Binary with Libraries”中的框架,清洁+版本。

有没有人在Cocoapods的整合过程中遇到这样的问题?

使用Podfile更新:

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

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

  # Pods for BPMatters
pod 'OpalImagePicker'

  target 'BPMattersTests' do
    inherit! :search_paths
    # Pods for testing
pod 'OpalImagePicker'
  end

  target 'BPMattersUITests' do
    inherit! :search_paths
    # Pods for testing
pod 'OpalImagePicker'
  end

end

更新错误屏幕截图:

enter image description here

1 个答案:

答案 0 :(得分:0)

更新你的Podfile并在你的行下面添加你的pod_frameworks!

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

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

  # Pods for BPMatters
  pod 'OpalImagePicker'

  target 'BPMattersTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'BPMattersUITests' do
    inherit! :search_paths
    # Pods for testing
  end

end

确保在XCode中关闭项目并双击BPMatters.xcworkspace文件打开它。