From d7d5e401b8a498580c611d8c982a6ac952abd1e5 Mon Sep 17 00:00:00 2001 From: Jose Olarte III Date: Fri, 8 May 2026 17:54:00 +0800 Subject: [PATCH] fix: dev notification debug on Capacitor and iOS compile Register the dev-notifications route whenever the bundle is non-production (DEV or Vite MODE !== production), matching the account screen so RouterLink to Notification Debug does not throw after vite build. Align AccountViewView isDev with that rule and document the coupling. Add NotificationInspectorPlugin.swift to the App target compile sources so AppDelegate can register the plugin. --- ios/App/App.xcodeproj/project.pbxproj | 21 +++++++-------------- src/router/index.ts | 6 +++++- src/views/AccountViewView.vue | 6 ++++-- 3 files changed, 16 insertions(+), 17 deletions(-) diff --git a/ios/App/App.xcodeproj/project.pbxproj b/ios/App/App.xcodeproj/project.pbxproj index b41b06bb..611b12b6 100644 --- a/ios/App/App.xcodeproj/project.pbxproj +++ b/ios/App/App.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 56; + objectVersion = 70; objects = { /* Begin PBXBuildFile section */ @@ -19,6 +19,7 @@ C86585DF2ED456DE00824752 /* TimeSafariShareExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = C86585D52ED456DE00824752 /* TimeSafariShareExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; C8C56E142EE0474B00737D0E /* SharedImageUtility.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8C56E132EE0474B00737D0E /* SharedImageUtility.swift */; }; C8C56E162EE064CB00737D0E /* SharedImagePlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8C56E152EE064CA00737D0E /* SharedImagePlugin.swift */; }; + E9F1A0022EE05A8B00737D01 /* NotificationInspectorPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9F1A0012EE05A8B00737D01 /* NotificationInspectorPlugin.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -62,11 +63,12 @@ C8C56E132EE0474B00737D0E /* SharedImageUtility.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SharedImageUtility.swift; sourceTree = ""; }; C8C56E152EE064CA00737D0E /* SharedImagePlugin.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SharedImagePlugin.swift; sourceTree = ""; }; E2E9297D5D02C549106C77F9 /* Pods-App.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App.release.xcconfig"; path = "Target Support Files/Pods-App/Pods-App.release.xcconfig"; sourceTree = ""; }; + E9F1A0012EE05A8B00737D01 /* NotificationInspectorPlugin.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationInspectorPlugin.swift; sourceTree = ""; }; EAEC6436E595F7CD3A1C9E96 /* Pods-App.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App.debug.xcconfig"; path = "Target Support Files/Pods-App/Pods-App.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */ - C86585E32ED456DE00824752 /* Exceptions for "TimeSafariShareExtension" folder in "TimeSafariShareExtension" target */ = { + C86585E32ED456DE00824752 /* PBXFileSystemSynchronizedBuildFileExceptionSet */ = { isa = PBXFileSystemSynchronizedBuildFileExceptionSet; membershipExceptions = ( Info.plist, @@ -76,18 +78,7 @@ /* End PBXFileSystemSynchronizedBuildFileExceptionSet section */ /* Begin PBXFileSystemSynchronizedRootGroup section */ - C86585D62ED456DE00824752 /* TimeSafariShareExtension */ = { - isa = PBXFileSystemSynchronizedRootGroup; - exceptions = ( - C86585E32ED456DE00824752 /* Exceptions for "TimeSafariShareExtension" folder in "TimeSafariShareExtension" target */, - ); - explicitFileTypes = { - }; - explicitFolders = ( - ); - path = TimeSafariShareExtension; - sourceTree = ""; - }; + C86585D62ED456DE00824752 /* TimeSafariShareExtension */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (C86585E32ED456DE00824752 /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (); path = TimeSafariShareExtension; sourceTree = ""; }; /* End PBXFileSystemSynchronizedRootGroup section */ /* Begin PBXFrameworksBuildPhase section */ @@ -141,6 +132,7 @@ isa = PBXGroup; children = ( C8C56E152EE064CA00737D0E /* SharedImagePlugin.swift */, + E9F1A0012EE05A8B00737D01 /* NotificationInspectorPlugin.swift */, C8C56E132EE0474B00737D0E /* SharedImageUtility.swift */, A3F8E2D91B4C5E60718293A4 /* TimeSafariNativeFetcher.swift */, C86585E52ED4577F00824752 /* App.entitlements */, @@ -358,6 +350,7 @@ buildActionMask = 2147483647; files = ( C8C56E162EE064CB00737D0E /* SharedImagePlugin.swift in Sources */, + E9F1A0022EE05A8B00737D01 /* NotificationInspectorPlugin.swift in Sources */, 504EC3081FED79650016851F /* AppDelegate.swift in Sources */, C8C56E142EE0474B00737D0E /* SharedImageUtility.swift in Sources */, B7E1C4F82A9D3E506F1B2C8D /* TimeSafariNativeFetcher.swift in Sources */, diff --git a/src/router/index.ts b/src/router/index.ts index 367bb7e3..a09cc627 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -11,6 +11,10 @@ import { generateSaveAndActivateIdentity, } from "../libs/util"; +/** Matches AccountViewView dev toolkit links: `vite build` has DEV false unless MODE is production. */ +const includeDevToolkitRoutes = + import.meta.env.DEV || import.meta.env.MODE !== "production"; + const routes: Array = [ { path: "/account", @@ -290,7 +294,7 @@ const routes: Array = [ name: "user-profile", component: () => import("../views/UserProfileView.vue"), }, - ...(import.meta.env.DEV + ...(includeDevToolkitRoutes ? ([ { path: "/dev/notifications", diff --git a/src/views/AccountViewView.vue b/src/views/AccountViewView.vue index f4c45a67..82d4f060 100644 --- a/src/views/AccountViewView.vue +++ b/src/views/AccountViewView.vue @@ -742,7 +742,7 @@ > Logs - +