- [CBCentralManager retrievePeripheralsWithIdentifiers:] is a synchronous method.
On Jul 2, 2014, at 4:21 PM, Rick Mann <rmann(a)latencyzero.com> wrote:
> I'm remembering the last-connected peripheral by storing the identifier in NSUserDefaults, then trying to retrieve that peripheral on the next launch.
>
> Store:
>
> NSString* uuid = self.peripheral.identifier.UUIDString;
> // Store uuid in NSUserDefaults
>
> Retrieve:
>
> NSUUID* uuid = [[NSUUID alloc] initWithUUIDString: inPeripheralIdentifier];
> [self.cm retrievePeripheralsWithIdentifiers: @[ uuid ]];
>
> But -centralManager:didRetrievePeripherals: is never called (at all, even with an error).
>
> Am I doing something wrong? Thanks!
>
> --
> Rick
>
>
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Bluetooth-dev mailing list (Bluetooth-dev(a)lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/bluetooth-dev/conn%40apple.com
>
> This email sent to conn(a)apple.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Bluetooth-dev mailing list (Bluetooth-dev(a)lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/bluetooth-dev/site_archiver%40lists…
This email sent to site_archiver(a)lists.apple.com
I'm remembering the last-connected peripheral by storing the identifier in NSUserDefaults, then trying to retrieve that peripheral on the next launch.
Store:
NSString* uuid = self.peripheral.identifier.UUIDString;
// Store uuid in NSUserDefaults
Retrieve:
NSUUID* uuid = [[NSUUID alloc] initWithUUIDString: inPeripheralIdentifier];
[self.cm retrievePeripheralsWithIdentifiers: @[ uuid ]];
But -centralManager:didRetrievePeripherals: is never called (at all, even with an error).
Am I doing something wrong? Thanks!
--
Rick
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Bluetooth-dev mailing list (Bluetooth-dev(a)lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/bluetooth-dev/site_archiver%40lists…
This email sent to site_archiver(a)lists.apple.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Bluetooth-dev mailing list (Bluetooth-dev(a)lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/bluetooth-dev/site_archiver%40lists…
This email sent to site_archiver(a)lists.apple.com