Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26209] CLI: If any Xcode installs don't have EULA accepted (even one not being used), build won't work

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2018-08-14T20:25:40.000+0000
Affected Version/sioslib 1.7.2
Fix Version/sRelease 7.3.0, ioslib 1.7.3, ioslib 1.7.5
ComponentsCLI, iOS
Labelsioslib
ReporterChristopher Williams
AssigneeChris Barber
Created2018-07-12T15:23:04.000+0000
Updated2018-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.

Comments

  1. Uglješa Erceg 2018-07-16

    +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.
  2. Chris Barber 2018-07-24

    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
  3. Chris Barber 2018-07-24

    Published ioslib@1.7.3.
  4. Eric Wieber 2018-08-06

    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.
  5. Chris Barber 2018-08-13

    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:
       iOS Issues
         !  Multiple Xcode versions have not had their EULA accepted:
              9.3.1 (/Applications/Xcode-9.3.1.app)
              9.4.1 (/Applications/Xcode.app)
            Launch each Xcode and accept the license.
       
    Building with an Xcode that does not have an accepted EULA errors with the following:
       [ERROR] Xcode 9.4.1 end-user license agreement has not been accepted.
       [ERROR] Please launch "/Applications/Xcode.app" or run "sudo xcodebuild -license" and accept the license.
       
    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
  6. Eric Wieber 2018-08-14

    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.

JSON Source