From 3914d13b5c7996378291a585c48113c56623a099 Mon Sep 17 00:00:00 2001 From: Nastassia Makaranka Date: Mon, 19 Aug 2024 13:38:43 +0200 Subject: [PATCH] Add support for building with Xcode 16 beta. (#4709) --- CHANGELOG.md | 6 +++ .../project.pbxproj | 2 + .../xcschemes/Example-CarPlay.xcscheme | 8 +++- .../xcshareddata/xcschemes/Example.xcscheme | 30 ++++----------- Sources/MapboxNavigation/Expression.swift | 10 ++--- Tests/Example.xctestplan | 37 +++++++++++++++++++ 6 files changed, 64 insertions(+), 29 deletions(-) create mode 100644 Tests/Example.xctestplan diff --git a/CHANGELOG.md b/CHANGELOG.md index dbd59ac1c28..56954eee0f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changes to the Mapbox Navigation SDK for iOS +## v2.18.4 + +### Packaging + +* Add support for building with Xcode 16 beta. + ## v2.18.3 ### Packaging diff --git a/MapboxNavigation-SPM.xcodeproj/project.pbxproj b/MapboxNavigation-SPM.xcodeproj/project.pbxproj index 1ab6784944b..2a931b1d9be 100644 --- a/MapboxNavigation-SPM.xcodeproj/project.pbxproj +++ b/MapboxNavigation-SPM.xcodeproj/project.pbxproj @@ -95,6 +95,7 @@ /* Begin PBXFileReference section */ 2C3ADC4F29BA8B19001AA409 /* multileg-route-alternatives.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = "multileg-route-alternatives.json"; sourceTree = ""; }; + 2CB34E3A2C7348AC0089BC20 /* Example.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; name = Example.xctestplan; path = Tests/Example.xctestplan; sourceTree = ""; }; 35002D5D1E5F6ABB0090E733 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 35002D5F1E5F6ADB0090E733 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 35002D671E5F6B1B0090E733 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; @@ -417,6 +418,7 @@ C5ADFBBF1DDCC7840011824B = { isa = PBXGroup; children = ( + 2CB34E3A2C7348AC0089BC20 /* Example.xctestplan */, 8DF8E4DD2202694100B29FEF /* Documents */, 35B711DB1E5E7B70001EDA8D /* Example */, DA1A1AFC25E085D40097BBD7 /* */, diff --git a/MapboxNavigation-SPM.xcodeproj/xcshareddata/xcschemes/Example-CarPlay.xcscheme b/MapboxNavigation-SPM.xcodeproj/xcshareddata/xcschemes/Example-CarPlay.xcscheme index 5d57a59ee4c..b28d680f06d 100644 --- a/MapboxNavigation-SPM.xcodeproj/xcshareddata/xcschemes/Example-CarPlay.xcscheme +++ b/MapboxNavigation-SPM.xcodeproj/xcshareddata/xcschemes/Example-CarPlay.xcscheme @@ -1,7 +1,7 @@ + version = "1.7"> @@ -37,6 +37,12 @@ ReferencedContainer = "container:MapboxNavigation-SPM.xcodeproj"> + + + + diff --git a/MapboxNavigation-SPM.xcodeproj/xcshareddata/xcschemes/Example.xcscheme b/MapboxNavigation-SPM.xcodeproj/xcshareddata/xcschemes/Example.xcscheme index 20ae551fcda..a65947718e8 100644 --- a/MapboxNavigation-SPM.xcodeproj/xcshareddata/xcschemes/Example.xcscheme +++ b/MapboxNavigation-SPM.xcodeproj/xcshareddata/xcschemes/Example.xcscheme @@ -1,7 +1,7 @@ + version = "1.7"> @@ -37,28 +37,12 @@ ReferencedContainer = "container:MapboxNavigation-SPM.xcodeproj"> - - - - - - - - - - + + + + Expression { +extension MapboxMaps.Expression { + static func routeLineWidthExpression(_ multiplier: Double = 1.0) -> MapboxMaps.Expression { return Exp(.interpolate) { Exp(.linear) Exp(.zoom) @@ -10,7 +10,7 @@ extension Expression { } } - static func routeLineGradientExpression(_ gradientStops: [Double: UIColor], lineBaseColor: UIColor, isSoft: Bool = false) -> Expression { + static func routeLineGradientExpression(_ gradientStops: [Double: UIColor], lineBaseColor: UIColor, isSoft: Bool = false) -> MapboxMaps.Expression { if isSoft { return Exp(.interpolate) { Exp(.linear) @@ -26,7 +26,7 @@ extension Expression { } } - static func buildingExtrusionHeightExpression(_ hightProperty: String) -> Expression { + static func buildingExtrusionHeightExpression(_ hightProperty: String) -> MapboxMaps.Expression { return Exp(.interpolate) { Exp(.linear) Exp(.zoom) diff --git a/Tests/Example.xctestplan b/Tests/Example.xctestplan new file mode 100644 index 00000000000..9637e5fe15f --- /dev/null +++ b/Tests/Example.xctestplan @@ -0,0 +1,37 @@ +{ + "configurations" : [ + { + "id" : "F90E3D86-34A5-403E-B872-2B0EDB8EE2B6", + "name" : "Configuration 1", + "options" : { + + } + } + ], + "defaultOptions" : { + "codeCoverage" : false, + "language" : "en", + "targetForVariableExpansion" : { + "containerPath" : "container:MapboxNavigation-SPM.xcodeproj", + "identifier" : "C53F2EDE20EBC95600D9798F", + "name" : "Example-CarPlay" + } + }, + "testTargets" : [ + { + "target" : { + "containerPath" : "container:", + "identifier" : "MapboxNavigationTests", + "name" : "MapboxNavigationTests" + } + }, + { + "target" : { + "containerPath" : "container:", + "identifier" : "MapboxCoreNavigationTests", + "name" : "MapboxCoreNavigationTests" + } + } + ], + "version" : 1 +}