[CleverTap]Campaigns doubts about the products and OS - clevertap

^_^! Hi all,
In my cleverTap account, there are two products {Product A, Test Product A, Product B, Test Product B}.
And iOS and Android are supported for them.
Now, I create a campaign in Product A, chose iOS and Android in {WHAT do you want to send?}, then let it run.
But, In Product B and iOS platform, I received this notification, is the result is expected, and why?
In my opinion, I created it in Product A, it can be received in Product A not Product B.
Thank you in advance.

There are two types of campaigns in CleverTap. Scheduled and triggered.
If its a scheduled campaign the last active device will receive the notification.
If last active device was iOS, it will receive the push notification.

For triggered campaign, the the notification will go to the triggering device.
If the campaign is created on the triggering event “Product A”, then the device performing the triggering event will receive the push notification.

Related

Send and Receive remote events in iOS

I am working on a iOS app for food delivery service. And I want to send events from shopkeeper end to customer end and vice-versa.
My app is an iOS app. It is running on iPad 3 at shop end and a user can use iPhone for placing the order. So what is the appropriate method for communication and listening events? For example:
Customer performs a food request. Shopkeeper should be notified immediately.
When shopkeeper accepts it, an acknowledgment should be sent customer side.
Thanks

iOS Push Notification concept

I am fairly new to iOS development and wanted to know if my concept of how to set up and use push notifications on iOS.
So my general idea is that on each time the iOS app is opened (following Apple's guidelines) to register for push notifications and then handle the did register and failed to register methods. In the did register for push notifications I would post to my webserver the device id which I would store in the database with a last connected date.
The logic on the webserver side would be to update the existing record if the device id already exists to update the last connected date (there will be a cron job that purges device ids where they haven't been connected in the last 3 months say).
So once I have the device ids that are fairly current then I can iterate through these device ids when sending the push notifications, this way I won't be sending unnecessary pushes to devices that may not have the app installed any more.
Does this concept sound correct?
This should let you understand.

CKSubscription not working if record owner is self

If I create a CKRecord using CKDatabase.saveRecord, no CKSubscription notification is triggered when that record is inserted by myself. Apparently I only get notifications if somebody else inserted a record, but I'd like to uniformly receive notifications, regardless if the record was created by me or somebody else.
Also I didn't find a mention about this behavior in the docs.
I tried for ages to receive notifications after creating the record on the same device, but it only finally worked if i created an artificial record in the dashboard.
Is there a flag to change this behavior?
You only receive subscription notifications for records created, deleted or modified off the device. If you insert/change/delete a record on your device you need to handle this directly.
From the Cloud Kit Quick Start guide (emphasis added)
Test Subscriptions
You can initially test subscriptions by running your app through Xcode and using CloudKit Dashboard to create, modify, or delete records, as described in Add, Modify, and Delete Records. Then fully test subscriptions by running your app on multiple devices. Use one device to make changes and another device to receive the subscription notifications. You use multiple devices because a notification isn’t sent to the same device that originated the notification

Local Notifications creations in chatting application when app in foreground

How can we create local notification in IOS when app in foreground.I am creating chat app where two persons are chatting while third person interfere then the message which will be sent by third person should be shown in notification like whats app .Can any one please help me ?
First you receive the chat message . Then you determine whether the message received is from the person whom you are currently chatting with or third person. When you have determined that the message received is from third person, you use UILocalNotification class in iOS to create notification. For code help, please post your code too.

Fetching data from server & adding notifications

I am working on an app which fetches student info from a server, like absences and events and grades. I have no access to the server, I only have the API.
I am asked to implement push notifications in the app, such that if a teacher marks a student absent, that student get a notification about that. I searched and found several approaches:
1- Background fetch: I tried using background fetch to check if the student logged in to the app was marked absent today, if yes, show a local notification. It worked when I simulated w background fetch, but never worked on the physical device.
2- I searched for using Apple Push Notification Service, and they all wanted me to build a server, and I dont know how to start. Can I build a server which pushes notifications to devices in a way facebook does it? That is, one user triggers a notification at another user, in other words: I dont want to use broadcast notifications.
3- Using third party, like backendless, firebase or any alternatives. Would that be a useful approach?
With Backendless your app (on the student side) can register itself to receive push notifications. This is done with an API call that registers the device on the servers provided by Backendless. Then you would build an additional application (could be a browser web app or a mobile app) for the teachers. The system allows to send targeted notifications, so when a student is marked as absent, you could use the API to deliver a push notification specifically to the student's device. Would be happy to discuss in detail, you can post your question to the Backendless support forum.
For my app I have designed Push service using Java APNS library.
Or You could use Microsoft Azure Mobile services to push a notifications to devices.

Resources