I am developing for a company that is using ble to communicate with their climate control system. They want to have all the lighting -for example- to have the same UUID's and that is were this plugin is running into problems within iOS.
The NSMutableDictionary characteristicsCallbacks is using the UUID's as key to save the callbacks. When you (like in my case) are using shared UUID's, some callbacks are being overwritten and will cause problems. When you use the hash of the object, you can bypass this problem. (Note, that you will still need to read before notify, if necessary)
This is how I solved the problem for every self.characteristicsCallbacks:
NSNumber* key = [NSNumber numberWithLong:(unsigned long)characteristic.hash]; self.characteristicsCallbacks[key];
I am developing for a company that is using ble to communicate with their climate control system. They want to have all the lighting -for example- to have the same UUID's and that is were this plugin is running into problems within iOS.
The NSMutableDictionary characteristicsCallbacks is using the UUID's as key to save the callbacks. When you (like in my case) are using shared UUID's, some callbacks are being overwritten and will cause problems. When you use the hash of the object, you can bypass this problem. (Note, that you will still need to read before notify, if necessary)
This is how I solved the problem for every self.characteristicsCallbacks:
NSNumber* key = [NSNumber numberWithLong:(unsigned long)characteristic.hash]; self.characteristicsCallbacks[key];