chore(ios): add pendingShareExists cold-start share diagnostics (temporary)
Extend ShareExtensionDiagnostics with pendingShareExists across SharedImageUtility, definitions, and the web stub, and log cold-start state (pending share + current route) in the iOS startup share check.
This commit is contained in:
@@ -2,6 +2,13 @@
|
|||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
|
<key>BGTaskSchedulerPermittedIdentifiers</key>
|
||||||
|
<array>
|
||||||
|
<string>org.timesafari.dailynotification.fetch</string>
|
||||||
|
<string>org.timesafari.dailynotification.notify</string>
|
||||||
|
<string>org.timesafari.dailynotification.content-fetch</string>
|
||||||
|
<string>org.timesafari.dailynotification.notification-delivery</string>
|
||||||
|
</array>
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
<string>en</string>
|
<string>en</string>
|
||||||
<key>CFBundleDisplayName</key>
|
<key>CFBundleDisplayName</key>
|
||||||
@@ -18,6 +25,17 @@
|
|||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>$(MARKETING_VERSION)</string>
|
<string>$(MARKETING_VERSION)</string>
|
||||||
|
<key>CFBundleURLTypes</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleURLName</key>
|
||||||
|
<string>app.timesafari</string>
|
||||||
|
<key>CFBundleURLSchemes</key>
|
||||||
|
<array>
|
||||||
|
<string>timesafari</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||||
<key>LSRequiresIPhoneOS</key>
|
<key>LSRequiresIPhoneOS</key>
|
||||||
@@ -26,6 +44,13 @@
|
|||||||
<string>Time Safari allows you to take photos, and also scan QR codes from contacts.</string>
|
<string>Time Safari allows you to take photos, and also scan QR codes from contacts.</string>
|
||||||
<key>NSPhotoLibraryUsageDescription</key>
|
<key>NSPhotoLibraryUsageDescription</key>
|
||||||
<string>Time Safari allows you to upload photos.</string>
|
<string>Time Safari allows you to upload photos.</string>
|
||||||
|
<key>NSUserNotificationAlertStyle</key>
|
||||||
|
<string>alert</string>
|
||||||
|
<key>UIBackgroundModes</key>
|
||||||
|
<array>
|
||||||
|
<string>fetch</string>
|
||||||
|
<string>processing</string>
|
||||||
|
</array>
|
||||||
<key>UILaunchStoryboardName</key>
|
<key>UILaunchStoryboardName</key>
|
||||||
<string>LaunchScreen</string>
|
<string>LaunchScreen</string>
|
||||||
<key>UIMainStoryboardFile</key>
|
<key>UIMainStoryboardFile</key>
|
||||||
@@ -47,30 +72,5 @@
|
|||||||
</array>
|
</array>
|
||||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>CFBundleURLTypes</key>
|
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>CFBundleURLName</key>
|
|
||||||
<string>app.timesafari</string>
|
|
||||||
<key>CFBundleURLSchemes</key>
|
|
||||||
<array>
|
|
||||||
<string>timesafari</string>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
<key>UIBackgroundModes</key>
|
|
||||||
<array>
|
|
||||||
<string>fetch</string>
|
|
||||||
<string>processing</string>
|
|
||||||
</array>
|
|
||||||
<key>BGTaskSchedulerPermittedIdentifiers</key>
|
|
||||||
<array>
|
|
||||||
<string>org.timesafari.dailynotification.fetch</string>
|
|
||||||
<string>org.timesafari.dailynotification.notify</string>
|
|
||||||
<string>org.timesafari.dailynotification.content-fetch</string>
|
|
||||||
<string>org.timesafari.dailynotification.notification-delivery</string>
|
|
||||||
</array>
|
|
||||||
<key>NSUserNotificationAlertStyle</key>
|
|
||||||
<string>alert</string>
|
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
@@ -108,7 +108,9 @@ public class SharedImageUtility {
|
|||||||
"shareExtensionLastStart": NSNull(),
|
"shareExtensionLastStart": NSNull(),
|
||||||
"sharedPhotoShareId": NSNull(),
|
"sharedPhotoShareId": NSNull(),
|
||||||
"sharedPhotoFilePath": NSNull(),
|
"sharedPhotoFilePath": NSNull(),
|
||||||
"fileExists": false
|
"fileExists": false,
|
||||||
|
// TEMPORARY SHARE TARGET DIAGNOSTICS
|
||||||
|
"pendingShareExists": false
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -123,13 +125,23 @@ public class SharedImageUtility {
|
|||||||
fileExists = false
|
fileExists = false
|
||||||
}
|
}
|
||||||
|
|
||||||
print("[ShareTarget] getShareExtensionDiagnostics shareExtensionLastStart=\(shareExtensionLastStart ?? "nil") sharedPhotoShareId=\(shareId ?? "nil") sharedPhotoFilePath=\(filePath ?? "nil") fileExists=\(fileExists)")
|
// TEMPORARY SHARE TARGET DIAGNOSTICS
|
||||||
|
let pendingShareExists = (
|
||||||
|
shareExtensionLastStart != nil ||
|
||||||
|
shareId != nil ||
|
||||||
|
filePath != nil ||
|
||||||
|
fileExists == true
|
||||||
|
)
|
||||||
|
|
||||||
|
print("[ShareTarget] getShareExtensionDiagnostics shareExtensionLastStart=\(shareExtensionLastStart ?? "nil") sharedPhotoShareId=\(shareId ?? "nil") sharedPhotoFilePath=\(filePath ?? "nil") fileExists=\(fileExists) pendingShareExists=\(pendingShareExists)")
|
||||||
|
|
||||||
return [
|
return [
|
||||||
"shareExtensionLastStart": shareExtensionLastStart ?? NSNull(),
|
"shareExtensionLastStart": shareExtensionLastStart ?? NSNull(),
|
||||||
"sharedPhotoShareId": shareId ?? NSNull(),
|
"sharedPhotoShareId": shareId ?? NSNull(),
|
||||||
"sharedPhotoFilePath": filePath ?? NSNull(),
|
"sharedPhotoFilePath": filePath ?? NSNull(),
|
||||||
"fileExists": fileExists
|
"fileExists": fileExists,
|
||||||
|
// TEMPORARY SHARE TARGET DIAGNOSTICS
|
||||||
|
"pendingShareExists": pendingShareExists
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -363,6 +363,20 @@ async function checkForSharedImageAndNavigate() {
|
|||||||
if (Capacitor.getPlatform() === "ios") {
|
if (Capacitor.getPlatform() === "ios") {
|
||||||
try {
|
try {
|
||||||
const diagnostics = await SharedImage.getShareExtensionDiagnostics();
|
const diagnostics = await SharedImage.getShareExtensionDiagnostics();
|
||||||
|
// TEMPORARY SHARE TARGET DIAGNOSTICS
|
||||||
|
console.info(
|
||||||
|
"[ShareTarget] Cold-start state",
|
||||||
|
JSON.stringify({
|
||||||
|
pendingShareExists: diagnostics.pendingShareExists,
|
||||||
|
shareExtensionLastStart: diagnostics.shareExtensionLastStart,
|
||||||
|
sharedPhotoShareId: diagnostics.sharedPhotoShareId,
|
||||||
|
sharedPhotoFilePath: diagnostics.sharedPhotoFilePath,
|
||||||
|
fileExists: diagnostics.fileExists,
|
||||||
|
currentRoute: router.currentRoute.value.fullPath,
|
||||||
|
appReady: true,
|
||||||
|
timestamp: new Date().toISOString(),
|
||||||
|
}),
|
||||||
|
);
|
||||||
logger.info(`[ShareTarget] Diagnostics ${JSON.stringify(diagnostics)}`);
|
logger.info(`[ShareTarget] Diagnostics ${JSON.stringify(diagnostics)}`);
|
||||||
} catch (diagnosticsError) {
|
} catch (diagnosticsError) {
|
||||||
logger.info(
|
logger.info(
|
||||||
|
|||||||
@@ -29,6 +29,8 @@ export class SharedImagePluginWeb
|
|||||||
sharedPhotoShareId: null,
|
sharedPhotoShareId: null,
|
||||||
sharedPhotoFilePath: null,
|
sharedPhotoFilePath: null,
|
||||||
fileExists: false,
|
fileExists: false,
|
||||||
|
// TEMPORARY SHARE TARGET DIAGNOSTICS
|
||||||
|
pendingShareExists: false,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ export interface ShareExtensionDiagnostics {
|
|||||||
sharedPhotoShareId: string | null;
|
sharedPhotoShareId: string | null;
|
||||||
sharedPhotoFilePath: string | null;
|
sharedPhotoFilePath: string | null;
|
||||||
fileExists: boolean;
|
fileExists: boolean;
|
||||||
|
// TEMPORARY SHARE TARGET DIAGNOSTICS
|
||||||
|
pendingShareExists: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SharedImagePlugin {
|
export interface SharedImagePlugin {
|
||||||
|
|||||||
Reference in New Issue
Block a user