{ "id": "100904", "key": "TIMOB-10914", "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": [], "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2016-08-24T19:28:00.000+0000", "created": "2012-09-12T03:02:41.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "community", "core", "exalture", "parity" ], "versions": [ { "id": "13273", "description": "Release 2.0.2", "name": "Release 2.0.2", "archived": false, "released": true, "releaseDate": "2012-05-31" } ], "issuelinks": [], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-24T21:58:45.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": "My example application breaks when being built for iOS devices (e.g. via Run on \"iOS device\"), it does not break in the iOS simulator.\r\n\r\nThis is an inconsistency that can introduce bugs in software when people just run quick tests in the iOS simulator. Here is my example code:\r\n\r\n{code}\r\n\tvar MyNamespace,\r\n\t win;\r\n\t\r\n\ttry {\r\n\t\tMyNamespace = {};\r\n\t\tMyNamespace.Titanium = {};\r\n\t\tMyNamespace.Titanium.UI = {};\r\n\t\tMyNamespace.Titanium.UI.createWindow = function (params) {\r\n\t\t\tvar result = Titanium.UI.createWindow(params);\r\n\t\t\t\r\n\t\t\tif (!params.hasOwnProperty('orientationModes')) {\r\n\t\t\t\tresult.orientationModes = [\r\n\t\t\t\t\tTitanium.UI.PORTRAIT\r\n\t\t\t\t];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn result;\r\n\t\t};\r\n\t\t\r\n\t\twin = MyNamespace.Titanium.UI.createWindow({\r\n\t\t\tbackgroundColor: '#fff',\r\n\t\t\tnavBarHidden: true\r\n\t\t});\r\n\t\twin.open();\r\n\t} catch (e) {\r\n\t\talert(\"Ooops! Someone broke *.Titanium.UI.*: \" + e);\r\n\t}\r\n\r\n{code}\r\n\r\nThis code works as expected in the iOS simulator and on Android device. I have not tested the Android emulator (yet I am confident that it will work). The code does not work on iOS devices yielding this alert message:\r\n\r\n{{Oooops! Someone broke \\*.Ti.UI.\\*: TypeError: 'undefined' is not an object (evaluating 'MyNamespace.Ti.UI = {}')}}\r\n\r\nObservations:\r\n# {{MyNamespace.Titanium.UI}} gets changed into {{MyNamespace.Ti.UI}} (which breaks my code)\r\n# Even the string fragment {{\"\\*.Titanium.UI.\\*\"}} will be changed into {{\"\\*.Ti.UI.\\*\"}}", "attachment": [], "flagged": false, "summary": "iOS: When building for iOS devices, the string \"Titanium\" will be crippled in my application", "creator": { "name": "herzberg", "key": "herzberg", "displayName": "Sven Herzberg", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "herzberg", "key": "herzberg", "displayName": "Sven Herzberg", "active": true, "timeZone": "Europe/Berlin" }, "environment": "Mac OS 10.6.8\r\nTitanium Studio 2.1.2.201208301612\r\nTitanium Mobile 2.0.2.GA (as 2.1.x won't work on Snow Leopard)", "comment": { "comments": [ { "id": "394153", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "I cannot reproduce with Titanium SDK master (6.1.0). I suspect this is because we properly AST parse and minify JS code now. I believe this was fixed in 3.0.0 with the iOS build rewrite.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2016-08-24T19:28:00.000+0000", "updated": "2016-08-24T19:28:00.000+0000" }, { "id": "415814", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as the issue cannot be reproduced and with reference to the previous comments.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-24T21:58:45.000+0000", "updated": "2017-03-24T21:58:45.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }