Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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:

Expand Down
4 changes: 4 additions & 0 deletions Sources/App.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,9 @@
<array>
<string>CloudKit</string>
</array>
<key>com.apple.security.application-groups</key>
<array>
<string>group.org.openalloc.trout</string>
</array>
</dict>
</plist>
5 changes: 5 additions & 0 deletions Sources/Views/RoutineRunList.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)")
}
Expand Down
206 changes: 201 additions & 5 deletions Task Routine Tracker Plus.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1420"
LastUpgradeVersion = "1430"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
11 changes: 11 additions & 0 deletions WidgetTRTP/Assets.xcassets/AccentColor.colorset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
13 changes: 13 additions & 0 deletions WidgetTRTP/Assets.xcassets/AppIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"images" : [
{
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
6 changes: 6 additions & 0 deletions WidgetTRTP/Assets.xcassets/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
11 changes: 11 additions & 0 deletions WidgetTRTP/Assets.xcassets/WidgetBackground.colorset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
11 changes: 11 additions & 0 deletions WidgetTRTP/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.widgetkit-extension</string>
</dict>
</dict>
</plist>
37 changes: 37 additions & 0 deletions WidgetTRTP/WidgetTRTP.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
//
// WidgetTRTP.swift
//
// 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 SwiftUI
import WidgetKit

import TroutLib
import TroutUI

struct WidgetTRTP: Widget {
let kind: String = "WidgetTRTP"

var body: some WidgetConfiguration {
StaticConfiguration(kind: kind, provider: Provider()) { entry in
WidgetView(entry: entry)
}
.configurationDisplayName("Task Routines")
.description("Time since last task routine.")
.supportedFamilies([.systemSmall])
}
}

struct WidgetTRTP_Previews: PreviewProvider {
static var previews: some View {
let entry = WidgetEntry(name: "Travel", imageName: nil, timeInterval: 1000, color: nil)
return WidgetView(entry: entry)
.accentColor(.blue)
.previewContext(WidgetPreviewContext(family: .systemSmall))
}
}
16 changes: 16 additions & 0 deletions WidgetTRTP/WidgetTRTPBundle.swift
Original file line number Diff line number Diff line change
@@ -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()
}
}
10 changes: 10 additions & 0 deletions WidgetTRTPExtension.entitlements
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.application-groups</key>
<array>
<string>group.org.openalloc.trout</string>
</array>
</dict>
</plist>