diff --git a/README.md b/README.md index 5863ac7..da98f85 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# Game Closure DevKit Module: Supersonic / ironSource +# Game Closure DevKit Module: Ironsource / ironSource This module allows you to display interstitial, video ads and offerwalls -from the Supersonic mediation service. +from the Ironsource mediation service. Both iOS and Android targets are supported. @@ -12,33 +12,33 @@ Install the module into your application using the standard devkit install process. ~~~ -devkit install https://github.com/hashcube/supersonic +devkit install https://github.com/hashcube/ironsource ~~~ ## Setup -Setup supersonic by configuring the supersonicApp key in manifest.json. -The supersonicAppKey can be fetched from the Supersonic/ironsource dashboard +Setup ironsource by configuring the ironsourceApp key in manifest.json. +The ironsourceAppKey can be fetched from the Ironsource/ironsource dashboard #### Manifest.json ~~~ "android": { - "supersonicAppKey": "key", + "ironsourceAppKey": "key", }, ~~~ ~~~ "ios": { - "supersonicAppKey": "key", + "ironsourceAppKey": "key", }, ~~~ You must add all of the providers you wish to bundle with your application -to the `addons.supersonic..providers` lists or they will not be +to the `addons.ironsource..providers` lists or they will not be included in the build and you will not be able to use them in your game. ~~~ "addons": { - "supersonic": { + "ironsource": { "android": { "providers": [ "chartboost", @@ -66,8 +66,8 @@ The plugin comes with several ad providers already available in order to make using the plugin as easy as possible. Adding one of the included providers is usually as easy as adding -the provider name to the manifest `addons.supersonic.[platform].providers` -list and adding any necessary SDK keys. The supersonic module will +the provider name to the manifest `addons.ironsource.[platform].providers` +list and adding any necessary SDK keys. The ironsource module will use the providers list to automatically create all of your configuration To use any of these, in the game please add it the `addons` block in manifest.json @@ -75,7 +75,7 @@ as mentioned before. ## Integrating Additional Providers -To integrate additional providers supportd by supersonic, you'll need to +To integrate additional providers supportd by ironsource, you'll need to manually add all of the files and configuration to the correct locations in the build/providers/ folder. diff --git a/build/index.js b/build/index.js index db6901f..6e95518 100644 --- a/build/index.js +++ b/build/index.js @@ -48,34 +48,34 @@ exports.onBeforeBuild = function (api, app, config, cb) { // read manifest for which providers are enabled if (config.target === 'native-android') { if (!app.manifest.addons || - !app.manifest.addons.supersonic || - !app.manifest.addons.supersonic.android || - !app.manifest.addons.supersonic.android.providers) { - console.warn('{supersonic} No providers found -- looked in manifest.addons.supersonic.android.providers'); + !app.manifest.addons.ironsource || + !app.manifest.addons.ironsource.android || + !app.manifest.addons.ironsource.android.providers) { + console.warn('{ironsource} No providers found -- looked in manifest.addons.ironsource.android.providers'); } else { - providers = app.manifest.addons.supersonic.android.providers; + providers = app.manifest.addons.ironsource.android.providers; } folder = 'android'; } else { if (!app.manifest.addons || - !app.manifest.addons.supersonic || - !app.manifest.addons.supersonic.ios || - !app.manifest.addons.supersonic.ios.providers) { - console.warn('{supersonic} No providers found -- looked in manifest.addons.supersonic.ios.providers'); + !app.manifest.addons.ironsource || + !app.manifest.addons.ironsource.ios || + !app.manifest.addons.ironsource.ios.providers) { + console.warn('{ironsource} No providers found -- looked in manifest.addons.ironsource.ios.providers'); } else { - providers = app.manifest.addons.supersonic.ios.providers; + providers = app.manifest.addons.ironsource.ios.providers; } folder = 'ios'; } - // always include supersonic - providers.push('supersonic'); + // always include ironsource + providers.push('ironsource'); // read provider config and copy any necessary files for (i = 0; i < providers.length; i++) { provider = providers[i]; - console.log("{supersonic} Adding provider", provider); + console.log("{ironsource} Adding provider", provider); dirname = path.join(__dirname, 'providers', provider, folder); // read provider config.json @@ -131,7 +131,7 @@ exports.onBeforeBuild = function (api, app, config, cb) { ); } - // path to plugin platform folder (eg: supersonic/android) + // path to plugin platform folder (eg: ironsource/android) platformPath = path.join(__dirname, '..', folder); // remove the target folder in the plugin and recreate with correct content @@ -187,7 +187,7 @@ exports.onBeforeBuild = function (api, app, config, cb) { return Promise.all(writePromises); }).spread(function () { - console.log("{supersonic} Finished setting up providers"); + console.log("{ironsource} Finished setting up providers"); cb(); }); } @@ -311,7 +311,7 @@ var mergeConfig = function (config, newConfig) { } else { // warn about overwriting keys console.warn( - "{supersonic} Warning - onBeforeBuild config overwrote existing key", + "{ironsource} Warning - onBeforeBuild config overwrote existing key", key ); config[key] = newConfig[key]; diff --git a/build/providers/supersonic/android/config.json b/build/providers/ironsource/android/config.json similarity index 83% rename from build/providers/supersonic/android/config.json rename to build/providers/ironsource/android/config.json index 5b18036..0192a67 100644 --- a/build/providers/supersonic/android/config.json +++ b/build/providers/ironsource/android/config.json @@ -1,6 +1,6 @@ { "copyFiles": [ - "SupersonicPlugin.java" + "IronsourcePlugin.java" ], "jars": [ "mediationsdk-6.6.1.jar" diff --git a/build/providers/supersonic/android/files/SupersonicPlugin.java b/build/providers/ironsource/android/files/IronsourcePlugin.java similarity index 75% rename from build/providers/supersonic/android/files/SupersonicPlugin.java rename to build/providers/ironsource/android/files/IronsourcePlugin.java index 37afa89..0cb5feb 100644 --- a/build/providers/supersonic/android/files/SupersonicPlugin.java +++ b/build/providers/ironsource/android/files/IronsourcePlugin.java @@ -26,20 +26,20 @@ import com.ironsource.sdk.SSAFactory; import com.ironsource.mediationsdk.utils.IronSourceUtils; -public class SupersonicPlugin implements IPlugin { +public class IronsourcePlugin implements IPlugin { Context _ctx = null; Activity _activity = null; String appKey = ""; - private IronSource mSupersonicInstance; - private SupersonicListener listener = null; + private IronSource mIronsourceInstance; + private IronsourceListener listener = null; private Placement mPlacement; private Integer rewardedCount = 0; - public class SupersonicListener implements InterstitialListener, RewardedVideoListener, OfferwallListener { + public class IronsourceListener implements InterstitialListener, RewardedVideoListener, OfferwallListener { /************************************************************ - * Supersonic Interstitial Listeners + * Ironsource Interstitial Listeners ************************************************************ */ @@ -47,7 +47,7 @@ public class SupersonicListener implements InterstitialListener, RewardedVideoLi * Invoked when Interstitial initialization process completes successfully. */ public void onInterstitialInitSuccess() { - logger.log("{supersonic} onInterstitialInitSuccess"); + logger.log("{ironsource} onInterstitialInitSuccess"); } /** @@ -55,7 +55,7 @@ public void onInterstitialInitSuccess() { * @param ironSourceError - An Object which represents the reason of initialization failure. */ public void onInterstitialInitFailed(IronSourceError ironSourceError) { - logger.log("{supersonic} onInterstitialInitFail", ironSourceError); + logger.log("{ironsource} onInterstitialInitFail", ironSourceError); } /* @@ -64,7 +64,7 @@ public void onInterstitialInitFailed(IronSourceError ironSourceError) { @Override public void onInterstitialAdClicked() { // called when the interstitial has been clicked - logger.log("{supersonic} onInterstitialAdClicked"); + logger.log("{ironsource} onInterstitialAdClicked"); } /* @@ -72,8 +72,8 @@ public void onInterstitialAdClicked() { */ @Override public void onInterstitialAdShowFailed(IronSourceError ironSourceError) { - logger.log("{supersonic} onInterstitialAdShowFailed", ironSourceError); - EventQueue.pushEvent(new SupersonicAdNotAvailable()); + logger.log("{ironsource} onInterstitialAdShowFailed", ironSourceError); + EventQueue.pushEvent(new IronsourceAdNotAvailable()); } /* @@ -81,7 +81,7 @@ public void onInterstitialAdShowFailed(IronSourceError ironSourceError) { */ @Override public void onInterstitialAdShowSucceeded() { - logger.log("{supersonic} onInterstitialAdShowSucceeded"); + logger.log("{ironsource} onInterstitialAdShowSucceeded"); } /* @@ -89,7 +89,7 @@ public void onInterstitialAdShowSucceeded() { */ @Override public void onInterstitialAdClosed() { - logger.log("{supersonic} onInterstitialAdClosed"); + logger.log("{ironsource} onInterstitialAdClosed"); } /* @@ -97,8 +97,8 @@ public void onInterstitialAdClosed() { */ @Override public void onInterstitialAdReady() { - logger.log("{supersonic} onInterstitialReady"); - EventQueue.pushEvent(new SupersonicAdAvailable()); + logger.log("{ironsource} onInterstitialReady"); + EventQueue.pushEvent(new IronsourceAdAvailable()); } /* @@ -106,15 +106,15 @@ public void onInterstitialAdReady() { */ @Override public void onInterstitialAdLoadFailed(IronSourceError ironSourceError) { - logger.log("{supersonic} onInterstitialLoadFailed", ironSourceError); - EventQueue.pushEvent(new SupersonicAdNotAvailable()); + logger.log("{ironsource} onInterstitialLoadFailed", ironSourceError); + EventQueue.pushEvent(new IronsourceAdNotAvailable()); } /* * Invoked when the ad was opened and shown successfully. */ public void onInterstitialShowSuccess() { - logger.log("{supersonic} onInterstitialShowSuccess"); + logger.log("{ironsource} onInterstitialShowSuccess"); } /** @@ -122,12 +122,12 @@ public void onInterstitialShowSuccess() { * @param ironSourceError - An object which represents the reason of showInterstitial failure. */ public void onInterstitialShowFailed(IronSourceError ironSourceError) { - logger.log("{supersonic} onInterstitialShowFailed", ironSourceError); + logger.log("{ironsource} onInterstitialShowFailed", ironSourceError); } @Override public void onInterstitialAdOpened() { - logger.log("{supersonic} onInterstitialAdOpened"); + logger.log("{ironsource} onInterstitialAdOpened"); } /* @@ -140,8 +140,8 @@ public void onInterstitialClick() { * Invoked when the ad is closed and the user is about to return to the application. */ public void onInterstitialClose() { - logger.log("{supersonic} onInterstitialClose"); - EventQueue.pushEvent(new SupersonicAdDismissed()); + logger.log("{ironsource} onInterstitialClose"); + EventQueue.pushEvent(new IronsourceAdDismissed()); } /** @@ -151,7 +151,7 @@ public void onInterstitialOpen() { } /************************************************************ - * Supersonic Offerwall Listeners + * Ironsource Offerwall Listeners ************************************************************ */ @@ -160,7 +160,7 @@ public void onInterstitialOpen() { */ @Override public void onOfferwallOpened() { - logger.log("{supersonic} onOfferwallOpened"); + logger.log("{ironsource} onOfferwallOpened"); } /** @@ -178,7 +178,7 @@ public void onOfferwallOpened() { */ @Override public boolean onOfferwallAdCredited(int credits, int totalCredits, boolean totalCreditsFlag) { - logger.log("{supersonic} onOWAdCredited"); + logger.log("{ironsource} onOWAdCredited"); EventQueue.pushEvent(new onOWAdCredited(credits)); return true; } @@ -188,7 +188,7 @@ public boolean onOfferwallAdCredited(int credits, int totalCredits, boolean tota */ @Override public void onOfferwallAvailable(boolean available) { - logger.log("{supersonic} onOfferwallAvailable"); + logger.log("{ironsource} onOfferwallAvailable"); EventQueue.pushEvent(new onOWAdAvailabilityChange(available)); } @@ -197,7 +197,7 @@ public void onOfferwallAvailable(boolean available) { */ @Override public void onOfferwallShowFailed(IronSourceError ironSourceError) { - logger.log("{supersonic} onOfferwallShowFailed", ironSourceError); + logger.log("{ironsource} onOfferwallShowFailed", ironSourceError); } /* @@ -205,7 +205,7 @@ public void onOfferwallShowFailed(IronSourceError ironSourceError) { */ @Override public void onGetOfferwallCreditsFailed(IronSourceError ironSourceError) { - logger.log("{supersonic} onGetOfferwallCreditsFailed", ironSourceError); + logger.log("{ironsource} onGetOfferwallCreditsFailed", ironSourceError); } /** @@ -214,7 +214,7 @@ public void onGetOfferwallCreditsFailed(IronSourceError ironSourceError) { */ @Override public void onOfferwallClosed() { - logger.log("{supersonic} onOWAdClosed"); + logger.log("{ironsource} onOWAdClosed"); } /* @@ -222,7 +222,7 @@ public void onOfferwallClosed() { */ @Override public void onRewardedVideoAdOpened() { - logger.log("{supersonic} onRewardedVideoAdOpened"); + logger.log("{ironsource} onRewardedVideoAdOpened"); } /* @@ -230,7 +230,7 @@ public void onRewardedVideoAdOpened() { */ @Override public void onRewardedVideoAdClosed() { - logger.log("{supersonic} onRewardedVideoAdClosed"); + logger.log("{ironsource} onRewardedVideoAdClosed"); EventQueue.pushEvent(new onRVAdClosed(mPlacement, rewardedCount)); mPlacement = null; rewardedCount = 0; @@ -241,7 +241,7 @@ public void onRewardedVideoAdClosed() { */ @Override public void onRewardedVideoAvailabilityChanged(boolean available) { - logger.log("{supersonic} onVideoAvailabilityChanged: ", available); + logger.log("{ironsource} onVideoAvailabilityChanged: ", available); EventQueue.pushEvent(new onRVAvailabilityChange(available)); } @@ -250,7 +250,7 @@ public void onRewardedVideoAvailabilityChanged(boolean available) { */ @Override public void onRewardedVideoAdStarted() { - logger.log("{supersonic} onVideoStart"); + logger.log("{ironsource} onVideoStart"); } /* @@ -258,7 +258,7 @@ public void onRewardedVideoAdStarted() { */ @Override public void onRewardedVideoAdEnded() { - logger.log("{supersonic} onVideoEnd"); + logger.log("{ironsource} onVideoEnd"); } /* @@ -266,7 +266,7 @@ public void onRewardedVideoAdEnded() { */ @Override public void onRewardedVideoAdRewarded(Placement placement) { - logger.log("{supersonic} onRewardedVideoAdRewarded"); + logger.log("{ironsource} onRewardedVideoAdRewarded"); mPlacement = placement; rewardedCount++; } @@ -276,28 +276,28 @@ public void onRewardedVideoAdRewarded(Placement placement) { */ @Override public void onRewardedVideoAdShowFailed(IronSourceError ironSourceError) { - logger.log("{supersonic} onRewardedVideoShowFail", ironSourceError); + logger.log("{ironsource} onRewardedVideoShowFail", ironSourceError); } } - public class SupersonicAdNotAvailable extends Event { + public class IronsourceAdNotAvailable extends Event { - public SupersonicAdNotAvailable() { - super("SupersonicAdNotAvailable"); + public IronsourceAdNotAvailable() { + super("IronsourceAdNotAvailable"); } } - public class SupersonicAdAvailable extends Event { + public class IronsourceAdAvailable extends Event { - public SupersonicAdAvailable() { - super("SupersonicAdAvailable"); + public IronsourceAdAvailable() { + super("IronsourceAdAvailable"); } } - public class SupersonicAdDismissed extends Event { + public class IronsourceAdDismissed extends Event { - public SupersonicAdDismissed() { - super("SupersonicAdDismissed"); + public IronsourceAdDismissed() { + super("IronsourceAdDismissed"); } } @@ -305,8 +305,8 @@ public class onOWAdCredited extends Event { int credits; public onOWAdCredited(int credits) { - super("supersonicOWCredited"); - logger.log("{supersonic} Credits received:", credits); + super("ironsourceOWCredited"); + logger.log("{ironsource} Credits received:", credits); this.credits = credits; } } @@ -315,8 +315,8 @@ public class onOWAdAvailabilityChange extends Event { boolean available; public onOWAdAvailabilityChange(boolean available) { - super("supersonicOnOWAvailabilityChange"); - logger.log("{supersonic} supersonicOnOWAvailabilityChange:", available); + super("ironsourceOnOWAvailabilityChange"); + logger.log("{ironsource} ironsourceOnOWAvailabilityChange:", available); this.available = available; } } @@ -326,12 +326,12 @@ public class onRVAdClosed extends Event { Integer rewardedCount = 0; public onRVAdClosed(Placement placement, Integer rewardedCount) { - super("supersonicRVAdClosed"); + super("ironsourceRVAdClosed"); if(placement != null) { this.placement = placement.getRewardName(); this.rewardedCount = rewardedCount; } - logger.log("{supersonic} RVAd rewarded received:", this.placement, this.rewardedCount); + logger.log("{ironsource} RVAd rewarded received:", this.placement, this.rewardedCount); } } @@ -339,8 +339,8 @@ public class onRVAvailabilityChange extends Event { boolean available; public onRVAvailabilityChange(boolean available) { - super("supersonicOnRVAvailabilityChange"); - logger.log("{supersonic} supersonicOnRVAvailabilityChange:", available); + super("ironsourceOnRVAvailabilityChange"); + logger.log("{ironsource} ironsourceOnRVAvailabilityChange:", available); this.available = available; } } @@ -352,12 +352,12 @@ private String getUserId(String json) { JSONObject jsonObject = new JSONObject(json); userId = jsonObject.getString("user_id"); } catch (Exception e) { - logger.log("{supersonic} exception", e); + logger.log("{ironsource} exception", e); } return userId; } - public SupersonicPlugin() { + public IronsourcePlugin() { } public void onCreateApplication(Context applicationContext) { @@ -371,20 +371,20 @@ public void onCreate(Activity activity, Bundle savedInstanceState) { try { Bundle meta = manager.getApplicationInfo(activity.getApplicationContext().getPackageName(), PackageManager.GET_META_DATA).metaData; - appKey = meta.getString("supersonicAppKey"); + appKey = meta.getString("ironsourceAppKey"); } catch (Exception e) { - logger.log("{supersonic} Exception while loading manifest keys:", e); + logger.log("{ironsource} Exception while loading manifest keys:", e); } - logger.log("{supersonic} Installing for appKey:", appKey); + logger.log("{ironsource} Installing for appKey:", appKey); if(listener == null) { - listener = new SupersonicListener(); + listener = new IronsourceListener(); } } public void initInterstitial(String jsonData) { - logger.log("{supersonic} Init Interstitial"); + logger.log("{ironsource} Init Interstitial"); SSAFactory.getAdvertiserInstance().reportAppStarted(_ctx); IronSource.setInterstitialListener(listener); @@ -394,7 +394,7 @@ public void initInterstitial(String jsonData) { } public void initVideoAd(String jsonData) { - logger.log("{supersonic} Init video Ad"); + logger.log("{ironsource} Init video Ad"); SSAFactory.getAdvertiserInstance().reportAppStarted(_activity); SupersonicConfig.getConfigObj().setClientSideCallbacks(true); @@ -404,7 +404,7 @@ public void initVideoAd(String jsonData) { } public void initOfferWallAd(String jsonData) { - logger.log("{supersonic} Init offerwall Ad"); + logger.log("{ironsource} Init offerwall Ad"); SSAFactory.getAdvertiserInstance().reportAppStarted(_ctx); SupersonicConfig.getConfigObj().setClientSideCallbacks(true); @@ -414,7 +414,7 @@ public void initOfferWallAd(String jsonData) { } public void cacheInterstitial(String jsonData) { - logger.log("{supersonic} loadInterstitial"); + logger.log("{ironsource} loadInterstitial"); _activity.runOnUiThread(new Runnable() { public void run() { IronSource.loadInterstitial(); @@ -423,7 +423,7 @@ public void run() { } public void showInterstitial(String jsonData) { - logger.log("{supersonic} showInterstitial called"); + logger.log("{ironsource} showInterstitial called"); _activity.runOnUiThread(new Runnable() { public void run() { IronSource.showInterstitial(); @@ -432,7 +432,7 @@ public void run() { } public void showOffersForUserID(String jsonData) { - logger.log("{supersonic} showOffers called"); + logger.log("{ironsource} showOffers called"); if(IronSource.isOfferwallAvailable()) { IronSource.showOfferwall(); diff --git a/build/providers/supersonic/android/files/mediationsdk-6.6.1.jar b/build/providers/ironsource/android/files/mediationsdk-6.6.1.jar similarity index 100% rename from build/providers/supersonic/android/files/mediationsdk-6.6.1.jar rename to build/providers/ironsource/android/files/mediationsdk-6.6.1.jar diff --git a/build/providers/supersonic/android/xmlApplication.xml b/build/providers/ironsource/android/xmlApplication.xml similarity index 89% rename from build/providers/supersonic/android/xmlApplication.xml rename to build/providers/ironsource/android/xmlApplication.xml index 9892eff..fbc07a9 100644 --- a/build/providers/supersonic/android/xmlApplication.xml +++ b/build/providers/ironsource/android/xmlApplication.xml @@ -1,5 +1,5 @@ - - + + + diff --git a/build/providers/ironsource/android/xslKeys.xsl b/build/providers/ironsource/android/xslKeys.xsl new file mode 100644 index 0000000..9ea8e89 --- /dev/null +++ b/build/providers/ironsource/android/xslKeys.xsl @@ -0,0 +1 @@ + diff --git a/build/providers/ironsource/android/xslTemplates.xsl b/build/providers/ironsource/android/xslTemplates.xsl new file mode 100644 index 0000000..3fba29d --- /dev/null +++ b/build/providers/ironsource/android/xslTemplates.xsl @@ -0,0 +1,3 @@ + + + diff --git a/build/providers/supersonic/ios/config.json b/build/providers/ironsource/ios/config.json similarity index 100% rename from build/providers/supersonic/ios/config.json rename to build/providers/ironsource/ios/config.json diff --git a/build/providers/supersonic/ios/files/Supersonic.framework/Headers/SUSupersonicAdsConfiguration.h b/build/providers/ironsource/ios/files/Supersonic.framework/Headers/SUSupersonicAdsConfiguration.h similarity index 100% rename from build/providers/supersonic/ios/files/Supersonic.framework/Headers/SUSupersonicAdsConfiguration.h rename to build/providers/ironsource/ios/files/Supersonic.framework/Headers/SUSupersonicAdsConfiguration.h diff --git a/build/providers/supersonic/ios/files/Supersonic.framework/Headers/Supersonic.h b/build/providers/ironsource/ios/files/Supersonic.framework/Headers/Supersonic.h similarity index 100% rename from build/providers/supersonic/ios/files/Supersonic.framework/Headers/Supersonic.h rename to build/providers/ironsource/ios/files/Supersonic.framework/Headers/Supersonic.h diff --git a/build/providers/supersonic/ios/files/Supersonic.framework/Headers/SupersonicConfiguration.h b/build/providers/ironsource/ios/files/Supersonic.framework/Headers/SupersonicConfiguration.h similarity index 100% rename from build/providers/supersonic/ios/files/Supersonic.framework/Headers/SupersonicConfiguration.h rename to build/providers/ironsource/ios/files/Supersonic.framework/Headers/SupersonicConfiguration.h diff --git a/build/providers/supersonic/ios/files/Supersonic.framework/Headers/SupersonicConfigurationProtocol.h b/build/providers/ironsource/ios/files/Supersonic.framework/Headers/SupersonicConfigurationProtocol.h similarity index 100% rename from build/providers/supersonic/ios/files/Supersonic.framework/Headers/SupersonicConfigurationProtocol.h rename to build/providers/ironsource/ios/files/Supersonic.framework/Headers/SupersonicConfigurationProtocol.h diff --git a/build/providers/supersonic/ios/files/Supersonic.framework/Headers/SupersonicEventsReporting.h b/build/providers/ironsource/ios/files/Supersonic.framework/Headers/SupersonicEventsReporting.h similarity index 100% rename from build/providers/supersonic/ios/files/Supersonic.framework/Headers/SupersonicEventsReporting.h rename to build/providers/ironsource/ios/files/Supersonic.framework/Headers/SupersonicEventsReporting.h diff --git a/build/providers/supersonic/ios/files/Supersonic.framework/Headers/SupersonicGender.h b/build/providers/ironsource/ios/files/Supersonic.framework/Headers/SupersonicGender.h similarity index 100% rename from build/providers/supersonic/ios/files/Supersonic.framework/Headers/SupersonicGender.h rename to build/providers/ironsource/ios/files/Supersonic.framework/Headers/SupersonicGender.h diff --git a/build/providers/supersonic/ios/files/Supersonic.framework/Headers/SupersonicISDelegate.h b/build/providers/ironsource/ios/files/Supersonic.framework/Headers/SupersonicISDelegate.h similarity index 100% rename from build/providers/supersonic/ios/files/Supersonic.framework/Headers/SupersonicISDelegate.h rename to build/providers/ironsource/ios/files/Supersonic.framework/Headers/SupersonicISDelegate.h diff --git a/build/providers/supersonic/ios/files/Supersonic.framework/Headers/SupersonicIntegrationHelper.h b/build/providers/ironsource/ios/files/Supersonic.framework/Headers/SupersonicIntegrationHelper.h similarity index 100% rename from build/providers/supersonic/ios/files/Supersonic.framework/Headers/SupersonicIntegrationHelper.h rename to build/providers/ironsource/ios/files/Supersonic.framework/Headers/SupersonicIntegrationHelper.h diff --git a/build/providers/supersonic/ios/files/Supersonic.framework/Headers/SupersonicLOGDelegate.h b/build/providers/ironsource/ios/files/Supersonic.framework/Headers/SupersonicLOGDelegate.h similarity index 100% rename from build/providers/supersonic/ios/files/Supersonic.framework/Headers/SupersonicLOGDelegate.h rename to build/providers/ironsource/ios/files/Supersonic.framework/Headers/SupersonicLOGDelegate.h diff --git a/build/providers/supersonic/ios/files/Supersonic.framework/Headers/SupersonicOWDelegate.h b/build/providers/ironsource/ios/files/Supersonic.framework/Headers/SupersonicOWDelegate.h similarity index 100% rename from build/providers/supersonic/ios/files/Supersonic.framework/Headers/SupersonicOWDelegate.h rename to build/providers/ironsource/ios/files/Supersonic.framework/Headers/SupersonicOWDelegate.h diff --git a/build/providers/supersonic/ios/files/Supersonic.framework/Headers/SupersonicPlacementInfo.h b/build/providers/ironsource/ios/files/Supersonic.framework/Headers/SupersonicPlacementInfo.h similarity index 100% rename from build/providers/supersonic/ios/files/Supersonic.framework/Headers/SupersonicPlacementInfo.h rename to build/providers/ironsource/ios/files/Supersonic.framework/Headers/SupersonicPlacementInfo.h diff --git a/build/providers/supersonic/ios/files/Supersonic.framework/Headers/SupersonicRVDelegate.h b/build/providers/ironsource/ios/files/Supersonic.framework/Headers/SupersonicRVDelegate.h similarity index 100% rename from build/providers/supersonic/ios/files/Supersonic.framework/Headers/SupersonicRVDelegate.h rename to build/providers/ironsource/ios/files/Supersonic.framework/Headers/SupersonicRVDelegate.h diff --git a/build/providers/supersonic/ios/files/Supersonic.framework/Supersonic b/build/providers/ironsource/ios/files/Supersonic.framework/Supersonic similarity index 100% rename from build/providers/supersonic/ios/files/Supersonic.framework/Supersonic rename to build/providers/ironsource/ios/files/Supersonic.framework/Supersonic diff --git a/build/providers/supersonic/ios/files/Supersonic.framework/button-close-default.png b/build/providers/ironsource/ios/files/Supersonic.framework/button-close-default.png similarity index 100% rename from build/providers/supersonic/ios/files/Supersonic.framework/button-close-default.png rename to build/providers/ironsource/ios/files/Supersonic.framework/button-close-default.png diff --git a/build/providers/supersonic/ios/files/Supersonic.framework/button-close-highlighted.png b/build/providers/ironsource/ios/files/Supersonic.framework/button-close-highlighted.png similarity index 100% rename from build/providers/supersonic/ios/files/Supersonic.framework/button-close-highlighted.png rename to build/providers/ironsource/ios/files/Supersonic.framework/button-close-highlighted.png diff --git a/build/providers/supersonic/ios/files/SupersonicPlugin.h b/build/providers/ironsource/ios/files/SupersonicPlugin.h similarity index 100% rename from build/providers/supersonic/ios/files/SupersonicPlugin.h rename to build/providers/ironsource/ios/files/SupersonicPlugin.h diff --git a/build/providers/supersonic/ios/files/SupersonicPlugin.mm b/build/providers/ironsource/ios/files/SupersonicPlugin.mm similarity index 100% rename from build/providers/supersonic/ios/files/SupersonicPlugin.mm rename to build/providers/ironsource/ios/files/SupersonicPlugin.mm diff --git a/build/providers/supersonic/android/xslKeys.xsl b/build/providers/supersonic/android/xslKeys.xsl deleted file mode 100644 index 46cf0f4..0000000 --- a/build/providers/supersonic/android/xslKeys.xsl +++ /dev/null @@ -1 +0,0 @@ - diff --git a/build/providers/supersonic/android/xslTemplates.xsl b/build/providers/supersonic/android/xslTemplates.xsl deleted file mode 100644 index f6055a9..0000000 --- a/build/providers/supersonic/android/xslTemplates.xsl +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/js/index.js b/js/index.js index 60aeffb..e3bccb9 100644 --- a/js/index.js +++ b/js/index.js @@ -17,7 +17,7 @@ var is_rv_available = false; */ var is_ow_available = false; -var Supersonic = Class(Emitter, function (supr) { +var Ironsource = Class(Emitter, function (supr) { this.init = function() { supr(this, 'init', arguments); @@ -88,28 +88,28 @@ var Supersonic = Class(Emitter, function (supr) { } }); - NATIVE.events.registerHandler("SupersonicAdDismissed", function() { - logger.log("{supersonic} ad dismissed "); + NATIVE.events.registerHandler("ironsourceAdDismissed", function() { + logger.log("{ironSource} ad dismissed "); if (typeof onAdDismissed === "function") { onAdDismissed(); } }); - NATIVE.events.registerHandler("SupersonicAdAvailable", function() { - logger.log("{supersonic} ad available"); + NATIVE.events.registerHandler("ironsourceAdAvailable", function() { + logger.log("{ironSource} ad available"); if (typeof onAdAvailable === "function") { - onAdAvailable("supersonic"); + onAdAvailable("ironSource"); } }); - NATIVE.events.registerHandler("SupersonicAdNotAvailable", function() { - logger.log("{supersonic} ad not available"); + NATIVE.events.registerHandler("ironsourceAdNotAvailable", function() { + logger.log("{ironSource} ad not available"); if (typeof onAdNotAvailable === "function") { onAdNotAvailable(); } }); - function onRWAvailabilityChange(is_rv_connected) { + logger.log("Rewarded Video is now available before asigning"); var available = is_rv_connected && is_online; if (available != is_rv_available) { @@ -123,12 +123,12 @@ var Supersonic = Class(Emitter, function (supr) { } }; - NATIVE.events.registerHandler('supersonicRVAdClosed', function(evt) { + NATIVE.events.registerHandler('ironsourceRVAdClosed', function(evt) { this.onVideoClosed(rv_source, evt.placement, evt.rewardedCount); rv_source = null; }); - NATIVE.events.registerHandler('supersonicOnRVAvailabilityChange', function(evt) { + NATIVE.events.registerHandler('ironsourceOnRVAvailabilityChange', function(evt) { onRWAvailabilityChange(evt.available); }); @@ -148,11 +148,11 @@ var Supersonic = Class(Emitter, function (supr) { }; this.showInterstitial = function() { - NATIVE.plugins.sendEvent("SupersonicPlugin", "showInterstitial", JSON.stringify({})); + NATIVE.plugins.sendEvent("IronsourcePlugin", "showInterstitial", JSON.stringify({})); }; this.cacheInterstitial = function() { - NATIVE.plugins.sendEvent("SupersonicPlugin", "cacheInterstitial", JSON.stringify({})); + NATIVE.plugins.sendEvent("IronsourcePlugin", "cacheInterstitial", JSON.stringify({})); } this.isOWAdAvailable = function() { @@ -160,13 +160,14 @@ var Supersonic = Class(Emitter, function (supr) { }; this.isVideoAdAvailable = function() { + logger.log("{ironSource} isVideoAdAvailable plugin function "); return is_rv_available === true; }; this.initInterstitial = function(user_id) { this.user_id = user_id; - NATIVE.plugins.sendEvent("SupersonicPlugin", "initInterstitial", JSON.stringify({ + NATIVE.plugins.sendEvent("IronsourcePlugin", "initInterstitial", JSON.stringify({ user_id: user_id })); }; @@ -174,13 +175,13 @@ var Supersonic = Class(Emitter, function (supr) { this.initVideoAd = function(user_id) { this.user_id = user_id; - NATIVE.plugins.sendEvent("SupersonicPlugin", "initVideoAd", JSON.stringify({ + NATIVE.plugins.sendEvent("IronsourcePlugin", "initVideoAd", JSON.stringify({ user_id: user_id })); }; this.initOfferWallAd = function(user_id) { - NATIVE.plugins.sendEvent("SupersonicPlugin", "initOfferWallAd", JSON.stringify({ + NATIVE.plugins.sendEvent("IronsourcePlugin", "initOfferWallAd", JSON.stringify({ user_id: user_id })); }; @@ -188,16 +189,16 @@ var Supersonic = Class(Emitter, function (supr) { this.showVideoAd = function(placement_name) { rv_source = placement_name; - NATIVE.plugins.sendEvent("SupersonicPlugin", "showRVAd", JSON.stringify({ + NATIVE.plugins.sendEvent("IronsourcePlugin", "showRVAd", JSON.stringify({ placementName: placement_name })); }; this.showOWAd = function(userid) { - NATIVE.plugins.sendEvent("SupersonicPlugin", "showOffersForUserID", JSON.stringify({ + NATIVE.plugins.sendEvent("IronsourcePlugin", "showOffersForUserID", JSON.stringify({ userID: userid })); }; }); -exports = new Supersonic(); +exports = new Ironsource(); diff --git a/package.json b/package.json index c663fc3..3d8c55f 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "2.0.5", "devkit": { "clientPaths": { - "supersonic": "js" + "ironsource": "js" }, "extensions": { "ios": "ios",