Tuesday, March 18, 2014

How to launch native iPad apps on Salesforce1

I have stumbled once or twice to question about launching native apps on Salesforce1 platform. I resolved this problem by using Apple’s URL schemes. Here’s how:
Meeting Assistant technical banner


Create a new Visual Force page

Go to Salesforce Settings → App Setup → Develop → Pages → and choose New .
Creating a new Visual Force page on Salesforce.com

Make sure your page is available on Salesforce Mobile apps. On the following script, I simply want to redirect user to our app using URL scheme, in our case it’s "masf://" . 
                         

Launching Meeting Assistant for Salesforce

     


Create New Global Action

Next you need a cool button to your Salesforce1 to launch that code.
Go to Salesforce Settings → App Setup → Create → Global Actions → New Action
We want to use our state of the art VF page, so action type should be “Custom Visualforce” .
Fill the rest of the information fields to your desire.
Creating a new global action on Salesforce.com

Check Xcode URL Scheme

Next let’s check our mobile app settings. Launch your xCode, open Project Targets and URL Types. Add the desired launch url. If you want to be sure it works, be creative with the URL Scheme - if your iDevice have more than 1 app with same URL Schemes, Apple chooses what app it will launch.


Adding URL Scheme in xCode

Build your app to your iDevice and try it out! Here’s how it works in our case.




Since you can add whatever parameters you want to the url and then parse them in your native app, nearly anything should be possible.




Mr Ville Mettälä
Co-Founder and VP Sales at Punos Mobile Ltd
Twitter: 
Newer Posts Older Posts Home