Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Framework not found GTMOAuth2

I keep getting this error when compiling an Xcode project and cannot for the life of me figure out what the issue is.

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

I am working from an .xcworkspace with a Podfile that has:

  use_frameworks!
      pod 'Firebase', '~> 4.0'
      pod 'Firebase/Core'
      pod 'Firebase/Invites'
      pod 'Firebase/Analytics'
      pod 'Firebase/Messaging'
      pod 'TwitterKit'
      pod 'GoogleSignIn'
      pod 'GTMOAuth2'

amongst other things. It finds all of the platforms save GTMOAuth2. What is strange is that otherwise everything seems in order - I'm opening the correct xcworkspace and definitely not an xcodeproj

My Pods directory seems in order:

Pods directory

In my pods I see it as a target:

enter image description here

This should do it. Interestingly, when I add it as a Linked Framework and Library, it comes up gray...

enter image description here

Also, in the build directory, I see both: /Build/Products/Release-iphonesimulator/GTMOAuth2/GTMOAuth2.framework and ./Build/Products/Release-iphoneos/GTMOAuth2/GTMOAuth2.framework

but to no avail, GTMOAuth2 is not found. No clue how to proceed - any tips would be really helpful! I should mention that I'm new to iOS development and that the project is in the context of a React Native App.

like image 454
mikesol Avatar asked Oct 23 '17 18:10

mikesol


2 Answers

-l"GTMOAuth2" Remove this line Remove this line then Compile:)

like image 142
AFTAB MUHAMMED KHAN Avatar answered Oct 14 '22 10:10

AFTAB MUHAMMED KHAN


This worked for me

  • Go to Target -> Build Settings
  • Inside Framework Search Paths, delete the paths
like image 26
Maruta Avatar answered Oct 14 '22 12:10

Maruta