+

Search Tips | Advanced Search

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


Register Cordova applications to MobileFirst Server

Register your Cordova application to an instance of MobileFirst Server to establish communication with the server and to provide the server with information about your app. We can register your app by using the IBM MobileFirstâ„¢ Platform Command Line Interface (CLI) or the IBM MobileFirst Platform Operations Console.

Once you have registered your client application on the server, your app can access the server resources. For details on how to test the server registration from your client app see Some initial WebView code for connecting to the server.

Note: If you do not register before running the app, the mfpclient file is not created in the [platform]\assets folder and the following error appears at runtime:

You must register your app before running it. If we want to run the app before registering (for example if you have no server), we can create the mfpclient file by running cordova prepare from the Cordova app root folder.

However this mfpclient file does not contain the necessary connection values. We cannot run an application that includes requests to server resources, without properly registering the app.

To view the initial app in an emulator, after creating it with Cordova and the MobileFirst plug-in, we can run it after running cordova prepare.

Parent topic: Develop Cordova applications