From 45e736d329953016f8868de0360bd6e44671816d Mon Sep 17 00:00:00 2001 From: Aliaksandr Bialiauski Date: Thu, 22 Jul 2021 17:11:38 +0300 Subject: [PATCH 1/7] Extend Example with ability to edit waypoints --- .circleci/config.yml | 5 +- Directions Example/AppDelegate.swift | 10 - .../AppIcon.appiconset/Contents.json | 98 ---- Directions Example/Info.plist | 47 -- Directions Example/Launch Screen.storyboard | 50 -- .../project.pbxproj | 433 ++++++++++++++++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcshareddata/swiftpm/Package.resolved | 43 ++ .../AccentColor.colorset/Contents.json | 11 + .../AppIcon.appiconset/Contents.json | 98 ++++ .../Assets.xcassets/Contents.json | 6 + .../DirectionsPlayground.entitlements | 10 + .../Preview Assets.xcassets/Contents.json | 6 + .../Sources/DirectionsPlayground.swift | 13 + .../Sources/InfoButton.swift | 38 ++ .../Sources/QueriesList.swift | 52 +++ .../DirectionsPlayground/Sources/Query.swift | 12 + .../Sources/QueryEditor.swift | 67 +++ .../Sources/RoutesView.swift | 115 ++--- .../Sources/Storage.swift | 22 + .../Sources/WaypointsEditor.swift | 119 +++++ DirectionsPlayground/README.md | 8 + MapboxDirections.xcodeproj/project.pbxproj | 38 +- README.md | 2 +- .../MapboxDirections/DirectionsError.swift | 7 +- 26 files changed, 1006 insertions(+), 319 deletions(-) delete mode 100644 Directions Example/AppDelegate.swift delete mode 100644 Directions Example/Assets.xcassets/AppIcon.appiconset/Contents.json delete mode 100644 Directions Example/Info.plist delete mode 100644 Directions Example/Launch Screen.storyboard create mode 100644 DirectionsPlayground/DirectionsPlayground.xcodeproj/project.pbxproj create mode 100644 DirectionsPlayground/DirectionsPlayground.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 DirectionsPlayground/DirectionsPlayground.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 DirectionsPlayground/DirectionsPlayground.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved create mode 100644 DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AccentColor.colorset/Contents.json create mode 100644 DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 DirectionsPlayground/DirectionsPlayground/Assets.xcassets/Contents.json create mode 100644 DirectionsPlayground/DirectionsPlayground/DirectionsPlayground.entitlements create mode 100644 DirectionsPlayground/DirectionsPlayground/Preview Content/Preview Assets.xcassets/Contents.json create mode 100644 DirectionsPlayground/DirectionsPlayground/Sources/DirectionsPlayground.swift create mode 100644 DirectionsPlayground/DirectionsPlayground/Sources/InfoButton.swift create mode 100644 DirectionsPlayground/DirectionsPlayground/Sources/QueriesList.swift create mode 100644 DirectionsPlayground/DirectionsPlayground/Sources/Query.swift create mode 100644 DirectionsPlayground/DirectionsPlayground/Sources/QueryEditor.swift rename Directions Example/ContentView.swift => DirectionsPlayground/DirectionsPlayground/Sources/RoutesView.swift (56%) create mode 100644 DirectionsPlayground/DirectionsPlayground/Sources/Storage.swift create mode 100644 DirectionsPlayground/DirectionsPlayground/Sources/WaypointsEditor.swift create mode 100644 DirectionsPlayground/README.md diff --git a/.circleci/config.yml b/.circleci/config.yml index 67a2ad2a5..dbd2524b4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -198,12 +198,9 @@ jobs: steps: - checkout - install-mapbox-token - - install-carthage - - restore-cache - - carthage-bootstrap - run: name: "Build example app" - command: xcodebuild -sdk iphonesimulator -project MapboxDirections.xcodeproj -scheme 'Example' -destination 'platform=iOS Simulator,OS=15.5,name=iPhone 13 Pro Max' clean build + command: xcodebuild -sdk iphonesimulator -project DirectionsPlayground/DirectionsPlayground.xcodeproj -scheme 'DirectionsPlayground' -destination 'platform=iOS Simulator,OS=15.5,name=iPhone 13 Pro Max' clean build - save-cache build-job: diff --git a/Directions Example/AppDelegate.swift b/Directions Example/AppDelegate.swift deleted file mode 100644 index f358f5e3e..000000000 --- a/Directions Example/AppDelegate.swift +++ /dev/null @@ -1,10 +0,0 @@ -import SwiftUI - -@main -struct TestApp: App { - var body: some Scene { - WindowGroup { - ContentView(vm: DirectionsViewModel()) - } - } -} diff --git a/Directions Example/Assets.xcassets/AppIcon.appiconset/Contents.json b/Directions Example/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index d8db8d65f..000000000 --- a/Directions Example/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "images" : [ - { - "idiom" : "iphone", - "size" : "20x20", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "20x20", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "3x" - }, - { - "idiom" : "ipad", - "size" : "20x20", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "20x20", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "29x29", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "40x40", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "40x40", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "76x76", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "76x76", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "83.5x83.5", - "scale" : "2x" - }, - { - "idiom" : "ios-marketing", - "size" : "1024x1024", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Directions Example/Info.plist b/Directions Example/Info.plist deleted file mode 100644 index f84499f8c..000000000 --- a/Directions Example/Info.plist +++ /dev/null @@ -1,47 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 2.9.0 - CFBundleSignature - ???? - CFBundleVersion - 110 - LSRequiresIPhoneOS - - NSLocationWhenInUseUsageDescription - Use the user location to fetch a route from their current position. - UILaunchStoryboardName - Launch Screen - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/Directions Example/Launch Screen.storyboard b/Directions Example/Launch Screen.storyboard deleted file mode 100644 index 026a2622b..000000000 --- a/Directions Example/Launch Screen.storyboard +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/DirectionsPlayground/DirectionsPlayground.xcodeproj/project.pbxproj b/DirectionsPlayground/DirectionsPlayground.xcodeproj/project.pbxproj new file mode 100644 index 000000000..21686b8cf --- /dev/null +++ b/DirectionsPlayground/DirectionsPlayground.xcodeproj/project.pbxproj @@ -0,0 +1,433 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 55; + objects = { + +/* Begin PBXBuildFile section */ + E2E47CC227F62E06003C859F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E2E47CC127F62E06003C859F /* Assets.xcassets */; }; + E2E47CC527F62E06003C859F /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E2E47CC427F62E06003C859F /* Preview Assets.xcassets */; }; + E2E47CE127F62E8F003C859F /* QueriesList.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2E47CDA27F62E8F003C859F /* QueriesList.swift */; }; + E2E47CE227F62E8F003C859F /* DirectionsPlayground.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2E47CDB27F62E8F003C859F /* DirectionsPlayground.swift */; }; + E2E47CE327F62E8F003C859F /* RoutesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2E47CDC27F62E8F003C859F /* RoutesView.swift */; }; + E2E47CE427F62E8F003C859F /* Query.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2E47CDD27F62E8F003C859F /* Query.swift */; }; + E2E47CE527F62E8F003C859F /* QueryEditor.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2E47CDE27F62E8F003C859F /* QueryEditor.swift */; }; + E2E47CE627F62E8F003C859F /* WaypointsEditor.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2E47CDF27F62E8F003C859F /* WaypointsEditor.swift */; }; + E2E47CE727F62E8F003C859F /* Storage.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2E47CE027F62E8F003C859F /* Storage.swift */; }; + E2E47CEB27F62EB7003C859F /* MapboxDirections in Frameworks */ = {isa = PBXBuildFile; productRef = E2E47CEA27F62EB7003C859F /* MapboxDirections */; }; + E2E47CEF27F6EF7D003C859F /* InfoButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2E47CEE27F6EF7D003C859F /* InfoButton.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + E2E47CBA27F62E05003C859F /* DirectionsPlayground.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DirectionsPlayground.app; sourceTree = BUILT_PRODUCTS_DIR; }; + E2E47CC127F62E06003C859F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + E2E47CC427F62E06003C859F /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; + E2E47CDA27F62E8F003C859F /* QueriesList.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QueriesList.swift; sourceTree = ""; }; + E2E47CDB27F62E8F003C859F /* DirectionsPlayground.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DirectionsPlayground.swift; sourceTree = ""; }; + E2E47CDC27F62E8F003C859F /* RoutesView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RoutesView.swift; sourceTree = ""; }; + E2E47CDD27F62E8F003C859F /* Query.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Query.swift; sourceTree = ""; }; + E2E47CDE27F62E8F003C859F /* QueryEditor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QueryEditor.swift; sourceTree = ""; }; + E2E47CDF27F62E8F003C859F /* WaypointsEditor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WaypointsEditor.swift; sourceTree = ""; }; + E2E47CE027F62E8F003C859F /* Storage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Storage.swift; sourceTree = ""; }; + E2E47CE827F62EAE003C859F /* mapbox-directions-swift */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = "mapbox-directions-swift"; path = ..; sourceTree = ""; }; + E2E47CED27F630BE003C859F /* DirectionsPlayground.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DirectionsPlayground.entitlements; sourceTree = ""; }; + E2E47CEE27F6EF7D003C859F /* InfoButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InfoButton.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + E2E47CB727F62E05003C859F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + E2E47CEB27F62EB7003C859F /* MapboxDirections in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + E2E47CB127F62E05003C859F = { + isa = PBXGroup; + children = ( + E2E47CE827F62EAE003C859F /* mapbox-directions-swift */, + E2E47CBC27F62E05003C859F /* DirectionsPlayground */, + E2E47CBB27F62E05003C859F /* Products */, + E2E47CE927F62EB7003C859F /* Frameworks */, + ); + sourceTree = ""; + }; + E2E47CBB27F62E05003C859F /* Products */ = { + isa = PBXGroup; + children = ( + E2E47CBA27F62E05003C859F /* DirectionsPlayground.app */, + ); + name = Products; + sourceTree = ""; + }; + E2E47CBC27F62E05003C859F /* DirectionsPlayground */ = { + isa = PBXGroup; + children = ( + E2E47CED27F630BE003C859F /* DirectionsPlayground.entitlements */, + E2E47CD927F62E78003C859F /* Sources */, + E2E47CC127F62E06003C859F /* Assets.xcassets */, + E2E47CC327F62E06003C859F /* Preview Content */, + ); + path = DirectionsPlayground; + sourceTree = ""; + }; + E2E47CC327F62E06003C859F /* Preview Content */ = { + isa = PBXGroup; + children = ( + E2E47CC427F62E06003C859F /* Preview Assets.xcassets */, + ); + path = "Preview Content"; + sourceTree = ""; + }; + E2E47CD927F62E78003C859F /* Sources */ = { + isa = PBXGroup; + children = ( + E2E47CDB27F62E8F003C859F /* DirectionsPlayground.swift */, + E2E47CDA27F62E8F003C859F /* QueriesList.swift */, + E2E47CDD27F62E8F003C859F /* Query.swift */, + E2E47CDE27F62E8F003C859F /* QueryEditor.swift */, + E2E47CDC27F62E8F003C859F /* RoutesView.swift */, + E2E47CE027F62E8F003C859F /* Storage.swift */, + E2E47CDF27F62E8F003C859F /* WaypointsEditor.swift */, + E2E47CEE27F6EF7D003C859F /* InfoButton.swift */, + ); + path = Sources; + sourceTree = ""; + }; + E2E47CE927F62EB7003C859F /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + E2E47CB927F62E05003C859F /* DirectionsPlayground */ = { + isa = PBXNativeTarget; + buildConfigurationList = E2E47CC827F62E06003C859F /* Build configuration list for PBXNativeTarget "DirectionsPlayground" */; + buildPhases = ( + E2E47CB627F62E05003C859F /* Sources */, + E2E47CB727F62E05003C859F /* Frameworks */, + E2E47CB827F62E05003C859F /* Resources */, + E2E47CEC27F62F0D003C859F /* Apply Mapbox Access Token */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = DirectionsPlayground; + packageProductDependencies = ( + E2E47CEA27F62EB7003C859F /* MapboxDirections */, + ); + productName = DirectionsPlayground; + productReference = E2E47CBA27F62E05003C859F /* DirectionsPlayground.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + E2E47CB227F62E05003C859F /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1330; + LastUpgradeCheck = 1330; + TargetAttributes = { + E2E47CB927F62E05003C859F = { + CreatedOnToolsVersion = 13.3; + LastSwiftMigration = 1330; + }; + }; + }; + buildConfigurationList = E2E47CB527F62E05003C859F /* Build configuration list for PBXProject "DirectionsPlayground" */; + compatibilityVersion = "Xcode 13.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = E2E47CB127F62E05003C859F; + productRefGroup = E2E47CBB27F62E05003C859F /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + E2E47CB927F62E05003C859F /* DirectionsPlayground */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + E2E47CB827F62E05003C859F /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E2E47CC527F62E06003C859F /* Preview Assets.xcassets in Resources */, + E2E47CC227F62E06003C859F /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + E2E47CEC27F62F0D003C859F /* 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 = "# Look for a global file named 'mapbox' or '.mapbox' within the home directory\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 MGLMapboxAccessToken -string $token \"$TARGET_BUILD_DIR/$INFOPLIST_PATH\"\nelse\n echo 'warning: Missing Mapbox access token'\n open 'https://account.mapbox.com/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"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + E2E47CB627F62E05003C859F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E2E47CE527F62E8F003C859F /* QueryEditor.swift in Sources */, + E2E47CE727F62E8F003C859F /* Storage.swift in Sources */, + E2E47CE427F62E8F003C859F /* Query.swift in Sources */, + E2E47CEF27F6EF7D003C859F /* InfoButton.swift in Sources */, + E2E47CE227F62E8F003C859F /* DirectionsPlayground.swift in Sources */, + E2E47CE327F62E8F003C859F /* RoutesView.swift in Sources */, + E2E47CE127F62E8F003C859F /* QueriesList.swift in Sources */, + E2E47CE627F62E8F003C859F /* WaypointsEditor.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + E2E47CC627F62E06003C859F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 15.4; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + E2E47CC727F62E06003C859F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 15.4; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + E2E47CC927F62E06003C859F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = DirectionsPlayground/DirectionsPlayground.entitlements; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"DirectionsPlayground/Preview Content\""; + DEVELOPMENT_TEAM = GJZR2MEM28; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = mapbox.DirectionsPlayground; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTS_MACCATALYST = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2,6"; + }; + name = Debug; + }; + E2E47CCA27F62E06003C859F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = DirectionsPlayground/DirectionsPlayground.entitlements; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"DirectionsPlayground/Preview Content\""; + DEVELOPMENT_TEAM = GJZR2MEM28; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = mapbox.DirectionsPlayground; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTS_MACCATALYST = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2,6"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + E2E47CB527F62E05003C859F /* Build configuration list for PBXProject "DirectionsPlayground" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E2E47CC627F62E06003C859F /* Debug */, + E2E47CC727F62E06003C859F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + E2E47CC827F62E06003C859F /* Build configuration list for PBXNativeTarget "DirectionsPlayground" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E2E47CC927F62E06003C859F /* Debug */, + E2E47CCA27F62E06003C859F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCSwiftPackageProductDependency section */ + E2E47CEA27F62EB7003C859F /* MapboxDirections */ = { + isa = XCSwiftPackageProductDependency; + productName = MapboxDirections; + }; +/* End XCSwiftPackageProductDependency section */ + }; + rootObject = E2E47CB227F62E05003C859F /* Project object */; +} diff --git a/DirectionsPlayground/DirectionsPlayground.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/DirectionsPlayground/DirectionsPlayground.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..919434a62 --- /dev/null +++ b/DirectionsPlayground/DirectionsPlayground.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/DirectionsPlayground/DirectionsPlayground.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/DirectionsPlayground/DirectionsPlayground.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000..18d981003 --- /dev/null +++ b/DirectionsPlayground/DirectionsPlayground.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/DirectionsPlayground/DirectionsPlayground.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DirectionsPlayground/DirectionsPlayground.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 000000000..17ece073d --- /dev/null +++ b/DirectionsPlayground/DirectionsPlayground.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,43 @@ +{ + "object": { + "pins": [ + { + "package": "OHHTTPStubs", + "repositoryURL": "https://github.com/AliSoftware/OHHTTPStubs", + "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": "swift-argument-parser", + "repositoryURL": "https://github.com/apple/swift-argument-parser", + "state": { + "branch": null, + "revision": "82905286cc3f0fa8adc4674bf49437cab65a8373", + "version": "1.1.1" + } + }, + { + "package": "Turf", + "repositoryURL": "https://github.com/mapbox/turf-swift.git", + "state": { + "branch": null, + "revision": "a7db78a2281ffe79966443ebe5687766d6c024c7", + "version": "2.3.0" + } + } + ] + }, + "version": 1 +} diff --git a/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AccentColor.colorset/Contents.json b/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 000000000..eb8789700 --- /dev/null +++ b/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/Contents.json b/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..9221b9bb1 --- /dev/null +++ b/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "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" : "1x", + "size" : "76x76" + }, + { + "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/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/Contents.json b/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/Contents.json new file mode 100644 index 000000000..73c00596a --- /dev/null +++ b/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/DirectionsPlayground/DirectionsPlayground/DirectionsPlayground.entitlements b/DirectionsPlayground/DirectionsPlayground/DirectionsPlayground.entitlements new file mode 100644 index 000000000..ee95ab7e5 --- /dev/null +++ b/DirectionsPlayground/DirectionsPlayground/DirectionsPlayground.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.network.client + + + diff --git a/DirectionsPlayground/DirectionsPlayground/Preview Content/Preview Assets.xcassets/Contents.json b/DirectionsPlayground/DirectionsPlayground/Preview Content/Preview Assets.xcassets/Contents.json new file mode 100644 index 000000000..73c00596a --- /dev/null +++ b/DirectionsPlayground/DirectionsPlayground/Preview Content/Preview Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/DirectionsPlayground/DirectionsPlayground/Sources/DirectionsPlayground.swift b/DirectionsPlayground/DirectionsPlayground/Sources/DirectionsPlayground.swift new file mode 100644 index 000000000..0ae8c8bba --- /dev/null +++ b/DirectionsPlayground/DirectionsPlayground/Sources/DirectionsPlayground.swift @@ -0,0 +1,13 @@ +import SwiftUI + +@main +struct DirectionsPlayground: App { + var body: some Scene { + WindowGroup { + NavigationView { + QueriesList() + } + .navigationViewStyle(.stack) + } + } +} diff --git a/DirectionsPlayground/DirectionsPlayground/Sources/InfoButton.swift b/DirectionsPlayground/DirectionsPlayground/Sources/InfoButton.swift new file mode 100644 index 000000000..f438b8da8 --- /dev/null +++ b/DirectionsPlayground/DirectionsPlayground/Sources/InfoButton.swift @@ -0,0 +1,38 @@ +import SwiftUI + +struct InfoButton: View { + enum DocUrl { + case waypointAllowsSnappingToClosedRoad + case waypointAllowsArrivingOnOppositeSide + case separatesLegs + } + + let docUrl: DocUrl + @Environment(\.openURL) var openURL + + var body: some View { + Button { + openURL(docUrl.url) + } label: { + Image(systemName: "info.circle") + } + .buttonStyle(.bordered) + } +} + +extension InfoButton.DocUrl { + var urlString: String { + switch self { + case .waypointAllowsArrivingOnOppositeSide: + return "https://docs.mapbox.com/ios/directions/api/2.3.0/Classes/Waypoint.html#/s:16MapboxDirections8WaypointC28allowsArrivingOnOppositeSideSbvp" + case .waypointAllowsSnappingToClosedRoad: + return "https://docs.mapbox.com/ios/directions/api/2.3.0/Classes/Waypoint.html#/s:16MapboxDirections8WaypointC26allowsSnappingToClosedRoadSbvp" + case .separatesLegs: + return "https://docs.mapbox.com/ios/directions/api/2.3.0/Classes/Waypoint.html#/s:16MapboxDirections8WaypointC13separatesLegsSbvp" + } + } + + var url: URL { + URL(string: urlString)! + } +} diff --git a/DirectionsPlayground/DirectionsPlayground/Sources/QueriesList.swift b/DirectionsPlayground/DirectionsPlayground/Sources/QueriesList.swift new file mode 100644 index 000000000..ab8110a22 --- /dev/null +++ b/DirectionsPlayground/DirectionsPlayground/Sources/QueriesList.swift @@ -0,0 +1,52 @@ +import Foundation +import SwiftUI + +struct QueriesList: View { + @State + var queries: [Query] = [] { + didSet { saveQueries() } + } + + var body: some View { + List { + ForEach($queries) { $query in + NavigationLink( + destination: QueryEditor(query: $query), + label: { + Text(query.name) + }) + } + } + .onAppear { loadQueries() } + .toolbar { + ToolbarItem(placement: .primaryAction) { + Button { newQuery() } + label: { Image(systemName: "plus") } + } + } + .navigationTitle("Saved Queries") + } + + private func loadQueries() { + do { + queries = try Storage.shared.load() ?? [] + } + catch { + print(error) + } + } + + private func newQuery() { + let newQuery = Query.make() + queries.append(newQuery) + } + + private func saveQueries() { + do { + try Storage.shared.save(queries) + } + catch { + print(error) + } + } +} diff --git a/DirectionsPlayground/DirectionsPlayground/Sources/Query.swift b/DirectionsPlayground/DirectionsPlayground/Sources/Query.swift new file mode 100644 index 000000000..aff254c43 --- /dev/null +++ b/DirectionsPlayground/DirectionsPlayground/Sources/Query.swift @@ -0,0 +1,12 @@ +import Foundation + +struct Query: Codable, Identifiable { + let id: String + var name: String + var waypoints: [Waypoint] + + static func make() -> Query { + let uuid = UUID().uuidString + return .init(id: uuid, name: uuid, waypoints: .defaultWaypoints) + } +} diff --git a/DirectionsPlayground/DirectionsPlayground/Sources/QueryEditor.swift b/DirectionsPlayground/DirectionsPlayground/Sources/QueryEditor.swift new file mode 100644 index 000000000..527eaa56f --- /dev/null +++ b/DirectionsPlayground/DirectionsPlayground/Sources/QueryEditor.swift @@ -0,0 +1,67 @@ +import Foundation +import SwiftUI +import Combine +import MapboxDirections + +struct QueryEditor: View { + @State var routes: [Route] = [] { + didSet { + showRoutes = !routes.isEmpty + } + } + @State var error: DirectionsError? + @State var showRoutes: Bool = false + @Binding var query: Query + + var body: some View { + VStack { + WaypointsEditor(waypoints: $query.waypoints) + .toolbar(content: { + ToolbarItem(placement: ToolbarItemPlacement.navigationBarTrailing) { + NavigationLink( + destination: RoutesView(routes: routes), + isActive: $showRoutes, + label: { + Button("Calculate") { + loadRoutes(for: query) + }.buttonStyle(.borderless) + }) + } + }) + .navigationTitle("Edit Route Waypoints") + + } + .alert(isPresented: .constant(error != nil), error: error) { + Button("Ok") { + error = nil + } + } + } + + func loadRoutes(for query: Query) { + let options = RouteOptions(waypoints: query.waypoints.map(\.native)) + print("Calculating route for \(options.waypoints)") + options.includesSteps = true + options.routeShapeResolution = .full + options.attributeOptions = [.congestionLevel, .maximumSpeedLimit] + + Directions.shared.calculate(options) { (session, result) in + switch result { + case let .failure(error): + self.error = error + case let .success(response): + self.routes = response.routes ?? [] + } + } + } +} + +extension Array where Element == Waypoint { + static var defaultWaypoints: Self { + [ + .init(id: .init(), latitude: 38.9131752, longitude: -77.0324047, name: "Mapbox"), + .init(id: .init(), latitude: 38.8906572, longitude: -77.0090701, name: "Capitol"), + .init(id: .init(), latitude: 38.8977000, longitude: -77.0365000, name: "White House"), + ] + } +} diff --git a/Directions Example/ContentView.swift b/DirectionsPlayground/DirectionsPlayground/Sources/RoutesView.swift similarity index 56% rename from Directions Example/ContentView.swift rename to DirectionsPlayground/DirectionsPlayground/Sources/RoutesView.swift index d8612c6da..272183bfb 100644 --- a/Directions Example/ContentView.swift +++ b/DirectionsPlayground/DirectionsPlayground/Sources/RoutesView.swift @@ -1,79 +1,21 @@ import Foundation import SwiftUI -import Combine import MapboxDirections -final class DirectionsViewModel: ObservableObject { - private let distanceFormatter: LengthFormatter = .init() - private let travelTimeFormatter: DateComponentsFormatter = .init() +struct RoutesView: View { + private static let distanceFormatter: LengthFormatter = .init() + private static let travelTimeFormatter: DateComponentsFormatter = { + let f = DateComponentsFormatter() + f.unitsStyle = .short + return f + }() - @Published - var routes: [Route] = [] - - init() { - travelTimeFormatter.unitsStyle = .short - } - - func loadRoutes() { - let startPoint = Waypoint(coordinate: CLLocationCoordinate2D(latitude: 38.9131752, longitude: -77.0324047), - name: "Mapbox") - let stopPoint = Waypoint(coordinate: CLLocationCoordinate2D(latitude: 38.89065720, longitude: -77.0090701), - name: "Capitol") - let endPoint = Waypoint(coordinate: CLLocationCoordinate2D(latitude: 38.8977, longitude: -77.0365), - name: "White House") - let options = RouteOptions(waypoints: [startPoint, stopPoint, endPoint]) - options.includesSteps = true - options.routeShapeResolution = .full - options.attributeOptions = [.congestionLevel, .maximumSpeedLimit] - - Directions.shared.calculate(options) { (session, result) in - switch result { - case let .failure(error): - print("Error calculating directions: \(error)") - case let .success(response): - self.routes = response.routes ?? [] - } - } - } - - func formattedDistance(for route: Route) -> String { - return distanceFormatter.string(fromMeters: route.distance) - } - - func formattedTravelTime(for route: Route) -> String { - return travelTimeFormatter.string(from: route.expectedTravelTime)! - } - - func formattedTypicalTravelTime(for route: Route) -> String { - if let typicalTravelTime = route.typicalTravelTime, - let formattedTypicalTravelTime = travelTimeFormatter.string(from: typicalTravelTime) { - return formattedTypicalTravelTime - } - else { - return "Not available" - } - } - - func stepDescriptions(for step: RouteStep) -> String { - var description: String = "" - let direction = step.maneuverDirection?.rawValue ?? "none" - description.append("\(step.instructions) [\(step.maneuverType) \(direction)]") - if step.distance > 0 { - let formattedDistance = distanceFormatter.string(fromMeters: step.distance) - description.append(" (\(step.transportType) for \(formattedDistance))") - } - return description - } -} - -struct ContentView: View { - @ObservedObject - var vm: DirectionsViewModel + let routes: [Route] var body: some View { ScrollView { LazyVStack(spacing: 10, content: { - ForEach(vm.routes, id: \.distance) { route in + ForEach(routes, id: \.distance) { route in VStack(alignment: .leading, spacing: 3) { headerView(for: route) ForEach(0.. String { + return Self.distanceFormatter.string(fromMeters: route.distance) + } + + func formattedTravelTime(for route: Route) -> String { + return Self.travelTimeFormatter.string(from: route.expectedTravelTime)! + } + + func formattedTypicalTravelTime(for route: Route) -> String { + if let typicalTravelTime = route.typicalTravelTime, + let formattedTypicalTravelTime = Self.travelTimeFormatter.string(from: typicalTravelTime) { + return formattedTypicalTravelTime + } + else { + return "Not available" + } + } + + func stepDescriptions(for step: RouteStep) -> String { + var description: String = "" + let direction = step.maneuverDirection?.rawValue ?? "none" + description.append("\(step.instructions) [\(step.maneuverType) \(direction)]") + if step.distance > 0 { + let formattedDistance = Self.distanceFormatter.string(fromMeters: step.distance) + description.append(" (\(step.transportType) for \(formattedDistance))") + } + return description + } } diff --git a/DirectionsPlayground/DirectionsPlayground/Sources/Storage.swift b/DirectionsPlayground/DirectionsPlayground/Sources/Storage.swift new file mode 100644 index 000000000..061816c33 --- /dev/null +++ b/DirectionsPlayground/DirectionsPlayground/Sources/Storage.swift @@ -0,0 +1,22 @@ +import Foundation + +final class Storage { + static let shared: Storage = .init() + + private enum K { + static let saveKey: String = "mapbox-directions-queries" + } + + func save(_ queries: [Query]) throws { + let coder = JSONEncoder() + let data = try coder.encode(queries) + UserDefaults.standard.setValue(data, forKey: K.saveKey) + } + + func load() throws -> [Query]? { + let decoder = JSONDecoder() + return try UserDefaults.standard.data(forKey: K.saveKey).map { + try decoder.decode([Query].self, from: $0) + } + } +} diff --git a/DirectionsPlayground/DirectionsPlayground/Sources/WaypointsEditor.swift b/DirectionsPlayground/DirectionsPlayground/Sources/WaypointsEditor.swift new file mode 100644 index 000000000..62c0127fc --- /dev/null +++ b/DirectionsPlayground/DirectionsPlayground/Sources/WaypointsEditor.swift @@ -0,0 +1,119 @@ +import Foundation +import SwiftUI +import CoreLocation +import MapboxDirections + +struct Waypoint: Identifiable, Hashable, Codable { + let id: UUID + var latitude: CLLocationDegrees = 0 + var longitude: CLLocationDegrees = 0 + var name: String = "" + var allowsSnappingToClosedRoad: Bool = false + var allowsArrivingOnOppositeSide: Bool = false + var separatesLegs: Bool = true + + var native: MapboxDirections.Waypoint { + let waypoint = MapboxDirections.Waypoint(coordinate: .init(latitude: latitude, longitude: longitude), name: name) + waypoint.allowsSnappingToClosedRoad = allowsSnappingToClosedRoad + waypoint.allowsArrivingOnOppositeSide = allowsArrivingOnOppositeSide + waypoint.separatesLegs = separatesLegs + return waypoint + } + + static func make() -> Waypoint { + .init(id: .init()) + } +} + +struct WaypointsEditor: View { + @Binding + var waypoints: [Waypoint] + + var body: some View { + List { + ForEach($waypoints) { $waypoint in + HStack(alignment: .top) { + WaypointView(waypoint: $waypoint) + + Menu { + Button("Insert Above") { + addNewWaypoint(before: waypoint) + } + Button("Insert Below") { + addNewWaypoint(after: waypoint) + } + } label: { + Image(systemName: "ellipsis") + .frame(width: 30, height: 30, alignment: .center) + }.menuStyle(.borderlessButton) + } + } + .onMove { indices, newOffset in + waypoints.move(fromOffsets: indices, toOffset: newOffset) + } + .onDelete { indexSet in + waypoints.remove(atOffsets: indexSet) + } + } + .listStyle(InsetGroupedListStyle()) + .toolbar { + ToolbarItem(placement: ToolbarItemPlacement.automatic) { + EditButton() + } + } + } + + private func addNewWaypoint(after waypoint: Waypoint) { + guard let waypointIndex = waypoints.firstIndex(of: waypoint) else { + preconditionFailure("Waypoint is in the array of waypoints") + } + let insertionIndex = waypoints.index(after: waypointIndex) + waypoints.insert(Waypoint.make(), at: insertionIndex) + } + private func addNewWaypoint(before waypoint: Waypoint) { + guard let insertionIndex = waypoints.firstIndex(of: waypoint) else { + preconditionFailure("Waypoint is in the array of waypoints") + } + waypoints.insert(Waypoint.make(), at: insertionIndex) + } +} + +struct WaypointView: View { + @Binding var waypoint: Waypoint + @State private var latitudeString: String + @State private var longitudeString: String + + init(waypoint: Binding) { + _waypoint = waypoint + _latitudeString = State(initialValue: waypoint.wrappedValue.latitude.description) + _longitudeString = .init(initialValue: waypoint.wrappedValue.longitude.description) + } + + var body: some View { + VStack(alignment: .leading) { + TextField("Name", text: $waypoint.name) + HStack { + TextField("Lat", text: $latitudeString, onEditingChanged: { _ in + waypoint.latitude = .init(latitudeString) ?? 0 + }) + .fixedSize() + TextField("Lon", text: $longitudeString, onEditingChanged: { _ in + waypoint.longitude = .init(longitudeString) ?? 0 + }) + .fixedSize() + } + HStack { + InfoButton(docUrl: .separatesLegs) + Toggle("Separates Legs", isOn: $waypoint.separatesLegs) + } + HStack { + InfoButton(docUrl: .waypointAllowsSnappingToClosedRoad) + Toggle("Snap To Closed Road", isOn: $waypoint.allowsArrivingOnOppositeSide) + } + HStack { + InfoButton(docUrl: .waypointAllowsArrivingOnOppositeSide) + Toggle("Allows Arriving On Opposite Side", isOn: $waypoint.allowsSnappingToClosedRoad) + } + } + } +} diff --git a/DirectionsPlayground/README.md b/DirectionsPlayground/README.md new file mode 100644 index 000000000..44df21cc2 --- /dev/null +++ b/DirectionsPlayground/README.md @@ -0,0 +1,8 @@ +# Directions Playground + +Shows how to obtain directions using "MapboxDirection" library. + +## Requirements + +- Xcode 13.3 +- iOS 15 diff --git a/MapboxDirections.xcodeproj/project.pbxproj b/MapboxDirections.xcodeproj/project.pbxproj index 4afe05402..eca4dc954 100644 --- a/MapboxDirections.xcodeproj/project.pbxproj +++ b/MapboxDirections.xcodeproj/project.pbxproj @@ -377,9 +377,6 @@ DAD31BC324D4ADBF00A1654D /* match-polyline6.json in Resources */ = {isa = PBXBuildFile; fileRef = DAD31BC224D4A8D100A1654D /* match-polyline6.json */; }; DAD31BC424D4ADBF00A1654D /* match-polyline6.json in Resources */ = {isa = PBXBuildFile; fileRef = DAD31BC224D4A8D100A1654D /* match-polyline6.json */; }; DAD31BC524D4ADC000A1654D /* match-polyline6.json in Resources */ = {isa = PBXBuildFile; fileRef = DAD31BC224D4A8D100A1654D /* match-polyline6.json */; }; - DADD27B81E5AAAD800D31FAD /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = DADD27B71E5AAAD800D31FAD /* AppDelegate.swift */; }; - DADD27BF1E5AAAD800D31FAD /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DADD27BE1E5AAAD800D31FAD /* Assets.xcassets */; }; - DADD27C81E5AAE3100D31FAD /* Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DADD27C71E5AAE3100D31FAD /* Launch Screen.storyboard */; }; DAE2DF6823AECB120065057A /* QuickLookTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAE2DF6723AECB120065057A /* QuickLookTests.swift */; }; DAE2DF6923AECB120065057A /* QuickLookTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAE2DF6723AECB120065057A /* QuickLookTests.swift */; }; DAE2DF6A23AECB120065057A /* QuickLookTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAE2DF6723AECB120065057A /* QuickLookTests.swift */; }; @@ -418,7 +415,6 @@ E232F8C52665173C0038CAF3 /* MapboxDirections.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA1A10AF1D00F8FF009F82FA /* MapboxDirections.framework */; }; E232F8C62665173C0038CAF3 /* MapboxDirections.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DA1A10AF1D00F8FF009F82FA /* MapboxDirections.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; E232F8C9266518480038CAF3 /* Polyline.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = E232F899266513C20038CAF3 /* Polyline.xcframework */; }; - E28E325826662B1E0030807F /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E28E325726662B1E0030807F /* ContentView.swift */; }; F457FA7A252B9E29007DAEB1 /* Incident.swift in Sources */ = {isa = PBXBuildFile; fileRef = F457FA79252B9E29007DAEB1 /* Incident.swift */; }; F457FA7B252B9E29007DAEB1 /* Incident.swift in Sources */ = {isa = PBXBuildFile; fileRef = F457FA79252B9E29007DAEB1 /* Incident.swift */; }; F457FA7C252B9E29007DAEB1 /* Incident.swift in Sources */ = {isa = PBXBuildFile; fileRef = F457FA79252B9E29007DAEB1 /* Incident.swift */; }; @@ -642,10 +638,6 @@ DAD06E3823A008EB001A917D /* QuickLook.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QuickLook.swift; sourceTree = ""; }; DAD31BC224D4A8D100A1654D /* match-polyline6.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = "match-polyline6.json"; sourceTree = ""; }; DADD27B51E5AAAD800D31FAD /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; - DADD27B71E5AAAD800D31FAD /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - DADD27BE1E5AAAD800D31FAD /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - DADD27C31E5AAAD800D31FAD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - DADD27C71E5AAE3100D31FAD /* Launch Screen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = "Launch Screen.storyboard"; sourceTree = ""; }; DAE2DF6723AECB120065057A /* QuickLookTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QuickLookTests.swift; sourceTree = ""; }; DAE2DF6B23AED2280065057A /* RouteTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RouteTests.swift; sourceTree = ""; }; DAE33A1A1F215DF600C06039 /* IntersectionTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IntersectionTests.swift; sourceTree = ""; }; @@ -655,7 +647,6 @@ E232F899266513C20038CAF3 /* Polyline.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Polyline.xcframework; path = Carthage/Build/Polyline.xcframework; sourceTree = ""; }; E232F8AE2665141F0038CAF3 /* Turf.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Turf.xcframework; path = Carthage/Build/Turf.xcframework; sourceTree = ""; }; E232F8BA266516D70038CAF3 /* OHHTTPStubs.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = OHHTTPStubs.xcframework; path = Carthage/Build/OHHTTPStubs.xcframework; sourceTree = ""; }; - E28E325726662B1E0030807F /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; F457FA79252B9E29007DAEB1 /* Incident.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Incident.swift; sourceTree = ""; }; F4CF2C562523B66300A6D0B6 /* TollCollection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TollCollection.swift; sourceTree = ""; }; F4D785EE1DDD82C100FF4665 /* RouteStepTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RouteStepTests.swift; sourceTree = ""; }; @@ -993,31 +984,10 @@ path = v5; sourceTree = ""; }; - DADD27B61E5AAAD800D31FAD /* Directions Example */ = { - isa = PBXGroup; - children = ( - DADD27B71E5AAAD800D31FAD /* AppDelegate.swift */, - E28E325726662B1E0030807F /* ContentView.swift */, - DADD27CB1E5AAF5600D31FAD /* Supporting Files */, - ); - path = "Directions Example"; - sourceTree = ""; - }; - DADD27CB1E5AAF5600D31FAD /* Supporting Files */ = { - isa = PBXGroup; - children = ( - DADD27BE1E5AAAD800D31FAD /* Assets.xcassets */, - DADD27C71E5AAE3100D31FAD /* Launch Screen.storyboard */, - DADD27C31E5AAAD800D31FAD /* Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; DD6254451AE70C1700017857 = { isa = PBXGroup; children = ( 438BFEBF233D804600457294 /* Documents */, - DADD27B61E5AAAD800D31FAD /* Directions Example */, DA6C9D891CAE442B00094FBC /* MapboxDirections */, 2B4382FF2549C1D200A3E38B /* MapboxDirectionsCLI */, DA6C9D971CAE442B00094FBC /* MapboxDirectionsTests */, @@ -1449,8 +1419,6 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - DADD27BF1E5AAAD800D31FAD /* Assets.xcassets in Resources */, - DADD27C81E5AAE3100D31FAD /* Launch Screen.storyboard in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1869,8 +1837,6 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - DADD27B81E5AAAD800D31FAD /* AppDelegate.swift in Sources */, - E28E325826662B1E0030807F /* ContentView.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2357,7 +2323,7 @@ CLANG_ANALYZER_NONNULL = YES; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; DEBUG_INFORMATION_FORMAT = dwarf; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = GJZR2MEM28; FRAMEWORK_SEARCH_PATHS = "$(inherited)"; INFOPLIST_FILE = "Directions Example/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 14.1; @@ -2379,7 +2345,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ANALYZER_NONNULL = YES; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = GJZR2MEM28; FRAMEWORK_SEARCH_PATHS = "$(inherited)"; INFOPLIST_FILE = "Directions Example/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 14.1; diff --git a/README.md b/README.md index 7d015232b..58ab28da3 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ Or in your [Swift Package Manager](https://swift.org/package-manager/) Package.s Then `import MapboxDirections`. -This repository contains an example application that demonstrates how to use the framework. To run it, you need to use [Carthage](https://github.com/Carthage/Carthage) 0.19 or above to install the dependencies. Detailed documentation is available in the [Mapbox API Documentation](https://docs.mapbox.com/api/navigation/#directions). +This repository contains an [example application](./DirectionsPlayground/) that demonstrates how to use the framework. Detailed documentation is available in the [Mapbox API Documentation](https://docs.mapbox.com/api/navigation/#directions). ## System requirements diff --git a/Sources/MapboxDirections/DirectionsError.swift b/Sources/MapboxDirections/DirectionsError.swift index a4de44e34..909e01da8 100644 --- a/Sources/MapboxDirections/DirectionsError.swift +++ b/Sources/MapboxDirections/DirectionsError.swift @@ -110,7 +110,12 @@ public enum DirectionsError: LocalizedError { */ case unknown(response: URLResponse?, underlying: Error?, code: String?, message: String?) - + + public var errorDescription: String? { + guard let failureReason = failureReason else { return nil } + return failureReason.appending(recoverySuggestion ?? "") + } + public var failureReason: String? { switch self { case .network(_): From 5ea295707c74c72924ae4e24e8133592cc9484a7 Mon Sep 17 00:00:00 2001 From: Aliaksandr Bialiauski <413986+S2Ler@users.noreply.github.com> Date: Fri, 6 Jan 2023 10:20:51 +0300 Subject: [PATCH 2/7] Remove unused scheme --- .../xcshareddata/xcschemes/Example.xcscheme | 97 ------------------- 1 file changed, 97 deletions(-) delete mode 100644 MapboxDirections.xcodeproj/xcshareddata/xcschemes/Example.xcscheme diff --git a/MapboxDirections.xcodeproj/xcshareddata/xcschemes/Example.xcscheme b/MapboxDirections.xcodeproj/xcshareddata/xcschemes/Example.xcscheme deleted file mode 100644 index f5613f9ca..000000000 --- a/MapboxDirections.xcodeproj/xcshareddata/xcschemes/Example.xcscheme +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From 9b40ccf7f16e517a5a0755bba6e571af991be645 Mon Sep 17 00:00:00 2001 From: Aliaksandr Bialiauski <413986+S2Ler@users.noreply.github.com> Date: Fri, 6 Jan 2023 10:21:14 +0300 Subject: [PATCH 3/7] Add accent color --- .../Assets.xcassets/AccentColor.colorset/Contents.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AccentColor.colorset/Contents.json b/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AccentColor.colorset/Contents.json index eb8789700..611286920 100644 --- a/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AccentColor.colorset/Contents.json +++ b/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AccentColor.colorset/Contents.json @@ -1,6 +1,10 @@ { "colors" : [ { + "color" : { + "platform" : "universal", + "reference" : "systemBlueColor" + }, "idiom" : "universal" } ], From 13e4a951e2de9294903c0a87f93489333e33cb10 Mon Sep 17 00:00:00 2001 From: Aliaksandr Bialiauski <413986+S2Ler@users.noreply.github.com> Date: Fri, 6 Jan 2023 10:21:24 +0300 Subject: [PATCH 4/7] Add AppIcon for Directions Playground --- .../AppIcon.appiconset/AppStore.png | Bin 0 -> 8870 bytes .../AppIcon.appiconset/CarPlay@2x.png | Bin 0 -> 1092 bytes .../AppIcon.appiconset/CarPlay@3x.png | Bin 0 -> 1560 bytes .../AppIcon.appiconset/Contents.json | 30 ++++++++++++++++++ .../AppIcon.appiconset/iPad-App.png | Bin 0 -> 756 bytes .../AppIcon.appiconset/iPad-App@2x.png | Bin 0 -> 1347 bytes .../AppIcon.appiconset/iPad-Notifications.png | Bin 0 -> 317 bytes .../iPad-Notifications@2x.png | Bin 0 -> 474 bytes .../AppIcon.appiconset/iPad-Settings.png | Bin 0 -> 393 bytes .../AppIcon.appiconset/iPad-Settings@2x.png | Bin 0 -> 610 bytes .../AppIcon.appiconset/iPad-Spotlight.png | Bin 0 -> 474 bytes .../AppIcon.appiconset/iPad-Spotlight@2x.png | Bin 0 -> 782 bytes .../AppIcon.appiconset/iPadPro-App@2x.png | Bin 0 -> 1448 bytes .../AppIcon.appiconset/iPhone-App.png | Bin 0 -> 1092 bytes .../AppIcon.appiconset/iPhone-App@3x.png | Bin 0 -> 1560 bytes .../iPhone-Notification@2x.png | Bin 0 -> 474 bytes .../iPhone-Notification@3x.png | Bin 0 -> 640 bytes .../AppIcon.appiconset/iPhone-Spotlight.png | Bin 0 -> 782 bytes .../iPhone-Spotlight@3x.png | Bin 0 -> 1092 bytes .../AppIcon.appiconset/iPhone@2x.png | Bin 0 -> 610 bytes .../AppIcon.appiconset/iPhone@3x.png | Bin 0 -> 841 bytes 21 files changed, 30 insertions(+) create mode 100644 DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/AppStore.png create mode 100644 DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/CarPlay@2x.png create mode 100644 DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/CarPlay@3x.png create mode 100644 DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPad-App.png create mode 100644 DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPad-App@2x.png create mode 100644 DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPad-Notifications.png create mode 100644 DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPad-Notifications@2x.png create mode 100644 DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPad-Settings.png create mode 100644 DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPad-Settings@2x.png create mode 100644 DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPad-Spotlight.png create mode 100644 DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPad-Spotlight@2x.png create mode 100644 DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPadPro-App@2x.png create mode 100644 DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPhone-App.png create mode 100644 DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPhone-App@3x.png create mode 100644 DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPhone-Notification@2x.png create mode 100644 DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPhone-Notification@3x.png create mode 100644 DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPhone-Spotlight.png create mode 100644 DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPhone-Spotlight@3x.png create mode 100644 DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPhone@2x.png create mode 100644 DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPhone@3x.png diff --git a/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/AppStore.png b/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/AppStore.png new file mode 100644 index 0000000000000000000000000000000000000000..9d420aec494a88cda530c079e963215e6972d020 GIT binary patch literal 8870 zcmd6M`8(9__y0X(#xjHhS|)*( zSxGBspb;8qm94Y}BCYip{WRh+Mri%Vn52zN(vFQvrBNufMDJ_105Y+|Ty6At@LItx1jbeILDNHEFtV5l@;%z7U9i`6gi(_84vX)1|Nf%3sSBpsR0RmZ!E!GzWZ6a zFf5WiW&8GO+5W3`?fl}L6hROSlN>wr& z6lF)11-+lMgP03z+cgAtbHCii+DV1k*-QA`-rt1ApG#5fWR~}MdW(f9O)y9@^+6PV$i}))_Fau=n;K_ zeDek?uQ|N^*_a~!3m7>__=+O##J$?LfhN3*@1y?}g1C@xGM*#yNW#9F(~>!)_f2Zv zijfkRU7B2=Ee1b$@LhU-^E5Zv{gc~?$LA%8dgTlkqVE?1ZQ8|}V&=>>?pp%Vj6_e% z?g4G)dDR=-8%nP+*S73P6s)12hKy*KWa4;}m0{o+%prQ=F8;6Hh`?R-7hKf*E9{TU z;Is{E;%-K`Er(JAjX@T)(inDug8(v|IdN=S3abMS^?(XK%kdSe-B0|Z+CB}Pmm$E| zN2@tutXP5u9~U@nunR{4ePBl)1OP8;s$vywTN(D(g; z3-O)QQLUr+eCnOsBbYIGn0Uv0so8(*ebe_}vN|v`!fsDHl+P1h`Hn|j6A2o-@}zn# zMkc-SamRjL3tV!l!{9+0_XF{o5=gPAC&5$Q>DKox^v<^{WI}G^o}S|dsnM#GwF=_E z{wz@9c32gXWkGB=$72W2W3`4yilaXTgQ;qnhtJuI5|B=UdUASi~@{+Sbk%6 zy~pDEvyw;5CzX^1>aR&0JyKbHrhB5bY}EI^u=$pJojn|ZiJDSv6YcXSZNJYOesMZg zph_g4-8*gn=L3j~@ayYyj>I38Ga9H$*xRR};&aAf<#c#`sMNB8<6*wO&XyE`o@zSe zWRRoFegfqO>6Je=f!v&S25`tR;7agDxninTwE|`LkiV2)%PkOHwBaLRQnFU}Z#wXRfAPzs+MjuD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waGO&(4i9VK?Z%#$3`QduMYv!O~nQ|#^38TD&h9KG~a=Ll7BQ(kkN#qsVnn&+U z3ioKA0Pgw!Q^K{LOK;k|MPrp_{TX(88@^NWg$wMOt0P0)+-sF!L2Q4kDldkNIq>?# zE;D2frC-&lw7%b_{gLA}3s~8DzMAG%yi)VwwoE<)CQ7=w*v+KnjN5UUZD_1qOH2*# z=fB@J)m!FSKxke)t%JR2qs#rLvMf01&PZRzc{U+TSQkVoM>*A|Y`$FIEsGs!{qw7@ z(V@QNnwp(91IEPXc**a!gwDqU7zV)k*8hCflRifvhH`igJZqlmE4WeH5vSI-+%cYQ n%~HDiD?;ZK8vK7_ls?|bQ=y}pV&{(jHSq7yj8Co literal 0 HcmV?d00001 diff --git a/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/CarPlay@2x.png b/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/CarPlay@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..4d00bf7512606d26df66e8ab567052b634e508f6 GIT binary patch literal 1092 zcmV-K1iSl*P)w;Qv5q_)u{8u)zP|=>Kqt|A?Uf@bLeju>W|F|A3hP;Nbtr(EpgI z|Ipa~V1WOSp#NBS_;8T_`2YXF$p2`7|LExdSaA55u>ZKg|B$Hv@c94e@c+2T|7eK+ zfRO)Sc>h><|A?6Xz|jA&xc>pTIm`e61A$3IK~#7F?b%fpggOic;6E+yX5()A-{3Wy zQ|L^E>wNE=RFeSsS6VCKuvNY)Y`+L%jUxXvTGb$%1IK}Zs{ z2VD+*6t+IzbUR7x6q+*nq{uu7ysJx7B4}Y7lH(P_1g}kKtYFZQl3cik#I~lf3L5U5 zq+B0TodlDauLBRE1J3KQ^;fw`3`H9MTB~R;Xx45SZLb% zR8Y1((b(Cv*=wQ7ca<})pwoL$uq|jx2L&6888;`I5<U6>Azx?S5S} zP!bvq*~=4>D4=F%@&P4tNveVxpG%8`1j}oZ<31DxdW+RK34QW{s*bBR0${zf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I?bxmFFzciI_kvyC)0SVb@|4l#z7w5;*zAv(q z4DD73Cka(67y5+dMtUr9J<#2{9Ze&{2%&+SQNTu5^gzTgteN0O%vMwuF~eBwjr$$w zJ62HiP{91AQUU%?V!-^Sa>N=3)}Y^q4b7Zg%^7s9ww5*)72iQTUuj0g@@`_{eWxF= zeE8X5Ej`h^Gt0-!306u6nx_mn_D6_SL_jVAto20?lvu&U6*OPs}Ac4<*ggiT}aN9zy__SZCAHfS|Gv}pK^PLZ_>6T3!ZnI!Nz^3<3Q0;Ex@(Z zEglnj_c4&g{6h2W>Z(2d&OZ(QK-XE(HUq5{VJofZF*SrqGJOPpGc`$AN!msUY}V1v z3T$UW+ErrUK`m)VvW6EC?I?mDBBb4f0-p4eb|QOtQ|xzhcofhs0{FDgwoU}R(j~Dg zH9Wgi#7te_U4121*BlH|NsMF)7MUbAG6NI7wZ5iclU|8MRfADq5`*#rRyri_5)Ede zCC>r@euX5DWPx40f0H+1kDZ7}k{A1a`&^%p2j4YzWePJ0N>MIPO8UO$Q0MP-%NmZ=U|M}hk0000< KMNUMnLSTYC%l?x9 literal 0 HcmV?d00001 diff --git a/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/Contents.json b/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/Contents.json index 9221b9bb1..42be50245 100644 --- a/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,91 +1,121 @@ { "images" : [ { + "filename" : "iPhone-Notification@2x.png", "idiom" : "iphone", "scale" : "2x", "size" : "20x20" }, { + "filename" : "iPhone-Notification@3x.png", "idiom" : "iphone", "scale" : "3x", "size" : "20x20" }, { + "filename" : "iPhone@2x.png", "idiom" : "iphone", "scale" : "2x", "size" : "29x29" }, { + "filename" : "iPhone@3x.png", "idiom" : "iphone", "scale" : "3x", "size" : "29x29" }, { + "filename" : "iPhone-Spotlight.png", "idiom" : "iphone", "scale" : "2x", "size" : "40x40" }, { + "filename" : "iPhone-Spotlight@3x.png", "idiom" : "iphone", "scale" : "3x", "size" : "40x40" }, { + "filename" : "iPhone-App.png", "idiom" : "iphone", "scale" : "2x", "size" : "60x60" }, { + "filename" : "iPhone-App@3x.png", "idiom" : "iphone", "scale" : "3x", "size" : "60x60" }, { + "filename" : "iPad-Notifications.png", "idiom" : "ipad", "scale" : "1x", "size" : "20x20" }, { + "filename" : "iPad-Notifications@2x.png", "idiom" : "ipad", "scale" : "2x", "size" : "20x20" }, { + "filename" : "iPad-Settings.png", "idiom" : "ipad", "scale" : "1x", "size" : "29x29" }, { + "filename" : "iPad-Settings@2x.png", "idiom" : "ipad", "scale" : "2x", "size" : "29x29" }, { + "filename" : "iPad-Spotlight.png", "idiom" : "ipad", "scale" : "1x", "size" : "40x40" }, { + "filename" : "iPad-Spotlight@2x.png", "idiom" : "ipad", "scale" : "2x", "size" : "40x40" }, { + "filename" : "iPad-App.png", "idiom" : "ipad", "scale" : "1x", "size" : "76x76" }, { + "filename" : "iPad-App@2x.png", "idiom" : "ipad", "scale" : "2x", "size" : "76x76" }, { + "filename" : "iPadPro-App@2x.png", "idiom" : "ipad", "scale" : "2x", "size" : "83.5x83.5" }, { + "filename" : "CarPlay@2x.png", + "idiom" : "car", + "scale" : "2x", + "size" : "60x60" + }, + { + "filename" : "CarPlay@3x.png", + "idiom" : "car", + "scale" : "3x", + "size" : "60x60" + }, + { + "filename" : "AppStore.png", "idiom" : "ios-marketing", "scale" : "1x", "size" : "1024x1024" diff --git a/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPad-App.png b/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPad-App.png new file mode 100644 index 0000000000000000000000000000000000000000..4eaf320bf95bbe536ef7c9a39970f207daa6bc4e GIT binary patch literal 756 zcmVu? z|8R)^=|Cq4bJ*|7d{!$k6}b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F-qWEMrYz)^ECac3mA%sTyQpA2K~ zxTZE{O$rC1nV|)VR_8ZYN+up`f-F@TM$EgyEmBwpwi4V`_C;M6z2K4k0~wzRPB+4! Qxc~qF07*qoM6N<$g8qZ;(f|Me literal 0 HcmV?d00001 diff --git a/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPad-Settings.png b/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPad-Settings.png new file mode 100644 index 0000000000000000000000000000000000000000..abd389902013b606cc5433bdfaf28fdcf0926361 GIT binary patch literal 393 zcmV;40e1e0P)-|Ipa~h@k&SX!wAb|7d{!P;mG_Wc={(|8R)^u)zP|=>L$Q|Ddq{Sa|qgc>mbo z|3GN?=!q zSaA4DUT)q1007lVL_t(|0lm=!k_15z1a`j|7eK+;NbtLxc``_|A3JH@c93*xc^{y|B#^nz|j9#c>idC|LE}lh?xIykpFm) z|B$HvSa|sO|Npqi|G>!qaESl#@c-cG|FFRSxWNBlfdA0g|JdOFNND(op#NBK_&{j* z$k6{#aQJ|j|M>X-|NsBv@-*8300E*&L_t(|0qxWUlIAJ^1mGTbi@PFy{|i1@s5s=G z(zUM~mj?Wj{*uq{@6Qt7^?udl{NY2~*SJ`BUvQ=EJ6vK6bMAcfBTm&V4>b`^C{2ev zfLBP57kIqTtB2DA{o())(Ic01`7m@{tx`Sjcfg^s;nI_Y6(zJNaOjf@S{`cgz>Hi7^!==5f^G$uY7{>9Mc%E)pM4@s>x|u;mk$C zSq9^+A(_f`(kg7VoP5}hWo)An0YFBh#m1;F{dzXTSxWS?;JFH30 zB&_U~WK&N^W=MC}M@%v@e%oGwbT7EYtYHExrPaBQ=@qjt)-WPXLwhc#!a@kEqSbmL zQNsH;Do+sauor002Q_$R9YfBf=g}qDs2k1%_LQSCOSz=5Hx@JsOr)wlxKfPXLo7sE zmSy$YYVIf;5b*2sPqjvQJEwbX)Zj-_}Xl;g|H+zq|>lrmL-qX8-^I07*qoM6N<$g1sm_^#A|> literal 0 HcmV?d00001 diff --git a/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPad-Spotlight.png b/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPad-Spotlight.png new file mode 100644 index 0000000000000000000000000000000000000000..73adc93e0c738723814f91112ab8dcba5e3233fc GIT binary patch literal 474 zcmV<00VV#4P)I|Ddq{aESlV*#BsN z|3GN?Sa|r*;Q!$0|FFRSxXAzD;QwHF|B$HvxWNB-kpJlD|M2+#Kw$X5(En(N|A?Uf zEb=PY0003gNklrI1xx9@rHbvtdHFNR*lxrcC--?p{7c+9sTD$DS1fJp=dw zmQzQk!WG#IYM-?L!04Yeg4n=dgj4&#hE9Q)-TT2=J0G~b`WYcoGHBsE)2K`F5*Izs zCf{vx)dm4(Iz4uwP3SXfI$ga$!o~DoW&lu)A)i+OZ*=O+gK7`hqDFNZZE&XaC!F6T zx~KPqV1)BWuTRHg5nDCAG9CCUBBRc|UC`0^uYF-qWEMrYz)^ECac3mA%sTyQpA2K~ zxTZE{O$rC1nV|)VR_8ZYN+up`f-F@TM$EgyEmBwpwi4V`_C;M6z2K4k0~wzRPB+4! Qxc~qF07*qoM6N<$g8qZ;(f|Me literal 0 HcmV?d00001 diff --git a/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPad-Spotlight@2x.png b/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPad-Spotlight@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..19fb06ae8097c834499e781c76d11064a089592c GIT binary patch literal 782 zcmV+p1M&QcP)aWL|5$kV=n0=|Ipz7 zu((jB)Ci6d+qoIc;0T$H-Q%rPUQvs@98Heflm-WjxIIV%Sqy6#3tvYx)fMXehX;y z++nRS?hf`uK?{|HCE?S`QNW7uXvr6_Adj>bODv1HLWM;;PH_FrDOB01 zEUp}Kupql~#7z_$Vpp>-IAEU7kyvRFy0Rz6EQcc-=pME8q-9Or9%IU5=Pp<6$X9eE z8mhJ&VoHrC(Gn3_q08167=_fh4|FyR`%gL{Oe$&;bVShKQIXqJx89)xfzEz7mXfU+ z2Dfp=XhSN{QZ8E=rj;CWl{P?r4<{o~TDFA(ty5EZaX7Ip5vF;j;BQlQ{PU=0JxmKY z;0pYu^y-Wx0G!#%F-daB$A4MmvJ)f<+7D7N*u#eDWsq8&* z+3~ER7elAel0JJPtL9K(M#8?*s(nQ;+jAg;!IM1~n8>djsO^q`7zQ^_uYHDCwF#*6EU!cY=!8?a9CKhM?}o&S&`ErkQ&MStu@t0!Ttr3edpXUvm=$xS z81oJRR|ymrI9$cSqKYddSSByDR!G|$sTbc$S&p#~up}#5NF?lS11<<0ta6AsD^^%* zd#6#l#Ro{o<0Q|K_@FSUsi~6?pOTeP(`<4tDl@!>P)gwK?d@fL0j53~*~$8n@&Et; M07*qoM6N<$f-;te?f?J) literal 0 HcmV?d00001 diff --git a/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPadPro-App@2x.png b/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPadPro-App@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..e3a1aec8c336d3089392c73f956ccaeaa87392f8 GIT binary patch literal 1448 zcmV;Z1y}lsP)(=p#Q+g|G?1yh@k)Y|Nr3V|H#n)@c93@!2f87|KQ;N zfSCV?nEzOK|LExdu(k7RCodH+r^^fDi8+X`mwmRyN|yA z1Kzo-Q5r~!KE2>uA0bkLgx*||BuSDaNs=T1Gh~t=>skM4SZDxO&_D%BZw&^y0(N$X)s`lZ3O;)BBrDil zWc2nUXK4@f*tb(q0KI{Q(KJ>Luva~KV(;*@fm9}w-*H>FAVC+M$Q!@Ng;eW@^^iTQ=+k?*xT-4GzR}od8pg}dOYndSAxzqK)z z7G`8qIG29bEaL z^XNh=3R8!6N}mFkWJ{Kcl)*u1%Tu@8we*Vy|CUh*35UuNMV3f%k5f{Jc3f7Hg>oF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wjr$$w zJ62HiP{91AQUU%?V!-^Sa>N=3)}Y^q4b7Zg%^7s9ww5*)72iQTUuj0g@@`_{eWxF= zeE8X5Ej`h^Gt0-!306u6nx_mn_D6_SL_jVAto20?lvu&U6*OPs}Ac4<*ggiT}aN9zy__SZCAHfS|Gv}pK^PLZ_>6T3!ZnI!Nz^3<3Q0;Ex@(Z zEglnj_c4&g{6h2W>Z(2d&OZ(QK-XE(HUq5{VJofZF*SrqGJOPpGc`$AN!msUY}V1v z3T$UW+ErrUK`m)VvW6EC?I?mDBBb4f0-p4eb|QOtQ|xzhcofhs0{FDgwoU}R(j~Dg zH9Wgi#7te_U4121*BlH|NsMF)7MUbAG6NI7wZ5iclU|8MRfADq5`*#rRyri_5)Ede zCC>r@euX5DWPx40f0H+1kDZ7}k{A1a`&^%p2j4YzWePJ0N>MIPO8UO$Q0MP-%NmZ=U|M}hk0000< KMNUMnLSTYC%l?x9 literal 0 HcmV?d00001 diff --git a/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPhone-Notification@2x.png b/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPhone-Notification@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..73adc93e0c738723814f91112ab8dcba5e3233fc GIT binary patch literal 474 zcmV<00VV#4P)I|Ddq{aESlV*#BsN z|3GN?Sa|r*;Q!$0|FFRSxXAzD;QwHF|B$HvxWNB-kpJlD|M2+#Kw$X5(En(N|A?Uf zEb=PY0003gNklrI1xx9@rHbvtdHFNR*lxrcC--?p{7c+9sTD$DS1fJp=dw zmQzQk!WG#IYM-?L!04Yeg4n=dgj4&#hE9Q)-TT2=J0G~b`WYcoGHBsE)2K`F5*Izs zCf{vx)dm4(Iz4uwP3SXfI$ga$!o~DoW&lu)A)i+OZ*=O+gK7`hqDFNZZE&XaC!F6T zx~KPqV1)BWuTRHg5nDCAG9CCUBBRc|UC`0^uYF-qWEMrYz)^ECac3mA%sTyQpA2K~ zxTZE{O$rC1nV|)VR_8ZYN+up`f-F@TM$EgyEmBwpwi4V`_C;M6z2K4k0~wzRPB+4! Qxc~qF07*qoM6N<$g8qZ;(f|Me literal 0 HcmV?d00001 diff --git a/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPhone-Notification@3x.png b/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPhone-Notification@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..dd8288a31a5665becdd1eb197555b7aebbcafeab GIT binary patch literal 640 zcmV-`0)PF9P)iE{|6qXsXn_B4i2rbq|9Fu9fSCV?p#PAd|B$Hvn5h4tu>YvI z|FFRS|NsB^`2XOp0|JdOF(AfXT(Eq^D|G>!qxXAyw!2htg|Cq4< zh?xI?kpF0i|5$MN(BS{@`2YC-|6F$`cmMzax=BPqRCodH)&-BHFaQML!Tkvg+CD%3 z|NrmgT^kytti*S}ct|DF0g6u_nwuOiqW$@^71u-T;5Cw4O+!<~c&Y3MXHMVn65r2U zbn~z&ZMdRMuwl=2zY16#X|;#NjvFj%C!FXmRdwn(s#inzTAJ!A#8X_>)H)B#Dw>23 zX#R;>g+(zR#WeT(BUdq4A(pYP2J%gj+|PL&^9R|3y@enCmza z&?JR3$+O2yKtpDpd^T-?kEw#APA`@YBzra5X;y1ia#X6NbVft|oK5P-)`Lo)3*9+- zW`5BXz?7uM+Epv-UdaqF21`s0)QpFTAUPzH`3KwJ3NX`7F$qlAw*A0JQp~z9ZGq(& zCF7Z2xf)nG347XYMAS-KNfH?JSa+~|i+oaxG3TC1&Bshn?Hgu1BhTLYN~V~~8;*|F zk3kL-oJ`OZV8MmT0V6jpJJNK)l8A~p9xCKnb*dF literal 0 HcmV?d00001 diff --git a/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPhone-Spotlight.png b/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPhone-Spotlight.png new file mode 100644 index 0000000000000000000000000000000000000000..19fb06ae8097c834499e781c76d11064a089592c GIT binary patch literal 782 zcmV+p1M&QcP)aWL|5$kV=n0=|Ipz7 zu((jB)Ci6d+qoIc;0T$H-Q%rPUQvs@98Heflm-WjxIIV%Sqy6#3tvYx)fMXehX;y z++nRS?hf`uK?{|HCE?S`QNW7uXvr6_Adj>bODv1HLWM;;PH_FrDOB01 zEUp}Kupql~#7z_$Vpp>-IAEU7kyvRFy0Rz6EQcc-=pME8q-9Or9%IU5=Pp<6$X9eE z8mhJ&VoHrC(Gn3_q08167=_fh4|FyR`%gL{Oe$&;bVShKQIXqJx89)xfzEz7mXfU+ z2Dfp=XhSN{QZ8E=rj;CWl{P?r4<{o~TDFA(ty5EZaX7Ip5vF;j;BQlQ{PU=0JxmKY z;0pYu^y-Wx0G!#%F-daB$A4MmvJ)f<+7D7N*u#eDWsq8&* z+3~ER7elAel0JJPtL9K(M#8?*s(nQ;+jAg;!IM1~n8>djsO^q`7zQ^_uYHDCwF#*6EU!cY=!8?a9CKhM?}o&S&`ErkQ&MStu@t0!Ttr3edpXUvm=$xS z81oJRR|ymrI9$cSqKYddSSByDR!G|$sTbc$S&p#~up}#5NF?lS11<<0ta6AsD^^%* zd#6#l#Ro{o<0Q|K_@FSUsi~6?pOTeP(`<4tDl@!>P)gwK?d@fL0j53~*~$8n@&Et; M07*qoM6N<$f-;te?f?J) literal 0 HcmV?d00001 diff --git a/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPhone-Spotlight@3x.png b/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPhone-Spotlight@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..4d00bf7512606d26df66e8ab567052b634e508f6 GIT binary patch literal 1092 zcmV-K1iSl*P)w;Qv5q_)u{8u)zP|=>Kqt|A?Uf@bLeju>W|F|A3hP;Nbtr(EpgI z|Ipa~V1WOSp#NBS_;8T_`2YXF$p2`7|LExdSaA55u>ZKg|B$Hv@c94e@c+2T|7e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qjt)-WPXLwhc#!a@kEqSbmL zQNsH;Do+sauor002Q_$R9YfBf=g}qDs2k1%_LQSCOSz=5Hx@JsOr)wlxKfPXLo7sE zmSy$YYVIf;5b*2sPqjvQJEwbX)Zj-_}Xl;g|H+zq|>lrmL-qX8-^I07*qoM6N<$g1sm_^#A|> literal 0 HcmV?d00001 diff --git a/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPhone@3x.png b/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPhone@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..36a441a7ee2d74057c1679def863ee099086fe27 GIT binary patch literal 841 zcmV-P1GfB$P)o*#GeG|NsC0=X-z{vkVX!!8> z|Cp%%u)zQ5=>NFL|KRBVh@k(Fp#RX||8S81V0i!F;Q!d*|G2>aXo&xqu>V+i|G?1y zSa|sO|NoGv|5$MNfRO)HDU6r^00N0gL_t(|0qxj@a>G0j1mKnFY_Ag4uCYw?{!jQ5 z$dO4(JJ@`~ft#C~)fsT{Yg}BYC{EHO&g2J6CV5fvKl*Tt1>Yv=fivbRsqh^tuenTL z%lTCs!*%6RaF(>>wl+aHb>O~E5GdC4(Ps#f8u~E_0u1zKQg|B~!n<(70RE$h48xcV z9;D}@o8#@Bs#KIVB^~#IeI1uHclciwAKY)x9PUHr#=GZ<_^c^B3S9CSHi>J_H5C>d zIW=OFl$<$Kz;0nJp(o-&V967#D^3j9((i=xx`3rxTKCuxapoBlq8YDcC&IdhE-lWO z4wxutPQpRlUZ zXTCy*g5%anf6OWITs!X-T*dnvR*o^X?|G{+lWeqG`0j@iGnHDub~nEJti`74YPPEV zg4S=BZFuSpt6KlM@=E_Ma!zTi%O2>+y|2eL*2uM?E5n9+PE}Y`r9Efv1MYV|u|SPI z7Yx`Udi(D4Wjq)z(Sl7MoXF!hu`deJ<7>$^BeuysPnoi9+q&kq2f>b*=ZLYZVYmkS zb$S$>ONRTkUI)RqWO+|lpJ(_1Z$ndP{zDhd@P;2$skgf~RpH{|;@9{C?+|m6 TGCrNE00000NkvXXu0mjfHle)+ literal 0 HcmV?d00001 From dd467f007e512854e583001d2d1f5ea27c312c3b Mon Sep 17 00:00:00 2001 From: Aliaksandr Bialiauski <413986+S2Ler@users.noreply.github.com> Date: Fri, 6 Jan 2023 10:21:32 +0300 Subject: [PATCH 5/7] Update dependencies --- .../project.xcworkspace/xcshareddata/swiftpm/Package.resolved | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DirectionsPlayground/DirectionsPlayground.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DirectionsPlayground/DirectionsPlayground.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 17ece073d..6ddc00467 100644 --- a/DirectionsPlayground/DirectionsPlayground.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DirectionsPlayground/DirectionsPlayground.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -33,8 +33,8 @@ "repositoryURL": "https://github.com/mapbox/turf-swift.git", "state": { "branch": null, - "revision": "a7db78a2281ffe79966443ebe5687766d6c024c7", - "version": "2.3.0" + "revision": "87b5b37108ba9f37f0885b586d8f6355d8240dd8", + "version": "2.6.1" } } ] From 445f6413700aed538644aa82eec3653e17642045 Mon Sep 17 00:00:00 2001 From: Aliaksandr Bialiauski <413986+S2Ler@users.noreply.github.com> Date: Fri, 6 Jan 2023 10:29:15 +0300 Subject: [PATCH 6/7] Remove Example Target --- MapboxDirections.xcodeproj/project.pbxproj | 157 +-------------------- 1 file changed, 1 insertion(+), 156 deletions(-) diff --git a/MapboxDirections.xcodeproj/project.pbxproj b/MapboxDirections.xcodeproj/project.pbxproj index eca4dc954..6db159c63 100644 --- a/MapboxDirections.xcodeproj/project.pbxproj +++ b/MapboxDirections.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 54; + objectVersion = 52; objects = { /* Begin PBXBuildFile section */ @@ -393,13 +393,9 @@ DAE9E0F41EB7DE2E001E8E8B /* RouteOptionsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAE9E0F31EB7DE2E001E8E8B /* RouteOptionsTests.swift */; }; DAE9E0F51EB7DE2E001E8E8B /* RouteOptionsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAE9E0F31EB7DE2E001E8E8B /* RouteOptionsTests.swift */; }; DAE9E0F61EB7DE2E001E8E8B /* RouteOptionsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAE9E0F31EB7DE2E001E8E8B /* RouteOptionsTests.swift */; }; - DAF08AAB25C0E96E00ABA8F3 /* MapboxDirections.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA6C9D881CAE442B00094FBC /* MapboxDirections.framework */; }; - DAF08AAC25C0E96E00ABA8F3 /* MapboxDirections.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DA6C9D881CAE442B00094FBC /* MapboxDirections.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; E232F8A8266513E90038CAF3 /* Polyline.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = E232F899266513C20038CAF3 /* Polyline.xcframework */; }; E232F8A9266513EE0038CAF3 /* Polyline.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = E232F899266513C20038CAF3 /* Polyline.xcframework */; }; E232F8AA266513F10038CAF3 /* Polyline.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = E232F899266513C20038CAF3 /* Polyline.xcframework */; }; - E232F8AC266513FF0038CAF3 /* Polyline.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = E232F899266513C20038CAF3 /* Polyline.xcframework */; }; - E232F8AD266513FF0038CAF3 /* Polyline.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = E232F899266513C20038CAF3 /* Polyline.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; E232F8B2266516640038CAF3 /* Turf.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = E232F8AE2665141F0038CAF3 /* Turf.xcframework */; }; E232F8B32665166D0038CAF3 /* Polyline.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = E232F899266513C20038CAF3 /* Polyline.xcframework */; }; E232F8B4266516950038CAF3 /* Polyline.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = E232F899266513C20038CAF3 /* Polyline.xcframework */; }; @@ -465,13 +461,6 @@ remoteGlobalIDString = DA6C9D871CAE442B00094FBC; remoteInfo = MapboxDirections; }; - DADD27F91E5AC8E900D31FAD /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = DD6254461AE70C1700017857 /* Project object */; - proxyType = 1; - remoteGlobalIDString = DA6C9D871CAE442B00094FBC; - remoteInfo = MapboxDirections; - }; E232F8C72665173C0038CAF3 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = DD6254461AE70C1700017857 /* Project object */; @@ -502,18 +491,6 @@ ); runOnlyForDeploymentPostprocessing = 1; }; - DAF08AAD25C0E96E00ABA8F3 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - DAF08AAC25C0E96E00ABA8F3 /* MapboxDirections.framework in Embed Frameworks */, - E232F8AD266513FF0038CAF3 /* Polyline.xcframework in Embed Frameworks */, - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ @@ -637,7 +614,6 @@ DAD06E34239F0B19001A917D /* DirectionsErrorTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DirectionsErrorTests.swift; sourceTree = ""; }; DAD06E3823A008EB001A917D /* QuickLook.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QuickLook.swift; sourceTree = ""; }; DAD31BC224D4A8D100A1654D /* match-polyline6.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = "match-polyline6.json"; sourceTree = ""; }; - DADD27B51E5AAAD800D31FAD /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; DAE2DF6723AECB120065057A /* QuickLookTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QuickLookTests.swift; sourceTree = ""; }; DAE2DF6B23AED2280065057A /* RouteTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RouteTests.swift; sourceTree = ""; }; DAE33A1A1F215DF600C06039 /* IntersectionTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IntersectionTests.swift; sourceTree = ""; }; @@ -719,15 +695,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - DADD27B21E5AAAD800D31FAD /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - DAF08AAB25C0E96E00ABA8F3 /* MapboxDirections.framework in Frameworks */, - E232F8AC266513FF0038CAF3 /* Polyline.xcframework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; E05B24A0DFB05E8378736C51 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -1006,7 +973,6 @@ DA1A10D51D0101ED009F82FA /* MapboxDirections.framework */, DA1A10DE1D0101ED009F82FA /* MapboxDirectionsTests.xctest */, DA1A10FB1D010361009F82FA /* MapboxDirections.framework */, - DADD27B51E5AAAD800D31FAD /* Example.app */, 2BA98970253F007600B643F6 /* mapbox-directions-swift */, ); name = Products; @@ -1196,26 +1162,6 @@ productReference = DA6C9D911CAE442B00094FBC /* MapboxDirectionsTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; - DADD27B41E5AAAD800D31FAD /* Example */ = { - isa = PBXNativeTarget; - buildConfigurationList = DADD27C61E5AAAD800D31FAD /* Build configuration list for PBXNativeTarget "Example" */; - buildPhases = ( - DADD27B11E5AAAD800D31FAD /* Sources */, - DADD27B21E5AAAD800D31FAD /* Frameworks */, - DADD27B31E5AAAD800D31FAD /* Resources */, - DA3DFB08236973E9003AE57F /* Apply Mapbox Access Token */, - DAF08AAD25C0E96E00ABA8F3 /* Embed Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - DADD27FA1E5AC8E900D31FAD /* PBXTargetDependency */, - ); - name = Example; - productName = "Directions Example"; - productReference = DADD27B51E5AAAD800D31FAD /* Example.app */; - productType = "com.apple.product-type.application"; - }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -1260,11 +1206,6 @@ CreatedOnToolsVersion = 7.3; LastSwiftMigration = 1100; }; - DADD27B41E5AAAD800D31FAD = { - CreatedOnToolsVersion = 8.2.1; - LastSwiftMigration = 1100; - ProvisioningStyle = Automatic; - }; }; }; buildConfigurationList = DD6254491AE70C1700017857 /* Build configuration list for PBXProject "MapboxDirections" */; @@ -1280,7 +1221,6 @@ projectDirPath = ""; projectRoot = ""; targets = ( - DADD27B41E5AAAD800D31FAD /* Example */, DA6C9D871CAE442B00094FBC /* MapboxDirections */, DA6C9D901CAE442B00094FBC /* MapboxDirectionsTests */, DA1A10AE1D00F8FF009F82FA /* MapboxDirectionsMac */, @@ -1415,38 +1355,8 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - DADD27B31E5AAAD800D31FAD /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXResourcesBuildPhase section */ -/* Begin PBXShellScriptBuildPhase section */ - DA3DFB08236973E9003AE57F /* Apply Mapbox Access Token */ = { - isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "$(TARGET_BUILD_DIR)/$(INFOPLIST_PATH)", - ); - name = "Apply Mapbox Access Token"; - outputFileListPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "# Look for a global file named 'mapbox' or '.mapbox' within the home directory\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 MGLMapboxAccessToken -string $token \"$TARGET_BUILD_DIR/$INFOPLIST_PATH\"\nelse\n echo 'warning: Missing Mapbox access token'\n open 'https://account.mapbox.com/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"; - }; -/* End PBXShellScriptBuildPhase section */ - /* Begin PBXSourcesBuildPhase section */ 2BA9896C253F007600B643F6 /* Sources */ = { isa = PBXSourcesBuildPhase; @@ -1833,13 +1743,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - DADD27B11E5AAAD800D31FAD /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ @@ -1863,11 +1766,6 @@ target = DA6C9D871CAE442B00094FBC /* MapboxDirections */; targetProxy = DA6C9D931CAE442B00094FBC /* PBXContainerItemProxy */; }; - DADD27FA1E5AC8E900D31FAD /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = DA6C9D871CAE442B00094FBC /* MapboxDirections */; - targetProxy = DADD27F91E5AC8E900D31FAD /* PBXContainerItemProxy */; - }; E232F8C82665173C0038CAF3 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = DA1A10AE1D00F8FF009F82FA /* MapboxDirectionsMac */; @@ -2316,50 +2214,6 @@ }; name = Release; }; - DADD27C41E5AAAD800D31FAD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ANALYZER_NONNULL = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - DEBUG_INFORMATION_FORMAT = dwarf; - DEVELOPMENT_TEAM = GJZR2MEM28; - FRAMEWORK_SEARCH_PATHS = "$(inherited)"; - INFOPLIST_FILE = "Directions Example/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 14.1; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.mapbox.Directions; - PRODUCT_MODULE_NAME = DirectionsExampleSwift; - PRODUCT_NAME = Example; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; - }; - name = Debug; - }; - DADD27C51E5AAAD800D31FAD /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ANALYZER_NONNULL = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - DEVELOPMENT_TEAM = GJZR2MEM28; - FRAMEWORK_SEARCH_PATHS = "$(inherited)"; - INFOPLIST_FILE = "Directions Example/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 14.1; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.mapbox.Directions; - PRODUCT_MODULE_NAME = DirectionsExampleSwift; - PRODUCT_NAME = Example; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; - }; - name = Release; - }; DD62546B1AE70C1700017857 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -2555,15 +2409,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - DADD27C61E5AAAD800D31FAD /* Build configuration list for PBXNativeTarget "Example" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - DADD27C41E5AAAD800D31FAD /* Debug */, - DADD27C51E5AAAD800D31FAD /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; DD6254491AE70C1700017857 /* Build configuration list for PBXProject "MapboxDirections" */ = { isa = XCConfigurationList; buildConfigurations = ( From ed5e46efa5c7aa9aed6b93e7d7eafd9019794f67 Mon Sep 17 00:00:00 2001 From: Aliaksandr Bialiauski <413986+S2Ler@users.noreply.github.com> Date: Thu, 12 Jan 2023 15:51:04 +0300 Subject: [PATCH 7/7] Rename project --- .../project.pbxproj | 50 +++++------ .../contents.xcworkspacedata | 0 .../xcshareddata/IDEWorkspaceChecks.plist | 0 .../xcshareddata/swiftpm/Package.resolved | 0 .../xcschemes/DirectionsExample.xcscheme | 78 ++++++++++++++++++ .../AccentColor.colorset/Contents.json | 0 .../AppIcon.appiconset/AppStore.png | Bin .../AppIcon.appiconset/CarPlay@2x.png | Bin .../AppIcon.appiconset/CarPlay@3x.png | Bin .../AppIcon.appiconset/Contents.json | 0 .../AppIcon.appiconset/iPad-App.png | Bin .../AppIcon.appiconset/iPad-App@2x.png | Bin .../AppIcon.appiconset/iPad-Notifications.png | Bin .../iPad-Notifications@2x.png | Bin .../AppIcon.appiconset/iPad-Settings.png | Bin .../AppIcon.appiconset/iPad-Settings@2x.png | Bin .../AppIcon.appiconset/iPad-Spotlight.png | Bin .../AppIcon.appiconset/iPad-Spotlight@2x.png | Bin .../AppIcon.appiconset/iPadPro-App@2x.png | Bin .../AppIcon.appiconset/iPhone-App.png | Bin .../AppIcon.appiconset/iPhone-App@3x.png | Bin .../iPhone-Notification@2x.png | Bin .../iPhone-Notification@3x.png | Bin .../AppIcon.appiconset/iPhone-Spotlight.png | Bin .../iPhone-Spotlight@3x.png | Bin .../AppIcon.appiconset/iPhone@2x.png | Bin .../AppIcon.appiconset/iPhone@3x.png | Bin .../Assets.xcassets/Contents.json | 0 .../DirectionsExample.entitlements | 0 .../Preview Assets.xcassets/Contents.json | 0 .../Sources/DirectionsExample.swift | 2 +- .../Sources/InfoButton.swift | 0 .../Sources/QueriesList.swift | 13 ++- .../DirectionsExample/Sources/Query.swift | 16 ++++ .../Sources/QueryEditor.swift | 4 +- .../Sources/RoutesView.swift | 0 .../DirectionsExample}/Sources/Storage.swift | 0 .../Sources/WaypointsEditor.swift | 2 +- .../README.md | 6 +- .../DirectionsPlayground/Sources/Query.swift | 12 --- README.md | 2 +- 41 files changed, 138 insertions(+), 47 deletions(-) rename {DirectionsPlayground/DirectionsPlayground.xcodeproj => DirectionsExample/DirectionsExample.xcodeproj}/project.pbxproj (89%) rename {DirectionsPlayground/DirectionsPlayground.xcodeproj => DirectionsExample/DirectionsExample.xcodeproj}/project.xcworkspace/contents.xcworkspacedata (100%) rename {DirectionsPlayground/DirectionsPlayground.xcodeproj => DirectionsExample/DirectionsExample.xcodeproj}/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (100%) rename {DirectionsPlayground/DirectionsPlayground.xcodeproj => DirectionsExample/DirectionsExample.xcodeproj}/project.xcworkspace/xcshareddata/swiftpm/Package.resolved (100%) create mode 100644 DirectionsExample/DirectionsExample.xcodeproj/xcshareddata/xcschemes/DirectionsExample.xcscheme rename {DirectionsPlayground/DirectionsPlayground => DirectionsExample/DirectionsExample}/Assets.xcassets/AccentColor.colorset/Contents.json (100%) rename {DirectionsPlayground/DirectionsPlayground => DirectionsExample/DirectionsExample}/Assets.xcassets/AppIcon.appiconset/AppStore.png (100%) rename {DirectionsPlayground/DirectionsPlayground => DirectionsExample/DirectionsExample}/Assets.xcassets/AppIcon.appiconset/CarPlay@2x.png (100%) rename {DirectionsPlayground/DirectionsPlayground => DirectionsExample/DirectionsExample}/Assets.xcassets/AppIcon.appiconset/CarPlay@3x.png (100%) rename {DirectionsPlayground/DirectionsPlayground => DirectionsExample/DirectionsExample}/Assets.xcassets/AppIcon.appiconset/Contents.json (100%) rename {DirectionsPlayground/DirectionsPlayground => DirectionsExample/DirectionsExample}/Assets.xcassets/AppIcon.appiconset/iPad-App.png (100%) rename {DirectionsPlayground/DirectionsPlayground => DirectionsExample/DirectionsExample}/Assets.xcassets/AppIcon.appiconset/iPad-App@2x.png (100%) rename {DirectionsPlayground/DirectionsPlayground => DirectionsExample/DirectionsExample}/Assets.xcassets/AppIcon.appiconset/iPad-Notifications.png (100%) rename {DirectionsPlayground/DirectionsPlayground => DirectionsExample/DirectionsExample}/Assets.xcassets/AppIcon.appiconset/iPad-Notifications@2x.png (100%) rename {DirectionsPlayground/DirectionsPlayground => DirectionsExample/DirectionsExample}/Assets.xcassets/AppIcon.appiconset/iPad-Settings.png (100%) rename {DirectionsPlayground/DirectionsPlayground => DirectionsExample/DirectionsExample}/Assets.xcassets/AppIcon.appiconset/iPad-Settings@2x.png (100%) rename {DirectionsPlayground/DirectionsPlayground => DirectionsExample/DirectionsExample}/Assets.xcassets/AppIcon.appiconset/iPad-Spotlight.png (100%) rename {DirectionsPlayground/DirectionsPlayground => DirectionsExample/DirectionsExample}/Assets.xcassets/AppIcon.appiconset/iPad-Spotlight@2x.png (100%) rename {DirectionsPlayground/DirectionsPlayground => DirectionsExample/DirectionsExample}/Assets.xcassets/AppIcon.appiconset/iPadPro-App@2x.png (100%) rename {DirectionsPlayground/DirectionsPlayground => DirectionsExample/DirectionsExample}/Assets.xcassets/AppIcon.appiconset/iPhone-App.png (100%) rename {DirectionsPlayground/DirectionsPlayground => DirectionsExample/DirectionsExample}/Assets.xcassets/AppIcon.appiconset/iPhone-App@3x.png (100%) rename {DirectionsPlayground/DirectionsPlayground => DirectionsExample/DirectionsExample}/Assets.xcassets/AppIcon.appiconset/iPhone-Notification@2x.png (100%) rename {DirectionsPlayground/DirectionsPlayground => DirectionsExample/DirectionsExample}/Assets.xcassets/AppIcon.appiconset/iPhone-Notification@3x.png (100%) rename {DirectionsPlayground/DirectionsPlayground => DirectionsExample/DirectionsExample}/Assets.xcassets/AppIcon.appiconset/iPhone-Spotlight.png (100%) rename {DirectionsPlayground/DirectionsPlayground => DirectionsExample/DirectionsExample}/Assets.xcassets/AppIcon.appiconset/iPhone-Spotlight@3x.png (100%) rename {DirectionsPlayground/DirectionsPlayground => DirectionsExample/DirectionsExample}/Assets.xcassets/AppIcon.appiconset/iPhone@2x.png (100%) rename {DirectionsPlayground/DirectionsPlayground => DirectionsExample/DirectionsExample}/Assets.xcassets/AppIcon.appiconset/iPhone@3x.png (100%) rename {DirectionsPlayground/DirectionsPlayground => DirectionsExample/DirectionsExample}/Assets.xcassets/Contents.json (100%) rename DirectionsPlayground/DirectionsPlayground/DirectionsPlayground.entitlements => DirectionsExample/DirectionsExample/DirectionsExample.entitlements (100%) rename {DirectionsPlayground/DirectionsPlayground => DirectionsExample/DirectionsExample}/Preview Content/Preview Assets.xcassets/Contents.json (100%) rename DirectionsPlayground/DirectionsPlayground/Sources/DirectionsPlayground.swift => DirectionsExample/DirectionsExample/Sources/DirectionsExample.swift (85%) rename {DirectionsPlayground/DirectionsPlayground => DirectionsExample/DirectionsExample}/Sources/InfoButton.swift (100%) rename {DirectionsPlayground/DirectionsPlayground => DirectionsExample/DirectionsExample}/Sources/QueriesList.swift (68%) create mode 100644 DirectionsExample/DirectionsExample/Sources/Query.swift rename {DirectionsPlayground/DirectionsPlayground => DirectionsExample/DirectionsExample}/Sources/QueryEditor.swift (95%) rename {DirectionsPlayground/DirectionsPlayground => DirectionsExample/DirectionsExample}/Sources/RoutesView.swift (100%) rename {DirectionsPlayground/DirectionsPlayground => DirectionsExample/DirectionsExample}/Sources/Storage.swift (100%) rename {DirectionsPlayground/DirectionsPlayground => DirectionsExample/DirectionsExample}/Sources/WaypointsEditor.swift (97%) rename {DirectionsPlayground => DirectionsExample}/README.md (58%) delete mode 100644 DirectionsPlayground/DirectionsPlayground/Sources/Query.swift diff --git a/DirectionsPlayground/DirectionsPlayground.xcodeproj/project.pbxproj b/DirectionsExample/DirectionsExample.xcodeproj/project.pbxproj similarity index 89% rename from DirectionsPlayground/DirectionsPlayground.xcodeproj/project.pbxproj rename to DirectionsExample/DirectionsExample.xcodeproj/project.pbxproj index 21686b8cf..eee1e4622 100644 --- a/DirectionsPlayground/DirectionsPlayground.xcodeproj/project.pbxproj +++ b/DirectionsExample/DirectionsExample.xcodeproj/project.pbxproj @@ -10,7 +10,7 @@ E2E47CC227F62E06003C859F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E2E47CC127F62E06003C859F /* Assets.xcassets */; }; E2E47CC527F62E06003C859F /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E2E47CC427F62E06003C859F /* Preview Assets.xcassets */; }; E2E47CE127F62E8F003C859F /* QueriesList.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2E47CDA27F62E8F003C859F /* QueriesList.swift */; }; - E2E47CE227F62E8F003C859F /* DirectionsPlayground.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2E47CDB27F62E8F003C859F /* DirectionsPlayground.swift */; }; + E2E47CE227F62E8F003C859F /* DirectionsExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2E47CDB27F62E8F003C859F /* DirectionsExample.swift */; }; E2E47CE327F62E8F003C859F /* RoutesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2E47CDC27F62E8F003C859F /* RoutesView.swift */; }; E2E47CE427F62E8F003C859F /* Query.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2E47CDD27F62E8F003C859F /* Query.swift */; }; E2E47CE527F62E8F003C859F /* QueryEditor.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2E47CDE27F62E8F003C859F /* QueryEditor.swift */; }; @@ -21,18 +21,18 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - E2E47CBA27F62E05003C859F /* DirectionsPlayground.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DirectionsPlayground.app; sourceTree = BUILT_PRODUCTS_DIR; }; + E2E47CBA27F62E05003C859F /* DirectionsExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DirectionsExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; E2E47CC127F62E06003C859F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; E2E47CC427F62E06003C859F /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; E2E47CDA27F62E8F003C859F /* QueriesList.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QueriesList.swift; sourceTree = ""; }; - E2E47CDB27F62E8F003C859F /* DirectionsPlayground.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DirectionsPlayground.swift; sourceTree = ""; }; + E2E47CDB27F62E8F003C859F /* DirectionsExample.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DirectionsExample.swift; sourceTree = ""; }; E2E47CDC27F62E8F003C859F /* RoutesView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RoutesView.swift; sourceTree = ""; }; E2E47CDD27F62E8F003C859F /* Query.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Query.swift; sourceTree = ""; }; E2E47CDE27F62E8F003C859F /* QueryEditor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QueryEditor.swift; sourceTree = ""; }; E2E47CDF27F62E8F003C859F /* WaypointsEditor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WaypointsEditor.swift; sourceTree = ""; }; E2E47CE027F62E8F003C859F /* Storage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Storage.swift; sourceTree = ""; }; E2E47CE827F62EAE003C859F /* mapbox-directions-swift */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = "mapbox-directions-swift"; path = ..; sourceTree = ""; }; - E2E47CED27F630BE003C859F /* DirectionsPlayground.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DirectionsPlayground.entitlements; sourceTree = ""; }; + E2E47CED27F630BE003C859F /* DirectionsExample.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DirectionsExample.entitlements; sourceTree = ""; }; E2E47CEE27F6EF7D003C859F /* InfoButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InfoButton.swift; sourceTree = ""; }; /* End PBXFileReference section */ @@ -52,7 +52,7 @@ isa = PBXGroup; children = ( E2E47CE827F62EAE003C859F /* mapbox-directions-swift */, - E2E47CBC27F62E05003C859F /* DirectionsPlayground */, + E2E47CBC27F62E05003C859F /* DirectionsExample */, E2E47CBB27F62E05003C859F /* Products */, E2E47CE927F62EB7003C859F /* Frameworks */, ); @@ -61,20 +61,20 @@ E2E47CBB27F62E05003C859F /* Products */ = { isa = PBXGroup; children = ( - E2E47CBA27F62E05003C859F /* DirectionsPlayground.app */, + E2E47CBA27F62E05003C859F /* DirectionsExample.app */, ); name = Products; sourceTree = ""; }; - E2E47CBC27F62E05003C859F /* DirectionsPlayground */ = { + E2E47CBC27F62E05003C859F /* DirectionsExample */ = { isa = PBXGroup; children = ( - E2E47CED27F630BE003C859F /* DirectionsPlayground.entitlements */, + E2E47CED27F630BE003C859F /* DirectionsExample.entitlements */, E2E47CD927F62E78003C859F /* Sources */, E2E47CC127F62E06003C859F /* Assets.xcassets */, E2E47CC327F62E06003C859F /* Preview Content */, ); - path = DirectionsPlayground; + path = DirectionsExample; sourceTree = ""; }; E2E47CC327F62E06003C859F /* Preview Content */ = { @@ -88,7 +88,7 @@ E2E47CD927F62E78003C859F /* Sources */ = { isa = PBXGroup; children = ( - E2E47CDB27F62E8F003C859F /* DirectionsPlayground.swift */, + E2E47CDB27F62E8F003C859F /* DirectionsExample.swift */, E2E47CDA27F62E8F003C859F /* QueriesList.swift */, E2E47CDD27F62E8F003C859F /* Query.swift */, E2E47CDE27F62E8F003C859F /* QueryEditor.swift */, @@ -110,9 +110,9 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - E2E47CB927F62E05003C859F /* DirectionsPlayground */ = { + E2E47CB927F62E05003C859F /* DirectionsExample */ = { isa = PBXNativeTarget; - buildConfigurationList = E2E47CC827F62E06003C859F /* Build configuration list for PBXNativeTarget "DirectionsPlayground" */; + buildConfigurationList = E2E47CC827F62E06003C859F /* Build configuration list for PBXNativeTarget "DirectionsExample" */; buildPhases = ( E2E47CB627F62E05003C859F /* Sources */, E2E47CB727F62E05003C859F /* Frameworks */, @@ -123,12 +123,12 @@ ); dependencies = ( ); - name = DirectionsPlayground; + name = DirectionsExample; packageProductDependencies = ( E2E47CEA27F62EB7003C859F /* MapboxDirections */, ); productName = DirectionsPlayground; - productReference = E2E47CBA27F62E05003C859F /* DirectionsPlayground.app */; + productReference = E2E47CBA27F62E05003C859F /* DirectionsExample.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ @@ -147,7 +147,7 @@ }; }; }; - buildConfigurationList = E2E47CB527F62E05003C859F /* Build configuration list for PBXProject "DirectionsPlayground" */; + buildConfigurationList = E2E47CB527F62E05003C859F /* Build configuration list for PBXProject "DirectionsExample" */; compatibilityVersion = "Xcode 13.0"; developmentRegion = en; hasScannedForEncodings = 0; @@ -160,7 +160,7 @@ projectDirPath = ""; projectRoot = ""; targets = ( - E2E47CB927F62E05003C859F /* DirectionsPlayground */, + E2E47CB927F62E05003C859F /* DirectionsExample */, ); }; /* End PBXProject section */ @@ -208,7 +208,7 @@ E2E47CE727F62E8F003C859F /* Storage.swift in Sources */, E2E47CE427F62E8F003C859F /* Query.swift in Sources */, E2E47CEF27F6EF7D003C859F /* InfoButton.swift in Sources */, - E2E47CE227F62E8F003C859F /* DirectionsPlayground.swift in Sources */, + E2E47CE227F62E8F003C859F /* DirectionsExample.swift in Sources */, E2E47CE327F62E8F003C859F /* RoutesView.swift in Sources */, E2E47CE127F62E8F003C859F /* QueriesList.swift in Sources */, E2E47CE627F62E8F003C859F /* WaypointsEditor.swift in Sources */, @@ -338,10 +338,10 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = DirectionsPlayground/DirectionsPlayground.entitlements; + CODE_SIGN_ENTITLEMENTS = DirectionsExample/DirectionsExample.entitlements; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_ASSET_PATHS = "\"DirectionsPlayground/Preview Content\""; + DEVELOPMENT_ASSET_PATHS = "\"DirectionsExample/Preview Content\""; DEVELOPMENT_TEAM = GJZR2MEM28; ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; @@ -356,7 +356,7 @@ "@executable_path/Frameworks", ); MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = mapbox.DirectionsPlayground; + PRODUCT_BUNDLE_IDENTIFIER = mapbox.DirectionsExample; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTS_MACCATALYST = YES; SWIFT_EMIT_LOC_STRINGS = YES; @@ -372,10 +372,10 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = DirectionsPlayground/DirectionsPlayground.entitlements; + CODE_SIGN_ENTITLEMENTS = DirectionsExample/DirectionsExample.entitlements; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_ASSET_PATHS = "\"DirectionsPlayground/Preview Content\""; + DEVELOPMENT_ASSET_PATHS = "\"DirectionsExample/Preview Content\""; DEVELOPMENT_TEAM = GJZR2MEM28; ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; @@ -390,7 +390,7 @@ "@executable_path/Frameworks", ); MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = mapbox.DirectionsPlayground; + PRODUCT_BUNDLE_IDENTIFIER = mapbox.DirectionsExample; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTS_MACCATALYST = YES; SWIFT_EMIT_LOC_STRINGS = YES; @@ -402,7 +402,7 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - E2E47CB527F62E05003C859F /* Build configuration list for PBXProject "DirectionsPlayground" */ = { + E2E47CB527F62E05003C859F /* Build configuration list for PBXProject "DirectionsExample" */ = { isa = XCConfigurationList; buildConfigurations = ( E2E47CC627F62E06003C859F /* Debug */, @@ -411,7 +411,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - E2E47CC827F62E06003C859F /* Build configuration list for PBXNativeTarget "DirectionsPlayground" */ = { + E2E47CC827F62E06003C859F /* Build configuration list for PBXNativeTarget "DirectionsExample" */ = { isa = XCConfigurationList; buildConfigurations = ( E2E47CC927F62E06003C859F /* Debug */, diff --git a/DirectionsPlayground/DirectionsPlayground.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/DirectionsExample/DirectionsExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from DirectionsPlayground/DirectionsPlayground.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to DirectionsExample/DirectionsExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/DirectionsPlayground/DirectionsPlayground.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/DirectionsExample/DirectionsExample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from DirectionsPlayground/DirectionsPlayground.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to DirectionsExample/DirectionsExample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/DirectionsPlayground/DirectionsPlayground.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DirectionsExample/DirectionsExample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved similarity index 100% rename from DirectionsPlayground/DirectionsPlayground.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved rename to DirectionsExample/DirectionsExample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved diff --git a/DirectionsExample/DirectionsExample.xcodeproj/xcshareddata/xcschemes/DirectionsExample.xcscheme b/DirectionsExample/DirectionsExample.xcodeproj/xcshareddata/xcschemes/DirectionsExample.xcscheme new file mode 100644 index 000000000..9e1920e3e --- /dev/null +++ b/DirectionsExample/DirectionsExample.xcodeproj/xcshareddata/xcschemes/DirectionsExample.xcscheme @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AccentColor.colorset/Contents.json b/DirectionsExample/DirectionsExample/Assets.xcassets/AccentColor.colorset/Contents.json similarity index 100% rename from DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AccentColor.colorset/Contents.json rename to DirectionsExample/DirectionsExample/Assets.xcassets/AccentColor.colorset/Contents.json diff --git a/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/AppStore.png b/DirectionsExample/DirectionsExample/Assets.xcassets/AppIcon.appiconset/AppStore.png similarity index 100% rename from DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/AppStore.png rename to DirectionsExample/DirectionsExample/Assets.xcassets/AppIcon.appiconset/AppStore.png diff --git a/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/CarPlay@2x.png b/DirectionsExample/DirectionsExample/Assets.xcassets/AppIcon.appiconset/CarPlay@2x.png similarity index 100% rename from DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/CarPlay@2x.png rename to DirectionsExample/DirectionsExample/Assets.xcassets/AppIcon.appiconset/CarPlay@2x.png diff --git a/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/CarPlay@3x.png b/DirectionsExample/DirectionsExample/Assets.xcassets/AppIcon.appiconset/CarPlay@3x.png similarity index 100% rename from DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/CarPlay@3x.png rename to DirectionsExample/DirectionsExample/Assets.xcassets/AppIcon.appiconset/CarPlay@3x.png diff --git a/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/Contents.json b/DirectionsExample/DirectionsExample/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/Contents.json rename to DirectionsExample/DirectionsExample/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPad-App.png b/DirectionsExample/DirectionsExample/Assets.xcassets/AppIcon.appiconset/iPad-App.png similarity index 100% rename from DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPad-App.png rename to DirectionsExample/DirectionsExample/Assets.xcassets/AppIcon.appiconset/iPad-App.png diff --git a/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPad-App@2x.png b/DirectionsExample/DirectionsExample/Assets.xcassets/AppIcon.appiconset/iPad-App@2x.png similarity index 100% rename from DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPad-App@2x.png rename to DirectionsExample/DirectionsExample/Assets.xcassets/AppIcon.appiconset/iPad-App@2x.png diff --git a/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPad-Notifications.png b/DirectionsExample/DirectionsExample/Assets.xcassets/AppIcon.appiconset/iPad-Notifications.png similarity index 100% rename from DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPad-Notifications.png rename to DirectionsExample/DirectionsExample/Assets.xcassets/AppIcon.appiconset/iPad-Notifications.png diff --git a/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPad-Notifications@2x.png b/DirectionsExample/DirectionsExample/Assets.xcassets/AppIcon.appiconset/iPad-Notifications@2x.png similarity index 100% rename from DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPad-Notifications@2x.png rename to DirectionsExample/DirectionsExample/Assets.xcassets/AppIcon.appiconset/iPad-Notifications@2x.png diff --git a/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPad-Settings.png b/DirectionsExample/DirectionsExample/Assets.xcassets/AppIcon.appiconset/iPad-Settings.png similarity index 100% rename from DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPad-Settings.png rename to DirectionsExample/DirectionsExample/Assets.xcassets/AppIcon.appiconset/iPad-Settings.png diff --git a/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPad-Settings@2x.png b/DirectionsExample/DirectionsExample/Assets.xcassets/AppIcon.appiconset/iPad-Settings@2x.png similarity index 100% rename from DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPad-Settings@2x.png rename to DirectionsExample/DirectionsExample/Assets.xcassets/AppIcon.appiconset/iPad-Settings@2x.png diff --git a/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPad-Spotlight.png b/DirectionsExample/DirectionsExample/Assets.xcassets/AppIcon.appiconset/iPad-Spotlight.png similarity index 100% rename from DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPad-Spotlight.png rename to DirectionsExample/DirectionsExample/Assets.xcassets/AppIcon.appiconset/iPad-Spotlight.png diff --git a/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPad-Spotlight@2x.png b/DirectionsExample/DirectionsExample/Assets.xcassets/AppIcon.appiconset/iPad-Spotlight@2x.png similarity index 100% rename from DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPad-Spotlight@2x.png rename to DirectionsExample/DirectionsExample/Assets.xcassets/AppIcon.appiconset/iPad-Spotlight@2x.png diff --git a/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPadPro-App@2x.png b/DirectionsExample/DirectionsExample/Assets.xcassets/AppIcon.appiconset/iPadPro-App@2x.png similarity index 100% rename from DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPadPro-App@2x.png rename to DirectionsExample/DirectionsExample/Assets.xcassets/AppIcon.appiconset/iPadPro-App@2x.png diff --git a/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPhone-App.png b/DirectionsExample/DirectionsExample/Assets.xcassets/AppIcon.appiconset/iPhone-App.png similarity index 100% rename from DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPhone-App.png rename to DirectionsExample/DirectionsExample/Assets.xcassets/AppIcon.appiconset/iPhone-App.png diff --git a/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPhone-App@3x.png b/DirectionsExample/DirectionsExample/Assets.xcassets/AppIcon.appiconset/iPhone-App@3x.png similarity index 100% rename from DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPhone-App@3x.png rename to DirectionsExample/DirectionsExample/Assets.xcassets/AppIcon.appiconset/iPhone-App@3x.png diff --git a/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPhone-Notification@2x.png b/DirectionsExample/DirectionsExample/Assets.xcassets/AppIcon.appiconset/iPhone-Notification@2x.png similarity index 100% rename from DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPhone-Notification@2x.png rename to DirectionsExample/DirectionsExample/Assets.xcassets/AppIcon.appiconset/iPhone-Notification@2x.png diff --git a/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPhone-Notification@3x.png b/DirectionsExample/DirectionsExample/Assets.xcassets/AppIcon.appiconset/iPhone-Notification@3x.png similarity index 100% rename from DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPhone-Notification@3x.png rename to DirectionsExample/DirectionsExample/Assets.xcassets/AppIcon.appiconset/iPhone-Notification@3x.png diff --git a/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPhone-Spotlight.png b/DirectionsExample/DirectionsExample/Assets.xcassets/AppIcon.appiconset/iPhone-Spotlight.png similarity index 100% rename from DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPhone-Spotlight.png rename to DirectionsExample/DirectionsExample/Assets.xcassets/AppIcon.appiconset/iPhone-Spotlight.png diff --git a/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPhone-Spotlight@3x.png b/DirectionsExample/DirectionsExample/Assets.xcassets/AppIcon.appiconset/iPhone-Spotlight@3x.png similarity index 100% rename from DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPhone-Spotlight@3x.png rename to DirectionsExample/DirectionsExample/Assets.xcassets/AppIcon.appiconset/iPhone-Spotlight@3x.png diff --git a/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPhone@2x.png b/DirectionsExample/DirectionsExample/Assets.xcassets/AppIcon.appiconset/iPhone@2x.png similarity index 100% rename from DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPhone@2x.png rename to DirectionsExample/DirectionsExample/Assets.xcassets/AppIcon.appiconset/iPhone@2x.png diff --git a/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPhone@3x.png b/DirectionsExample/DirectionsExample/Assets.xcassets/AppIcon.appiconset/iPhone@3x.png similarity index 100% rename from DirectionsPlayground/DirectionsPlayground/Assets.xcassets/AppIcon.appiconset/iPhone@3x.png rename to DirectionsExample/DirectionsExample/Assets.xcassets/AppIcon.appiconset/iPhone@3x.png diff --git a/DirectionsPlayground/DirectionsPlayground/Assets.xcassets/Contents.json b/DirectionsExample/DirectionsExample/Assets.xcassets/Contents.json similarity index 100% rename from DirectionsPlayground/DirectionsPlayground/Assets.xcassets/Contents.json rename to DirectionsExample/DirectionsExample/Assets.xcassets/Contents.json diff --git a/DirectionsPlayground/DirectionsPlayground/DirectionsPlayground.entitlements b/DirectionsExample/DirectionsExample/DirectionsExample.entitlements similarity index 100% rename from DirectionsPlayground/DirectionsPlayground/DirectionsPlayground.entitlements rename to DirectionsExample/DirectionsExample/DirectionsExample.entitlements diff --git a/DirectionsPlayground/DirectionsPlayground/Preview Content/Preview Assets.xcassets/Contents.json b/DirectionsExample/DirectionsExample/Preview Content/Preview Assets.xcassets/Contents.json similarity index 100% rename from DirectionsPlayground/DirectionsPlayground/Preview Content/Preview Assets.xcassets/Contents.json rename to DirectionsExample/DirectionsExample/Preview Content/Preview Assets.xcassets/Contents.json diff --git a/DirectionsPlayground/DirectionsPlayground/Sources/DirectionsPlayground.swift b/DirectionsExample/DirectionsExample/Sources/DirectionsExample.swift similarity index 85% rename from DirectionsPlayground/DirectionsPlayground/Sources/DirectionsPlayground.swift rename to DirectionsExample/DirectionsExample/Sources/DirectionsExample.swift index 0ae8c8bba..209ab9a90 100644 --- a/DirectionsPlayground/DirectionsPlayground/Sources/DirectionsPlayground.swift +++ b/DirectionsExample/DirectionsExample/Sources/DirectionsExample.swift @@ -1,7 +1,7 @@ import SwiftUI @main -struct DirectionsPlayground: App { +struct DirectionsExample: App { var body: some Scene { WindowGroup { NavigationView { diff --git a/DirectionsPlayground/DirectionsPlayground/Sources/InfoButton.swift b/DirectionsExample/DirectionsExample/Sources/InfoButton.swift similarity index 100% rename from DirectionsPlayground/DirectionsPlayground/Sources/InfoButton.swift rename to DirectionsExample/DirectionsExample/Sources/InfoButton.swift diff --git a/DirectionsPlayground/DirectionsPlayground/Sources/QueriesList.swift b/DirectionsExample/DirectionsExample/Sources/QueriesList.swift similarity index 68% rename from DirectionsPlayground/DirectionsPlayground/Sources/QueriesList.swift rename to DirectionsExample/DirectionsExample/Sources/QueriesList.swift index ab8110a22..28d5403bf 100644 --- a/DirectionsPlayground/DirectionsPlayground/Sources/QueriesList.swift +++ b/DirectionsExample/DirectionsExample/Sources/QueriesList.swift @@ -13,9 +13,15 @@ struct QueriesList: View { NavigationLink( destination: QueryEditor(query: $query), label: { - Text(query.name) + TextField("Query Name", text: $query.name) }) } + .onMove { indices, newOffset in + queries.move(fromOffsets: indices, toOffset: newOffset) + } + .onDelete { indexSet in + queries.remove(atOffsets: indexSet) + } } .onAppear { loadQueries() } .toolbar { @@ -23,13 +29,16 @@ struct QueriesList: View { Button { newQuery() } label: { Image(systemName: "plus") } } + ToolbarItem(placement: ToolbarItemPlacement.automatic) { + EditButton() + } } .navigationTitle("Saved Queries") } private func loadQueries() { do { - queries = try Storage.shared.load() ?? [] + queries = try Storage.shared.load() ?? [.default] } catch { print(error) diff --git a/DirectionsExample/DirectionsExample/Sources/Query.swift b/DirectionsExample/DirectionsExample/Sources/Query.swift new file mode 100644 index 000000000..d0597084d --- /dev/null +++ b/DirectionsExample/DirectionsExample/Sources/Query.swift @@ -0,0 +1,16 @@ +import Foundation + +struct Query: Codable, Identifiable { + let id: String + var name: String + var waypoints: [Waypoint] + + static func make() -> Query { + let uuid = UUID().uuidString + return .init(id: uuid, name: "New Query", waypoints: .defaultWaypoints) + } + + static var `default`: Query { + .init(id: UUID().uuidString, name: "Mapbox Office", waypoints: .defaultWaypoints) + } +} diff --git a/DirectionsPlayground/DirectionsPlayground/Sources/QueryEditor.swift b/DirectionsExample/DirectionsExample/Sources/QueryEditor.swift similarity index 95% rename from DirectionsPlayground/DirectionsPlayground/Sources/QueryEditor.swift rename to DirectionsExample/DirectionsExample/Sources/QueryEditor.swift index 527eaa56f..4dec2ad53 100644 --- a/DirectionsPlayground/DirectionsPlayground/Sources/QueryEditor.swift +++ b/DirectionsExample/DirectionsExample/Sources/QueryEditor.swift @@ -22,13 +22,13 @@ struct QueryEditor: View { destination: RoutesView(routes: routes), isActive: $showRoutes, label: { - Button("Calculate") { + Button("Directions") { loadRoutes(for: query) }.buttonStyle(.borderless) }) } }) - .navigationTitle("Edit Route Waypoints") + .navigationTitle(query.name) } .alert(isPresented: .constant(error != nil), error: error) { diff --git a/DirectionsPlayground/DirectionsPlayground/Sources/RoutesView.swift b/DirectionsExample/DirectionsExample/Sources/RoutesView.swift similarity index 100% rename from DirectionsPlayground/DirectionsPlayground/Sources/RoutesView.swift rename to DirectionsExample/DirectionsExample/Sources/RoutesView.swift diff --git a/DirectionsPlayground/DirectionsPlayground/Sources/Storage.swift b/DirectionsExample/DirectionsExample/Sources/Storage.swift similarity index 100% rename from DirectionsPlayground/DirectionsPlayground/Sources/Storage.swift rename to DirectionsExample/DirectionsExample/Sources/Storage.swift diff --git a/DirectionsPlayground/DirectionsPlayground/Sources/WaypointsEditor.swift b/DirectionsExample/DirectionsExample/Sources/WaypointsEditor.swift similarity index 97% rename from DirectionsPlayground/DirectionsPlayground/Sources/WaypointsEditor.swift rename to DirectionsExample/DirectionsExample/Sources/WaypointsEditor.swift index 62c0127fc..749269335 100644 --- a/DirectionsPlayground/DirectionsPlayground/Sources/WaypointsEditor.swift +++ b/DirectionsExample/DirectionsExample/Sources/WaypointsEditor.swift @@ -85,7 +85,7 @@ struct WaypointView: View { init(waypoint: Binding) { _waypoint = waypoint - _latitudeString = State(initialValue: waypoint.wrappedValue.latitude.description) + _latitudeString = .init(initialValue: waypoint.wrappedValue.latitude.description) _longitudeString = .init(initialValue: waypoint.wrappedValue.longitude.description) } diff --git a/DirectionsPlayground/README.md b/DirectionsExample/README.md similarity index 58% rename from DirectionsPlayground/README.md rename to DirectionsExample/README.md index 44df21cc2..c121865a8 100644 --- a/DirectionsPlayground/README.md +++ b/DirectionsExample/README.md @@ -1,8 +1,8 @@ -# Directions Playground +# Directions Example Shows how to obtain directions using "MapboxDirection" library. -## Requirements +## Requirements -- Xcode 13.3 +- Xcode 13.3 - iOS 15 diff --git a/DirectionsPlayground/DirectionsPlayground/Sources/Query.swift b/DirectionsPlayground/DirectionsPlayground/Sources/Query.swift deleted file mode 100644 index aff254c43..000000000 --- a/DirectionsPlayground/DirectionsPlayground/Sources/Query.swift +++ /dev/null @@ -1,12 +0,0 @@ -import Foundation - -struct Query: Codable, Identifiable { - let id: String - var name: String - var waypoints: [Waypoint] - - static func make() -> Query { - let uuid = UUID().uuidString - return .init(id: uuid, name: uuid, waypoints: .defaultWaypoints) - } -} diff --git a/README.md b/README.md index 58ab28da3..c4973f469 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ Or in your [Swift Package Manager](https://swift.org/package-manager/) Package.s Then `import MapboxDirections`. -This repository contains an [example application](./DirectionsPlayground/) that demonstrates how to use the framework. Detailed documentation is available in the [Mapbox API Documentation](https://docs.mapbox.com/api/navigation/#directions). +This repository contains an [example application](./DirectionsExample/) that demonstrates how to use the framework. Detailed documentation is available in the [Mapbox API Documentation](https://docs.mapbox.com/api/navigation/#directions). ## System requirements