diff --git a/MapboxNavigation-SPM.xcodeproj/project.pbxproj b/MapboxNavigation-SPM.xcodeproj/project.pbxproj index 8c92b8a2066..fc695f46cb7 100644 --- a/MapboxNavigation-SPM.xcodeproj/project.pbxproj +++ b/MapboxNavigation-SPM.xcodeproj/project.pbxproj @@ -20,6 +20,13 @@ 8A12E84128232C570071AF00 /* SceneDelegate+UIViewControllerTransitioningDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A12E84028232C560071AF00 /* SceneDelegate+UIViewControllerTransitioningDelegate.swift */; }; 8A12E84428232C8F0071AF00 /* PresentationAnimator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A12E84328232C8F0071AF00 /* PresentationAnimator.swift */; }; 8A12E84628232CA30071AF00 /* DismissalAnimator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A12E84528232CA30071AF00 /* DismissalAnimator.swift */; }; + 8A12E84F282343970071AF00 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A12E84E282343970071AF00 /* AppDelegate.swift */; }; + 8A12E851282343970071AF00 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A12E850282343970071AF00 /* SceneDelegate.swift */; }; + 8A12E853282343970071AF00 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A12E852282343970071AF00 /* ViewController.swift */; }; + 8A12E856282343970071AF00 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8A12E854282343970071AF00 /* Main.storyboard */; }; + 8A12E858282343990071AF00 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8A12E857282343990071AF00 /* Assets.xcassets */; }; + 8A12E85B282343990071AF00 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8A12E859282343990071AF00 /* LaunchScreen.storyboard */; }; + 8A12E861282344750071AF00 /* MapboxNavigation in Frameworks */ = {isa = PBXBuildFile; productRef = 8A12E860282344750071AF00 /* MapboxNavigation */; }; 8AA03876280516A80007BD2D /* CustomDestinationPreviewViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8AA03875280516A70007BD2D /* CustomDestinationPreviewViewController.swift */; }; 8AA03878280517FA0007BD2D /* SceneDelegate+PreviewViewControllerDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8AA03877280517FA0007BD2D /* SceneDelegate+PreviewViewControllerDelegate.swift */; }; 8AA0387A28066DA80007BD2D /* SceneDelegate+CustomDestinationPreviewViewControllerDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8AA0387928066DA80007BD2D /* SceneDelegate+CustomDestinationPreviewViewControllerDelegate.swift */; }; @@ -77,6 +84,14 @@ 8A12E84028232C560071AF00 /* SceneDelegate+UIViewControllerTransitioningDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SceneDelegate+UIViewControllerTransitioningDelegate.swift"; sourceTree = ""; }; 8A12E84328232C8F0071AF00 /* PresentationAnimator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PresentationAnimator.swift; sourceTree = ""; }; 8A12E84528232CA30071AF00 /* DismissalAnimator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DismissalAnimator.swift; sourceTree = ""; }; + 8A12E84C282343970071AF00 /* NavigationViewExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = NavigationViewExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 8A12E84E282343970071AF00 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 8A12E850282343970071AF00 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; + 8A12E852282343970071AF00 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 8A12E855282343970071AF00 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 8A12E857282343990071AF00 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 8A12E85A282343990071AF00 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 8A12E85C282343990071AF00 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 8AA03875280516A70007BD2D /* CustomDestinationPreviewViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomDestinationPreviewViewController.swift; sourceTree = ""; }; 8AA03877280517FA0007BD2D /* SceneDelegate+PreviewViewControllerDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SceneDelegate+PreviewViewControllerDelegate.swift"; sourceTree = ""; }; 8AA0387928066DA80007BD2D /* SceneDelegate+CustomDestinationPreviewViewControllerDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SceneDelegate+CustomDestinationPreviewViewControllerDelegate.swift"; sourceTree = ""; }; @@ -140,6 +155,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 8A12E849282343970071AF00 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 8A12E861282344750071AF00 /* MapboxNavigation in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 8AD220E827C1A433000734A5 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -214,6 +237,20 @@ path = "Custom Banners"; sourceTree = ""; }; + 8A12E84D282343970071AF00 /* NavigationViewExample */ = { + isa = PBXGroup; + children = ( + 8A12E84E282343970071AF00 /* AppDelegate.swift */, + 8A12E850282343970071AF00 /* SceneDelegate.swift */, + 8A12E852282343970071AF00 /* ViewController.swift */, + 8A12E854282343970071AF00 /* Main.storyboard */, + 8A12E857282343990071AF00 /* Assets.xcassets */, + 8A12E859282343990071AF00 /* LaunchScreen.storyboard */, + 8A12E85C282343990071AF00 /* Info.plist */, + ); + path = NavigationViewExample; + sourceTree = ""; + }; 8AD220EC27C1A433000734A5 /* PreviewViewControllerExample */ = { isa = PBXGroup; children = ( @@ -259,6 +296,7 @@ isa = PBXGroup; children = ( 8DF8E4DD2202694100B29FEF /* Documents */, + 8A12E84D282343970071AF00 /* NavigationViewExample */, 8AD220EC27C1A433000734A5 /* PreviewViewControllerExample */, 35B711DB1E5E7B70001EDA8D /* Example */, DA1A1AFC25E085D40097BBD7 /* */, @@ -275,6 +313,7 @@ 358D14631E5E3B7700ADE590 /* Example.app */, C53F2F0720EBC95600D9798F /* Example.app */, 8AD220EB27C1A433000734A5 /* PreviewViewControllerExample.app */, + 8A12E84C282343970071AF00 /* NavigationViewExample.app */, ); name = Products; sourceTree = ""; @@ -303,6 +342,27 @@ productReference = 358D14631E5E3B7700ADE590 /* Example.app */; productType = "com.apple.product-type.application"; }; + 8A12E84B282343970071AF00 /* NavigationViewExample */ = { + isa = PBXNativeTarget; + buildConfigurationList = 8A12E85F282343990071AF00 /* Build configuration list for PBXNativeTarget "NavigationViewExample" */; + buildPhases = ( + 8A12E848282343970071AF00 /* Sources */, + 8A12E849282343970071AF00 /* Frameworks */, + 8A12E84A282343970071AF00 /* Resources */, + 8A12E862282345290071AF00 /* Apply Mapbox Access Token */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = NavigationViewExample; + packageProductDependencies = ( + 8A12E860282344750071AF00 /* MapboxNavigation */, + ); + productName = NavigationViewExample; + productReference = 8A12E84C282343970071AF00 /* NavigationViewExample.app */; + productType = "com.apple.product-type.application"; + }; 8AD220EA27C1A433000734A5 /* PreviewViewControllerExample */ = { isa = PBXNativeTarget; buildConfigurationList = 8AD220FC27C1A435000734A5 /* Build configuration list for PBXNativeTarget "PreviewViewControllerExample" */; @@ -356,7 +416,7 @@ KnownAssetTags = ( New, ); - LastSwiftUpdateCheck = 1320; + LastSwiftUpdateCheck = 1330; LastUpgradeCheck = 1330; ORGANIZATIONNAME = Mapbox; TargetAttributes = { @@ -366,6 +426,9 @@ LastSwiftMigration = 1030; ProvisioningStyle = Automatic; }; + 8A12E84B282343970071AF00 = { + CreatedOnToolsVersion = 13.3.1; + }; 8AD220EA27C1A433000734A5 = { CreatedOnToolsVersion = 13.2.1; }; @@ -423,6 +486,7 @@ 358D14621E5E3B7700ADE590 /* Example */, C53F2EDE20EBC95600D9798F /* Example-CarPlay */, 8AD220EA27C1A433000734A5 /* PreviewViewControllerExample */, + 8A12E84B282343970071AF00 /* NavigationViewExample */, ); }; /* End PBXProject section */ @@ -441,6 +505,16 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 8A12E84A282343970071AF00 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8A12E85B282343990071AF00 /* LaunchScreen.storyboard in Resources */, + 8A12E858282343990071AF00 /* Assets.xcassets in Resources */, + 8A12E856282343970071AF00 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 8AD220E927C1A433000734A5 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -464,6 +538,25 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ + 8A12E862282345290071AF00 /* Apply Mapbox Access Token */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "$(TARGET_BUILD_DIR)/$(INFOPLIST_PATH)", + ); + name = "Apply Mapbox Access Token"; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "# This Run Script build phase helps to keep the navigation SDK’s developers from exposing their own access tokens during development. See for more information. If you are developing an application privately, you may add the MGLMapboxAccessToken key directly to your Info.plist file and delete this build phase.\n\ntoken_file=~/.mapbox\ntoken_file2=~/mapbox\ntoken=\"$(cat $token_file 2>/dev/null || cat $token_file2 2>/dev/null)\"\nif [ \"$token\" ]; then\n plutil -replace MBXAccessToken -string $token \"$TARGET_BUILD_DIR/$INFOPLIST_PATH\"\nelse\n echo 'warning: Missing Mapbox access token'\n open 'https://www.mapbox.com/account/access-tokens/'\n echo \"warning: Get an access token from , then create a new file at $token_file or $token_file2 that contains the access token.\"\nfi\n"; + }; 8AD2210727C1AEAA000734A5 /* Apply Mapbox Access Token */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -531,6 +624,16 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 8A12E848282343970071AF00 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8A12E853282343970071AF00 /* ViewController.swift in Sources */, + 8A12E84F282343970071AF00 /* AppDelegate.swift in Sources */, + 8A12E851282343970071AF00 /* SceneDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 8AD220E727C1A433000734A5 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -604,6 +707,22 @@ name = Main.storyboard; sourceTree = ""; }; + 8A12E854282343970071AF00 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 8A12E855282343970071AF00 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 8A12E859282343990071AF00 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 8A12E85A282343990071AF00 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; 8AD220F827C1A435000734A5 /* LaunchScreen.storyboard */ = { isa = PBXVariantGroup; children = ( @@ -679,6 +798,82 @@ }; name = Release; }; + 8A12E85D282343990071AF00 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + GCC_C_LANGUAGE_STANDARD = gnu11; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = NavigationViewExample/Info.plist; + INFOPLIST_KEY_NSLocationAlwaysAndWhenInUseUsageDescription = "Get user location"; + INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "Get user location"; + INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "Get user location"; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UIMainStoryboardFile = Main; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = com.mapbox.NavigationViewExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 8A12E85E282343990071AF00 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GCC_C_LANGUAGE_STANDARD = gnu11; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = NavigationViewExample/Info.plist; + INFOPLIST_KEY_NSLocationAlwaysAndWhenInUseUsageDescription = "Get user location"; + INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "Get user location"; + INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "Get user location"; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UIMainStoryboardFile = Main; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = com.mapbox.NavigationViewExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; 8AD220FD27C1A435000734A5 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -944,6 +1139,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + 8A12E85F282343990071AF00 /* Build configuration list for PBXNativeTarget "NavigationViewExample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 8A12E85D282343990071AF00 /* Debug */, + 8A12E85E282343990071AF00 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; 8AD220FC27C1A435000734A5 /* Build configuration list for PBXNativeTarget "PreviewViewControllerExample" */ = { isa = XCConfigurationList; buildConfigurations = ( @@ -985,6 +1189,10 @@ /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ + 8A12E860282344750071AF00 /* MapboxNavigation */ = { + isa = XCSwiftPackageProductDependency; + productName = MapboxNavigation; + }; 8AB97C0D280A220100792939 /* MapboxGeocoder */ = { isa = XCSwiftPackageProductDependency; package = DAF5BE4826A1FD1200DD3F2B /* XCRemoteSwiftPackageReference "MapboxGeocoder.swift" */; diff --git a/MapboxNavigation-SPM.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/MapboxNavigation-SPM.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved deleted file mode 100644 index e04b36d9252..00000000000 --- a/MapboxNavigation-SPM.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ /dev/null @@ -1,169 +0,0 @@ -{ - "object": { - "pins": [ - { - "package": "CwlCatchException", - "repositoryURL": "https://github.com/mattgallagher/CwlCatchException.git", - "state": { - "branch": null, - "revision": "35f9e770f54ce62dd8526470f14c6e137cef3eea", - "version": "2.1.1" - } - }, - { - "package": "CwlPreconditionTesting", - "repositoryURL": "https://github.com/mattgallagher/CwlPreconditionTesting.git", - "state": { - "branch": null, - "revision": "c21f7bab5ca8eee0a9998bbd17ca1d0eb45d4688", - "version": "2.1.0" - } - }, - { - "package": "MapboxCommon", - "repositoryURL": "https://github.com/mapbox/mapbox-common-ios.git", - "state": { - "branch": null, - "revision": "14dce80bdd987df7f4cd517656fb22b3f634427c", - "version": "22.0.0-rc.2" - } - }, - { - "package": "MapboxCoreMaps", - "repositoryURL": "https://github.com/mapbox/mapbox-core-maps-ios.git", - "state": { - "branch": null, - "revision": "ddcc3b2877d7b33167bfe7dfd70f769b9c7bfbbb", - "version": "10.6.0-rc.1" - } - }, - { - "package": "MapboxDirections", - "repositoryURL": "https://github.com/mapbox/mapbox-directions-swift.git", - "state": { - "branch": null, - "revision": "0309c64e66a841fff5c231c7650e0bd8f29886d3", - "version": "2.6.0-beta.1" - } - }, - { - "package": "MapboxMobileEvents", - "repositoryURL": "https://github.com/mapbox/mapbox-events-ios.git", - "state": { - "branch": null, - "revision": "5e130fba637f5bbb0bb8bca0dec8d38a06ce07bf", - "version": "1.0.8" - } - }, - { - "package": "MapboxMaps", - "repositoryURL": "https://github.com/mapbox/mapbox-maps-ios.git", - "state": { - "branch": null, - "revision": "bdf6b3aa863f447475383e9b405faaa3fa7892d3", - "version": "10.6.0-rc.1" - } - }, - { - "package": "MapboxNavigationNative", - "repositoryURL": "https://github.com/mapbox/mapbox-navigation-native-ios.git", - "state": { - "branch": null, - "revision": "aec6d93f02cd7aa9019f82510c5d9b137449182e", - "version": "105.0.0" - } - }, - { - "package": "MapboxSpeech", - "repositoryURL": "https://github.com/mapbox/mapbox-speech-swift.git", - "state": { - "branch": null, - "revision": "b0a6008c184c1010dac11e14bf20afe4261d8c36", - "version": "2.0.0" - } - }, - { - "package": "MapboxGeocoder", - "repositoryURL": "https://github.com/mapbox/MapboxGeocoder.swift.git", - "state": { - "branch": null, - "revision": "91fb908bb57c0fcddc0062b5d64ea2002e0ea789", - "version": "0.14.0" - } - }, - { - "package": "Nimble", - "repositoryURL": "https://github.com/Quick/Nimble.git", - "state": { - "branch": null, - "revision": "c93f16c25af5770f0d3e6af27c9634640946b068", - "version": "9.2.1" - } - }, - { - "package": "OHHTTPStubs", - "repositoryURL": "https://github.com/AliSoftware/OHHTTPStubs.git", - "state": { - "branch": null, - "revision": "12f19662426d0434d6c330c6974d53e2eb10ecd9", - "version": "9.1.0" - } - }, - { - "package": "Polyline", - "repositoryURL": "https://github.com/raphaelmor/Polyline.git", - "state": { - "branch": null, - "revision": "554a15b15ff33cf6757f4cb693c5c285fe58694e", - "version": "5.0.3" - } - }, - { - "package": "Quick", - "repositoryURL": "https://github.com/Quick/Quick.git", - "state": { - "branch": null, - "revision": "8cce6acd38f965f5baa3167b939f86500314022b", - "version": "3.1.2" - } - }, - { - "package": "Solar", - "repositoryURL": "https://github.com/ceeK/Solar.git", - "state": { - "branch": null, - "revision": "c2b96f2d5fb7f835b91cefac5e83101f54643901", - "version": "3.0.1" - } - }, - { - "package": "swift-argument-parser", - "repositoryURL": "https://github.com/apple/swift-argument-parser", - "state": { - "branch": null, - "revision": "f3c9084a71ef4376f2fabbdf1d3d90a49f1fabdb", - "version": "1.1.2" - } - }, - { - "package": "SnapshotTesting", - "repositoryURL": "https://github.com/pointfreeco/swift-snapshot-testing.git", - "state": { - "branch": null, - "revision": "f8a9c997c3c1dab4e216a8ec9014e23144cbab37", - "version": "1.9.0" - } - }, - { - "package": "Turf", - "repositoryURL": "https://github.com/mapbox/turf-swift.git", - "state": { - "branch": null, - "revision": "569e0f0e96fda86e1a1dcefaefa68cfa9491ffc1", - "version": "2.4.0" - } - } - ] - }, - "version": 1 -} diff --git a/NavigationViewExample/AppDelegate.swift b/NavigationViewExample/AppDelegate.swift new file mode 100644 index 00000000000..7be884f0c47 --- /dev/null +++ b/NavigationViewExample/AppDelegate.swift @@ -0,0 +1,15 @@ +import UIKit + +@main +class AppDelegate: UIResponder, UIApplicationDelegate { + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + return true + } + + // MARK: UISceneSession Lifecycle + + func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { + return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) + } +} diff --git a/NavigationViewExample/Assets.xcassets/AccentColor.colorset/Contents.json b/NavigationViewExample/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 00000000000..eb878970081 --- /dev/null +++ b/NavigationViewExample/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NavigationViewExample/Assets.xcassets/AppIcon.appiconset/Contents.json b/NavigationViewExample/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000000..5a3257a7d00 --- /dev/null +++ b/NavigationViewExample/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,93 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "60x60" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "83.5x83.5" + }, + { + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NavigationViewExample/Assets.xcassets/Contents.json b/NavigationViewExample/Assets.xcassets/Contents.json new file mode 100644 index 00000000000..73c00596a7f --- /dev/null +++ b/NavigationViewExample/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NavigationViewExample/Base.lproj/LaunchScreen.storyboard b/NavigationViewExample/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 00000000000..865e9329f37 --- /dev/null +++ b/NavigationViewExample/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NavigationViewExample/Base.lproj/Main.storyboard b/NavigationViewExample/Base.lproj/Main.storyboard new file mode 100644 index 00000000000..25a763858ec --- /dev/null +++ b/NavigationViewExample/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NavigationViewExample/Info.plist b/NavigationViewExample/Info.plist new file mode 100644 index 00000000000..dd3c9afdae3 --- /dev/null +++ b/NavigationViewExample/Info.plist @@ -0,0 +1,25 @@ + + + + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + $(PRODUCT_MODULE_NAME).SceneDelegate + UISceneStoryboardFile + Main + + + + + + diff --git a/NavigationViewExample/SceneDelegate.swift b/NavigationViewExample/SceneDelegate.swift new file mode 100644 index 00000000000..3603dc33b5c --- /dev/null +++ b/NavigationViewExample/SceneDelegate.swift @@ -0,0 +1,6 @@ +import UIKit + +class SceneDelegate: UIResponder, UIWindowSceneDelegate { + + var window: UIWindow? +} diff --git a/NavigationViewExample/ViewController.swift b/NavigationViewExample/ViewController.swift new file mode 100644 index 00000000000..9339476cb4c --- /dev/null +++ b/NavigationViewExample/ViewController.swift @@ -0,0 +1,38 @@ +import UIKit +import MapboxNavigation + +class ViewController: UIViewController { + + var navigationView: NavigationView! + + override func viewDidLoad() { + super.viewDidLoad() + + navigationView = NavigationView(frame: view.bounds) + navigationView.autoresizingMask = [.flexibleWidth, .flexibleHeight] + + let navigationViewportDataSource = NavigationViewportDataSource(navigationView.navigationMapView.mapView, + viewportDataSourceType: .raw) + navigationView.navigationMapView.navigationCamera.viewportDataSource = navigationViewportDataSource + navigationView.navigationMapView.navigationCamera.follow() + + view.addSubview(navigationView) + } + + override func viewDidAppear(_ animated: Bool) { + super.viewDidAppear(animated) + + self.navigationView.bottomBannerContainerView.heightAnchor.constraint(equalToConstant: 150.0).isActive = true + self.navigationView.bottomBannerContainerView.backgroundColor = .white + self.navigationView.bottomBannerContainerView.hide(animated: false) + + self.navigationView.topBannerContainerView.heightAnchor.constraint(equalToConstant: 150.0).isActive = true + self.navigationView.topBannerContainerView.backgroundColor = .white + self.navigationView.topBannerContainerView.hide(animated: false) + + DispatchQueue.main.asyncAfter(deadline: .now() + 5.0) { + self.navigationView.bottomBannerContainerView.show(duration: 5.0) + self.navigationView.topBannerContainerView.show(duration: 5.0) + } + } +} diff --git a/Sources/MapboxNavigation/NavigationView.swift b/Sources/MapboxNavigation/NavigationView.swift index afe0ba472ba..7827f3fc031 100644 --- a/Sources/MapboxNavigation/NavigationView.swift +++ b/Sources/MapboxNavigation/NavigationView.swift @@ -213,6 +213,7 @@ open class NavigationView: UIView { } func commonInit() { + DayStyle().apply() floatingButtons = [overviewButton, muteButton, reportButton] setupViews() setupConstraints()