Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NewRelicAgent does not work with OCTesting

I have a problem with the NewRelicAgent pod. It works fine with the nomral app targed und runs well in the simulator, but as soon as I start the test target, I get the the following error message:

ld: framework not found NewRelicAgent
clang: error: linker command failed with exit code 1 (use -v to see invocation)

My pod file looks like this:

platform :ios, '5.0'

pod 'RestKit', '~> 0.20.0rc'

pod 'RestKit/Testing', '~> 0.20.0rc'

pod 'RestKit/Search', '~> 0.20.0rc'

target :test do

    link_with :DealiniTests

    pod 'Expecta', '0.2.1'

end

pod 'GoogleAnalytics-iOS-SDK', '~> 2.0beta4'

pod 'NewRelicAgent', '~> 1.328.0'

pod 'Parse', '~> 1.2.9'

I think the problem is, that the PATHS links to a path "{PODS_ROOT}/BuildHeaders/NewRelicAgent" which does not exsits. I have no NewRelicAgent folder in the Headers and BuildHeaders folder but it does work for the normal target just for the test target not.

All other pods works fin just the newrelic does not work.

like image 854
Lailo Avatar asked Dec 05 '25 14:12

Lailo


1 Answers

The Problem is, that CocoaPods does not automaticly add the NewRelic framework to the

FRAMEWORK_SEARCH_PATHS

I just added "$(PODS_ROOT)/NewRelicAgent/NewRelic_iOS_Agent_1.328" to the FRAMEWORK_SEARCH_PATHS of the test target and it worked

like image 82
Lailo Avatar answered Dec 08 '25 05:12

Lailo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!