Is it possible to test a Hybrid Remote app in a web browser?

The documentation makes it seems as though I simply need to replace 'cordova.js' with 'mockcordova.js' and add 'mocksmartstore.js'. However when I try that, cordova's "DeviceReady" function does not get triggered and none of app's functionality works.

Anyone have details on how to get a Hybrid (Remote) app running in the browser?

*Mock files were pulled from the sample projects (https://github.com/forcedotcom/SalesforceMobileSDK-Shared/tree/master/samples/simplesyncreact/js)

2 Answers 2


This is very similar to the question I answered here. If you are using Angular.js for your hybrid app, use forceng.js - it is very similar to forcetk.js (without jQuery) and is compatible with Mobile SDK.


I was able to get browser testing working for the hybrid remote app, which uses Visual Force Remoting, by also including a few other JS files (not just mocksmartstore and mockcordova). The JS files are loaded like this:






MockCordova and MockSmartStore are available here: github.com/forcedotcom/SalesforceMobileSDK-Shared/tree/master/test

Underscore: https://github.com/forcedotcom/SalesforceMobileSDK-Shared/blob/master/dependencies/underscore/underscore-min.js

Corova Force: https://github.com/forcedotcom/SalesforceMobileSDK-Shared/blob/master/libs/cordova.force.js

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.