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

Supporting cordova-cli@9 or cordova-lib@9 #1034

Open
wants to merge 73 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
2e1fae3
Supporting cordova-cli@9 or cordova-lib@9
sagrawal31 Mar 27, 2019
08f9b17
Trying to fix the build
sagrawal31 Apr 3, 2019
609211e
Removing old cordova-android because of a failing test case
sagrawal31 Apr 3, 2019
a2c57ad
Only installing xcode for ios platform
sagrawal31 Apr 3, 2019
247b6a2
Fixing old failing Android tests by not installing the cordova & plat…
sagrawal31 Apr 3, 2019
46a7bd1
Fixes issues cause by Firebase SDK updates on 5 April 2019 (https://f…
dpa99c May 7, 2019
eee2cfe
Remove obsolete <service> entry for FirebasePluginInstanceIDService.
dpa99c May 14, 2019
17eb7c4
Remove unnecessary extra <config-file> block which can lead to race c…
dpa99c Mar 1, 2019
289706f
Remove redundant build-extras.gradle
dpa99c Jan 14, 2019
ad537b6
Merge pull request #2 from wizpanda/firebase-changes
sagrawal31 May 17, 2019
878a4c5
3.0.0
sagrawal31 May 17, 2019
2333790
Updating README.md
sagrawal31 May 17, 2019
385ce85
Adding npm version badge.
sagrawal31 May 21, 2019
ffec9e3
Added ability to log js stack trace on android.
Jun 10, 2019
b674176
Missed adding file to plugin.xml
Jun 10, 2019
42c66b0
Fixed error if stacktrace is missing data and js bug if stackTrace wa…
Jun 10, 2019
c1d4d10
Fixed ios error logging and added ability to log stack traces.
Jun 12, 2019
bd921fa
Add createChannel function for Android 0
maximilianloy Jun 14, 2019
3046ef9
Merge pull request #9 from maximilianloy/android-createchannel
sagrawal31 Jun 17, 2019
1911802
Formatted the code
sagrawal31 Jun 17, 2019
b8eb565
Only changing the indentation to 4 spaces.
sagrawal31 Jun 17, 2019
06de856
3.1.0
sagrawal31 Jun 17, 2019
b8ec09f
Trying to fix the Travis CI build.
sagrawal31 Jun 17, 2019
809d7f5
Merge branch 'master' into master
distinctdan Jun 19, 2019
b50e88d
Merge pull request #8 from distinctdan/master
sagrawal31 Jun 19, 2019
bfd4bf6
Some code cleanup and changes to log stacktrace in Firebase.
sagrawal31 Jun 19, 2019
428f306
3.2.0
sagrawal31 Jun 19, 2019
680ac02
Backward compatibility fixes to support breaking changes released by …
sagrawal31 Jun 19, 2019
32f40c7
Merge pull request #14 from wizpanda/firebase-breaking-backward
sagrawal31 Jun 19, 2019
cd3abfd
3.3.0
sagrawal31 Jun 19, 2019
92af2ff
First version of changes to make the app build after breaking changes…
sagrawal31 Jun 18, 2019
f72326d
Changing the minimum required cordova-android version to 8.0.0
sagrawal31 Jun 18, 2019
0379213
Updating README.md
sagrawal31 Jun 19, 2019
bc4cf4e
Merge pull request #13 from wizpanda/google-breaking-changes
sagrawal31 Jun 19, 2019
ed019d1
GitHub issue template cleanup. Updating JS files to use "const" or "l…
sagrawal31 Jun 19, 2019
066042f
4.0.0
sagrawal31 Jun 19, 2019
65e6925
Formatting plugin.xml to use 4 spaces.
sagrawal31 Jun 19, 2019
5219529
Fixed typo in firebase-browser.js fixes #16
sagrawal31 Jun 19, 2019
9d968eb
Only formatting the JS files.
sagrawal31 Jun 19, 2019
688b634
4.0.1
sagrawal31 Jun 19, 2019
6a965f6
Breaking Change: Merging `logJSError` to `logError` method for consis…
sagrawal31 Jun 24, 2019
03ee4ff
Updating the API doc.
sagrawal31 Jun 24, 2019
d72c302
Generated "Table of Contents" via markdown-toc generator.
sagrawal31 Jun 24, 2019
a2a1377
Handling a few edge cases for "logError" method.
sagrawal31 Jun 24, 2019
70b2c6c
Updating README.
sagrawal31 Jun 24, 2019
999f666
Merge pull request #21 from wizpanda/android-fixes
sagrawal31 Jun 24, 2019
e4d4dc0
Merge pull request #1 from wizpanda/master
distinctdan Jun 24, 2019
263507e
Added more docs for passing a stacktrace to logError
distinctdan Jun 24, 2019
0d798b5
Merge pull request #22 from distinctdan/master
sagrawal31 Jun 25, 2019
e60cd91
4.1.0
sagrawal31 Jun 25, 2019
b175b42
Updating CHANGELOG & docs.
sagrawal31 Jun 25, 2019
818f0cf
Breaking Change: Moving to CocoaPods to manage Firebase, Crashlytics …
sagrawal31 Jun 24, 2019
0d4719d
Using optimistic operator to specify Firebase dependencies for iOS.
sagrawal31 Jun 24, 2019
1e8a384
Updating README.
sagrawal31 Jun 25, 2019
b86af91
More clear documentation about different cordova platform versions.
sagrawal31 Jun 25, 2019
08d71bd
Merge pull request #23 from wizpanda/ios-pods
sagrawal31 Jun 25, 2019
dcfd859
5.0.0
sagrawal31 Jun 25, 2019
ebf3191
Updating README.
sagrawal31 Jun 25, 2019
72ee4fc
Fix for ampersand in the app name
teknepal Jun 25, 2019
f8bfb82
Reducing the Firebase iOS dependencies to 5.x to avoid breaking changes.
sagrawal31 Jun 27, 2019
310bbf7
Removed deprecated method "getInstanceId"
sagrawal31 Jun 27, 2019
fe059bf
Merge pull request #28 from wizpanda/ios-fixes
sagrawal31 Jun 27, 2019
1a0f3e7
5.1.0
sagrawal31 Jun 27, 2019
dc7f9ad
changed const to var
teknepal Jun 28, 2019
d4fa7f6
Merge pull request #26 from teknepal/fix_ampersand_app_name
sagrawal31 Jul 1, 2019
c1539e4
Improving the JS code. Using chalk to highlights a few logs.
sagrawal31 Jul 1, 2019
487f3be
Some docs improvement.
sagrawal31 Jul 1, 2019
5b1a526
Merge pull request #30 from wizpanda/js-improvement
sagrawal31 Jul 1, 2019
d1c5774
Some more logging improvement.
sagrawal31 Jul 1, 2019
19828d1
5.1.1
sagrawal31 Jul 1, 2019
645d5f3
Using tabular format for different version of plugin.
sagrawal31 Jul 14, 2019
eb15341
Moving the difference doc on the top & some cleanup.
sagrawal31 Jul 14, 2019
154596a
Updating README for diverting developers to new repository.
sagrawal31 Jul 25, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ matrix:
- android-sdk-preview-license-.+
- android-sdk-license-.+
- google-gdk-license-.+
env: CORDOVA_VERSION="6.5.0" CORDOVA_PLATFORM="android" CORDOVA_PLATFORM_VERSION="6.4.0"
env: CORDOVA_VERSION="9.0.0" CORDOVA_PLATFORM="android" CORDOVA_PLATFORM_VERSION="8.0.0"

- os: linux
sudo: false
Expand Down
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
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"version": "node ./bump-version.js && git add -A plugin.xml",
"postversion": "git push && git push --tags && npm publish --verbose",
"test": "npm run test:ios && npm run test:android && npm run test:browser",
"test:android": "npm run test:cordova@6.5.0:android@6.4.0 && npm run test:cordova@7.1.0:android@7.1.0 && npm run test:cordova@8.0.0:android@7.1.0",
"test:android": "npm run test:cordova@7.1.0:android@7.1.0 && npm run test:cordova@8.0.0:android@7.1.0 && npm run test:cordova@9.0.0:android@8.0.0",
"test:browser": "npm run test:cordova@6.5.0:browser@5.0.3 && npm run test:cordova@7.1.0:browser@5.0.3 && npm run test:cordova@8.0.0:browser@5.0.3",
"test:ios": "npm run test:cordova@6.5.0:ios@4.5.4 && npm run test:cordova@7.1.0:ios@4.5.4 && npm run test:cordova@8.0.0:ios@4.5.4",
"test:cordova@6.5.0:ios@4.5.4": "bash ./test/test-default.sh 6.5.0 ios 4.5.4",
Expand All @@ -45,5 +45,7 @@
"test:cordova@7.1.0:browser@5.0.3": "bash ./test/test-default.sh 7.1.0 browser 5.0.3",
"test:cordova@8.0.0:browser@5.0.3": "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
4 changes: 4 additions & 0 deletions test/platform-add.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ PLATFORM_VERSION=$3
FOLDER=".build-$PLATFORM"
rm -rf $FOLDER

if [[ "$PLATFORM" == "ios" ]]; then
npm install xcode --no-save
fi

npm install "cordova@$CORDOVA_VERSION" --no-save
./node_modules/.bin/cordova create $FOLDER com.github.cordova_plugin_firebase HelloWorld

Expand Down
3 changes: 2 additions & 1 deletion test/test-with-3-plugins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ ADDITIONAL_PLUGIN_1=$4
ADDITIONAL_PLUGIN_2=$5
ADDITIONAL_PLUGIN_3=$6

bash ./test/platform-add.sh $CORDOVA_VERSION $PLATFORM $PLATFORM_VERSION
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this what made the build pass? If yes, I'll submit a separate PR with this fix, so all the broken PRs would start passing after rebasing.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really, all but yes, it did fixed a few test cases. Since the cordova & platform version passed to this script from the parent script are same hence there was no point reinstalling it again so I commented out that. But I would love to see the detailed error when this script was trying to install the same cordova & platform.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would also love to help you on rebasing PRs & getting them merged which are good to go because I saw various good PRs

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how can we go forward ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@felipeclopes can tell anything

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not really sure hot to proceed. It seems that the first step would be to try to fix the test cases that are broken. If you look at the list of PRs to merge, the only ones passing are the ones who removed the tests for older Cordova versions and this one.

Maybe a separate PR just with this fix of the build cold help the other PRs to rebase and get a green status on the build system.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my thinking, we can start with merging this branch to master then start rebasing other PR with master so most of the PRs will by default pass

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@felipeclopes any update? I'll still suggest to move forward with this

# Do not reinstall the platforms
#bash ./test/platform-add.sh $CORDOVA_VERSION $PLATFORM $PLATFORM_VERSION
bash ./test/plugin-add.sh $CORDOVA_VERSION $PLATFORM $PLATFORM_VERSION ..
bash ./test/plugin-add.sh $CORDOVA_VERSION $PLATFORM $PLATFORM_VERSION $ADDITIONAL_PLUGIN_1
bash ./test/plugin-add.sh $CORDOVA_VERSION $PLATFORM $PLATFORM_VERSION $ADDITIONAL_PLUGIN_2
Expand Down