This repository has been archived by the owner on Sep 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
'senderID’ does not exist in type ‘AndroidPushOptions’ #1998
Labels
Comments
@Boredude you'll have to open an issue with Ionic as that is an error coming from their wrapper. |
just remove the senderID from the the android json like the link below and it will work fine. you already have that in the config xml
<plugin name="phonegap-plugin-push" spec="^1.10.5">
<variable name="SENDER_ID" value="911xxxxxxxx" />
</plugin> |
The same process i am doing that but i am getting error while running on android device. that's No Value For senderID. please help me. |
@BajajSaajan and @Boredude change your options to a any object instead of a PushOptions like the follow snippet: const options: any = {
android: {
senderID: "",
sound: false,
icon: 'notification',
clearBadge: true
},
ios: {
alert: 'true',
badge: true,
sound: 'false',
clearBadge: true
},
windows: {}
}; It's a trick but will work... |
@mattheuspirovani Thank you so much :) |
@mattheuspirovani it do the trick senderID already have that in the config xml |
Thankkkksssssss a lot |
This thread has been automatically locked. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm trying to build my project for Ios and I get the following error
Type '{ android: { senderID: string; icon: string; iconColor: string; sound: true; }; ios: { alert: "tr...' is not assignable to type 'PushOptions'. Types of property 'android' are incompatible. Type '{ senderID: string; icon: string; iconColor: string; sound: true; }' is not assignable to type 'AndroidPushOptions'. Object literal may only specify known properties, and 'senderID' does not exist in type 'AndroidPushOptions'.
The exact same code gives no error when I use it on my windows machine and run it on android device.
Please help
Expected Behaviour
Build transpiles
Actual Behaviour
Error recieved on IOS platform
Reproduce Scenario (including but not limited to)
Steps to Reproduce
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
android ~6.2.2
blackberry10 ~3.8.0 (deprecated)
browser ~4.1.0
ios ~4.4.0
osx ~4.0.1
webos ~3.7.0
cocoaPods version is 1.3.1
(Android) What device vendor (e.g. Samsung, HTC, Sony...)
Cordova CLI version and cordova platform version
Plugin version
Sample Push Data Payload
Sample Code that illustrates the problem
Logs taken while reproducing problem
The text was updated successfully, but these errors were encountered: