You need to sign in to do that
Don't have an account?
Develop AccountEditor locally
I'm a bit confused about that statement in the Mobile Development guide:
"Developing a hybrid application inside the container requires a build/deploy step for every change. For that reason, we
recommend you develop your hybrid application directly in a browser, and only run your code in the container in the final
stages of testing. JavaScript development in a browser is easier because there is no build/compile step. Whenever you make changes to the code, you can refresh the browser to see your changes."
I assume this means setting up all the static resources within a VF page or an external web site for say, the AccountEditor app which I have working in the emulator? Is there an easy way to do this from forcedroid, or some sample code?
You can actually run AccountEditor.html in a browser (preferably Chrome). That way you can use the browser dev tools to debug / step through code etc.
To do that.
1) Clone or fork the repo where AccountEditor lives: https://github.com/forcedotcom/SalesforceMobileSDK-Shared.
2) Edit AccountEditor.html (it's in the SampleApps/smartsync directory).
Uncomment the block of script includes between <!-- Local Testing --> and <!-- End Local Testing --> and make sure to comment out the script includes between <!-- Container --> and <!-- End Container -->. That way you will use mock implementations of cordova and smartstore which will allow you to run outside the container.
3) Then edit auth_local.js and put in a valid refresh token in the creds = {... } section.
4) Start a browser with same origin policy disabled (for chrome, here are the instructions http://stackoverflow.com/questions/3102819/chrome-disable-same-origin-policy).
5) Simply open file:// <path to >/AccountEditor.html in the browser you just started.
Hope that helps.
All Answers
You can actually run AccountEditor.html in a browser (preferably Chrome). That way you can use the browser dev tools to debug / step through code etc.
To do that.
1) Clone or fork the repo where AccountEditor lives: https://github.com/forcedotcom/SalesforceMobileSDK-Shared.
2) Edit AccountEditor.html (it's in the SampleApps/smartsync directory).
Uncomment the block of script includes between <!-- Local Testing --> and <!-- End Local Testing --> and make sure to comment out the script includes between <!-- Container --> and <!-- End Container -->. That way you will use mock implementations of cordova and smartstore which will allow you to run outside the container.
3) Then edit auth_local.js and put in a valid refresh token in the creds = {... } section.
4) Start a browser with same origin policy disabled (for chrome, here are the instructions http://stackoverflow.com/questions/3102819/chrome-disable-same-origin-policy).
5) Simply open file:// <path to >/AccountEditor.html in the browser you just started.
Hope that helps.
Thanks, that was exactly what I was looking for
I also am having issues on making the Account Editor work locally with MockSmartstore.
On point 3 of WolfM, how do I get a valid refresh token that I can copy paste in the auth_local.js?
Thanks a lot
Maurizio.
Rup