Skip to content

Installation

ruofan edited this page Mar 13, 2025 · 4 revisions

Step 1 - Adding the wrapper

npm install @bebit-tech/omnisegment

Step 2 - Android Setup

Initialize the SDK

In your MainApplication.java file, add the following import:

import com.bebittechreactnativeappsdk.OmniSegmentModule;

// ...

@Override
public void onCreate() {
  super.onCreate();
  SoLoader.init(this, /* native exopackage */ false);

  // ...

  OmniSegmentModule.initialize(this, "API-KEY", "TID"); // Add this line

  // ...
}
Android Permissions
INTERNET
<uses-permission android:name="android.permission.INTERNET"/>

Step 3 - iOS Setup

Initialize the SDK

In your AppDelegate.m file, add the following import:

#import <OmniSegmentKit/OmniSegmentKit-Swift.h>

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  //...

  [OmniSegment initialize: @"API-KEY" withTid: @"TID"]; // Add this line

  //...
}

Clone this wiki locally