Can I use the same Parse app from 2 different Swift apps and have specific users pushing messages to each other?
Do I need a 2nd Push (p12) certificate on either Parse or Apple Dev site? Or can both apps use the same one somehow?
My scenario is a restaurant iOS app and a customer iOS app. I need customers to send a push message to the restaurant app with every new order. I also need the restaurant manager to send a push message back to his customers with any order updates from his side. All users (restaurant owner + customers) reside on the same Parse app.
Related
My organisation maintains multiple applications and there's a confusion about how the APNs keys are supposed to be used.
We are using firebase to send push notifications.
So far we have two apple keys for two different applications. But cannot create a third key with APNs activated.
This question indicates that we're supposed to use the same key for all applications.
My questions are:
If we only can create two keys for one organisation is one supposed to be used for production and one for testing/development?
If we use the same keys for multiple unrelated application (unrelated except that the apps are all created by the same organisation) what stops cloud messages from being pushed to the wrong application. Is it related to identifiers for apps?
Are we supposed to create a convention to circumvent the problem of sending messages to the wrong app? ( I don't actually think this is a very valid option. It feels very wrong.)
For example:
using topics with a prefix for each app?
create device groups, one for each app?
I've asked this question here as well: https://forums.developer.apple.com/message/415911#415911
The key is used to authenticate to the service. It identifies your organisation to the service.
The reason you can have two keys is so that you can create a new one before revoking the old one if the key is compromised.
When an app registers for remote notifications you receive an identifier that is unique for that app on that device. If you have multiple apps on that device each will get a different identifier.
When you send a push notification the identifier ensures that it gets to the right app on the right device.
You need to ensure that you store the identifier against the right app on your backend (or you may have different backends for different apps).
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 m a iOS Developer. I m new in this field. I m working on an App which is for an enterprise company.
I m little bit confuse that, how we give update notification to user if we upload new version of app on our website not on AppStore because i m using Distribution of Enterprise Application through a website. i upload link there and employees download apps from that link.
Now i want to make new version of that app then what will i do that my previous version users receive notification to update old app to new app.
Plz guide me
There are 3 principal ways:
Email - it's an enteprise application, you should now the emails of your employees
(not everybody uses email on their iPades, sometimes they can forget about emails)
Push notification (they can be disabled and suffer from the same problems as emails - it's only an alert that can be dismissed and forgotten)
In-App checking - the application should check by itself if it has the latest version installed and ask the user frequently to update or even block the usage of the app if not updated (if the use case makes sense). This works best with a push notification and also with email for major updates (to inform users about new features).
you can notify all your app user by using Push Notification.
Obviously you can use the push notifications only if you have implemented them in your previous version of the app which is already there in the devices. If not implemented then you can't use push notifications for this purpose.
If not, then my suggestion is that you can manually inform them through mail and implement the push notifications in this version. So that you can use the same for new version to notify them.
Suppose we send email of updation to all employees to update the app but what is the process or line of code to that when employee download the app from link then previous app updated into new app
How can I send push notifications to my app users?
Let me first start off by saying I'm new to iOS development and I already purchased my dev account and have already built my application that I want to submit to the app store.
Before I submit my application I want to enable push notifications for my users. Basically what I want to do is this: I have a RSS news feed that I post every time I have an update for the company... Once I post on the RSS feed it's sent to my site homepage and can be read there and is also sent to my iPhone application homepage with a UIWebView connected to view the posts on a dedicated site made for the application.
What I want to do is every time I post on the RSS feed to have it send a notification to my users with the title of the post being the notification and when they open it, it takes them to the webpage of the post in a UIWebView. If this isn't possible to connect notifications to a RSS feed then that's fine with me. I can manually send them to the users each time I post.
How do I do this?
The Push notification are sent by server. there is format which is to be followed and it has to be sent to apple servers. After apple servers receive request for push, it sends the push to users.
For making push you have to set certificates in developers account.
If you want detailed tutorial then refer
http://www.raywenderlich.com/32960
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).