Can't install on SPM - invalid archive errors
Environment
- Xcode version: 15.4
- iOS version: 15+
- Devices affected: MacBook pro (intel)
- Maps SDK Version: 11.4.0
Observed behavior and steps to reproduce
MapBox dependency was added to the project by another dev. However on my machine I can't get it to be installed. I've also tried removing and then adding it back to the project while constantly clearing SPM cache, removing org.swift.swiftpm file, cleaning project derived data and restarting xcode. Just like described in Troubleshooting and Updates in the docs.
I've ran this command in terminal, so it's definitely not caused by .netrc file or token. And it works fine for the other dev and in the CI Pipeline.
curl -ILn https://api.mapbox.com/downloads/v2/mobile-maps-ios/releases/ios/11.4.0/MapboxMaps.zip
HTTP/1.1 200 OK
Connection: keep-alive
Date: Wed, 26 Jun 2024 14:02:28 GMT
X-Powered-By: Express
Cache-Control: no-cache, no-store, private
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET
Timing-Allow-Origin: *
X-Cache: Miss from cloudfront
Via: 1.1 3bc7ecd5aee04a4d3c660b552dad8d14.cloudfront.net (CloudFront)
X-Amz-Cf-Pop: OTP50-P1
Alt-Svc: h3=":443"; ma=86400
X-Amz-Cf-Id: rgxaMX5UrF2aJhRawTdgNLFDr_vyHrAXEH1eR1pd1gSDLFbggh3PoA==
Expected behavior
Notes / preliminary analysis
Additional links and references
Same problem here. "mapbox-maps-ios.git could not be resolved"
Hi, issues like that usually happen because of Xcode caches. You can try to clean all spm caches like that rm -rf ~/Library/Caches/org.swift.swiftpm/artifacts/
Hi, issues like that usually happen because of Xcode caches. You can try to clean all spm caches like that
rm -rf ~/Library/Caches/org.swift.swiftpm/artifacts/
@persidskiy As I mentioned in the post, I was deleting the org.swift.swiftpm file completely. Would using the rm -rf ~/Library/Caches/org.swift.swiftpm/artifacts/ command produce different results?
The issue did resolve itself. While I couldn't install the package I removed it in my branch and was able to continue working on my project without Map box. A few weeks later, without any input from my side I was able to install the Map Box SPM.