React Native
Getting started
Add the akiles-react-native NPM package:
npm install akiles-react-native # using NPM
yarn add akiles-react-native # using Yarn
Note on iOS
On iOS, you need to add the following to your Podfile if you’re using CocoaPods:
pod 'AkilesSDK', :git => 'https://github.com/akiles/akiles-ios.git', :branch => 'v2.1.1'
And then run pod install.
Using
With dependencies set up, you can use it:
import akiles from 'akiles-react-native';
await akiles.addSession("mt_xxxxxxx");
Card emulation
Follow both the Android and iOS guides to configure card emulation.
Note you need to call startCardEmulation() on iOS only. On Android card emulation works system-wide, simply by having your app installed and the session added. You should check whether you’re on iOS or not in order to show/hide the “Start card emulation” button.
Demo app
The repo contains an SDK demo app that showcases all major SDK features:
- Session management: Add/remove member sessions using tokens
- Gadget actions: Open doors and control devices via internet or Bluetooth
- Hardware scanning: Discover nearby Akiles devices via Bluetooth
- Hardware sync: Update device firmware and configuration
- NFC card scanning: Read and update Akiles cards
- Card emulation: Start card emulation. (iOS only, on Android card emulation works in the background just by having the app installed)
The app displays real-time status updates for both internet and Bluetooth operations, making it easy to test different scenarios.