Skip to content

Commit

Permalink
Add support for building with Xcode 16 beta. (#4709)
Browse files Browse the repository at this point in the history
  • Loading branch information
kried authored Aug 19, 2024
1 parent c318589 commit 3914d13
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 29 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions MapboxNavigation-SPM.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@

/* Begin PBXFileReference section */
2C3ADC4F29BA8B19001AA409 /* multileg-route-alternatives.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = "multileg-route-alternatives.json"; sourceTree = "<group>"; };
2CB34E3A2C7348AC0089BC20 /* Example.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; name = Example.xctestplan; path = Tests/Example.xctestplan; sourceTree = "<group>"; };
35002D5D1E5F6ABB0090E733 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
35002D5F1E5F6ADB0090E733 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
35002D671E5F6B1B0090E733 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
Expand Down Expand Up @@ -417,6 +418,7 @@
C5ADFBBF1DDCC7840011824B = {
isa = PBXGroup;
children = (
2CB34E3A2C7348AC0089BC20 /* Example.xctestplan */,
8DF8E4DD2202694100B29FEF /* Documents */,
35B711DB1E5E7B70001EDA8D /* Example */,
DA1A1AFC25E085D40097BBD7 /* */,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1400"
version = "1.3">
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
Expand Down Expand Up @@ -37,6 +37,12 @@
ReferencedContainer = "container:MapboxNavigation-SPM.xcodeproj">
</BuildableReference>
</MacroExpansion>
<TestPlans>
<TestPlanReference
reference = "container:Tests/Example.xctestplan"
default = "YES">
</TestPlanReference>
</TestPlans>
<Testables>
<TestableReference
skipped = "NO">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1400"
version = "1.3">
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
Expand Down Expand Up @@ -37,28 +37,12 @@
ReferencedContainer = "container:MapboxNavigation-SPM.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "MapboxNavigationTests"
BuildableName = "MapboxNavigationTests"
BlueprintName = "MapboxNavigationTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "MapboxCoreNavigationTests"
BuildableName = "MapboxCoreNavigationTests"
BlueprintName = "MapboxCoreNavigationTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
</Testables>
<TestPlans>
<TestPlanReference
reference = "container:Tests/Example.xctestplan"
default = "YES">
</TestPlanReference>
</TestPlans>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand Down
10 changes: 5 additions & 5 deletions Sources/MapboxNavigation/Expression.swift
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import Foundation
import MapboxMaps

extension Expression {

static func routeLineWidthExpression(_ multiplier: Double = 1.0) -> Expression {
extension MapboxMaps.Expression {
static func routeLineWidthExpression(_ multiplier: Double = 1.0) -> MapboxMaps.Expression {
return Exp(.interpolate) {
Exp(.linear)
Exp(.zoom)
RouteLineWidthByZoomLevel.multiplied(by: multiplier)
}
}

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)
Expand All @@ -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)
Expand Down
37 changes: 37 additions & 0 deletions Tests/Example.xctestplan
Original file line number Diff line number Diff line change
@@ -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
}

0 comments on commit 3914d13

Please sign in to comment.