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

Support fcm tokens for iOS phones as well #768

Merged
merged 4 commits into from
Sep 5, 2020

Conversation

shankari
Copy link
Contributor

@shankari shankari commented Sep 5, 2020

By default, the FCM plugin generates FCM tokens for both android and iOS.
I don't like this on principle because it makes it harder to migrate to a
different push service later.

So we typically configure the app to generate APNS tokens and map on the server
side. But that now requires editing GoogleServices.plist (FCM is the default)
and it is easy to forget to do that.

However, others may also not have this concern, and it does simplify the server
side logic significantly to not have to do the mapping.

So I now support FCM on both platforms, and add a config option to specify
whether we are using APNS or FCM for iOS.

If we are using FCM, we can skip the entire mapping logic

By default, the FCM plugin generates FCM tokens for both android and iOS.
I don't like this on principle because it makes it harder to migrate to a
different push service later.

So we typically configure the app to generate APNS tokens and map on the server
side. But that now requires editing GoogleServices.plist (FCM is the default)
and it is easy to forget to do that.

However, others may also not have this concern, and it does simplify the server
side logic significantly to not have to do the mapping.

So I now support FCM on both platforms, and add a config option to specify
whether we are using APNS or FCM for iOS.

If we are using FCM, we can skip the entire mapping logic
Otherwise the tests fail
I don't know why the test generates this file when we also copy it
from `bin/deploy/push_conf.py` But not going to get into that complexity now.
- Pass in the `apns` token type in one more location
- Add a new test for the FCM token type to ensure that the mapping shortcut works properly
@shankari shankari merged commit 02d23b2 into e-mission:master Sep 5, 2020
@shankari shankari deleted the fix_activity_formatting branch October 26, 2020 18:02
jf87 pushed a commit to jf87/e-mission-server that referenced this pull request Jun 21, 2021
* Support fcm tokens for iOS phones as well

By default, the FCM plugin generates FCM tokens for both android and iOS.
I don't like this on principle because it makes it harder to migrate to a
different push service later.

So we typically configure the app to generate APNS tokens and map on the server
side. But that now requires editing GoogleServices.plist (FCM is the default)
and it is easy to forget to do that.

However, others may also not have this concern, and it does simplify the server
side logic significantly to not have to do the mapping.

So I now support FCM on both platforms, and add a config option to specify
whether we are using APNS or FCM for iOS.

If we are using FCM, we can skip the entire mapping logic

* Fix the default push configuration

Otherwise the tests fail

* Fix the sample push configuration in the tests as well

I don't know why the test generates this file when we also copy it
from `bin/deploy/push_conf.py` But not going to get into that complexity now.

* Add a new test

- Pass in the `apns` token type in one more location
- Add a new test for the FCM token type to ensure that the mapping shortcut works properly
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.

1 participant