Scenario 2 - Developer tests and debugs web or native code using the native emulator

While the Mobile Browser Simulator provides the speed needed during fast code and test cycles, the application code eventually needs to be tested on the native platform. That is the purpose of the native emulators. They execute the web code on the desktop of the developer without requiring a physical device. In addition, many hybrid mobile applications require custom code changes in the native layer.

Furthermore, there are situations where a pure native mobile application is the best solution. In all of these situations, the emulators provide a convenient way to test native code without requiring physical devices. When testing in a native emulator, the web archives (.wlapp and .adapter files) are deployed to the built-in server automatically by IBM Worklight Studio when the 'Run As' command is executed. Regarding the device binary files, this is where the integrations of IBM Worklight Studio with native SDKs come in. IBM® Worklight Studio automatically generates all the artifacts that are required by the native SDKs of the target mobile platforms.

To test on a native emulator, a developer needs to launch the native SDK, open the native project that was already generated, perform a build, and launch the emulator. In the Android case, the native project is generated in the same workspace as the IBM Worklight project. The emulator can be launched by right-clicking the project and selecting 'Run As> Android Application.' The native SDK handles the build and package of the native artifacts into the binary format that is required by the mobile platform, installs it into the emulator, and launches the application.


Feedback