私有云SDK集成配置
静态配置ip(域名)地址
SDK 默认指向公有云地址,在部署私有云后,需要将地址重新指向到新的地址,以下是地址修改方法:
EMOptions *options = [EMOptions optionsWithAppkey:appkey];
options.enableDnsConfig = NO;
options.chatPort = 8080;//设置端口号
options.chatServer = "xxx.xxx.xxx.xxx";//设置ip
options.restServer = "xxx.xxx.xxx.xxx:8080";//设置ip:port
[[EMClient sharedClient] initializeSDKWithOptions:options];
注意:如果需要配置https只需加一个属性即可
options.usingHttpsOnly = YES;