iOS SDK

XCode 建置參數設定

  • Build Settings -> Other Linker Flags
    • 加上 -ObjC
  • Build Settings -> Enable Bitcode
    • 設定成 No

Info.plist

  • 加上 Camera access
    • Privacy – Camera Usage Description
  • 加上 Network status access
    • NSAppTransportSecurity
      • NSAllowsArbitraryLoads

LightScanner 初始化

#import <ligsdk/ligsdk.h>

請在 AppDelegate 裡面的 didFinishLaunchingWithOptions 裡面加入

[LightScanner sharedInstance];

設定 Delegate

#import <ligsdk/ligsdk.h>


scanner = [LightScanner sharedInstance];
[scanner setDelegate:self];

開始掃描

[scanner startWith:^(BOOL succeeded) {

}

停止掃描

[scanner stop];