Library Not Found Issue When Running on an iOS Device Using Swift Package Manager

Q: I’m using Swift Package Manager, and I’m getting the following “Library Not Found” issue when launching my app on a real iOS device:

dyld: Library not loaded: @rpath/PSPDFKit.framework/PSPDFKit
  Referenced from: /private/var/containers/Bundle/Application/ED1962E0-BA44-463B-B22C-2AB0447F9C13/
  Reason: no suitable image found.  Did find:
	/private/var/containers/Bundle/Application/ED1962E0-BA44-463B-B22C-2AB0447F9C13/ code signature in (/private/var/containers/Bundle/Application/ED1962E0-BA44-463B-B22C-2AB0447F9C13/ not valid for use in process using Library Validation: mapping process and mapped file (non-platform) have different Team IDs
dyld: launch, loading dependent libraries

A: This issue occurred because Xcode failed to sign the frameworks provided by SwiftPM with your app’s signing identity. It’s a known issue (SR-13343) affecting Xcode 12.2 or earlier.

The issue has been fixed in Xcode 12.3. Update to the latest version of Xcode to fix this issue.