Demo entry 6356619

初始化设置

   

Submitted by anonymous on Apr 19, 2017 at 10:52
Language: Objective-C. Code size: 1.2 kB.

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
 
    ArrowIMConfig * IMConfig = [ArrowIMConfig sharedInstance];
    IMConfig.host = IMServerUrl; // 服务器地址
    IMConfig.port = 8001;
    IMConfig.httpLogUrl = [NSString stringWithFormat:@"http://%@:8003/interface_",IMServerUrl]; // IM服务器地址
    IMConfig.IMUrl = [NSString stringWithFormat:@"http://%@:8003/interface",IMServerUrl]; // HTTP登录的服务器地址
    IMConfig.groupUrl = [NSString stringWithFormat:@"http://%@:8003/groupinterface",IMServerUrl]; // 群组服务器地址
    IMConfig.uploadUrl = [NSString stringWithFormat:@"http://%@:8006/uploadFile",IMServerUrl]; // 资源服务器上传地址
    IMConfig.downloadUrl = [NSString stringWithFormat:@"http://%@:8006",IMServerUrl]; // 资源服务器下载地址
    IMConfig.appId = 520;
    IMConfig.subAppId = 2;
    IMConfig.versionId = 3; // 当前使用的SDK的版本号
    IMConfig.deviceType = 1; // 设备类型
    IMConfig.serverVersion = 3; // 服务器版本
 
    [ArrowIMEngine openLog:YES]; // log开关
    [ArrowIMEngine autoRecord:YES]; // 自动记录
    [ArrowIMEngine addDelegate:self delegateQueue:dispatch_get_main_queue()]; // 添加代理
 
    return YES;
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).