From 6c716a1f522b291c826aafbb224e342e3bca61ab Mon Sep 17 00:00:00 2001 From: Reed Es Date: Fri, 7 Apr 2023 23:16:36 -0600 Subject: [PATCH 1/9] ongoing --- .../xcshareddata/xcschemes/Task Routine Tracker Plus.xcscheme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Task Routine Tracker Plus.xcodeproj/xcshareddata/xcschemes/Task Routine Tracker Plus.xcscheme b/Task Routine Tracker Plus.xcodeproj/xcshareddata/xcschemes/Task Routine Tracker Plus.xcscheme index 7c55df1..5d87062 100644 --- a/Task Routine Tracker Plus.xcodeproj/xcshareddata/xcschemes/Task Routine Tracker Plus.xcscheme +++ b/Task Routine Tracker Plus.xcodeproj/xcshareddata/xcschemes/Task Routine Tracker Plus.xcscheme @@ -1,6 +1,6 @@ Date: Sun, 9 Apr 2023 19:17:01 -0600 Subject: [PATCH 2/9] ongoing --- Sources/App.entitlements | 4 + .../project.pbxproj | 189 +++++++++++++++++- .../AccentColor.colorset/Contents.json | 11 + .../AppIcon.appiconset/Contents.json | 13 ++ WidgetTRT/Assets.xcassets/Contents.json | 6 + .../WidgetBackground.colorset/Contents.json | 11 + WidgetTRT/Info.plist | 11 + WidgetTRT/WidgetTRT.swift | 66 ++++++ WidgetTRT/WidgetTRTBundle.swift | 16 ++ WidgetTRTExtension.entitlements | 10 + 10 files changed, 336 insertions(+), 1 deletion(-) create mode 100644 WidgetTRT/Assets.xcassets/AccentColor.colorset/Contents.json create mode 100644 WidgetTRT/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 WidgetTRT/Assets.xcassets/Contents.json create mode 100644 WidgetTRT/Assets.xcassets/WidgetBackground.colorset/Contents.json create mode 100644 WidgetTRT/Info.plist create mode 100644 WidgetTRT/WidgetTRT.swift create mode 100644 WidgetTRT/WidgetTRTBundle.swift create mode 100644 WidgetTRTExtension.entitlements diff --git a/Sources/App.entitlements b/Sources/App.entitlements index 4df6175..31d130e 100644 --- a/Sources/App.entitlements +++ b/Sources/App.entitlements @@ -13,5 +13,9 @@ CloudKit + com.apple.security.application-groups + + group.org.openalloc.trout + diff --git a/Task Routine Tracker Plus.xcodeproj/project.pbxproj b/Task Routine Tracker Plus.xcodeproj/project.pbxproj index 02ced50..9937967 100644 --- a/Task Routine Tracker Plus.xcodeproj/project.pbxproj +++ b/Task Routine Tracker Plus.xcodeproj/project.pbxproj @@ -7,6 +7,12 @@ objects = { /* Begin PBXBuildFile section */ + 4004527729E399D200B0D7B2 /* WidgetKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4004527629E399D200B0D7B2 /* WidgetKit.framework */; }; + 4004527929E399D200B0D7B2 /* SwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4004527829E399D200B0D7B2 /* SwiftUI.framework */; }; + 4004527C29E399D200B0D7B2 /* WidgetTRTBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4004527B29E399D200B0D7B2 /* WidgetTRTBundle.swift */; }; + 4004527E29E399D200B0D7B2 /* WidgetTRT.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4004527D29E399D200B0D7B2 /* WidgetTRT.swift */; }; + 4004528029E399D300B0D7B2 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4004527F29E399D300B0D7B2 /* Assets.xcassets */; }; + 4004528429E399D300B0D7B2 /* WidgetTRTExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 4004527529E399D200B0D7B2 /* WidgetTRTExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 4011EECD2961C9B000A36D87 /* LICENSE in Resources */ = {isa = PBXBuildFile; fileRef = 4011EECC2961C9B000A36D87 /* LICENSE */; }; 402A5F2F296B7FE000A43DB3 /* HistoryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 402A5F2E296B7F7B00A43DB3 /* HistoryView.swift */; }; 402A5F32296B835B00A43DB3 /* Tabler in Frameworks */ = {isa = PBXBuildFile; productRef = 402A5F31296B835B00A43DB3 /* Tabler */; }; @@ -28,7 +34,39 @@ 40EBE1CC29635306004B9189 /* TroutUI in Frameworks */ = {isa = PBXBuildFile; productRef = 40EBE1CB29635306004B9189 /* TroutUI */; }; /* End PBXBuildFile section */ +/* Begin PBXContainerItemProxy section */ + 4004528229E399D300B0D7B2 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 40E347B229452CF0003A19B9 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 4004527429E399D200B0D7B2; + remoteInfo = WidgetTRTExtension; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 4004528529E399D300B0D7B2 /* Embed Foundation Extensions */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 13; + files = ( + 4004528429E399D300B0D7B2 /* WidgetTRTExtension.appex in Embed Foundation Extensions */, + ); + name = "Embed Foundation Extensions"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + /* Begin PBXFileReference section */ + 4004527529E399D200B0D7B2 /* WidgetTRTExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = WidgetTRTExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; }; + 4004527629E399D200B0D7B2 /* WidgetKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WidgetKit.framework; path = System/Library/Frameworks/WidgetKit.framework; sourceTree = SDKROOT; }; + 4004527829E399D200B0D7B2 /* SwiftUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftUI.framework; path = System/Library/Frameworks/SwiftUI.framework; sourceTree = SDKROOT; }; + 4004527B29E399D200B0D7B2 /* WidgetTRTBundle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WidgetTRTBundle.swift; sourceTree = ""; }; + 4004527D29E399D200B0D7B2 /* WidgetTRT.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WidgetTRT.swift; sourceTree = ""; }; + 4004527F29E399D300B0D7B2 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 4004528129E399D300B0D7B2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 4004529F29E39A7C00B0D7B2 /* WidgetTRTExtension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = WidgetTRTExtension.entitlements; sourceTree = ""; }; 4011EECC2961C9B000A36D87 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; 4011EECE2961C9BC00A36D87 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; 402A5F2E296B7F7B00A43DB3 /* HistoryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HistoryView.swift; sourceTree = ""; }; @@ -49,6 +87,15 @@ /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + 4004527229E399D200B0D7B2 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4004527929E399D200B0D7B2 /* SwiftUI.framework in Frameworks */, + 4004527729E399D200B0D7B2 /* WidgetKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 40E347B729452CF1003A19B9 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -65,6 +112,17 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 4004527A29E399D200B0D7B2 /* WidgetTRT */ = { + isa = PBXGroup; + children = ( + 4004527B29E399D200B0D7B2 /* WidgetTRTBundle.swift */, + 4004527D29E399D200B0D7B2 /* WidgetTRT.swift */, + 4004527F29E399D300B0D7B2 /* Assets.xcassets */, + 4004528129E399D300B0D7B2 /* Info.plist */, + ); + path = WidgetTRT; + sourceTree = ""; + }; 401064DB2973378C00BFB00E /* Views */ = { isa = PBXGroup; children = ( @@ -84,6 +142,8 @@ 40B51E41294549D90047377A /* Frameworks */ = { isa = PBXGroup; children = ( + 4004527629E399D200B0D7B2 /* WidgetKit.framework */, + 4004527829E399D200B0D7B2 /* SwiftUI.framework */, ); name = Frameworks; sourceTree = ""; @@ -91,9 +151,11 @@ 40E347B129452CF0003A19B9 = { isa = PBXGroup; children = ( + 4004529F29E39A7C00B0D7B2 /* WidgetTRTExtension.entitlements */, 4011EECC2961C9B000A36D87 /* LICENSE */, 4011EECE2961C9BC00A36D87 /* README.md */, 40E347BC29452CF1003A19B9 /* Sources */, + 4004527A29E399D200B0D7B2 /* WidgetTRT */, 40E347BB29452CF1003A19B9 /* Products */, 40B51E41294549D90047377A /* Frameworks */, ); @@ -103,6 +165,7 @@ isa = PBXGroup; children = ( 40E347BA29452CF1003A19B9 /* Task Routine Tracker Plus.app */, + 4004527529E399D200B0D7B2 /* WidgetTRTExtension.appex */, ); name = Products; sourceTree = ""; @@ -131,6 +194,23 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ + 4004527429E399D200B0D7B2 /* WidgetTRTExtension */ = { + isa = PBXNativeTarget; + buildConfigurationList = 4004528829E399D300B0D7B2 /* Build configuration list for PBXNativeTarget "WidgetTRTExtension" */; + buildPhases = ( + 4004527129E399D200B0D7B2 /* Sources */, + 4004527229E399D200B0D7B2 /* Frameworks */, + 4004527329E399D200B0D7B2 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = WidgetTRTExtension; + productName = WidgetTRTExtension; + productReference = 4004527529E399D200B0D7B2 /* WidgetTRTExtension.appex */; + productType = "com.apple.product-type.app-extension"; + }; 40E347B929452CF1003A19B9 /* Task Routine Tracker Plus */ = { isa = PBXNativeTarget; buildConfigurationList = 40E347C929452CF1003A19B9 /* Build configuration list for PBXNativeTarget "Task Routine Tracker Plus" */; @@ -138,10 +218,12 @@ 40E347B629452CF1003A19B9 /* Sources */, 40E347B729452CF1003A19B9 /* Frameworks */, 40E347B829452CF1003A19B9 /* Resources */, + 4004528529E399D300B0D7B2 /* Embed Foundation Extensions */, ); buildRules = ( ); dependencies = ( + 4004528329E399D300B0D7B2 /* PBXTargetDependency */, ); name = "Task Routine Tracker Plus"; packageProductDependencies = ( @@ -163,9 +245,12 @@ isa = PBXProject; attributes = { BuildIndependentTargetsInParallel = 1; - LastSwiftUpdateCheck = 1410; + LastSwiftUpdateCheck = 1430; LastUpgradeCheck = 1420; TargetAttributes = { + 4004527429E399D200B0D7B2 = { + CreatedOnToolsVersion = 14.3; + }; 40E347B929452CF1003A19B9 = { CreatedOnToolsVersion = 14.1; }; @@ -191,11 +276,20 @@ projectRoot = ""; targets = ( 40E347B929452CF1003A19B9 /* Task Routine Tracker Plus */, + 4004527429E399D200B0D7B2 /* WidgetTRTExtension */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ + 4004527329E399D200B0D7B2 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4004528029E399D300B0D7B2 /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 40E347B829452CF1003A19B9 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -209,6 +303,15 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ + 4004527129E399D200B0D7B2 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4004527E29E399D200B0D7B2 /* WidgetTRT.swift in Sources */, + 4004527C29E399D200B0D7B2 /* WidgetTRTBundle.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 40E347B629452CF1003A19B9 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -228,7 +331,80 @@ }; /* End PBXSourcesBuildPhase section */ +/* Begin PBXTargetDependency section */ + 4004528329E399D300B0D7B2 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 4004527429E399D200B0D7B2 /* WidgetTRTExtension */; + targetProxy = 4004528229E399D300B0D7B2 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + /* Begin XCBuildConfiguration section */ + 4004528629E399D300B0D7B2 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = WidgetBackground; + CODE_SIGN_ENTITLEMENTS = WidgetTRTExtension.entitlements; + CODE_SIGN_IDENTITY = "-"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Development"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = J735QC5U38; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = WidgetTRT/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = WidgetTRT; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + IPHONEOS_DEPLOYMENT_TARGET = 16.4; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = org.openalloc.trout.plus.WidgetTRT; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 4004528729E399D300B0D7B2 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = WidgetBackground; + CODE_SIGN_ENTITLEMENTS = WidgetTRTExtension.entitlements; + CODE_SIGN_IDENTITY = "-"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Development"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = J735QC5U38; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = WidgetTRT/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = WidgetTRT; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + IPHONEOS_DEPLOYMENT_TARGET = 16.4; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = org.openalloc.trout.plus.WidgetTRT; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; 40E347C729452CF1003A19B9 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -343,6 +519,7 @@ 40E347CA29452CF1003A19B9 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_ENTITLEMENTS = Sources/App.entitlements; @@ -389,6 +566,7 @@ 40E347CB29452CF1003A19B9 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_ENTITLEMENTS = Sources/App.entitlements; @@ -435,6 +613,15 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + 4004528829E399D300B0D7B2 /* Build configuration list for PBXNativeTarget "WidgetTRTExtension" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4004528629E399D300B0D7B2 /* Debug */, + 4004528729E399D300B0D7B2 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; 40E347B529452CF0003A19B9 /* Build configuration list for PBXProject "Task Routine Tracker Plus" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/WidgetTRT/Assets.xcassets/AccentColor.colorset/Contents.json b/WidgetTRT/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/WidgetTRT/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/WidgetTRT/Assets.xcassets/AppIcon.appiconset/Contents.json b/WidgetTRT/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/WidgetTRT/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/WidgetTRT/Assets.xcassets/Contents.json b/WidgetTRT/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/WidgetTRT/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/WidgetTRT/Assets.xcassets/WidgetBackground.colorset/Contents.json b/WidgetTRT/Assets.xcassets/WidgetBackground.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/WidgetTRT/Assets.xcassets/WidgetBackground.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/WidgetTRT/Info.plist b/WidgetTRT/Info.plist new file mode 100644 index 0000000..0f118fb --- /dev/null +++ b/WidgetTRT/Info.plist @@ -0,0 +1,11 @@ + + + + + NSExtension + + NSExtensionPointIdentifier + com.apple.widgetkit-extension + + + diff --git a/WidgetTRT/WidgetTRT.swift b/WidgetTRT/WidgetTRT.swift new file mode 100644 index 0000000..329b774 --- /dev/null +++ b/WidgetTRT/WidgetTRT.swift @@ -0,0 +1,66 @@ +// +// WidgetTRT.swift +// WidgetTRT +// +// Created by Reed Esau on 4/9/23. +// + +import WidgetKit +import SwiftUI + +struct Provider: TimelineProvider { + func placeholder(in context: Context) -> SimpleEntry { + SimpleEntry(date: Date()) + } + + func getSnapshot(in context: Context, completion: @escaping (SimpleEntry) -> ()) { + let entry = SimpleEntry(date: Date()) + completion(entry) + } + + func getTimeline(in context: Context, completion: @escaping (Timeline) -> ()) { + var entries: [SimpleEntry] = [] + + // Generate a timeline consisting of five entries an hour apart, starting from the current date. + let currentDate = Date() + for hourOffset in 0 ..< 5 { + let entryDate = Calendar.current.date(byAdding: .hour, value: hourOffset, to: currentDate)! + let entry = SimpleEntry(date: entryDate) + entries.append(entry) + } + + let timeline = Timeline(entries: entries, policy: .atEnd) + completion(timeline) + } +} + +struct SimpleEntry: TimelineEntry { + let date: Date +} + +struct WidgetTRTEntryView : View { + var entry: Provider.Entry + + var body: some View { + Text(entry.date, style: .time) + } +} + +struct WidgetTRT: Widget { + let kind: String = "WidgetTRT" + + var body: some WidgetConfiguration { + StaticConfiguration(kind: kind, provider: Provider()) { entry in + WidgetTRTEntryView(entry: entry) + } + .configurationDisplayName("My Widget") + .description("This is an example widget.") + } +} + +struct WidgetTRT_Previews: PreviewProvider { + static var previews: some View { + WidgetTRTEntryView(entry: SimpleEntry(date: Date())) + .previewContext(WidgetPreviewContext(family: .systemSmall)) + } +} diff --git a/WidgetTRT/WidgetTRTBundle.swift b/WidgetTRT/WidgetTRTBundle.swift new file mode 100644 index 0000000..f336d3e --- /dev/null +++ b/WidgetTRT/WidgetTRTBundle.swift @@ -0,0 +1,16 @@ +// +// WidgetTRTBundle.swift +// WidgetTRT +// +// Created by Reed Esau on 4/9/23. +// + +import WidgetKit +import SwiftUI + +@main +struct WidgetTRTBundle: WidgetBundle { + var body: some Widget { + WidgetTRT() + } +} diff --git a/WidgetTRTExtension.entitlements b/WidgetTRTExtension.entitlements new file mode 100644 index 0000000..a78ae4e --- /dev/null +++ b/WidgetTRTExtension.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.security.application-groups + + group.org.openalloc.trout + + + From cb43fc51296424d71db71d4c7c74b277ff4f6de6 Mon Sep 17 00:00:00 2001 From: Reed Es Date: Sun, 9 Apr 2023 19:43:17 -0600 Subject: [PATCH 3/9] ongoing --- .../project.pbxproj | 9 +++ WidgetTRT/WidgetTRT.swift | 58 +++++-------------- WidgetTRT/WidgetTRTBundle.swift | 2 +- 3 files changed, 24 insertions(+), 45 deletions(-) diff --git a/Task Routine Tracker Plus.xcodeproj/project.pbxproj b/Task Routine Tracker Plus.xcodeproj/project.pbxproj index 9937967..24b40ef 100644 --- a/Task Routine Tracker Plus.xcodeproj/project.pbxproj +++ b/Task Routine Tracker Plus.xcodeproj/project.pbxproj @@ -13,6 +13,7 @@ 4004527E29E399D200B0D7B2 /* WidgetTRT.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4004527D29E399D200B0D7B2 /* WidgetTRT.swift */; }; 4004528029E399D300B0D7B2 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4004527F29E399D300B0D7B2 /* Assets.xcassets */; }; 4004528429E399D300B0D7B2 /* WidgetTRTExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 4004527529E399D200B0D7B2 /* WidgetTRTExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + 400452A429E39C7C00B0D7B2 /* TroutUI in Frameworks */ = {isa = PBXBuildFile; productRef = 400452A329E39C7C00B0D7B2 /* TroutUI */; }; 4011EECD2961C9B000A36D87 /* LICENSE in Resources */ = {isa = PBXBuildFile; fileRef = 4011EECC2961C9B000A36D87 /* LICENSE */; }; 402A5F2F296B7FE000A43DB3 /* HistoryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 402A5F2E296B7F7B00A43DB3 /* HistoryView.swift */; }; 402A5F32296B835B00A43DB3 /* Tabler in Frameworks */ = {isa = PBXBuildFile; productRef = 402A5F31296B835B00A43DB3 /* Tabler */; }; @@ -91,6 +92,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 400452A429E39C7C00B0D7B2 /* TroutUI in Frameworks */, 4004527929E399D200B0D7B2 /* SwiftUI.framework in Frameworks */, 4004527729E399D200B0D7B2 /* WidgetKit.framework in Frameworks */, ); @@ -207,6 +209,9 @@ dependencies = ( ); name = WidgetTRTExtension; + packageProductDependencies = ( + 400452A329E39C7C00B0D7B2 /* TroutUI */, + ); productName = WidgetTRTExtension; productReference = 4004527529E399D200B0D7B2 /* WidgetTRTExtension.appex */; productType = "com.apple.product-type.app-extension"; @@ -678,6 +683,10 @@ /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ + 400452A329E39C7C00B0D7B2 /* TroutUI */ = { + isa = XCSwiftPackageProductDependency; + productName = TroutUI; + }; 402A5F31296B835B00A43DB3 /* Tabler */ = { isa = XCSwiftPackageProductDependency; package = 402A5F30296B835B00A43DB3 /* XCRemoteSwiftPackageReference "SwiftTabler" */; diff --git a/WidgetTRT/WidgetTRT.swift b/WidgetTRT/WidgetTRT.swift index 329b774..2c8f330 100644 --- a/WidgetTRT/WidgetTRT.swift +++ b/WidgetTRT/WidgetTRT.swift @@ -1,66 +1,36 @@ // // WidgetTRT.swift -// WidgetTRT // -// Created by Reed Esau on 4/9/23. +// Copyright 2023 OpenAlloc LLC +// +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. // -import WidgetKit import SwiftUI +import WidgetKit -struct Provider: TimelineProvider { - func placeholder(in context: Context) -> SimpleEntry { - SimpleEntry(date: Date()) - } - - func getSnapshot(in context: Context, completion: @escaping (SimpleEntry) -> ()) { - let entry = SimpleEntry(date: Date()) - completion(entry) - } - - func getTimeline(in context: Context, completion: @escaping (Timeline) -> ()) { - var entries: [SimpleEntry] = [] - - // Generate a timeline consisting of five entries an hour apart, starting from the current date. - let currentDate = Date() - for hourOffset in 0 ..< 5 { - let entryDate = Calendar.current.date(byAdding: .hour, value: hourOffset, to: currentDate)! - let entry = SimpleEntry(date: entryDate) - entries.append(entry) - } - - let timeline = Timeline(entries: entries, policy: .atEnd) - completion(timeline) - } -} - -struct SimpleEntry: TimelineEntry { - let date: Date -} - -struct WidgetTRTEntryView : View { - var entry: Provider.Entry - - var body: some View { - Text(entry.date, style: .time) - } -} +import TroutLib +import TroutUI struct WidgetTRT: Widget { let kind: String = "WidgetTRT" var body: some WidgetConfiguration { StaticConfiguration(kind: kind, provider: Provider()) { entry in - WidgetTRTEntryView(entry: entry) + WidgetView(entry: entry) } - .configurationDisplayName("My Widget") - .description("This is an example widget.") + .configurationDisplayName("Task Routines") + .description("Time since last task routine.") } } struct WidgetTRT_Previews: PreviewProvider { static var previews: some View { - WidgetTRTEntryView(entry: SimpleEntry(date: Date())) + let entry = WidgetEntry(timeInterval: 1000) + return WidgetView(entry: entry) + .accentColor(.blue) .previewContext(WidgetPreviewContext(family: .systemSmall)) } } diff --git a/WidgetTRT/WidgetTRTBundle.swift b/WidgetTRT/WidgetTRTBundle.swift index f336d3e..320f7e8 100644 --- a/WidgetTRT/WidgetTRTBundle.swift +++ b/WidgetTRT/WidgetTRTBundle.swift @@ -5,8 +5,8 @@ // Created by Reed Esau on 4/9/23. // -import WidgetKit import SwiftUI +import WidgetKit @main struct WidgetTRTBundle: WidgetBundle { From ab0cc44e57baa661281c6b1edc5651c7e7d2fc8e Mon Sep 17 00:00:00 2001 From: Reed Es Date: Tue, 11 Apr 2023 12:10:31 -0600 Subject: [PATCH 4/9] ongoing --- Sources/Views/RoutineRunList.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Sources/Views/RoutineRunList.swift b/Sources/Views/RoutineRunList.swift index db551c8..96ded7f 100644 --- a/Sources/Views/RoutineRunList.swift +++ b/Sources/Views/RoutineRunList.swift @@ -170,6 +170,11 @@ struct MRoutineRunList: View { } try viewContext.save() + + // update the widget(s), if any + try WidgetEntry.refresh(viewContext, + reload: true, + defaultColor: .accentColor) } catch { logger.error("\(#function): \(error.localizedDescription)") } From 644aba2bb052235d84260c381ede8541aceca2df Mon Sep 17 00:00:00 2001 From: Reed Es Date: Fri, 14 Apr 2023 17:04:11 -0600 Subject: [PATCH 5/9] ongoing --- .../project.pbxproj | 144 +++++++++--------- WidgetTRT/WidgetTRTBundle.swift | 16 -- .../AccentColor.colorset/Contents.json | 0 .../AppIcon.appiconset/Contents.json | 0 .../Assets.xcassets/Contents.json | 0 .../WidgetBackground.colorset/Contents.json | 0 {WidgetTRT => WidgetTRTP}/Info.plist | 0 .../WidgetTRTP.swift | 8 +- WidgetTRTP/WidgetTRTPBundle.swift | 16 ++ ...ements => WidgetTRTPExtension.entitlements | 0 10 files changed, 92 insertions(+), 92 deletions(-) delete mode 100644 WidgetTRT/WidgetTRTBundle.swift rename {WidgetTRT => WidgetTRTP}/Assets.xcassets/AccentColor.colorset/Contents.json (100%) rename {WidgetTRT => WidgetTRTP}/Assets.xcassets/AppIcon.appiconset/Contents.json (100%) rename {WidgetTRT => WidgetTRTP}/Assets.xcassets/Contents.json (100%) rename {WidgetTRT => WidgetTRTP}/Assets.xcassets/WidgetBackground.colorset/Contents.json (100%) rename {WidgetTRT => WidgetTRTP}/Info.plist (100%) rename WidgetTRT/WidgetTRT.swift => WidgetTRTP/WidgetTRTP.swift (86%) create mode 100644 WidgetTRTP/WidgetTRTPBundle.swift rename WidgetTRTExtension.entitlements => WidgetTRTPExtension.entitlements (100%) diff --git a/Task Routine Tracker Plus.xcodeproj/project.pbxproj b/Task Routine Tracker Plus.xcodeproj/project.pbxproj index 24b40ef..f39ae4f 100644 --- a/Task Routine Tracker Plus.xcodeproj/project.pbxproj +++ b/Task Routine Tracker Plus.xcodeproj/project.pbxproj @@ -7,18 +7,18 @@ objects = { /* Begin PBXBuildFile section */ - 4004527729E399D200B0D7B2 /* WidgetKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4004527629E399D200B0D7B2 /* WidgetKit.framework */; }; - 4004527929E399D200B0D7B2 /* SwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4004527829E399D200B0D7B2 /* SwiftUI.framework */; }; - 4004527C29E399D200B0D7B2 /* WidgetTRTBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4004527B29E399D200B0D7B2 /* WidgetTRTBundle.swift */; }; - 4004527E29E399D200B0D7B2 /* WidgetTRT.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4004527D29E399D200B0D7B2 /* WidgetTRT.swift */; }; - 4004528029E399D300B0D7B2 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4004527F29E399D300B0D7B2 /* Assets.xcassets */; }; - 4004528429E399D300B0D7B2 /* WidgetTRTExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 4004527529E399D200B0D7B2 /* WidgetTRTExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; - 400452A429E39C7C00B0D7B2 /* TroutUI in Frameworks */ = {isa = PBXBuildFile; productRef = 400452A329E39C7C00B0D7B2 /* TroutUI */; }; 4011EECD2961C9B000A36D87 /* LICENSE in Resources */ = {isa = PBXBuildFile; fileRef = 4011EECC2961C9B000A36D87 /* LICENSE */; }; 402A5F2F296B7FE000A43DB3 /* HistoryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 402A5F2E296B7F7B00A43DB3 /* HistoryView.swift */; }; 402A5F32296B835B00A43DB3 /* Tabler in Frameworks */ = {isa = PBXBuildFile; productRef = 402A5F31296B835B00A43DB3 /* Tabler */; }; 403CA2CE2971F6660084785B /* ZIPFoundation in Frameworks */ = {isa = PBXBuildFile; productRef = 403CA2CD2971F6660084785B /* ZIPFoundation */; }; 403CA2D22972829F0084785B /* PlusSettingsForm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 403CA2D12972829F0084785B /* PlusSettingsForm.swift */; }; + 4057023E29EA127A00F92502 /* WidgetKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4004527629E399D200B0D7B2 /* WidgetKit.framework */; }; + 4057023F29EA127A00F92502 /* SwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4004527829E399D200B0D7B2 /* SwiftUI.framework */; }; + 4057024229EA127A00F92502 /* WidgetTRTPBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4057024129EA127A00F92502 /* WidgetTRTPBundle.swift */; }; + 4057024429EA127A00F92502 /* WidgetTRTP.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4057024329EA127A00F92502 /* WidgetTRTP.swift */; }; + 4057024629EA127A00F92502 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4057024529EA127A00F92502 /* Assets.xcassets */; }; + 4057024A29EA127A00F92502 /* WidgetTRTPExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 4057023D29EA127A00F92502 /* WidgetTRTPExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + 4057024F29EA128200F92502 /* TroutUI in Frameworks */ = {isa = PBXBuildFile; productRef = 4057024E29EA128200F92502 /* TroutUI */; }; 40879D6E29CC08B600D3C85F /* TaskRunList.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40879D6D29CC08B600D3C85F /* TaskRunList.swift */; }; 408FACFE296CAC9300D02C9C /* RoutineRunList.swift in Sources */ = {isa = PBXBuildFile; fileRef = 408FACFD296CABC400D02C9C /* RoutineRunList.swift */; }; 4094B3EE29C371E900670963 /* MainPortrait.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4094B3ED29C371E900670963 /* MainPortrait.swift */; }; @@ -36,12 +36,12 @@ /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 4004528229E399D300B0D7B2 /* PBXContainerItemProxy */ = { + 4057024829EA127A00F92502 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 40E347B229452CF0003A19B9 /* Project object */; proxyType = 1; - remoteGlobalIDString = 4004527429E399D200B0D7B2; - remoteInfo = WidgetTRTExtension; + remoteGlobalIDString = 4057023C29EA127A00F92502; + remoteInfo = WidgetTRTPExtension; }; /* End PBXContainerItemProxy section */ @@ -52,7 +52,7 @@ dstPath = ""; dstSubfolderSpec = 13; files = ( - 4004528429E399D300B0D7B2 /* WidgetTRTExtension.appex in Embed Foundation Extensions */, + 4057024A29EA127A00F92502 /* WidgetTRTPExtension.appex in Embed Foundation Extensions */, ); name = "Embed Foundation Extensions"; runOnlyForDeploymentPostprocessing = 0; @@ -60,18 +60,18 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 4004527529E399D200B0D7B2 /* WidgetTRTExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = WidgetTRTExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; }; 4004527629E399D200B0D7B2 /* WidgetKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WidgetKit.framework; path = System/Library/Frameworks/WidgetKit.framework; sourceTree = SDKROOT; }; 4004527829E399D200B0D7B2 /* SwiftUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftUI.framework; path = System/Library/Frameworks/SwiftUI.framework; sourceTree = SDKROOT; }; - 4004527B29E399D200B0D7B2 /* WidgetTRTBundle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WidgetTRTBundle.swift; sourceTree = ""; }; - 4004527D29E399D200B0D7B2 /* WidgetTRT.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WidgetTRT.swift; sourceTree = ""; }; - 4004527F29E399D300B0D7B2 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 4004528129E399D300B0D7B2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 4004529F29E39A7C00B0D7B2 /* WidgetTRTExtension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = WidgetTRTExtension.entitlements; sourceTree = ""; }; 4011EECC2961C9B000A36D87 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; 4011EECE2961C9BC00A36D87 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; 402A5F2E296B7F7B00A43DB3 /* HistoryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HistoryView.swift; sourceTree = ""; }; 403CA2D12972829F0084785B /* PlusSettingsForm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlusSettingsForm.swift; sourceTree = ""; }; + 4057023D29EA127A00F92502 /* WidgetTRTPExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = WidgetTRTPExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; }; + 4057024129EA127A00F92502 /* WidgetTRTPBundle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WidgetTRTPBundle.swift; sourceTree = ""; }; + 4057024329EA127A00F92502 /* WidgetTRTP.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WidgetTRTP.swift; sourceTree = ""; }; + 4057024529EA127A00F92502 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 4057024729EA127A00F92502 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 4057025029EA12A500F92502 /* WidgetTRTPExtension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = WidgetTRTPExtension.entitlements; sourceTree = ""; }; 40879D6D29CC08B600D3C85F /* TaskRunList.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TaskRunList.swift; sourceTree = ""; }; 408FACFD296CABC400D02C9C /* RoutineRunList.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoutineRunList.swift; sourceTree = ""; }; 4094B3ED29C371E900670963 /* MainPortrait.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainPortrait.swift; sourceTree = ""; }; @@ -88,13 +88,13 @@ /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 4004527229E399D200B0D7B2 /* Frameworks */ = { + 4057023A29EA127A00F92502 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 400452A429E39C7C00B0D7B2 /* TroutUI in Frameworks */, - 4004527929E399D200B0D7B2 /* SwiftUI.framework in Frameworks */, - 4004527729E399D200B0D7B2 /* WidgetKit.framework in Frameworks */, + 4057024F29EA128200F92502 /* TroutUI in Frameworks */, + 4057023F29EA127A00F92502 /* SwiftUI.framework in Frameworks */, + 4057023E29EA127A00F92502 /* WidgetKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -114,17 +114,6 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 4004527A29E399D200B0D7B2 /* WidgetTRT */ = { - isa = PBXGroup; - children = ( - 4004527B29E399D200B0D7B2 /* WidgetTRTBundle.swift */, - 4004527D29E399D200B0D7B2 /* WidgetTRT.swift */, - 4004527F29E399D300B0D7B2 /* Assets.xcassets */, - 4004528129E399D300B0D7B2 /* Info.plist */, - ); - path = WidgetTRT; - sourceTree = ""; - }; 401064DB2973378C00BFB00E /* Views */ = { isa = PBXGroup; children = ( @@ -141,6 +130,17 @@ path = Views; sourceTree = ""; }; + 4057024029EA127A00F92502 /* WidgetTRTP */ = { + isa = PBXGroup; + children = ( + 4057024129EA127A00F92502 /* WidgetTRTPBundle.swift */, + 4057024329EA127A00F92502 /* WidgetTRTP.swift */, + 4057024529EA127A00F92502 /* Assets.xcassets */, + 4057024729EA127A00F92502 /* Info.plist */, + ); + path = WidgetTRTP; + sourceTree = ""; + }; 40B51E41294549D90047377A /* Frameworks */ = { isa = PBXGroup; children = ( @@ -153,11 +153,11 @@ 40E347B129452CF0003A19B9 = { isa = PBXGroup; children = ( - 4004529F29E39A7C00B0D7B2 /* WidgetTRTExtension.entitlements */, + 4057025029EA12A500F92502 /* WidgetTRTPExtension.entitlements */, 4011EECC2961C9B000A36D87 /* LICENSE */, 4011EECE2961C9BC00A36D87 /* README.md */, 40E347BC29452CF1003A19B9 /* Sources */, - 4004527A29E399D200B0D7B2 /* WidgetTRT */, + 4057024029EA127A00F92502 /* WidgetTRTP */, 40E347BB29452CF1003A19B9 /* Products */, 40B51E41294549D90047377A /* Frameworks */, ); @@ -167,7 +167,7 @@ isa = PBXGroup; children = ( 40E347BA29452CF1003A19B9 /* Task Routine Tracker Plus.app */, - 4004527529E399D200B0D7B2 /* WidgetTRTExtension.appex */, + 4057023D29EA127A00F92502 /* WidgetTRTPExtension.appex */, ); name = Products; sourceTree = ""; @@ -196,24 +196,24 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - 4004527429E399D200B0D7B2 /* WidgetTRTExtension */ = { + 4057023C29EA127A00F92502 /* WidgetTRTPExtension */ = { isa = PBXNativeTarget; - buildConfigurationList = 4004528829E399D300B0D7B2 /* Build configuration list for PBXNativeTarget "WidgetTRTExtension" */; + buildConfigurationList = 4057024B29EA127A00F92502 /* Build configuration list for PBXNativeTarget "WidgetTRTPExtension" */; buildPhases = ( - 4004527129E399D200B0D7B2 /* Sources */, - 4004527229E399D200B0D7B2 /* Frameworks */, - 4004527329E399D200B0D7B2 /* Resources */, + 4057023929EA127A00F92502 /* Sources */, + 4057023A29EA127A00F92502 /* Frameworks */, + 4057023B29EA127A00F92502 /* Resources */, ); buildRules = ( ); dependencies = ( ); - name = WidgetTRTExtension; + name = WidgetTRTPExtension; packageProductDependencies = ( - 400452A329E39C7C00B0D7B2 /* TroutUI */, + 4057024E29EA128200F92502 /* TroutUI */, ); - productName = WidgetTRTExtension; - productReference = 4004527529E399D200B0D7B2 /* WidgetTRTExtension.appex */; + productName = WidgetTRTPExtension; + productReference = 4057023D29EA127A00F92502 /* WidgetTRTPExtension.appex */; productType = "com.apple.product-type.app-extension"; }; 40E347B929452CF1003A19B9 /* Task Routine Tracker Plus */ = { @@ -228,7 +228,7 @@ buildRules = ( ); dependencies = ( - 4004528329E399D300B0D7B2 /* PBXTargetDependency */, + 4057024929EA127A00F92502 /* PBXTargetDependency */, ); name = "Task Routine Tracker Plus"; packageProductDependencies = ( @@ -253,7 +253,7 @@ LastSwiftUpdateCheck = 1430; LastUpgradeCheck = 1420; TargetAttributes = { - 4004527429E399D200B0D7B2 = { + 4057023C29EA127A00F92502 = { CreatedOnToolsVersion = 14.3; }; 40E347B929452CF1003A19B9 = { @@ -281,17 +281,17 @@ projectRoot = ""; targets = ( 40E347B929452CF1003A19B9 /* Task Routine Tracker Plus */, - 4004527429E399D200B0D7B2 /* WidgetTRTExtension */, + 4057023C29EA127A00F92502 /* WidgetTRTPExtension */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ - 4004527329E399D200B0D7B2 /* Resources */ = { + 4057023B29EA127A00F92502 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 4004528029E399D300B0D7B2 /* Assets.xcassets in Resources */, + 4057024629EA127A00F92502 /* Assets.xcassets in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -308,12 +308,12 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ - 4004527129E399D200B0D7B2 /* Sources */ = { + 4057023929EA127A00F92502 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 4004527E29E399D200B0D7B2 /* WidgetTRT.swift in Sources */, - 4004527C29E399D200B0D7B2 /* WidgetTRTBundle.swift in Sources */, + 4057024229EA127A00F92502 /* WidgetTRTPBundle.swift in Sources */, + 4057024429EA127A00F92502 /* WidgetTRTP.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -337,28 +337,28 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 4004528329E399D300B0D7B2 /* PBXTargetDependency */ = { + 4057024929EA127A00F92502 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = 4004527429E399D200B0D7B2 /* WidgetTRTExtension */; - targetProxy = 4004528229E399D300B0D7B2 /* PBXContainerItemProxy */; + target = 4057023C29EA127A00F92502 /* WidgetTRTPExtension */; + targetProxy = 4057024829EA127A00F92502 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - 4004528629E399D300B0D7B2 /* Debug */ = { + 4057024C29EA127A00F92502 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = WidgetBackground; - CODE_SIGN_ENTITLEMENTS = WidgetTRTExtension.entitlements; + CODE_SIGN_ENTITLEMENTS = WidgetTRTPExtension.entitlements; CODE_SIGN_IDENTITY = "-"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = J735QC5U38; GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = WidgetTRT/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = WidgetTRT; + INFOPLIST_FILE = WidgetTRTP/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = WidgetTRTP; INFOPLIST_KEY_NSHumanReadableCopyright = ""; IPHONEOS_DEPLOYMENT_TARGET = 16.4; LD_RUNPATH_SEARCH_PATHS = ( @@ -367,7 +367,7 @@ "@executable_path/../../Frameworks", ); MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = org.openalloc.trout.plus.WidgetTRT; + PRODUCT_BUNDLE_IDENTIFIER = org.openalloc.trout.plus.WidgetTRTP; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; @@ -377,20 +377,20 @@ }; name = Debug; }; - 4004528729E399D300B0D7B2 /* Release */ = { + 4057024D29EA127A00F92502 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = WidgetBackground; - CODE_SIGN_ENTITLEMENTS = WidgetTRTExtension.entitlements; + CODE_SIGN_ENTITLEMENTS = WidgetTRTPExtension.entitlements; CODE_SIGN_IDENTITY = "-"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = J735QC5U38; GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = WidgetTRT/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = WidgetTRT; + INFOPLIST_FILE = WidgetTRTP/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = WidgetTRTP; INFOPLIST_KEY_NSHumanReadableCopyright = ""; IPHONEOS_DEPLOYMENT_TARGET = 16.4; LD_RUNPATH_SEARCH_PATHS = ( @@ -399,7 +399,7 @@ "@executable_path/../../Frameworks", ); MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = org.openalloc.trout.plus.WidgetTRT; + PRODUCT_BUNDLE_IDENTIFIER = org.openalloc.trout.plus.WidgetTRTP; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; @@ -618,11 +618,11 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 4004528829E399D300B0D7B2 /* Build configuration list for PBXNativeTarget "WidgetTRTExtension" */ = { + 4057024B29EA127A00F92502 /* Build configuration list for PBXNativeTarget "WidgetTRTPExtension" */ = { isa = XCConfigurationList; buildConfigurations = ( - 4004528629E399D300B0D7B2 /* Debug */, - 4004528729E399D300B0D7B2 /* Release */, + 4057024C29EA127A00F92502 /* Debug */, + 4057024D29EA127A00F92502 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -683,10 +683,6 @@ /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ - 400452A329E39C7C00B0D7B2 /* TroutUI */ = { - isa = XCSwiftPackageProductDependency; - productName = TroutUI; - }; 402A5F31296B835B00A43DB3 /* Tabler */ = { isa = XCSwiftPackageProductDependency; package = 402A5F30296B835B00A43DB3 /* XCRemoteSwiftPackageReference "SwiftTabler" */; @@ -697,6 +693,10 @@ package = 403CA2CC2971F6660084785B /* XCRemoteSwiftPackageReference "ZIPFoundation" */; productName = ZIPFoundation; }; + 4057024E29EA128200F92502 /* TroutUI */ = { + isa = XCSwiftPackageProductDependency; + productName = TroutUI; + }; 40B51E44294549DF0047377A /* TroutUI */ = { isa = XCSwiftPackageProductDependency; productName = TroutUI; diff --git a/WidgetTRT/WidgetTRTBundle.swift b/WidgetTRT/WidgetTRTBundle.swift deleted file mode 100644 index 320f7e8..0000000 --- a/WidgetTRT/WidgetTRTBundle.swift +++ /dev/null @@ -1,16 +0,0 @@ -// -// WidgetTRTBundle.swift -// WidgetTRT -// -// Created by Reed Esau on 4/9/23. -// - -import SwiftUI -import WidgetKit - -@main -struct WidgetTRTBundle: WidgetBundle { - var body: some Widget { - WidgetTRT() - } -} diff --git a/WidgetTRT/Assets.xcassets/AccentColor.colorset/Contents.json b/WidgetTRTP/Assets.xcassets/AccentColor.colorset/Contents.json similarity index 100% rename from WidgetTRT/Assets.xcassets/AccentColor.colorset/Contents.json rename to WidgetTRTP/Assets.xcassets/AccentColor.colorset/Contents.json diff --git a/WidgetTRT/Assets.xcassets/AppIcon.appiconset/Contents.json b/WidgetTRTP/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from WidgetTRT/Assets.xcassets/AppIcon.appiconset/Contents.json rename to WidgetTRTP/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/WidgetTRT/Assets.xcassets/Contents.json b/WidgetTRTP/Assets.xcassets/Contents.json similarity index 100% rename from WidgetTRT/Assets.xcassets/Contents.json rename to WidgetTRTP/Assets.xcassets/Contents.json diff --git a/WidgetTRT/Assets.xcassets/WidgetBackground.colorset/Contents.json b/WidgetTRTP/Assets.xcassets/WidgetBackground.colorset/Contents.json similarity index 100% rename from WidgetTRT/Assets.xcassets/WidgetBackground.colorset/Contents.json rename to WidgetTRTP/Assets.xcassets/WidgetBackground.colorset/Contents.json diff --git a/WidgetTRT/Info.plist b/WidgetTRTP/Info.plist similarity index 100% rename from WidgetTRT/Info.plist rename to WidgetTRTP/Info.plist diff --git a/WidgetTRT/WidgetTRT.swift b/WidgetTRTP/WidgetTRTP.swift similarity index 86% rename from WidgetTRT/WidgetTRT.swift rename to WidgetTRTP/WidgetTRTP.swift index 2c8f330..741e8d2 100644 --- a/WidgetTRT/WidgetTRT.swift +++ b/WidgetTRTP/WidgetTRTP.swift @@ -1,5 +1,5 @@ // -// WidgetTRT.swift +// WidgetTRTP.swift // // Copyright 2023 OpenAlloc LLC // @@ -14,8 +14,8 @@ import WidgetKit import TroutLib import TroutUI -struct WidgetTRT: Widget { - let kind: String = "WidgetTRT" +struct WidgetTRTP: Widget { + let kind: String = "WidgetTRTP" var body: some WidgetConfiguration { StaticConfiguration(kind: kind, provider: Provider()) { entry in @@ -26,7 +26,7 @@ struct WidgetTRT: Widget { } } -struct WidgetTRT_Previews: PreviewProvider { +struct WidgetTRTP_Previews: PreviewProvider { static var previews: some View { let entry = WidgetEntry(timeInterval: 1000) return WidgetView(entry: entry) diff --git a/WidgetTRTP/WidgetTRTPBundle.swift b/WidgetTRTP/WidgetTRTPBundle.swift new file mode 100644 index 0000000..24b6be6 --- /dev/null +++ b/WidgetTRTP/WidgetTRTPBundle.swift @@ -0,0 +1,16 @@ +// +// WidgetTRTPBundle.swift +// WidgetTRTP +// +// Created by Reed Esau on 4/14/23. +// + +import SwiftUI +import WidgetKit + +@main +struct WidgetTRTPBundle: WidgetBundle { + var body: some Widget { + WidgetTRTP() + } +} diff --git a/WidgetTRTExtension.entitlements b/WidgetTRTPExtension.entitlements similarity index 100% rename from WidgetTRTExtension.entitlements rename to WidgetTRTPExtension.entitlements From d42712595291357a5e8ccc60a840cd9a9dc809b7 Mon Sep 17 00:00:00 2001 From: Reed Es Date: Sat, 15 Apr 2023 17:24:38 -0600 Subject: [PATCH 6/9] ongoing --- WidgetTRTP/WidgetTRTP.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/WidgetTRTP/WidgetTRTP.swift b/WidgetTRTP/WidgetTRTP.swift index 741e8d2..00abf5d 100644 --- a/WidgetTRTP/WidgetTRTP.swift +++ b/WidgetTRTP/WidgetTRTP.swift @@ -23,6 +23,7 @@ struct WidgetTRTP: Widget { } .configurationDisplayName("Task Routines") .description("Time since last task routine.") + .supportedFamilies([.systemSmall]) } } From 93bd84a542a3792a3703597a8220044bbf32cfef Mon Sep 17 00:00:00 2001 From: Reed Es Date: Sun, 16 Apr 2023 23:37:14 -0600 Subject: [PATCH 7/9] ongoing --- WidgetTRTP/WidgetTRTP.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WidgetTRTP/WidgetTRTP.swift b/WidgetTRTP/WidgetTRTP.swift index 00abf5d..d812d32 100644 --- a/WidgetTRTP/WidgetTRTP.swift +++ b/WidgetTRTP/WidgetTRTP.swift @@ -29,7 +29,7 @@ struct WidgetTRTP: Widget { struct WidgetTRTP_Previews: PreviewProvider { static var previews: some View { - let entry = WidgetEntry(timeInterval: 1000) + let entry = WidgetEntry(name: "Travel", imageName: nil, timeInterval: 1000, color: nil) return WidgetView(entry: entry) .accentColor(.blue) .previewContext(WidgetPreviewContext(family: .systemSmall)) From 99381ccc0c67751e96c800e462da31edf6bd7d6b Mon Sep 17 00:00:00 2001 From: Reed Es Date: Sun, 16 Apr 2023 23:49:27 -0600 Subject: [PATCH 8/9] ongoing --- .../project.pbxproj | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Task Routine Tracker Plus.xcodeproj/project.pbxproj b/Task Routine Tracker Plus.xcodeproj/project.pbxproj index f39ae4f..e17a134 100644 --- a/Task Routine Tracker Plus.xcodeproj/project.pbxproj +++ b/Task Routine Tracker Plus.xcodeproj/project.pbxproj @@ -354,7 +354,7 @@ CODE_SIGN_IDENTITY = "-"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 3; DEVELOPMENT_TEAM = J735QC5U38; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = WidgetTRTP/Info.plist; @@ -366,7 +366,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.0; + MARKETING_VERSION = 1.1; PRODUCT_BUNDLE_IDENTIFIER = org.openalloc.trout.plus.WidgetTRTP; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; @@ -386,7 +386,7 @@ CODE_SIGN_IDENTITY = "-"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 3; DEVELOPMENT_TEAM = J735QC5U38; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = WidgetTRTP/Info.plist; @@ -398,7 +398,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.0; + MARKETING_VERSION = 1.1; PRODUCT_BUNDLE_IDENTIFIER = org.openalloc.trout.plus.WidgetTRTP; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; @@ -531,7 +531,7 @@ CODE_SIGN_IDENTITY = "-"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 2; + CURRENT_PROJECT_VERSION = 3; DEAD_CODE_STRIPPING = YES; DEVELOPMENT_ASSET_PATHS = "\"Sources/Preview Content\""; DEVELOPMENT_TEAM = J735QC5U38; @@ -555,7 +555,7 @@ LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 13.0; - MARKETING_VERSION = 1.0; + MARKETING_VERSION = 1.1; PRODUCT_BUNDLE_IDENTIFIER = org.openalloc.trout.plus; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = auto; @@ -578,7 +578,7 @@ CODE_SIGN_IDENTITY = "-"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 2; + CURRENT_PROJECT_VERSION = 3; DEAD_CODE_STRIPPING = YES; DEVELOPMENT_ASSET_PATHS = "\"Sources/Preview Content\""; DEVELOPMENT_TEAM = J735QC5U38; @@ -602,7 +602,7 @@ LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 13.0; - MARKETING_VERSION = 1.0; + MARKETING_VERSION = 1.1; PRODUCT_BUNDLE_IDENTIFIER = org.openalloc.trout.plus; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = auto; From d51cf90cc2ca50e9dd7bc72bf7fc5fa60e8de8e1 Mon Sep 17 00:00:00 2001 From: Reed Es Date: Mon, 17 Apr 2023 00:29:36 -0600 Subject: [PATCH 9/9] updated app store links --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 177bc9f..3bab510 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Task Routine Tracker+ -_A minimal & focused task tracker, for iPhone and iPad_ +_A minimal & focused task runner, for iPhone and iPad_ For full details, including free download links from the App Store, visit: