1) In your test, you’re running from your local file system. (files://). There are no cross-domain issues when you are running from files://
2) SalesForce will not give a refresh_token if you are calling from the web, but they will if you are calling from files://.
So basically, your code should work fine in PhoneGap, but I’ll have to figure out a different option for the web-app version of my app.
]]>First, I want to thank you for all of your excellent work! I was dreading having to code my own library for PhoneGap + SalesForce Rest API.
I’ve been using PhoneGap for 2+ years now, so I’m pretty comfortable with how everything works. I added in forcetk.js and forcetk.ui.js. Everything fires up just fine. Except I am hitting on issue:
When I call ftkClientUI.login(); I’m getting the javascript error:
‘Uncaught SecurityError: Blocked a frame with origin “https://www.myapp.com” from accessing a cross-origin frame.’ in https://www.myapp.com/js/forcetk.ui.js on line 160
Watching your video, it didn’t look like you had to do anything to address cross-domain stuff. Do I need to set up some sort of SalesForce proxy on my server, or is there something I’m missing?
Lastly, easy question: Once I get it working, will I be able to use it to create leads/contacts and add tasks to contacts, or is it read-only?
Thanks for your time and your hard work!
]]>When i googled a bit, I noticed that childbrowser plugin is depricated, and should be replaced by inAppBrowser instead. ( http://community.phonegap.com/nitobi/topics/_childbrowser_plugin_deprecating_use_inappbrowser)
Do you have any guidelines/steps from migrating your current demo app to use inAppBrowser instead of childBrowser to support latest versions of phonegap ?
Thanks,
Nikhil
]]>The HTML5/JavaScript development for mobile devices with PhoneGap and such is a completely new thing to me and I’ve found your blog (the old ria too) extremely helpful in learning these technologies.
Keep up the great work you do here!
]]>Rup
]]>