appium / appium-mac2-driver

Next-gen Appium macOS driver, backed by Apple XCTest
Apache License 2.0
115 stars 24 forks source link

[issue]: automate appium-mac2-driver requirements of Xcode install #197

Open dimag25 opened 1 year ago

dimag25 commented 1 year ago

Hi,

my goal is create fully e2e automation with appium-mac-driver:

use case:

  1. create mac mini vm instance in AWS
  2. install my app for testing inside the mac vm
  3. test the app via appium-mac2-driver inside mac vm
  4. teardown of the mac vm instance

    • all flow runs from Jenkins
    • macOS versions >= 10.15 (Catalina)

problems and errors: after all flow runs and appium server runs inside mac machine got the following error:

[WebDriverAgentMac] Cannot perform project cleanup. Original error: xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

found this article how to install : https://www.moncefbelyamani.com/how-to-install-xcode-with-homebrew/ problem : before use mas cli command to install xcode I must to signin to apple id , but Signin command disabled on macOS 10.13+ : https://github.com/mas-cli/mas/issues/164

anyone have any idea how can I workaround this blocker? how can I install xcode from mac os terminal?

KazuCocoa commented 1 year ago

You might need to set xcode-select for /Applications/Xcode.app/Contents/Developer, which requires Xcode. The default /Library/Developer/CommandLineTools is probably newer macOS's default one, which does not have Xcode initially

dimag25 commented 1 year ago

how can I set it? is there any commands?

KazuCocoa commented 1 year ago

xcode-select -s /path/to/Xcode.app/Contents/Developer. man xcode-select tells more details

dimag25 commented 1 year ago

Thank you, but in any case I must be with installed xcode yes? my issue is to install it silently via command line because of apple limitations via mas cli: https://github.com/mas-cli/mas/issues/164

it can be done only with gui via app store?

KazuCocoa commented 1 year ago

You need the Xcode env to build modules, and handle some commands by it. Officially AppStore, or the developer page https://developer.apple.com/download/

MagdelineNg commented 4 months ago

@dimag25 Did you find a solution for installing the Xcode app on your mac mini vm instance? I'm doing the exact same thing and encountering the same error, as I only have Xcode command-line tools on the ECS node currently