Skip to content
Open
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
26 changes: 15 additions & 11 deletions LoopFollow.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,21 @@
exceptions = (
D736FE5E8494B2581A4EA95F /* Exceptions for "LoopFollow" folder in "LoopFollow" target */,
);
explicitFileTypes = {
};
explicitFolders = (
);
path = LoopFollow;
sourceTree = "<group>";
};
BC0FBFD3754955D028EF6631 /* Shared */ = {
isa = PBXFileSystemSynchronizedRootGroup;
exceptions = (
);
explicitFileTypes = {
};
explicitFolders = (
);
path = Shared;
sourceTree = "<group>";
};
Expand Down Expand Up @@ -258,8 +266,8 @@
isa = PBXNativeTarget;
buildConfigurationList = FC97882D2485969C00A7906C /* Build configuration list for PBXNativeTarget "LoopFollow" */;
buildPhases = (
DD7F4BEA2DD48B9600D449E9 /* Swiftformat */,
B038D39450A1F9A97D2B8BA4 /* [CP] Check Pods Manifest.lock */,
DD7F4BEA2DD48B9600D449E9 /* Swiftformat */,
FC9788102485969B00A7906C /* Sources */,
FC9788112485969B00A7906C /* Frameworks */,
FC9788122485969B00A7906C /* Resources */,
Expand Down Expand Up @@ -366,14 +374,10 @@
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-LoopFollow/Pods-LoopFollow-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
inputPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-LoopFollow/Pods-LoopFollow-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-LoopFollow/Pods-LoopFollow-frameworks.sh\"\n";
Expand Down Expand Up @@ -490,7 +494,7 @@
CODE_SIGN_ENTITLEMENTS = LoopFollowLAExtensionExtension.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = "$(LF_DEVELOPMENT_TEAM)";
DEVELOPMENT_TEAM = 4MFAGT7CVA;
ENABLE_APP_SANDBOX = NO;
ENABLE_HARDENED_RUNTIME = NO;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
Expand Down Expand Up @@ -542,7 +546,7 @@
CODE_SIGN_ENTITLEMENTS = LoopFollowLAExtensionExtension.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = "$(LF_DEVELOPMENT_TEAM)";
DEVELOPMENT_TEAM = 4MFAGT7CVA;
ENABLE_APP_SANDBOX = NO;
ENABLE_HARDENED_RUNTIME = NO;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
Expand Down Expand Up @@ -591,7 +595,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = "$(LF_DEVELOPMENT_TEAM)";
DEVELOPMENT_TEAM = 4MFAGT7CVA;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand Down Expand Up @@ -622,7 +626,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = "$(LF_DEVELOPMENT_TEAM)";
DEVELOPMENT_TEAM = 4MFAGT7CVA;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand Down Expand Up @@ -772,7 +776,7 @@
CODE_SIGN_ENTITLEMENTS = "LoopFollow/Loop Follow.entitlements";
CODE_SIGN_STYLE = Automatic;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "$(LF_DEVELOPMENT_TEAM)";
DEVELOPMENT_TEAM = 4MFAGT7CVA;
INFOPLIST_FILE = LoopFollow/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 18.0;
LD_RUNPATH_SEARCH_PATHS = (
Expand All @@ -797,7 +801,7 @@
CODE_SIGN_ENTITLEMENTS = "LoopFollow/Loop Follow.entitlements";
CODE_SIGN_STYLE = Automatic;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "$(LF_DEVELOPMENT_TEAM)";
DEVELOPMENT_TEAM = 4MFAGT7CVA;
INFOPLIST_FILE = LoopFollow/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 18.0;
LD_RUNPATH_SEARCH_PATHS = (
Expand Down
24 changes: 24 additions & 0 deletions LoopFollow/Controllers/SpeakBGIntents.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// LoopFollow
// SpeakBGIntents.swift

import AppIntents

struct EnableSpeakBGIntent: AppIntent {
static var title: LocalizedStringResource = "Enable BG Speech"
static var description = IntentDescription("Turns on spoken glucose readings in LoopFollow.")

func perform() async throws -> some IntentResult & ProvidesDialog {
Storage.shared.speakBG.value = true
return .result(dialog: "BG speech enabled.")
}
}

struct DisableSpeakBGIntent: AppIntent {
static var title: LocalizedStringResource = "Disable BG Speech"
static var description = IntentDescription("Turns off spoken glucose readings in LoopFollow.")

func perform() async throws -> some IntentResult & ProvidesDialog {
Storage.shared.speakBG.value = false
return .result(dialog: "BG speech disabled.")
}
}
14 changes: 13 additions & 1 deletion LoopFollow/LiveActivity/RestartLiveActivityIntent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,26 @@
}
}

struct LoopFollowAppShortcuts: AppShortcutsProvider {
struct LoopFollowAppShortcuts: AppShortcutsProvider {
static var appShortcuts: [AppShortcut] {
AppShortcut(
intent: RestartLiveActivityIntent(),
phrases: ["Restart Live Activity in \(.applicationName)"],
shortTitle: "Restart Live Activity",
systemImageName: "dot.radiowaves.left.and.right"
)
AppShortcut(
intent: EnableSpeakBGIntent(),
phrases: ["Enable BG speech in \(.applicationName)"],
shortTitle: "Enable BG Speech",
systemImageName: "speaker.wave.2"
)
AppShortcut(
intent: DisableSpeakBGIntent(),
phrases: ["Disable BG speech in \(.applicationName)"],
shortTitle: "Disable BG Speech",
systemImageName: "speaker.slash"
)
}
}
#endif