iphone - LE_POWER_OFF_HEADER default alert using CoreBluetooth -


i'm using core bluetooth on project , works fine, when bluetooth on device disabled, alert text le_power_off_header , buttons "settings" , "cancel". i change text , language.

it seem default alert , can't change it.

the alert pops when central state poweredoff. use function check central manager's state:

- (void)centralmanagerdidupdatestate:(cbcentralmanager *)central{  nsstring *messtoshow;  switch (central.state) {     case cbcentralmanagerstateunknown:     {         messtoshow=[nsstring stringwithformat:@"state unknown, update imminent."];         break;     }     case cbcentralmanagerstateresetting:     {         messtoshow=[nsstring stringwithformat:@"the connection system service momentarily lost, update imminent."];         break;          }     case cbcentralmanagerstateunsupported:          {         messtoshow=[nsstring stringwithformat:@"the platform doesn't support bluetooth low energy"];         break;          }     case cbcentralmanagerstateunauthorized:          {         messtoshow=[nsstring stringwithformat:@"the app not authorized use bluetooth low energy"];         break;          }     case cbcentralmanagerstatepoweredoff:          {         messtoshow=[nsstring stringwithformat:@"bluetooth powered off."];         break;          }     case cbcentralmanagerstatepoweredon:          {         messtoshow=[nsstring stringwithformat:@"bluetooth powered on , available use."];         [mgr scanforperipheralswithservices:[nsarray arraywithobject:[cbuuid uuidwithstring:@"180d"]] options:nil];         [mgr retrieveconnectedperipherals];          //--- works, in area!          break;     }     } nslog(messtoshow); } 

try device, proper message in localized language.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -