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

Added wrapper for the Cordova OneSignal Plugin #252

Merged
merged 5 commits into from
Jul 7, 2016
Merged

Added wrapper for the Cordova OneSignal Plugin #252

merged 5 commits into from
Jul 7, 2016

Conversation

aaronczichon
Copy link
Contributor

The OneSignal service is a provider for cloud messaging and push notifications. It has an official phonegap/cordova plugin but currently no Typescript support.

So I created a Ionic Native wrapper for this plugin with this PR.

OneSignal Website
OneSignal Cordova Documentation

options: {
googleProjectNumber: string,
autoRegister: boolean
}, object?: any): void { }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this function should be:

@Cordova()
static init(appId: string, options: { ... }): Promise<any> {return; }

So just take out object?: any and set the return type to a promise, and add a return; to avoid any TypeScript errors.

The @Cordova() decorator would generate that promise, and attach the resolve to the third paramter automatically.

@ihadeed
Copy link
Collaborator

ihadeed commented Jul 1, 2016

Hey there,

Great work, thanks for submitting the PR!

It just needs some simple fixes, see the comments I left on the code.

@aaronczichon
Copy link
Contributor Author

Thanks for the feedback. Fixes are now commited :)

@ihadeed
Copy link
Collaborator

ihadeed commented Jul 7, 2016

Perfect! Thanks @Inoverse

@ihadeed ihadeed merged commit ba20dbe into danielsogl:master Jul 7, 2016
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

Successfully merging this pull request may close these issues.

None yet

2 participants