The mfpclient.plist file defines the client-side properties used for
registering your iOS app on the MobileFirst
server.
The
mfpclient.plist client property file contains the necessary information
for connecting to the server. The app registration consists of both the server- and client-side
components. Before you use the
mfpclient.plist file in your native application
for iOS, you must define the properties as specified in the following table. This file is created
automatically when you register your app with the
IBM MobileFirst™ Platform
Command Line Interface (CLI). For more information, see
Registering iOS applications from the MobileFirst Platform CLI.
If
you register your application by using the
IBM MobileFirst Platform Operations
Console, you must in addition create the file manually, reference it within your Xcode project
by selecting .
Table 1. Properties of the mfpclient.plist fileProperty |
Description |
Example values |
wlServerProtocol |
The communication protocol with the MobileFirst Server. |
http or https |
wlServerHost |
The host name of the MobileFirst Server. |
192.168.1.63 |
wlServerPort |
The port of the MobileFirst Server. |
9080 |
wlServerContext |
The server context. |
/mfp/ |
wlPlatformVersion |
The MobileFirst
version |
8.0.20160214 |
languagePreferences |
Preferred language. |
en |
Here is an example
mfpclient.plist file.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>protocol</key>
<string>http</string>
<key>host</key>
<string>9.148.49.221</string>
<key>port</key>
<string>9080</string>
<key>wlServerContext</key>
<string>/mfp/</string>
<key>platformVersion</key>
<string>8.0.20160309</string>
<key>languagePreferences</key>
<string>en</string>
</dict>
</plist>
The
mfpclient.plist file must be added to the root folder of the Xcode
project, referenced by the Xcode project, and linked to a target. To link the
mfpclient.plist file to one or more Xcode targets:
- In Xcode, from the menu, navigate to the mfpclient.plist file,
,
select the file and click OK.
- After the mfpclient.plist
file appears in the navigation tree, select it to display the Target
Membership box. Select the relevant
targets.
After you register the
mfpclient.plist file within your Xcode project and register your app on the
server, you can start to develop code for accessing server resources.