Skip to content

Commit

Permalink
add demo project
Browse files Browse the repository at this point in the history
  • Loading branch information
lukepistrol committed Sep 20, 2023
1 parent fc28752 commit 2e61b9d
Show file tree
Hide file tree
Showing 10 changed files with 561 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Attach async tasks to SwiftUI views using a trigger mechanism. See [this](#the-s
## Table Of Contents

- [Usage](#usage)
- [Documentation](#documentation)
- [Overview](#overview)
- [The Problem](#the-problem)
- [The Solution](#the-solution)
Expand All @@ -23,6 +24,12 @@ dependencies: [

Make sure to `import TaskTrigger` in any location you'd want to use it.

## Documentation

The documentation is available [here](https://lukepistrol.github.io/TaskTrigger/documentation/tasktrigger).

You can also have a look at the [sample project](https://github.com/lukepistrol/TaskTrigger/tree/main/TaskTriggerDemo/TaskTriggerDemo)

## Overview

When using Swift's structured concurrency in SwiftUI it is good practice to
Expand Down
371 changes: 371 additions & 0 deletions TaskTriggerDemo/TaskTriggerDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,371 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 56;
objects = {

/* Begin PBXBuildFile section */
28C862282ABB4EEE002EA26C /* TaskTriggerDemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28C862272ABB4EEE002EA26C /* TaskTriggerDemoApp.swift */; };
28C8622A2ABB4EEE002EA26C /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28C862292ABB4EEE002EA26C /* ContentView.swift */; };
28C8622C2ABB4EF0002EA26C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 28C8622B2ABB4EF0002EA26C /* Assets.xcassets */; };
28C8622F2ABB4EF0002EA26C /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 28C8622E2ABB4EF0002EA26C /* Preview Assets.xcassets */; };
28C862362ABB4F1A002EA26C /* TaskTrigger in Resources */ = {isa = PBXBuildFile; fileRef = 28C862352ABB4F1A002EA26C /* TaskTrigger */; };
28C862392ABB4F25002EA26C /* TaskTrigger in Frameworks */ = {isa = PBXBuildFile; productRef = 28C862382ABB4F25002EA26C /* TaskTrigger */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
28C862242ABB4EEE002EA26C /* TaskTriggerDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TaskTriggerDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
28C862272ABB4EEE002EA26C /* TaskTriggerDemoApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TaskTriggerDemoApp.swift; sourceTree = "<group>"; };
28C862292ABB4EEE002EA26C /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
28C8622B2ABB4EF0002EA26C /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
28C8622E2ABB4EF0002EA26C /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
28C862352ABB4F1A002EA26C /* TaskTrigger */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = TaskTrigger; path = ..; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
28C862212ABB4EEE002EA26C /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
28C862392ABB4F25002EA26C /* TaskTrigger in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
28C8621B2ABB4EEE002EA26C = {
isa = PBXGroup;
children = (
28C862352ABB4F1A002EA26C /* TaskTrigger */,
28C862262ABB4EEE002EA26C /* TaskTriggerDemo */,
28C862252ABB4EEE002EA26C /* Products */,
28C862372ABB4F25002EA26C /* Frameworks */,
);
sourceTree = "<group>";
};
28C862252ABB4EEE002EA26C /* Products */ = {
isa = PBXGroup;
children = (
28C862242ABB4EEE002EA26C /* TaskTriggerDemo.app */,
);
name = Products;
sourceTree = "<group>";
};
28C862262ABB4EEE002EA26C /* TaskTriggerDemo */ = {
isa = PBXGroup;
children = (
28C862272ABB4EEE002EA26C /* TaskTriggerDemoApp.swift */,
28C862292ABB4EEE002EA26C /* ContentView.swift */,
28C8622B2ABB4EF0002EA26C /* Assets.xcassets */,
28C8622D2ABB4EF0002EA26C /* Preview Content */,
);
path = TaskTriggerDemo;
sourceTree = "<group>";
};
28C8622D2ABB4EF0002EA26C /* Preview Content */ = {
isa = PBXGroup;
children = (
28C8622E2ABB4EF0002EA26C /* Preview Assets.xcassets */,
);
path = "Preview Content";
sourceTree = "<group>";
};
28C862372ABB4F25002EA26C /* Frameworks */ = {
isa = PBXGroup;
children = (
);
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
28C862232ABB4EEE002EA26C /* TaskTriggerDemo */ = {
isa = PBXNativeTarget;
buildConfigurationList = 28C862322ABB4EF0002EA26C /* Build configuration list for PBXNativeTarget "TaskTriggerDemo" */;
buildPhases = (
28C862202ABB4EEE002EA26C /* Sources */,
28C862212ABB4EEE002EA26C /* Frameworks */,
28C862222ABB4EEE002EA26C /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = TaskTriggerDemo;
packageProductDependencies = (
28C862382ABB4F25002EA26C /* TaskTrigger */,
);
productName = TaskTriggerDemo;
productReference = 28C862242ABB4EEE002EA26C /* TaskTriggerDemo.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
28C8621C2ABB4EEE002EA26C /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = 1;
LastSwiftUpdateCheck = 1500;
LastUpgradeCheck = 1500;
TargetAttributes = {
28C862232ABB4EEE002EA26C = {
CreatedOnToolsVersion = 15.0;
};
};
};
buildConfigurationList = 28C8621F2ABB4EEE002EA26C /* Build configuration list for PBXProject "TaskTriggerDemo" */;
compatibilityVersion = "Xcode 14.0";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 28C8621B2ABB4EEE002EA26C;
productRefGroup = 28C862252ABB4EEE002EA26C /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
28C862232ABB4EEE002EA26C /* TaskTriggerDemo */,
);
};
/* End PBXProject section */

/* Begin PBXResourcesBuildPhase section */
28C862222ABB4EEE002EA26C /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
28C8622F2ABB4EF0002EA26C /* Preview Assets.xcassets in Resources */,
28C8622C2ABB4EF0002EA26C /* Assets.xcassets in Resources */,
28C862362ABB4F1A002EA26C /* TaskTrigger in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
28C862202ABB4EEE002EA26C /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
28C8622A2ABB4EEE002EA26C /* ContentView.swift in Sources */,
28C862282ABB4EEE002EA26C /* TaskTriggerDemoApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */

/* Begin XCBuildConfiguration section */
28C862302ABB4EF0002EA26C /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
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;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu17;
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 = 17.0;
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
28C862312ABB4EF0002EA26C /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
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;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu17;
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 = 17.0;
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
VALIDATE_PRODUCT = YES;
};
name = Release;
};
28C862332ABB4EF0002EA26C /* 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 = "\"TaskTriggerDemo/Preview Content\"";
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 = com.lukaspistrol.TaskTriggerDemo;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
28C862342ABB4EF0002EA26C /* 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 = "\"TaskTriggerDemo/Preview Content\"";
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 = com.lukaspistrol.TaskTriggerDemo;
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 */
28C8621F2ABB4EEE002EA26C /* Build configuration list for PBXProject "TaskTriggerDemo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
28C862302ABB4EF0002EA26C /* Debug */,
28C862312ABB4EF0002EA26C /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
28C862322ABB4EF0002EA26C /* Build configuration list for PBXNativeTarget "TaskTriggerDemo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
28C862332ABB4EF0002EA26C /* Debug */,
28C862342ABB4EF0002EA26C /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */

/* Begin XCSwiftPackageProductDependency section */
28C862382ABB4F25002EA26C /* TaskTrigger */ = {
isa = XCSwiftPackageProductDependency;
productName = TaskTrigger;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = 28C8621C2ABB4EEE002EA26C /* Project object */;
}
Loading

0 comments on commit 2e61b9d

Please sign in to comment.