appium-mac2-driver icon indicating copy to clipboard operation
appium-mac2-driver copied to clipboard

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

Open dimag25 opened this issue 2 years ago • 6 comments

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
    • setup appium mac requirments : https://github.com/appium/appium-mac2-driver#requirements
    • tests
  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
  • should be related to Xcode?
  • I got blockers when I tried to install Xcode in automation flow .

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?

dimag25 avatar Mar 06 '23 08:03 dimag25

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

KazuCocoa avatar Mar 06 '23 09:03 KazuCocoa

how can I set it? is there any commands?

dimag25 avatar Mar 06 '23 10:03 dimag25

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

KazuCocoa avatar Mar 07 '23 07:03 KazuCocoa

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?

dimag25 avatar Mar 07 '23 08:03 dimag25

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/

KazuCocoa avatar Mar 07 '23 08:03 KazuCocoa

@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

MagdelineNg avatar Feb 25 '24 14:02 MagdelineNg