2

I had written some unit tests for my app (API test cases) and they were working fine. After that I had integrated Firebase SDK for Google authentication.

Now when I try to run the unit tests, Xcode compiles the app and shows error as:

"ld: framework not found FirebaseInstanceID for architecture arm64      
clang: error: linker command failed with exit code 1 (use -v to see invocation)"

But the app runs properly in the device as well as simulator, but I'm unable to run the unit tests.

AL.
  • 36,815
  • 10
  • 142
  • 281
Shailesh Chandavar
  • 1,614
  • 14
  • 20

2 Answers2

1

I have solved the problem by adding FirebaseInstanceID Framework to my target(click on the framework and check if its has been added to unit test target if not select add it to the target), seems like unit test requires this target.

Shailesh Chandavar
  • 1,614
  • 14
  • 20
0

This might work, change the inheritance in the Podfile to :complete. Like this:

target 'MyAppTests' do
    inherit! :complete
end

A similar question here: Xcode Unit Testing with Cocoapods