Comments (5)
Did you set up .netrc before attempting to add the mapbox-maps-ios package? I didn't, and I got the same error. Here's how I fixed it on my system:
- Ensure .netrc has permissions 0600 and looks like this:
machine api.mapbox.com
login mapbox
password YOUR_SECRET_MAPBOX_ACCESS_TOKEN
- Check your swiftpm cache:
Check if you have any files in ~/Library/Caches/org.swift.swiftpm that contain something like this:
{"message":"Not Authorized - No Token","url":"[GET] /downloads/v2/mobile-maps-core/releases/ios/packages/11.2.0/MapboxCoreMaps.xcframework-dynamic.zip","auth":"<no access token>","ua":"Amazon CloudFront"}
{"message":"Not Authorized - Invalid Token","url":"[GET] /downloads/v2/mapbox-events-ios/releases/ios/packages/1.0.5/MapboxMobileEvents.zip?access_token=wrong_password","auth":"wrong_password","ua":"Amazon CloudFront"}
if you do, then remove the files:
for f in $(grep -rIl "Not Authorized" ~/Library/Caches/org.swift.swiftpm); do echo "deleting $f"; rm $f; done
- Restart Xcode
This solved it for me, but it might be possible for one of those "Not Authorized" artifacts to still be in your project cache~/Library/Developer/Xcode/DerivedData/<your-repo-name>/SourcePackages/artifacts
This is the part where I was wrong
I ran into this issue as well. I followed documentation at https://docs.mapbox.com/ios/maps/guides/install/#add-the-dependency for Swift Package Manager
environment:
MacOS 14.1.1
XCode 15.3
repro:
- add mapbox token to .netrc (Downloads:Read permission, 0600) ---not true
- add public token to Info.plist
- File > Add Package Dependencies, search for https://github.com/mapbox/mapbox-maps-ios.git
- Dependency Rule:
Up to Next Major Version 11.0.0
- Add Package
Swift Package Manager pulls 11.2.0, and produces this output:
invalid archive returned from 'https://api.mapbox.com/downloads/v2/mapbox-common/releases/ios/packages/24.2.0/MapboxCommon.zip' which is required by binary target 'MapboxCommon'
invalid archive returned from 'https://api.mapbox.com/downloads/v2/mobile-maps-core/releases/ios/packages/11.2.0/MapboxCoreMaps.xcframework-dynamic.zip' which is required by binary target 'MapboxCoreMaps'
notes:
I specified some exact versions, and this issue only reproduced on 11.2.0. 11.0.0, 11.1.0, 11.2.0-rc.1, and 11.3.0-rc.1 all had no issues.
Interestingly, I was able to get 11.2.0 (11.0.0 - Next Major Version) on a different system following the above repro steps without issue a few weeks ago... ah, I found my issue! I hadn't added .netrc on this system before attempting to install.
solution:
add .netrc and remove cache files
from mapbox-maps-ios.
Hi! Wondering if you were able to get around this? If so, can you let me know how you did it because I am facing the same issue?
from mapbox-maps-ios.
because I also didn't setup the .netrc file properly I had to delete caches.
Make sure to do files in /Users/{username}/Library/Caches/org.swift.swiftpm/artifacts
also
from mapbox-maps-ios.
@vijayprmar Hi, please add the steps to reproduce this issue
from mapbox-maps-ios.
Did you set up .netrc before attempting to add the mapbox-maps-ios package? I didn't, and I got the same error. Here's how I fixed it on my system:
- Ensure .netrc has permissions 0600 and looks like this:
machine api.mapbox.com login mapbox password YOUR_SECRET_MAPBOX_ACCESS_TOKEN
- Check your swiftpm cache:
Check if you have any files in ~/Library/Caches/org.swift.swiftpm that contain something like this:
{"message":"Not Authorized - No Token","url":"[GET] /downloads/v2/mobile-maps-core/releases/ios/packages/11.2.0/MapboxCoreMaps.xcframework-dynamic.zip","auth":"<no access token>","ua":"Amazon CloudFront"} {"message":"Not Authorized - Invalid Token","url":"[GET] /downloads/v2/mapbox-events-ios/releases/ios/packages/1.0.5/MapboxMobileEvents.zip?access_token=wrong_password","auth":"wrong_password","ua":"Amazon CloudFront"}
if you do, then remove the files:
for f in $(grep -rIl "Not Authorized" ~/Library/Caches/org.swift.swiftpm); do echo "deleting $f"; rm $f; done
- Restart Xcode
This solved it for me, but it might be possible for one of those "Not Authorized" artifacts to still be in your project cache
~/Library/Developer/Xcode/DerivedData/<your-repo-name>/SourcePackages/artifacts
This is the part where I was wrong
Works like a charm! Much appreciated.
from mapbox-maps-ios.
Related Issues (20)
- FollowPuckViewportState suffers a visual delay when target zoom level is equal to the current zoom level of the map HOT 1
- SDK Crash : DefaultLocationProvider.swift - Attempted to read an unowned reference but object was already deallocated HOT 2
- MTLTextureDescriptorInternal validateWithDevice: crash HOT 1
- Crash in mapbox::common::CleanupManager::cleanup() HOT 1
- Polyline "Cannot assign value of type 'String.UnicodeScalarView.SubSequence'" HOT 6
- Model Position Incorrectly Changed from Centre for some Coordinates HOT 6
- ITMS-91056: Invalid privacy manifest HOT 5
- Create CircleLayers with a Physical Unit Radius HOT 1
- No way to customize font on SwiftUI PointAnnotation HOT 1
- Position of layers in PointAnnotationManager and Cluster code does not affect the order on the screen HOT 2
- ITMS-91056 HOT 1
- I need the initial center latitude and longitude for the map view after loading markers in swiftUI. HOT 2
- queryRenderedFeatures() reports no features (e.g. contour) despite visible/rendered features are displayed HOT 1
- Routes Not Showing for Globe HOT 1
- One finger rotate
- carplay's street names blink on mapbox maps HOT 4
- Regression: EXC_BAD_ACCESS in 11.4.0 on iOS Simulator when calling `mapView.mapboxMap.cameraState` HOT 2
- [Bug]: Incompatible with mapbox-search-ios v2 HOT 10
- When updating the pitch of the camera, the location changes unexpectedly
- Camera and Model Position Misalignment at High Pitch Angles
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mapbox-maps-ios.