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

Function Missing in OneSignal plugin #2909

Closed
onlyanup opened this issue Jan 31, 2019 · 6 comments
Closed

Function Missing in OneSignal plugin #2909

onlyanup opened this issue Jan 31, 2019 · 6 comments

Comments

@onlyanup
Copy link
Contributor

onlyanup commented Jan 31, 2019

I'm submitting a ...
[x] bug report
[ ] feature request
[ ] support request

Current behavior:
Getting error Property 'setExternalUserId' does not exist on type 'OneSignal' while using the function described in the Cordova SDK Document.

Expected behavior:
The function should exist.

Steps to reproduce:
Create an Ionic 4 starter project and install OneSignal plugin
Initialize the plugin and try to register user id

Related code:

export class AppComponent {
constructor(oneSignal: OneSignal) {
   oneSignal.setExternalUserId(userId);
}

Other information:
OneSignal-Cordova-SDK has added 2 new functions in release 2.4.6:

setExternalUserId(string)
removeExternalUserId

These functions implementations are missing from the latest version of "@ionic-native/onesignal": "^5.0.0" package

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):


Ionic:

   ionic (Ionic CLI)             : 4.10.0 (C:\Users\Anup\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework               : @ionic/angular 4.0.0
   @angular-devkit/build-angular : 0.12.3
   @angular-devkit/schematics    : 7.2.3
   @angular/cli                  : 7.2.3
   @ionic/angular-toolkit        : 1.2.3

Cordova:

   cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
   Cordova Platforms     : android 7.1.4
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.3.1, (and 9 other plugins)

System:

   NodeJS : v8.11.4 (C:\Program Files\nodejs\node.exe)
   npm    : 5.6.0
   OS     : Windows 10
@zamtime
Copy link

zamtime commented Feb 10, 2019

Did you find a solution for this? I need these methods as well...

@onlyanup
Copy link
Contributor Author

No, I have not found it yet. But looks like the developers are not even looking at it. Will find a workaround and let you know soon.

@danielsogl
Copy link
Owner

We have not enough time to maintain the hundreds plugins inside the ionic-native repo. This repos need the help of the community. Fell free to open an PR adding the missing functions

onlyanup added a commit to onlyanup/ionic-native that referenced this issue Jun 1, 2019
The functions were missing, Please refer to the issue danielsogl#2909 
danielsogl#2909
danielsogl pushed a commit that referenced this issue Jun 3, 2019
…serId" functions (#3049)

* Adding missing functions to index.ts file

The functions were missing, Please refer to the issue #2909 
#2909

* Updated comments

Updated comments which were failing tslint test

* removed trailing whitespace

removed trailing whitespace
@onlyanup
Copy link
Contributor Author

onlyanup commented Jun 3, 2019

Since the feature is released here, I'm closing this issue.

@onlyanup onlyanup closed this as completed Jun 3, 2019
@nacho004
Copy link

nacho004 commented Aug 7, 2019

@onlyanup can you please add the methods to version 4 of @ionic-native/onesignal ?

@onlyanup
Copy link
Contributor Author

onlyanup commented Aug 7, 2019

This issue is already closed. You can create a new issue if you have any.
@nacho004

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants