Skip to main content

Installation

It is recommended to use Xcode to develop and build the project.

Requirements

  • Device must be able to connect to the Internet.
  • iOS version must be 11.0 or above.

Xcode

It is recommended to use Xcode to develop and build the project.

Adding Framework and Configuration to Xcode Project

  1. Download mtc-<environment>-<version>.zip.

    Use provided Nexus Repository credentials to sign in:

    • Test: https://nexus.ext.meawallet.com/repository/mtc-ios-group/ios/mtc-test/<version>/mtc-test-<version>.zip
    • Prod: https://nexus.ext.meawallet.com/repository/mtc-ios-group/ios/mtc-prod/<version>/mtc-prod-<version>.zip
  2. Unzip the archive. Archive contains iOS XCFramework - MeaTokenControl.xcframework.

  3. Add MeaTokenControl.xcframework to Frameworks, Libraries and Embedded Content section of General settings in iOS project target. Set Embed & Sign.

  4. Download mea_config.<issuer>.zip.

  5. Unzip the archive. Archive contains configuration file mea_config.

  6. Add mea_config to iOS App Resources folder and App Target. File must be included in the final app bundle. Framework automatically loads configuration from app bundle during runtime. Framework raises an exception if configuration file is missing, broken or otherwise fails to load.

Loading Configuration

By default MTC SDK is loading mea_config configuration file, however a custom name can be used. When defining a custom name for the configuration file use MeaTokenControl.loadConfig(configFileName: String) to load the configuration. Configuration file can be placed anywhere in application bundle.

import MeaTokenControl

...

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

MeaTokenControl.loadConfig("custom_config_name")

...

return true
}
#import <MeaTokenControl/MeaTokenControl.h>

...

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[MeaTokenControl loadConfig:@"custom_config_name"];

...

return YES;
}
info

MTC SDK raises an exception if configuration file is missing, broken or otherwise fails to load.