Skip to content

Commit

Permalink
Supporting cordova-cli@9 or cordova-lib@9
Browse files Browse the repository at this point in the history
  • Loading branch information
sagrawal31 committed Mar 27, 2019
1 parent f590cb4 commit 2e1fae3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ Download your Firebase configuration files, GoogleService-Info.plist for iOS and
### PhoneGap Build
Hooks do not work with PhoneGap Build. This means you will have to manually make sure the configuration files are included. One way to do that is to make a private fork of this plugin and replace the placeholder config files (see `src/ios` and `src/android`) with your actual ones, as well as hard coding your app id and api key in `plugin.xml`.

### cordova-lib@9 support
If you are using `cordova-cli@9` (i.e. `cordova-lib@9`) then you might need to install the `xcode` npm module dependency separately. To
do that, just run this command `npm i xcode --save-dev` in your app.

### Google Play Services
Your build may fail if you are installing multiple plugins that use Google Play Services. This is caused by the plugins installing different versions of the Google Play Services library. This can be resolved by installing [cordova-android-play-services-gradle-release](https://github.com/dpa99c/cordova-android-play-services-gradle-release).

Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,7 @@
"test:[email protected]:[email protected]": "bash ./test/test-default.sh 7.1.0 browser 5.0.3",
"test:[email protected]:[email protected]": "bash ./test/test-default.sh 8.0.0 browser 5.0.3"
},
"dependencies": {}
"dependencies": {
"xcode": "^2.0.0"
}
}
6 changes: 1 addition & 5 deletions scripts/ios/helper.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
var fs = require("fs");
var path = require("path");
var utilities = require("../lib/utilities");
var xcode = require("xcode");

/**
* This is used as the display text for the build phase block in XCode as well as the
Expand Down Expand Up @@ -30,8 +31,6 @@ module.exports = {
* (dSYMs) so that Crashlytics can display stack trace information in it's web console.
*/
addShellScriptBuildPhase: function (context, xcodeProjectPath) {
var xcode = context.requireCordovaModule("xcode");

// Read and parse the XCode project (.pxbproj) from disk.
// File format information: http://www.monobjc.net/xcode-project-file-format.html
var xcodeProject = xcode.project(xcodeProjectPath);
Expand Down Expand Up @@ -84,9 +83,6 @@ module.exports = {
* by the addShellScriptBuildPhase() helper method.
*/
removeShellScriptBuildPhase: function (context, xcodeProjectPath) {

var xcode = context.requireCordovaModule("xcode");

// Read and parse the XCode project (.pxbproj) from disk.
// File format information: http://www.monobjc.net/xcode-project-file-format.html
var xcodeProject = xcode.project(xcodeProjectPath);
Expand Down

0 comments on commit 2e1fae3

Please sign in to comment.