+

Search Tips | Advanced Search

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


Transfer an application configuration by using mfpdev

After you have developed an application, we can transfer it from your development environment to a test or production environment.


Before you begin

We use the mfpdev app pull command to send a copy of the server-side configuration files for our app to our local computer. Then we use the mfpdev app push command to send it to another MobileFirst Server. The mfpdev app push command also registers the app on the specified server.

We can also use these commands to transfer a runtime configuration from one server to another.

The configuration information includes the contents of the application descriptor, which uniquely identifies the app to the server and other information that is specific to the app. The configuration files are provided as compressed files (.zip format). The .zip files are placed in the directory appName/mobilefirst and named as follows:

where appID is the application name, platform is one of android, ios, or windows, and version is the version level of your app. For Cordova apps, a separate .zip file is created for each target platform.

When we use the mfpdev app push command, the application's client properties file is modified to reflect the profile name and URL of the new MobileFirst Server.


Procedure

  1. On your development computer, navigate to a directory that is the root directory of your app or one of its subdirectories.
  2. Run the mfpdev app pull command. If you specify the command with no parameters, the app is pulled from the default MobileFirst Server. We can also specify a particular server and its administrator password. For example, for an Android application named myapp1:

      $ cd myapp1
      $ mfpdev app pull Server10 -password secretPassword!

    This command finds the configuration files for the current application on the MobileFirst Server whose server profile is named Server10. Then, it sends the compressed file myapp1-android-1.0.0-artifacts.zip, which contains these configuration files, to the local computer and places it in the directory myapp1/mobilefirst.

  3. Run the mfpdev app push command. If you specify the command with no parameters, the app is pushed to the default MobileFirst Server. We can also specify a particular server and its administrator password. For example, for the same application that was pushed in the previous step:

      $ mfpdev app push Server12 -password secretPass234!

    This command sends the file myapp1-android-1.0.0-artifacts.zip to the MobileFirst Server whose server profile is named Server12, that has the administrator password secretPass234! The client properties file myapp1/app/src/main/assets/mfpclient.properties is modified to reflect that the server that the app is registered to is Server12, with the server's URL.


Results

The app's server-side configuration files are present on the MobileFirst Server that you specified in the mfpdev app push command. The app is registered to this new server.


What to do next

Test the app or deploy it on the MobileFirst Server that you have transferred it to.

Parent topic: Transfer server-side artifacts to a test or production server