mapbox / mapbox-maps-ios

Interactive, thoroughly customizable maps for iOS powered by vector tiles and Metal
https://www.mapbox.com/mapbox-mobile-sdk
Other
450 stars 148 forks source link

Can't install on SPM - invalid archive errors #2206

Open nichita-stefanita opened 1 week ago

nichita-stefanita commented 1 week ago

Environment

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==

Screenshot 2024-06-26 at 17 43 51

Expected behavior

Notes / preliminary analysis

Additional links and references

jln19 commented 3 days ago

Same problem here. "mapbox-maps-ios.git could not be resolved"

persidskiy commented 1 day ago

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/

nichita-stefanita commented 1 day ago

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?