Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

Unable to install plugin on both iOS/Android #693

Closed
dilipsarkar opened this issue Mar 11, 2016 · 5 comments
Closed

Unable to install plugin on both iOS/Android #693

dilipsarkar opened this issue Mar 11, 2016 · 5 comments
Labels

Comments

@dilipsarkar
Copy link

I was trying to verify the fix for issue#688 but I'm unable to installed the plugin. I get the below error on both iOS and Android.

cordova plugin add CustomPlugins\phonegap-plugin-push-master
Error: Variable(s) missing (use: --variable SENDER_ID=value).

I'm using cordova 5.4.1. Please help.

@jakub-g
Copy link
Contributor

jakub-g commented Mar 11, 2016

See #689 (comment)

when you install from command line, pass --variable SENDER_ID=1234 as required. If you use Android and GCM, you already know sender id (and you already pass it in android config when registering the plugin). Otherwise put a fake value.

@dilipsarkar
Copy link
Author

Thanks for your quick response.

Just a clarification, does this mean we don't have to specify senderIDfor android while invoking PushNotification.init() API ?

var push = PushNotification.init({
    android: {
      senderID: "12345679
    },
    ios: {
        alert: "true",
        badge: "true",
        sound: "true"
    },
    windows: {}
});

@jakub-g
Copy link
Contributor

jakub-g commented Mar 11, 2016

in 1.6 you have to do it in both places, in 2.0 only in package.json

@dilipsarkar
Copy link
Author

Great, thanks

cmprescott pushed a commit to cmprescott/phonegap-plugin-push that referenced this issue Mar 16, 2016
- Move the preference to just Android Platform.It is not used for iOS. I suspect this resolves phonegap#693
- Add SENDER_ID to AndroidManifest. This exposes the value to the Android code. While 6 years old, http://blog.iangclifton.com/2010/10/08/using-meta-data-in-an-androidmanifest/ describes the exact use case we are trying accomplish.
cmprescott pushed a commit to cmprescott/phonegap-plugin-push that referenced this issue Mar 16, 2016
- Move the preference to just Android Platform.It is not used for iOS. I suspect this resolves phonegap#693
- Add SENDER_ID to AndroidManifest. This exposes the value to the Android code. While 6 years old, http://blog.iangclifton.com/2010/10/08/using-meta-data-in-an-androidmanifest/ describes the exact use case we are trying accomplish.
cmprescott pushed a commit to cmprescott/phonegap-plugin-push that referenced this issue Mar 22, 2016
- Move the preference to just Android Platform. It is not used for iOS.
- Add SENDER_ID to AndroidManifest. This exposes the value to the Android code. While 6 years old, http://blog.iangclifton.com/2010/10/08/using-meta-data-in-an-androidmanifest/ describes the exact use case we are trying accomplish.
@lock
Copy link

lock bot commented Jun 5, 2018

This thread has been automatically locked.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

3 participants