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

feat(cordova-plugin-firebasex): Add plugin #3106

Merged
merged 1 commit into from
Jul 29, 2019
Merged

feat(cordova-plugin-firebasex): Add plugin #3106

merged 1 commit into from
Jul 29, 2019

Conversation

patryk-fuhrman
Copy link
Contributor

Added plugin cordova-plugin-firebasex which is the maintained fork from cordova-plugin-firebase which is not maintained for a while now.

@l3ender
Copy link

l3ender commented Jul 26, 2019

Very nice! Is there an ETA on when this can get merged and released?

Thanks for the work!

@danielsogl danielsogl self-assigned this Jul 29, 2019
@danielsogl danielsogl added the target: minor This PR is targeted for the next minor release label Jul 29, 2019
@danielsogl danielsogl merged commit de83edb into danielsogl:master Jul 29, 2019
@aalasolutions-zz
Copy link

aalasolutions-zz commented Jul 29, 2019

I am not sure what I am doing wrong. It worked for me for Android, but it didnt worked on ios

Here are the steps I have done so far

ionic cordova platform rm ios
rm -rf node_modules/ platforms/ plugins/ www/ package-lock.json

removed any plugin for fcm, firebase etc.

ionic cordova plugin add cordova-plugin-firebasex
npm install @ionic-native/firebase-x

ionic cordova platform add android
//app.module.ts
import { FirebaseX } from "@ionic-native/firebase-x/ngx";
...
providers: [
    FirebaseX, 
    .....


// app.components
import { FirebaseX } from "@ionic-native/firebase-x/ngx";
...
constructor(
...
private firebase: FirebaseX,
...

It worked fine for Android, but I got the following error for IOS,

$ ionic cordova platform add ios

.....

Prepared iOS project successfully
Installing plugin "cordova-plugin-androidx" following successful platform add of ios
Found variables for "cordova-plugin-androidx". Processing as cli_variables.
Installing "cordova-plugin-androidx" for ios
Running command: /Users/SUPERUSER/ionic-notification/platforms/ios/cordova/version 
Command finished with error code 0: /Users/SUPERUSER/ionic-notification/platforms/ios/cordova/version 
Finding scripts for "before_plugin_install" hook from plugin cordova-plugin-androidx on ios platform only.
No scripts found for hook "before_plugin_install".
Install start for "cordova-plugin-androidx" on ios.
Beginning processing of action stack for ios project...
Action stack processing complete.
pods.json: The file at /Users/SUPERUSER/ionic-notification/platforms/ios/pods.json does not exist.
Creating new pods.json in platforms/ios
Wrote to pods.json.
Podfile: The file at /Users/SUPERUSER/ionic-notification/platforms/ios/Podfile does not exist.
Creating new Podfile in platforms/ios
Wrote to Podfile.
Install complete for cordova-plugin-androidx on ios.
Finding scripts for "after_plugin_install" hook from plugin cordova-plugin-androidx on ios platform only.
No scripts found for hook "after_plugin_install".
Installing plugin "cordova-plugin-androidx-adapter" following successful platform add of ios
Found variables for "cordova-plugin-androidx-adapter". Processing as cli_variables.
Installing "cordova-plugin-androidx-adapter" for ios
Running command: /Users/SUPERUSER/ionic-notification/platforms/ios/cordova/version 
Command finished with error code 0: /Users/SUPERUSER/ionic-notification/platforms/ios/cordova/version 
Finding scripts for "before_plugin_install" hook from plugin cordova-plugin-androidx-adapter on ios platform only.
No scripts found for hook "before_plugin_install".
Install start for "cordova-plugin-androidx-adapter" on ios.
Beginning processing of action stack for ios project...
Action stack processing complete.
pods.json found in platforms/ios
Podfile found in platforms/ios
Install complete for cordova-plugin-androidx-adapter on ios.
Finding scripts for "after_plugin_install" hook from plugin cordova-plugin-androidx-adapter on ios platform only.
No scripts found for hook "after_plugin_install".
Installing plugin "cordova-plugin-device" following successful platform add of ios
Found variables for "cordova-plugin-device". Processing as cli_variables.
Installing "cordova-plugin-device" for ios
Running command: /Users/SUPERUSER/ionic-notification/platforms/ios/cordova/version 
Command finished with error code 0: /Users/SUPERUSER/ionic-notification/platforms/ios/cordova/version 
Finding scripts for "before_plugin_install" hook from plugin cordova-plugin-device on ios platform only.
No scripts found for hook "before_plugin_install".
Install start for "cordova-plugin-device" on ios.
Beginning processing of action stack for ios project...
Action stack processing complete.
pods.json found in platforms/ios
Podfile found in platforms/ios
Install complete for cordova-plugin-device on ios.
Finding scripts for "after_plugin_install" hook from plugin cordova-plugin-device on ios platform only.
No scripts found for hook "after_plugin_install".
Installing plugin "cordova-plugin-firebasex" following successful platform add of ios
Found variables for "cordova-plugin-firebasex". Processing as cli_variables.
Installing "cordova-plugin-firebasex" for ios
Running command: /Users/SUPERUSER/ionic-notification/platforms/ios/cordova/version 
Command finished with error code 0: /Users/SUPERUSER/ionic-notification/platforms/ios/cordova/version 
Running command: /Users/SUPERUSER/ionic-notification/platforms/ios/cordova/version 
Command finished with error code 0: /Users/SUPERUSER/ionic-notification/platforms/ios/cordova/version 
Dependencies detected, iterating through them...
Requesting plugin "cordova-plugin-androidx@^1.0.2".
Plugin dependency "cordova-plugin-androidx@1.0.2" already fetched, using that version.
Dependent plugin "cordova-plugin-androidx" already installed on ios.
Requesting plugin "cordova-plugin-androidx-adapter@^1.1.0".
Plugin dependency "cordova-plugin-androidx-adapter@1.1.0" already fetched, using that version.
Dependent plugin "cordova-plugin-androidx-adapter" already installed on ios.
Finding scripts for "before_plugin_install" hook from plugin cordova-plugin-firebasex on ios platform only.
No scripts found for hook "before_plugin_install".
Install start for "cordova-plugin-firebasex" on ios.
Beginning processing of action stack for ios project...
Action stack processing complete.
pods.json found in platforms/ios
Podfile found in platforms/ios
Adding pods since the plugin contained <podspecs>
Set pods.json for `declarations` - `use_frameworks!`
Added declaration line for `use_frameworks!`
Set pods.json for `sources` - `https://github.com/CocoaPods/Specs.git`
Added source line for `https://github.com/CocoaPods/Specs.git`
Set pods.json for `libraries` - `Firebase/Core`
Added pod line for `Firebase/Core`
Set pods.json for `libraries` - `Firebase/Auth`
Added pod line for `Firebase/Auth`
Set pods.json for `libraries` - `Firebase/Messaging`
Added pod line for `Firebase/Messaging`
Set pods.json for `libraries` - `Firebase/Performance`
Added pod line for `Firebase/Performance`
Set pods.json for `libraries` - `Firebase/RemoteConfig`
Added pod line for `Firebase/RemoteConfig`
Set pods.json for `libraries` - `Fabric`
Added pod line for `Fabric`
Set pods.json for `libraries` - `Crashlytics`
Added pod line for `Crashlytics`
Wrote to pods.json.
Wrote to Podfile.
Running `pod install` (to install plugins)
Running command: pod install --verbose
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/universal-darwin18/rbconfig.rb:215: warning: Insecure world writable dir /Users/SUPERUSER/ionic-notification in PATH, mode 040777

==== pod install start ====

  Preparing

Analyzing dependencies

Inspecting targets to integrate
  Using `ARCHS` setting to build architectures of target `Pods-WMC Start Times`: (``)

Resolving dependencies of `Podfile`

[!] CocoaPods could not find compatible versions for pod "Firebase/Core":
  In Podfile:
    Firebase/Core (= 6.3.0)

None of your spec sources contain a spec satisfying the dependency: `Firebase/Core (= 6.3.0)`.

You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default.

/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:328:in `raise_error_unless_state'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:310:in `block in unwind_for_conflict'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:in `tap'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:in `unwind_for_conflict'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:257:in `process_topmost_state'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:182:in `resolve'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolver.rb:43:in `resolve'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/resolver.rb:91:in `resolve'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/installer/analyzer.rb:909:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/installer/analyzer.rb:907:in `resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/installer/analyzer.rb:114:in `analyze'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:266:in `analyze'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:174:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:173:in `resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:136:in `install!'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/command/install.rb:48:in `run'
/Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:22:in `load'
/usr/local/bin/pod:22:in `<main>'

Command finished with error code 31: pod install,--verbose
Failed to install 'cordova-plugin-firebasex': Error: pod: Command failed with exit code 31 Error output:
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/universal-darwin18/rbconfig.rb:215: warning: Insecure world writable dir /Users/SUPERUSER/ionic-notification in PATH, mode 040777
    at ChildProcess.whenDone (/Users/SUPERUSER/ionic-notification/node_modules/cordova-common/src/superspawn.js:135:23)
    at ChildProcess.emit (events.js:189:13)
    at maybeClose (internal/child_process.js:970:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
pod: Command failed with exit code 31 Error output:
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/universal-darwin18/rbconfig.rb:215: warning: Insecure world writable dir /Users/SUPERUSER/ionic-notification in PATH, mode 040777
Error: pod: Command failed with exit code 31 Error output:
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/universal-darwin18/rbconfig.rb:215: warning: Insecure world writable dir /Users/SUPERUSER/ionic-notification in PATH, mode 040777
    at ChildProcess.whenDone (/Users/SUPERUSER/ionic-notification/node_modules/cordova-common/src/superspawn.js:135:23)
    at ChildProcess.emit (events.js:189:13)
    at maybeClose (internal/child_process.js:970:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
[ERROR] An error occurred while running subprocess cordova.
        
        cordova platform add ios --verbose exited with exit code 31.
        
        Re-running this command with the --verbose flag may provide more information.
  ionic:utils-process onBeforeExit handler: 'process.exit' received +0ms
  ionic:utils-process onBeforeExit handler: running 1 functions +0ms
  ionic:utils-process processExit: exiting (exit code: 31) +33ms

@aalasolutions-zz
Copy link

aalasolutions-zz commented Jul 29, 2019

nvm, looks like it can be solved by going to dpa99c/cordova-plugin-firebasex#43

@dcxn
Copy link

dcxn commented Aug 1, 2019

Really appreciate the work on the wrapper, although sadly doesn't seem work with ionic 3. Any way to get a release compatible with that version?
Thank you

@hugoblanc
Copy link

Really good job ! Thanks for that
Just about plugin description:

import { FirebaseX } from '@ionic-native/firebase-x';
sould be
import { FirebaseX } from '@ionic-native/firebase-x/ngx';

@patryk-fuhrman
Copy link
Contributor Author

Really appreciate the work on the wrapper, although sadly doesn't seem work with ionic 3. Any way to get a release compatible with that version?
Thank you

Any particular problems on Ionic 3?

Daniel answered some other pull request regarding ionic 3, that you can use ionic-native 4+ in you ionic 3 app, can you check it?

@maxtacco
Copy link

Adding one minor issue I discovered here for reference: #3139

@GoceBogdanovski
Copy link

This issue is closed but nothing is updated. Ionic still uses the old firebase plugin.

Execute this lines:
ionic cordova plugin add cordova-plugin-firebase
npm install @ionic-native/firebase
from here https://ionicframework.com/docs/native/firebase/
and share your build result.
Mine is FAILED

@paulstelzer
Copy link
Contributor

@1CM you have to use "@ionic-native/firebase-x" ( https://www.npmjs.com/package/@ionic-native/firebase-x)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.