You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Shazron Abdullah (JIRA)" <ji...@apache.org> on 2012/11/13 20:32:12 UTC

[jira] [Commented] (CB-1837) Device core plugin - device.name should return the actual device string (eg iPod Touch, iPhone 3GS)

    [ https://issues.apache.org/jira/browse/CB-1837?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13496470#comment-13496470 ] 

Shazron Abdullah commented on CB-1837:
--------------------------------------

[UIDevice model] only returns the basic info, like "iPhone" or "iPod Touch". Not sure if want to return the actual model like iPad2,5:

{code}
size_t size;
sysctlbyname("hw.machine", NULL, &size, NULL, 0);
char *machine = malloc(size);
sysctlbyname("hw.machine", machine, &size, NULL, 0);
NSString* _platform = [NSString stringWithCString:machine encoding:NSASCIIStringEncoding];
free(machine);
{code}
                
> Device core plugin - device.name should return the actual device string (eg iPod Touch, iPhone 3GS)
> ---------------------------------------------------------------------------------------------------
>
>                 Key: CB-1837
>                 URL: https://issues.apache.org/jira/browse/CB-1837
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>            Reporter: Shazron Abdullah
>            Assignee: Shazron Abdullah
>             Fix For: 2.3.0
>
>
> Device.name returns the custom device name as the user defines it
> in iTunes. It should return the model name, I.e. What device.platform
> returns now (related: CB-1836)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira