diff --git a/TemplateApplication.xcodeproj/project.pbxproj b/TemplateApplication.xcodeproj/project.pbxproj index 7f88aa7a..33d08fe6 100644 --- a/TemplateApplication.xcodeproj/project.pbxproj +++ b/TemplateApplication.xcodeproj/project.pbxproj @@ -53,6 +53,11 @@ 5680DD3E2AB8CD84004E6D4A /* ContributionsTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5680DD3D2AB8CD84004E6D4A /* ContributionsTest.swift */; }; 56E708352BB06B7100B08F0A /* SpeziLicense in Frameworks */ = {isa = PBXBuildFile; productRef = 56E708342BB06B7100B08F0A /* SpeziLicense */; }; 56E7083B2BB06F6F00B08F0A /* SwiftPackageList in Frameworks */ = {isa = PBXBuildFile; productRef = 56E7083A2BB06F6F00B08F0A /* SwiftPackageList */; }; + 63E851782CE0FFCB005554E7 /* OSLogEntryLog+FormattedLogOutput.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63E851772CE0FFC5005554E7 /* OSLogEntryLog+FormattedLogOutput.swift */; }; + 63E8517A2CE0FFDE005554E7 /* LogLevel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63E851792CE0FFDC005554E7 /* LogLevel.swift */; }; + 63E8517C2CE0FFF9005554E7 /* LogManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63E8517B2CE0FFF6005554E7 /* LogManager.swift */; }; + 63E8517E2CE10007005554E7 /* LogViewer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63E8517D2CE10005005554E7 /* LogViewer.swift */; }; + 63E851802CE10016005554E7 /* LogsListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63E8517F2CE10014005554E7 /* LogsListView.swift */; }; 653A2551283387FE005D4D48 /* TemplateApplication.swift in Sources */ = {isa = PBXBuildFile; fileRef = 653A2550283387FE005D4D48 /* TemplateApplication.swift */; }; 653A255528338800005D4D48 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 653A255428338800005D4D48 /* Assets.xcassets */; }; 653A256228338800005D4D48 /* TemplateApplicationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 653A256128338800005D4D48 /* TemplateApplicationTests.swift */; }; @@ -118,6 +123,11 @@ 2FE5DCAC29EE6107004B9AB4 /* AccountOnboarding.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AccountOnboarding.swift; sourceTree = ""; }; 2FF53D8C2A8729D600042B76 /* TemplateApplicationStandard.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TemplateApplicationStandard.swift; sourceTree = ""; }; 5680DD3D2AB8CD84004E6D4A /* ContributionsTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContributionsTest.swift; sourceTree = ""; }; + 63E851772CE0FFC5005554E7 /* OSLogEntryLog+FormattedLogOutput.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "OSLogEntryLog+FormattedLogOutput.swift"; sourceTree = ""; }; + 63E851792CE0FFDC005554E7 /* LogLevel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogLevel.swift; sourceTree = ""; }; + 63E8517B2CE0FFF6005554E7 /* LogManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogManager.swift; sourceTree = ""; }; + 63E8517D2CE10005005554E7 /* LogViewer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogViewer.swift; sourceTree = ""; }; + 63E8517F2CE10014005554E7 /* LogsListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogsListView.swift; sourceTree = ""; }; 653A254D283387FE005D4D48 /* TemplateApplication.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TemplateApplication.app; sourceTree = BUILT_PRODUCTS_DIR; }; 653A2550283387FE005D4D48 /* TemplateApplication.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TemplateApplication.swift; sourceTree = ""; }; 653A255428338800005D4D48 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; @@ -251,6 +261,18 @@ path = SharedContext; sourceTree = ""; }; + 63E851762CE0FF85005554E7 /* Logs */ = { + isa = PBXGroup; + children = ( + 63E8517F2CE10014005554E7 /* LogsListView.swift */, + 63E8517D2CE10005005554E7 /* LogViewer.swift */, + 63E8517B2CE0FFF6005554E7 /* LogManager.swift */, + 63E851792CE0FFDC005554E7 /* LogLevel.swift */, + 63E851772CE0FFC5005554E7 /* OSLogEntryLog+FormattedLogOutput.swift */, + ); + path = Logs; + sourceTree = ""; + }; 653A2544283387FE005D4D48 = { isa = PBXGroup; children = ( @@ -287,6 +309,7 @@ 2FE5DC2829EDD398004B9AB4 /* Onboarding */, 2FE5DC2D29EDD792004B9AB4 /* Resources */, 2FE5DC3B29EDD7D0004B9AB4 /* Schedule */, + 63E851762CE0FF85005554E7 /* Logs */, 2FE5DC3C29EDD7DA004B9AB4 /* SharedContext */, 2FC9759D2978E30800BA99FE /* Supporting Files */, ); @@ -528,15 +551,19 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 63E8517C2CE0FFF9005554E7 /* LogManager.swift in Sources */, 2FE5DC4129EDD7EE004B9AB4 /* StorageKeys.swift in Sources */, 2FE5DCB129EE6107004B9AB4 /* AccountOnboarding.swift in Sources */, 2FE5DC3A29EDD7CA004B9AB4 /* Welcome.swift in Sources */, 2FE5DC3829EDD7CA004B9AB4 /* InterestingModules.swift in Sources */, 2FE5DC3529EDD7CA004B9AB4 /* Consent.swift in Sources */, 2FC975A82978F11A00BA99FE /* HomeView.swift in Sources */, + 63E851782CE0FFCB005554E7 /* OSLogEntryLog+FormattedLogOutput.swift in Sources */, 2FE5DC4E29EDD7FA004B9AB4 /* ScheduleView.swift in Sources */, + 63E851802CE10016005554E7 /* LogsListView.swift in Sources */, A9DFE8A92ABE551400428242 /* AccountButton.swift in Sources */, A9A3DCC82C75CBBD00FC9B69 /* FirebaseConfiguration.swift in Sources */, + 63E8517A2CE0FFDE005554E7 /* LogLevel.swift in Sources */, 2FE5DC3729EDD7CA004B9AB4 /* OnboardingFlow.swift in Sources */, 2F1AC9DF2B4E840E00C24973 /* TemplateApplication.docc in Sources */, 2FF53D8D2A8729D600042B76 /* TemplateApplicationStandard.swift in Sources */, @@ -551,6 +578,7 @@ 653A2551283387FE005D4D48 /* TemplateApplication.swift in Sources */, 2FE5DC3629EDD7CA004B9AB4 /* HealthKitPermissions.swift in Sources */, 2F65B44E2A3B8B0600A36932 /* NotificationPermissions.swift in Sources */, + 63E8517E2CE10007005554E7 /* LogViewer.swift in Sources */, 2FE5DC2629EDD38A004B9AB4 /* Contacts.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/TemplateApplication.xcodeproj/xcshareddata/xcschemes/TemplateApplication.xcscheme b/TemplateApplication.xcodeproj/xcshareddata/xcschemes/TemplateApplication.xcscheme index 0a585a00..473e1d3c 100644 --- a/TemplateApplication.xcodeproj/xcshareddata/xcschemes/TemplateApplication.xcscheme +++ b/TemplateApplication.xcodeproj/xcshareddata/xcschemes/TemplateApplication.xcscheme @@ -79,7 +79,7 @@ + isEnabled = "NO"> + isEnabled = "YES"> diff --git a/TemplateApplication/Account/AccountSheet.swift b/TemplateApplication/Account/AccountSheet.swift index dff45305..00a57d36 100644 --- a/TemplateApplication/Account/AccountSheet.swift +++ b/TemplateApplication/Account/AccountSheet.swift @@ -30,6 +30,12 @@ struct AccountSheet: View { } label: { Text("License Information") } + + NavigationLink { + LogViewer() + } label: { + Text("View Logs") + } } } else { AccountSetup { _ in diff --git a/TemplateApplication/Resources/Localizable.xcstrings b/TemplateApplication/Resources/Localizable.xcstrings index 9e828f82..81428e45 100644 --- a/TemplateApplication/Resources/Localizable.xcstrings +++ b/TemplateApplication/Resources/Localizable.xcstrings @@ -231,6 +231,66 @@ } } }, + "LOGS_FROM_DATE_LABEL" : { + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Date From" + } + } + } + }, + "LOGS_LEVEL_LABEL" : { + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Log Level" + } + } + } + }, + "LOGS_LOADING_LABEL" : { + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Loading Logsā€¦" + } + } + } + }, + "LOGS_SHARE_PREVIEW_TITLE" : { + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Logs" + } + } + } + }, + "LOGS_TO_DATE_LABEL" : { + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Date To" + } + } + } + }, + "LOGS_VIEWER_TITLE" : { + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Log Viewer" + } + } + } + }, "Next" : { "localizations" : { "en" : { @@ -241,6 +301,16 @@ } } }, + "NO_LOGS_AVAILABLE" : { + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "No Logs Available" + } + } + } + }, "NOTIFICATION_PERMISSIONS_DESCRIPTION" : { "localizations" : { "en" : { @@ -261,6 +331,16 @@ } } }, + "OK" : { + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Ok" + } + } + } + }, "Onboarding" : { "localizations" : { "en" : { @@ -366,6 +446,16 @@ }, "Unsupported Event" : { + }, + "View Logs" : { + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "View Logs" + } + } + } }, "WELCOME_AREA1_DESCRIPTION" : { "localizations" : { diff --git a/TemplateApplication/TemplateApplicationDelegate.swift b/TemplateApplication/TemplateApplicationDelegate.swift index a66f4917..0b00d53e 100644 --- a/TemplateApplication/TemplateApplicationDelegate.swift +++ b/TemplateApplication/TemplateApplicationDelegate.swift @@ -55,6 +55,8 @@ class TemplateApplicationDelegate: SpeziAppDelegate { OnboardingDataSource() Notifications() + + LogManager() } }