Fixing uuidAsString calls in Helper key method #1237
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In iOS code, We are building a unique key for a given
peripheral / characteristic / descriptor
, with usingHelper.key
method.Here we are using
peripheral.uuidAsString
to build the final key but as this is a function and not a value, this will always return instead of the actual uuid string. and so, if we are reading BLE characteristic values for different peripherals, it will always return the same key. And eventually app will be updated with the same readcallbacks every time instead of reporting readcallbacks as per peripheral.To get the correct string we should be calling
peripheral.uuidAsString()
and so we get a unique key built for each use-caseUnderstanding by printing values:
We get logs