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
Maheshh PatelMaheshh Patel 

CORS issue when trying to access salesforce Rest API from Mobile App

HI All,

We have created a Mobile Hybrid App,whenrin we  are making ajax callout from Mobile to salesforce Rest resource/
I am bale to connect from workbench,postman,Java App,Android App However when trying to connect from the hybrid app getting the 
CORS error.I did try putting the Source IP address from where callout is being made (IN CORS seeting) but no sucess.
It would be verymuch helpfull if you can share your insights on the same !!

Thanks Much,
Mahesh Patel
 
logontokartiklogontokartik
When you say Hybrid App, I am not sure what kind of hybrid methodolgy are you using? Did you check if you have proxy server setup. If you are using a Mobile SDK Container or Cordova to connect you dont need proxy setup but if not you might have issues. Can you check if you are using Cordova Webview?

Also make sure you are using the latest SalesforceMobileSDK.

Hope this helps you identify where problem is.