I am developing a hybrid mobile app using Salesforce. I am at a point where I am dealing with Apple's Push Notification Service. In the apple's developer guide it ask that we install the SSL certificate on the provider server
http://developer.apple.com/library/mac/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/ProvisioningDevelopment/ProvisioningDevelopment.html#//apple_ref/doc/uid/TP40008194-CH104-SW6
How can I do that on Salesforce? Is there a tutorial somewhere that I missed. Is it even possible? I also looked into how Saleforce can communicate with the APNS and two option came up. Urban Airship and Streaming APi. Urban Airship cost money (after 1 million notifications?) so I would like to use Streaming API. Any good tutorials on how to use Streaming API?
Starting with the Spring 14 release, Salesforce supports Apple ( APNS ) and Google ( GCM ) mobile push notifications via the Connected Apps framework. Please check the Mobile Push Notifications Tip Sheet on Developer Force for more information: http://www2.developerforce.com/en/mobile/resources
I'm not that familiar with APNs, but from looking at the doc you provided, it says, "streaming TCP socket design for sending push notifications as binary content to APNs." Apex does not provide a way to make raw TCP callouts, so it doesn't sounds like this is going to work. You can set a client cert for HTTP callouts, but that is not going to help here.
If you want to stay in the Salesforce family, you could create a service on Heroku to listen for events from Salesforce and then stream them to APNs over a TCP socket. To get the events from Salesforce to Heroku (or any other external service you choose), you could use the Streaming API, Apex HTTP callouts, or Outbound Messaging.
Related
My company was using a third party tool to download print jobs from Google. This has developed problems so we've written our own. We can register a printer, get notifications via XMPP and download jobs. All good. We'd like to download jobs from the printers already registered via the the third party tool.
We have successfully got the permission of the google account that owns the printer to manage its printers and subsequently downloaded jobs from the printer. This was achieved using a solution that issued /fetch api calls every minute. Of course, Google wants the XMPP method used so we tried to do that. After getting over an authentication issue by adding googletalk to the scope in the oAuth request we fail to get any notifications.
In summary, with our own printer we can fetch, download and get XMPP notifications but with the printer registered with the third party tool (where we don't know the client id and secret but do know the google account) we can fetch and download but not get XMPP notifications. Is there any way round this?
The XMPP messages go to the robot account that owns the printer, so I don't think you should expect to receive XMPP messages without that robot account (and corresponding XMPP JID).
Rather than work around the intentions of the API, I suggest you work with the third party. Maybe they can provide hooks into their notification queue?
I am developing one application.In that i want to get the latest version of my app information using Apple Push Notifications.So please tell me how to do this one.I seen in some posts,in that they mension like configure the APNS in apple site and send abinary information to apple service provider.Is it sufficient to get the latest version information.
You will need to create your own server, to store the identifiers for your users. With this, you can then send notifications to users who have allowed notifications from your app.
Doing this can be quite complicated, so you may want to use a service such as Urban Airship who will provide the server, and instructions on how to implement APNS in your app.
With this done, it can be quite simple to send a push notification to your users from their website.
I'd like to implement some push notifications from Twitter in my app. I can connect to Twitter's stream of user-related events using Sreaming API. Do I need some 'middleman' server between Twitter API and an iPhone app in order to push a notification to an app ? Maybe I can do it using Parse.com Cloud Code or something similar ?
This question may be helpful not only in the case of the Twitter API but also in case of any server that a developer don't have any access to.
To push a notification you would generally need a server of your own which has been configured to send a notification when some event occurs. If you are using Parse as a backend for your app, you can leverage their backend to allow you to implement Push Notifications or use a service like UrbanAirship
In the case of the Twitter API, you will need to implement some middleman in either case to get the data from Twitter for your user and parse it to see whether some event has occurred and then send off a notification either using your own custom logic directly to Apple's servers or using Parse or UrbanAirship (or some other service)
Is it true that we can use any component for our own server component? I mean it can be a Java or C# TCP/IP client which connects with Apple servers to push notifications. This can also be a console application, is that right?
Also, is it right that we have to push notifications for APN server, with each and every deviceTokens registered on our own server?
You can use whatever language you want and you will have to send push notifications for every registered device token. You should also investigate apple's feedback API's which you should periodically check to see which of your devices are no longer registered because sending a push has no feedback and you will not know if it is being received or not. If you use a service such as Urban Airship the setup will be much much easier to start and they have helpful API's to give them a group of device tokens or to do a mass push to all registered device tokens.
You are right on both accounts. You can write your own method to send it, and you must send it to each device id.
framework that might help you:
http://www.easyapns.com/
I went through the Apple api documentation related to Push notification service in iPhone and all the possible links I found through the google. So I've created the SSL certificate and have got a device token.
But after that, how to use this push notification service in an iPhone application?. Does anyone have any idea about this?
For server/remote push notifications - depends on what you plan to run on your server or if you are going to use a third party service to do it.
Here are some notes if you have your own Rails based server.
You can use thirty push services like PushBots