相关疑难解决方法(0)

为CocoaPods的pod设置部署目标

我使用CocoaPods来管理项目中的依赖项.我写过Podfile:

target 'MyApp' do
  platform :ios, '8.0'
  # Uncomment this line if you're using Swift or would like to use dynamic frameworks
  #use_frameworks!

  # Pods for MyApp
  pod 'KeepLayout', :git => 'https://github.com/iMartinKiss/KeepLayout', :tag => 'v1.6.0'
  pod 'EasyMapping'

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

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

end
Run Code Online (Sandbox Code Playgroud)

这个文件适用于CocoaPods 0.x,但是在我更新到CocoaPods 1.0后我无法编译项目.我跑完之后

pod update 
Run Code Online (Sandbox Code Playgroud)

我无法编译我的项目错误:

/Users/<...>/Pods/KeepLayout/Sources/KeepAttribute.m:195:1:无法合成弱属性,因为当前部署目标不支持弱引用

我已经看到每个库都使用不同的部署目标进行构建.例如,使用4.3部署目标构建KeepLayout.

我如何确定每个pod依赖项的构建目标?

xcode ios cocoapods xcode7

43
推荐指数
6
解决办法
2万
查看次数

标签 统计

cocoapods ×1

ios ×1

xcode ×1

xcode7 ×1