chore(ios): remove temporary cold-start share diagnostics
Remove the temporary diagnostics added during the iOS share-target investigation, tagged with the TEMPORARY SHARE TARGET DIAGNOSTICS marker. - Drop the pendingShareExists field/computation from ShareExtensionDiagnostics across the Swift utility, TS definitions, and web stub - Remove the cold-start diagnostics block in main.capacitor.ts (the iOS getShareExtensionDiagnostics call and [ShareTarget] Cold-start state dump) - Drop pendingShareExists from the getShareExtensionDiagnostics log line Kept getShareExtensionDiagnostics itself (unmarked plugin API + registration), the unmarked [ShareTarget] print logging, share-target functionality, and Android code unchanged.
This commit is contained in:
@@ -108,9 +108,7 @@ public class SharedImageUtility {
|
||||
"shareExtensionLastStart": NSNull(),
|
||||
"sharedPhotoShareId": NSNull(),
|
||||
"sharedPhotoFilePath": NSNull(),
|
||||
"fileExists": false,
|
||||
// TEMPORARY SHARE TARGET DIAGNOSTICS
|
||||
"pendingShareExists": false
|
||||
"fileExists": false
|
||||
]
|
||||
}
|
||||
|
||||
@@ -125,23 +123,13 @@ public class SharedImageUtility {
|
||||
fileExists = false
|
||||
}
|
||||
|
||||
// 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)")
|
||||
print("[ShareTarget] getShareExtensionDiagnostics shareExtensionLastStart=\(shareExtensionLastStart ?? "nil") sharedPhotoShareId=\(shareId ?? "nil") sharedPhotoFilePath=\(filePath ?? "nil") fileExists=\(fileExists)")
|
||||
|
||||
return [
|
||||
"shareExtensionLastStart": shareExtensionLastStart ?? NSNull(),
|
||||
"sharedPhotoShareId": shareId ?? NSNull(),
|
||||
"sharedPhotoFilePath": filePath ?? NSNull(),
|
||||
"fileExists": fileExists,
|
||||
// TEMPORARY SHARE TARGET DIAGNOSTICS
|
||||
"pendingShareExists": pendingShareExists
|
||||
"fileExists": fileExists
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@@ -359,37 +359,6 @@ async function checkForSharedImageAndNavigate() {
|
||||
}
|
||||
|
||||
try {
|
||||
// TEMPORARY SHARE TARGET DIAGNOSTICS
|
||||
if (Capacitor.getPlatform() === "ios") {
|
||||
try {
|
||||
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)}`);
|
||||
} catch (diagnosticsError) {
|
||||
logger.info(
|
||||
`[ShareTarget] Diagnostics ${JSON.stringify({
|
||||
error:
|
||||
diagnosticsError instanceof Error
|
||||
? diagnosticsError.message
|
||||
: String(diagnosticsError),
|
||||
})}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
logger.debug("[Main] 🔍 Checking for shared image on app activation");
|
||||
const imageResult = await checkAndStoreNativeSharedImage();
|
||||
|
||||
|
||||
@@ -29,8 +29,6 @@ export class SharedImagePluginWeb
|
||||
sharedPhotoShareId: null,
|
||||
sharedPhotoFilePath: null,
|
||||
fileExists: false,
|
||||
// TEMPORARY SHARE TARGET DIAGNOSTICS
|
||||
pendingShareExists: false,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,8 +12,6 @@ export interface ShareExtensionDiagnostics {
|
||||
sharedPhotoShareId: string | null;
|
||||
sharedPhotoFilePath: string | null;
|
||||
fileExists: boolean;
|
||||
// TEMPORARY SHARE TARGET DIAGNOSTICS
|
||||
pendingShareExists: boolean;
|
||||
}
|
||||
|
||||
export interface SharedImagePlugin {
|
||||
|
||||
Reference in New Issue
Block a user