{ "id": "61279", "key": "TIMOB-647", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "11223", "name": "Release 1.3.0", "archived": true, "released": true, "releaseDate": "2010-05-05" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:53:48.000+0000", "created": "2011-04-15T02:33:38.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:53:48.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}

from ticket:

\n

http://helpdesk.appcelerator.net/tickets/1653

\n

i believe these are available - see:

\n

\nhttp://stackoverflow.com/questions/2023592/iphone-wifi-subnet-mask-...

{html}", "attachment": [], "flagged": false, "summary": "add subnet and external ip to platform API", "creator": { "name": "nwright", "key": "nwright", "displayName": "Nolan Wright", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "nwright", "key": "nwright", "displayName": "Nolan Wright", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "123711", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Need more information. Does 'external ip' refer to the IP\nassigned to the phone, or the IP of the router?

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:33:38.000+0000", "updated": "2011-04-15T02:33:38.000+0000" }, { "id": "123712", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

I've gathered that this is what the user wants:

\n\n

1 & 2 are possible. Getting the external IP address is much\nharder, unless it refers to the EDGE/3G address assigned to the\nphone.

\n

Some more notes which I'll update as time goes on, germane to\nusing getifaddrs:

\n

en0: wifi
\npdp_ip0: data network
\nlo0: loopback (127.0.0.1)

\n

Note that this code will use getifaddrs() directly, which may or\nmay not be considered \"legal\" under the iPhone guidelines since\nit's a BSD function. This is the only way to get the information;\nas with sockets, the system configuration framework is crippled on\niPhone.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:33:38.000+0000", "updated": "2011-04-15T02:33:38.000+0000" }, { "id": "123713", "author": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "body": "{html}

(from [b46736df8d8bbcebfe3d9c5820a7ea681db0343b])\nCloses #647: 'address' now works right, 'dataAddress'\nand 'netmask' properties added to Platform. \nhttp://github.com/appcelerator/titanium_mobile/commit/b46736df8d8bb...

{html}", "updateAuthor": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:33:38.000+0000", "updated": "2011-04-15T02:33:38.000+0000" }, { "id": "123714", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Very important note on this fix: It's only been tested on a 2G\nphone. You will need to test it across a broad spectrum of devices\n(any model of iPod touch, 3G, 3GS) before this can be absolutely\nconfirmed. I've closed the bug anyway.

\n

There's no way to get a phone's external address (beyond data)\nsimply because the phone will always reside behind a router on\nwifi.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:33:39.000+0000", "updated": "2011-04-15T02:33:39.000+0000" }, { "id": "123715", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Works on my 2G, but apparently not Nolan's 3GS. Rolled back the\nfix and reopened until we can perform some diagnostics on all\nplatforms and add in some emulation for simulation (since right now\nnetwork information doesn't work under the simulator in most\ncases).

\n

Devices tested so far: 2G.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:33:39.000+0000", "updated": "2011-04-15T02:33:39.000+0000" }, { "id": "123716", "author": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "body": "{html}

(from [1519d4247c4f8b88b966ca28b1cb38282411eb85])\nCloses #647. Confirmed to work by me, matches\ninformation about other devices provided by Blain (thanks Blain).\nComment on the bug again if netmask issues persist. \nhttp://github.com/appcelerator/titanium_mobile/commit/1519d4247c4f8...

{html}", "updateAuthor": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:33:39.000+0000", "updated": "2011-04-15T02:33:39.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }