I keep getting an error when my CBPeripheralManager is not enabled, but in my code I feel like I did. Here is my code:
- (void)viewDidLoad { [super viewDidLoad];
Then later I call my peripheral device to start advertising using the IBAction button:
- (IBAction)advertise:(id)sender { [self.peripheralManager startAdvertising:@{ CBAdvertisementDataServiceUUIDsKey : @[[CBUUID UUIDWithString:TRANSFER_SERVICE_UUID]] }]; [self.peripheralManager startAdvertising:@{ CBAdvertisementDataTxPowerLevelKey : @(YES)}]; }
source share