{ "id": "166843", "key": "TIMOB-24543", "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": null, "resolutiondate": null, "created": "2017-03-29T11:47:41.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "cb-tooling" ], "versions": [], "issuelinks": [], "assignee": null, "updated": "2020-01-31T20:53:45.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Here is the thing: The developer has a native iOS module, creates it with {{appc ti new -t timodule}} and finds the \"assets\" directory in the top directory. You create a \"test.js\" or place an image in there. When using the (deprecated) build.py, it will encrypt the files and copy the generated ones into /iphone/assets. When using the {{appc ti build -p ios --build-only}} command, the directory will not be copied to the zip and the generated \"assets\" directory is not copied to iphone/assets. If you place the assets in iphone/assets directly, this will still not copy it to the module zip.\r\n\r\nSee the attached module project and use the above comments to check the output.\r\n\r\nProposed fixes:\r\n- Copy the encrypted assets into the zip file\r\n- Do not place the generated \"assets\" diretory in /iphone (only happening with build.py, so that's fine since it's deprecated).", "attachment": [], "flagged": false, "summary": "iOS: Module assets not copied to packaged module, additional weird behaviors", "creator": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "comment": { "comments": [ { "id": "416126", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hey [~cbarber], more iOS module CLI stuff! I also noticed that the generated .zip is sometimes corrupt and throws a zip-error, but that's something different.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-03-29T11:48:45.000+0000", "updated": "2017-03-29T11:48:45.000+0000" }, { "id": "416318", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "I'm not very well versed on how .js files should be handled during the module build. CommonJS module should definitely be encrypted via {{titanium_prep}}, but for a native module has a .js file in the assets directory, I'm not certain the expected behavior.\r\n\r\nRegarding the corrupt zip files, that's interesting. We switched to archiver instead of adm-zip and we haven't had too many issues. Every Android build uses archiver to generate the apk. One thing that comes to mind is I have a pending PR (https://github.com/appcelerator/titanium_mobile/pull/8900) just waiting for someone to click the merge button that will update archiver from v1.0.1 to v1.3.0. There may have been a known issue that has been resolved?", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2017-03-30T04:24:41.000+0000", "updated": "2017-03-30T04:24:41.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }