I use CocoaPods to manage dependencies in my project. I've written 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
This file works well with CocoaPods 0.x but I can't compile project after I've updated to CocoaPods 1.0. After I've run
pod update
I can't compile my project with error:
/Users/<...>/Pods/KeepLayout/Sources/KeepAttribute.m:195:1: Cannot synthesize weak property because the current deployment target does not support weak references
I've seen that every library is builded with different deployment target. For example KeepLayout is builded with 4.3 deployment target.
How I can determine build target for every pod dependency?
pod update
is setting the deployment target of the pod to iOS 4.3 because that is the default deployment target if the podspec doesn't specify one. This was an intentional decision by the CocoaPods team, even though it breaks some older pods that basically have an incomplete podspec. If you are maintaining the pod, you should specify an appropriate target, e.g.platform :ios, '8.0'
to fix it. If you are just trying to use a pod that is broken in this way, please try my suggestion below. – Alex Nauda