Skip to content

Commit 8a6d504

Browse files
committed
update MQTT framework for ios to 0.6.9
1 parent e0e3dd7 commit 8a6d504

29 files changed

+700
-688
lines changed

index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ module.exports = {
4646
clients: [],
4747
eventHandler: null,
4848
dispatchEvents: function(data) {
49-
console.log(data);
5049
this.clients.forEach(function(client) {
5150
client.dispatchEvent(data);
5251
});

ios/RCTMqtt/Mqtt.m

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ @implementation Mqtt
2424

2525
- (id)init {
2626
if ((self = [super init])) {
27-
[DDLog addLogger:[DDASLLogger sharedInstance]];
28-
[DDLog addLogger:[DDTTYLogger sharedInstance]];
27+
2928
self.defaultOptions = @{
3029
@"host": @"localhost",
3130
@"port": @1883,
@@ -106,10 +105,6 @@ - (void) connect {
106105
} else {
107106

108107
[self.manager connectToLast];
109-
[self.manager addObserver:self
110-
forKeyPath:@"state"
111-
options:NSKeyValueObservingOptionInitial | NSKeyValueObservingOptionNew
112-
context:nil];
113108

114109
}
115110
}
@@ -124,12 +119,7 @@ - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(N
124119
@"clientRef": [NSNumber numberWithInt:[self clientRef]],
125120
@"message": @"closed"
126121
}];
127-
@try{
128-
[[NSOperationQueue mainQueue] cancelAllOperations];
129-
[self.manager removeObserver:self forKeyPath:@"state"];
130-
}@catch(id anException){
131-
//do nothing, obviously it wasn't attached because an exception was thrown
132-
}
122+
133123
break;
134124
case MQTTSessionManagerStateClosing:
135125
[self.bridge.eventDispatcher sendDeviceEventWithName:@"mqtt_events"
@@ -210,8 +200,15 @@ - (void)dealloc
210200
{
211201
[self disconnect];
212202
@try {
213-
[[NSNotificationCenter defaultCenter] removeObserver:self];
214-
[self.manager removeObserver:self forKeyPath:@"state"];
203+
204+
@try{
205+
206+
[[NSNotificationCenter defaultCenter] removeObserver:self];
207+
[self.manager removeObserver:self forKeyPath:@"state"];
208+
[[NSOperationQueue mainQueue] cancelAllOperations];
209+
}@catch(id anException){
210+
//do nothing, obviously it wasn't attached because an exception was thrown
211+
}
215212
}
216213
@catch (NSException *exception) {
217214

ios/RCTMqtt/Podfile.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ PODS:
77
- CocoaLumberjack/Core
88
- CocoaLumberjack/Extensions (2.2.0):
99
- CocoaLumberjack/Default
10-
- MQTTClient (0.6.5):
11-
- MQTTClient/Core (= 0.6.5)
12-
- MQTTClient/Core (0.6.5):
10+
- MQTTClient (0.6.9):
11+
- MQTTClient/Core (= 0.6.9)
12+
- MQTTClient/Core (0.6.9):
1313
- CocoaLumberjack
14-
- MQTTClient/Websocket (0.6.5):
14+
- MQTTClient/Websocket (0.6.9):
1515
- MQTTClient/Core
1616
- SocketRocket
1717
- SocketRocket (0.4.2)
@@ -22,7 +22,7 @@ DEPENDENCIES:
2222

2323
SPEC CHECKSUMS:
2424
CocoaLumberjack: 17fe8581f84914d5d7e6360f7c70022b173c3ae0
25-
MQTTClient: 212fb884940ce168c41223cd54a8de20ea3ca113
25+
MQTTClient: db15b4359780774a3ad876672624d7bd6f8a04d0
2626
SocketRocket: ffe08119b00ef982f6c37052a4705a057c8494ad
2727

2828
COCOAPODS: 0.39.0

ios/RCTMqtt/Pods/Headers/Private/MQTTClient/MQTTLog.h

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ios/RCTMqtt/Pods/Headers/Public/MQTTClient/MQTTLog.h

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ios/RCTMqtt/Pods/MQTTClient/MQTTClient/MQTTClient/MQTTCFSocketDecoder.m

Lines changed: 1 addition & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ios/RCTMqtt/Pods/MQTTClient/MQTTClient/MQTTClient/MQTTCFSocketEncoder.m

Lines changed: 1 addition & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ios/RCTMqtt/Pods/MQTTClient/MQTTClient/MQTTClient/MQTTCFSocketTransport.m

Lines changed: 1 addition & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ios/RCTMqtt/Pods/MQTTClient/MQTTClient/MQTTClient/MQTTCoreDataPersistence.h

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)