Missing GULSwizzler.h file - ios

I've upgraded an iOS/Swift project to the latest Firebase pods.
The following changes were made:
Firebase 5.11.0 (was 5.10.0)
FirebaseAnalytics 5.3.0 (was 5.2.0)
FirebaseCore 5.1.6 (was 5.1.5)
FirebaseInstanceID 3.3.0 (was 3.2.2)
GoogleAppMeasurement 5.3.0 (was 5.2.0)
GoogleUtilities 5.3.4 (was 5.3.3)
nanopb 0.3.901 (was 0.3.8)
I'm getting an error on a missing file that's imported in GoogleUtilities at build time:
'Private/GULSwizzler.h' file not found
My pod import file has the following:
pod 'Firebase/Core'
pod 'Firebase/Storage'
pod 'Firebase/Database'
pod 'Firebase/Auth'
pod 'Firebase/AdMob'
pod 'GoogleSymbolUtilities'
pod 'GoogleInterchangeUtilities'
Has anyone come across this or know a solution?
******************************** edit **********************************
What I see under GoogleUtilities is shown below. I note that the .h symbol is dimmed for the file that's missing.

It seems that GULSwizzler.h is not installed properly. For me, it is installed in a different location:
$ find . | grep GULSwizzler.h
./Pods/GoogleUtilities/GoogleUtilities/MethodSwizzler/Private/GULSwizzler.h
Here are a few things to try:
Reinstall from a clean environment: pod deintegrate and pod install
Make sure you have the latest version of CocoaPods:
$ pod --version
1.5.3
Probably unrelated, but strange: GoogleSymbolUtilities and GoogleInterchangeUtilities are deprecated private pods that were never intended to be added to Podfiles.

Related

No such module 'FirebaseMessaging' in Xcode

I'm trying to add Push Notifications to my iOS app in Xcode but getting the No such module 'FirebaseMessaging' error when I try to import FirebaseMessaging (FYI: import Firebase working just fine).
Running pod installs in Terminal shows that the FirebaseMessaging package was installed:
Downloading dependencies
Installing Firebase (10.5.0)
Installing FirebaseAnalytics (10.5.0)
Installing FirebaseCore (10.5.0)
Installing FirebaseCoreInternal (10.5.0)
Installing FirebaseInstallations (10.5.0)
Installing FirebaseMessaging (10.5.0)
Installing GoogleAppMeasurement (10.5.0)
Installing GoogleDataTransport (9.2.1)
Installing GoogleUtilities (7.11.0)
Installing PromisesObjC (2.1.1)
Installing nanopb (2.30909.0)
Generating Pods project
Integrating client project
And, here's my pod file:
platform :ios, '11.0'
target 'AppName' do
use_frameworks!
pod 'Firebase/Core'
pod 'Firebase/Messaging'
pod 'FirebaseMessaging'
end
Any suggestions for how to fix this error?
I tried installing Firebase Messaging but it's not working in Xcode.

Trouble in resolving dependencies conflict for Firebase subspecs pod

I am trying to fix the versions of my firebase subspec pods in order to keep the Podfile.lock to be constant throughout the team, but there is some error being popped up while installing the pods using pod install. I have checked the latest versions of all the subspecs using pod outdated command, and then put the desired versions in front of the subspecs.
I have tried running pod repo update, but even that didn't work
Podfile
pod 'Firebase','6.23.0'
pod 'Firebase/Analytics'
pod 'Firebase/Messaging'
pod 'Firebase/DynamicLinks'
pod 'FirebaseRemoteConfig','4.4.9'
Error Log while running pod install
[!] CocoaPods could not find compatible versions for pod
"FirebaseAnalytics":
In snapshot (Podfile.lock):
FirebaseAnalytics (= 6.3.0, ~> 6.0)
In Podfile:
Firebase/Analytics was resolved to 6.23.0, which depends on
Firebase/Core (= 6.23.0) was resolved to 6.23.0, which depends on
FirebaseAnalytics (= 6.4.2)
Specs satisfying the `FirebaseAnalytics (= 6.3.0, ~> 6.0),
FirebaseAnalytics (= 6.4.2)` dependency were found, but they required
a higher minimum deployment target.
When i run pod outdated, I get the following versions of all the subspecs, so accordingly I gave the versions in the Podfile.
- Firebase 6.18.0 -> 6.23.0 (latest version 6.23.0)
- FirebaseABTesting 3.1.2 -> 3.2.0 (latest version 3.2.0)
- FirebaseAnalytics 6.3.0 -> 6.4.2 (latest version 6.4.2)
- FirebaseCore 6.6.3 -> 6.6.7 (latest version 6.6.7)
- FirebaseCoreDiagnostics 1.2.1 -> 1.2.4 (latest version 1.2.4)
- FirebaseDynamicLinks 4.0.7 -> 4.0.8 (latest version 4.0.8)
- FirebaseInstallations 1.1.0 -> 1.2.0 (latest version 1.2.0)
- FirebaseInstanceID 4.3.2 -> 4.3.4 (latest version 4.3.4)
- FirebaseMessaging 4.3.0 -> 4.3.1 (latest version 4.3.1)
- FirebaseRemoteConfig 4.4.8 -> 4.4.9 (latest version 4.4.9)
I think you're confusing pods and sub-specs.
Firebase is at version 6.23.0 (see its podspec). This Pod has a sub-spec called "Firebase/RemoteConfig" which pulls in another Pod called FirebaseRemoteConfig, which in turn has version 4.4.9
So, your specification of pod 'Firebase/RemoteConfig','4.4.9' makes no sense, because the sub-spec of a pod does not have its own individual version number. This is what
None of your spec sources contain a spec satisfying the dependency: Firebase/RemoteConfig (= 4.4.9).
is trying to tell you.
Use pod 'FirebaseRemoteConfig','4.4.9' instead.
I installed the pod as below,
pod 'Firebase','6.23.0'
pod 'Firebase/Analytics','6.23.0'
pod 'Firebase/Messaging','6.23.0'
pod 'Firebase/DynamicLinks','6.23.0'
pod 'FirebaseRemoteConfig','4.4.9'
This worked fine without any issues.

CocoaPods not updating Firebase SDK to Version 4.0.0

I am trying to update my Swift project to Firebase's new SDK Version 4.0.0 using CocoaPods (as suggested by the documentation) but the updated SDK does not seem to be installing even when I follow the steps in the documentation.
Can anyone help my understand why this is not working and what I can do to update to the new Firebase SDK?
My Podfile
# Uncomment this line to define a global platform for your project
platform :ios, '9.2'
# Uncomment this line if you're using Swift
use_frameworks!
target 'myProject' do
pod 'Firebase'
pod 'Firebase/Auth'
pod 'Firebase/Core'
pod 'Firebase/Storage'
pod 'Firebase/Database'
pod 'Firebase/Crash'
pod 'Firebase/Messaging'
pod 'Alamofire', '~> 4.4'
end
When I run pod install I get this seemingly promising output (except that it is not version 4 as I think it should be):
Analyzing dependencies
Downloading dependencies
Using Alamofire (4.4.0)
Installing Firebase 3.17.0 (was 3.17.0)
Using FirebaseAnalytics (3.9.0)
Using FirebaseAuth (3.1.1)
Using FirebaseCore (3.6.0)
Using FirebaseCrash (1.1.6)
Using FirebaseDatabase (3.1.2)
Using FirebaseInstanceID (1.0.10)
Using FirebaseMessaging (1.2.3)
Using FirebaseStorage (1.1.0)
Using GTMSessionFetcher (1.1.9)
Using GoogleToolboxForMac (2.1.1)
Using Protobuf (3.3.0)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 8 dependencies from the Podfile and 13 total pods installed.
I can tell it isn't updating to the most recent SDK as well because the new firebase documentation does not match the functions that work in my project. My project is in Swift, so for example:
Works
FIRApp.configure()
Does not work (but is suggested by documentation)
FirebaseApp.configure()
I did try these solutions as well:
https://stackoverflow.com/a/38135857/4206520
https://stackoverflow.com/a/37365721/4206520
There was nothing wrong with your original Podfile ;) You are just confusing pod install with pod update — you were running the former but you should be using the latter instead. A brief overview to clear things up:
pod install. When you run pod install, it only resolves dependencies for pods that are not already listed in the Podfile.lock. For pods in Podfile.lock, it downloads the explicit version listed there, without checking if a newer version is available — I believe this (expected) behavior was causing your issue.
pod update. If you run pod update, CocoaPods will update every pod listed in your Podfile to the latest version possible. Of course, respecting the version restrictions declared in your Podfile, if any.
For more information, be sure to check the pod install vs. pod update guide as well.
I had a similar issue and was stuck at the following output even after running the run pod repo remove master and pod install and pod update:
Using AmazonAd (2.2.15)
Using Firebase (3.17.0)
Using FirebaseAnalytics (3.9.0)
Using FirebaseCore (3.6.0)
Using FirebaseInstanceID (1.0.10)
Using Google (3.1.0)
Using Google-Mobile-Ads-SDK (7.19.1)
Using GoogleToolboxForMac (2.1.1)
I kept seeing the note in the pod update command output:
[!] Google has been deprecated
So I deleted the Google from the podfile:
pod Google
Then I re-ran:
pod update
and Received:
Using AmazonAd (2.2.15)
Installing Firebase 4.3.0 (was 3.17.0)
Installing FirebaseAnalytics 4.0.4 (was 3.9.0)
Installing FirebaseCore 4.0.8 (was 3.6.0)
Installing FirebaseInstanceID 2.0.4 (was 1.0.10)
Installing Google-Mobile-Ads-SDK 7.24.1 (was 7.19.1)
Using GoogleToolboxForMac (2.1.1)
Installing nanopb (0.3.8)
I had the same problem and just fixed it by changing the pod subsec into the full name of the pods like this:
- pod 'Firebase/Core'
- pod 'Firebase/RemoteConfig'
+ pod 'FirebaseCore', '4.0.9'
+ pod 'FirebaseRemoteConfig', '2.0.3'
Rather weird that this confusion happened in the first place but at least this fixes it.
Similarly to how Alamofire in my original podfile states the version I would like, doing so for firebase made it update to version 4.0.0 and the appropriate firebase functions work now.
For example:
Change (for each):
pod 'Firebase/Auth'
To:
pod 'Firebase/Auth', '~> 4.0.0'
A full example of my new podfile and the output after running pod install is as follows.
Correct Podfile:
# Uncomment this line to define a global platform for your project
platform :ios, '9.2'
# Uncomment this line if you're using Swift
use_frameworks!
target 'myProject' do
pod 'Firebase', '~> 4.0.0'
pod 'Firebase/Auth', '~> 4.0.0'
pod 'Firebase/Core', '~> 4.0.0'
pod 'Firebase/Storage', '~> 4.0.0'
pod 'Firebase/Database', '~> 4.0.0'
pod 'Firebase/Crash', '~> 4.0.0'
pod 'Firebase/Messaging', '~> 4.0.0'
pod 'Alamofire', '~> 4.4'
end
Output
Analyzing dependencies
Downloading dependencies
Using Alamofire (4.4.0)
Using Firebase (4.0.0)
Using FirebaseAnalytics (4.0.0)
Using FirebaseAuth (4.0.0)
Using FirebaseCore (4.0.0)
Using FirebaseCrash (2.0.0)
Using FirebaseDatabase (4.0.0)
Using FirebaseInstanceID (2.0.0)
Using FirebaseMessaging (2.0.0)
Using FirebaseStorage (2.0.0)
Using GTMSessionFetcher (1.1.10)
Using GoogleToolboxForMac (2.1.1)
Using Protobuf (3.3.0)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 8 dependencies from the Podfile and 13 total pods installed
Podfile
platform :ios, '10.0'
# ignore all warnings from all pods
inhibit_all_warnings!
use_frameworks!
def pods
pod 'Firebase/Core'
end
Terminal
pod --version
1.3.1
pod update
CocoaPods 1.5.3 is available.
To update use: `sudo gem install cocoapods`
For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.5.3
sudo gem install cocoapods
Password:
Fetching: cocoapods-core-1.5.3.gem (100%)
Successfully installed cocoapods-core-1.5.3
Fetching: cocoapods-deintegrate-1.0.2.gem (100%)
Successfully installed cocoapods-deintegrate-1.0.2
Fetching: cocoapods-downloader-1.2.1.gem (100%)
Successfully installed cocoapods-downloader-1.2.1
Fetching: molinillo-0.6.6.gem (100%)
Successfully installed molinillo-0.6.6
Fetching: cocoapods-1.5.3.gem (100%)
Successfully installed cocoapods-1.5.3
Parsing documentation for cocoapods-core-1.5.3
Installing ri documentation for cocoapods-core-1.5.3
Parsing documentation for cocoapods-deintegrate-1.0.2
Installing ri documentation for cocoapods-deintegrate-1.0.2
Parsing documentation for cocoapods-downloader-1.2.1
Installing ri documentation for cocoapods-downloader-1.2.1
Parsing documentation for molinillo-0.6.6
Installing ri documentation for molinillo-0.6.6
Parsing documentation for cocoapods-1.5.3
Installing ri documentation for cocoapods-1.5.3
Done installing documentation for cocoapods-core, cocoapods-deintegrate, cocoapods-downloader, molinillo, cocoapods after 8 seconds
5 gems installed
pod install
Installing Firebase (5.5.0)
Installing FirebaseAnalytics (5.1.0)
Installing FirebaseCore (5.1.0)
Installing FirebaseInstanceID (3.2.0)
Installing GoogleAppMeasurement (5.1.0)
Installing GoogleUtilities (5.2.2)
Installing nanopb (0.3.8)
I have the same problem with Ionic and Capacitor too, from this instruction:
https://firebase.google.com/docs/dynamic-links/custom-domains
look like you are missing the FirebaseDynamicLinkCustomDomains, you should update this to your ios project:
for example, if your url is:
encodedLink = https://yourtargetlink.com (you should encode it to this https%3A%2F%2Fyourtargetlink.com)
dynamiclink = https://yourfirebasedynamiclink.com/link/?link=${encodedLink}&apn=com.example&isi=1449448875&ibi=com.example
You should add this key to your ios project
// Info.plist
<dict>
<key>FirebaseDynamicLinksCustomDomains</key>
<array>
<string>https://yourtargetlink.com</string>
<string>https://yourfirebasedynamiclink.com/link</string>
</array>
</dict>

Upgrade to Swift 3 Error- ld: framework not found GoogleInterchangeUtilities

I just upgraded to Swift 3 from 2.2. I'm using Firebase, Google Maps, Google Places, SwiftyJSON, Alamofire 4.4, and SDWebImage. I reinstalled all the pods, ran git commit, and fixed all the errors except this one:
ld: framework not found GoogleInterchangeUtilities clang:
error: linker command failed with exit code 1 (use -v to see
invocation)
(null): Framework not found
GoogleInterchangeUtilities
(null): Linker command failed with exit code 1 (use -v to see
invocation)
Where do I find GoogleInterchangeUtilities and how do I install or fix it?
When I upgraded from Swift 2.2 to Swift 3 the first thing I did was clean and remove my cocoapods:
pod deintegrate
pod clean
pod cache clean --all
rm Podfile
For some reason when I reinstalled all of the pods I originally had, the GoogleInterchangeUtilities file plus several others were removed in the process:
Analyzing dependencies
Removing GoogleInterchangeUtilities //**REMOVED**
Removing GoogleNetworkingUtilities //**REMOVED**
Removing GoogleParsingUtilities //**REMOVED**
Removing GoogleSymbolUtilities //**REMOVED**
Removing GoogleUtilities //**REMOVED**
Downloading dependencies
Installing Alamofire 3.5.1 (was 3.4.1)
Installing Firebase 3.15.0 (was 3.3.0)
Installing FirebaseAnalytics 3.7.0 (was 3.2.1)
Installing FirebaseAuth 3.1.1 (was 3.0.3)
Installing FirebaseCore (3.5.2)
Installing FirebaseCrash 1.1.6 (was 1.0.6)
Installing FirebaseDatabase 3.1.2 (was 3.0.2)
Installing FirebaseDynamicLinks 1.3.4 (was 1.1.0)
Installing FirebaseInstanceID 1.0.9 (was 1.0.7)
Installing FirebaseStorage 1.1.0 (was 1.0.2)
Installing GTMSessionFetcher (1.1.9)
Installing GoogleMaps 2.2.0 (was 1.13.2)
Using GooglePlacesAPI (1.0.6)
Installing GoogleToolboxForMac (2.1.1)
Installing ObjectMapper 1.5.0 (was 1.3.0)
Installing Protobuf (3.2.0)
Using SDWebImage (3.8.2)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 10 dependencies from the Podfile and 17 total pods installed.
I eventually went to Google and typed in GoogleInterchangeUtilities which led me to it's pod install page here. I reinstalled the pod which removed the error but then each of the other files that were removed resulted in their own ld: framework not found... Xcode errors.
Long story short if you cleaned and removed your cocoapods file and reinstalled everything, there's a possibility the Google...Utilities frameworks will get removed. You have to include those specific individual pods back in your pod file and run: pod install again.
Here is my pod file with them included in addition to all my other pods:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'myProject' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for myProject
pod 'GoogleInterchangeUtilities', '~> 1.2'
pod 'GoogleNetworkingUtilities', '~> 1.2'
pod 'GoogleParsingUtilities', '~> 1.1'
pod 'GoogleSymbolUtilities', '~> 1.1'
pod 'GoogleUtilities', '~> 1.3'
//all my other pods...
Here are their cocoapods install pages:
GoogleInterchangeUtilities
GoogleNetworkingUtilities
GoogleParsingUtilities
GoogleSymbolUtilities
GoogleUtilities

Pod install not updating pods in XCWorkspace

My podfile has:
# Uncomment this line to define a global platform for your project
platform :ios, '8.0'
# Uncomment this line if you're using Swift
use_frameworks!
target 'CoChat' do
pod 'Firebase', '>= 2.5.0'
pod 'FBSDKCoreKit'
pod 'FBSDKShareKit'
pod 'FBSDKLoginKit'
pod 'AFNetworking', '~> 3.0'
#pod 'MobileDeepLinking-iOS'
end
I run pod install and get:
Updating local specs repositories
Analyzing dependencies
Downloading dependencies
Using AFNetworking (3.0.4)
Using Bolts (1.6.0)
Using FBSDKCoreKit (4.10.0)
Using FBSDKLoginKit (4.10.0)
Using FBSDKShareKit (4.10.0)
Using Firebase (2.5.1)
Installing FirebaseUI (0.3.2)
Installing Google (1.3.2)
Installing GoogleAppUtilities (1.0.0)
Installing GoogleAuthUtilities (1.0.1)
Installing GoogleInterchangeUtilities (1.1.0)
Installing GoogleNetworkingUtilities (1.0.0)
Installing GoogleSignIn (2.4.0)
Installing GoogleSymbolUtilities (1.0.3)
Installing GoogleUtilities (1.1.0)
[!] The 'Pods-CoChat' target has transitive dependencies that include static binaries: (/Users/Nathan/Library/Mobile Documents/com~apple~CloudDocs/Desktop/CoChat/Pods/Google/Libraries/libGGLCore.a and /Users/Nathan/Library/Mobile Documents/com~apple~CloudDocs/Desktop/CoChat/Pods/Google/Libraries/libGGLSignIn.a)
When you open the XCWorkspace, nothing has changed. The FirebaseUI pod/framework is not there. Not a clue why this isn't installing.
I'm facing the same problem. The problem is with FirebaseUI/Auth and Google Sign in.
Solution
comment out use_frameworks!
Use bridging headers files by creating
a cocoa touch file, remember to check the box for 'Create a bridging
header file' and then after creation only deleting the .m .h files
as you want the bridging header file. Manually call out the headers
files from there.
If you read the posts on https://github.com/firebase/FirebaseUI-iOS/issues?q=is%3Aissue+is%3Aclosed, some seem to have similar issue. One possible fix is to get the 0.2.6 version of FirebaseUI by including '~>0.2.6' beside the firebaseUI pod
Hope this helps and hopefully this bug is fixed.

Resources