Closed roverk8y closed 7 years ago
NSDictionary *subscriptions = @{
@"topic1": @MQTTQosLevelExactlyOnce,
@"topic2": @MQTTQosLevelExactlyOnce
};
or
NSMutableDictionary *subscriptions = [[NSMutableDictionary alloc] init];
[subscriptions setObject:@MQTTQosLevelExactlyOnce forKey:"topic1"];
[subscriptions setObject:@MQTTQosLevelExactlyOnce forKey:"topic2"];
[subscriptions setObject:@MQTTQosLevelExactlyOnce
forKey:"[NSString stringWithFormat:@"%@/#", self.base]];
and then
self.manager.subscriptions = subscriptions;
thank you very much ! it work well but i have new question that is how to disable DDLog in version 1.4.2 ?
i run you demo code(https://github.com/ckrey/MQTTChat) it work well i have about 4~6 topic need to subscribe,and we don't use "#" because the topic have 20 so what should i do ? for statment the fllowing code?