pwblaine / buriedios

buried. iOS Client
Apache License 2.0
0 stars 0 forks source link

push notifications #17

Closed pwblaine closed 10 years ago

pwblaine commented 10 years ago

push notifications should be called 1) when a capsule is buried for you 2) when a capsule is unearthed for you (increment badge)

pwblaine commented 10 years ago

currently the certificate was generated to mitchsolomon788@gmail.com, the .p12 file was successfully uploaded with Parse.com, however the initial push to the 2 listed installations yielded no results: https://parse.com/apps/buried/push_notifications/1759484048#details

further investigation of the Installation IDs showed that they were bound to User objects that no longer exist, and none of the new installations are registering ID's.

manually adjusting the attached User objects had no affect.

pwblaine commented 10 years ago

As of commit https://github.com/pwblaine/buriedios/commit/3821ab7ab9568a4d1fecdaaadd5d0a1d5481b1f2 :

Added in Push notification registration code upon successful registration the installation information is saved to Parse

TODO figure out whether to push from clients or cloud code when someone buries a capsule for you and when a capsule for you unearths, when a capsule unearths, increment the badge, when the capsule is read decrement the badge.

pwblaine commented 10 years ago

with commit as of commit https://github.com/pwblaine/buriedcc/commit/703340c91002c2c08528526daf773c8815f6fda3 for buriedcc and commit https://github.com/pwblaine/buriedios/commit/be97724cec900c7c73833dbf91d74fba23279bab for buriedios

email delivery has been removed, all notifications now happen through pushes sent by cloud code.

push happens when someone buries a capsule for you, or when a capsule unearths:

TODO the only piece of the puzzle left is to handle push notifications when the app is already open, and what happens when a push is tapped.

pwblaine commented 10 years ago

Example of an app handling code for receiving a push when the app is already open:

pwblaine commented 10 years ago

As of commit https://github.com/pwblaine/buriedios/commit/1497e417722a63f952db3c47fa12af3193192577 push notifications are fully implemented, refresh data automatically if the app is open, and open to specific capsules when tapped.