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.
Related
Having a react-native project, which won't build on target "Staging" since I've setup cocoapods and using xcworkspace file since then (needed for firebase integration of react-native-firebase). When trying to build for taget "staging", I'll get this error:
ld: library not found for -lPods-[app]
clang: error: linker command failed with exit code 1 (use -v to see invocation)
It works on debug, and (well at least it doesn't throw an error) when I archive the project.
I've having a "staging" target because of code-push. Using react-native at version 0.48.4 and Xcode 9 (created it following this guide, but before using cocoapods)
My podfile:
platform :ios, '9.0'
target 'xx' do
#use_frameworks!
# Pods
pod 'Firebase/Core'
pod 'Firebase/Analytics'
pod 'Firebase/Database'
pod 'Firebase/Messaging'
pod 'Firebase/Auth'
pod 'Firebase/Storage'
end
Tried with and without use_frameworks!, cleaning project, deleted DerivedData, deintegrating and reintegrating pods.
What could cause this? (Please tell me if you need more information)
What worked for me:
Deintegrated all pods using pod deintegrate (using enter link description here)
pod install
Removed [Project name] > Frameworks > Pods_[Project name].framework (which was red, but there are actually more files being red)
Build succeeded
Was doing this with the help of this post. Thanks also to Maurice for trying to help me.
I had this issue. In my case it was a react-native app added Firebase Analytics. As of July 2018, all apps must be built with iOS 11 per Apple: developer.apple.com/ios/submit/
Once I went to my General tab and scrolled down to Deployment Info / Deployment Target and changed it from 10.x which is what I was targeting, to 11.x - the app built/archived and I was able to submit.
Set your PODS_CONFIGURATION_BUILD_DIR of "staging" as "release" ${PODS_BUILD_DIR}/Release$(EFFECTIVE_PLATFORM_NAME).
Check the Frameworks folder and remove red files.
check whether the SEARCH_PATHS is correct at Pods-XXXX.debug.xcconfig or Pods-XXXX.release.xcconfig
LIBRARY_SEARCH_PATHS = $(inherited) "$(PODS_ROOT)/path/to/your folder"
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.
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
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 am currently having problems installing Pure Layout using Cocoa Pods. Ive managed to install it fine in a blank project with no problems. But when installing into my project i keep getting the following error:
ld: framework not found PureLayout
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Ive had a search through stack overflow for any possible solutions and have tried adding the framework search path to the target, trying to delete cocoa pods and do a fresh install onto the project.
Initially before adding 'PureLayout' to the pod file i got a similar error:
ld: framework not found Pods
To resolve this i removed the red pod framework file from the linked library and framework folder. Which then built fine.
Thank you in advance for anyone who helps me solve this.
Below is my Podfile:
# Uncomment this line to define a global platform for your project
platform :ios, '8.1'
# Uncomment this line if you're using Swift
use_frameworks!
target '****' do
pod 'Google/Analytics'
pod 'Fabric'
pod 'Crashlytics'
pod 'PureLayout'
end
target '****Tests' do
end
Managed to solve this issue by:
-Select Pods Project
-Build Settings
-Set BaseSDK to iOS SDK (since pod install clears it)
-Set Build Valid Architecture Only to NO.
Following this process the project now builds. I was able to import Pure Layout into my Bridging Header and access the pure layout functions in any of my view controller classes.