npm package: @imam-inter/akaim-sdk-rn
Description: akachat sdk react native
Author: peter
Latest version: 0.4.16-self.7

# akaim-sdk-rn

akachat sdk react native

## Installation
```sh
yarn install
cd example/ios && pod install
```
```sh
npm install akaim-sdk-rn
```
## Usage
```js
import { initSDK } from 'akaim-sdk-rn';
```

### Install gh client brew install gh
 * Set your Personal access tokens (classic)
 * echo "${You Personal access tokens (classic)}" | gh auth login --with-token



### find Simulator DeviceID And Build IOS Example

```shell
xcrun simctl list devices
```
```shell
xcodebuild -workspace AkaimSdkRnExample.xcworkspace \
  -scheme AkaimSdkRnExample \
  -configuration Debug \
  -destination 'platform=iOS Simulator,id=${You Simulator DeviceID}' \
  build
```

### Enter the "example/ios" directory to compile and generate the CodeGen.
```shell
cd example/ios && \
rm -rf Pods build Podfile.lock \
pod install
```


### IOS SDK Description
  * The React Native Library TurboModule generates native code based on the index.tsx and NativeAkaimSdkRn.ts interface files.
  * In the akaim-sdk-rn project, running `cd example/ios && pod install` generates the native code required by the project. The code can be viewed in the `build/generated/ios` directory.


* Files with Callback are all implementations of client-core-sdk.
  * For example CallbackPromise.h and CallbackPromise.mm
  * implementation client-core-sdk aka_im_callback type Base interface 
  * When used again, he is a callback function of the core-sdk.


* CodeGenStructHelper.h 
  * Calling a pointer to the structure type NSDictionary 
   NSDictionary *InitOptions = STRUCT_TO_DICT(JS::NativeAkaimSdkRn::InitOptions)

* Local XCode debugging
  * install XCode 
  * yarn example start
  * open example/ios/AkaimSdkRnExample.xcworkspace
  * In the XCode interface, click "Run".
  ![XCode Run Screenshot](https://inter-digital.s3.ap-southeast-3.amazonaws.com/peter/debugImage.png)


* Build & Release
```shell
yarn prepare && yarn release
```
 *  It will be published to the github private npm repository after building and will automatically modify the version number.
    After publishing, you need to update the package.json of the local repository

* Usage as dependency in other projects
  * Create .npmrc file in the project
```txt
@1nterdigital:registry=https://npm.pkg.github.com/
//npm.pkg.github.com/:_authToken=${MY_GITHUB_TOKEN}
```

 Install dependency
```shell
yarn add @1nterdigital/akaim-sdk-rn@0.1.2
```




### View the data in the SQLite database.
* Download DBeaver Or IDEA And VSCode Plugin
* Android 
```shell
# yarn example android
# check the database directory
adb shell run-as akaimsdkrn.example ls -l /data/user/0/akaimsdkrn.example/files/tmp/
# ================
# total 196
# -rw------- 1 u0_a226 u0_a226 192512 2025-10-02 15:28 AakIM_v3_5381946352.db
#===================
adb exec-out run-as akaimsdkrn.example cat /data/user/0/akaimsdkrn.example/files/tmp/AakIM_v3_5381946352.db > ./AakIM_v3_5381946352.db

```
* IOS 
```shell
 ls /Users/wei/Library/Developer/CoreSimulator/Devices/0D807DE1-2290-432F-8946-D9FCAA24EC15/data/Containers/Data/Application/9BCB3C07-B439-42C4-AB4A-E98A8F48F6CD/Documents/tmp
```

![SQLite Database View](https://inter-digital.s3.ap-southeast-3.amazonaws.com/peter/akaIm_v3_5381946325.png)