BigBalli commented on code in PR #168:
URL:
https://github.com/apache/cordova-plugin-device/pull/168#discussion_r916829576
##########
src/ios/CDVDevice.m:
##########
@@ -86,10 +86,14 @@ - (void)getDeviceInfo:(CDVInvokedUrlCommand*)command
- (NSDictionary*)deviceProperties
{
UIDevice* device = [UIDevice currentDevice];
+ //strip non-alphanumeric from device name
+ NSCharacterSet *charactersToRemove = [[NSCharacterSet
alphanumericCharacterSet] invertedSet];
+ NSString *deviceName = [[[device name]
componentsSeparatedByCharactersInSet:charactersToRemove]
componentsJoinedByString:@""];
Review Comment:
True, Apple's documentation states "alphanumeric string" but from experience
it is not so.
You can go change your device's name to anything you want (ie no forbidden
characters).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]