{ "id": "117421", "key": "TIMOB-14629", "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": "15703", "description": "2013 Sprint 22", "name": "2013 Sprint 22", "archived": true, "released": true, "releaseDate": "2013-11-01" }, { "id": "15705", "description": "2013 Sprint 22 Core", "name": "2013 Sprint 22 Core", "archived": true, "released": true, "releaseDate": "2013-11-01" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-11-02T00:02:12.000+0000", "created": "2013-07-20T15:11:12.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "cli", "exports", "ios", "json", "metadata", "module", "qe-closed-3.2.0" ], "versions": [], "issuelinks": [], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2013-12-20T01:04:37.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": "13103", "name": "CLI", "description": "Node-based command line interface" }, { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h6.Issue\r\nWhen you want a module to export symbols for the app build you create a metadata.json and put something like this in it\r\n{\"exports\": [\"Ti.Media\"]}\r\n\r\nNow in CLI at [that|https://github.com/appcelerator/titanium_mobile/blob/master/iphone/cli/commands/_build.js#L2760] line, symbols are wrongly imported because the \"Ti.\" should be first removed.\r\n\r\nConsequently we get the wrong #define and we get link errors. The \"addSymbol\" method should handle this with something like this:\r\n- symbol = symbol.replace(/^(Ti|Titanium)./, \"\");\r\n\r\nh6.PR\r\nActually the find symbols process was very dirty for iOS.\r\nDecided to clean it: https://github.com/Akylas/titanium_mobile/commit/79efdba3d89cd536c7e84d037a1126030d92dff9\r\n\r\nI will create a PR if asked to do so", "attachment": [], "flagged": false, "summary": "CLI: iOS Symbols wrongly imported from metadata.json", "creator": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "environment": "ios\r\ncli 3.2.0", "comment": { "comments": [ { "id": "262562", "author": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "body": "[Moved to description]", "updateAuthor": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-07-20T17:27:26.000+0000", "updated": "2013-07-23T01:49:39.000+0000" }, { "id": "273865", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "UPDATE! I've actually redone this logic. First I have a platform agnostic symbol locator called jsanalyze.js: https://github.com/cb1kenobi/titanium_mobile/blob/timob-14976/node_modules/titanium-sdk/lib/jsanalyze.js. I've already implemented this in the new Android build and I'll be updating iOS in the next week or two. :)", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2013-10-04T20:49:17.000+0000", "updated": "2013-10-04T20:49:17.000+0000" }, { "id": "273928", "author": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "body": "wow i see a lot of things that i want :P\r\nThanks for the clarification Chris.\r\nMerging right away! :D", "updateAuthor": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "created": "2013-10-05T10:03:36.000+0000", "updated": "2013-10-05T10:03:36.000+0000" }, { "id": "277633", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Pull request: https://github.com/appcelerator/titanium_mobile/pull/4898", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2013-11-01T06:29:12.000+0000", "updated": "2013-11-01T06:29:12.000+0000" }, { "id": "284589", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Guidance for testing?", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-16T23:00:50.000+0000", "updated": "2013-12-16T23:00:50.000+0000" }, { "id": "284598", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "To test, you need a module that is written in JavaScript, but wrapped in a native module. I have no clue how to do this from scratch.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2013-12-16T23:22:31.000+0000", "updated": "2013-12-16T23:22:31.000+0000" }, { "id": "284992", "author": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "body": "Sadly i can't attach a file :s\r\nHere you go it should be working\r\nhttp://www.sendspace.com/file/pkw3kw", "updateAuthor": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "created": "2013-12-18T07:51:52.000+0000", "updated": "2013-12-18T07:51:52.000+0000" }, { "id": "284994", "author": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "body": "Also for future reference, i update the module build system to make sure assets are updated correctly before module build.\r\nI know it s done in the command line but it s REALLy good to have it from xcode. Cant really make a PR for that right now but here is the diff for future reference\r\n!http://i.imgur.com/cY2To5n.png!", "updateAuthor": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "created": "2013-12-18T08:18:22.000+0000", "updated": "2013-12-18T08:18:22.000+0000" }, { "id": "285295", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as fixed. While using [this sample test case|http://www.sendspace.com/file/pkw3kw], I was able to verify the following:\r\n\r\n0. After building the module from build.py, verified the metadata.json appears in the root level of the module\r\n1. After importing the module into a Titanium app, was able to install to device, run on simulator, and adhoc package the app without any errors\r\n2. With this code in app.js: \r\n{code}\r\nvar CommonJSTest = require('commonjs.test');\r\nTi.API.info(\"module is => \" + CommonJSTest);\r\n\r\nCommonJSTest.test();\r\n{code}\r\n\r\nVerified the native camera controls appear after launching app (see commonjs.test.js from the test case).\r\n\r\nTested on:\r\n\r\nAppcelerator Studio, build: 3.2.0.201312181652\r\nSDK build: 3.2.0.v20131218153242\r\nCLI: 3.2.0-cr3\r\nAlloy: 1.3.0-cr2\r\nXcode: 5.0.2\r\nDevices: ios simulator (6.1, 7.0.3), iphone 5 (6.1.3), iphone 5s (7.0.2)", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-12-20T01:02:59.000+0000", "updated": "2013-12-20T01:03:10.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }