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

FireBase For ios Push #3430

Closed
taylorknopp opened this issue Jan 24, 2017 · 8 comments
Closed

FireBase For ios Push #3430

taylorknopp opened this issue Jan 24, 2017 · 8 comments

Comments

@taylorknopp
Copy link

We are currently using Firebase with parse server to send Push notifications, and it is working fine. The problem we are having is getting APNS to work for IOS Push Notifications. I don't believe our problems are related to a server issue, but none the less it isn't working. My question is, does parse server support using firebase for IOS Push Notifications like it does for Android?

@MartinHerman
Copy link

The real question here is - why would you even need Firebase push, when ParseServer supports notifications on its own.

What is your setup to send push notifications via Parse? Have you checked out this guide?

Maybe post some code and explain what exactly you're trying to accomplish...

@taylorknopp
Copy link
Author

taylorknopp commented Jan 25, 2017

If you look int he guide you just provided me, you can see under step 2 "Configure Parse Server" it asks for API Credentials for both GCM and APNS.
" var server = new ParseServer({
databaseURI: '...',
cloud: '...',
appId: '...',
masterKey: '...',
push: {
android: {
senderId: '...',
apiKey: '...'
},
ios: {
pfx: '/file/path/to/XXX.p12',
passphrase: '', // optional password to your p12/PFX
bundleId: '',
production: false
}
}
});"
Since fire base has replaced GCM we have to use FireBase for Android. Since FireBase Also sais it can send push notifications to IOS devices, and we are having problems getting APNS working I thought maybe it would be possible to define FireBase credentials instead of APNS credentials for parse server. something like this...
" var server = new ParseServer({
databaseURI: '...',
cloud: '...',
appId: '...',
masterKey: '...',
push: {
android: {
senderId: '...',
apiKey: '...'
},
ios: {
senderId: '...',
apiKey: '...'
}
}
});"

@MartinHerman
Copy link

APNS works exactly as described in the wiki I linked above. You have to be more specific about what doesn't work. How are you initialising your ParseServer (the push part specifically)? Have you generated the .p12 files required? How does you iOS app subscribe for push notifications?

Post some of your code and describe the errors.

I have several apps using push notifications, and they work flawlessly - especially in combination with Parse Dashboard.

@taylorknopp
Copy link
Author

taylorknopp commented Jan 27, 2017

As I have said above, I don't think the problems with APNS come from something server side. I don't get any errors on the server. It is client side that is the problem. Our IOS developer is having problems getting his client side app to be able to receive push notifications. But really I'm not here asking about APNS in an issue thread on the server which I have stated, I don't think is the issue. All I'm asking is whether it is possible to substitute FireBase for APNS as the push service for parse IOS push notifications.

@emkman
Copy link

emkman commented Feb 4, 2017

@taylorknopp you can absolutely replace APNS with FireBase for iOS push. You just need a Push Adapter that knows how to speak to the Firebase API. Parse will provide you with the relevant device tokens and payload and you just need to send them to Firebase.

Here is an example adapter that sends Parse pushes to the OneSignal push service via their HTTP API: https://github.com/parse-server-modules/parse-server-onesignal-push-adapter/blob/master/src/OneSignalPushAdapter.js
The patterns would be almost identical for FCM. Here are the FCM HTTP docs: https://firebase.google.com/docs/cloud-messaging/server#implementing-http-connection-server-protocol
and here are some FCM npm modules if you aren't comfortable doing the HTTP calls yourself:
https://www.npmjs.com/package/fcm-push
https://www.npmjs.com/package/fcm-node

@flovilmart
Copy link
Contributor

The adapter is already provided actually, it's parse-server-gcm-adapter

@flovilmart
Copy link
Contributor

And it would be possible to make it support iOS push I believe

@hramos
Copy link
Contributor

hramos commented Feb 9, 2017

I am closing this out as we're trying to cut down on the number of non-issues. This will help us focus on the issues that are actively preventing people from migrating their production apps to Parse Server.

If you plan on opening a new issue, can you please add all the info specified in the template?

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

5 participants