[TIMOB-19772] Prompt user to accept Xcode license agreement in response to "Error 69" in debug log
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2015-10-24T00:23:20.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 5.1.2 |
Components | n/a |
Labels | n/a |
Reporter | Ingo Muschenetz |
Assignee | Chris Barber |
Created | 2015-10-22T17:52:50.000+0000 |
Updated | 2015-11-23T22:45:11.000+0000 |
Description
If Xcode needs a license to be accepted, you will get the following error:
[ERROR] : An error occurred during build after 15s 47ms
[ERROR] : 69
TRACE | titanium exited with exit code 1
ERROR | Error: ti run exited with error code 1
at ChildProcess.<anonymous>
You will see this in the build log:
[TRACE] Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.
However, error "69" seems to be indicative of this specific problem. We should catch that error value and correctly prompt the user to accept the license agreement.
If we want to be truly elegant, we can do "sudo xcrun cc" and prompt the user ourselves.
Exploring the possibility of executing
xcodebuild -checkFirstLaunchStatus
to check if Xcode needs to be launched first.ioslib PR: https://github.com/appcelerator/ioslib/pull/28 Published ioslib@0.8.0.
Master PR: https://github.com/appcelerator/titanium_mobile/pull/7343 5_1_X PR: https://github.com/appcelerator/titanium_mobile/pull/7344
To test, run "ti info -t ios" and check out the new "EULA Accepted" field under each Xcode. Should you have a machine available that has a fresh install of Xcode that has NOT been run yet, the run a "ti build -p ios" and check out the glorious error message.
PRs merged.
Verified fixed, using: MacOS 10.11.2 (15C47a) Studio 4.4.0.201511182122 Ti SDK 5.1.1.v20151122191220 Appc NPM 4.2.2 Appc CLI 5.1.0 Xcode 7.1.1 (7B1005) Error 69 no longer appears and you see a glorious error message, instead, which clearly explains that Xcode needs to be opened and the agreement should be accepted.
appc ti info -t ios
also indicates if the agreement has been accepted.