Curious, is it a way to notify other client that I made a database operation, but without set up own server? Just from the client?
Image below shows, I need a server with SSL certificate. Any way to avoid?
You need to have a server (at minimum for security), but it doesn't need to be your server, there are many 3rd party companies who offer push notifications as part of their platform (like urban airship, or parse).
Related
I've read the Apple docs on APNs and there's one thing I'm not sure about. First, some background on where this is coming from.
In the company I work at, we develop an SDK that interfaces with our webservices. One part of the SDK is sending messages and we're thinking about push notifications when the user is not online (app suspended/not running). We don't have an app ourselves, but would like to provide this feature to users of the SDK and our platform.
So: Can we create an authentication token or certificate of our own to connect to APNs and then push a notification to an app developed by a 3rd party (with their app token)? Or do we need to collect all the information from the 3rd party and basically impersonate them?
Google and Microsoft provide a service like that, but I'm not sure what's happening behind the scenes.
Can someone please elaborate?
I have two IOS applications and I want to send new message push notification on both applications through pubnub ? Is it possible ? As apple has different APNS certificate for different application and pubnub can use only one certificate at a time, is there any hack possible through which I can send push notification on multiple application ?
This is becoming a more common use case especially with the popularity of car/taxi dispatch applications where you have a driver app that communicates with a separate rider app. There are other use cases but this is the most common one.
Currently, the PubNub Account Dashboard only supports one push cert per key set which means you have a couple of workarounds until we do support multiple push certs per key set.
Two Apps
Use 1 set of keys as the primary keys where you do all pub/sub operations, presences, etc.
You would also include the mobile push payload (apns/gcm) in every publish you send.
One application will register for push notifications using this set of keys.
You will also publish the push payload only on the second set of keys that the other app will register for push notifications on.
That other app will also pub/sub, etc. on the first set of keys.
And each set of keys will have a separate push cert as you already understand.
One App
The alternative is to just have one app (so one push cert with one set of PubNub keys) and you provide a means for the end user to register as a user of one module or the other (modules == apps now). Then just only show the functionality/UI that applies to that type of user. I understand this provides for a larger app footprint and more restrictive release cycles with both modules (apps) in a single app.
Neither of the above solutions are optimal but it is what many customers are implementing for now. We do have the multi-push cert feature on the roadmap but it requires some other features to be in place before we roll this out. Please follow #pubnub Twitter account and the PubNub blog for announcements of this feature and other great improvements that are coming soon.
Questions (from the comments)
Lets say I have two apps, one is driver and another is rider, do I have to create two apps on pubnub and get two set of keys?
As far as I understood from your explanation, after creating two apps on pubnub, we will have to use one keys for chat and another for push notification, am I correct?
In case of using another keys only for push notification, how will it identify to which rider app or driver app it has to send push notification?
Answers
I am answering all three questions in one shot here. I hope this makes it clear.
Apps in the PubNub Account Dashboard are basically just organizational folders so they don't really have to have a direct relationship to an actual application, so it really doesn't matter if you create 1 or 2 Apps in this scenario. But I would create 1 App and two sets of keys: Primary keys and Secondary keys. Both of your iOS apps (Driver and Rider) will use the Primary keys for all pub/sub of messages.
But for push notifications, Driver app will register for push notifications only on the Primary key's push cert and the Rider app will only register for push notifications on the Secondary key's push cert. Whenever you publish a message to the Primary key, you include the push notification payload for APNS (pn_apns : { aps : { alert :...) and you also publish just the push notification payload on the Secondary key.
I am working on an enterprise application to be distributed in-hously. As a feasibility study, I have read & have developed push notifications using APNS. Here is something I want to ask regaring APNS.
My humble request to.enthusiastic developers,
"Answer this if they have encountered or have any idea or have done some sort of work like this. Please do not just point to any arbitrary tutorial or question links of Stack Overflow."
What are the security aspects involded (from information security point of view) on the PayLoad that I will be sending to APNS server. My client cares because of the information Security policies that I too have to abide.
Is it possible to send / receive notification from the APNS from being within a VPN. How ?
Is it possible to completely bypass the APNS server & have a one in-house server, that can send notification to my device directly. How ?
What if, if I want to implement APNS but do not want to share my
payload with APNS server.?
Thank you for reading my question.
Although end points of the APNS architecture are TLS encrypted, Apple may see your data in clear text. You have to clarify with your customer, if this is ok or not.
Yes, but you'll need some open ports
No, this is not possible
You may use some kind of token as the payload and request the confidential information from your own server using this token.
I'm developing a iOS app. This app has two targets (free version and premium version). Then I want to send push notifications throw my Service Web.
So, Do I need two certificates? Because my app (free or premium) uses the same Web Service and the same database. And when I want to send a push notification, now do I have to store and look if it's one version or another?
Can I use one certificate? Can I merge two certificates in one?
Thanks.
You can't use one certificate, since each certificate it tied to an App ID, and the App ID is different for each App (it contains the bundle ID of the App which is unique for each App).
You must use two certificates, which means your server will have to know which Device Token belongs to which App, and use the appropriate certificate. Perhaps, when you send the device token from your app to your server, you should send some additional info that indicates which App sent the token).
We are building phonegap apps and we would like to send notifications to our users.
What is the cost for sending notifications ? Do we need only developer license or something else ?
Also, do we have to publish the apps in the app store in order to use APNS ? (We are building private business apps)
Thanks in advance,
What is the cost for sending notifications ?
Zero, if you doenst use a third party service like Urban Airship
Do we need only developer license or something else ?
Yes, without a license you cannot send any push notifications
Also, do we have to publish the apps in the app store in order to use
APNS ?
No
I'd like to add to the answer provided above. Not all third party services charge you for sending out push notification. PushWoosh is a free service without limits on the number of notifications being sent and the cost remains zero, unless you need some additional features (which you probably don't).