function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
martinbeedmartinbeed 

Deploy Hybrid Touch to Apple and Salesforce AppStore

I've created a Salesforce Hybrid Touch app, and I want to make it available to people to download from the Apple AppStore. It is designed to work with a company's own Salesforce org, so I believe it would also require a companion app on the AppExchange.

What I cannot work out is the logistics of how to package it up so that it can redeployable, my issues are:

1. When I created the "connected app" in Salesforce I had to generate a key which I added to my Touch app config in XCode - this is obviously not how it should work for end users, how should this work?
2. The app is currently configured to use a My URL for OAuth - obviously each customer may have their own URL, how do I make this configurable per installation?

Hopefully the above is clear?

My initial thoughts are to use a Managed Package to solve the first (assuming keys can be protected) but I'm really lost on the second.

Thanks,
Martin

PS: Of anyone can point me in the direction of an Idiot's guide to deployment, I'm sure I can RTFM.
Best Answer chosen by Admin (Salesforce Developers) 
Kevin HawkinsKevin Hawkins

1. Your Connected App will work across all organizations in Production and Sandbox, subject to org admin-configured restrictions, etc.  So you can configure this once as a developer, and it should work for all of your customers.

 

2. Every Mobile SDK app has the ability for the user to configure the login host at runtime.  On iOS, this is done through the app's settings in the Settings app, and for Android it's done through a menu option on the login screen.  So your users can set their login host to be whatever works for their use case.

 

Hope this helps.

Kevin

 

All Answers

Kevin HawkinsKevin Hawkins

1. Your Connected App will work across all organizations in Production and Sandbox, subject to org admin-configured restrictions, etc.  So you can configure this once as a developer, and it should work for all of your customers.

 

2. Every Mobile SDK app has the ability for the user to configure the login host at runtime.  On iOS, this is done through the app's settings in the Settings app, and for Android it's done through a menu option on the login screen.  So your users can set their login host to be whatever works for their use case.

 

Hope this helps.

Kevin

 

This was selected as the best answer
Gaurav KheterpalGaurav Kheterpal

Kevin beat me on this one but I'll chime in based on my experience

 

#1 - I have a couple of hybrid apps already on App Store and this has not been an issue for any of the customers who've installed the apps on their devices. Having said that, if you have any specific Salesforce functionality that's specific to your org, you should definitely consider creating a package for that as well.

 

#2 - As Kevin pointed out, these are app specific settings. In our case, we actually use a help screen pop-up when the app is launched to tell users about how they can do this. This allows switching between sandbox, production and a custom URL.

 

Hope this helps.

 

Cheers!
Gaurav

martinbeedmartinbeed

Thanks both for the response, to be honest, I hadn't properly read the Salesforce Touch Platform book, particularly the chapter about Connected Apps!

 

Having now read it, I now better understand the deployment model - particular the part in Chapter 3: Connected Apps entitled "Publishing a Connected App" (page 40).

 

I'm going to try deploying my app to another Saleforce org and seeing if all the config works - I cannot get to this today, but as soon as I do I will update this thread, and mark it as resolved (if it works).

 

Thanks for the responses!

 

Martin

mobilemashupmobilemashup

I read the Salesforce Touch Platform book, starting on page 40. And also the updated Connected App help pages at (see http://help.salesforce.com/apex/HTViewHelpDoc?id=connected_app_overview.htm&language=en_US)

 

So are these the steps for creating a mobile SDK app that works against MULTIPLE salesforce.com organizations:

 

1. In my DE account: Create a Connected App and get a Consumer Key

2. Use that Consumer Key in my mobile (iOS or Android) app

3. Publish my mobile (iOS or Android) app on app stores so mobile users can download and install it

 

4. In my DE account: Create a Package that includes the Connected App and Publish Connected app

5. Salesforce.com admin in Org X installs my Package using the published url. The Package installs my Connected App into Org X.

6. Salesforce.com admin can optionally set Connected App settings (e.g. IP ranges)

 

7. Mobile users can install my (iOS or Android) app and connect to Org X

 

Specifically, is a  salesforce.com admin required to install my Connected app into their organization (steps #4, #5 and #6) before my mobile SDK app can connect to that organization?

 

The following post from metadaddy seems to imply that the ONLY thing required is to define a connected app and get a consumer key (steps #1-#3).

 

  http://salesforce.stackexchange.com/questions/14012/how-is-it-that-some-oauth-authenticated-apps-dont-require-an-org-to-create-a-co

 

It would be great if users of my mobile app did not have to ask their salesforce.com admin to install my published Connected App.