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