File tree Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -85,27 +85,27 @@ - (void)appDidBecomeActive {
85
85
resolve ([NSNumber numberWithInt: clientRef]);
86
86
87
87
}
88
- RCT_EXPORT_METHOD (connect:(int ) clientRef) {
88
+ RCT_EXPORT_METHOD (connect:(nonnull NSNumber * ) clientRef) {
89
89
90
- [[[self clients ] objectForKey: [ NSNumber numberWithInt: clientRef] ] connect ];
90
+ [[[self clients ] objectForKey: clientRef] connect ];
91
91
92
92
}
93
93
94
94
95
- RCT_EXPORT_METHOD (disconnect:(int ) clientRef) {
96
- [[[self clients ] objectForKey: [ NSNumber numberWithInt: clientRef] ] disconnect ];
95
+ RCT_EXPORT_METHOD (disconnect:(nonnull NSNumber * ) clientRef) {
96
+ [[[self clients ] objectForKey: clientRef] disconnect ];
97
97
}
98
98
99
- RCT_EXPORT_METHOD (subscribe:(int ) clientRef topic:(NSString *)topic qos:(int )qos) {
100
- [[[self clients ] objectForKey: [ NSNumber numberWithInt: clientRef]] subscribe: topic qos: [ NSNumber numberWithInt : qos]];
99
+ RCT_EXPORT_METHOD (subscribe:(nonnull NSNumber * ) clientRef topic:(NSString *)topic qos:(nonnull NSNumber * )qos) {
100
+ [[[self clients ] objectForKey: clientRef] subscribe: topic qos: qos]];
101
101
102
102
}
103
103
104
- RCT_EXPORT_METHOD (publish:(int ) clientRef topic:(NSString *)topic data:(NSString *)data qos:(int )qos retain:(int )retain) {
105
- [[[self clients ] objectForKey: [ NSNumber numberWithInt: clientRef] ] publish: topic
106
- data: [data dataUsingEncoding: NSUTF8StringEncoding]
107
- qos: [ NSNumber numberWithInt: qos]
108
- retain: ( BOOL ) retain];
104
+ RCT_EXPORT_METHOD (publish:(nonnull NSNumber * ) clientRef topic:(NSString *)topic data:(NSString *)data qos:(nonnull NSNumber * )qos retain:(BOOL )retain) {
105
+ [[[self clients ] objectForKey: clientRef] publish: topic
106
+ data: [data dataUsingEncoding: NSUTF8StringEncoding]
107
+ qos: qos
108
+ retain: retain];
109
109
110
110
}
111
111
You can’t perform that action at this time.
0 commit comments