JohanDegraeve / xdripswift

xdrip for iOS, written in Swift
GNU General Public License v3.0
316 stars 310 forks source link

Fix browser build for v5.1.4 #522

Closed dnzxy closed 3 months ago

dnzxy commented 3 months ago

This PR aims to fix browser build for the newly released version of xdripswift@5.4.1.

The main culprit seems to be the Package.resolved file that becomes corrupted or malformed. This leads to failing browser builds with errors along the line of

Resolve Package Graph
Package.resolved file is corrupted or malformed; fix or delete the file to continue: unknown 'PinsStorage' version '3' at '/Users/runner/work/xdripswift/xdripswift/xdrip.xcworkspace/xcshareddata/swiftpm/Package.resolved'.
2024-03-31 19:14:33.957 xcodebuild[8641:40057] Writing error result bundle to /var/folders/0x/nsz8g_tn7cn5l93m_zpy54xr0000gn/T/ResultBundle_2024-31-03_19-14-0033.xcresult
xcodebuild: error: Could not resolve package dependencies:
  Package.resolved file is corrupted or malformed; fix or delete the file to continue: unknown 'PinsStorage' version '3' at '/Users/runner/work/xdripswift/xdripswift/xdrip.xcworkspace/xcshareddata/swiftpm/Package.resolved'.
[19:14:35]: Exit status: 74
[19:14:35]: Couldn't automatically detect the provisioning profile mapping
[19:14:35]: Since Xcode 9 you need to provide an explicit mapping of what
[19:14:35]: provisioning profile to use for each target of your app
[19:14:35]: Exit status: 74

Previously, an attempted fix was mistakenly reverted with commit 38dcd5 and merged with #515 which essentially made up the RC for v5.1.4.

This PR removes the Package.resolved file from the repository and adds it to the .gitignore file, so that it does not get (mistakenly and malformed) committed again.

Successful build can be found here: https://github.com/dnzxy/xdripswift/actions/runs/8501271996