How to send notification from other devices to iOS specific app? - ios

I'm working a feature which will observe the notification from a server and then do some actions. But the notification won't send immediately when I did some changes in the server. So I want to find a way that can send notification or command from other devices or pc to iOS app to test function immediately?

You can use Easy APN Provider for testing your push notifications.

Related

Push Notifications without APNS

I work perfectly with Push Notifications for iOS using APNS. So for some customers, I need an on-premise or local solution, where I could send notifications to the device without APNS and without dependence on the internet. Somebody knows? can you help me?
Not possible. You cannot get notification from APNS without internet.
What you can do to accomplish this is you send message from your server to the app while it is in background mode and generate local notification accordingly.
Let me clarify your question.
"Locally" means: you got either no internet connection, a local network without connection to APNS OR the users simply did not register for push notifications.
1. iBeacon with Local Push Notification
So, here is an alternative, and that's kind of NOT what it is basically used for, but as you may know. iBeacons can be used to transport small data chunks, very very small ones. If your users did enable location services, you could include these for your application to trigger certain events (in this case, a very small notification that users came into range of a point of interest).
Downside: The application bundle requires either a static "notification text" to beacon mapping or you have to dynamically download the mapping from a web source, so you could update the notification's text.
2. Bluetooth with Local Push Notification
Another alternative would be to use bluetooth instead.
Devices could auto connect to your Bluetooth Station "Peripheral" - These devices now (with the help of your app) would register to a broadcasting characteristic of your Peripheral.
The peripheral could send messages to the registered devices.
If now the device does receive such a broadcasted message, you could perform a local push. - Without any network connection, just with the help of bluetooth, which itself also requires user permissions, of course.
3. Internet Connection / Silent Push with Local Push Notification
If your application of course had a working internet connection, you could avoid the APNS from Apple and send your own notifications to the device as silent push notifications.
As of iOS 14 this is available through Local Push Connectivity, but you will require the App Push Provider entitlement that you must apply for specifying why you are unable to use APNS.
Apple sample code is available here.
APNS works only with internet. If you need to push a message to the user without internet one solution (probably only solution currently) is using SMS api. But that requires user mobile number. Using URL Schema the user can open your app from the SMS message.

Sending push notifications directly to watchOS 2?

On iOS, we can register for push notifications using the registerForRemoteNotifications method on UIApplication.
I want to create a watchOS 2 app that will work even if my watch is not connected to my phone (but is connected to Wi-Fi). I would like to send push notifications from a server to the watch directly. Is there a way to do this?
If so, what are the equivalent of these methods in a watchOS 2 extension?
application.registerForRemoteNotifications
application(:, didRegisterForRemoteNotificationsWithDeviceToken:)
application(:, didFailToRegisterForRemoteNotificationsWithError:)
application(:, didReceiveRemoteNotification:)
If not, what are my other options?
Currently there is no way to directly get notification from server on watch. As mentioned in Notification Essentials for watch
Apple Watch displays local and remote notifications only if the
containing iOS supports them. For information about how to support
local and remote notifications in your iOS app, see Local and Remote
Notification Programming Guide.
This also mentioned that
When one of your app’s local or remote notifications arrives on the
user’s iPhone, iOS decides whether to display that notification on the
iPhone or on the Apple Watch
Now there are some scenrio in this, if your phone is active and notification arrives, it will be received on phone. but if phone is locked and watch is active and then notification arrived it will be displayed on watch.
It is also mentioned in Apple Push Notification Service Doc that
Apple Push Notification service (APNs) is the centerpiece of the
remote notifications feature. It is a robust and highly efficient
service for propagating information to iOS (and, indirectly, watchOS),
tvOS, and OS X devices.

Swift iOS: Silent push, triggers app to make sound and vibration?

I am trying to make an app where you could send a warning to other users which then will trigger an alarm on the receivers phone.
So my plan is to send a silent warning to the receiver, which then triggers sounds and vibrations on the receivers phone from the app.
So basically my question is, is it possible to open an app on a phone through a silent push?
This is done with push notifications in iOS. See Apple's description.
Apps must be configured appropriately before they can receive local or remote notifications. The configuration process differs slightly on iOS and OS X, but the basic principles are the same. At launch time, your app registers to receive notifications and works with the system to configure that notification support. Once registration is complete, you can start creating notifications for delivery to your app. Your app then handles these incoming notifications and provides an appropriate response.
But note that it is up to the receiving user to determine how he wants to be alerted.

How to sync push notification between devices

I have a small question about push notification sync between devices.
For instance, I'm building an iOS and an OSX app.
Both of them support push notifications and I send notifications to both devices at the same time.
Is it possible to "hide/dismiss" the push notification (or change badge) on an OSX device if I opened a push notification on my iOS device?
Like iMessages does.
I can't find any Apple API or third party service that does somthing like that.
Thanks for your help.
Does your app communicating with any server? If yes you can send information like "user-saw-content" to the server then send another push notification to cancel others notifcations if necessary.

IOS MDM Pushnotication issue

Hi my team is implementing IOS MDM. We have Enterprise license. We are able to send payloads and commands to the iOS device.We are receving result from IOS Device.But while send the push notification it is not performing any thing. Even in IPCU log also no issues are showing.
We are using JavaPNS for sending push notification.Almost every thing we implemented in IOS MDM except push notification.
But when i install IOS application and sending push notification using JavaPNS it is showing push notification.
1) is it possible to send push notification for IOS MDM services ?.
2)Can we send push notifications without installing IOS application on the IOS device.
Any advice would be appreciated.
We are able to send payloads and commands to the iOS device.We are
receving result from IOS Device.
How do you send payloads and commands to iOS device? Are you sending them through MDM?
If so, the only way to let device get new commands, profiles from a server is to send "wake up" oush notification through APNS.
But while send the push notification it is not performing any thing.
That's where I got confused. In the case, if it doesn't do anything, device will never contact back a server and it will never receive commands. However, you said that it does.
But when i install IOS application and sending push notification using JavaPNS it is showing push >notification.
I believe this is your problem - confusion with terminology.
MDM protocol doesn't require any iOS application to be installed. iOS operation system has mdm agent built in. As soon as you configured MDM (installed MDM payload) and a device received "wake up" push notification (through APNS) then MDM agent will contact your server and request new commands.
On other hand, you can create some application (which has nothing to do with MDM) and send push notification to it.
The only common thing between this and MDM is push notification transport. However, the push notification message which is send for MDM purposes ("wake-up" message) and to applications ("badges", "sounds" , 'messages") are different.
Please, can you review your question and try to separate out what works and what doesn't.

Resources