Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Database Missing for push

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

Bruce Stuart
Posts: 0
Joined: Fri Oct 24, 2014 4:42 am

Database Missing for push

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

Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Database Missing for push

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?

Bruce Stuart
Posts: 0
Joined: Fri Oct 24, 2014 4:42 am

Database Missing for push

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

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Database Missing for push

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

Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Database Missing for push

Thanks for your help guys.

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

Return to “Issues”