-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Centralmanager methods #25
Conversation
Signed-off-by: wilson <[email protected]>
retrievePeripheralsWithIdentifiers & retrieveConnectedPeripheralsWithServices Signed-off-by: wilson <[email protected]>
Signed-off-by: wilson <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some minor changes, but looks very nice already! I'll add the method to the wiki once it's merged. Please also bump the version to 1.2.0
, thx!
|
||
NSMutableArray<TiBluetoothPeripheralProxy*> *result = [NSMutableArray array]; | ||
|
||
for (id peripheral in peripherals) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to CBPeripheral *peripheral
, since the type is determined by the array template-type
NSMutableArray<TiBluetoothPeripheralProxy*> *result = [NSMutableArray array]; | ||
|
||
for (id peripheral in peripherals) { | ||
ENSURE_TYPE(peripheral, CBPeripheral); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this as well, see above.
iphone/Classes/TiBluetoothUtils.m
Outdated
@@ -26,6 +26,22 @@ @implementation TiBluetoothUtils | |||
return result; | |||
} | |||
|
|||
+ ( NSArray<NSUUID *> * _Nullable)NSUUIDArrayFromStringArray:(NSArray<id> *)array |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be (NSArray<NSString *> *)array
, since the type must always be an NSString
.
iphone/Classes/TiBluetoothUtils.m
Outdated
NSMutableArray<NSUUID*> *result = [NSMutableArray array]; | ||
|
||
for (id uuid in array) { | ||
ENSURE_TYPE(uuid, NSString); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to NSString *uuid
and remove the ENSURE_TYPE
.
Signed-off-by: wilson <[email protected]>
Signed-off-by: wilson <[email protected]>
Thanks for pointing out! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGMT, approved! Thank you @wsliaw! 🚀
New release tagged and docs updated. |
Example: