Page 1 of 1

Database Missing for push

Posted: Wed Feb 07, 2018 3:33 pm
by Deon

I am trying to use an existing database for push messaging but the database does not appear in the list of databases when I try to select the database from the database dropdownlist in the push settings for the application.

I have another application using the same database for push messaging and that is working fine.
Thanks


Database Missing for push

Posted: Wed Feb 07, 2018 10:17 pm
by Bruce Stuart

Deon,

In Appery - once an app is tied to a database and it's notification related data (**the devices table) in Appery - it can't be tied to another App.

Appery manages the user devices that are connected to the App in the same DB that users are managed from for the App - thus the restriction. (** the tokens are generated by an App specific push notification call - and it's difficult to manage in a canned way - this relationship across multiple apps and multiple databases - so Appery does not).

If you want to use the same DB for notifications that another app is using you can:

  1. Manage the devices in the 'other' database 'manually' using functions in the push notification plugin - and get device UUID's and tokens for the devices and add/update/delete them to the devices table in the DB manually - however - that's likely a layer of complexity you don't want to deal with - but it can be done (we've done it where it was a requirement to do so).

  2. You can send all of your notifications from server side scripts using the shared key.

    Using these two approaches - you can 'defeat' the limitations - but not a task you would take on lightly or perhaps without some additional assistance.

    Best,

    Bruce


Database Missing for push

Posted: Thu Feb 08, 2018 4:50 am
by Deon

Hi Bruce

Thank you for the info. Yeah I suspected that for push 1 app 1 db.

This is a huge limitation when you have various apps in an eco system already working of a single database.

Just wondering if there is a way to manually register a device in another database?


Database Missing for push

Posted: Thu Feb 08, 2018 7:21 am
by Bruce Stuart

Hi Deon,

Yes - you can register a device in the device table for another database.

You do that at startup by adding / Modifying / updating the device table with the token assigned to it by Apple or Google when the push plugin inits on the device.

If you’re interested I lilelynhave some code that I have moth balled that does this ... from when i found one of the push plugins not working correctly on IOS 11 ... let me know ...

Best,
Bruce


Database Missing for push

Posted: Thu Feb 08, 2018 10:17 am
by Serhii Kulibaba

Hello Deon,

Bruce is right, there is a limitation 1 DB per one application for Push Notifications. It was done because of security restrictions to have the unique pair deviceID/applicationID

You can connect another database to the app to keep there additional information about the user and use the database in Push Notifications only to keep devices there


Database Missing for push

Posted: Thu Feb 08, 2018 2:42 pm
by Deon

Thanks for your help guys.

I presume, I just create a service that posts to the device id to the new db?