croigsalvador croigsalvador - 6 months ago 757
iOS Question

Error with cocoapods link_with after update to 1.0.0

I have updated cocoapods today to 1.0.0 version. I got this string when I update the pods:

[!] Invalid Podfile file: [!] The specification of link_with in the Podfile is now unsupported, please use target blocks instead..


I have removed link_with in my podFile but I can't build the project because I have many Match-O-Linkers. Any one knows how should I fix this problem?

This is my Podfile right now:

source 'https://github.com/CocoaPods/Specs.git'

platform :ios, '8.0'
inhibit_all_warnings!


pod 'pop', '~> 1.0'
pod 'AFNetworking', '~> 1.3'
pod 'SDWebImage', '~> 3.7'
pod 'GoogleAnalytics', '~> 3'
pod 'ARAnalytics' , :subspecs => ["Crashlytics", "Amplitude", "DSL"]
pod 'FBSDKCoreKit', '~> 4.10.1'
pod 'FBSDKLoginKit', '~> 4.10.1'
pod 'FBSDKShareKit', '~> 4.10.1'
pod 'Google/SignIn'
pod 'Branch'

pod 'Leanplum-iOS-SDK'

pod 'Fabric', '1.6.7'
pod 'Crashlytics', '3.7.0'
pod 'TwitterKit'
pod 'Digits'

target 'minubeTests' do
pod 'OCMockito'
end

Answer

Try this. Works for me with more than one target.

source 'https://github.com/CocoaPods/Specs.git'

platform :ios, '8.0'

def myPods
    pod 'pop', '~> 1.0'
    pod 'AFNetworking', '~> 1.3'
    pod 'SDWebImage', '~> 3.7'
    pod 'GoogleAnalytics', '~> 3'
    pod 'ARAnalytics' , :subspecs => ["Crashlytics", "Amplitude", "DSL"]
    pod 'FBSDKCoreKit', '~> 4.10.1'
    pod 'FBSDKLoginKit', '~> 4.10.1'
    pod 'FBSDKShareKit', '~> 4.10.1'
    pod 'Google/SignIn'
    pod 'Branch'

    pod 'Leanplum-iOS-SDK'

    pod 'Fabric', '1.6.7'
    pod 'Crashlytics', '3.7.0'
    pod 'TwitterKit'
    pod 'Digits'
end

target 'yourTargetOne' do
    myPods
end

target 'yourTargetTwo' do
    myPods
end

target 'minubeTests' do
    pod 'OCMockito'
end
Comments