Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Check pre-requisites (XCode) upfront programatically #21

Open
radeksimko opened this issue Apr 13, 2020 · 1 comment
Open

Check pre-requisites (XCode) upfront programatically #21

radeksimko opened this issue Apr 13, 2020 · 1 comment

Comments

@radeksimko
Copy link

radeksimko commented Apr 13, 2020

I appreciate that the Readme says I need XCode 11.0+ installed, but gon should probably fail early and gracefully to tell me this if for some reason I missed that instruction or I just switched to a freshly installed MacOS which just doesn't have XCode installed by default.

Currently it allows me to get through a few steps successfully and then fails with an error that may not be immediately understood and attributed to XCode by someone who doesn't know Apple Dev ecosystem.

   • signing artifacts
      • signing                   cmd=[gon .gon.hcl]
      • ==> ✏️  Signing files...
 cmd=gon
      •     Code signing successful
==> 📦  Creating Zip archive...
 cmd=gon
      •     Zip archive created with signed files
==> 📦  Creating dmg...
    This will open Finder windows momentarily.
 cmd=gon
      •     Dmg file created: ./dist/gon_macos.dmg
    Signing dmg...
 cmd=gon
      •     Dmg created and signed
==> 🍎  Notarizing...
    Files will be notarized concurrently to optimize queue wait
 cmd=gon
      •     Path: ./dist/gon_macos.zip
    Path: ./dist/gon_macos.dmg
 cmd=gon
      •     [gon_macos.dmg] Submitting file for notarization...
 cmd=gon
      •     [gon_macos.dmg] Error notarizing
 cmd=gon
      •     [gon_macos.zip] Submitting file for notarization...
 cmd=gon
      •     [gon_macos.zip] Error notarizing
 cmd=gon
      •
❗️ Error notarizing:

2 errors occurred:
	* error submitting for notarization:

xcrun: error: unable to find utility "altool", not a developer tool or in PATH

	* error submitting for notarization:

xcrun: error: unable to find utility "altool", not a developer tool or in PATH

Related: I was actually able to notarize a binary with XCode 10.3 on MacOS 10.14.6:

Xcode 10.3
Build version 10G8

I think what gon could check is roughly the following:

$ /usr/bin/xcodebuild -version
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
$ echo $?
1

and also check whether license was agreed to

$ xcodebuild --help


Agreeing to the Xcode/iOS license requires admin privileges, please run “sudo xcodebuild -license” and then retry this command.


$ echo $?
69
@pjebs
Copy link

pjebs commented Aug 12, 2020

Did you have to do anything special to make it work on Xcode 10.3? I only have XCode 10.1 which is the max I can have on my laptop.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants