萤石云 iOSSDK,移植跨平台相关工程
EZSDK/EZSDK/EZSDK.m
@@ -19,7 +19,7 @@
#import "EZDeviceTableViewController.h"
#import "EZHCNetDeviceSDK.h"
#import "EZMessagePhotoViewController.h"
#import "HDLEZVisitorRecordViewController.h"
@@ -45,8 +45,8 @@
 */
- (BOOL)initLibWithAppKey:(NSString *)appKey globalAppKey:(NSString *)globalAppKey
{
    if (!isHavelibInit) {
        [EZOPENSDK setDebugLogEnable:YES];
        //        isHavelibInit=YES;
        //        NSLog(@"第一次初始化萤石库");
        if (!LanguageIsChinese) {
@@ -55,13 +55,15 @@
            NSLog(@"海外版key--%@",globalAppKey);
        }else{
            isHavelibInit = [EZOpenSDK initLibWithAppKey:appKey];
            [[GlobalKit shareKit] setHdlAppKey:appKey];
            NSLog(@"国内版key--%@", appKey);
        }
        [EZHCNetDeviceSDK initSDK];
        [EZOPENSDK enableP2P:YES];
        [EZOPENSDK setDebugLogEnable:YES];
//        [EZOPENSDK setDebugLogEnable:YES];
        NSLog(@"EZOpenSDK Version = %@", [EZOPENSDK getVersion]);
//        NSLog(@"EZOpenSDK treamToken= %@", );
    }
    return isHavelibInit;
}
@@ -135,17 +137,35 @@
 */
-(void)addEzvizMonitor
{
//    //    NSLog(@"添加摄像头");
//    if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0) {
//        UIStoryboard *addDeviceStoryBoard = [UIStoryboard storyboardWithName:@"AddDevice" bundle:nil];
//        EZAddByQRCodeViewController *rootViewController = [addDeviceStoryBoard instantiateViewControllerWithIdentifier:@"AddByQRCode"];
//        [[self getCurrentVC] setNavigationBarHidden:NO];
//        [[self getCurrentVC] pushViewController:rootViewController animated:YES];
//    } else {
//        //        [UIView dd_showMessage:@"iOS 7.0以下扫码功能请自行实现"];
//        NSLog(@"iOS 7.0以下扫码功能请自行实现");
//    }
    [self addEzvizMonitorWithDeviceType:HDLEZDeviceType_Default];
}
/**
 跳转添加添加设备
 @param deviceType 设备类型
 */
- (void)addEzvizMonitorWithDeviceType:(HDLEZDeviceType)deviceType{
    //    NSLog(@"添加摄像头");
    if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0) {
        UIStoryboard *addDeviceStoryBoard = [UIStoryboard storyboardWithName:@"AddDevice" bundle:nil];
        EZAddByQRCodeViewController *rootViewController = [addDeviceStoryBoard instantiateViewControllerWithIdentifier:@"AddByQRCode"];
        rootViewController.deviceType=deviceType;
        [[self getCurrentVC] setNavigationBarHidden:NO];
        [[self getCurrentVC] pushViewController:rootViewController animated:YES];
    } else {
        //        [UIView dd_showMessage:@"iOS 7.0以下扫码功能请自行实现"];
        NSLog(@"iOS 7.0以下扫码功能请自行实现");
    }
}
/**
@@ -205,6 +225,16 @@
    [[self getCurrentVC] pushViewController:playBackVC animated:YES];
}
/**临时密码页
 @param deviceId 设备id
 */
- (void)toTemPassView:(NSString*)deviceId{
    HDLEZVisitorRecordViewController *vc=[[HDLEZVisitorRecordViewController alloc] init];
    vc.deviceId=deviceId;
    [[self getCurrentVC] setNavigationBarHidden:YES];
    [[self getCurrentVC] pushViewController:vc animated:YES];
}
////
//-(void)goToEZMessagePhotoVC:(EZAlarmInfo*)alarmInfo{
//    UIStoryboard *addDeviceStoryBoard = [UIStoryboard storyboardWithName:@"EZMain" bundle:nil];