I am creating an iOS application and its scenario is:
A user orders something from a vendor. When he places the order, the app asks him to wait. I want the user to know when the vendor accepts/reject the order.
Am I supposed to use push notifications for this purpose or is there any other better approach?
The simple answer is yes. A push notification is the best way to update a user. The advantage of using a push notification is that the user no longer has to be in the app to receive this update. However if they are still in the app you can handle the content in the push notification payload. For example you could show a success message or failure message.
Related
Since push notifications may not be delivered sometimes (you can lose a few of them), you can not run code after the iPhone is turned on to check if there is new information available from the server, and you can not run code if your iOS App is closed... What can you do if you want to be as more accurate as possible in for example a Chat App in iOS?
I mean, inform the user as faster as possible that he has new info available. Comparisons: WhatsApp is updated without any delay.
You can do background fetch if your App is in background. But if the App is closed and you miss a push, it's not going to be up to date until the next push arrives or user opens the App. The same with silent notifications. If the app is terminated by the user, you are not going to receive it. Is there any way to solve it? It must be because other Apps do it... If there is any "private and secret" API that they are using (I read about this answer when no one know how to do that)... Is there any way to apply to use it?
UPDATE:
I'm using push notifications. The goal is to fix when a push doesn't arrive. Example: User A send chat message to user B. User B doesn't have the App open. The system lose the push. User B is not going to receive the message until he open the App.
Push notifications seems to be your only way even if you do loose a few of them, which I don't know how you would since they are pushed to apples secure server... but what do I know. As long as the user turns on the push notifications you should be fine. They may be delayed due to apples way of handling them. Honestly push seems to be the future, having your app constantly every minute or two check for new messages is a huge battery water in conjunction with normal texting apps. Your app should provide the best live data but since apple restricts to push notifications when the app is off or not running just stick to push notifications and only push major events to the user. I believe you can set up a job scheduler using quartz or schedulator to setup your server to push notifications to your app.
We have iOS push notifications configured and running. However, we would like the user to select which categories are interesting to receive and which are not important and would like to omit receiving those notifications.
Is there any way to do this through Apple push notification itself rather than through the server sending the notifications? (We can change the sent JSON). Can the iPhone send which categories it would like to receive and which are not needed by registering them to Apple? Other choice, can we interrupt the push notification before being shown and decide whether it should be shown or not through a delegate? So far, I can't find an available method to do either.
Any help is appreciated
The short answer is not from the client side. If you want a solution that works 100% of the time you will need to do something on a server which only sends the types of push notifications the user subscribes to.
If your App is in background there is no concept of "categories" of PUSH notifications and you have no control over if they show up in the notification center.
You can examine inbound push when the App is in the foreground and decide on the basis of some meta data to display or not, but that is not a 100% solution.
When something happens on the backend, I want to let my users' iPhone app know of this change. (The app is currently open, not in the background...if that makes it any easier).
Should I install Firebase just to achieve this? What are other ways?
Push notifications is just the UI for the user...am I right?
You could use Apple Push Notification Service. If a Push Notification arrives while your app is in the foreground, it gets passed to you directly, rather than triggering a UI event. Last I knew, you can only have 1 notification outstanding at a time, so you should not depend on it for passing content, but just use it as as signal to query your server. With iOS 8 you can use background notifications, that do not require any user permissions.
Best way is to use Push Notification. Because it will save battery power on the device.
You can use the Apple Push Notification Service (APNS) to send push notifications to the user.
You could ask your server frequently about changes or use a blocking function in seperate Thread to handle events.
What kind of events are we talking about?
As Black Frog said, PNS is the easiest and most battery saving idea.
I'm developing new iOS app using Parse.com, which uses to chat between two users. What is my problem is, when User A sends message to User B, it will store in Parse.com custom class object. But I want to know, how the Parse.com let to know the User B about he received message from User A. We can fetch from User B app with some frequent time. But this is not feasible way.
So, Is there any option that parse.com will send message to specific user who received message recently? I don't want to user Push notification for this, because push notification is different concept and also not reliable.
Thanks,
Vijay.
What you are asking for is exactly what Push Notifications are for. Your only other option is polling for changes.
If you find Push Notifications unreliable you would need to implement a combination of push + polling.
There are some other technologies out there, but they're not options with Parse without a lot of middle-ware.
I've read the Apple Push Notification documentation and it seems this isn't possible but was just wondering if there are workarounds etc.
If an application is in the background and a server sends a push notification, if there any way the application can receive an inidcation of that fact independently of the user tapping the action button?
No, that's not possible. The application does not get to know about an incoming push notification unless the user activates it with the action button.
No - but if the app is in the background, you can still use the network if you enable multitasking.
With Apple it's always pretty simple: if something is not possible, there won't be workarounds.