{ "id": "165931", "key": "TIMOB-24395", "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": "18928", "name": "Release 6.0.2", "archived": false, "released": true, "releaseDate": "2017-02-27" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-02-13T22:12:34.000+0000", "created": "2017-02-09T19:16:42.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2017-02-13T22:12:44.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" }, { "id": "10207", "name": "Tooling" } ], "description": "Build an app for {{dist-appstore}}, then without changing anything, build again. The build fails with:\r\n\r\n{code}\r\n[INFO] Skipping xcodebuild\r\n[ERROR] An error occurred during build after 5s 103ms\r\n[ERROR] Staging archive directory does not exist\r\n{code}\r\n\r\nThe reason is that after the first build, the staging archive directory is MOVED to {{~/Library/Developer/Xcode/Archives}} and then during the second build, Xcodebuild is NOT invoked and thus the staging directory does not exist.\r\n\r\nThe solution is to copy the staging archive directory to the Xcode archive directory.\r\n\r\nAlso, subsequent {{dist-adhoc}} builds fail because the intermediate files are deleted by the Titanium iOS build's differential build system.\r\n\r\nNote that the generated adhoc IPA file was placed in a directory with the same name as the IPA file.\r\n\r\nSince both adhoc and appstore builds switched to {{xcodebuild archive}} to accommodate Xcode 8.3 having removed {{PackageApplication}}, the differential build system is slightly broken and doesn't properly add/remove/update resources in the output archive. To fix this, we must invoke {{xcodebuild}} to force the staged assets to be copied into the output archive.", "attachment": [], "flagged": false, "summary": "iOS: subsequent dist builds fail", "creator": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "environment": "Titanium SDK master (6.1.0)\r\nXcode 8.3 beta 2", "comment": { "comments": [ { "id": "406765", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Titanium SDK master PR: https://github.com/appcelerator/titanium_mobile/pull/8827\r\nTitanium SDK 6_0_X PR: https://github.com/appcelerator/titanium_mobile/pull/8828\r\n\r\nTo test:\r\n\r\nApp Store Builds\r\n1. Create an Titanium iOS app\r\n2. Add a new image to the {{Resources}} directory\r\n3. Perform {{dist-appstore}} build\r\n4. Without changing anything, do the exact same {{dist-appstore}} build command\r\n5. Note that the build works!\r\n6. Delete the image you added {{Resources}} directory\r\n7. Build again using the exact same {{dist-appstore}} build command\r\n8. Note that the build works and the file has been removed!\r\n\r\nAdhoc Builds\r\n1. Create an Titanium iOS app\r\n2. Add a new image to the {{Resources}} directory\r\n3. Perform {{dist-adhoc}} build\r\n4. Without changing anything, do the exact same {{dist-adhoc}} build command\r\n5. Note that the build works and that the IPA is in the {{/.ipa}} file\r\n6. Delete the image you added {{Resources}} directory\r\n7. Build again using the exact same {{dist-adhoc}} build command\r\n8. Note that the build works and the IPA file no longer contains the image you removed!\r\n", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2017-02-09T20:24:50.000+0000", "updated": "2017-02-09T20:24:50.000+0000" }, { "id": "406930", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed, using:\r\nMacOS 10.12 (16A323)\r\nStudio 4.8.1.201701192045\r\nTi SDK 6.0.2\r\nAppc NPM 4.2.8\r\nAppc CLI 6.1.0\r\nAlloy 1.9.5\r\nXcode 8.3 (8W120l)\r\n\r\nPerformed subsequent builds on Alloy and Classic projects and did not encounter any errors. Then tested differential builds by packaging projects multiple times for Ad Hoc and App Store, with minor, trackable changes. Package contents were as expected on each build.\r\n\r\nVerified in SDK builds 6.0.2.v20170213102549 and 6.1.0.v20170213134957.", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-02-13T22:12:34.000+0000", "updated": "2017-02-13T22:12:34.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }