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(),
|
"shareExtensionLastStart": NSNull(),
|
||||||
"sharedPhotoShareId": NSNull(),
|
"sharedPhotoShareId": NSNull(),
|
||||||
"sharedPhotoFilePath": NSNull(),
|
"sharedPhotoFilePath": NSNull(),
|
||||||
"fileExists": false,
|
"fileExists": false
|
||||||
// TEMPORARY SHARE TARGET DIAGNOSTICS
|
|
||||||
"pendingShareExists": false
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -125,23 +123,13 @@ public class SharedImageUtility {
|
|||||||
fileExists = false
|
fileExists = false
|
||||||
}
|
}
|
||||||
|
|
||||||
// TEMPORARY SHARE TARGET DIAGNOSTICS
|
print("[ShareTarget] getShareExtensionDiagnostics shareExtensionLastStart=\(shareExtensionLastStart ?? "nil") sharedPhotoShareId=\(shareId ?? "nil") sharedPhotoFilePath=\(filePath ?? "nil") fileExists=\(fileExists)")
|
||||||
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
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -359,37 +359,6 @@ async function checkForSharedImageAndNavigate() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
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");
|
logger.debug("[Main] 🔍 Checking for shared image on app activation");
|
||||||
const imageResult = await checkAndStoreNativeSharedImage();
|
const imageResult = await checkAndStoreNativeSharedImage();
|
||||||
|
|
||||||
|
|||||||
@@ -29,8 +29,6 @@ export class SharedImagePluginWeb
|
|||||||
sharedPhotoShareId: null,
|
sharedPhotoShareId: null,
|
||||||
sharedPhotoFilePath: null,
|
sharedPhotoFilePath: null,
|
||||||
fileExists: false,
|
fileExists: false,
|
||||||
// TEMPORARY SHARE TARGET DIAGNOSTICS
|
|
||||||
pendingShareExists: false,
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,8 +12,6 @@ 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