-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Compatiblity with Phonegap Build #34
Comments
Yes we can have it search both root and www, I don't see any reason not to |
Thanks for the answer, @robertarnesson. |
can you try it out yourself and send a pr? I don't use phonegap build myself. its very easy to patch https://github.com/arnesson/cordova-plugin-firebase/blob/master/scripts/after_prepare.js to look in www as well |
@robertarnesson |
I'll try to work on it in the next days. I'll have a look at the code then On Thu, Aug 25, 2016, 19:30 maplerichie notifications@github.com wrote:
|
@maplerichie PGB is not supported at this point. See my earlier reply for what is needed. Once this issue is fixed it should work by putting the config files in www instead of root |
made an attempt to fix this, see 806af2b you can test this by installing from github master instead of version X |
@robertarnesson, thanks for your attempt. |
@AjawadMahmoud you still put the files in the www folder. During prepare cordova copies the files in www to each platform folder. Our hook is triggered after prepare so the files will be available there. This way using merges is also supported which might come in handy for some users |
Alright, I missed this point. Let me give it a try with a proof-of-concept On Sun, Aug 28, 2016, 20:31 Robert Arnesson notifications@github.com
|
okay. it's not working. |
is the app launching though? if so the config files are where they should be |
So your plugin breaks the app if it doesn't locate the config files? I On Wed, Aug 31, 2016, 18:24 Robert Arnesson notifications@github.com
|
erm no, but the firebase sdk will not work at all if it finds no config file and the app will crash. This is a requirement by Firebase not by the plugin itself. Can you confirm that firebase starts up without errors/warnings about the config files? The device not registering could be just a problem with your app code |
Could be. On Thu, Sep 1, 2016, 06:09 Robert Arnesson notifications@github.com wrote:
|
So, window.FireBasePlugin is available, however when i'm trying to do getInstanceId() i'm being answered back with null in the promise function. |
Great, so the fix worked! You could open another ticket for the issue with getInstanceId, so that we can close this one. getInstanceId will return null if FCM is not connected yet when you make the call. Are you testing ios or android? |
So, if setting a badge number works it means the plugin is able to reach the config files? |
Here's an update on the case. |
actually it seems like hooks are not supported at all in PGB - phonegap/build#425 This means you have to manually make sure the config files are in the right place. The only way I can think of is to fork this plugin and replace the empty config files with your own actual ones (make a private fork ;). If anyone knows a better way, please correct me |
updated the readme w/ info about PGB. Reopen this if you find a better way to make it work |
Well i was forked a branch to FCMPlugin with my own certs and add a tag in config.xml and phonegap build in android but not in ios |
Hello,,
It seems there's no way to include the Firebase config files in the root directory of a Phonegap Build package as this kind of package is usually just the www folder.
Can the plugin be modified to locate the config files either in the root dir or the www dir?
The text was updated successfully, but these errors were encountered: