



To resolve this, create a secret access token from your Mapbox account and follow the instructions outlined in the installation guide to configure your secret token. Otherwise, you will see the following error: Error installing MapboxMapsĬurl: (22) The requested URL returned error: 401 Unauthorized If you're using version v6.0.0 of the SDK or later, you will need to authorize your download of the Maps SDK with a secret access token with the DOWNLOADS:READ scope. If you see the error Mapbox.h not found, this can typically be resolved by building your application despite the error. If you're still having issues using Mapbox with CocoaPods, please contact support with the complete details of the issue, including error messages. If you're getting a permission error or having trouble installing CocoaPods itself, consult the CocoaPods troubleshooting documentation.Make sure you're opening this file and not the original Xcode project. The xcworkspace file has a white Xcode icon, unlike the xcodeproj file which has a blue Xcode icon. When you run pod install, CocoaPods generates an xcworkspace file that includes its configuration.If pod install gives you an “Unable to find a specification” error, try running pod repo update first.Beta versions are not recommended for use with the Mapbox Maps SDK for iOS. Use the most recent version of CocoaPods.If you run into issues while installing the framework with CocoaPods, try following these steps: Though Swift Package Manager is the preferred method for installing the Maps SDK, if you're already using CocoaPods to manage other dependencies in your project, you can also install the Mapbox SDKs for iOS in the same way. You may also need to delete your derived data folder. If these errors occur, try resetting the SPM cache by opening the File menu in Xcode and selecting Swift Packages > Reset Package Cache.

Xcode may fail to resolve SPM artifacts with errors such as artifact of binary target 'MapboxCommon' failed extraction: The operation couldn’t be completed.If you run into issues while installing the framework with SPM, try following these steps: Swift Package Manager (SPM) is the recommended method for installing the Maps SDK. Note that installing Maps SDK v6.0.0, Navigation SDK v1.0.0, or Search SDK v1.0.0 or greater via Carthage or CocoaPods requires two access tokens: one to download the SDK and another to authenticate map requests. If you see 401 responses after your app builds successfully, make sure that you've configured all credentials correctly. Learn how to troubleshoot issues when installing the Mapbox Maps or Navigation SDK for iOS with Swift Package Manager, CocoaPods, and Carthage.
