初始化
<p>[TOC]</p>
<h2>初始化</h2>
<h3>QDClient 服务配置</h3>
<p>QDClient 通过 serverOptions 进行服务环境的配置。在使用 SDK 任何方法之前,都应该首先进行服务环境的配置。在登录前可以修改配置</p>
<pre><code>@interface QDClient : NSObject
/**
* 服务器配置
*/
@property (nonatomic, strong) QDServerOptions *serverOptions;
@end</code></pre>
<p>QDServerOptions 选项参数列表</p>
<table>
<thead>
<tr>
<th style="text-align: center;">参数</th>
<th style="text-align: center;">类型</th>
<th style="text-align: center;">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: center;">ip</td>
<td style="text-align: center;">NSString</td>
<td style="text-align: center;">ip地址</td>
</tr>
<tr>
<td style="text-align: center;">port</td>
<td style="text-align: center;">NSInteger</td>
<td style="text-align: center;">端口号</td>
</tr>
<tr>
<td style="text-align: center;">domain</td>
<td style="text-align: center;">NSString</td>
<td style="text-align: center;">域名</td>
</tr>
</tbody>
</table>
<p>调用示例</p>
<pre><code>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
LoginModel *loginModel = [LoginModel sharedInstance];
QDServerOptions *serverOptions = [QDServerOptions serverOptionWithIp:loginModel.server_ip port:[loginModel.server_port integerValue] domain:loginModel.domain];
[[QDClient sharedClient] setServerOptions:serverOptions];
}</code></pre>
<h3>其它配置初始化</h3>
<ul>
<li>推送环境设置
示例
<pre><code>// pushScene 推送环境 0-正式环境 1-测试环境
[[QDClient sharedClient] updatePushScene:PUSHSCENE];</code></pre></li>
</ul>