XcodesOrg / xcodes

The best command-line tool to install and switch between multiple versions of Xcode.
MIT License
3.68k stars 126 forks source link

After installing it via Homebrew it doesn't download Xcode properly #154

Closed thepoppingone closed 2 years ago

thepoppingone commented 3 years ago

When using xcodes in M1 Mac, it can select the xcodes nicely if they are already installed in the applications folder.

However, when trying to install directly through the xcodes command, it downloads a small file and installation completes from there instead of downloading the full Xcode version.

MattKiazyk commented 3 years ago

hi @thepoppingone

If you browse to /Users/<user>/Library/Application Support/com.robotsandpencils.xcodes/ you'll see any files it has tried to download and is usually a file with html in it

In the past, the is because the Apple ID you're logging in with is not a Apple Developer and it doesn't handle it properly.

Let me know if something like that is your issue?

MarcSteven commented 3 years ago

Yeah I also met the issue, the error as below: The operation couldn’t be completed. (DecodingError.dataCorrupted(Swift.DecodingError.Context(codingPath: [], debugDescription: "The given data was not valid JSON.", underlyingError: Optional(Error Domain=NSCocoaErrorDomain Code=3840 "Invalid value around character 0." UserInfo={NSDebugDescription=Invalid value around character 0.})))) The operation couldn’t be completed. (DecodingError.dataCorrupted(Swift.DecodingError.Context(codingPath: [], debugDescription: "The given data was not valid JSON.", underlyingError: Optional(Error Domain=NSCocoaErrorDomain Code=3840 "Invalid value around character 0." UserInfo={NSDebugDescription=Invalid value around character 0.}))))

@MattKiazyk Any advices? Thank you so much !

MattKiazyk commented 3 years ago

Hi @MarcSteven

Usually those types of decoding errors are because you are not logged into an Apple Developer account and it's trying to parse the downloads, but it's returning as html and not json. Can you make sure you are logged in with Xcode's with an Apple ID that is tied to a developer account?

MarcSteven commented 3 years ago

@MattKiazyk I don't have Xcode ,I just want to download it

thepoppingone commented 2 years ago

Hi, as of 2nd Nov, the download is now working properly on M1 Macs!