Framework not found GTMOAuth2 - ios

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:
In my pods I see it as a target:
This should do it. Interestingly, when I add it as a Linked Framework and Library, it comes up gray...
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.

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

This worked for me
Go to Target -> Build Settings
Inside Framework Search Paths, delete the paths

Related

framework not found FirebaseCore

I am getting the following error
ld: framework not found FirebaseCore
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have tried all the things, like cleaning, reintegrating and updating and installing the PODS, nothing seems to work. Please help. Here is my PODFILE. I have been struggling for the past 2 weeks with this crazy thing
target 'MyProject' do
use_modular_headers!
# use_frameworks!
pod 'GoogleMaps'
pod 'GooglePlaces'
pod 'Alamofire'
pod 'SwiftyJSON'
pod 'SwiftKeychainWrapper'
pod 'FBSDKCoreKit', '4.35'
pod 'FBSDKShareKit', '4.35'
pod 'FBSDKLoginKit', '4.35'
pod 'GoogleSignIn'
pod 'Firebase/Core'
pod 'Firebase/Auth'
pod 'Firebase/Database'
pod 'Firebase/Storage'
pod 'Firebase/Crash'
pod 'FirebaseStorageCache'
end
If you look at the workspace in Xcode but cannot drill into the project from there then your issue is that your workspace is not opening properly. There should be an expand arrow next to the project name in the workspace explorer. In my case it was because the Project file was being opened by Xcode first before it was opening the Workspace. Since the project was already in use it could not be used again by the workspace. There is no appropriate error message to alert you to this situation.
To fix:
Open xcode
Close all projects and workspaces
Close Xcode (Now the next time you open Xcode it will not open your old project first by default)
Open the Workspace file
Now you should be able to drill into your Xcode project from within your workspace.
I wrestled with this problem as a noob to CocoaPods and Analytics and working with Workspaces. I had added CocoaPods and Firebase to an existing application that had not used CocoaPods before. Once you add CocoaPods you should only ever open the Xcode project through the Workspace.
FWIW: I found this link useful to understand what was going on: Xcode Project vs. Xcode Workspace - Differences
Try it to do by Changing the deployment target to iOS 11. It worked for me.

ld: framework not found FileProvider for architecture x86_64

I have already raised this kind query, still I did not get any helpful answers, so that, I am posting this again.
I am installing firebase, googlesigin, twitterkit and fabric to my swift application by Cocoapods.
If I installed only Fabric I am able to compile and run the application. But, If I tried to install GoogleSignIn and TwitterKit, Fabric, its installing successfully, but, not able to run, getting compiler error of following.
ld: framework not found FileProvider for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
And my podfile is like following.
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'pod installation' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod 'Fabric'
pod 'TwitterKit'
pod 'Firebase/Database'
pod 'Fabric'
pod 'GoogleSignIn'
# Pods for sample pod
# Pods for pod installation
target 'pod installationTests' do
inherit! :search_paths
# Pods for testing
end
end
Attached screenshot, any help from anyone. I am trying to fix this from two days and Really thanks for who helping this fix.
Note : I am using Xcode 8.3.2 and I don't have any real device with me now, and I am not using any FileProvider framework in my application.
Perhaps your pods using FileProvider-framework.
FileProvider-framework is available from iOS11.0 + with Xcode 9 hence You should upgrade with Xcode 9 to avail this framework.

Cocoapods project settings issues

I seem to have a issue with my project settings, in Xcode 8. The issue is as follows:
When adding a new Pod - lets say, Pod Firebase - the install works, and adds the necessary files to my project. I can then, do #Import Firebase
All is fine, up to this point. However, as soon as I make a reference to the Firebase API example: [FirApp configure]; - all is still fine - autocomplete on Xcode works as expected and no issues. However, when building I then get a compile time issue which states:
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_FIRAppIndexing", referenced from:
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The only way I am able to solve this - is by manually adding the _FIRAppIndexing.framework in my projects, Build settings, under Link Libraries with Libraries
To do that, I just drag and drop the frame work from the project navigator to the correct section under link libraries.
This works sometimes; as with other parts of the Firebase SDK, I get runtime crashes.
So, to try get to the root cause, I created a brand new test project, installed the Pods using Pod install - I however did not have to add the framework manually to Libraries - its actually not even listed there.
Everything in the test project worked just fine, at compile and run time.
Which leads me to believe its something in my project settings that's causing this.
Things I have tried
Removed cocoapods completely with pod deintegrate and removed all
other traces of it. Then did a clean build. Then Pod install
Added -objc to linker flag
Podfile
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'MyApp' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
use_frameworks!
# Pods for MyApp
pod 'Crashlytics'
pod 'AsyncDisplayKit', '>= 2.0'
pod 'Firebase'
pod 'Firebase/Messaging'
pod 'FBSDKCoreKit'
pod "HockeySDK", :subspecs => ['AllFeaturesLib']
pod 'Fabric'
pod 'FirebaseAppIndexing'
pod 'AFNetworking', '~> 3.0'
pod '1PasswordExtension', '~> 1.8.4'
target 'MyAppTests' do
inherit! :search_paths
# Pods for testing
end
end
GitHub example project
https://github.com/TanderZA/MyApp
I duplicated my current project - and removed all files. Problem still exists. You will see the project won't compile due to linker errors, with references to the Firebase AP.
By manually adding the frameworks to Link Libraries with Libraries, you will see that it should compile. But that is not how it should work. The current project has an issue with infoPlist.strings that I did not solve. But the project is in the state to demonstrate the issue.
I have checked the project, it seems you have messed up with schemes.
Create a new scheme properly then install the pods again and as the project is in Obj-C you don't need to enable frameworks in the podfile.
So comment like # use_frameworks!
Also update the pods using pod update
Then select the new scheme and build the project in it.
Let me know if you are not able to do it.
It is a xcode bug by the way
But try this :
Upgrade to latest version of xcode and Pods
Remove all architectures in your project
Clean your project
Add arcitectures from start.
This should resolve the issue.
Have you tried to use frameworks?
# platform :ios, '10.0'
use_frameworks!
target 'MyApp' do
I am not sure though but I think what you need is pod 'Firebase/Core'. not pod 'Firebase'.
This link have the list of the Firebase framework that can be used.
And, in the video on the top of the page it says something about there is no single pod that can be installed and you need to set each one of them on the podfile depending on the features you want.
My guess they mislead us in some places where they had pod 'Firebase'. I dont think that they meant that it should do the work.
som try the following:
# Pods for MyApp
pod 'Firebase/Core'
pod 'Firebase/Messaging'
.
.
I know that you said that you had it work on another new project.

ld: framework not found FirebaseAnalytics after upgrading to Xcode 8

I know there are many related questions about "framework not found FirebaseAnalytics". I have spent time on these related questions and tried the solutions suggested by others but in vain. So I have to ask again there and hope anyone can help me.
My problem is that i'm able to use Firebase SDK(IOS) installing by CocoaPods since Xcode 7. However once I upgraded to Xcode 8.1, I cannot compile my project anymore. It keeps showing the error:
ld: framework not found FirebaseAnalytics clang: error: linker command
failed with exit code 1 (use -v to see invocation)
Only when I remove the firebase in the pods can I build the project successfully. Also, it comes to my nightmare that i'm unable to install google analytic SDK because the same error message comes again.I think it is because google now combines the firebase in their SDK.
Here is what I tried from the results I found from other posts in Stack-overflow.
Open the workspace rather than xcode project
Adding $(inherited) in framework search path
Remove the CocoaPods project from xcode and re-install again
Update the Xcode's CocoaPods project
Adding use use_frameworks!, this will create error of #import"XXX" and #import not found
Delete red framework in Linker Binary with Libraries
My Xcode version is Version 8.1
Here is my pod setting:
platform :ios, '8.1'
def testing_pods
pod 'AFNetworking', '~> 3.0'
pod 'AWSMobileAnalytics', '~> 2.4.1'
pod 'AWSSNS', '~> 2.4.1'
pod 'Google/Analytics'
pod 'Firebase/Core'
end
target 'project' do
testing_pods
target 'project_test' do
inherit! :search_paths
end
end
target 'project_Dev' do
testing_pods
end
Hope someone can help me otherwise I have to migrate this old project to a new one.

ld: framework not found after pod install

I added Firebase libraries to my project, and then I got this error. When I compile it, Xcode can't find some directories. However, they are in the Pods directory.
Here is the error log:
ld: warning: directory not found for option '-F/Users/Erumaru/Library/Developer/Xcode/DerivedData/ToDoTogether-gkzytezmbbgkikgoxjpptxgrixil/Build/Products/Debug-iphonesimulator/GTMSessionFetcher'
ld: warning: directory not found for option '-F/Users/Erumaru/Library/Developer/Xcode/DerivedData/ToDoTogether-gkzytezmbbgkikgoxjpptxgrixil/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac'
ld: framework not found GTMSessionFetcher
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Here is my Podfile:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'ToDoTogether' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
platform :ios, '10.0'
pod 'Firebase'
pod 'Firebase/AdMob'
pod 'Firebase/Auth'
pod 'Firebase/Crash'
pod 'Firebase/Database'
pod 'Firebase/Analytics'
pod 'Firebase/Messaging'
pod 'Firebase/RemoteConfig'
pod 'Firebase/Storage'
# Pods for ToDoTogether
end
Make sure you are opening the workspace file and not the project file. I was receiving the same error and realized I was using the project not the workspace.
I was facing same issue and I tried multiple things but still it was not working. I tried below.
Using XCworkspace file
Cleaned the project, restarted XCode, Mac
Turned bitcode to No
Deleted the search path for Framework, Library
Finally the thing that worked is, deleting pod file and re-creating pod file. It worked as magic!
P.S.: This is very generic error and so same solution may not work for all.
Go To Project Target > Build Settings:
Look for Search Paths > Framework Search Paths, delete all paths which you have been warned; then in Library Search Paths, delete all paths which you have been warned.
For me i had to change/edit the schema and choose the new one.
I had renamed my debug schema to debug(development) and that was causing my problem.
Fix:
Product > Edit Schema > Change Build Configuration
What I did was create alternate Configurations and renamed my current one.
In my case I just had to go to Edit Scheme > Run and Reselect "None" as Executable.

Resources