Developing native applications

Whatever the environment, the process for developing native applications shares some common elements.

Each native API application contains the following elements:
  • a MobileFirst Native API project
  • a project in an IDE that is appropriate to your target environment
  • the MobileFirst native library for your target environment
  • a client property file
  • an application descriptor file
You develop according to the guidelines for your target environment.

When you create a MobileFirst project of type Native API, various files are generated. The names of the files and their content vary, depending on the target environment that you specify. After you create the MobileFirst native API project, you copy some of the generated files to your native development environment (IDE). Which files you need to copy depend on your target development environment and on whether you use a package management tool to obtain the IBM MobileFirst™ Platform Foundation SDK. If you use a package management tool, you need to copy fewer files.

Application files

Native applications contain the following files:
  • The application descriptor file: This file is the application-descriptor.xml file in the application root directory.
  • The MobileFirst native library and the client property file: Their name and format depend on the environment.
    iOS
    • The WorklightAPI folder defines the MobileFirst native library.
    • The worklight.plist file is the client property file.
    Android
    • The worklight-android.jar file defines the MobileFirst native library.
    • The wlclient.properties file is the client property file.
    Java™ ME
    • The worklight-javame.jar file and the json4javame.jar file together define the MobileFirst native library.
    • The wlclient.properties file is the client property file.
    Windows Phone Silverlight 8
    • The worklight-windowsphone8.dll file defines the MobileFirst native library. The Newtonsoft.Json.dll library is required for using JSON objects in C#.
    • The wlclient.properties file is the client property file.
    Windows 8 Universal and Windows Phone 8 Universal
    • The worklight-windows8.dll file defines the MobileFirst native library. The Newtonsoft.Json.dll is a library that is required for using JSON objects in C#.
    • The wlclient.properties file is the client property file.
    • The worklight-windows8.pri file. This file contains the static localized strings (user facing and non-user facing).

Using package management tools to obtain the SDK

If you are developing a native Android application, you can download the IBM MobileFirst Platform Foundation Android SDK with Gradle. For more information, see Adding the IBM MobileFirst Platform Foundation SDK to a new or existing application with Android Studio.

Complementary project for native applications

Native applications need another project, which you create in a different IDE. For example:
  • For iOS, a project in the Xcode IDE to develop a native application with Objective-C or Swift.
  • For Java ME, a project in the Eclipse IDE to develop a native application with Java.
  • For Android, a project in Android Studio or in the Google Android Development Toolkit (ADT) Eclipse plugin to develop a native application with Java..
  • For Windows Phone Silverlight 8, a project in Visual Studio Express for Windows Phone or Visual Studio 2012 Professional or higher.
  • For Windows 8 Universal, a project in Visual Studio Express for Windows 8 or in Visual Studio 2012 Professional or higher.

Build and deployment

You build and deploy native API applications by creating a .wlapp file and uploading it to the MobileFirst Operations Console. This is the same process that you use to build hybrid apps. For more information about deployment, see Deploying applications and adapters to MobileFirst Server.