{ "id": "167002", "key": "TIMOB-24565", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "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": "17608", "name": "Release 6.1.0", "archived": false, "released": true, "releaseDate": "2017-05-26" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-04-14T21:38:17.000+0000", "created": "2017-04-07T14:20:56.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "cli", "ios", "titanium", "xcode8.3" ], "versions": [], "issuelinks": [], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2017-05-09T23:04:31.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" } ], "description": "First some background. I created [TiFastlane|https://github.com/ulizama/TiFastlane] as a way to be able to use [Fastlane|https://fastlane.tools/] with Titanium development. To be able to use Fastlane when archiving a build it needs to be into an .ipa archive, the way I used to do that is by a small hack, using {{dist-adhoc}} with an App Store profile. This worked until XCode 8.3 in which the Legacy API was disabled.\r\n\r\nThis puts me in the current situation to which I need some assistance.\r\n\r\nThe way I'm looking to solve it is to:\r\n# Create the .archive: {{appc run -p ios -T dist-appstore}}\r\n# Use the XCode exporter to export the archive into an ipa {{xcodebuild -exportArchive -archivePath \"~/Library/Developer/Xcode/Archives/2017-04-06/My App 2017-04-06 10-24-57.xcarchive\" -exportPath \"./dist\" -exportOptionsPlist \"./build/iphone/Info.plist\"}}\r\n\r\nI tested this manually and it works, but there are some issues I'm encountering to be able to have this work as real CLI option.\r\n\r\n*Missing method export option in the plist*\r\n\r\nThe plist generated by the CLI is missing the method, which then has xcodebuild fail when doing the export because it defaults to development so the code signing is wrong. To fix this the correct method needs to be present in the plist:\r\n{code}\r\nmethod\r\napp-store\r\n{code}\r\n\r\nThis issue doesn't happen on 6.0.1.GA, only in the latest version.\r\n\r\n*XCode Archiver Launch*\r\n\r\nThe other issue is that when the {{dist-appstore}} build finishes, it automatically tries to launch the XCode archive manager. This makes it necessary to have an extra human intervention in the step, which breaks the whole automatic process.\r\n\r\nIt would be great if we could have a way to override that feature, so that when the build finishes it doesn't do anything else.\r\n\r\n\r\nI'm more than willing to help out in doing changes or tests on the CLI to achieve this, but this is my first time hacking the Ti CLI so I'm a bit lost on what goes where.\r\n\r\nAside from these fixes, it might be worth it to add a {{--export-ipa}} option on the build process so that the CLI automatically does the second step of calling the exporter so we end up with an ipa ready to use for the App Store.\r\n\r\n", "attachment": [], "flagged": false, "summary": "iOS CLI: Improve the way dist-appstore build works", "creator": { "name": "ulizama", "key": "ulizama", "displayName": "Uriel Lizama", "active": true, "timeZone": "America/Mexico_City" }, "subtasks": [], "reporter": { "name": "ulizama", "key": "ulizama", "displayName": "Uriel Lizama", "active": true, "timeZone": "America/Mexico_City" }, "environment": "Titanium 6.0.3.GA", "closedSprints": [ { "id": 870, "state": "closed", "name": "2017 Sprint 08 Tooling", "startDate": "2017-04-10T15:37:01.358Z", "endDate": "2017-04-24T15:37:00.000Z", "completeDate": "2017-04-23T21:40:36.711Z", "originBoardId": 199 } ], "comment": { "comments": [ { "id": "417101", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "For the missing method, couldn't you just add it in [here|https://github.com/appcelerator/titanium_mobile/blob/master/iphone/cli/commands/_build.js#L3781] by checking the deployment-target and do something like {{plist.method = \"app-store\"}} (or what ever target is selected).\r\n\r\nFor the Archiver launch, does {{--build-only}} not work? Thanks!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-04-10T13:18:56.000+0000", "updated": "2017-04-10T13:18:56.000+0000" }, { "id": "417149", "author": { "name": "ulizama", "key": "ulizama", "displayName": "Uriel Lizama", "active": true, "timeZone": "America/Mexico_City" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/8954", "updateAuthor": { "name": "ulizama", "key": "ulizama", "displayName": "Uriel Lizama", "active": true, "timeZone": "America/Mexico_City" }, "created": "2017-04-10T21:01:35.000+0000", "updated": "2017-04-10T21:01:35.000+0000" }, { "id": "417447", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "6_1_X backport: https://github.com/appcelerator/titanium_mobile/pull/8966", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2017-04-14T21:37:17.000+0000", "updated": "2017-04-14T21:37:17.000+0000" }, { "id": "419424", "author": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Node Version: 6.10.1\r\nNPM Version: 3.10.10\r\nMac OS: 10.12.4\r\nAppc CLI: 6.2.0\r\nAppc CLI NPM: 4.2.9\r\nTitanium SDK version: 6.1.0.v20170509114242\r\nAppcelerator Studio, build: 4.8.1.201612050850\r\nXcode 8.3.2\r\n\r\nTested with the above environment. I first created an app, and built to the app-store with \r\n{code}\r\nappc run -p ios -T dist-appstore\r\n{code}\r\nXCode launched and opened the archive manager. I then tried:\r\n{code}\r\nappc run -p ios -T dist-appstore --output-dir ~/Desktop\r\n{code}\r\nIn this case a .ipa file was created on the Desktop, and XCode did not launch. This is expected behavior.", "updateAuthor": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-05-09T23:03:39.000+0000", "updated": "2017-05-09T23:03:39.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }