breautek commented on code in PR #168:
URL: 
https://github.com/apache/cordova-plugin-device/pull/168#discussion_r917017043


##########
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:
   I see, thanks for the clarification.
   
   If that's the case. perhaps we should document that in the comment. I can 
definitely see someone coming along in the future without that bit of 
knowledge, and going by the documentation, and potentially removing the 
stripping in attempt to simplify the codebase.



-- 
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]

Reply via email to