I installed Google Sign In via cocoapods, but when I tried to compile got this error
ld: framework not found GoogleAppUtilities
clang: error: linker command failed with exit code 1 (use -v to see invocation)
My Podfile is this:
# Uncomment this line to define a global platform for your project
platform :ios, '8.0'
target 'Project_name' do
pod 'PayPal-iOS-SDK'
pod 'Google/SignIn'
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for Project_name
target 'Project_nameTests' do
inherit! :search_paths
# Pods for testing
end
target 'Project_nameUITests' do
inherit! :search_paths
# Pods for testing
end
end
I installed the PayPal library first without problem.
I'm using .xcworkspace
Tried cleaning and building again, using $pod deintegrate
clean the project and $pod init again and nothing seems to change.
In Xcode, look in the Pods project for a file named GoogleAppUtilities.framework. It's probably under the Pods/Products folder. You need to add a reference to this file (GoogleAppUtilities.framework) in your main project. In you main app project file go to the build settings tab and look at the list named "Link Binary with Libraries"...you need to add a reference here to the GoogleAppUtilities.framework file.
Just adding your comment as the solution: it worked for mee too:
Solved, I thank you. Your answer did not solve the issue, but It gave
me an idea. I did that and in Build
Settings->SearchPaths->FrameworkSearchPaths I added the framework in
Debug and Release.
Related
my project was running fine but when i added alamofire and it is not working.
it is giving following error
ld: warning: directory not found for option
'-F/Users/banglafire/Desktop/mysios/Build/Products/Debug-iphonesimulator/Alamofire'
ld: framework not found Alamofire clang: error: linker command failed
with exit code 1 (use -v to see invocation)
additional information
Cocopad version 1.3.1
my pod file
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target 'My' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for My
pod 'Alamofire'
end
How do i solve it? Please help!
I was facing same problem. So i think you are opening .xcodeproj. you need to open .xcworkspace
I think there are some issues with your Pod file should be as below:
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target 'My' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod 'Alamofire', '~> 4.4'
target 'MyTests' do
inherit! :search_paths
# Pods for testing
end
target 'MyUITests' do
inherit! :search_paths
# Pods for testing
end
end
try to remove Pod file and again install the pod file and add pod-like this. Hope this could help you.
Try to add the version of the alamofire
pod 'Alamofire', '~> 4.5'
Then run pod install
Did you update your pod on project folder already ?
Also check if your pod is correct or not.
https://github.com/Alamofire/Alamofire
When you add something pod on your project, you still need to update your folder.
Try use terminal -> then go to your folder project -> type pod install
I recently encountered this problem aswell.
I tried a lot of the suggested fixes on here, but none of them actually fixed the problem.
The actual problem was an incorrect value that was set in the Build Settings of the app.
After setting Per-configuration Build Products Path to:
CONFIGURATION_BUILD_DIR = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
the problem was resolved and my build succeeded.
I am trying to use the GooglePlaces iOS API; however, every time I follow the directions for installing it via CocoaPods, I always get a Linker Command error. I've tried the steps about a million times and always get that error after building. Furthermore, I am using the workspace file that documentation recommends and I believe that I have followed all of the steps correctly. Can someone please help me?
Xcode version: 8.3.2 (8E2002)
Pod File Content:
source 'https://github.com/CocoaPods/Specs.git'
target 'MoodSwings' do
pod 'GooglePlaces'
end
Xcode Error:
ld: framework not found GoogleMapsBase
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Thanks!
First I Deintegrate Cocoapods from your project using this link Deintegrating and Removing Cocoapods from your project after that using pod init I create pod file again this is the podfile updated content
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'MoodSwings' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for MoodSwings
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
pod 'GooglePlaces'
pod 'GooglePlacePicker'
pod 'GoogleMaps'
target 'MoodSwingsTests' do
inherit! :search_paths
end
target 'MoodSwingsUITests' do
inherit! :search_paths
# Pods for testing
end
end
After that I remove all configurations in Build Setting -> Framework Search Path and your project finally works!!
here is the repo Github repo
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.
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.
I am getting an error when building my app after i removed reference to a framework i added incorrectly. i am new to ios and cocoapods
/Users/MyMac/Library/Developer/Xcode/DerivedData/MyApp-ewxrexwuczochyctnqvlyusrtvvy/Build/Intermediates/MyApp.build/Debug-iphonesimulator/MyApp.build/Script-5874133373474758EEC76CFD.sh: line 2: /Users/MyMac/Documents/MyApp/Pods/Target Support Files/Pods-MyApp/Pods-MyApp-frameworks.sh: No such file or directory
I am aware that the file and directory don't exist and that is the way it should be but where is it finding the reference to this file so i can remove it and be rid of the error.
I have checked the following:
Linked Frameworks andLibraries under the general tab of my project
The frameworks group in the project
framework search paths under build settings tab
i have also run pod update after removing it from the pod file
How can i fix this?
Edit
back story
I was trying to add the framework https://github.com/Alliants/ALAccordion . in the instruction it said to use
# Podfile
target 'My Target' do
use_frameworks!
pod "ALAccordion"
end
so i added MyApp where my Target is and it created a framework named Pods-MyApp which i cant remove completely.
hope this helps
Cocoapods wrote a tool to completely deintegrate all of this stuff from your project so it goes back to running standalone. It sounds like you had an issue adding the correct target, so use this:
https://github.com/CocoaPods/cocoapods-deintegrate
Then try again so you can at least start from good ground. Hope this helps!
It happened with a prerelease version of Cocoapods 1.2.0.beta.1, by reverting to stable version and running pod install, then clean build, it worked.
why
use_frameworks!
after
target ... do
here is example
platform :ios, '8.0'
use_frameworks!
inhibit_all_warnings!
target 'XXX' do
pod 'RealmSwift'
end
target 'XXXTests' do
pod 'RealmSwift'
end