Skip to content

Commit

Permalink
Use MBXAccessToken as default access token. (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaximAlien authored Mar 6, 2021
1 parent ce3f4f6 commit c8231e7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions Cartfile.private
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
binary "https://www.mapbox.com/ios-sdk/Mapbox-iOS-SDK.json" ~> 5.5
github "AliSoftware/OHHTTPStubs" ~> 9.0
github "mapbox/mapbox-events-ios" ~> 0.10.2
1 change: 1 addition & 0 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
binary "https://www.mapbox.com/ios-sdk/Mapbox-iOS-SDK.json" "5.9.0"
github "AliSoftware/OHHTTPStubs" "9.0.0"
github "mapbox/mapbox-events-ios" "v0.10.8"
3 changes: 3 additions & 0 deletions MapboxGeocoder.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -931,10 +931,12 @@
);
inputPaths = (
"$(SRCROOT)/Carthage/Build/iOS/Mapbox.framework",
"$(SRCROOT)/Carthage/Build/iOS/MapboxMobileEvents.framework",
);
name = "Copy Frameworks";
outputPaths = (
"$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/Mapbox.framework",
"$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/MapboxMobileEvents.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
Expand All @@ -947,6 +949,7 @@
);
inputPaths = (
"$(SRCROOT)/Carthage/Build/iOS/Mapbox.framework",
"$(SRCROOT)/Carthage/Build/iOS/MapboxMobileEvents.framework",
);
name = "Copy Frameworks";
outputPaths = (
Expand Down
4 changes: 3 additions & 1 deletion Sources/MapboxGeocoder/MBGeocoder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ typealias JSONDictionary = [String: Any]
public let MBGeocoderErrorDomain = "MBGeocoderErrorDomain"

/// The Mapbox access token specified in the main application bundle’s Info.plist.
let defaultAccessToken = Bundle.main.infoDictionary?["MGLMapboxAccessToken"] as? String
let defaultAccessToken =
Bundle.main.object(forInfoDictionaryKey: "MBXAccessToken") as? String ??
Bundle.main.object(forInfoDictionaryKey: "MGLMapboxAccessToken") as? String

/// The user agent string for any HTTP requests performed directly within this library.
let userAgent: String = {
Expand Down

0 comments on commit c8231e7

Please sign in to comment.