Chuyển tới nội dung chính

SDK 1.0.0

Xử lý sự cố

SymptomCause and fix
Empty band at the top on iPhoneMissing viewport-fit=cover in the viewport meta tag.
Content hidden under the notch or home indicatorPad with env(safe-area-inset-*), var(--sat) etc., or useSafeArea().
Top-right content coveredThe host's ⋮ / ✕ buttons sit there. Leave about 90 × 40 px free.
"Took too long to load" warningYour page took over 15 s to load and never called sdk.ready(). Call it after the first paint.
getSDK() is nullYou are in a normal browser. Use a mock bridge.
showToast / navigate does nothingThe permission was refused or not granted, or the route is not in ALLOWED_ROUTES. Fire-and-forget calls fail silently.
PERMISSION_DENIEDThe user said no. Declare the permission at registration and handle the refusal.
earnPoints rejects INVALID_PARAMSaction is not one of EARN_POINTS_ACTIONS.
Shared link missing on AndroidAndroid ignores the share url. Put the link in message / text.
whenNativeReady() never resolvesYou subscribed after the event. Call it at module top level.
scanQr rejects UNSUPPORTED in the appThe user's app version predates scanning. Hide the button with hasBridgeMethod('scanQr').
Text cannot be selectedSelection is off by default. Call sdk.setTextSelectable(true).