Skip to content

Commit

Permalink
[Fix] iOS: 'service not found' if service supports short uuid (regres…
Browse files Browse the repository at this point in the history
…sion 1.28.5)
  • Loading branch information
chipweinberger committed Nov 20, 2023
1 parent 0b1ca30 commit e89aa95
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ios/Classes/FlutterBluePlusPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ - (CBService *)getServiceFromArray:(NSString *)uuid array:(NSArray<CBService *>
{
for (CBService *s in array)
{
if ([[s.UUID uuidStr] isEqualToString:uuid])
if ([s.UUID isEqual:[CBUUID UUIDWithString:uuid]])
{
return s;
}
Expand All @@ -848,7 +848,7 @@ - (CBCharacteristic *)getCharacteristicFromArray:(NSString *)uuid array:(NSArray
{
for (CBCharacteristic *c in array)
{
if ([[c.UUID uuidStr] isEqualToString:uuid])
if ([c.UUID isEqual:[CBUUID UUIDWithString:uuid]])
{
return c;
}
Expand All @@ -860,7 +860,7 @@ - (CBDescriptor *)getDescriptorFromArray:(NSString *)uuid array:(NSArray<CBDescr
{
for (CBDescriptor *d in array)
{
if ([[d.UUID uuidStr] isEqualToString:uuid])
if ([d.UUID isEqual:[CBUUID UUIDWithString:uuid]])
{
return d;
}
Expand Down

0 comments on commit e89aa95

Please sign in to comment.