Open Platform
Skip to content

Instruction ​

Development environment ​

Minimum iOS Target: iOS 9.0.0 Minimum Xcode Version: Xcode 14

Installation by Cocopods ​

c
platform :ios, '9.0'
use_frameworks!
 
target 'YourProject'  do
    pod 'TTLock'  #To operate the lock(Required)
    pod 'TTLockDFU'  #To upgrade the lock(optional)
end

Import file ​

c
#import <TTLock/TTLock.h>

Setup bluetooth ​

c
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    //TTLock.printLog = YES;
    [TTLock setupBluetooth:^(TTBluetoothState state) {
        NSLog(@"##############  TTLock is working, bluetooth state: %ld  ##############",(long)state);
    }];
 
    return YES;
}
CopyRight © 2012-2026 Sciener.All Rights Reserved