-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[iOS FCM] Library -lGoogleToolboxForMac not found on Xcode build #1737
Comments
Fixed in #1715 |
I installed the plugin with this commit but I'm still seeing the same issue |
It definitely works -- did you grab the plugin from the 2.0.x branch? |
I did |
Let me try it out using your method. Will let you know. |
Using your plugin sha hash, I was able to build successfully. Repro steps:
From above, I opened up the Podfile to verify GTM was there, and I built the project in Xcode 8.3.2 (after setting the correct provisioning profile, cert, etc). It built with no errors. |
Ok, I found out the problem. I had been opening the project on Xcode by Thanks for your help and the steps to repro! |
Great! you're welcome :) |
The issue persists on a fresh clone of a project that uses this plug-in. (v2.0.0-rc5) ionic cordova plugin remove phonegap-plugin-push
ionic cordova plugin add phonegap-plugin-push@latest |
seems it is not related to the plugin version, but need the action of plugin remove and add |
I get this error too. ( This is a fresh project as of yesterday. I am using I am not using GCM of FCM in my project at all. Why would it even try to link these? |
because the plugin also supports FCM for iOS and we haven't find a way of conditionally add FCM only if you want to use it |
Thanks, @jcesarmobile. Can I pull FCM out after install so Xcode does not try to link it? |
I don't think the app will be able to build if you remove Firebase as PushPlugin.m has a few imports for it. |
Hmmm... so what are my options if I don't want to use Firebase? |
You don't have to use it, but you can't get rid of the firebase code. |
Ok thanks, I do have Cocoapods installed. I suppose I will try installing the Google toolbox and see if that helps. |
Try navigating to |
Thanks, @jcesarmobile I will try that now. Sidenote: I think I just noticed this workaround in the docs, so apologies if I am wasting your time on this. (I missed it before thinking I did not have to take any Firebase instructions into account): --- BEGIN QUOTE --- Library not found for -lGoogleToolboxForMacTrying to build for iOS using the latest cocoapods (1.2.1) but failed with the following error (from terminal running cordova build ios):
--- END QUOTE --- Builds Pass in ShellI do want to point out something quote interesting: builds pass when run from the shell, but fail when building from Xcode. cordova build ios
# --- OUTPUT ---
# Non-system Ruby in use. This may cause packaging to fail.
# If you use RVM, please run `rvm use system`.
# If you use chruby, please run `chruby system`.
# 2018-01-18 12:50:48.939 xcodebuild[30860:2159529] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/kw/5t8w91_n6rb0z8b2z2grsj1r0000gn/T/RemotePushNotificationsApp_2018-01-18_12-50-48.938.xcdistributionlogs'.
# Exported RemotePushNotificationsApp.xcarchive to: /Users/...
# ** EXPORT SUCCEEDED ** In this case, the app runs fine on my device with |
cd platforms/ios/
pod install
# Analyzing dependencies
# Downloading dependencies
# Using FirebaseAnalytics (4.0.5)
# Using FirebaseCore (4.0.13)
# Using FirebaseInstanceID (2.0.8)
# Using FirebaseMessaging (2.0.8)
# Using GoogleToolboxForMac (2.1.3)
# Using Protobuf (3.5.0)
# Using nanopb (0.3.8)
# Generating Pods project
# Integrating client project
# Sending stats
# Pod installation complete! There is 1 dependency from the Podfile and 7 total # pods installed. Build still fails in Xcode. |
Are you opening the .xcodeproj or the .xcworkspcae? |
Ah! I was opening the Thank you for versing a noob. Much appreciated. |
Thanks for all your help. This issue should be documented in Installation guide as well. |
This issue is still reproducible on 2.2.2. I had to run pod install manually. |
This is a Cordova plugin, pod install seems to fail or some files are missing. |
Because I can't run it manually (must compile with fastlane on our CD server) i worked around adding a custom hook: Add a file scripts/pod_install.js:
Then add this line inside config.xml (under the iOS platform): |
This thread has been automatically locked. |
Expected Behaviour
Actual Behaviour
Xcode failed to build due to error
Reproduce Scenario (including but not limited to)
Install the plugin v2.0.0 and build and run the project with cordova cli. App built and run.
Open the .xcodeproj file on Xcode and build -> failed.
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
iOS 10.3.1
Cordova CLI version and cordova platform version
cordova --version 6.5.0
cordova platform version ios 4.4.0
Plugin version
2.0.0-rc3
The text was updated successfully, but these errors were encountered: