In this article:

Connecting the FMPKit Framework via the Flutter Framework

Connecting the HHFW Framework

Connecting the FMPWrapper Framework

iOS Framework

To develop a mobile application, use the FMPKit iOS framework. FMPKit is an object oriented framework that can be used to develop mobile applications based on a mobile platform server, create an application architecture based on ready-to-use structures and exchange data with a data source.

The framework is delivered with the FMPKit documentation describing steps for preparing the framework to work and its structure:

IMPORTANT. To open framework internal documentation, open the link given below.

To work with the framework, see the FMPKit documentation at:

https://help.fsight.ru/MobilePlatform/API/ios/documentation/fmpkit/

The side panel displays sections used for navigation by framework elements.

The HHFW and FMPWrapper frameworks are also available for mobile application development. The FMPWrapper framework structure is based on the HHFW basic framework. The FMPWrapper framework is used only when the HHFW framework is connected.

NOTE. The HHFW and FMPWrapper frameworks are outdated and are used for compatibility with earlier versions of Foresight Mobile Platform.

To use the framework, connect it to a mobile application development project. Below is description of frameworks connection in the Xcode development environment.

Connecting the FMPKit Framework via the Flutter Framework

For details about connecting the FMPKit framework to a mobile development project, see the FMPKit documentation.

After connecting the framework prepare a cross-platform mobile application for development via the Flutter framework:

  1. Download the flutter-ios*.zip cross-platform bridge archive.

NOTE. To get a ready cross-platform bridge, contact technical support by sending a request to support@fsight.ru or via technical support services that are available after registration at the website.

  1. Add the fmp_bridge.dart file from the lib folder to the cross-platform part of the mobile application development project:

  1. Add contents of the FMPFlutter folder from the ios\Runner folder hierarchy to the native part of the Runner.xcworkspace mobile development project:

  1. Execute operations to set up the native part of the Runner.xcworkspace project:
import UIKit
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {     var fmpFlutter: FMPFlutter!     override func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {         let controller : FlutterViewController = window?.rootViewController as! FlutterViewController
        // FMP Channel         fmpFlutter = FMPFlutter(methodChannel: FlutterMethodChannel(             name: "com.example.flutterApplication/FMPKit",             binaryMessenger: controller.binaryMessenger)         )         fmpFlutter.setMethodCallHandler()
        GeneratedPluginRegistrant.register(with: self)         return super.application(application, didFinishLaunchingWithOptions: launchOptions)     } }
  1. Open the fmp_bridge.dart file in the cross-platform part of the mobile application development project and specify channel name (com.example.flutterApplication/FMPKit) that was specified at Step 3 for the project's native part in the platform static property of the FMP class:

import 'package:flutter/services.dart';
import 'dart:async';
 
class FMP {
static const platform = MethodChannel('com.example.flutterApplication/FMPKit');
  1. Import fmp_bridge.dart to the mobile application development project:

import 'package:flutter_application/fmp_bridge.dart';

After executing the operations the cross-platform mobile application is prepared for development using properties and methods of the FMPKit framework. The example of creating the FMP object:

try {
    final fmp = await FMP.build(
        url: 'https://url/',
        environment: 'environment',
        project: 'project',
        udid: 'deviceID'
    );
     
    print('fmpId: ${fmp.fmpID}');
 
} on PlatformException catch (error) {
    print('Failed to build FMP: ${error.message}');
}

Connecting the HHFW Framework

To connect the HHFW framework to a mobile application development project:

  1. Download the IOSFMP<release version>.zip archive with HHFW framework file and unpack it.

NOTE. To get framework archive, request technical support by sending an email to support@fsight.ru or technical support services that are available after registration at the website.

  1. Add the HHFW.framework file to the project using one of the methods:

After executing the operation the standard file selection dialog box opens. Select the HHFW.framework file, select the Copy Items if Needed checkbox and click the Add button:

After executing the operations the HHFW.framework file is added to the project:

  1. Change project options:

  1. Create the Bridging-Header.h bridging file in the project automatically or manually to develop in the Swift language. The HHFW framework is developed in the Objective-C language.

Create a file automatically

Create a file manually

  1. Add a string in the <project name>-Bridging-Header.h file to import to HHFW.h:

After executing the operation the HHFW framework is connected to the project, and framework methods can be used.

For details about the HHFW framework, see the HHFW Framework section.

Connecting the FMPWrapper Framework

To connect the FMPWrapper framework to a mobile application development project:

  1. Download the IOSFMP<release version>.zip archive with FMPWrapper framework file and unpack it.

NOTE. To get framework archive, request technical support by sending an email to support@fsight.ru or technical support services that are available after registration at the website.

  1. Make sure that the HHFW framework is connected to the project.

  2. Follow Steps 1-3 to add the FMPWrapper.framework file. The framework file is added identically to adding the HHFW.framework file.

  3. Select the Embed Without Signing value for the FMPWrapper.framework file in the section Project > Targets > General > Frameworks, Libraries, and Embedded Content:

  1. Add a string in the *.swift file to import FMPWrapper:

After executing the operation the FMPWrapper framework is connected to the project, and framework methods can be used in the *.swift file.

For details about the FMPWrapper framework, see the FMPWrapper Fremwork section.

See also:

Development | HHFW Framework | FMPWrapper Framework