Skip to content

Conversation

@gdeglin
Copy link
Contributor

@gdeglin gdeglin commented Feb 14, 2016

This OneSignalPushAdapter builds upon the swappable push adapter functionality built into Parse Server for developers who wish to use OneSignal.

This also fixes incorrect error checking in src/RestWrite.js that prevented Installations from being created for Android devices when a device token is present.

Some wiki modifications will also be required to guide users on how to use and configure OneSignal and other possible push adapters.

@gfosco
Copy link
Contributor

gfosco commented Feb 16, 2016

Cool. 👍

gfosco added a commit that referenced this pull request Feb 16, 2016
Adding OneSignal Push Adapter
@gfosco gfosco merged commit 5145964 into parse-community:master Feb 16, 2016
@tanmays
Copy link

tanmays commented Feb 23, 2016

Any docs on how to actually use this?

Edit:

Incase anyone else is searching this is the way I got it to work. Let me know if its right or there's a better one.

index.js of parse-server-example

var OneSignalPushAdapter = require('parse-server/lib/Adapters/Push/OneSignalPushAdapter');
var pushConfig = {
  oneSignalAppId:"your-one-signal-app-id",
  oneSignalApiKey:"your-one-signal-api-key"
  };
var oneSignalPushAdapter = new OneSignalPushAdapter(pushConfig);

var api = new ParseServer({
   databaseURI: 'xxx',
   cloud: 'xxx',
   appId:'xxx',
   masterKey:  'xxx',
   serverURL: 'xxx',
   push: {
     adapter: oneSignalPushAdapter
    }
});

@drew-gross
Copy link
Contributor

Thanks! We'll add that to the docs.

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.

5 participants