Apple Push Notification Service which ios version it is supported from? - ios

I m not sure where to find which ios Version starts supporting Apple Push Notification Service? Or it does not matter ?

For what it’s worth, the various related symbols like UIRemoteNotificationTypeAlert appeared in iOS 3. In other words, the support is so old it does not really matter today.

The Apple Push Notification Service is a service created by Apple Inc. that was launched together with iOS 3.0
Refer Apple Doc
Please refer this link:
http://en.wikipedia.org/wiki/Apple_Push_Notification_Service

There are different versions for different use cases. For example if you want a custom notification, you should use notification extensions.
- UNNotificationContentExtension
iOS 10.0+
- UNNotificationServiceExtension
iOS 10.0+
macOS 10.14+
If you want to have a simple default notification, all you need is a simple implementation in code without importing anything.
- Apple Push Notification Service (aka 'APS' and 'APNS')
iOS 3.0+

Related

Sending Push Notifications to iOS from PWA

I've got a Progressive Web App which made with Blazor WebAssembly and I was wondering if I can send push notifications to iOS devices? Although people said if works now on Safari on MacOS, Push API's website says that it does not support Safari on iOS.
Do I need to wrap every web app if I target iOS? I don't have a MacBook, do I need to buy one just to achieve this?
Also there are Firebase and Azure Notification Hub, Can't I just use their service to send notifications for iOS? Firebase's had only Objective-C and Swift examples.
This also led to another question: Are notifications' way of transport is platform depended? I'm confused with cloud services' role on this.
You have only three main options to get push notifications working on iOS for a PWA. In both cases, you must register an App ID on Apple Developer portal, with permission to the appropriate service. For Option 1, your registered App ID must have permission to Apple Wallet. For options 2 and 3, you must have permission to Push Notifications. In both cases, you should record your Bundle ID and Team ID in case you need it later.
Option 1 (Easier): Use PassKit to set up a generic Apple Wallet pass, which can broker notifications that are very similar to native ones. Here's some documentation, and here's a working demo of how this can send push notifications to registered devices.
Option 2 (Harder): Use Firebase Cloud Messaging or a package like Node-APN to send push notifications the "proper" way, signed with a P12 or P8 key from the Apple Developer Portal. This gets tricky mainly because you need the iOS device identifier, which is only exposed to applications installed natively. I'm afraid I don't have an answer on how to get this device ID from within a PWA, and without it, this method doesn't work.
Option 3 (not a PWA): You can use an App ID with a provisioning profile and either a P12 or P8 key, similar to the previous option, but you wrap your application in Apache Cordova, and distribute it (either through the public app store, or using MDM software and via the private Apple Business Manager).
Those are your options. I have exhausted every possible avenue researching this, and I am confident that these will remain your only options through at least the next several months. It's possible we may see further support for Web Push or perhaps just a way to get the device ID from the web in the future, but until that time, this is it. There aren't any other ways to go about this presently.
Source: I architect and develop apps for major brands like Subway, Gartner, Morgan Stanley and PwC (among many others). My research is very recent, and includes direct communication with the head of WebKit at Apple, and also with one of the world's foremost PWA and iOS experts.
I just want to let you all know: Apple will support push notifications for web apps! This news was published at the WWDC2022. Apple will release Web Push with Safari 16 on macOS (Ventura) in a few months (2022) and for iOS and iPadOS in 2023.
See: https://webkit.org/blog/12945/meet-web-push/
I have a workaround to propose. If the PWA can send messages to a server and store them in the db, the watch app can always pull from the same server and display information. This is not the desirable solution, but my work.

iOS 10 push notification authorization request showing up on app launch

Previously, when building my app using the iOS 9 SDK, the push notification authorization request alert (that system alert which says: "App" Would Like to Send You Notifications ... Don't Allow / Allow) would only show when I called [[UIApplication sharedApplication] registerForRemoteNotifications].
We've decided to actually only do that at a certain point in the game, so the user is only encouraged to allow push notifications when it makes sense.
On iOS 10, I understand we must use the User Notifications framework to accomplish that (by calling requestAuthorizationWithOptions:completionHandler: on [UNUserNotificationCenter currentNotificationCenter]), enable Push Notification on the app Capabilities and setup the entitlements. And that does work on some devices, but not all of them.
On some devices, the authorization request is presented to the user right at app launch even though I did not call requestAuthorizationWithOptions:completionHandler: or registerForRemoteNotifications at any point yet.
The weirdest part is that this happens consistently on some devices (running iOS 10.1.1 or 10.2 beta), even if I install the AppStore version of the app (which was built using Xcode 7 and iOS 9 SDK).
Should I assume this is a bug of iOS 10? I couldn't find other people with the same issue, only a kinda similar issue here.
The issue is actually a change from iOS 9 to iOS 10 on Game Center's [GKLocalPlayer localPlayer].authenticateHandler.
When it is set, it will trigger a push notification permission request on iOS 10. This did not happen on iOS 9.
For anyone stumbling upon this and not finding the above answer to have been the cause of their problem, it should be noted that attempting to change the app badge will also result in a Push Notification request.
My personal situation was regarding a Cordova app, where I was loading and applying the badge plugin before initialising push, and couldn't work out why the Notification permission dialog was appearing on app launch.

Apple Push Notification Development in Objective-C

I am new in IOS developing. I created an uiwebview app in Objective-C. It is successfully tested on IOS Simulator.
Now I would like to implement the push functionality.I have surfed the internet.
But I have not found any proper post related to this topic in Objective-C.
Please help.
You could checkout OneSignal it's free push notification service, as probably you don't have a push notification server, OneSignal will be really useful for you.
Here is a documentation link to learn how to implement it

Push Notification In IOS8

Does Apple has introduced any real time fast instant push notification in iOS recently which will improve user experience for the app? Please suggest some answers as I am going to use Push Notification in my app?
You should take a look at using Parse.
There's a link to the push notification documentation here.
It's pretty straightforward to get working, and the documentation provides support for both Objective C and Swift. Hope this helps!

How to trigger notifications using WatchKit

In the WatchKit developer guide, there are instructions on how to render custom notifications and it also says:
Apps are not required to do anything to support notifications. The system provides a default notification interface that displays the alert message from the notification. However, apps can customize the notification interface and include custom graphics, content, and branding.
I can get local notifications to trigger banner alerts on the phone, but they don't happen on the WatchKit app. I have tried debugging using all of the targets:
iOS app
Watch app
Watch Glance
Watch custom notification
Even while the phone app is in the background, none seem to trigger when the local notification is received. I have also tried this by simulating a remote notification being received in the background.
I'm hoping I don't have to call the watchKit's controller local/remote notification handlers directly.
I'm hoping I don't have to call the watchKit's controller local/remote notification handlers directly.
No, you don't.
The answer is XCode doesn't support debugging Apple Watch and iPhone simultaneously for now. That's why you can't push a notification from iPhone simulator to Watch simulator, only payload test by *.apns files is supported for now.
Its explained in Notification Essentials that
iOS decides whether to display that notification on the iPhone or on Apple Watch .
So I dont think(as of now) there is anything that can be done from the app to trigger Notifications specifically in the watch.
Edit: It looks like theres a bug in 8.2 beta.
WatchKit Known Issues
When viewing a notification in iOS simulator, clicking on the notification icon or body does not launch the corresponding Watch app
Release notes
In order to test watch notifications, you must first create a new build scheme.
Duplicate your watch app scheme, and in the "Run" section, choose your custom notification as the executable.
Now you can run the notification scheme.
Inside the extensions group in your project, under Supporting Files is a file called PushNotificationPayload.json.
You can edit the payload file to try different notifications and categories.
Source
I only had two targets when I created the projects:
[app name]
[app name] Watch App
Editing the Watch App scheme allows me to select another executable -- notably there's the Glance and Notification options there, and they work for me. Just select it, close, and run. I haven't tried duplicating the targets/schemes so I don't have to edit them, but I don't think that would be an issue.
Edit: Actually, the SDK tells you to edit the scheme too.

Resources