Skip to content

Commit bdae0bb

Browse files
authored
Update dependencies for 2.8.0-beta.1 release (#354)
1 parent 5b931c5 commit bdae0bb

26 files changed

+112
-43
lines changed

CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,18 @@ Guide: https://keepachangelog.com/en/1.0.0/
66

77
## Unreleased
88

9+
<!-- Add changes for active work here -->
10+
11+
## 2.8.0-beta.1
12+
13+
- [Core] Update dependencies.
14+
15+
**MapboxCommon**: v24.10.0-beta.2
16+
**MapboxCoreSearch**: v2.8.0-beta.1
17+
918
- [Details] Add `SearchEngine.retrieve(mapboxID: String, options: DetailsOptions)` function.
1019
- [SearchOptions] Add `SearchOptions.attributeSets` option. It allows to request of additional metadata attributes besides the basic ones in category search requests.
20+
- [SearchSuggestion] Add `SearchSuggestion.namePreferred` field to represent the preferred display name for the result.
1121

1222
## 2.7.1
1323

Cartfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
binary "https://api.mapbox.com/downloads/v2/carthage/search-core-sdk/MapboxCoreSearch.xcframework.json" == 2.7.0
2-
binary "https://api.mapbox.com/downloads/v2/carthage/mapbox-common/MapboxCommon.json" == 24.9.0
1+
binary "https://api.mapbox.com/downloads/v2/carthage/search-core-sdk/MapboxCoreSearch.xcframework.json" == 2.8.0-beta.2
2+
binary "https://api.mapbox.com/downloads/v2/carthage/mapbox-common/MapboxCommon.json" == 24.10.0-beta.2

Cartfile.resolved

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
binary "https://api.mapbox.com/downloads/v2/carthage/mapbox-common/MapboxCommon.json" "24.9.0"
2-
binary "https://api.mapbox.com/downloads/v2/carthage/search-core-sdk/MapboxCoreSearch.xcframework.json" "2.7.0"
1+
binary "https://api.mapbox.com/downloads/v2/carthage/mapbox-common/MapboxCommon.json" "24.10.0-beta.2"
2+
binary "https://api.mapbox.com/downloads/v2/carthage/search-core-sdk/MapboxCoreSearch.xcframework.json" "2.8.0-beta.2"

LICENSE.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
## License
22

3-
Mapbox Search for iOS version 2.7.0
3+
Mapbox Search for iOS version 2.8.0-beta.1
44
Mapbox Search iOS SDK
55

6-
Copyright © 2021 - 2024 Mapbox, Inc. All rights reserved.
6+
Copyright © 2021 - 2025 Mapbox, Inc. All rights reserved.
77

88
The software and files in this repository (collectively, "Software") are licensed under the Mapbox TOS for use only with the relevant Mapbox product(s) listed at www.mapbox.com/pricing. This license allows developers with a current active Mapbox account to use and modify the authorized portions of the Software as needed for use only with the relevant Mapbox product(s) through their Mapbox account in accordance with the Mapbox TOS. This license terminates automatically if a developer no longer has a Mapbox account in good standing or breaches the Mapbox TOS. For the license terms, please see the Mapbox TOS at https://www.mapbox.com/legal/tos/ which incorporates the Mapbox Product Terms at www.mapbox.com/legal/service-terms. If this Software is a SDK, modifications that change or interfere with marked portions of the code related to billing, accounting, or data collection are not authorized and the SDK sends limited de-identified location and usage data which is used in accordance with the Mapbox TOS. [Updated 2023-01]

MapboxSearch.podspec

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'MapboxSearch'
3-
s.version = '2.7.0'
3+
s.version = '2.8.0-beta.1'
44
s.summary = 'Search SDK for Mapbox Search API'
55

66
# This description is used to generate tags and improve search results.
@@ -24,6 +24,6 @@ Some iOS platform specifics applies.
2424

2525
s.vendored_frameworks = "**/#{s.name}.xcframework"
2626

27-
s.dependency "MapboxCoreSearch", '2.7.0'
28-
s.dependency "MapboxCommon", '24.9.0'
27+
s.dependency "MapboxCoreSearch", '2.8.0-beta.2'
28+
s.dependency "MapboxCommon", '24.10.0-beta.2'
2929
end

MapboxSearch.xcodeproj/project.pbxproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -3716,15 +3716,15 @@
37163716
repositoryURL = "https://github.com/mapbox/mapbox-common-ios.git";
37173717
requirement = {
37183718
kind = exactVersion;
3719-
version = 24.9.0;
3719+
version = "24.10.0-beta.2";
37203720
};
37213721
};
37223722
042BEB182C2DE30E0004CD7B /* XCRemoteSwiftPackageReference "mapbox-maps-ios" */ = {
37233723
isa = XCRemoteSwiftPackageReference;
37243724
repositoryURL = "https://github.com/mapbox/mapbox-maps-ios.git";
37253725
requirement = {
37263726
kind = exactVersion;
3727-
version = 11.9.0;
3727+
version = "11.10.0-beta.1";
37283728
};
37293729
};
37303730
043339CB2C61295D001650FA /* XCRemoteSwiftPackageReference "atlantis" */ = {

MapboxSearchUI.podspec

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'MapboxSearchUI'
3-
s.version = '2.7.0'
3+
s.version = '2.8.0-beta.1'
44
s.summary = 'Search UI for Mapbox Search API'
55

66
# This description is used to generate tags and improve search results.
@@ -23,5 +23,5 @@ Card style custom UI with full search functionality powered by Mapbox Search API
2323

2424
s.vendored_frameworks = "**/#{s.name}.xcframework"
2525

26-
s.dependency 'MapboxSearch', "2.7.0"
26+
s.dependency 'MapboxSearch', "2.8.0-beta.1"
2727
end

Package.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
import PackageDescription
55
import Foundation
66

7-
let (coreSearchVersion, coreSearchVersionHash) = ("2.7.0", "ffb6e9f75e80e08c16d0fb0754a3f534f2231de537c792422af34b053d700960")
7+
let (coreSearchVersion, coreSearchVersionHash) = ("2.8.0-beta.2", "4300248e04ea446f24c7010f6710505eff82e2c55e19abaabe5431799b2b9adf")
88

9-
let mapboxCommonSDKVersion = Version("24.9.0")
9+
let mapboxCommonSDKVersion = Version("24.10.0-beta.2")
1010

1111
let package = Package(
1212
name: "MapboxSearch",

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,13 @@ dependencies: [
8686
##### MapboxSearch
8787
To integrate latest pre-release version of `MapboxSearch` into your Xcode project using CocoaPods, specify it in your `Podfile`:
8888
```
89-
pod 'MapboxSearch', ">= 2.7.0", "< 3.0"
89+
pod 'MapboxSearch', ">= 2.8.0-beta.1", "< 3.0"
9090
```
9191
9292
##### MapboxSearchUI
9393
To integrate latest pre-release version of `MapboxSearchUI` into your Xcode project using CocoaPods, specify it in your `Podfile`:
9494
```
95-
pod 'MapboxSearchUI', ">= 2.7.0", "< 3.0"
95+
pod 'MapboxSearchUI', ">= 2.8.0-beta.1", "< 3.0"
9696
```
9797
9898
### Carthage
@@ -109,7 +109,7 @@ pod 'MapboxSearchUI', ">= 2.7.0", "< 3.0"
109109
2. Follow the [Carthage Quick Start](https://github.com/Carthage/Carthage?tab=readme-ov-file#quick-start) and specificy the MapboxSearch dependency in your `Cartfile`:
110110
111111
```
112-
github "Mapbox/mapbox-search-ios" ~> 2.7.0
112+
github "Mapbox/mapbox-search-ios" ~> 2.8.0-beta.1
113113
```
114114
115115
## Contributing

Search Documentation.docc/Installation.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ To add the Mapbox Search SDK dependency with CocoaPods, you will need to configu
5959
```ruby
6060
use_frameworks!
6161
target "TargetNameForYourApp" do
62-
pod 'MapboxSearchUI', ">= 2.7.0", "< 3.0"
62+
pod 'MapboxSearchUI', ">= 2.8.0-beta.1", "< 3.0"
6363
end
6464
```
6565

@@ -68,7 +68,7 @@ To add the Mapbox Search SDK dependency with CocoaPods, you will need to configu
6868
```ruby
6969
use_frameworks!
7070
target "TargetNameForYourApp" do
71-
pod 'MapboxSearch', ">= 2.7.0", "< 3.0"
71+
pod 'MapboxSearch', ">= 2.8.0-beta.1", "< 3.0"
7272
end
7373
```
7474

Sources/MapboxSearch/InternalAPI/CoreSearchResultProtocol.swift

+3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ protocol CoreSearchResultProtocol {
1313
*/
1414
var names: [String] { get }
1515

16+
/// The preferred name of the feature, if different than name.
17+
var namePreferred: String? { get }
18+
1619
var resultAccuracy: CoreAccuracy? { get }
1720

1821
var languages: [String] { get }

Sources/MapboxSearch/PublicAPI/FavoriteRecord.swift

+8
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,21 @@ public struct FavoriteRecord: IndexableRecord, SearchResult, Codable, Equatable
7878
/// Favorite record constructor
7979
/// - Parameters:
8080
/// - id: UUID used by default
81+
/// - mapboxId: Unique record identifier
8182
/// - name: Favorite name
83+
/// - matchingName: The feature name, as matched by the search algorithm
8284
/// - coordinate: Favorite coordinate
85+
/// - distance: An approximate distance to the origin location, in meters
8386
/// - address: Favorite address
8487
/// - makiIcon:Favorite icon name
88+
/// - serverIndex: The index in response from server
89+
/// - accuracy: A point accuracy metric for the returned address
8590
/// - categories: Favorite categories list
91+
/// - routablePoints: Coordinates of building entries
8692
/// - searchRequest: original search request
93+
/// - metadata: Associated metadata
8794
/// - resultType: Favorite result type
95+
/// - descriptionText: Address formatted with the medium style
8896
public init(
8997
id: String? = nil,
9098
mapboxId: String? = nil,

Sources/MapboxSearch/PublicAPI/HistoryRecord.swift

+7
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,22 @@ public struct HistoryRecord: IndexableRecord, SearchResult, Codable, Hashable {
9191
/// History record constructor
9292
/// - Parameters:
9393
/// - id: UUID used by default
94+
/// - mapboxId: Unique record identifier
9495
/// - name: History name
96+
/// - matchingName: The feature name, as matched by the search algorithm
97+
/// - serverIndex: The index in response from server
98+
/// - accuracy: A point accuracy metric for the returned address
9599
/// - coordinate: History coordinate
100+
/// - distance: An approximate distance to the origin location, in meters
96101
/// - timestamp: History timestamp
97102
/// - historyType: History type
98103
/// - type: History type
99104
/// - address: History address
100105
/// - metadata: Associated metadata
101106
/// - categories: Categories of original object
107+
/// - searchRequest: The original search request
102108
/// - routablePoints: Coordinates of building entries
109+
/// - descriptionText: Address formatted with the medium style
103110
public init(
104111
id: String = UUID().uuidString,
105112
mapboxId: String?,
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
/// Mapbox Search SDK version variable
2-
public let mapboxSearchSDKVersion = "2.7.0"
2+
public let mapboxSearchSDKVersion = "2.8.0-beta.1"

Sources/MapboxSearch/PublicAPI/Search Results/ExternalRecordPlaceholder.swift

+4-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ class ExternalRecordPlaceholder: SearchResultSuggestion, CoreResponseProvider {
1212

1313
var name: String
1414

15+
var namePreferred: String?
16+
1517
var address: Address?
1618

1719
var descriptionText: String?
@@ -39,7 +41,8 @@ class ExternalRecordPlaceholder: SearchResultSuggestion, CoreResponseProvider {
3941

4042
self.id = coreResult.userRecordID ?? coreResult.id
4143
self.mapboxId = coreResult.mapboxId
42-
self.name = coreResult.names[0]
44+
self.name = coreResult.names.first ?? ""
45+
self.namePreferred = coreResult.namePreferred
4346
self.address = coreResult.addresses?.first.map(Address.init)
4447
self.dataLayerIdentifier = layerIdentifier
4548
self.distance = coreResult.distanceToProximity

Sources/MapboxSearch/PublicAPI/Search Results/SearchBrandSuggestionImpl.swift

+4-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ class SearchBrandSuggestionImpl: SearchBrandSuggestion, CoreResponseProvider {
1616

1717
var name: String
1818

19+
var namePreferred: String?
20+
1921
var address: Address?
2022

2123
var descriptionText: String?
@@ -48,7 +50,8 @@ class SearchBrandSuggestionImpl: SearchBrandSuggestion, CoreResponseProvider {
4850
self.id = coreResult.id
4951
self.mapboxId = coreResult.mapboxId
5052
self.suggestionType = .brand
51-
self.name = coreResult.names[0]
53+
self.name = coreResult.names.first ?? ""
54+
self.namePreferred = coreResult.namePreferred
5255
self.address = coreResult.addresses?.first.map(Address.init)
5356
self.iconName = coreResult.icon
5457
self.serverIndex = coreResult.serverIndex?.intValue

Sources/MapboxSearch/PublicAPI/Search Results/SearchCategorySuggestionImpl.swift

+4-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ class SearchCategorySuggestionImpl: SearchCategorySuggestion, CoreResponseProvid
1010

1111
var name: String
1212

13+
var namePreferred: String?
14+
1315
var address: Address?
1416

1517
var descriptionText: String?
@@ -44,7 +46,8 @@ class SearchCategorySuggestionImpl: SearchCategorySuggestion, CoreResponseProvid
4446
self.id = coreResult.id
4547
self.mapboxId = coreResult.mapboxId
4648
self.suggestionType = .category
47-
self.name = coreResult.names[0]
49+
self.name = coreResult.names.first ?? ""
50+
self.namePreferred = coreResult.namePreferred
4851
self.address = coreResult.addresses?.first.map(Address.init)
4952
self.iconName = nil // Categories should use it's special icon
5053
self.serverIndex = coreResult.serverIndex?.intValue

Sources/MapboxSearch/PublicAPI/Search Results/SearchQuerySuggestionImpl.swift

+4-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ class SearchQuerySuggestionImpl: SearchQuerySuggestion, CoreResponseProvider {
1010

1111
var name: String
1212

13+
var namePreferred: String?
14+
1315
var address: Address?
1416

1517
var descriptionText: String?
@@ -40,7 +42,8 @@ class SearchQuerySuggestionImpl: SearchQuerySuggestion, CoreResponseProvider {
4042
self.id = coreResult.id
4143
self.mapboxId = coreResult.mapboxId
4244
self.suggestionType = .query
43-
self.name = coreResult.names[0]
45+
self.name = coreResult.names.first ?? ""
46+
self.namePreferred = coreResult.namePreferred
4447
self.address = coreResult.addresses?.first.map(Address.init)
4548
self.iconName = nil // Queries should use it's special icon
4649
self.originalResponse = CoreSearchResultResponse(coreResult: coreResult, response: response)

Sources/MapboxSearch/PublicAPI/Search Results/SearchResultSuggestionImpl.swift

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ class SearchResultSuggestionImpl: SearchResultSuggestion, CoreResponseProvider {
1212

1313
var name: String
1414

15+
var namePreferred: String?
16+
1517
var address: Address?
1618

1719
var iconName: String?
@@ -54,6 +56,7 @@ class SearchResultSuggestionImpl: SearchResultSuggestion, CoreResponseProvider {
5456
self.id = coreResult.id
5557
self.mapboxId = coreResult.mapboxId
5658
self.name = coreResult.names.first ?? ""
59+
self.namePreferred = coreResult.namePreferred
5760
self.address = coreResult.addresses?.first.map(Address.init)
5861
self.iconName = coreResult.icon
5962
self.serverIndex = coreResult.serverIndex?.intValue

Sources/MapboxSearch/PublicAPI/Search Results/SearchSuggestion.swift

+3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ public protocol SearchSuggestion {
1616
/// Suggestion name.
1717
var name: String { get }
1818

19+
/// The preferred name of the feature, if different than name.
20+
var namePreferred: String? { get }
21+
1922
/// Index in response from server.
2023
var serverIndex: Int? { get }
2124

Sources/MapboxSearch/PublicAPI/Search Results/ServerSearchResult.swift

+3
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ class ServerSearchResult: SearchResult, SearchResultSuggestion, CoreResponseProv
3939

4040
var name: String
4141

42+
var namePreferred: String?
43+
4244
var matchingName: String?
4345

4446
var descriptionText: String?
@@ -69,6 +71,7 @@ class ServerSearchResult: SearchResult, SearchResultSuggestion, CoreResponseProv
6971
self.id = coreResult.id
7072
self.mapboxId = coreResult.mapboxId
7173
self.name = coreResult.names.first ?? ""
74+
self.namePreferred = coreResult.namePreferred
7275
self.matchingName = coreResult.matchingName
7376
self.iconName = coreResult.icon
7477
self.estimatedTime = coreResult.estimatedTime

Tests/MapboxSearchTests/Common/Models/Search Result/SearchResultSuggestionImplTests.swift

+20-12
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,45 @@ import XCTest
55

66
class SearchResultSuggestionImplTests: XCTestCase {
77
func testSuccessfulInitForAddressType() throws {
8+
let coreResult = CoreSearchResultStub(
9+
id: "sample-2",
10+
mapboxId: "sample-2",
11+
type: .address,
12+
namePreferred: "Preferred name",
13+
centerLocation: nil
14+
)
815
let suggestionImpl = try XCTUnwrap(SearchResultSuggestionImpl(
9-
coreResult: CoreSearchResultStub(
10-
id: "sample-2",
11-
mapboxId: "sample-2",
12-
type: .address,
13-
centerLocation: nil
14-
),
16+
coreResult: coreResult,
1517
response: CoreSearchResponseStub(
1618
id: 42,
1719
options: .sample1,
1820
result: .success([])
1921
)
2022
))
2123
XCTAssertEqual(suggestionImpl.suggestionType, .address(subtypes: [.address]))
24+
XCTAssertEqual(suggestionImpl.name, coreResult.names.first)
25+
XCTAssertEqual(suggestionImpl.namePreferred, coreResult.namePreferred)
2226
}
2327

2428
func testSuccessfulInitForPOIType() throws {
29+
let coreResult = CoreSearchResultStub(
30+
id: "sample-2",
31+
mapboxId: "sample-2",
32+
type: .poi,
33+
namePreferred: "Preferred name",
34+
centerLocation: nil
35+
)
2536
let suggestionImpl = try XCTUnwrap(SearchResultSuggestionImpl(
26-
coreResult: CoreSearchResultStub(
27-
id: "sample-2",
28-
mapboxId: "sample-2",
29-
type: .poi,
30-
centerLocation: nil
31-
),
37+
coreResult: coreResult,
3238
response: CoreSearchResponseStub(
3339
id: 42,
3440
options: .sample1,
3541
result: .success([])
3642
)
3743
))
3844
XCTAssertEqual(suggestionImpl.suggestionType, .POI)
45+
XCTAssertEqual(suggestionImpl.name, coreResult.names.first)
46+
XCTAssertEqual(suggestionImpl.namePreferred, coreResult.namePreferred)
3947
}
4048

4149
func testFailedInit() throws {

0 commit comments

Comments
 (0)