-
Notifications
You must be signed in to change notification settings - Fork 0
Installation
Kalle Chen edited this page Jun 9, 2025
·
13 revisions
Add the following dependency to your Package.swift file:
.package(url: "https://github.com/beBit-tech/bebit-tech-ios-app-sdk", from: "0.0.1")Add the following to you Podfile:
target 'YourAppTargetName' do
pod 'OmniSegmentKit', '0.0.1'
endAdd the following to your Podfile:
target 'ObjcApp' do
use_frameworks!
# Specify version 1.0.2-beta.0
pod 'OmniSegmentKit', '1.0.2-beta.0'
target 'ObjcAppTests' do
inherit! :search_paths
# Pods for testing
endCreate a bridging header file :
#ifndef ObjcApp_Bridging_Header_h
#define ObjcApp_Bridging_Header_h
// Add the SDK import
#import <OmniSegmentKit/OmniSegmentKit-Swift.h>
#endif /* ObjcApp_Bridging_Header_h */Important
If you encounter the error: 'OmniSegmentKit/OmniSegmentKit-Swift.h' file not found, ensure the following build settings are configured correctly:
-
Set Always Embed Swift Standard Libraries= Yes -
Set Enable Modules (C and Objective-C)= Yes
To import the OmniSegment library and initialize it, add the following code to your application delegate:
import OmniSegmentKit
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
OmniSegment.initialize("YOUR_API_KEY", tid: "YOUR_iOS_TID")
}#import <OmniSegmentKit/OmniSegmentKit-Swift.h>
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[OmniSegment initialize:@"YOUR_API_KEY" withTid:@"YOUR_iOS_TID"];
}If your app is using a UISceneDelegate, ensure that you include your OmniSegment initialization code in the SceneDelegate.
import OmniSegmentKit
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
OmniSegment.initialize("YOUR_API_KEY", tid: "YOUR_iOS_TID")
}#import <OmniSegmentKit/OmniSegmentKit-Swift.h>
- (void)scene:(UIScene )scene willConnectToSession:(UISceneSession )session options:(UISceneConnectionOptions )connectionOptions {
[OmniSegment initialize:@"YOUR_API_KEY" withTid:@"YOUR_iOS_TID"];
}