XcodesOrg / XcodesOrg/xcodes

xcodes + apple id login + 2FA

Open
#326 6 comments 11 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
4.8k
Forks
182
Avg merge
2d 12h
Merged PRs (30d)
1

Description

Hi,

steps/details that brought me here:

  1. ran into an issue in an iOS build pipeline where xcversion was not detecting the presence of xcode 15 even when it existed on the host system and read about migrating from xcversion to xcodes
  2. read through xcodes setup info + setup environment variables XCODES_USERNAME and XCODES_PASSWORD with apple id info
  3. install latest version of xcodes via brew on a github mac runner within a workflow
  4. run xcodes commands from within this workflow such as xcodes install 15
  5. ran into an infinitely repeating prompt from xcodes for 2FA regarding the apple ID within the workflow which can't be satisfied because this is an automated process vs a human on a terminal.

I am in the process of migrating from use of xcversion to xcodes within a github pipeline that requires specific versions of xcode to do iOS app builds. Documentation on the xcversion side says that tool is deprecated and that xcodes should now be used in its place. Great! Everything makes sense to me so far with the exception of 1 point- the requirement of inputting an apple id user / pass. Since it seems to be required for some unknown reason, I defined values for the XCODES_USERNAME and XCODES_PASSWORD environment variables which are documented by xcodes as a way to automate this portion. Downloading xcode shouldn't require an apple ID, but now I've noticed my pipeline breaks if xcodes/apple decides that I need to use 2FA during a particular login session. This whole 2fa aspect of xcodes seems to break my automated use case. Is there a way to enable a completely automated workflow with xcodes? Ideally there would be a way to disable use of an apple ID entirely within xcodes. This current workflow makes no sense for an automated use case because the 2FA will sometimes break my workflow. Am I missing something here? I feel like this question makes sense but if someone reading this notices I'm missing something obvious here please let me know.

Mike

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the xcodes commands used in the described GitHub Actions workflow and the XCODES_USERNAME and XCODES_PASSWORD environment variables, then trace where Apple ID and 2FA input is required. Done means the workflow can install a specified Xcode version without an interactive 2FA prompt, or the supported automation limitation is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, swift
Domain
authentication, ci-cd, cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.