Skip to main content
All CollectionsKnowledge BaseiOS
Package dependency errors when using Xcode Test for iOS step
Package dependency errors when using Xcode Test for iOS step
Updated over a week ago

Issue:

When using the Xcode Test for iOS Step for a project with Swift Package Manager based dependencies, you receive one of the following errors:

xcodebuild: error: Could not resolve package dependencies:
Authentication failed because no credentials were provided.
Fetching [email protected]:user/project-name.git
xcodebuild: error: Could not resolve package dependencies:
An unknown error occurred

Possible solutions:

For the first error:

1. In the xcodebuild configuration section of the Xcode Test for iOS Step, add the -disableAutomaticPackageResolution flag in the Additional options for xcodebuild build test field. This flag ensures that the package dependencies defined in the Package.resolved file are used.

For the second error:

1. Make sure that SSH is used for private repositories rather that HTTPS.

2. Add the Authenticate with GitHub OAuth Sep after the Git Clone Repository Step.

Did this answer your question?