Can my iPhone app register to receive push notifications meant for another app? - ios

This may be a pretty basic question, but here goes. I develop an iPhone app that is a third-party client for a popular webapp. This webapp has it's own iPhone app to which it publishes push notifications. Is it possible for my app to register to receive push notificatons Sent by the webapp and intended for the webapp's native iPhone app? Or is this prevented by certificate magic as I suspect?

Apple allow you to have apps with either a generic app ID in the format:
12345678.*
Or an explicit app ID in the format:
12345678.com.myCompanyName.myAppName
However, they only allow applications with explicit app IDs to register for APN (Apple Push Notification) Service. Therefore it is not possible for more than one specific iPhone app to receive the same notification.
As Farcaller says, this is not a technical limitation but an imposed one.
Hope that helps

From the technical point of view, you can register at another server with device token. You just need to know, where to register and what protocol does it use. Still you wouldn't be able to receive notifications, as they are routed depending on the application id, and you can't mimic that.

Related

Does a Notification Service Extension need any capabilities?

I’m creating an App ID for a Notification Service Extension
Do I need to add any capabilities to it?
Its only purpose is to download the image for the notification. I don’t think I need to.
Currently I'm able to build into my device without enabling any capabilities in Xcode. Although when I look into the provisioning profile that Xcode built itself, I see Keychain Sharing enabled.
I also saw this tutorial and the tutorial goes with enabling 'App Groups'.
While this other tutorial goes with enabling App Groups along with Push notification. I don't think I need App groups because I don't need to pass any values, just updating the notification is all I need.
I didn't find anything in the docs that mentions what's the correct approach. A friend told me he got his to to work without enabling anything, so I'm very confused.
Basically, you don't need any capability for notification service extension.
Several of my applications work without any capability.
One of them use app group. I need to enable it to share the log files of main application, then load it from notification service and push it to server side when receive a silent push.
Few of them need keychain sharing, so that I can get the key to secure communicate with server side from notification service.

How to access content of Apple Push Notification by using MDM?

I'm trying to find a way to access content of all push notifications through notification center.
In other words I want to know what my employees/kids have received from WhatApp and SnapChat etc.
I have done some R&D to see which port of apple receive the message or to see how smart watches access push notification.
Has anyone done something similar or any hint or lead can be greatly appreciated?
In Android there is an API to access notifications but not sure about iOS!!
Ports used by apple:
https://support.apple.com/en-au/HT202944
Ports on APN
https://support.apple.com/en-au/HT203609
Access to push notifications through Bluetooth:
https://developer.apple.com/library/archive/documentation/CoreBluetooth/Reference/AppleNotificationCenterServiceSpecification/Introduction/Introduction.html
I am sorry to inform you that such a system is not possible in iOS . All iOS apps are sanboxed and data of one app cannot be read by another. Thats the reason you cant find any apps to read OTP password form message except the native keyboard app.
Apple will not allow any apps/service even in future as Apple devices are designed for more security and privacy. It violated basic privacy of end user and it should not be done.
Having said that , you can always control installing of apps / removing app remotely etc through MDM . You can take more control of your employees devices through a MDM software .

Will an iOS app that only opens a UIWebView and uses push notification get rejected from apple?

I am developing an application that does exactly 2 things.
1) Opens a UIWebView
2) Uses push notification
I am opening a UIWebView where i load an external URL , and there the user can subscribe to various kinds of events. After he subscribes he can get push notifications about them.
I am asking because some people told me that their apps got rejected when they were just loading an external URL , because apple said it could better be a web page and not an iOS app.
But in my case where i use push notifications? Does it count differently?
The reason why WebView only apps are beeng rejected is because they dont use any of the features that the framework is offering. I got in an application that had only one view for log in, and after log in, the response was URL from server that I was showing in WebView.
You will never know unless you try, but I think it will get in.
I have successfully submitted 3 apps which are all WebViews but with Push Notification functionality. As long as you have Push Notifications in your app you will meet the guidelines of having framework dependant features in your app rather than just being a simple WebView in a mobile app.
"Your app did not include iOS features. App Store apps should use native iOS buttons and include iOS features other than just web views, push notifications, or sharing."
source: Apple rejecting Ionic apps, date: Jan, 2019
“Your app provides a limited user experience as it is not sufficiently different from a mobile browsing experience. Specifically, we notice that most of the app content links out to Safari. As such, the experience it provides is similar to the general experience of using Safari. Including iOS features such as push notifications, Core Location, and sharing do not provide a robust enough experience to be appropriate for the App Store. … the App Store does not accept or distribute web apps.”
source: App Store Rejection 4.2 - Design: Minimum Functionality, date: Dec 2020, But seems it was resolved.
Conclusion: YMMV = Your Mileage May Vary.

BlackBerry based Push Notifications (Client Side)

I want to develop a push notification receiving app for BlackBerry.
I have made few apps for iOS and Android platform. In both of these platforms client app has to register with APN/GCM to receive the notifications. In return APN/GCM returns a DeviceToken/RegistrationID that uniquely identifies the device.
I am not able to find whether the same process is applicable for BlackBerry also. If yes, how can we get a unique ID in this case.
fill up the form from the below url
https://www.blackberry.com/profile/?eventId=8121
you need to use corporate email account otherwise they will not reply you .

Web App Interfacing with iOS app for push notifications

I have a basic web app that is able to send push notifications (via UrbanAirship) to my iOS app.
My questions is, how can my webapp know that I have a new iOS app user? So I can then put the push DeviceID into a database (along with other data as required).
i.e. what is the interface for getting data into the Webapp, is it new code in the iOS app, or is there some other interface from UA?
Thanks..
I'm not an iOS developer, so it's hard for me to be too specific, but I'm assuming you need to store a device ID and (possibly) a token so that you can send messages to that device. I'm assuming (also) that you have access to this information on the device.
The correct way to do this would be to create datastore table of devices and the information associated with them (tokens, various IDs, I also like to have the last time I sent them a message, etc.) Then you send a request (should be a POST request, semantically) to your app when the user registers their device. Send the information you need in the POST request, then store it in your datastore through a handler.
Hope that helps? That's how things are done with Android Cloud to Device messages, and from my quick perusal of Urban Airship, that's how their service works, too.

Resources