Repository: jordansinger/todo-macos-swiftui-sample Branch: master Commit: e325131112bf Files: 14 Total size: 18.6 KB Directory structure: gitextract_1t30x5e3/ ├── README.md ├── Todo/ │ ├── Assets.xcassets/ │ │ ├── AccentColor.colorset/ │ │ │ └── Contents.json │ │ ├── AppIcon.appiconset/ │ │ │ └── Contents.json │ │ └── Contents.json │ ├── ContentView.swift │ ├── Info.plist │ ├── Preview Content/ │ │ └── Preview Assets.xcassets/ │ │ └── Contents.json │ ├── Todo.entitlements │ └── TodoApp.swift └── Todo.xcodeproj/ ├── project.pbxproj ├── project.xcworkspace/ │ ├── contents.xcworkspacedata │ ├── xcshareddata/ │ │ └── IDEWorkspaceChecks.plist │ └── xcuserdata/ │ └── jordansinger.xcuserdatad/ │ └── UserInterfaceState.xcuserstate └── xcuserdata/ └── jordansinger.xcuserdatad/ └── xcschemes/ └── xcschememanagement.plist ================================================ FILE CONTENTS ================================================ ================================================ FILE: README.md ================================================ Todo macOS app in built SwiftUI ![Todo](https://user-images.githubusercontent.com/110813/88483154-ff327500-cf33-11ea-8d37-cda60b92818e.png) ================================================ FILE: Todo/Assets.xcassets/AccentColor.colorset/Contents.json ================================================ { "colors" : [ { "color" : { "color-space" : "srgb", "components" : { "alpha" : "1.000", "blue" : "1.000", "green" : "1.000", "red" : "1.000" } }, "idiom" : "universal" } ], "info" : { "author" : "xcode", "version" : 1 } } ================================================ FILE: Todo/Assets.xcassets/AppIcon.appiconset/Contents.json ================================================ { "images" : [ { "idiom" : "mac", "scale" : "1x", "size" : "16x16" }, { "idiom" : "mac", "scale" : "2x", "size" : "16x16" }, { "idiom" : "mac", "scale" : "1x", "size" : "32x32" }, { "idiom" : "mac", "scale" : "2x", "size" : "32x32" }, { "idiom" : "mac", "scale" : "1x", "size" : "128x128" }, { "idiom" : "mac", "scale" : "2x", "size" : "128x128" }, { "idiom" : "mac", "scale" : "1x", "size" : "256x256" }, { "idiom" : "mac", "scale" : "2x", "size" : "256x256" }, { "idiom" : "mac", "scale" : "1x", "size" : "512x512" }, { "idiom" : "mac", "scale" : "2x", "size" : "512x512" } ], "info" : { "author" : "xcode", "version" : 1 } } ================================================ FILE: Todo/Assets.xcassets/Contents.json ================================================ { "info" : { "author" : "xcode", "version" : 1 } } ================================================ FILE: Todo/ContentView.swift ================================================ // // ContentView.swift // Todo // // Created by Jordan Singer on 7/6/20. // import SwiftUI struct Task: Hashable, Identifiable { var id = UUID() var title: String var completed = false } struct ContentView: View { @State var selection: Set = [0] var body: some View { NavigationView { List(selection: self.$selection) { Label("Tasks", systemImage: "largecircle.fill.circle") .tag(0) Label("Today", systemImage: "star.fill") Label("Upcoming", systemImage: "calendar") Divider() Label("Activity", systemImage: "clock.fill") Label("Trash", systemImage: "trash.fill") Divider() Label("New List", systemImage: "plus") } .listStyle(SidebarListStyle()) .frame(minWidth: 100, idealWidth: 150, maxWidth: 200, maxHeight: .infinity) TasksView() } } } struct TasksView: View { @State var tasks = [ Task(title: "Here’s to the crazy ones"), Task(title: "the misfits, the rebels, the troublemakers", completed: true), Task(title: "the round pegs in the square holes…"), Task(title: "the ones who see things differently — they’re not fond of rules…"), Task(title: "You can quote them, disagree with them, glorify or vilify them"), Task(title: "but the only thing you can’t do is ignore them because they change things…"), Task(title: "they push the human race forward", completed: true), Task(title: "and while some may see them as the crazy ones"), Task(title: "we see genius", completed: true), Task(title: "because the ones who are crazy enough to think that they can change the world"), Task(title: "are the ones who do.") ] var body: some View { List { VStack(alignment: .leading, spacing: 12) { Text("Tasks") .font(.headline) ForEach(tasks, id: \.id) { task in TaskView(task: task) } } } .navigationTitle("Todo") .toolbar { ToolbarItem(placement: .status) { Button(action: { tasks.append(Task(title: "New task")) }) { Image(systemName: "plus") } } } } } struct TaskView: View { @State var task: Task var body: some View { Button(action: { task.completed.toggle() }) { HStack(alignment: .firstTextBaseline, spacing: 8) { Image(systemName: task.completed ? "largecircle.fill.circle" : "circle") .foregroundColor(.secondary) Text(task.title) .strikethrough(task.completed) .foregroundColor(task.completed ? .secondary : .primary) Spacer() } } .buttonStyle(PlainButtonStyle()) } } struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() } } ================================================ FILE: Todo/Info.plist ================================================ CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName $(PRODUCT_NAME) CFBundlePackageType $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleShortVersionString 1.0 CFBundleVersion 1 LSMinimumSystemVersion $(MACOSX_DEPLOYMENT_TARGET) ================================================ FILE: Todo/Preview Content/Preview Assets.xcassets/Contents.json ================================================ { "info" : { "author" : "xcode", "version" : 1 } } ================================================ FILE: Todo/Todo.entitlements ================================================ com.apple.security.app-sandbox com.apple.security.files.user-selected.read-only ================================================ FILE: Todo/TodoApp.swift ================================================ // // TodoApp.swift // Todo // // Created by Jordan Singer on 7/6/20. // import SwiftUI @main struct TodoApp: App { var body: some Scene { WindowGroup { ContentView() } } } ================================================ FILE: Todo.xcodeproj/project.pbxproj ================================================ // !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 50; objects = { /* Begin PBXBuildFile section */ 86EE02A524B3E84200D1762E /* TodoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86EE02A424B3E84200D1762E /* TodoApp.swift */; }; 86EE02A724B3E84200D1762E /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86EE02A624B3E84200D1762E /* ContentView.swift */; }; 86EE02A924B3E84400D1762E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 86EE02A824B3E84400D1762E /* Assets.xcassets */; }; 86EE02AC24B3E84400D1762E /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 86EE02AB24B3E84400D1762E /* Preview Assets.xcassets */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ 86EE02A124B3E84200D1762E /* Todo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Todo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 86EE02A424B3E84200D1762E /* TodoApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TodoApp.swift; sourceTree = ""; }; 86EE02A624B3E84200D1762E /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 86EE02A824B3E84400D1762E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 86EE02AB24B3E84400D1762E /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 86EE02AD24B3E84400D1762E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 86EE02AE24B3E84400D1762E /* Todo.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Todo.entitlements; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ 86EE029E24B3E84200D1762E /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 86EE029824B3E84200D1762E = { isa = PBXGroup; children = ( 86EE02A324B3E84200D1762E /* Todo */, 86EE02A224B3E84200D1762E /* Products */, ); sourceTree = ""; }; 86EE02A224B3E84200D1762E /* Products */ = { isa = PBXGroup; children = ( 86EE02A124B3E84200D1762E /* Todo.app */, ); name = Products; sourceTree = ""; }; 86EE02A324B3E84200D1762E /* Todo */ = { isa = PBXGroup; children = ( 86EE02A424B3E84200D1762E /* TodoApp.swift */, 86EE02A624B3E84200D1762E /* ContentView.swift */, 86EE02A824B3E84400D1762E /* Assets.xcassets */, 86EE02AD24B3E84400D1762E /* Info.plist */, 86EE02AE24B3E84400D1762E /* Todo.entitlements */, 86EE02AA24B3E84400D1762E /* Preview Content */, ); path = Todo; sourceTree = ""; }; 86EE02AA24B3E84400D1762E /* Preview Content */ = { isa = PBXGroup; children = ( 86EE02AB24B3E84400D1762E /* Preview Assets.xcassets */, ); path = "Preview Content"; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ 86EE02A024B3E84200D1762E /* Todo */ = { isa = PBXNativeTarget; buildConfigurationList = 86EE02B124B3E84400D1762E /* Build configuration list for PBXNativeTarget "Todo" */; buildPhases = ( 86EE029D24B3E84200D1762E /* Sources */, 86EE029E24B3E84200D1762E /* Frameworks */, 86EE029F24B3E84200D1762E /* Resources */, ); buildRules = ( ); dependencies = ( ); name = Todo; productName = Todo; productReference = 86EE02A124B3E84200D1762E /* Todo.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 86EE029924B3E84200D1762E /* Project object */ = { isa = PBXProject; attributes = { LastSwiftUpdateCheck = 1200; LastUpgradeCheck = 1200; TargetAttributes = { 86EE02A024B3E84200D1762E = { CreatedOnToolsVersion = 12.0; }; }; }; buildConfigurationList = 86EE029C24B3E84200D1762E /* Build configuration list for PBXProject "Todo" */; compatibilityVersion = "Xcode 9.3"; developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, Base, ); mainGroup = 86EE029824B3E84200D1762E; productRefGroup = 86EE02A224B3E84200D1762E /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( 86EE02A024B3E84200D1762E /* Todo */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ 86EE029F24B3E84200D1762E /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( 86EE02AC24B3E84400D1762E /* Preview Assets.xcassets in Resources */, 86EE02A924B3E84400D1762E /* Assets.xcassets in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ 86EE029D24B3E84200D1762E /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 86EE02A724B3E84200D1762E /* ContentView.swift in Sources */, 86EE02A524B3E84200D1762E /* TodoApp.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin XCBuildConfiguration section */ 86EE02AF24B3E84400D1762E /* 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++14"; CLANG_CXX_LIBRARY = "libc++"; 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; MACOSX_DEPLOYMENT_TARGET = 10.16; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; }; name = Debug; }; 86EE02B024B3E84400D1762E /* 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++14"; CLANG_CXX_LIBRARY = "libc++"; 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; MACOSX_DEPLOYMENT_TARGET = 10.16; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; SWIFT_OPTIMIZATION_LEVEL = "-O"; }; name = Release; }; 86EE02B224B3E84400D1762E /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_ENTITLEMENTS = Todo/Todo.entitlements; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; DEVELOPMENT_ASSET_PATHS = "\"Todo/Preview Content\""; ENABLE_PREVIEWS = YES; INFOPLIST_FILE = Todo/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.16; PRODUCT_BUNDLE_IDENTIFIER = example.Todo; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; }; name = Debug; }; 86EE02B324B3E84400D1762E /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_ENTITLEMENTS = Todo/Todo.entitlements; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; DEVELOPMENT_ASSET_PATHS = "\"Todo/Preview Content\""; ENABLE_PREVIEWS = YES; INFOPLIST_FILE = Todo/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.16; PRODUCT_BUNDLE_IDENTIFIER = example.Todo; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ 86EE029C24B3E84200D1762E /* Build configuration list for PBXProject "Todo" */ = { isa = XCConfigurationList; buildConfigurations = ( 86EE02AF24B3E84400D1762E /* Debug */, 86EE02B024B3E84400D1762E /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 86EE02B124B3E84400D1762E /* Build configuration list for PBXNativeTarget "Todo" */ = { isa = XCConfigurationList; buildConfigurations = ( 86EE02B224B3E84400D1762E /* Debug */, 86EE02B324B3E84400D1762E /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; rootObject = 86EE029924B3E84200D1762E /* Project object */; } ================================================ FILE: Todo.xcodeproj/project.xcworkspace/contents.xcworkspacedata ================================================ ================================================ FILE: Todo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist ================================================ IDEDidComputeMac32BitWarning ================================================ FILE: Todo.xcodeproj/xcuserdata/jordansinger.xcuserdatad/xcschemes/xcschememanagement.plist ================================================ SchemeUserState Todo.xcscheme_^#shared#^_ orderHint 0