skip to Main Content

On the post-actions after archiving the app on Xcode Cloud, There was a task that set to upload to TestFlight. It failed with an error.

ITMS-90334: Invalid Code Signature Identifier. The identifier “XyzSDK-55554944d176df9a74f43236a8f1ccb71ea4d480” in your code signature for “XyzSDK” must match its Bundle Identifier “XyzSDK”

XyzSDK is a package that import to the app via Swift Package Manager (right-click on project >> add package >> insert repository url).

I also wonder why a package that imported to the project had bundle identifier with a generated id (55554944d176df9a74f43236a8f1ccb71ea4d480) after the archive phase. that cause the error. It seems hard to edit the bundle identifier since it’s a package dependency.

Is there anyway to disable this? Are there any missing things I have to do after import a package dependency? Or Is it a Xcode cloud bug?

P.S. I have sent this issue to Apple via Feedback Assistant but there is no response for now.

2

Answers


  1. Seems like this is caused by having a dynamic library as a Swift Package Manager dependency. If you’re targeting iOS, you’ll need to make sure your dependencies are building as static libraries.

    Some Swift packages have multiple targets to this effect, so depending on the specifics of the dependency, you may have to replace your Package.swift’s targets -> .target -> dependencies from something like ["XyzLib"] to be something like [ .product(name: "XyzLibStatic", package: "xyzLib") ].

    This was happening to me today for example as I had this library as an SPM dependency: https://github.com/launchdarkly/swift-eventsource/blob/master/Package.swift

    The fix was to target the type: .static version of the dependency (LDSwiftEventSourceStatic).

    Login or Signup to reply.
  2. Figured out a fix here if you are willing to change your frameworks to static/do not embed: https://stackoverflow.com/a/73653319/1920561

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search