Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cordova 7 path has changed and after_prepare script should be updated #499

Closed
michaelreiser opened this issue Dec 5, 2017 · 5 comments
Closed

Comments

@michaelreiser
Copy link

michaelreiser commented Dec 5, 2017

See: https://cordova.apache.org/announcements/2017/12/04/cordova-android-7.0.0.html

For Cordova 7 installations, after_prepare.js should be set to stringsXml: ANDROID_DIR + '/app/src/main/res/values/strings.xml' on line 51

@amritk
Copy link

amritk commented Dec 9, 2017

Hey @michaelreiser I opened a pull request for it. In the meantime you could try

cordova plugin add https://github.com/amritk/cordova-plugin-firebase

and let me know how it works.

@michaelreiser
Copy link
Author

Thanks. I'll keep you updated

@christocracy
Copy link

christocracy commented Dec 12, 2017

I'm working on a fork of this plugin where the after_prepare hook is deleted. I still need to add docs.

  • Cordova 7.1.0 is required.
cordova plugin add https://github.com/transistorsoft/cordova-plugin-firebase#cordova-7.1.0 --variable APP_ID="YOUR_APP_ID" --variable API_KEY="YOUR_KEY"

Assuming you've placed your google-services.json / GoogleService-Info.plist in the root of your project:

config.xml

  <platform name="android">
    <resource-file src="google-services.json" target="app/google-services.json" />
  </platform>

  <platform name="ios">
    <resource-file src="GoogleService-Info.plist" />
  </platform>

The plugin will now install its iOS dependencies via CocoaPods instead of carrying around out-of-date versions of iOS Firebase libs within the plugin src so before you install the plugin, make sure you've got Cocoapods set up on your system. phonegap-plugin-push has a good tutorial in this regard.

If you do have Cocoapods setup already, make sure you do this before installing the plugin:

$ pod repo update

You'll now need to open the App.xcworkspace file in XCode instead of the App.xcodeproj

Keep an eye on my fork if you're interested. More to come.

@robertarnesson
Copy link
Contributor

robertarnesson commented Feb 26, 2018

@christocracy I'll happily take a PR if you get the pods sorted out. Android 7 issue should now be sorted in master at 039e29e

@christocracy
Copy link

I have a working fork languishing since December. Problem is, I don’t actually use the plugin I’m a full time plugin dev and my users often use this one.

I can send a PR to you, hopefully you can give it a good test.

mpgxvii pushed a commit to RADAR-base/cordova-plugin-firebase that referenced this issue Oct 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants