Hello guys,
I’m facing the following problem. I am working on a cross-plattform mobile app with Parse Server as backend. The client side is scripted in TypeScript and assembled using Ionic and Capacitor into two different mobile apps: one for Android and one for iOS. The login is realized directly in TypeScript code using Parse JavaScript SDK this way: await CustomUser.logIn(email, password). So far everything is good.
Some weeks ago I’ve decided to implement push notifications for both mobile apps. Therefore I had to integrate Parse SDK for Objective-C and Android into the mobile apps built with Ionic and Capacitor. The initialization of Parse works on both platforms and I was also able to verify that push notifications are arriving on both, iOS and Android. Mind: I’m using the latest versions of all three client SDK’s (JavaScript, Android, Objective-C).
But here the trouble begins: As I started to implement a cloud function to be able to target specific devices for push notifications I have noticed that the installation id’s in Session and Installation tables are completely different. Due to this mismatch I am not able to query which devices (Table Installation) belong to which user (Table User).
I suppose the reason of this mismatch is the fact I initialize Parse at two places: The TypeScript code containing the (cross-plattform) business logic of the mobile app and the native Objective-C/Android code used to enable push notifications on both platforms. So I suggest the installation id’s are generated at two different places independent from each other.
Please confirm my suggestion and - if possible - give me a hint how to resolve this issue. I have already thought about adding an additional User column to Installation table, but rejected this approach because a) an Installation must not always be connected to a user and b) I suppose it is just a matter of time I will get another problem due to the actual implementation design where Parse initialization is situated at two places.
Thanks in advance and best regards
Valdes