You can use the IBM MobileFirst™ Platform
Command Line Interface (CLI) to
register your Windows application
to an instance MobileFirst Server.
About this task
Once you have the client side of your Windows application initially defined, you
can prepare for further development tasks by registering it to a
MobileFirst Server.
Registration
occurs for only the app that corresponds to the current working directory
in which you run the mfpdev app register command.
If the current working directory is a Windows 8.1
Universal project that contains both Windows 8.1
desktop and Windows Phone
8.1 then both the desktop and Windows Phone
projects are registered. If the current working directory is the Windows or WindowsPhone directory
under the Windows 8.1 Universal
project, or one of their subdirectories, then registration occurs
for only the project that corresponds to the directory that you are
in.
Procedure
- Check that the target MobileFirst Server is up and running.
- Navigate to the directory that contains your app, or one of its
subdirectories.
- Register your app to the server. Use one of the following procedures:
- To register the app to the default server, run the following command:
mfpdev app register
Note: If you
have not previously set a default server and a MobileFirst Server is running on the local system, this command registers the app to
the local MobileFirst Server, and this server is made the default.
- To register your app to a server that is not the default server:
- Create a server profile by running the mfpdev server add
command. For example:
mfpdev server add Server1 -url https://company.mobile.com:9080 -login admin -password secretPassword!
For
more information about the mfpdev server add command, run
mfpdev help server add.
- To register your app to the server that you just defined, run the
mfpdev app register command, and specify the server profile
that you just created. For example:
mfpdev app register Server1
For more information about this command, including optional parameters,
run mfpdev help app register.
Results
The app is registered to the target server. Data about the
app that is obtained from its platform properties file (
.appxmanifest)
such as application name, version number, and app ID is sent to the
server. If the root client properties file (
mfpclient.resw)
for each registered Windows platform
exists, it is updated with the value of the server's URL. If the file
did not exist, a
mfpclient.resw file is created
that includes the server's URL. The client properties files are located
as follows, depending on your specific Windows platform:
- Windows 10 UWP and stand-alone Windows 8.1 projects (either Windows 8.1 desktop or Windows Phone 8.1):/strings/mfpclient.resw
For Windows 8.1 Universal
projects, two client properties files are created or updated:
- Windows Phone 8.1: /WindowsPhone/strings/mfpclient.resw
- Windows 8.1 desktop:/Windows/strings/mfpclient.resw
What to do next
If the mfpclient.resw file was created
when you ran mfpdev app register, then the file
is not linked into your Windows project
in your IDE and you need to link it. If the mfpclient.resw was
created by using NuGet, then the file is already linked into your
project, but you need to update the properties in the file to correspond
to your target MobileFirst Server.
For more information, see Client property file for Windows 10 Universal Windows Platform and Windows 8 Universal.
You can proceed with other development tasks that
depend on the MobileFirst Server. For example, you can preview your app, test your app's security
features, and manage your app from the MobileFirst Operations Console.