chore(ios): log full Share Extension trace on startup (temporary)

Surface the complete Share Extension execution trace during app startup
so the cold-start share path can be inspected even when Xcode truncates
console output.

In checkForSharedImageAndNavigate(), after the existing diagnostics
call, retrieve SharedImage.getShareExtensionTrace() and:
- log the full untruncated trace between TRACE FULL START/END markers
- show the full trace in a user-visible alert (iOS only)
- log TRACE LENGTH and the first 500 characters

Share-target behavior is unchanged and the trace work is gated to iOS,
so Android is unaffected. All additions are marked with
"TEMPORARY SHARE TARGET DIAGNOSTICS".
This commit is contained in:
Jose Olarte III
2026-06-25 19:57:42 +08:00
parent d1106d9aec
commit 7b1fec779b

View File

@@ -388,6 +388,35 @@ async function checkForSharedImageAndNavigate() {
})}`, })}`,
); );
} }
// TEMPORARY SHARE TARGET DIAGNOSTICS
const traceResult = await SharedImage.getShareExtensionTrace();
// TEMPORARY SHARE TARGET DIAGNOSTICS
console.info("[ShareTarget] TRACE FULL START");
// TEMPORARY SHARE TARGET DIAGNOSTICS
console.info(traceResult.trace);
// TEMPORARY SHARE TARGET DIAGNOSTICS
console.info("[ShareTarget] TRACE FULL END");
// TEMPORARY SHARE TARGET DIAGNOSTICS
if (Capacitor.getPlatform() === "ios") {
alert(traceResult.trace);
}
// TEMPORARY SHARE TARGET DIAGNOSTICS
console.info("[ShareTarget] Extension Trace\n" + traceResult.trace);
// TEMPORARY SHARE TARGET DIAGNOSTICS
const traceLength = traceResult.trace.length;
// TEMPORARY SHARE TARGET DIAGNOSTICS
console.info(`[ShareTarget] TRACE LENGTH=${traceLength}`);
// TEMPORARY SHARE TARGET DIAGNOSTICS
if (traceLength > 0) {
console.info(
"[ShareTarget] TRACE FIRST 500\n" + traceResult.trace.slice(0, 500),
);
}
} }
logger.debug("[Main] 🔍 Checking for shared image on app activation"); logger.debug("[Main] 🔍 Checking for shared image on app activation");