{ "id": "166538", "key": "TIMOB-24471", "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": "19275", "description": "Patch release for 6.0.x regressions or important fixes", "name": "Release 6.0.3", "archived": false, "released": true, "releaseDate": "2017-03-22" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-03-14T21:23:41.000+0000", "created": "2017-03-09T21:18:26.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [ { "id": "18928", "name": "Release 6.0.2", "archived": false, "released": true, "releaseDate": "2017-02-27" } ], "issuelinks": [ { "id": "54545", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "166529", "key": "TIMOB-24470", "fields": { "summary": "Android: Fails to build modules that contain additional java files inside plugins folder or test folders not intended to be in distributed module", "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": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "updated": "2017-03-14T21:53: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": "13103", "name": "CLI", "description": "Node-based command line interface" }, { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "If you attempt to build an iOS module with `appc ti build`, it will fail unless there's a Classes directory that already exists. We should simply create the directory before trying to write a file to it if we need to.", "attachment": [ { "id": "61841", "filename": "ti.testmodule.zip", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-03-13T16:01:58.000+0000", "size": 29112, "mimeType": "application/zip" } ], "flagged": false, "summary": "iOS: Building an iOS module will fail if the module doesn't contain a Classes directory", "creator": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "environment": null, "closedSprints": [ { "id": 847, "state": "closed", "name": "2017 Sprint 05 SDK", "startDate": "2017-02-26T17:39:21.095Z", "endDate": "2017-03-12T17:39:00.000Z", "completeDate": "2017-03-12T19:14:38.838Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "410542", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "master: https://github.com/appcelerator/titanium_mobile/pull/8877\r\n6_0_X: https://github.com/appcelerator/titanium_mobile/pull/8878", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2017-03-09T21:21:57.000+0000", "updated": "2017-03-09T21:21:57.000+0000" }, { "id": "411412", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "For QE: I attached the sample module \"ti.testmodule\" that has it's classes in the \"src\" directory and does not have the \"Classes\" one. Without the change, it will fail during build, with the fix, it will generate the \"Classes\" directory and put the generated assets class in it.\r\n\r\nTesting steps:\r\n# Unpack the zip and navigate to {{ti.testmodule/iphone}}\r\n# Build the module with {{appc run -p ios --build-only}}\r\n\r\nExpected behavior:\r\n- Before: The build failed, the compiler could not locate the \"Classes\" directory\r\n- Fix with fix: The \"Classes\" directory is generated, the build succeeds", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-03-13T16:01:49.000+0000", "updated": "2017-03-13T16:04:09.000+0000" }, { "id": "411744", "author": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~hansknoechel] With the fix, I do see a new folder created with the name Classes, however, I get this error as well:\r\n{code}\r\n[INFO] Project directory: /Users/amukherjee/Downloads/ti.testmodule/iphone\r\n[INFO] Module ID: ti.testmodule\r\n[WARN] Please update the LICENSE file with your license text before distributing.\r\n[ERROR] [xcode-dist] ** BUILD FAILED **\r\n[ERROR] [xcode-dist] The following build commands failed:\r\n[ERROR] [xcode-dist] \tCompileC build/ti.testmodule.build/Release-iphoneos/ti.testmodule.build/Objects-normal/armv7/TiTestmoduleModule.o src/TiTestmoduleModule.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler\r\n[ERROR] [xcode-dist] \tCompileC build/ti.testmodule.build/Release-iphoneos/ti.testmodule.build/Objects-normal/arm64/TiTestmoduleModule.o src/TiTestmoduleModule.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler\r\n[ERROR] [xcode-dist] (2 failures)\r\n \r\namukherjee:iphone amukherjee$ \r\n{code}", "updateAuthor": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-03-13T23:44:50.000+0000", "updated": "2017-03-13T23:44:50.000+0000" }, { "id": "412088", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "So, to re-iterate what I stated on our standup call - I do not think the error [~amukherjee] is seeing is related to the ticket/PR/fix. My fix was solely to handle when an iOS module had no existing Classes sub-folder, it now will generate the folder if necessary before trying to generate a file underneath it. I don't really know what exactly is failing in the output above.\r\n\r\n[~amukherjee] You should be able to just generate a native iOS module using the CLI itself and then deleting the Classes folder and trying to build:\r\n{code}\r\nappc new -t timodule -n example-mod\r\ncd example-mod\r\ncd iphone\r\nrm -rf Classes\r\nappc ti build --build-only\r\n{code}", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2017-03-14T16:09:51.000+0000", "updated": "2017-03-14T16:10:16.000+0000" }, { "id": "412092", "author": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~cwilliams] Even when I follow your steps above, I get the same error. I also discovered that if I keep the Classes directory (i.e. don't delete it), but I delete the files in the Classes folder, I get the same error. So it appears that the files in the Classes directory are needed to build the module.", "updateAuthor": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-03-14T16:54:39.000+0000", "updated": "2017-03-14T17:39:48.000+0000" }, { "id": "412095", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "You cannot just delete the Classes directory, the build needs the \"xxxModule\" files. The error is probably because you have assigned the classes to that location and you did not re-reference them inside the Xcode project. That's why I've sent the example module that should not cause any problems. Let's do a Hangout if you have questions.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-03-14T17:00:30.000+0000", "updated": "2017-03-14T17:00:30.000+0000" }, { "id": "412347", "author": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR PASSED with this environment:\r\nNPM Version: 2.15.9\r\nNode Version: 4.5.0\r\nMac OS: 10.12.3\r\nAppc CLI: 6.1.0\r\nAppc CLI NPM: 4.2.8\r\nAppcelerator Studio, build: 4.8.1.201612050850\r\nXcode 8.2.1\r\n\r\nI verified that the Classes folder is created and the required files are copied into the directory. This was using 6.0.3. To verify that this fixed a problem from 6.0.2. I tried to build with the Classes folder deleted using 6.0.2, and the build failed. Therefore the fix for 6.0.3 is validated. Additionally, FR also passed with 6.1.0.\r\n\r\nEDIT: Closing this ticket as changes are confirmed in SDK 6.0.3.v20170314141715", "updateAuthor": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-03-14T21:23:31.000+0000", "updated": "2017-03-14T21:53:39.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }