react-native-ibm-mobilefirst

8.0.2023020913 • Public • Published

#testing

IBM MobileFirst Platform Foundation React Native SDK plug-in

To add IBM MobileFirst™ Platform Foundation capabilities to an existing React Native app, you add the react-native-ibm-mobilefirst plug-in to your app. The react-native-ibm-mobilefirst plug-in contains the IBM MobileFirst Platform Foundation SDK.

Refer to the documentation links for more information.

Installation

Add this plug-in in the same way that you add any other npm plug-in to your app. For example, with the React Native CLI:

`npm install react-native-ibm-mobilefirst --save`

Getting Started

Pre-requisites

  1. Make sure you have all the pre-requisites for a React Native app covered. See the React Native Getting Started page if you're new to this whole stuff.
  2. Setup of MobileFirst server

Create React Native Project

  • The first step is to create a React Native project. Let's call our app as the MobileFirstApp. Use the React Native CLI to create a new project.

react-native init MobileFirstApp

  • Next, add the react native plugin to your app

cd MobileFirstApp

npm install react-native-ibm-mobilefirst --save

  • Link your project so that all native dependencies are added to your React Native project. This step is not required for react-native version 0.60 and above.

react-native link

Additional platform specific steps

Android

Make the following changes to AndroidManifest.xml (<PROJECT_ROOT>/android/app/src/main/)

  • Add xmlns:tools="http://schemas.android.com/tools" to the manifest tag. E.g.
<manifest 
	xmlns:android="http://schemas.android.com/apk/res/android" 
	xmlns:tools="http://schemas.android.com/tools"
  package="com.mobilefirstapp">
  • Add tools:replace="android:allowBackup" to the application tag. E.g.
<application
      android:name=".MainApplication"
      android:label="@string/app_name"
      android:icon="@mipmap/ic_launcher"
      android:allowBackup="false"
      android:theme="@style/AppTheme"
      tools:replace="android:allowBackup">
iOS
  • Install Mobilefirst specific cocopods dependencies to the project.

cd ios && pod install

This step is applicable only for iOS platform.

Test the Application

Android

  • To run the application :

react-native run-android

iOS

  • To run the application :

    react-native run-ios

Supported platforms

  • Android
  • iOS

Changelog

[19 Nov 2018]

  1. Fixed an issue where the client configuration files were getting replaced upon subsequent installs
  2. Removed warnings of “constantsToExport” for react-native version 0.57+
  3. Fixed an issue where incorrect response was returned to WLResourceRequest API for empty arrays and timestamps.
  4. Fixed an issue where Android builds failed to resolve lint-gradle-api.jar

Documentation

For details of the changes in this latest release, see here.

Copyright 2017-2018 IBM Corp.

IBM - IBM MobileFirst Platform Foundation v8.0 license agreement

Terms of Use

Dependents (0)

Package Sidebar

Install

npm i react-native-ibm-mobilefirst

Weekly Downloads

20

Version

8.0.2023020913

License

SEE LICENSE IN LICENSE.TXT

Unpacked Size

2.61 MB

Total Files

49

Last publish

Collaborators

  • ibmmfpf