Public dependency manager manifests for Search SDK by Mapbox
- iOS 11.0 and newer
- Swift 4.2 and newer
- Mapbox access token in
~/.netrc
- Swift Package Manager
- CocoaPods (1.10+)
- Carthage (0.38.0+)
There are few steps to integrate SDK with SPM:
-
(!) Generate Mapbox private access token with
DOWNLOADS:READ
permission scope and write it down to the~/.netrc
file formapbox
user andapi.mapbox.com
domain
Read more -
Add repository link to the Packages list
-
Xcode:
-
Package.swift
- Add new item in
.dependencies
list:
.package(url: "https://github.com/mapbox/search-ios.git", from: "1.0.0-beta")
- Add new item in
-
- (!) Generate Mapbox private access token with
DOWNLOADS:READ
permission scope and write it down to the~/.netrc
file formapbox
user andapi.mapbox.com
domain
Read more - Add pods to your Podfile:
pod 'MapboxSearch', '~> 1.0.0-beta'
pod 'MapboxSearchUI', '~> 1.0.0-beta'
CocoaPods supports XCFrameworks since 1.10 version and enables ~/.netrc
support by default.
- (!) Generate Mapbox private access token with
DOWNLOADS:READ
permission scope and write it down to the~/.netrc
file formapbox
user andapi.mapbox.com
domain
Read more - Add next line to Cartfile:
github "mapbox/search-ios" ~> 1.0.0-beta
Note that carthage support requires few flags:
--use-netrc
for~/.netrc
credentials support- and
--use-xcframeworks
to support XCFramework distribution (requires Carthage 0.38.0+)
Resulting call may look like carthage update --use-netrc --use-xcframeworks
.
Note: Carthage setup may complete with non-error lines:
*** Skipped building search-ios due to the error:
Dependency "search-ios" has no shared framework schemes
If you believe this to be an error, please file an issue with the maintainers at https://github.com/mapbox/search-ios/issues/new
It's an expected behavior that we cannot avoid.