+

Search Tips | Advanced Search

For up-to-date product documentation, see the IBM MobileFirst Foundation Developer Center.


Previewing Cordova web resources with the Mobile Browser Simulator

We can preview the web resources of your app and test some of your JavaScript code with Mobile Browser Simulator.

Restriction: The Mobile Browser Simulator supports the following web browsers:

Restriction: You preview your web resources with Mobile Browser Simulator, but not all MobileFirst JavaScript APIs are supported by the simulator. In particular, the OAuth protocol is not fully supported. However, we can test calls to adapters with WLResourceRequest. In this case,


To test your application with a device simulator, use instead cordova emulate.

To preview your Cordova web resources with Mobile Browser Simulator, use the following procedure

  1. If we plan to use the connection with the server, start your test server. You start MobileFirst Development Server with the run command in the server installation directory. For more information, see Starting the MobileFirst Development Server.
  2. Use mfpdev app preview. For example, to preview the iOS platform of your application, with an update when you modify the web resource, type

      $ mfpdev app preview ios --type mbs -wp


    To preview the same application and test an adapter on a server that is not MobileFirst Development Server, type

      $ mfpdev app preview ios --type mbs -wp --clientid clientid --secret clientsecret


    Where

    • clientid is the ID of the confidential client to use
    • cliensecret is the secret of the confidential client to use

For more information about mfpdev app preview, we can type

The following figure shows the display of the Mobile Browser Simulator.

View of a Mobile browser simulator. Mobile Browser Simulator displays mobile web pages in various mobile browser sizes and shapes.

Parent topic: Develop Cordova applications