Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SalesForce on iOS login without using the SalesForce Webview?

I'm creating an iPhone application that uses salesforce as it's server-side data component, I need to access the database from the application to retrieve data for whichever user logs into the app, to do this I need to authenticate with Sales force.

I'm using the Rest API Template that was available in XCode after installing SalesForce, but I keep getting this:

SalesForce Login UIWebView

Is there any way I can login to salesforce programmatically? I'd like our use of Salesforce to be 'behind the scenes' so to speak, so that our users never have to directly interact with salesforce themselves, is there any way to do this?

like image 812
Patrick T Nelson Avatar asked Mar 23 '12 17:03

Patrick T Nelson


People also ask

What is Salesforce1 app?

Salesforce1 is a mobile app development platform that provides ISVs, developers, administrators, and every Salesforce user the liberty to innovate.

Is Salesforce mobile friendly?

Salesforce for iOS is available from the App Store, and Salesforce for Android is available from Google Play. The Salesforce mobile app is included with all Salesforce orgs. The Salesforce mobile app puts key data and features at your disposal, wherever you are.


2 Answers

That looks like the OAuth challenge. You should be able to bypass this by providing a Session Id. In order to get a Session ID, you have to login with the user's username and password. You can use the SOAP API for this.

like image 123
Jeremy Ross Avatar answered Sep 21 '22 10:09

Jeremy Ross


Yes you can do the login behind the scenes.

Follow this Self login in Salesforce API in iPhone?

I was stuck with the same issue and finally figured it out.

like image 41
Javvadi Rajesh Avatar answered Sep 18 '22 10:09

Javvadi Rajesh