-
Notifications
You must be signed in to change notification settings - Fork 114
Open
Description
How can we help?
How do I know in my website code if onesignal will never actually load and be initialized?
In certain environments im running into this case
OneSignal-Website-SDK/src/page/utils/OneSignalShimLoader.ts
Lines 65 to 73 in 5868c04
private static printEnvironmentNotSupported() { | |
let logMessage = 'OneSignal: SDK is not compatible with this browser.'; | |
if (isIosSafari()) { | |
logMessage += | |
' To support iOS please install as a Web App. See the OneSignal guide https://documentation.onesignal.com/docs/safari-web-push-for-ios'; | |
} | |
console.log(logMessage); | |
} | |
} |
I don't see any way to tell if this happens other than a console.log being output, in these cases my init function just sits in the OneSignalDeferred array forever.
How can I detect when this happens in code so I can instruct the user this page will never work unless they take some action to fix it.
I can get onError callbacks to track when the script itself fails to load, but in these cases your script loads, then proceeds to do nothing.
Metadata
Metadata
Assignees
Labels
No labels