Support » Plugin: OneSignal - Web Push Notifications » ONESIGNAL_DEBUG and ONESIGNAL_LOCAL constants

  • Resolved nlpro


    In the sdk_files/OneSignalSDKWorker.js.php and sdk_files/OneSignalSDKUpdaterWorker.js.php files the code checks whether 2 constants exist like this:

    if (defined('ONESIGNAL_DEBUG') && defined('ONESIGNAL_LOCAL')) {
            echo "importScripts('https://localhost:3001/dev_sdks/OneSignalSDK.js');";	        
    } else {
    	echo "importScripts('');";

    Is this piece of code only relevant for the developer(s) of the OneSignal plugin ?

    I guess “https://localhost:3001/dev_sdks/OneSignalSDK.js“ is usually not available for end users ?

    The condition in the code decides whether to use a full local SDK .js file or a remote worker specific SDK .js file. Is this motivated by performance ?

    • This topic was modified 8 months, 2 weeks ago by nlpro.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘ONESIGNAL_DEBUG and ONESIGNAL_LOCAL constants’ is closed to new replies.