{ "id": "81130", "key": "TIMOB-5815", "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": "12093", "description": "", "name": "Sprint 2012-01", "archived": true, "released": true, "releaseDate": "2012-01-15" }, { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" }, { "id": "12677", "description": "Release 1.8 Service Pack 1", "name": "Release 1.8.1", "archived": true, "released": true, "releaseDate": "2012-01-31" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-01-23T16:39:27.000+0000", "created": "2011-10-05T07:43:15.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "module_module", "qe-testadded" ], "versions": [ { "id": "11570", "description": "", "name": "Release 1.7.2", "archived": true, "released": true, "releaseDate": "2011-07-21" }, { "id": "11331", "description": "", "name": "Release 1.8.0", "archived": true, "released": true, "releaseDate": "2011-10-31" } ], "issuelinks": [ { "id": "14290", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "83371", "key": "TIMOB-6458", "fields": { "summary": "iOS: CommonJS - native JavaScript modules for iOS encounter errors when referencing classes/objects in the Ti namespace", "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" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "14443", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "84248", "key": "TIMOB-7001", "fields": { "summary": "IOS pure js module - build.py fails ", "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" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-02-03T14:59:46.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": "When a release build (run on iOS device) is done, a set of defines are generated to strip the binairy down to the API parts that are used in the App. When certain API's are only used in a JS module and not in the App, the application will crash since they are missing. Define (pseudo) calls to the API's in the app, and the module works.\r\n\r\nIn the simulator, all API's are included so everything works as expected.", "attachment": [ { "id": "23778", "filename": "nl.icept.pull2refresh-iphone-1.0.zip", "author": { "name": "martijn", "key": "martijn", "displayName": "Martijn Bogaard", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-10-20T12:55:22.000+0000", "size": 60821, "mimeType": "application/zip" }, { "id": "23777", "filename": "TC-280 Testcase.zip", "author": { "name": "martijn", "key": "martijn", "displayName": "Martijn Bogaard", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-10-20T12:55:22.000+0000", "size": 133055, "mimeType": "application/zip" }, { "id": "24928", "filename": "ti.5815.js", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-04T16:00:10.000+0000", "size": 138, "mimeType": "application/x-javascript" }, { "id": "24929", "filename": "timob-5815-test.tar.gz", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-04T16:00:10.000+0000", "size": 1710398, "mimeType": "application/x-gzip" } ], "flagged": false, "summary": "iOS: Native JS Modules not taken in consideration when running the optimalizer for a release build", "creator": { "name": "martijn", "key": "martijn", "displayName": "Martijn Bogaard", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "martijn", "key": "martijn", "displayName": "Martijn Bogaard", "active": true, "timeZone": "Europe/Berlin" }, "environment": "Titanium Mobile 1.7.2 for iOS\r\nTitanium Mobile 1.8.0 for iOS", "comment": { "comments": [ { "id": "169829", "author": { "name": "mapperson", "key": "mapperson", "displayName": "Matthew Apperson", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Martijn,\r\n\r\nAre you talking about a native JS module? or a commonJS module?\r\n\r\nBest regards,\r\nMatt", "updateAuthor": { "name": "mapperson", "key": "mapperson", "displayName": "Matthew Apperson", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-10-20T09:51:47.000+0000", "updated": "2011-10-20T09:51:47.000+0000" }, { "id": "169896", "author": { "name": "martijn", "key": "martijn", "displayName": "Martijn Bogaard", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hi Matt,\r\n\r\nI uploaded a Testcase + a broken module for you. To run it, you need to install version 1.0 of the pull2refresh module.\r\n\r\n- Run the project in the simulator. It works normally.\r\n\r\n- Run it on a iOS device. It crash (2 crashes actually, the show of the errorview crash also, but thats probably since the initialization isnt fully done yet) since Ti.UI.iPhone is missing. \r\n\r\nThe only differences between the 2 cases is defines.h. When you build for the device, he checks wich parts of the API must be included. IMO he should also load the JS of the module and include the used parts. Since the JS is embedded as a hex encoded string in the static archive, it shouldn't be hard to extract it. Or add a new file which contains the API parts the module is using.\r\n\r\nFor now i have a workaround to manually define the required parts in the module xcconfig, but this issue is not documentated and you can easy miss a part of the API you need or the define could be changed in a future release. \r\n\r\nMartijn\r\n", "updateAuthor": { "name": "martijn", "key": "martijn", "displayName": "Martijn Bogaard", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-10-20T12:56:27.000+0000", "updated": "2011-10-20T12:56:40.000+0000" }, { "id": "178041", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "h4. TESTING\r\n----\r\n\r\n# Remove any existing SDK install for the version you're testing (1.9.0) - this contains the stale {{json.py}} file that was deleted as part of the commit.\r\n# Install the SDK you are testing against\r\n# Import the timob-5815-test project into TiStudio\r\n# Create the ti.5815 module\r\n#* Create a new module (either via commandline or TiStudio) with the identifier {{ti.5815}}\r\n#* Place the {{ti.5815.js}} file in {{/assets}}\r\n#* Build the module via {{build.py}}\r\n#* Copy the module zipfile to the project directory for {{timob-5815-test}} and install\r\n# Build for simulator\r\n#* Ensure that the {{/build/iphone/Classes/defines.h}} file is the default (all symbols)\r\n#* Ensure that the app runs on simulator. Output should be:\r\n{code}\r\n[WARN] awww yeah com.appcelerator.5815test\r\n[INFO] SUPER!\r\n{code}\r\n# Build for device\r\n#* Ensure that the {{/build/iphone/Classes/defines.h}} file contains only the necessary symbol info (note that there may be more than this in the file, but these are required to validate the bug):\r\n{code}\r\n#define USE_TI_API\r\n#define USE_TI_FILESYSTEM\r\n#define USE_TI_FILESYSTEMGETFILE\r\n#define USE_TI_FILESYSTEMRESOURCESDIRECTORY\r\n#define USE_TI_APIINFO\r\n#define USE_TI_APIWARN\r\n#define USE_TI_APP\r\n#define USE_TI_APPID\r\n{code}\r\n#* Ensure that the application runs on device with the proper output\r\n# Export the project via the {{transport.py}} script:\r\nbq. {{/iphone/transport.py }}\r\n#* Open the xcode project for the export, {{/build/iphone/timob-5815-test.xcodeproj}}\r\n#* Confirm that the xcode project builds and runs on both simulator and device with the expected output\r\n#* Confirm that after a build (either for simulator or device), the {{/build/iphone/Classes/defines.h}} includes the appropriate symbol info (as above)", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-04T16:13:36.000+0000", "updated": "2012-01-05T14:23:37.000+0000" }, { "id": "178042", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "NOTE: When resolving this ticket, TIMOB-6458 should be resolved as a DUPLICATE and link back to this ticket in the comment posted while resolving.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-04T16:14:34.000+0000", "updated": "2012-01-04T16:14:34.000+0000" }, { "id": "178143", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "NOTE: When resolving this ticket, TIMOB-7001 should be resolved as FIXED provided that step 4. above passes.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-05T10:05:23.000+0000", "updated": "2012-01-10T18:42:13.000+0000" }, { "id": "179261", "author": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with 1.9.0.v20120112153134 on simulator and ipod 4.3.3 device", "updateAuthor": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-13T15:11:42.000+0000", "updated": "2012-01-13T15:11:42.000+0000" } ], "maxResults": 10, "total": 10, "startAt": 0 } } }