Skip to content

Swift Package Manager: Package identity mismatch causes "unexpectedly did not find the new dependency" error in Xcode #91

@nvoq-oscarcorella

Description

@nvoq-oscarcorella

Adding BugfenderSDK-iOS via Xcode's "Add Package Dependencies" UI fails with the error:

unexpectedly did not find the new dependency in the package graph: sourceControl(identity: bugfendersdk-ios, ...)

There's a naming mismatch between the repository and the Package.swift manifest:
Repository name: BugfenderSDK-iOS
Package name (in Package.swift) : BugfenderPackage
Library product name: BugfenderLibrary

Main Problem:
SPM derives the package identity from the repository URL (bugfendersdk-ios), but the package internally declares itself as BugfenderPackage. This identity mismatch confuses Xcode's package graph resolution.

Temp solution:
Manually edit project.pbxproj to add the package reference with BugfenderLibrary as the product name, bypassing Xcode's UI.

Environment
Xcode 16.x
Swift 5.9+
macOS Sequoia / Sonoma

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions