Cocoapods setting the same multiple goals (problems with the UITest target)

I use this example to install the same containers for different purposes

Link to this blog post:

http://natashatherobot.com/cocoapods-installing-same-pod-multiple-targets/

# Podfile

platform :ios, '8.0'
source 'https://github.com/CocoaPods/Specs.git'

link_with ['YourProject']

workspace 'YourProject.xcworkspace'
xcodeproj 'YourProject.xcodeproj'

def shared_pods

    #shared pods

end

def testing_pods

    #shared testing pods

end

target 'YourProject' do
    shared_pods
end

target 'YourProjectTests' do
    shared_pods
    testing_pods
end

target 'YourProjectUITests' do
    shared_pods
    testing_pods
end

But in the end, I have problems with targeting YourProjectUITests:

Undefined symbols for architecture x86_64:

  "_OBJC_CLASS_$_GAI", referenced from:
      objc-class-ref in Utility.o
  "_OBJC_CLASS_$_GAIDictionaryBuilder", referenced from:
      objc-class-ref in HomeViewController.o

  "_OBJC_CLASS_$_NewRelicAgent", referenced from:
      objc-class-ref in AppDelegate.o
  "_kGAIHitType", referenced from:

Using cocoa pods 0.39.0 and xcode 7.2

I will try to remove pod.lock and reinstall the containers.

When I remove the UITestTarget in the pod configuration, I no longer have conflicts

+4
source share

Source: https://habr.com/ru/post/1620567/


All Articles