diff --git a/SampleCode/ScryfallSearcher/ScryfallSearcher.xcodeproj/project.pbxproj b/SampleCode/ScryfallSearcher/ScryfallSearcher.xcodeproj/project.pbxproj new file mode 100644 index 0000000..8fb740a --- /dev/null +++ b/SampleCode/ScryfallSearcher/ScryfallSearcher.xcodeproj/project.pbxproj @@ -0,0 +1,394 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 56; + objects = { + +/* Begin PBXBuildFile section */ + 2A07EE3D29E707C500D7747D /* SearchView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A07EE3C29E707C500D7747D /* SearchView.swift */; }; + 2A5E0FA729EEFB4F004056CB /* CardView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A5E0FA629EEFB4F004056CB /* CardView.swift */; }; + 2A90C68129E5A16C00DC591D /* ScryfallSearcherApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A90C68029E5A16C00DC591D /* ScryfallSearcherApp.swift */; }; + 2A90C68329E5A16C00DC591D /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A90C68229E5A16C00DC591D /* ContentView.swift */; }; + 2A90C68529E5A16D00DC591D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2A90C68429E5A16D00DC591D /* Assets.xcassets */; }; + 2A90C68829E5A16D00DC591D /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2A90C68729E5A16D00DC591D /* Preview Assets.xcassets */; }; + 2A90C69029E5A2E200DC591D /* ScryfallKit in Frameworks */ = {isa = PBXBuildFile; productRef = 2A90C68F29E5A2E200DC591D /* ScryfallKit */; }; + 2AC7C1E329E70BB300D587E9 /* ScryfallKit in Frameworks */ = {isa = PBXBuildFile; productRef = 2AC7C1E229E70BB300D587E9 /* ScryfallKit */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2A07EE3C29E707C500D7747D /* SearchView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchView.swift; sourceTree = ""; }; + 2A5E0FA629EEFB4F004056CB /* CardView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CardView.swift; sourceTree = ""; }; + 2A90C67D29E5A16C00DC591D /* ScryfallSearcher.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ScryfallSearcher.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2A90C68029E5A16C00DC591D /* ScryfallSearcherApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScryfallSearcherApp.swift; sourceTree = ""; }; + 2A90C68229E5A16C00DC591D /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; + 2A90C68429E5A16D00DC591D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2A90C68729E5A16D00DC591D /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2A90C67A29E5A16C00DC591D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 2A90C69029E5A2E200DC591D /* ScryfallKit in Frameworks */, + 2AC7C1E329E70BB300D587E9 /* ScryfallKit in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 2A90C67429E5A16C00DC591D = { + isa = PBXGroup; + children = ( + 2A90C67F29E5A16C00DC591D /* ScryfallSearcher */, + 2A90C67E29E5A16C00DC591D /* Products */, + 2A90C68E29E5A2E200DC591D /* Frameworks */, + ); + sourceTree = ""; + }; + 2A90C67E29E5A16C00DC591D /* Products */ = { + isa = PBXGroup; + children = ( + 2A90C67D29E5A16C00DC591D /* ScryfallSearcher.app */, + ); + name = Products; + sourceTree = ""; + }; + 2A90C67F29E5A16C00DC591D /* ScryfallSearcher */ = { + isa = PBXGroup; + children = ( + 2A5E0FA629EEFB4F004056CB /* CardView.swift */, + 2A90C68029E5A16C00DC591D /* ScryfallSearcherApp.swift */, + 2A90C68229E5A16C00DC591D /* ContentView.swift */, + 2A90C68429E5A16D00DC591D /* Assets.xcassets */, + 2A90C68629E5A16D00DC591D /* Preview Content */, + 2A07EE3C29E707C500D7747D /* SearchView.swift */, + ); + path = ScryfallSearcher; + sourceTree = ""; + }; + 2A90C68629E5A16D00DC591D /* Preview Content */ = { + isa = PBXGroup; + children = ( + 2A90C68729E5A16D00DC591D /* Preview Assets.xcassets */, + ); + path = "Preview Content"; + sourceTree = ""; + }; + 2A90C68E29E5A2E200DC591D /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2A90C67C29E5A16C00DC591D /* ScryfallSearcher */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2A90C68B29E5A16D00DC591D /* Build configuration list for PBXNativeTarget "ScryfallSearcher" */; + buildPhases = ( + 2A90C67929E5A16C00DC591D /* Sources */, + 2A90C67A29E5A16C00DC591D /* Frameworks */, + 2A90C67B29E5A16C00DC591D /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = ScryfallSearcher; + packageProductDependencies = ( + 2A90C68F29E5A2E200DC591D /* ScryfallKit */, + 2AC7C1E229E70BB300D587E9 /* ScryfallKit */, + ); + productName = ScryfallSearcher; + productReference = 2A90C67D29E5A16C00DC591D /* ScryfallSearcher.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2A90C67529E5A16C00DC591D /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1430; + LastUpgradeCheck = 1430; + TargetAttributes = { + 2A90C67C29E5A16C00DC591D = { + CreatedOnToolsVersion = 14.3; + }; + }; + }; + buildConfigurationList = 2A90C67829E5A16C00DC591D /* Build configuration list for PBXProject "ScryfallSearcher" */; + compatibilityVersion = "Xcode 14.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 2A90C67429E5A16C00DC591D; + packageReferences = ( + 2AC7C1E129E70BB300D587E9 /* XCRemoteSwiftPackageReference "scryfallkit" */, + ); + productRefGroup = 2A90C67E29E5A16C00DC591D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2A90C67C29E5A16C00DC591D /* ScryfallSearcher */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2A90C67B29E5A16C00DC591D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2A90C68829E5A16D00DC591D /* Preview Assets.xcassets in Resources */, + 2A90C68529E5A16D00DC591D /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2A90C67929E5A16C00DC591D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2A90C68329E5A16C00DC591D /* ContentView.swift in Sources */, + 2A07EE3D29E707C500D7747D /* SearchView.swift in Sources */, + 2A5E0FA729EEFB4F004056CB /* CardView.swift in Sources */, + 2A90C68129E5A16C00DC591D /* ScryfallSearcherApp.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2A90C68929E5A16D00DC591D /* 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++20"; + 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 = 16.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; + }; + 2A90C68A29E5A16D00DC591D /* 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++20"; + 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 = 16.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; + }; + 2A90C68C29E5A16D00DC591D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"ScryfallSearcher/Preview Content\""; + DEVELOPMENT_TEAM = F8SAUD58HS; + 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"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = dev.hearst.ScryfallSearcher; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 2A90C68D29E5A16D00DC591D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"ScryfallSearcher/Preview Content\""; + DEVELOPMENT_TEAM = F8SAUD58HS; + 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"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = dev.hearst.ScryfallSearcher; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2A90C67829E5A16C00DC591D /* Build configuration list for PBXProject "ScryfallSearcher" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2A90C68929E5A16D00DC591D /* Debug */, + 2A90C68A29E5A16D00DC591D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2A90C68B29E5A16D00DC591D /* Build configuration list for PBXNativeTarget "ScryfallSearcher" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2A90C68C29E5A16D00DC591D /* Debug */, + 2A90C68D29E5A16D00DC591D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + 2AC7C1E129E70BB300D587E9 /* XCRemoteSwiftPackageReference "scryfallkit" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/jacobhearst/scryfallkit"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 5.0.0; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + 2A90C68F29E5A2E200DC591D /* ScryfallKit */ = { + isa = XCSwiftPackageProductDependency; + productName = ScryfallKit; + }; + 2AC7C1E229E70BB300D587E9 /* ScryfallKit */ = { + isa = XCSwiftPackageProductDependency; + package = 2AC7C1E129E70BB300D587E9 /* XCRemoteSwiftPackageReference "scryfallkit" */; + productName = ScryfallKit; + }; +/* End XCSwiftPackageProductDependency section */ + }; + rootObject = 2A90C67529E5A16C00DC591D /* Project object */; +} diff --git a/SampleCode/ScryfallSearcher/ScryfallSearcher.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/SampleCode/ScryfallSearcher/ScryfallSearcher.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/SampleCode/ScryfallSearcher/ScryfallSearcher.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/SampleCode/ScryfallSearcher/ScryfallSearcher.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/SampleCode/ScryfallSearcher/ScryfallSearcher.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/SampleCode/ScryfallSearcher/ScryfallSearcher.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/SampleCode/ScryfallSearcher/ScryfallSearcher.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/SampleCode/ScryfallSearcher/ScryfallSearcher.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 0000000..16efe6c --- /dev/null +++ b/SampleCode/ScryfallSearcher/ScryfallSearcher.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,14 @@ +{ + "pins" : [ + { + "identity" : "scryfallkit", + "kind" : "remoteSourceControl", + "location" : "https://github.com/jacobhearst/scryfallkit", + "state" : { + "revision" : "bc1f742718420a099663b8af1eae2abbeb615ad3", + "version" : "5.2.0" + } + } + ], + "version" : 2 +} diff --git a/SampleCode/ScryfallSearcher/ScryfallSearcher/Assets.xcassets/AccentColor.colorset/Contents.json b/SampleCode/ScryfallSearcher/ScryfallSearcher/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/SampleCode/ScryfallSearcher/ScryfallSearcher/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SampleCode/ScryfallSearcher/ScryfallSearcher/Assets.xcassets/AppIcon.appiconset/Contents.json b/SampleCode/ScryfallSearcher/ScryfallSearcher/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/SampleCode/ScryfallSearcher/ScryfallSearcher/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SampleCode/ScryfallSearcher/ScryfallSearcher/Assets.xcassets/Contents.json b/SampleCode/ScryfallSearcher/ScryfallSearcher/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/SampleCode/ScryfallSearcher/ScryfallSearcher/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SampleCode/ScryfallSearcher/ScryfallSearcher/CardView.swift b/SampleCode/ScryfallSearcher/ScryfallSearcher/CardView.swift new file mode 100644 index 0000000..e851977 --- /dev/null +++ b/SampleCode/ScryfallSearcher/ScryfallSearcher/CardView.swift @@ -0,0 +1,59 @@ +// +// CardView.swift +// + +import SwiftUI +import ScryfallKit + +struct CardView: View { + var card: Card + + var body: some View { + VStack { + AsyncImage(url: card.getImageURL(type: .normal)) { image in + image + .resizable() + .scaledToFit() + } placeholder: { + Text(card.name) + ProgressView() + } + + GroupBox { + HStack { + Text(card.name) + Spacer() + Text(card.manaCost ?? "") + } + + Divider() + + Text(card.oracleText ?? "") + .padding(.bottom) + Text(card.flavorText ?? "") + .italic() + + if let powerAndToughness = card.powerAndToughness { + Divider() + HStack { + Spacer() + Text(powerAndToughness) + } + } + } + } + } +} + +extension Card { + var powerAndToughness: String? { + guard let power, let toughness else { return nil } + return "\(power)/\(toughness)" + } +} + +//struct SwiftUIView_Previews: PreviewProvider { +// static var previews: some View { +// SwiftUIView() +// } +//} diff --git a/SampleCode/ScryfallSearcher/ScryfallSearcher/ContentView.swift b/SampleCode/ScryfallSearcher/ScryfallSearcher/ContentView.swift new file mode 100644 index 0000000..1c8ae0c --- /dev/null +++ b/SampleCode/ScryfallSearcher/ScryfallSearcher/ContentView.swift @@ -0,0 +1,88 @@ +// +// ContentView.swift +// ScryfallSearcher +// + +import SwiftUI +import ScryfallKit + +struct ContentView: View { + private let client = ScryfallClient() + private let columns: [GridItem] = Array(repeating: .init(.flexible()), count: 2) + + @State private var loading = false + @State private var query = "" + @State private var cards = [Card]() + @State private var error: String? + @State private var showError = false + + var body: some View { + ScrollView { + TextField("Search for Magic: the Gathering cards", text: $query) + .textFieldStyle(.roundedBorder) + .autocorrectionDisabled(true) + .textInputAutocapitalization(.never) + .onSubmit { + search(query: query) + } + + if loading { + ProgressView() + } else if cards.isEmpty { + Text("Perform a search to view cards") + } else { + LazyVGrid(columns: columns) { + ForEach(cards) { card in + AsyncImage(url: card.getImageURL(type: .normal)) { image in + image + .resizable() + .scaledToFit() + } placeholder: { + Text(card.name) + ProgressView() + } + } + } + } + + Spacer() + } + .alert("Error", isPresented: $showError, presenting: error, actions: { _ in }) { error in + Text(error) + } + .refreshable { + guard !query.isEmpty else { return } + search(query: query) + } + .padding() + } + + private func search(query: String) { + error = nil + loading = true + + Task { + do { + let results = try await client.searchCards(query: query) + await MainActor.run { + cards = results.data + } + } catch { + await MainActor.run { + showError = true + self.error = error.localizedDescription + } + } + + await MainActor.run { + loading = false + } + } + } +} + +struct ContentView_Previews: PreviewProvider { + static var previews: some View { + ContentView() + } +} diff --git a/SampleCode/ScryfallSearcher/ScryfallSearcher/Preview Content/Preview Assets.xcassets/Contents.json b/SampleCode/ScryfallSearcher/ScryfallSearcher/Preview Content/Preview Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/SampleCode/ScryfallSearcher/ScryfallSearcher/Preview Content/Preview Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SampleCode/ScryfallSearcher/ScryfallSearcher/ScryfallSearcherApp.swift b/SampleCode/ScryfallSearcher/ScryfallSearcher/ScryfallSearcherApp.swift new file mode 100644 index 0000000..6f9f3bb --- /dev/null +++ b/SampleCode/ScryfallSearcher/ScryfallSearcher/ScryfallSearcherApp.swift @@ -0,0 +1,17 @@ +// +// ScryfallSearcherApp.swift +// ScryfallSearcher +// +// Created by Jacob Hearst on 4/11/23. +// + +import SwiftUI + +@main +struct ScryfallSearcherApp: App { + var body: some Scene { + WindowGroup { + SearchView() + } + } +} diff --git a/SampleCode/ScryfallSearcher/ScryfallSearcher/SearchView.swift b/SampleCode/ScryfallSearcher/ScryfallSearcher/SearchView.swift new file mode 100644 index 0000000..8bd0350 --- /dev/null +++ b/SampleCode/ScryfallSearcher/ScryfallSearcher/SearchView.swift @@ -0,0 +1,69 @@ +import SwiftUI +import ScryfallKit + +struct SearchView: View { + private let client = ScryfallClient() + private let columns: [GridItem] = Array(repeating: .init(.flexible()), count: 2) + + @State private var loading = false + @State private var query = "" + @State private var cards = [Card]() + @State private var error: String? + @State private var showError = false + + var body: some View { + NavigationStack { + ScrollView { + TextField("Search for Magic: the Gathering cards", text: $query) + .textFieldStyle(.roundedBorder) + .autocorrectionDisabled(true) + .onSubmit(search) + + if loading { + ProgressView() + } else if cards.isEmpty { + Text("Perform a search to view cards") + } else { + LazyVGrid(columns: columns) { + ForEach(cards) { card in + NavigationLink(value: card) { + AsyncImage(url: card.getImageURL(type: .normal)) { image in + image + .resizable() + .scaledToFit() + } placeholder: { + Text(card.name) + ProgressView() + } + } + } + }.navigationDestination(for: Card.self) { CardView(card: $0) } + } + } + } + .padding() + .alert("Error", isPresented: $showError, presenting: error, actions: { _ in }) { error in + Text(error) + } + } + + private func search() { + loading = true + error = nil + showError = false + + Task { + do { + let results = try await client.searchCards(query: query) + await MainActor.run { + cards = results.data + } + } catch { + self.error = error.localizedDescription + self.showError = true + } + + loading = false + } + } +} diff --git a/Sources/ScryfallKit/Documentation.docc/ScryfallKit.md b/Sources/ScryfallKit/Documentation.docc/ScryfallKit.md index 01690c9..81fcfc2 100644 --- a/Sources/ScryfallKit/Documentation.docc/ScryfallKit.md +++ b/Sources/ScryfallKit/Documentation.docc/ScryfallKit.md @@ -18,5 +18,6 @@ Some recommended starting points: ### Fundamentals +- - - diff --git a/Sources/ScryfallKit/Documentation.docc/SearchTutorial/BasicUI.tutorial b/Sources/ScryfallKit/Documentation.docc/SearchTutorial/BasicUI.tutorial new file mode 100644 index 0000000..190769b --- /dev/null +++ b/Sources/ScryfallKit/Documentation.docc/SearchTutorial/BasicUI.tutorial @@ -0,0 +1,99 @@ +@Tutorial(time: 10) { + @XcodeRequirement( + title: "Xcode 14", + destination: "https://developer.apple.com/download/") + + @Intro(title: "Creating a basic search experience") { + Scryfall's primary function is its search feature, with ScryfallKit you can bring that search to Apple platforms . + } + + @Section(title: "Implementing basic search") { + @ContentAndMedia { + Search engines have two primary areas: the search bar and the results. Let's create a basic UI that covers both of these areas. + + @Image(source: BasicUIFinalProductSearchCrop, alt: "The top third of a screenshot of the final product of this tutorial") + } + + @Steps { + @Step { + Create a new SwiftUI view + + @Code(name: "SearchView.swift", file: Step0CreateView) + } + + @Step { + Add a `TextField` to act as the search input. + + @Code(name: "SearchView.swift", file: Step1AddInput) + } + + @Step { + Wrap your `TextField` in a `ScrollView` and then add a 2-columned `LazyVGrid` below the search input to display the images of the cards returned by the search. + + @Code(name: "SearchView.swift", file: Step2AddLazyVGrid) + } + + @Step { + Retrieve the URL to the card image with ``ScryfallKit/Card/getImageURL(type:getSecondFace:)`` and display it with an `AsyncImage`. + + Exact image dimensions can be found in [Scryfall's docs](https://scryfall.com/docs/api/images) but `.resizable()` combined with `.scaledToFit()` should suffice for most image sizes. + + @Code(name: "SearchView.swift", file: Step3AddAsyncImage) { + @Image(source: Step3AddAsyncImagePreview, alt: "A screenshot of the final product of step 1 in an iOS simulator") + } + } + + @Step { + Create a `search` function that submits the `query` to a ``ScryfallKit/ScryfallClient`` instance and then sets `cards` to the first page of results. + + @Code(name: "SearchView.swift", file: Step4AddSearch) { + @Image(source: Step4AddSearchPreview, alt: "A screenshot of the final product of step 2 in an iOS simulator") + } + } + + @Step { + Run your app and try entering "type:creature" in your search bar. You should see the grid of cards populate. + + @Video(source: "BasicUIFinalProduct.mov", poster: "BasicUIFinalProduct.png") + } + } + } + + @Section(title: "Refining UX") { + While we can now search for and view cards, the user experience leaves something to be desired. There are two main issues with the current implementation: errors aren't ever presented to the user and there's no loading indicator when a search is submitted + + @Steps { + @Step { + We'll be displaying errors to the user via an alert. Create some variables to hold the error message and the open state of the alert. Then call `.alert` on the top level `ScrollView`. + + @Code(name: "SearchView.swift", file: Step1ShowErrors, previousFile: Step4Search) { + @Image(source: "Step1ShowErrorPreview", alt: "A screenshot of an alert displaying an error in an iOS simulator") + } + } + + @Step { + Add a `loading` property and then add a conditional statement to determine whether to show a `ProgressView` or the search results + + Set `loading` to `true` and run the app or perform a search to see the loading indicator in action + + @Code(name: "SearchView.swift", file: Step2LoadingIndicator) { + @Image(source: "Step2LoadingIndicatorPreview", alt: "A screenshot of a loading indicator where the card grid was") + } + } + + @Step { + You may have noticed in your testing that autocorrect can be quite annoying when entering Magic: the Gathering card names like "Fblthp, the Lost". Let's disable that with by calling `autocorrectionDisabled(true)` on our `TextField` + + @Code(name: "SearchView.swift", file: Step3DisableAutocorrect) + } + + @Step { + As a final refinement, we want to help the user understand what to do when they open our app. Let's add a message that will only show if we're not loading and we don't have search results + + @Code(name: "SearchView.swift", file: Step4ZeroState) { + @Image(source: "Step3ZeroState", alt: "A screenshot of a message prompting the user to perform a search") + } + } + } + } +} diff --git a/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Code/Section1BasicUI/Step0CreateView.swift b/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Code/Section1BasicUI/Step0CreateView.swift new file mode 100644 index 0000000..aba4919 --- /dev/null +++ b/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Code/Section1BasicUI/Step0CreateView.swift @@ -0,0 +1,7 @@ +import SwiftUI + +struct SearchView: View { + var body: some View { + Text("Hello, World!") + } +} diff --git a/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Code/Section1BasicUI/Step1AddInput.swift b/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Code/Section1BasicUI/Step1AddInput.swift new file mode 100644 index 0000000..ced0dc5 --- /dev/null +++ b/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Code/Section1BasicUI/Step1AddInput.swift @@ -0,0 +1,11 @@ +import SwiftUI + +struct SearchView: View { + @State private var query = "" + + var body: some View { + TextField("Search for Magic: the Gathering cards", text: $query) + .textFieldStyle(.roundedBorder) + .padding() + } +} diff --git a/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Code/Section1BasicUI/Step2AddLazyVGrid.swift b/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Code/Section1BasicUI/Step2AddLazyVGrid.swift new file mode 100644 index 0000000..6907507 --- /dev/null +++ b/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Code/Section1BasicUI/Step2AddLazyVGrid.swift @@ -0,0 +1,24 @@ +import SwiftUI +import ScryfallKit + +struct SearchView: View { + private let columns: [GridItem] = Array(repeating: .init(.flexible()), count: 2) + + @State private var query = "" + @State private var cards = [Card]() + + var body: some View { + ScrollView { + TextField("Search for Magic: the Gathering cards", text: $query) + .textFieldStyle(.roundedBorder) + + LazyVGrid(columns: columns) { + ForEach(cards) { card in + + } + } + } + .padding() + } +} + diff --git a/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Code/Section1BasicUI/Step3AddAsyncImage.swift b/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Code/Section1BasicUI/Step3AddAsyncImage.swift new file mode 100644 index 0000000..d9e8477 --- /dev/null +++ b/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Code/Section1BasicUI/Step3AddAsyncImage.swift @@ -0,0 +1,30 @@ +import SwiftUI +import ScryfallKit + +struct SearchView: View { + private let columns: [GridItem] = Array(repeating: .init(.flexible()), count: 2) + + @State private var query = "" + @State private var cards = [Card]() + + var body: some View { + ScrollView { + TextField("Search for Magic: the Gathering cards", text: $query) + .textFieldStyle(.roundedBorder) + + LazyVGrid(columns: columns) { + ForEach(cards) { card in + AsyncImage(url: card.getImageURL(type: .normal)) { image in + image + .resizable() + .scaledToFit() + } placeholder: { + Text(card.name) + ProgressView() + } + } + } + } + .padding() + } +} diff --git a/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Code/Section1BasicUI/Step4AddSearch.swift b/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Code/Section1BasicUI/Step4AddSearch.swift new file mode 100644 index 0000000..d4298dd --- /dev/null +++ b/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Code/Section1BasicUI/Step4AddSearch.swift @@ -0,0 +1,45 @@ +import SwiftUI +import ScryfallKit + +struct SearchView: View { + private let client = ScryfallClient() + private let columns: [GridItem] = Array(repeating: .init(.flexible()), count: 2) + + @State private var query = "" + @State private var cards = [Card]() + + var body: some View { + ScrollView { + TextField("Search for Magic: the Gathering cards", text: $query) + .textFieldStyle(.roundedBorder) + .onSubmit(search) + + LazyVGrid(columns: columns) { + ForEach(cards) { card in + AsyncImage(url: card.getImageURL(type: .normal)) { image in + image + .resizable() + .scaledToFit() + } placeholder: { + Text(card.name) + ProgressView() + } + } + } + } + .padding() + } + + private func search() { + Task { + do { + let results = try await client.searchCards(query: query) + await MainActor.run { + cards = results.data + } + } catch { + print(error) + } + } + } +} diff --git a/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Code/Section2RefineUX/Step1ShowErrors.swift b/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Code/Section2RefineUX/Step1ShowErrors.swift new file mode 100644 index 0000000..aa84b3c --- /dev/null +++ b/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Code/Section2RefineUX/Step1ShowErrors.swift @@ -0,0 +1,55 @@ +import SwiftUI +import ScryfallKit + +struct SearchView: View { + private let client = ScryfallClient() + private let columns: [GridItem] = Array(repeating: .init(.flexible()), count: 2) + + @State private var query = "" + @State private var cards = [Card]() + @State private var error: String? + @State private var showError = false + + var body: some View { + ScrollView { + TextField("Search for Magic: the Gathering cards", text: $query) + .textFieldStyle(.roundedBorder) + .onSubmit(search) + + LazyVGrid(columns: columns) { + ForEach(cards) { card in + AsyncImage(url: card.getImageURL(type: .normal)) { image in + image + .resizable() + .scaledToFit() + } placeholder: { + Text(card.name) + ProgressView() + } + } + } + } + .padding() + .alert("Error", isPresented: $showError, presenting: error, actions: { _ in }) { error in + Text(error) + } + } + + private func search() { + error = nil + showError = false + + Task { + do { + let results = try await client.searchCards(query: query) + await MainActor.run { + cards = results.data + } + } catch { + self.error = error.localizedDescription + self.showError = true + } + } + } +} + diff --git a/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Code/Section2RefineUX/Step2LoadingIndicator.swift b/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Code/Section2RefineUX/Step2LoadingIndicator.swift new file mode 100644 index 0000000..faaef0e --- /dev/null +++ b/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Code/Section2RefineUX/Step2LoadingIndicator.swift @@ -0,0 +1,63 @@ +import SwiftUI +import ScryfallKit + +struct SearchView: View { + private let client = ScryfallClient() + private let columns: [GridItem] = Array(repeating: .init(.flexible()), count: 2) + + @State private var loading = false + @State private var query = "" + @State private var cards = [Card]() + @State private var error: String? + @State private var showError = false + + var body: some View { + ScrollView { + TextField("Search for Magic: the Gathering cards", text: $query) + .textFieldStyle(.roundedBorder) + .onSubmit(search) + + if loading { + ProgressView() + } else { + LazyVGrid(columns: columns) { + ForEach(cards) { card in + AsyncImage(url: card.getImageURL(type: .normal)) { image in + image + .resizable() + .scaledToFit() + } placeholder: { + Text(card.name) + ProgressView() + } + } + } + } + } + .padding() + .alert("Error", isPresented: $showError, presenting: error, actions: { _ in }) { error in + Text(error) + } + } + + private func search() { + loading = true + error = nil + showError = false + + Task { + do { + let results = try await client.searchCards(query: query) + await MainActor.run { + cards = results.data + } + } catch { + self.error = error.localizedDescription + self.showError = true + } + + loading = false + } + } +} + diff --git a/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Code/Section2RefineUX/Step3DisableAutocorrect.swift b/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Code/Section2RefineUX/Step3DisableAutocorrect.swift new file mode 100644 index 0000000..9902c10 --- /dev/null +++ b/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Code/Section2RefineUX/Step3DisableAutocorrect.swift @@ -0,0 +1,64 @@ +import SwiftUI +import ScryfallKit + +struct SearchView: View { + private let client = ScryfallClient() + private let columns: [GridItem] = Array(repeating: .init(.flexible()), count: 2) + + @State private var loading = false + @State private var query = "" + @State private var cards = [Card]() + @State private var error: String? + @State private var showError = false + + var body: some View { + ScrollView { + TextField("Search for Magic: the Gathering cards", text: $query) + .textFieldStyle(.roundedBorder) + .autocorrectionDisabled(true) + .onSubmit(search) + + if loading { + ProgressView() + } else { + LazyVGrid(columns: columns) { + ForEach(cards) { card in + AsyncImage(url: card.getImageURL(type: .normal)) { image in + image + .resizable() + .scaledToFit() + } placeholder: { + Text(card.name) + ProgressView() + } + } + } + } + } + .padding() + .alert("Error", isPresented: $showError, presenting: error, actions: { _ in }) { error in + Text(error) + } + } + + private func search() { + loading = true + error = nil + showError = false + + Task { + do { + let results = try await client.searchCards(query: query) + await MainActor.run { + cards = results.data + } + } catch { + self.error = error.localizedDescription + self.showError = true + } + + loading = false + } + } +} + diff --git a/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Code/Section2RefineUX/Step4ZeroState.swift b/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Code/Section2RefineUX/Step4ZeroState.swift new file mode 100644 index 0000000..3d3d650 --- /dev/null +++ b/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Code/Section2RefineUX/Step4ZeroState.swift @@ -0,0 +1,65 @@ +import SwiftUI +import ScryfallKit + +struct SearchView: View { + private let client = ScryfallClient() + private let columns: [GridItem] = Array(repeating: .init(.flexible()), count: 2) + + @State private var loading = false + @State private var query = "" + @State private var cards = [Card]() + @State private var error: String? + @State private var showError = false + + var body: some View { + ScrollView { + TextField("Search for Magic: the Gathering cards", text: $query) + .textFieldStyle(.roundedBorder) + .autocorrectionDisabled(true) + .onSubmit(search) + + if loading { + ProgressView() + } else if cards.isEmpty { + Text("Perform a search to view cards") + } else { + LazyVGrid(columns: columns) { + ForEach(cards) { card in + AsyncImage(url: card.getImageURL(type: .normal)) { image in + image + .resizable() + .scaledToFit() + } placeholder: { + Text(card.name) + ProgressView() + } + } + } + } + } + .padding() + .alert("Error", isPresented: $showError, presenting: error, actions: { _ in }) { error in + Text(error) + } + } + + private func search() { + loading = true + error = nil + showError = false + + Task { + do { + let results = try await client.searchCards(query: query) + await MainActor.run { + cards = results.data + } + } catch { + self.error = error.localizedDescription + self.showError = true + } + + loading = false + } + } +} diff --git a/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Media/Section1BasicUI/BasicUIFinalProduct.mov b/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Media/Section1BasicUI/BasicUIFinalProduct.mov new file mode 100644 index 0000000..8b9f28a Binary files /dev/null and b/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Media/Section1BasicUI/BasicUIFinalProduct.mov differ diff --git a/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Media/Section1BasicUI/BasicUIFinalProductSearchCrop.png b/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Media/Section1BasicUI/BasicUIFinalProductSearchCrop.png new file mode 100644 index 0000000..74fa03e Binary files /dev/null and b/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Media/Section1BasicUI/BasicUIFinalProductSearchCrop.png differ diff --git a/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Media/Section1BasicUI/Step3AddAsyncImagePreview.png b/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Media/Section1BasicUI/Step3AddAsyncImagePreview.png new file mode 100644 index 0000000..696289b Binary files /dev/null and b/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Media/Section1BasicUI/Step3AddAsyncImagePreview.png differ diff --git a/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Media/Section1BasicUI/Step4AddSearchPreview.png b/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Media/Section1BasicUI/Step4AddSearchPreview.png new file mode 100644 index 0000000..2b25b87 Binary files /dev/null and b/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Media/Section1BasicUI/Step4AddSearchPreview.png differ diff --git a/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Media/Section2RefineUX/Step1ShowErrorPreview.png b/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Media/Section2RefineUX/Step1ShowErrorPreview.png new file mode 100644 index 0000000..4233ca2 Binary files /dev/null and b/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Media/Section2RefineUX/Step1ShowErrorPreview.png differ diff --git a/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Media/Section2RefineUX/Step2LoadingIndicatorPreview.png b/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Media/Section2RefineUX/Step2LoadingIndicatorPreview.png new file mode 100644 index 0000000..73180b2 Binary files /dev/null and b/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Media/Section2RefineUX/Step2LoadingIndicatorPreview.png differ diff --git a/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Media/Section2RefineUX/Step3ZeroState.png b/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Media/Section2RefineUX/Step3ZeroState.png new file mode 100644 index 0000000..f497e77 Binary files /dev/null and b/Sources/ScryfallKit/Documentation.docc/SearchTutorial/Resources/Media/Section2RefineUX/Step3ZeroState.png differ diff --git a/Sources/ScryfallKit/Documentation.docc/SearchTutorial/SearchTutorial.tutorial b/Sources/ScryfallKit/Documentation.docc/SearchTutorial/SearchTutorial.tutorial new file mode 100644 index 0000000..12d024f --- /dev/null +++ b/Sources/ScryfallKit/Documentation.docc/SearchTutorial/SearchTutorial.tutorial @@ -0,0 +1,13 @@ +@Tutorials(name: "ScryfallKit") { + @Intro(title: "Building native macOS and iOS Magic: the Gathering tools with ScryfallKit") { + Bring the power of Scryfall to your native macOS and iOS experiences + } + + @Chapter(name: "Creating a basic search UI") { + First, lets create a basic UI that will allow the user to perform two basic tasks: searching and browsing + + @Image(source: BasicUIFinalProduct, alt: "A screen capture of the final product of the tutorial") + + @TutorialReference(tutorial: "doc:BasicUI") + } +}