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: 2 additions & 0 deletions ios/ScreencapMobile/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
<string>Screencap uses the camera to scan the pairing QR code from your Mac when you connect your iPhone companion app.</string>
<key>NSLocalNetworkUsageDescription</key>
<string>Screencap connects to your paired Mac over the local network to refresh Day Wrapped data for the iPhone app and widget.</string>
<key>ScreencapSharedKeychainAccessGroup</key>
<string>$(AppIdentifierPrefix)app.screencap.mobile.shared</string>
<key>UIBackgroundModes</key>
<array>
<string>fetch</string>
Expand Down
9 changes: 9 additions & 0 deletions ios/ScreencapMobile/Sources/AppModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -893,6 +893,15 @@ final class AppModel: ObservableObject {
uploadStatus = "Debug sample snapshot"
errorMessage = nil
infoMessage = nil
try? AppGroupStore.saveSnapshot(demoSnapshot)
AppGroupStore.saveUploadStatus(
dayStartMs: demoSnapshot.dayStartMs,
message: "Debug sample snapshot"
)
AppGroupStore.saveWidgetSelectedDayStartMs(demoSnapshot.dayStartMs)
AppGroupStore.saveWidgetMode(.categories)
AppGroupStore.saveWidgetSourceFilter(.both)
WidgetCenter.shared.reloadAllTimelines()
}
#endif
}
2 changes: 2 additions & 0 deletions ios/ScreencapMobileReport/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>ScreencapSharedKeychainAccessGroup</key>
<string>$(AppIdentifierPrefix)app.screencap.mobile.shared</string>
<key>EXAppExtensionAttributes</key>
<dict>
<key>EXExtensionPointIdentifier</key>
Expand Down
2 changes: 2 additions & 0 deletions ios/ScreencapMobileWidget/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>ScreencapSharedKeychainAccessGroup</key>
<string>$(AppIdentifierPrefix)app.screencap.mobile.shared</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>
Expand Down
11 changes: 11 additions & 0 deletions ios/ScreencapMobileWidget/Sources/CycleWidgetModeIntent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,14 @@ struct CycleWidgetModeIntent: AppIntent {
return .result()
}
}

struct CycleWidgetSourceFilterIntent: AppIntent {
static var title: LocalizedStringResource = "Cycle Day Wrapped Source Filter"

func perform() async throws -> some IntentResult {
let nextFilter = AppGroupStore.loadWidgetSourceFilter().nextWidgetSourceFilter
AppGroupStore.saveWidgetSourceFilter(nextFilter)
WidgetCenter.shared.reloadTimelines(ofKind: "ScreencapMobileWidget")
return .result()
}
}
Loading
Loading