To run the example project, clone the repo, and run pod install
from the Example directory first.
XMX_MQTTClient is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'XMX_MQTTClient',:git => 'https://github.com/736497373/XMX_MQTTClient'
// 登录MQTT
[[XMX_MQTTClientManager shareInstance] loginWithIp:MQTT_brokerURL
port:MQTT_port
userName:MQTT_userName
password:MQTT_password
cleanSessionFlag:false
isAutoConnect:true
autoConnectInterval:60];
// 订阅xxxx标签
[XMX_MQTTClientManager shareInstance] addTopic:@"xxxx"];
// 删除xxxx标签
[XMX_MQTTClientManager shareInstance] delTopic:@"xxxx"];
// 绑定MQTT代理
[XMX_MQTTClientManager shareInstance] bind:self]
// 解绑MQTT代理
[XMX_MQTTClientManager shareInstance] unbind:self]
// 绑定MQTT代理页面,接受NSDictionary参数回调
-(void)MQTT_messageTopic:(NSString *)topic messageDic:(NSDictionary *)messageDic;
// // 绑定MQTT代理页面,接受NNSString参数回调
-(void)MQTT_messageTopic:(NSString *)topic messageStr:(NSString *)messageStr;
XMX_MQTTClient is available under the MIT license. See the LICENSE file for more info.