[TIMOB-26209] CLI: If any Xcode installs don't have EULA accepted (even one not being used), build won't work
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2018-08-14T20:25:40.000+0000 |
Affected Version/s | ioslib 1.7.2 |
Fix Version/s | Release 7.3.0, ioslib 1.7.3, ioslib 1.7.5 |
Components | CLI, iOS |
Labels | ioslib |
Reporter | Christopher Williams |
Assignee | Chris Barber |
Created | 2018-07-12T15:23:04.000+0000 |
Updated | 2018-08-14T21:53:51.000+0000 |
Description
On our CI build machines we have Xcode 8.1, 9, and 10 beta 3 installed. It seems that accepting the license for 10 beta 3 and 8.1 are mutually exclusive (i.e. if I accept 10 beta 3's license using xcodebuild -license accept, it causes Xcode 8.1 xcodebuild -checkFistLaunchStatus to return a non-zero exit code; and vice versa).
When doing ti info or a ti build, this ends up complaining with an error about the Xcode EULA not being accepted - even though in this particular case we have Xcode 10 beta 3 selected and what we are going to use for the build set up properly.
The CLI should be able to determine if the Xcode version we're using is ok and mark the other Xcode EULA acceptance as a warning instead of an error that stops the build.
+1 Same issue in here. I had Xcode 7, 8, 9 (current one) and 10 (beta). I was unable to accept EULA on older versions for some reason (7 and 8) and until I have removed them (have successfully accepted licenses on 9 and 10), build didn't work even though I have Xcode 9 selected as main one.
ioslib 1.7.x PR: https://github.com/appcelerator/ioslib/pull/81 SDK master: https://github.com/appcelerator/titanium_mobile/pull/10205 SDK 7_3_X: https://github.com/appcelerator/titanium_mobile/pull/10204
Published ioslib@1.7.3.
When trying to build with the fix in place on SDK 7.3.0, Xcodes 8.1, 8.3, 9.4, and 10 present, and with the EULA accepted on either of the Xcode 8.Xs, I get the following error: bq. [ERROR] Agreeing to the Xcode/iOS license requires admin privileges, please run “sudo xcodebuild -license” and then retry this command. This error is encountered where I used to get the error about needing to accept the EULA. Running 'sudo xcodebuild -license accept' before and after the error is encountered resulted in no change.
Here's take two. Reverted the change to ioslib@1.7 where we only check the EULA for the selected Xcode and improved EULA issue detection. This fixes
ti info
issues. Moved the Xcode EULA acceptance assertion from the pre-validate to the validate after the Xcode version has been determined. ti info issues now reports:Building with an Xcode that does not have an accepted EULA errors with the following:
ioslib 1_7_X: https://github.com/appcelerator/ioslib/pull/83 TiSDK master: https://github.com/appcelerator/titanium_mobile/pull/10249 TiSDK 7_3_X: https://github.com/appcelerator/titanium_mobile/pull/10250
Verified the changes are included in 7.3.0.v20180814130026. Xcode EULA acceptance is improved and I am able to build with multiple Xcode's of varying levels of EULA acceptance.