I'm trying to add firebase to an existing project but I keep getting errors on building and after a couple of days searching the internet I have not yet fixed the issue :(
I've tried adding --deep to the signing flags, locking and unlocking the keychain, switching to use_modular_headers! in the Podfile.
I don't have a physical device to test on.
My Podfile looks like this:
# Uncomment the next line to define a global platform for your project
#platform :ios, '12.0'
target 'EyeArtifact' do
# Comment the next line if you don't want to use dynamic frameworks
#use_frameworks!
use_modular_headers!
# Pods for EyeArtifact
pod 'Firebase'
pod 'Firebase/Analytics'
pod 'Firebase/Auth'
pod 'Firebase/Firestore'
pod 'Firebase/Storage'
pod 'FirebaseUI'
pod 'FirebaseUI/Google'
pod 'FirebaseUI/Facebook'
pod 'FirebaseUI/OAuth'
pod 'FirebaseUI/Phone'
pod 'FirebaseFirestoreSwift'
# Facebook pods
pod 'FBSDKCoreKit', :modular_headers => true
pod 'FBSDKLoginKit', :modular_headers => true
end
and my error is:
/Users/jvines/Library/Developer/Xcode/DerivedData/***-bgaqkzrrqevduaadrswisdyouwqv/Build/Products/Debug-iphonesimulator/***.app/Frameworks/AppAuth.framework: replacing existing signature
/Users/jvines/Library/Developer/Xcode/DerivedData/***-bgaqkzrrqevduaadrswisdyouwqv/Build/Products/Debug-iphonesimulator/***.app/Frameworks/AppAuth.framework: code object is not signed at all
In architecture: x86_64
If I switch between use_frameworks! and use_modular_headers! I get another error: BoringSSL-GRPC.modulemap' not found when building
I've tried disabling the signing script when building but then if I run the app I get this error: dyld: Library not loaded: #rpath/AppAuth.framework/AppAuth
The simulator is running iOS 14.2 and I'm using Xcode 12
I also tried a brand new project and adding the frameworks from scratch but I encountered the same errors.
I'm new to iOS development so any help is greatly appreciated!
Thank you :)
Found the answer to my problem here: https://stackoverflow.com/a/62172769/14828440
In short I was missing the bridging header even though I don't have any swift files.
Related
Every time I try to build I get the error 'No such module FirebaseUI'
Things I have tried:
Clearing derived data
running 'pod update' to make sure all dependencies are up to date
running my install as arch -x86_64 pod install
making sure I am running the app by opening .xcworkspace as opposed to .xcodeproj
Cleaning my build folder(Command+Shift+K)
Deleting my project and redownloading from Git
Adding the FirebaseUI Framework directly to my project
Changing the Scheme to FirebaseCore allows the project to build but the simulator does not open for testing, nor does it run on a physical device.
Running pod deintegrate && pod install, I noted that this command did mention that FirebaseUI was included and that the version was 11.03
Running xcode in Rosetta
I am running this project on a new MacBook Pro with the M1 chip. Previously, my project ran fine on the older intel chip. My Xcode version is 12.5.1, and my OS is 11.4
Here is my pod file:
# Uncomment the next line to define a global platform for your project
platform :ios, '12.0'
post_install do |pi|
pi.pods_project.targets.each do |t|
t.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
end
end
end
target 'Pikit' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Fixed Pod configuration
# Pods for Pikit
pod 'Firebase'
pod 'Firebase/Storage'
pod 'Firebase/Auth'
pod 'Firebase/Firestore'
pod 'Firebase/Functions'
pod 'Firebase/Analytics'
pod 'Firebase/Messaging'
pod 'Firebase/DynamicLinks'
pod 'FirebaseUI/Auth'
pod 'FirebaseUI/Email'
pod 'FirebaseUI/Google'
pod 'FirebaseUI/OAuth' # Used for Sign in with Apple, Twitter, etc
# Other Podfiles
pod 'OnboardKit'
# Auto move screen for keyboard
pod 'SDWebImage'
pod 'PureLayout'
pod 'IQKeyboardManagerSwift'
pod 'Google-Mobile-Ads-SDK'
end
Edit
the previously selected answer was working for a while but after changing the version of an unrelated pod the application is showing the same issue.
FirebaseUI version 11 is now broken into submodules so you will need to import individual modules (e.g. import FirebaseAuthUI) rather than previously using just import FirebaseUI. Or instruct your Podfile to use an older version.
From FirebaseUI 11.0.0 release notes:
Breaking change: Broke monolithic FirebaseUI module into separate modules per feature. You'll need to update the imports in your project accordingly.
// FirebaseUI 10.x
import FirebaseUI
// FirebaseUI 11
import FirebaseAuthUI
import FirebaseDatabaseUI
// ...
I recommend you running the pod install command under the x86 architecture because I've seen that running this command native bring some problems, try:
arch -x86_64 pod install
I found a solution but I am going to keep this open as I am not sure it is a permanent solution/ not sure why it worked. This conflicts directly with one of the earlier answers. I removed all FirebaseUI pods besides the base one so that my pods related to fire base include only the following:
pod 'Firebase'
pod 'Firebase/Storage'
pod 'Firebase/Auth'
pod 'Firebase/Firestore'
pod 'Firebase/Functions'
pod 'Firebase/Analytics'
pod 'Firebase/Messaging'
pod 'Firebase/DynamicLinks'
pod 'FirebaseUI'
I am using firebase for tracking crashes in my project and i am using the below pods in my project.
pod 'FirebaseCore', '6.6.4'
pod 'FirebaseMessaging', '4.3.0'
pod 'FirebaseAnalytics','6.3.1'
While archieving this project for placing the testflight build, i am getting duplication error below for google utilities :
Multiple commands produce '/Path/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/GoogleUtilities.framework':
1) Target 'GoogleUtilities-00567490' has create directory command with output '/Path//IntermediateBuildFilesPath/UninstalledProducts/iphoneos/GoogleUtilities.framework'
2) Target 'GoogleUtilities-54e75ca4' has create directory command with output '/Path//IntermediateBuildFilesPath/UninstalledProducts/iphoneos/GoogleUtilities.framework'
When I checked my Pods settings in my build setting, I saw google utilities added twice in project. I have removed the one of the GoogleUtilities it's getting an error.
Note: I can able to run the build and I can't able to archive it. Is there any fix for achieving this build, without changing the legacy build system?
Because I have enabled the library distribution for my SDK, so when I made changes into legacy its throws an error.
Adding pod 'GoogleUtilities', '~> 7.7.0' to all the targets that use Firebase pods will make it work. In my case, this included 3 targets: iOS app, iMessage Extension and UnitTests.
No need to add this part explicitly:
def google_utilites
pod 'GoogleUtilities/AppDelegateSwizzler'
pod 'GoogleUtilities/Environment'
pod 'GoogleUtilities/Logger'
pod 'GoogleUtilities/MethodSwizzler'
pod 'GoogleUtilities/NSData+zlib'
pod 'GoogleUtilities/Network'
pod 'GoogleUtilities/Reachability'
pod 'GoogleUtilities/UserDefaults'
end
Update the Podfile to explicitly request all the needed GoogleUtilties subspecs. Examine the Podfile.lock to find the list.
There is a lot more detail at this CocoaPods issue.
This issue occurred to me when i added a new target to my project using very similar but not equal firebase dependencies, so GoogleUtilities was duplicated because my other target doesn't need as much dependencies from utilities as the main one so, basically (with the help of Paul Beusterien answer) went to the Pods project and look at both targets (GoogleUtilities-xxx) -> Build Phases -> Compile Sources and look at the differences in files added, basically in the new target was missing 'GoogleUtilities/UserDefaults' and 'GoogleUtilities/MethodSwizzler' but this can be different in any case, so i just did a compilation like this
platform :ios, '13.0'
def google_utilites
pod 'GoogleUtilities/AppDelegateSwizzler'
pod 'GoogleUtilities/Environment'
pod 'GoogleUtilities/Logger'
pod 'GoogleUtilities/MethodSwizzler'
pod 'GoogleUtilities/NSData+zlib'
pod 'GoogleUtilities/Network'
pod 'GoogleUtilities/Reachability'
pod 'GoogleUtilities/UserDefaults'
end
abstract_target 'AggregatedPodsTarget' do
use_frameworks!
google_utilites
pod 'FirebaseCore'
pod 'FirebaseAuth'
pod 'FirebaseFirestore'
pod 'FirebaseStorage'
pod 'FirebaseFunctions'
pod 'FirebaseAnalytics'
pod 'FirebaseMessaging'
pod 'Firebase/Crashlytics'
pod 'Google-Mobile-Ads-SDK'
target 'MainApp' do
end
target 'MainApp Dev' do
end
end
abstract_target 'ExtensionPodsTarget' do
use_frameworks!
google_utilites
pod 'FirebaseAuth'
pod 'FirebaseFunctions'
target 'Extension' do
end
target 'Extension Dev' do
end
end
after this i just did pod install and i went back to have only one GoogleUtilities Dependency
This worked for me, it's similar to this Bogdan's answer
Summarising steps
Add pod 'GoogleUtilities' so they don't clash from different targets
Clean install your pods (pod deintegrate and pod install)
Might need pod repo update.
Reopen xcode and archive, you would see single GoogleUtilities now
I saw this error when I tried archiving one of my projects where I had recently introduced another new target.
Going into the pod settings for this new target, I noticed that the iOS deployment version was different (14.4) from the iOS deployment version in the main Runner target (12.0) - something I had missed when I was initially configuring this new extension target.
The only difference between the iOS deployment versions I saw was that 14.4 had App Extensions enabled. Since that was something inconsequential to my project, I was happy matching the iOS deployment
versions for both my targets so they could refer to only one set of dependencies. After that, I just removed the duplicate pods for the version that I had removed. And I could archive again.
For each of your Targets, got to Build Settings -> check the iOS Deployment Target -> change the version so that they match.
For most circumstances, there is no reason why they should be different. But if for some reason you deem they should be different, checkout Paul Beusterien's answer and follow that.
We had the similar issue on Flutter project using firebase_core and firebase_analytics dependencies. Adding pod 'GoogleUtilities', '~> 7.7.0' in all the targets in the Podfile under ios folder.
target 'Runner' do
use_frameworks!
use_modular_headers!
pod 'GoogleUtilities', '7.7.0'
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
end
target 'customnotificationext' do
use_frameworks!
pod 'GoogleUtilities', '7.7.0'
end
I'm trying to install firestore in my project.
When I'm trying to install that, Xcode displays:
fatal error: module map file '/Users/account/Documents/myapp/Pods/Headers/Private/openssl_grpc/BoringSSL-GRPC.modulemap' not found
or sometimes another errors....
so I've spend so many of times (almost entire 2 days) to solve this problem, but nothing is actually working :/ (deleting derived data and Pods folder, pod deintegrate, pod install and update or cleaning build (Command-shift-k)).
platform :ios, '13.0'
target 'myapp' do
# Comment the next line if you don't want to use dynamic frameworks
#use_frameworks!
use_modular_headers!
# add the Firebase pod for Google Analytics
pod 'Firebase/Analytics'
pod 'Firebase/Auth'
pod 'Firebase/DynamicLinks'
pod 'Firebase/Core'
pod 'Firebase/Firestore'
#pod 'FirebaseFirestoreSwift'
# add pods for any other desired Firebase products
# https://firebase.google.com/docs/ios/setup#available-posd
end
this is my Podfile. and whenever I delete pod 'Firebase/Firestore', everything's working whereas Firebase/Firestore is not. (surely to recover normal working state, I comment all of pod repositories, (in terminal) type "pod install" and then uncomment top 4 repositories and pod install....)
I really wanna use Firestore, but I can't.
We can also force CocoaPods to not apply modular headers for the troubling pods... in this case:
pod 'BoringSSL-GRPC', '= 0.0.3', :modular_headers => false
pod 'gRPC-Core', '= 1.21.0', :modular_headers => false
Firestore requires latest CocoaPods. As per Google developer
It should get better with CocoaPods 1.9.0 which is adding the
capability to specify dynamic/static linkage for each pod in the
Podfile.
Please check this link https://github.com/firebase/firebase-ios-sdk/issues/3816
I've got this annoying error for number of days now:
I've tried:
Deleting pods folder & pod file & pod.lock file & .workspace file and reinstalling pods again.
removing all library search paths in pods.xconfig file
this is my pod file :
# Uncomment the next line to define a global platform for your project
platform :ios, '11.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 'Firebase'
pod 'Bolts'
pod 'Firebase/Firestore'
pod 'Google-Mobile-Ads-SDK'
pod 'Fabric'
pod 'Crashlytics'
pod 'PersonalizedAdConsent'
pod 'Highcharts', '~> 6.1.0'
pod 'FBSDKCoreKit'
pod 'GoogleToolboxForMac'
pod 'FirebaseAnalytics'
end
This is my problem, If you need any other indications or code about my issue, feel free to leave me a comment and I'll edit the question
Try to run following commands in Terminal (in your project's folder):
pod deintegrate // removes all pod related configurations from your project
rm Podfile.lock //removes the saved reference to the pods
pod install // reinstalls the pods
Clean your project (In Xcode: ⌘+K and ⌘+Shift+K)
And finally make sure you compile the same target from which the error originates (You should be able to see the target it originates from within the issue navigator ⌘+5)
When I enter pod 'Firebase/Auth' it isn't installing the pod. Its saying this: [!] Unable to satisfy the following requirements:
Firebase/Auth required by Podfile
None of your spec sources contain a spec satisfying the dependency: Firebase/Auth.
You have either:
out-of-date source repos which you can update with pod repo update.
mistyped the name or version.
not added the source repo that hosts the Podspec to your Podfile.
Note: as of CocoaPods 1.0, pod repo update does not happen on pod install by default.
[!] Your Podfile has had smart quotes sanitised. To avoid issues in the future, you should not use TextEdit for editing it. If you are not using TextEdit, you should turn off smart quotes in your editor of choice.
I have said in the pod file - pod 'Firebase' and that is installing fine, but I don't know why 'Firebase/Auth' isn't installing.
This is using swift and Xcode is any of you were wondering, please can someone suggest what I can do to solve this, thanks
This is the pod file:
platform: ios, '8.0'
use_frameworks!
target: 'Lifelapse' do
pod 'Canvas'
pod 'Firebase'
pod 'Firebase/Auth'
end
EDIT:
The solution was just to 'pod repo update' which worked perfectly. However now I have 27 error messages - Please help!
I did more or less than the guy told us
but my steps were a little different:
On the Terminal: go to your project folder:
1.1 sudo Desktop/YourApp
1.2 YOURMAC:YourApp Fernanda$ sudo pod init
Change your file Podfile to:
# Uncomment this line to define a global platform for your project
platform :ios, '8.0'
target 'YourApp' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for YourApp
pod 'Firebase'
end
On the Terminal: pod install
Now, change your file Podfile again to:
# Uncomment this line to define a global platform for your project
platform :ios, '8.0'
target 'YourApp' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for YourApp
pod 'Firebase'
pod 'Firebase/Auth'
end
On the Terminal: pod update
try update platform version 8.0 to 9.0
platform: ios, '9.0'
use_frameworks!
target: 'Lifelapse' do
pod 'Canvas'
pod 'Firebase'
pod 'Firebase/Auth'
end