From 135a5da748d010e9c4928e5e323b346d109b314c Mon Sep 17 00:00:00 2001 From: Alex Azarov Date: Mon, 15 Apr 2024 16:11:23 +0200 Subject: [PATCH] Cherry-picking updates from main to release-v2.18 (#4631) * Use camera options to calculate zoom for overview camera (#4593) * Use camera options to calculate zoom for overview camera * Create dependabot.yml Enable Dependabot version updates * Bump actions/checkout from 3 to 4 Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] * Bump github/codeql-action from 2 to 3 Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/v2...v3) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] * Fixed the possible situation when the upcoming route leg is rendered above the active route leg (#4589) * Add the ability to set locale for top and bottom banner views (#4595) * Implement configurable waypoints in CarPlayDelegate * Update Tests/MapboxNavigationTests/CarPlayUtils.swift Co-authored-by: Nastassia Makaranka * Update CHANGELOG.md Co-authored-by: Nastassia Makaranka * Update dependencies (#4614) * vk/dependencies-update: bumped Directions to 2.12.0, Maps to 10.16.5. Now compatible with Turf 2.7.0. * vk/dependencies-update: CHANGELOG updated * vk/dependencies-update: bumped NN to v202; update cocoapods in gemfile to 1.14 * vk/dependencies-update: unit tests fix * Sync Package.resolved with last resolved dependencies * Update CHANGELOG.md * Sync CocoaPodsTest --------- Co-authored-by: Udumft * Fix SystemSpeechSynthesizer related main thread hang on NavigationViewController creation (#4617) * Don't check if AVSpeechSynthesizer.isSpeaking when unmuting it * add changelog entry * Improve error handing in case of invalid route responses (#4618) * Improve error handing in case of invalid route responses * Fix the order in which delegate is notified about failed reroute attempt * Fix for old Swift compiler versions * Fixed project structure in Carthage integration * Added changelog entry * Fix Examples signing when building on a real device (#4619) * Fix Examples signing when building on a real device * Replace build phases with the new script in 3 test targets * Grant exec permissions to the script * Fix carplay background maneuver card * Fix method annotation and desctiption * Update changelog * Fix compile errors * Update breaking changes list * Update changelog * Update spelling * Fix spelling * Update CHANGELOG.md * Update NN and Maps (#4628) * Update NN and Maps * Update CHANGELOG.md * Update CHANGELOG.md --------- Signed-off-by: dependabot[bot] Co-authored-by: Nastassia Makaranka Co-authored-by: Thibaud Lopez Schneider Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Max Co-authored-by: Max <70526783+chizhavko@users.noreply.github.com> Co-authored-by: Udumft --- .github/dependabot.yml | 11 +++ .github/workflows/codeql.yml | 6 +- CHANGELOG.md | 6 +- Cartfile | 4 +- Cartfile.resolved | 4 +- MapboxCoreNavigation.podspec | 2 +- .../project.pbxproj | 71 +++++++++++++---- .../xcshareddata/swiftpm/Package.resolved | 16 ++-- .../xcschemes/Example-CarPlay.xcscheme | 20 +---- .../xcshareddata/xcschemes/Example.xcscheme | 20 +---- MapboxNavigation.podspec | 2 +- MapboxNavigation.xcodeproj/project.pbxproj | 8 +- Package.resolved | 16 ++-- Package.swift | 4 +- .../LegacyRouteController.swift | 9 ++- .../{Result+Expected.swift => Result++.swift} | 9 +++ .../RouteController.swift | 27 ++++--- Sources/MapboxCoreNavigation/Router.swift | 2 +- .../SystemSpeechSynthesizer.swift | 2 +- .../AppIcon.appiconset/Contents.json | 79 ++++++++++++------- Tests/CocoaPodsTest/PodInstall/Podfile.lock | 36 ++++----- scripts/apply_mapbox_token.sh | 21 +++++ 22 files changed, 227 insertions(+), 148 deletions(-) create mode 100644 .github/dependabot.yml rename Sources/MapboxCoreNavigation/{Result+Expected.swift => Result++.swift} (83%) create mode 100755 scripts/apply_mapbox_token.sh diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000000..0d08e261a2a --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file + +version: 2 +updates: + - package-ecosystem: "github-actions" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: "weekly" diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index b3c7120e49d..3ac4f7b9b8d 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -27,12 +27,12 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} @@ -48,6 +48,6 @@ jobs: /usr/bin/xcodebuild build -project /Users/runner/work/mapbox-navigation-ios/mapbox-navigation-ios/MapboxNavigation-SPM.xcodeproj -target Example CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 with: category: "/language:${{matrix.language}}" diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b7d559f4a1..0929fb24acc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,9 +4,9 @@ ### Packaging -* MapboxNavigation now requires [MapboxMaps v10.16.5](https://github.com/mapbox/mapbox-maps-ios/releases/tag/v10.16.5). ([#4605](https://github.com/mapbox/mapbox-navigation-ios/pull/4605)) +* MapboxNavigation now requires [MapboxMaps v10.17.0](https://github.com/mapbox/mapbox-maps-ios/releases/tag/v10.17.0). ([#4628](https://github.com/mapbox/mapbox-navigation-ios/pull/4628)) * MapboxCoreNavigation now requires [MapboxDirections v2.12.0](https://github.com/mapbox/mapbox-directions-swift/releases/tag/v2.12.0). ([#4605](https://github.com/mapbox/mapbox-navigation-ios/pull/4605)) -* MapboxCoreNavigation now requires [MapboxNavigationNative v202._x_](https://github.com/mapbox/mapbox-navigation-native-ios/releases/tag/202.0.0). ([#4605](https://github.com/mapbox/mapbox-navigation-ios/pull/4605)) +* MapboxCoreNavigation now requires [MapboxNavigationNative v204._x_](https://github.com/mapbox/mapbox-navigation-native-ios/releases/tag/202.0.0). ([#4628](https://github.com/mapbox/mapbox-navigation-ios/pull/4628)) * MapboxCoreNavigation is no longer dependent on MapboxMobileEvents. ([#4572](https://github.com/mapbox/mapbox-navigation-ios/pull/4572)) * Added a Polish localization. ([#4582](https://github.com/mapbox/mapbox-navigation-ios/pull/4582)) @@ -37,6 +37,8 @@ * Removed `NavigationEventsManager.init(activeNavigationDataSource:passiveNavigationDataSource:accessToken:mobileEventsManager:)` in favor of `NavigationEventsManager.init(activeNavigationDataSource:passiveNavigationDataSource:accessToken:)`. ([#4572](https://github.com/mapbox/mapbox-navigation-ios/pull/4572)) * Fixed a rare issue that could lead to memory corruption under specific conditions. This was resolved by replacing the internal image downloader with brand new actor-based implementation. ([#4588](https://github.com/mapbox/mapbox-navigation-ios/pull/4588)) * Fixed the possible situation when the upcoming route leg is rendered above the active route leg. ([#4588](https://github.com/mapbox/mapbox-navigation-ios/pull/4588)) +* Fixed a main thread hang on NavigationViewController creation. ([#4617](https://github.com/mapbox/mapbox-navigation-ios/pull/4617)) +* Fixed error reporting in `RouteController/reroute(from:along:)`. ([#4618](https://github.com/mapbox/mapbox-navigation-ios/pull/4618)) ## v2.17.0 diff --git a/Cartfile b/Cartfile index 68cd7df55bc..080cc2ec89d 100644 --- a/Cartfile +++ b/Cartfile @@ -1,3 +1,3 @@ -binary "https://api.mapbox.com/downloads/v2/carthage/mapbox-common/MapboxCommon.json" == 23.8.6 -binary "https://api.mapbox.com/downloads/v2/carthage/mobile-navigation-native/MapboxNavigationNative.xcframework.json" ~> 202.0.0 +binary "https://api.mapbox.com/downloads/v2/carthage/mapbox-common/MapboxCommon.json" == 23.9.2 +binary "https://api.mapbox.com/downloads/v2/carthage/mobile-navigation-native/MapboxNavigationNative.xcframework.json" ~> 204.0.1 github "mapbox/mapbox-directions-swift" ~> 2.12.0 diff --git a/Cartfile.resolved b/Cartfile.resolved index 2dcbd233e7d..9bcae79f40b 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,5 +1,5 @@ -binary "https://api.mapbox.com/downloads/v2/carthage/mapbox-common/MapboxCommon.json" "23.8.6" -binary "https://api.mapbox.com/downloads/v2/carthage/mobile-navigation-native/MapboxNavigationNative.xcframework.json" "202.0.0" +binary "https://api.mapbox.com/downloads/v2/carthage/mapbox-common/MapboxCommon.json" "23.9.2" +binary "https://api.mapbox.com/downloads/v2/carthage/mobile-navigation-native/MapboxNavigationNative.xcframework.json" "204.0.1" github "mapbox/mapbox-directions-swift" "v2.12.0" github "mapbox/turf-swift" "v2.8.0" github "mattgallagher/CwlPreconditionTesting" "2.2.1" diff --git a/MapboxCoreNavigation.podspec b/MapboxCoreNavigation.podspec index dc3eaaaee29..46963288fa9 100644 --- a/MapboxCoreNavigation.podspec +++ b/MapboxCoreNavigation.podspec @@ -44,7 +44,7 @@ Pod::Spec.new do |s| s.requires_arc = true s.module_name = "MapboxCoreNavigation" - s.dependency "MapboxNavigationNative", "~> 202.0.0" + s.dependency "MapboxNavigationNative", "~> 204.0.1" s.dependency "MapboxDirections", "~> 2.12.0" s.swift_version = "5.5" diff --git a/MapboxNavigation-SPM.xcodeproj/project.pbxproj b/MapboxNavigation-SPM.xcodeproj/project.pbxproj index 045699b5558..bfc3f57fd4f 100644 --- a/MapboxNavigation-SPM.xcodeproj/project.pbxproj +++ b/MapboxNavigation-SPM.xcodeproj/project.pbxproj @@ -454,6 +454,7 @@ 358D145F1E5E3B7700ADE590 /* Sources */, 358D14601E5E3B7700ADE590 /* Frameworks */, 358D14611E5E3B7700ADE590 /* Resources */, + DF5A6E012BB6E13000BC3F2C /* Apply Mapbox token */, ); buildRules = ( ); @@ -559,6 +560,7 @@ C53F2EE320EBC95600D9798F /* Sources */, C53F2EE920EBC95600D9798F /* Frameworks */, C53F2EF220EBC95600D9798F /* Resources */, + DF5A6E022BB6E29C00BC3F2C /* Apply Mapbox token */, ); buildRules = ( ); @@ -608,9 +610,7 @@ TestTargetID = 8AC81F56284832E000662395; }; C53F2EDE20EBC95600D9798F = { - DevelopmentTeam = GJZR2MEM28; LastSwiftMigration = 1030; - ProvisioningStyle = Manual; }; }; }; @@ -760,7 +760,8 @@ ); 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 MBXAccessToken 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"; + 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 MBXAccessToken key directly to your Info.plist file and delete this build phase.\n\n\"${SRCROOT}/scripts/apply_mapbox_token.sh\"\n"; + showEnvVarsInLog = 0; }; 8A9C67F22891F2B100C28B2B /* Apply Mapbox Access Token */ = { isa = PBXShellScriptBuildPhase; @@ -771,7 +772,6 @@ inputFileListPaths = ( ); inputPaths = ( - "", "$(TARGET_BUILD_DIR)/$(INFOPLIST_PATH)", ); name = "Apply Mapbox Access Token"; @@ -781,7 +781,8 @@ ); 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 MBXAccessToken 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"; + 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 MBXAccessToken key directly to your Info.plist file and delete this build phase.\n\n\"${SRCROOT}/scripts/apply_mapbox_token.sh\"\n"; + showEnvVarsInLog = 0; }; 8AB31424284837EC00348E52 /* Apply Mapbox Access Token */ = { isa = PBXShellScriptBuildPhase; @@ -801,7 +802,50 @@ ); 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 MBXAccessToken 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"; + 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 MBXAccessToken key directly to your Info.plist file and delete this build phase.\n\n\"${SRCROOT}/scripts/apply_mapbox_token.sh\"\n"; + showEnvVarsInLog = 0; + }; + DF5A6E012BB6E13000BC3F2C /* Apply Mapbox token */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "$(TARGET_BUILD_DIR)/$(INFOPLIST_PATH)", + ); + name = "Apply Mapbox 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 MBXAccessToken key directly to your Info.plist file and delete this build phase.\n\n\"${SRCROOT}/scripts/apply_mapbox_token.sh\"\n"; + showEnvVarsInLog = 0; + }; + DF5A6E022BB6E29C00BC3F2C /* Apply Mapbox token */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "$(TARGET_BUILD_DIR)/$(INFOPLIST_PATH)", + ); + name = "Apply Mapbox 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 MBXAccessToken key directly to your Info.plist file and delete this build phase.\n\n\"${SRCROOT}/scripts/apply_mapbox_token.sh\"\n"; + showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -1353,8 +1397,8 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = "${SRCROOT}/Example/Entitlements.plist"; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Manual; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_TEAM = GJZR2MEM28; FRAMEWORK_SEARCH_PATHS = "$(inherited)"; @@ -1366,8 +1410,7 @@ ); PRODUCT_BUNDLE_IDENTIFIER = "com.Mapbox.CarPlay-Example"; PRODUCT_NAME = Example; - PROVISIONING_PROFILE = "69c90fd8-c53b-41a4-ac73-5bc11068a49a"; - PROVISIONING_PROFILE_SPECIFIER = "CarPlay Provisioning Profile"; + PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OBJC_BRIDGING_HEADER = "Example/Example-Swift-BridgingHeader.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; }; @@ -1380,9 +1423,8 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = "${SRCROOT}/Example/Entitlements.plist"; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CODE_SIGN_STYLE = Manual; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = GJZR2MEM28; FRAMEWORK_SEARCH_PATHS = "$(inherited)"; INFOPLIST_FILE = Example/Info.plist; @@ -1393,8 +1435,7 @@ ); PRODUCT_BUNDLE_IDENTIFIER = "com.Mapbox.CarPlay-Example"; PRODUCT_NAME = Example; - PROVISIONING_PROFILE = "69c90fd8-c53b-41a4-ac73-5bc11068a49a"; - PROVISIONING_PROFILE_SPECIFIER = "CarPlay Provisioning Profile"; + PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OBJC_BRIDGING_HEADER = "Example/Example-Swift-BridgingHeader.h"; }; name = Release; diff --git a/MapboxNavigation-SPM.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/MapboxNavigation-SPM.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 9c662e47315..ae8a9c1879b 100644 --- a/MapboxNavigation-SPM.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/MapboxNavigation-SPM.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -24,8 +24,8 @@ "repositoryURL": "https://github.com/mapbox/mapbox-common-ios.git", "state": { "branch": null, - "revision": "ea67fe9b6ef4ee37e1d0bbc32752d46f3082dc61", - "version": "23.9.0" + "revision": "696503304fe8807bd5af3abb23ef20c051dd8b12", + "version": "23.9.2" } }, { @@ -33,8 +33,8 @@ "repositoryURL": "https://github.com/mapbox/mapbox-core-maps-ios.git", "state": { "branch": null, - "revision": "00207cff55938601b4ce22e683cdc710fd8864e9", - "version": "10.16.5" + "revision": "255a3d159c710d33ab8a85d15a2842012462f581", + "version": "10.17.0" } }, { @@ -51,8 +51,8 @@ "repositoryURL": "https://github.com/mapbox/mapbox-maps-ios.git", "state": { "branch": null, - "revision": "79af3be38640c4d60af167e9ee42754d832816e3", - "version": "10.16.5" + "revision": "52bb5df80e4a6dd84d61bf9f4fc63a68b30c03e4", + "version": "10.17.0" } }, { @@ -60,8 +60,8 @@ "repositoryURL": "https://github.com/mapbox/mapbox-navigation-native-ios.git", "state": { "branch": null, - "revision": "a40157f2b13108563a3b792d42c4fdcc2287cdcc", - "version": "202.0.0" + "revision": "b1c9d09cca14c69455f2ce79dc588f2ae06bde37", + "version": "204.0.1" } }, { diff --git a/MapboxNavigation-SPM.xcodeproj/xcshareddata/xcschemes/Example-CarPlay.xcscheme b/MapboxNavigation-SPM.xcodeproj/xcshareddata/xcschemes/Example-CarPlay.xcscheme index 787a6d4248a..5d57a59ee4c 100644 --- a/MapboxNavigation-SPM.xcodeproj/xcshareddata/xcschemes/Example-CarPlay.xcscheme +++ b/MapboxNavigation-SPM.xcodeproj/xcshareddata/xcschemes/Example-CarPlay.xcscheme @@ -1,28 +1,10 @@ + version = "1.3"> - - - - - - - - - - + version = "1.3"> - - - - - - - - - - 10.16.5" + s.dependency "MapboxMaps", "~> 10.17.0" s.dependency "Solar-dev", "~> 3.0" s.dependency "MapboxSpeech", "~> 2.0" diff --git a/MapboxNavigation.xcodeproj/project.pbxproj b/MapboxNavigation.xcodeproj/project.pbxproj index 7ce90b9017e..f6ea7d38287 100644 --- a/MapboxNavigation.xcodeproj/project.pbxproj +++ b/MapboxNavigation.xcodeproj/project.pbxproj @@ -169,7 +169,6 @@ 2E5ACEE8288E877A00300ECA /* EventsAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2E5ACEE6288E877A00300ECA /* EventsAPI.swift */; }; 2E5ACEE9288E877A00300ECA /* EventConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2E5ACEE7288E877A00300ECA /* EventConstants.swift */; }; 2E5ACEEB288E888500300ECA /* EventsAPIMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2E5ACEEA288E888500300ECA /* EventsAPIMock.swift */; }; - 2E6656F9264EC912009463EE /* Result+Expected.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2E6656F8264EC912009463EE /* Result+Expected.swift */; }; 2E82B9DC26E61F4600B7837F /* CongestionLevel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2E82B9DB26E61F4600B7837F /* CongestionLevel.swift */; }; 2E82B9DE26E6237600B7837F /* CongestionLevelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2E82B9DD26E6237600B7837F /* CongestionLevelTests.swift */; }; 2EBF20AE25D6F89000DB7BF2 /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2EBF20AD25D6F89000DB7BF2 /* Utils.swift */; }; @@ -566,6 +565,7 @@ DAFA92071F01735000A7FB09 /* DistanceFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 351BEC0B1E5BCC72006FE110 /* DistanceFormatter.swift */; }; DF345E4129437EE800EC77A7 /* MBXInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = DF345E4029437EE800EC77A7 /* MBXInfo.plist */; }; DF345E4329437F1000EC77A7 /* Bundle+SDKVersion.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF345E4229437F1000EC77A7 /* Bundle+SDKVersion.swift */; }; + DFBE62C82BB467E900CF830D /* Result++.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFBE62C72BB467E900CF830D /* Result++.swift */; }; E20E3AC526C50AC6002E13EE /* BillingServiceMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = E20E3AC426C50AC5002E13EE /* BillingServiceMock.swift */; }; E20F43C326BBD0A600346E71 /* RouterDelegateSpy.swift in Sources */ = {isa = PBXBuildFile; fileRef = E20F43C226BBD0A600346E71 /* RouterDelegateSpy.swift */; }; E2108B30285866C200CB0875 /* NavigationLog.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2108B2F285866C200CB0875 /* NavigationLog.swift */; }; @@ -859,7 +859,6 @@ 2E5ACEE6288E877A00300ECA /* EventsAPI.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EventsAPI.swift; sourceTree = ""; }; 2E5ACEE7288E877A00300ECA /* EventConstants.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EventConstants.swift; sourceTree = ""; }; 2E5ACEEA288E888500300ECA /* EventsAPIMock.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EventsAPIMock.swift; sourceTree = ""; }; - 2E6656F8264EC912009463EE /* Result+Expected.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Result+Expected.swift"; sourceTree = ""; }; 2E82B9DB26E61F4600B7837F /* CongestionLevel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CongestionLevel.swift; sourceTree = ""; }; 2E82B9DD26E6237600B7837F /* CongestionLevelTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CongestionLevelTests.swift; sourceTree = ""; }; 2EBF20AD25D6F89000DB7BF2 /* Utils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Utils.swift; sourceTree = ""; }; @@ -1358,6 +1357,7 @@ DAFEB36F2093A3EF00A86A83 /* ko */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = ko; path = Resources/ko.lproj/Localizable.stringsdict; sourceTree = ""; }; DF345E4029437EE800EC77A7 /* MBXInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = MBXInfo.plist; path = Resources/MBXInfo.plist; sourceTree = ""; }; DF345E4229437F1000EC77A7 /* Bundle+SDKVersion.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Bundle+SDKVersion.swift"; sourceTree = ""; }; + DFBE62C72BB467E900CF830D /* Result++.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Result++.swift"; sourceTree = ""; }; E20E3AC426C50AC5002E13EE /* BillingServiceMock.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BillingServiceMock.swift; sourceTree = ""; }; E20F43C226BBD0A600346E71 /* RouterDelegateSpy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RouterDelegateSpy.swift; sourceTree = ""; }; E2108B2F285866C200CB0875 /* NavigationLog.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NavigationLog.swift; sourceTree = ""; }; @@ -2498,7 +2498,7 @@ 5A39B9272498F9890026DFD1 /* PassiveLocationManager.swift */, 8A3A218F25EEC00200EDA999 /* CoreNavigationNavigator.swift */, E2805A5726CB994500165DB9 /* NSLock+MapboxInternal.swift */, - 2E6656F8264EC912009463EE /* Result+Expected.swift */, + DFBE62C72BB467E900CF830D /* Result++.swift */, E2C623A626CBFCE1005769FA /* OnMainQueue.swift */, E2DAFAB927BCF3C200BA12BD /* RoutesCoordinator.swift */, ); @@ -3553,7 +3553,6 @@ 4303A3992332CD6200B5737D /* UnimplementedLogging.swift in Sources */, 2C4D0A2E29F6DC900063BF52 /* NavigationSessionManager.swift in Sources */, 2C295ACA299BF76000FC74E8 /* Junction.swift in Sources */, - 2E6656F9264EC912009463EE /* Result+Expected.swift in Sources */, 8A7B69922947AA0F00FFC3F5 /* AmenityType.swift in Sources */, 11D1F8A02696048D0053A93F /* Dictionary+DeepMerge.swift in Sources */, 3A163AE3249901D000D66A0D /* FixLocation.swift in Sources */, @@ -3606,6 +3605,7 @@ DA5F44C825F07AB700F573EC /* MapboxStreetsRoadClass.swift in Sources */, 2B5A4AC728099FA900170A2B /* AlternativeRoute.swift in Sources */, 2E50E0C0264E35CA009D3848 /* RoadObjectMatcher.swift in Sources */, + DFBE62C82BB467E900CF830D /* Result++.swift in Sources */, C51DF8661F38C31C006C6A15 /* Locale.swift in Sources */, DA5F44F625F07D3B00F573EC /* RoadObjectStore.swift in Sources */, 2C85644F297AD64C006EFCBB /* NavigationNativeEventsManager.swift in Sources */, diff --git a/Package.resolved b/Package.resolved index ac356eff050..06f1a5b663f 100644 --- a/Package.resolved +++ b/Package.resolved @@ -24,8 +24,8 @@ "repositoryURL": "https://github.com/mapbox/mapbox-common-ios.git", "state": { "branch": null, - "revision": "151719f2bbff5321bed3fd273e45117c9cff816a", - "version": "23.9.1" + "revision": "696503304fe8807bd5af3abb23ef20c051dd8b12", + "version": "23.9.2" } }, { @@ -33,8 +33,8 @@ "repositoryURL": "https://github.com/mapbox/mapbox-core-maps-ios.git", "state": { "branch": null, - "revision": "42fdde08f59b95a6cfc152be6b9f72612d4ffa25", - "version": "10.16.6" + "revision": "255a3d159c710d33ab8a85d15a2842012462f581", + "version": "10.17.0" } }, { @@ -51,8 +51,8 @@ "repositoryURL": "https://github.com/mapbox/mapbox-maps-ios.git", "state": { "branch": null, - "revision": "c0e4ade4f6a816114e3d29c1a112364cde07c43c", - "version": "10.16.6" + "revision": "52bb5df80e4a6dd84d61bf9f4fc63a68b30c03e4", + "version": "10.17.0" } }, { @@ -60,8 +60,8 @@ "repositoryURL": "https://github.com/mapbox/mapbox-navigation-native-ios.git", "state": { "branch": null, - "revision": "a40157f2b13108563a3b792d42c4fdcc2287cdcc", - "version": "202.0.0" + "revision": "b1c9d09cca14c69455f2ce79dc588f2ae06bde37", + "version": "204.0.1" } }, { diff --git a/Package.swift b/Package.swift index f4555c7c69b..83d0eea2a54 100644 --- a/Package.swift +++ b/Package.swift @@ -23,8 +23,8 @@ let package = Package( ], dependencies: [ .package(name: "MapboxDirections", url: "https://github.com/mapbox/mapbox-directions-swift.git", from: "2.12.0"), - .package(name: "MapboxNavigationNative", url: "https://github.com/mapbox/mapbox-navigation-native-ios.git", from: "202.0.0"), - .package(name: "MapboxMaps", url: "https://github.com/mapbox/mapbox-maps-ios.git", from: "10.16.5"), + .package(name: "MapboxNavigationNative", url: "https://github.com/mapbox/mapbox-navigation-native-ios.git", from: "204.0.1"), + .package(name: "MapboxMaps", url: "https://github.com/mapbox/mapbox-maps-ios.git", from: "10.17.0"), .package(name: "Solar", url: "https://github.com/ceeK/Solar.git", from: "3.0.0"), .package(name: "MapboxSpeech", url: "https://github.com/mapbox/mapbox-speech-swift.git", from: "2.0.0"), .package(name: "CwlPreconditionTesting", url: "https://github.com/mattgallagher/CwlPreconditionTesting.git", from: "2.1.0"), diff --git a/Sources/MapboxCoreNavigation/LegacyRouteController.swift b/Sources/MapboxCoreNavigation/LegacyRouteController.swift index 249f620f920..9d3ce9ff09e 100644 --- a/Sources/MapboxCoreNavigation/LegacyRouteController.swift +++ b/Sources/MapboxCoreNavigation/LegacyRouteController.swift @@ -151,15 +151,16 @@ open class LegacyRouteController: NSObject, Router, InternalRouter, CLLocationMa updateRoute(with: indexedRouteResponse, routeOptions: routeOptions, isProactive: false, - isAlternative: false, - completion: completion) + isAlternative: false) { result in + completion?(result.isSuccess) + } } func updateRoute(with indexedRouteResponse: IndexedRouteResponse, routeOptions: RouteOptions?, isProactive: Bool, isAlternative: Bool, - completion: ((Bool) -> Void)?) { + completion: ((Result) -> Void)?) { guard let route = indexedRouteResponse.currentRoute else { preconditionFailure("`indexedRouteResponse` does not contain route for index `\(indexedRouteResponse.routeIndex)` when updating route.") } @@ -167,7 +168,7 @@ open class LegacyRouteController: NSObject, Router, InternalRouter, CLLocationMa routeProgress = RouteProgress(route: route, options: routeOptions) self.indexedRouteResponse = indexedRouteResponse announce(reroute: route, at: location, proactive: isProactive) - completion?(true) + completion?(.success(())) } diff --git a/Sources/MapboxCoreNavigation/Result+Expected.swift b/Sources/MapboxCoreNavigation/Result++.swift similarity index 83% rename from Sources/MapboxCoreNavigation/Result+Expected.swift rename to Sources/MapboxCoreNavigation/Result++.swift index 0fb0d4e76f5..25fe6eb47e6 100644 --- a/Sources/MapboxCoreNavigation/Result+Expected.swift +++ b/Sources/MapboxCoreNavigation/Result++.swift @@ -18,4 +18,13 @@ extension Result { preconditionFailure("Expected type is neither a value nor an error.") } } + + var isSuccess: Bool { + switch self { + case .success: + return true + case .failure: + return false + } + } } diff --git a/Sources/MapboxCoreNavigation/RouteController.swift b/Sources/MapboxCoreNavigation/RouteController.swift index 00704820f1b..e2c4f2ef425 100644 --- a/Sources/MapboxCoreNavigation/RouteController.swift +++ b/Sources/MapboxCoreNavigation/RouteController.swift @@ -867,14 +867,18 @@ extension RouteController: Router { case let .success(indexedResponse): let response = indexedResponse.routeResponse guard case let .route(routeOptions) = response.options else { - //TODO: Can a match hit this codepoint? - self.isRerouting = false; return + self.isRerouting = false + self.announceReroutingError(with: ReroutingError.routeError) + return } self.updateRoute(with: indexedResponse, routeOptions: routeOptions, isProactive: false, - isAlternative: false) { [weak self] success in + isAlternative: false) { [weak self] result in self?.isRerouting = false + if case let .failure(error) = result { + self?.announceReroutingError(with: error) + } } case let .failure(error): self.announceReroutingError(with: error) @@ -890,15 +894,16 @@ extension RouteController: Router { updateRoute(with: indexedRouteResponse, routeOptions: routeOptions, isProactive: false, - isAlternative: false, - completion: completion) + isAlternative: false) { result in + completion?(result.isSuccess) + } } func updateRoute(with indexedRouteResponse: IndexedRouteResponse, routeOptions: RouteOptions?, isProactive: Bool, isAlternative: Bool, - completion: ((Bool) -> Void)?) { + completion: ((Result) -> Void)?) { guard let route = indexedRouteResponse.currentRoute else { preconditionFailure("`indexedRouteResponse` does not contain route for index `\(indexedRouteResponse.routeIndex)` when updating route.") } @@ -926,9 +931,9 @@ extension RouteController: Router { self.announce(reroute: route, at: self.location, proactive: isProactive) self.indexedRouteResponse = indexedRouteResponse self.didProactiveReroute = isProactive - completion?(true) - case .failure: - completion?(false) + completion?(.success(())) + case .failure(let error): + completion?(.failure(error)) } } } @@ -1014,11 +1019,11 @@ extension RouteController: ReroutingControllerDelegate { routeOptions: options, isProactive: false, isAlternative: true, - completion: { [weak self] success in + completion: { [weak self] result in guard let self = self else { return } var userInfo = [RouteController.NotificationUserInfoKey: Any]() userInfo[.locationKey] = self.location - if success { + if result.isSuccess { NotificationCenter.default.post(name: .routeControllerDidTakeAlternativeRoute, object: self, userInfo: userInfo) diff --git a/Sources/MapboxCoreNavigation/Router.swift b/Sources/MapboxCoreNavigation/Router.swift index 48c429722be..dc892ca3ce5 100644 --- a/Sources/MapboxCoreNavigation/Router.swift +++ b/Sources/MapboxCoreNavigation/Router.swift @@ -318,7 +318,7 @@ protocol InternalRouter: AnyObject { routeOptions: RouteOptions?, isProactive: Bool, isAlternative: Bool, - completion: ((Bool) -> Void)?) + completion: ((Result) -> Void)?) } extension InternalRouter where Self: Router { diff --git a/Sources/MapboxNavigation/SystemSpeechSynthesizer.swift b/Sources/MapboxNavigation/SystemSpeechSynthesizer.swift index 42c17524d24..e716586bf58 100644 --- a/Sources/MapboxNavigation/SystemSpeechSynthesizer.swift +++ b/Sources/MapboxNavigation/SystemSpeechSynthesizer.swift @@ -13,7 +13,7 @@ open class SystemSpeechSynthesizer: NSObject, SpeechSynthesizing { public weak var delegate: SpeechSynthesizingDelegate? public var muted: Bool = false { didSet { - if isSpeaking { + if muted, isSpeaking { interruptSpeaking() } } diff --git a/Tests/CocoaPodsTest/PodInstall/PodInstall/Assets.xcassets/AppIcon.appiconset/Contents.json b/Tests/CocoaPodsTest/PodInstall/PodInstall/Assets.xcassets/AppIcon.appiconset/Contents.json index 36d2c80d889..99174b99356 100644 --- a/Tests/CocoaPodsTest/PodInstall/PodInstall/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/Tests/CocoaPodsTest/PodInstall/PodInstall/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -2,67 +2,92 @@ "images" : [ { "idiom" : "iphone", - "size" : "29x29", - "scale" : "2x" + "scale" : "2x", + "size" : "20x20" }, { "idiom" : "iphone", - "size" : "29x29", - "scale" : "3x" + "scale" : "3x", + "size" : "20x20" }, { "idiom" : "iphone", - "size" : "40x40", - "scale" : "2x" + "scale" : "2x", + "size" : "29x29" }, { "idiom" : "iphone", - "size" : "40x40", - "scale" : "3x" + "scale" : "3x", + "size" : "29x29" }, { "idiom" : "iphone", - "size" : "60x60", - "scale" : "2x" + "scale" : "2x", + "size" : "40x40" }, { "idiom" : "iphone", - "size" : "60x60", - "scale" : "3x" + "scale" : "3x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "60x60" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "20x20" }, { "idiom" : "ipad", - "size" : "29x29", - "scale" : "1x" + "scale" : "1x", + "size" : "29x29" }, { "idiom" : "ipad", - "size" : "29x29", - "scale" : "2x" + "scale" : "2x", + "size" : "29x29" }, { "idiom" : "ipad", - "size" : "40x40", - "scale" : "1x" + "scale" : "1x", + "size" : "40x40" }, { "idiom" : "ipad", - "size" : "40x40", - "scale" : "2x" + "scale" : "2x", + "size" : "40x40" }, { "idiom" : "ipad", - "size" : "76x76", - "scale" : "1x" + "scale" : "1x", + "size" : "76x76" }, { "idiom" : "ipad", - "size" : "76x76", - "scale" : "2x" + "scale" : "2x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "83.5x83.5" + }, + { + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" } ], "info" : { - "version" : 1, - "author" : "xcode" + "author" : "xcode", + "version" : 1 } -} \ No newline at end of file +} diff --git a/Tests/CocoaPodsTest/PodInstall/Podfile.lock b/Tests/CocoaPodsTest/PodInstall/Podfile.lock index 01246cc2c98..d9f6ddfaed4 100644 --- a/Tests/CocoaPodsTest/PodInstall/Podfile.lock +++ b/Tests/CocoaPodsTest/PodInstall/Podfile.lock @@ -1,25 +1,25 @@ PODS: - - MapboxCommon (23.9.1) - - MapboxCoreMaps (10.16.6): + - MapboxCommon (23.9.2) + - MapboxCoreMaps (10.17.0): - MapboxCommon (~> 23.9) - - MapboxCoreNavigation (2.18.0-rc.3): + - MapboxCoreNavigation (2.18.0-beta.1): - MapboxDirections (~> 2.12.0) - - MapboxNavigationNative (~> 202.0.0) + - MapboxNavigationNative (~> 204.0.1) - MapboxDirections (2.12.0): - Polyline (~> 5.0) - Turf (~> 2.7.0) - - MapboxMaps (10.16.6): - - MapboxCommon (= 23.9.1) - - MapboxCoreMaps (= 10.16.6) + - MapboxMaps (10.17.0): + - MapboxCommon (= 23.9.2) + - MapboxCoreMaps (= 10.17.0) - MapboxMobileEvents (= 1.0.10) - Turf (= 2.7.0) - MapboxMobileEvents (1.0.10) - - MapboxNavigation (2.18.0-rc.3): - - MapboxCoreNavigation (= 2.18.0-rc.3) - - MapboxMaps (~> 10.16.5) + - MapboxNavigation (2.18.0-beta.1): + - MapboxCoreNavigation (= 2.18.0-beta.1) + - MapboxMaps (~> 10.17.0) - MapboxSpeech (~> 2.0) - Solar-dev (~> 3.0) - - MapboxNavigationNative (202.0.0): + - MapboxNavigationNative (204.0.1): - MapboxCommon (~> 23.9) - MapboxSpeech (2.1.1) - Polyline (5.1.0) @@ -50,14 +50,14 @@ EXTERNAL SOURCES: :path: "../../../" SPEC CHECKSUMS: - MapboxCommon: 20466d839cc43381c44df09d19f7f794b55b9a93 - MapboxCoreMaps: c21f433decbb295874f0c2464e492166db813b56 - MapboxCoreNavigation: dddd3789a05e8a34aa430003b2740360c44c4e35 + MapboxCommon: 768660d6fca8193529ecf82eb6f5f9ae7a5acdf9 + MapboxCoreMaps: be412ff97b16aa7820922c818115a9a0d8211caa + MapboxCoreNavigation: c5ccbc9c7bea149b9e61507b75e5a36b1f59d0b3 MapboxDirections: 4676f626df320732dcf74612223e568d39588320 - MapboxMaps: c3b36646b9038706bbceb5de203bcdd0f411e9d0 + MapboxMaps: 87ef0003e6db46e45e7a16939f29ae87e38e7ce2 MapboxMobileEvents: de50b3a4de180dd129c326e09cd12c8adaaa46d6 - MapboxNavigation: cce9c9e1d6da892f3c37103333edc78706e2f9da - MapboxNavigationNative: 65bc7bdab133ee5c36a13c0d2b10d3c53e111073 + MapboxNavigation: 3f2d154f0817c95f536ba0a74fb8eb5f656ddca4 + MapboxNavigationNative: cf3640d04da6e67b701f76b1c502954286efee06 MapboxSpeech: cd25ef99c3a3d2e0da72620ff558276ea5991a77 Polyline: 2a1f29f87f8d9b7de868940f4f76deb8c678a5b1 Solar-dev: 4612dc9878b9fed2667d23b327f1d4e54e16e8d0 @@ -65,4 +65,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: bde8103af0e9b326531ee57cf1fa935cbd5f2e18 -COCOAPODS: 1.11.3 +COCOAPODS: 1.15.2 diff --git a/scripts/apply_mapbox_token.sh b/scripts/apply_mapbox_token.sh new file mode 100755 index 00000000000..6fa5bace375 --- /dev/null +++ b/scripts/apply_mapbox_token.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +set -e + +token="$(cat ~/.mapbox 2>/dev/null || cat ~/mapbox 2>/dev/null)" + +if [ -z "$token" ]; then + echo 'warning: Missing Mapbox access token' + echo "warning: Get an access token from , then create a new file at ~/.mapbox that contains the access token." + exit 1 +fi + +INFO_PLIST_PATH="${TARGET_BUILD_DIR}/${INFOPLIST_PATH}" +echo "Updating ${INFO_PLIST_PATH} with Mapbox token" + +if [ ! -f ${INFO_PLIST_PATH} ]; then + echo "error: Could not find Info.plist at ${INFO_PLIST_PATH}" + exit 1 +fi + +plutil -replace 'MBXAccessToken' -string "$token" "${INFO_PLIST_PATH}"