OneSignal Info

// You define this function on your page, but do not actually call it
// If present on a page it will be called by the app when the page is loaded
function gonative_onesignal_info(oneSignalInfo) {
    console.log(oneSignalInfo);
}

// oneSignalInfo contains the below
{
    oneSignalUserId: 'xxxxxxx',
    oneSignalPushToken: 'xxxxxx',
    oneSignalSubscribed: true,
    oneSignalRequiresUserPrivacyConsent: false,
    platform: 'ios',
    appId: 'io.gonative.example',
    appVersion:  '1.0.0',
    distribution: 'release',
    hardware: 'armv8',
    installationId: 'xxxx-xxxx-xxxx-xxxx',
    language: 'en',
    model: 'iPhone',
    os: 'iOS',
    osVersion: '10.3',
    timeZone: 'America/New_York'
}

📘

The gonative_onesignal_info() function is called by the native app when the page is loaded within the app. This function must be available at the time of page load and cannot be loaded asynchronously or in a deferred manner.