Package.resolved file is corrupted or malformed ios build error

Has anyone seen this error when trying to build an iOS app?

[21:43:23]: ▸ Command line invocation:
[21:43:23]: ▸     /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -resolvePackageDependencies -workspace /Users/ionic/builds/relief-labs/clearing-mobile/apps/clearing-patient-app/ios/App/App.xcworkspace -scheme App -configuration Debug
[21:43:23]: ▸ User defaults from command line:
[21:43:23]: ▸     IDEPackageSupportUseBuiltinSCM = YES
[21:43:25]: ▸ Resolve Package Graph
[21:43:25]: ▸ Package.resolved file is corrupted or malformed; fix or delete the file to continue: unsupported schema version 2xcodebuild: error: Could not resolve package dependencies:
[21:43:25]: ▸   Package.resolved file is corrupted or malformed; fix or delete the file to continue: unsupported schema version 2
Command line invocation:
    /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -resolvePackageDependencies -workspace /Users/ionic/builds/relief-labs/clearing-mobile/apps/clearing-patient-app/ios/App/App.xcworkspace -scheme App -configuration Debug

User defaults from command line:
    IDEPackageSupportUseBuiltinSCM = YES

Resolve Package Graph
Package.resolved file is corrupted or malformed; fix or delete the file to continue: unsupported schema version 2xcodebuild: error: Could not resolve package dependencies:
  Package.resolved file is corrupted or malformed; fix or delete the file to continue: unsupported schema version 2
[21:43:25]: Exit status: 74
[21:43:25]: -------------------------
[21:43:25]: --- Step: upload_logs ---
[21:43:25]: -------------------------
[21:43:26]: Unable to upload npm package list log. Skipping.
[21:43:35]: ---------------------------
[21:43:35]: --- Step: shell command ---
[21:43:35]: ---------------------------
[21:43:35]: -----------------------------
[21:43:35]: --- Step: delete_keychain ---
[21:43:35]: -----------------------------
[21:43:35]: Exit status: 74

I removed my package-lock and rebuilt, I followed this StackOverflow, but still get the error? Not sure what to try next? This all runs fine locally.

Found the issue, I installed Firebase with the Swift package manager and that seemed to cause issues so I removed the package and added it via CocoaPods

1 Like