From a09807038a39696c80bf71d0f22220a2beb942f3 Mon Sep 17 00:00:00 2001 From: Mobile Ads Developer Relations Date: Thu, 8 Aug 2024 23:14:47 -0700 Subject: [PATCH] No public description PiperOrigin-RevId: 661134892 --- Chartboost/CHANGELOG.md | 122 +++++++++++ Chartboost/LICENSE | 202 ++++++++++++++++++ Chartboost/README.md | 8 + Chartboost/build.gradle | 100 +++++++++ Chartboost/package.json | 22 ++ .../Mediation/Chartboost/Api.meta | 8 + .../Mediation/Chartboost/Api/Chartboost.cs | 76 +++++++ .../Chartboost/Api/Chartboost.cs.meta | 13 ++ .../Chartboost/Api/ChartboostClientFactory.cs | 36 ++++ .../Api/ChartboostClientFactory.cs.meta | 13 ++ .../Mediation/Chartboost/Api/Core.meta | 8 + .../Api/Core/CBCCPADataUseConsent.cs | 33 +++ .../Api/Core/CBCCPADataUseConsent.cs.meta | 11 + .../Api/Core/CBGDPRDataUseConsent.cs | 33 +++ .../Api/Core/CBGDPRDataUseConsent.cs.meta | 11 + ...MobileAds.Mediation.Chartboost.Core.asmdef | 6 + ...eAds.Mediation.Chartboost.Core.asmdef.meta | 7 + ...eMobileAds.Mediation.Chartboost.Api.asmdef | 12 ++ ...leAds.Mediation.Chartboost.Api.asmdef.meta | 7 + .../Mediation/Chartboost/Common.meta | 8 + ...bileAds.Mediation.Chartboost.Common.asmdef | 8 + ...ds.Mediation.Chartboost.Common.asmdef.meta | 7 + .../Chartboost/Common/IChartboostClient.cs | 27 +++ .../Common/IChartboostClient.cs.meta | 13 ++ .../Chartboost/Common/PlaceholderClient.cs | 46 ++++ .../Common/PlaceholderClient.cs.meta | 13 ++ .../Mediation/Chartboost/Editor.meta | 8 + .../ChartboostMediationDependencies.xml | 31 +++ .../ChartboostMediationDependencies.xml.meta | 7 + .../Mediation/Chartboost/Platforms.meta | 8 + .../Chartboost/Platforms/Android.meta | 8 + .../Platforms/Android/ChartboostClient.cs | 126 +++++++++++ .../Android/ChartboostClient.cs.meta | 13 ++ ...ileAds.Mediation.Chartboost.Android.asmdef | 9 + ...s.Mediation.Chartboost.Android.asmdef.meta | 7 + .../Mediation/Chartboost/Platforms/iOS.meta | 8 + .../Platforms/iOS/ChartboostClient.cs | 54 +++++ .../Platforms/iOS/ChartboostClient.cs.meta | 13 ++ .../Chartboost/Platforms/iOS/Externs.cs | 37 ++++ .../Chartboost/Platforms/iOS/Externs.cs.meta | 13 ++ ...eMobileAds.Mediation.Chartboost.iOS.asmdef | 9 + ...leAds.Mediation.Chartboost.iOS.asmdef.meta | 7 + .../Mediation/Chartboost/Plugins.meta | 8 + .../Mediation/Chartboost/Plugins/iOS.meta | 8 + .../Plugins/iOS/GADUMChartboostInterface.m | 57 +++++ .../iOS/GADUMChartboostInterface.m.meta | 31 +++ 46 files changed, 1312 insertions(+) create mode 100644 Chartboost/CHANGELOG.md create mode 100644 Chartboost/LICENSE create mode 100644 Chartboost/README.md create mode 100644 Chartboost/build.gradle create mode 100644 Chartboost/package.json create mode 100644 Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api.meta create mode 100644 Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/Chartboost.cs create mode 100644 Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/Chartboost.cs.meta create mode 100644 Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/ChartboostClientFactory.cs create mode 100644 Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/ChartboostClientFactory.cs.meta create mode 100644 Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/Core.meta create mode 100644 Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/Core/CBCCPADataUseConsent.cs create mode 100644 Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/Core/CBCCPADataUseConsent.cs.meta create mode 100644 Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/Core/CBGDPRDataUseConsent.cs create mode 100644 Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/Core/CBGDPRDataUseConsent.cs.meta create mode 100644 Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/Core/GoogleMobileAds.Mediation.Chartboost.Core.asmdef create mode 100644 Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/Core/GoogleMobileAds.Mediation.Chartboost.Core.asmdef.meta create mode 100644 Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/GoogleMobileAds.Mediation.Chartboost.Api.asmdef create mode 100644 Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/GoogleMobileAds.Mediation.Chartboost.Api.asmdef.meta create mode 100644 Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Common.meta create mode 100644 Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Common/GoogleMobileAds.Mediation.Chartboost.Common.asmdef create mode 100644 Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Common/GoogleMobileAds.Mediation.Chartboost.Common.asmdef.meta create mode 100644 Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Common/IChartboostClient.cs create mode 100644 Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Common/IChartboostClient.cs.meta create mode 100644 Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Common/PlaceholderClient.cs create mode 100644 Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Common/PlaceholderClient.cs.meta create mode 100644 Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Editor.meta create mode 100644 Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Editor/ChartboostMediationDependencies.xml create mode 100644 Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Editor/ChartboostMediationDependencies.xml.meta create mode 100644 Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms.meta create mode 100644 Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/Android.meta create mode 100644 Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/Android/ChartboostClient.cs create mode 100644 Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/Android/ChartboostClient.cs.meta create mode 100644 Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/Android/GoogleMobileAds.Mediation.Chartboost.Android.asmdef create mode 100644 Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/Android/GoogleMobileAds.Mediation.Chartboost.Android.asmdef.meta create mode 100644 Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/iOS.meta create mode 100644 Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/iOS/ChartboostClient.cs create mode 100644 Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/iOS/ChartboostClient.cs.meta create mode 100644 Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/iOS/Externs.cs create mode 100644 Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/iOS/Externs.cs.meta create mode 100644 Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/iOS/GoogleMobileAds.Mediation.Chartboost.iOS.asmdef create mode 100644 Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/iOS/GoogleMobileAds.Mediation.Chartboost.iOS.asmdef.meta create mode 100644 Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Plugins.meta create mode 100644 Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Plugins/iOS.meta create mode 100644 Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Plugins/iOS/GADUMChartboostInterface.m create mode 100644 Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Plugins/iOS/GADUMChartboostInterface.m.meta diff --git a/Chartboost/CHANGELOG.md b/Chartboost/CHANGELOG.md new file mode 100644 index 0000000..c85551f --- /dev/null +++ b/Chartboost/CHANGELOG.md @@ -0,0 +1,122 @@ +## Chartboost Unity Mediation Plugin Changelog + +#### Version Next +- Renamed `DummyClient` to `PlaceholderClient`. + +#### [Version 4.6.0](https://dl.google.com/googleadmobadssdk/mediation/unity/chartboost/ChartboostUnityAdapter-4.6.0.zip) +- Supports [Chartboost Android adapter version 9.7.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/chartboost/CHANGELOG.md#version-9700). +- Supports [Chartboost iOS adapter version 9.7.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Chartboost/CHANGELOG.md#version-9700). +- Built and tested with the Google Mobile Ads Unity Plugin version 9.0.0. + +#### [Version 4.5.0](https://dl.google.com/googleadmobadssdk/mediation/unity/chartboost/ChartboostUnityAdapter-4.5.0.zip) +- Supports [Chartboost Android adapter version 9.6.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/chartboost/CHANGELOG.md#version-9600). +- Supports [Chartboost iOS adapter version 9.6.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Chartboost/CHANGELOG.md#version-9600). +- Built and tested with the Google Mobile Ads Unity Plugin version 8.6.0. + +#### [Version 4.4.0](https://dl.google.com/googleadmobadssdk/mediation/unity/chartboost/ChartboostUnityAdapter-4.4.0.zip) +- Supports [Chartboost Android adapter version 9.5.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/chartboost/CHANGELOG.md#version-9500). +- Supports [Chartboost iOS adapter version 9.5.1.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Chartboost/CHANGELOG.md#version-9510). +- Built and tested with the Google Mobile Ads Unity Plugin version 8.5.3. + +#### [Version 4.3.0](https://dl.google.com/googleadmobadssdk/mediation/unity/chartboost/ChartboostUnityAdapter-4.3.0.zip) +- Supports [Chartboost Android adapter version 9.4.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/chartboost/CHANGELOG.md#version-9400). +- Supports [Chartboost iOS adapter version 9.4.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Chartboost/CHANGELOG.md#version-9400). +- Built and tested with the Google Mobile Ads Unity Plugin version 8.5.0. + +#### [Version 4.2.0](https://dl.google.com/googleadmobadssdk/mediation/unity/chartboost/ChartboostUnityAdapter-4.2.0.zip) +- Supports [Chartboost Android adapter version 9.3.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/chartboost/CHANGELOG.md#version-9300). +- Supports [Chartboost iOS adapter version 9.3.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Chartboost/CHANGELOG.md#version-9300). +- Built and tested with the Google Mobile Ads Unity Plugin version 8.2.0. + +#### [Version 4.1.1](https://dl.google.com/googleadmobadssdk/mediation/unity/chartboost/ChartboostUnityAdapter-4.1.1.zip) +- Moved adapter content to `GoogleMobileAds/Mediation/Chartboost/`. +- Refactored adapter namespace to use `GoogleMobileAds.Mediation.Chartboost`. +- Supports [Chartboost Android adapter version 9.2.1.1](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/chartboost/CHANGELOG.md#version-9211). +- Supports [Chartboost iOS adapter version 9.2.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Chartboost/CHANGELOG.md#version-9200). +- Built and tested with the Google Mobile Ads Unity Plugin version 8.1.0. + +#### [Version 4.1.0](https://dl.google.com/googleadmobadssdk/mediation/unity/chartboost/ChartboostUnityAdapter-4.1.0.zip) +- Supports [Chartboost Android adapter version 9.2.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/chartboost/CHANGELOG.md#version-9200). +- Supports [Chartboost iOS adapter version 9.2.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Chartboost/CHANGELOG.md#version-9200). +- Built and tested with the Google Mobile Ads Unity Plugin version 7.4.1. + +#### [Version 4.0.0](https://dl.google.com/googleadmobadssdk/mediation/unity/chartboost/ChartboostUnityAdapter-4.0.0.zip) +- Supports [Chartboost Android adapter version 9.1.1.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/chartboost/CHANGELOG.md#version-9110). +- Supports [Chartboost iOS adapter version 9.1.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Chartboost/CHANGELOG.md#version-9100). +- Built and tested with the Google Mobile Ads Unity Plugin version 7.3.0. + +#### [Version 3.5.1](https://dl.google.com/googleadmobadssdk/mediation/unity/chartboost/ChartboostUnityAdapter-3.5.1.zip) +- Supports [Chartboost Android adapter version 8.4.3.1](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/chartboost/CHANGELOG.md#version-8431). +- Supports [Chartboost iOS adapter version 8.5.0.2](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Chartboost/CHANGELOG.md#version-8502). +- Built and tested with the Google Mobile Ads Unity Plugin version 7.0.2. + +#### [Version 3.5.0](https://dl.google.com/googleadmobadssdk/mediation/unity/chartboost/ChartboostUnityAdapter-3.5.0.zip) +- Supports [Chartboost Android adapter version 8.4.2.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/chartboost/CHANGELOG.md#version-8420). +- Supports [Chartboost iOS adapter version 8.5.0.2](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Chartboost/CHANGELOG.md#version-8502). +- Built and tested with the Google Mobile Ads Unity Plugin version 7.0.0. + +#### [Version 3.4.1](https://dl.google.com/googleadmobadssdk/mediation/unity/chartboost/ChartboostUnityAdapter-3.4.1.zip) +- Supports [Chartboost Android adapter version 8.3.1.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/chartboost/CHANGELOG.md#version-8310). +- Supports [Chartboost iOS adapter version 8.5.0.2](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Chartboost/CHANGELOG.md#version-8502). +- Built and tested with the Google Mobile Ads Unity Plugin version 7.0.0. + +#### [Version 3.4.0](https://dl.google.com/googleadmobadssdk/mediation/unity/chartboost/ChartboostUnityAdapter-3.4.0.zip) +- Supports [Chartboost Android adapter version 8.3.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/chartboost/CHANGELOG.md#version-8300). +- Supports [Chartboost iOS adapter version 8.5.0.1.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Chartboost/CHANGELOG.md#version-85010). + +#### [Version 3.3.1](https://dl.google.com/googleadmobadssdk/mediation/unity/chartboost/ChartboostUnityAdapter-3.3.1.zip) +- Supports [Chartboost Android adapter version 8.2.1.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/chartboost/CHANGELOG.md#version-8210). +- Supports [Chartboost iOS adapter version 8.4.1.1](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Chartboost/CHANGELOG.md#version-8411). + +#### [Version 3.3.0](https://dl.google.com/googleadmobadssdk/mediation/unity/chartboost/ChartboostUnityAdapter-3.3.0.zip) +- Supports [Chartboost Android adapter version 8.2.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/chartboost/CHANGELOG.md#version-8200). +- Supports [Chartboost iOS adapter version 8.4.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Chartboost/CHANGELOG.md#version-8400). + +#### [Version 3.2.0](https://dl.google.com/googleadmobadssdk/mediation/unity/chartboost/ChartboostUnityAdapter-3.2.0.zip) +- Supports [Chartboost Android adapter version 8.1.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/chartboost/CHANGELOG.md#version-8100). +- Supports [Chartboost iOS adapter version 8.3.1.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Chartboost/CHANGELOG.md#version-8310). + +#### [Version 3.1.0](https://dl.google.com/googleadmobadssdk/mediation/unity/chartboost/ChartboostUnityAdapter-3.1.0.zip) +- Removed `RestrictDataCollection()` method from the `Chartboost` class. +- Added `AddDataUseConsent()` helper methods to pass GDPR and CCPA information to Chartboost. +- Supports [Chartboost Android adapter version 8.1.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/chartboost/CHANGELOG.md#version-8100). +- Supports [Chartboost iOS adapter version 8.2.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Chartboost/CHANGELOG.md#version-8200). + +#### [Version 3.0.1](https://dl.google.com/googleadmobadssdk/mediation/unity/chartboost/ChartboostUnityAdapter-3.0.1.zip) +- Supports [Chartboost Android adapter version 8.0.3.1](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/chartboost/CHANGELOG.md#version-8031). +- Supports [Chartboost iOS adapter version 8.1.0.1](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Chartboost/CHANGELOG.md#version-8101). + +#### [Version 3.0.0](https://dl.google.com/googleadmobadssdk/mediation/unity/chartboost/ChartboostUnityAdapter-3.0.0.zip) +- Supports [Chartboost Android adapter version 8.0.2.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/chartboost/CHANGELOG.md#version-8020). +- Supports [Chartboost iOS adapter version 8.1.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Chartboost/CHANGELOG.md#version-8100). + +#### Version 2.0.1 +- Supports [Chartboost Android adapter version 7.5.0.1](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/chartboost/CHANGELOG.md#version-7501). +- Supports [Chartboost iOS adapter version 8.0.4.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Chartboost/CHANGELOG.md#version-8040). + +#### Version 2.0.0 +- Supports Chartboost Android adapter version 7.5.0.0. +- Supports Chartboost iOS adapter version 8.0.1.1. + +#### Version 1.3.0 +- Updated the plugin to support the new Rewarded API. +- Supports Chartboost Android adapter version 7.3.1.1. +- Supports Chartboost iOS adapter version 7.5.0.0. + +#### Version 1.2.0 +- Supports Chartboost Android adapter version 7.3.0.0. +- Supports Chartboost iOS adapter version 7.3.0.0. + +#### Version 1.1.1 +- Supports Chartboost Android adapter version 7.2.0.1. +- Supports Chartboost iOS adapter version 7.2.0.1. + +#### Version 1.1.0 +- Supports Chartboost Android SDK version 7.2.0. +- Supports Chartboost iOS SDK version 7.2.0. +- Added `Chartboost.RestrictDataCollection()` method to enable GDPR data collection restrictions for the Chartboost SDK. + +#### Version 1.0.0 +- First release! +- Supports Chartboost Android SDK version 7.0.1. +- Supports Chartboost iOS SDK version 7.1.2. diff --git a/Chartboost/LICENSE b/Chartboost/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/Chartboost/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Chartboost/README.md b/Chartboost/README.md new file mode 100644 index 0000000..f1cf90e --- /dev/null +++ b/Chartboost/README.md @@ -0,0 +1,8 @@ +# Chartboost Adapter plugin for Google Mobile Ads SDK for Unity 3D + +This is a plugin to be used in conjunction with the Google Mobile Ads SDK in +Google Play services. For requirements, instructions, and other info, see the +[Chartboost Adapter Integration Guide](https://developers.google.com/admob/unity/mediation/chartboost). + +See the [changelog](https://developers.google.com/admob/unity/mediation/chartboost#chartboost-unity-mediation-plugin-changelog) +to view the version history. diff --git a/Chartboost/build.gradle b/Chartboost/build.gradle new file mode 100644 index 0000000..cb58dee --- /dev/null +++ b/Chartboost/build.gradle @@ -0,0 +1,100 @@ +/* +* Gradle file to build a Unity package to add Chartboost mediation support to the Google Mobile +* Ads Unity plugin. +* Usage: ./gradlew exportPackage +*/ +defaultTasks 'exportPackage' + +// Project level variables. +project.ext { + unity_exe = System.getProperty("UNITY_EXE") + if (unity_exe == null || unity_exe.isEmpty()) { + unity_exe = System.getenv("UNITY_EXE") + } + if (unity_exe == null || unity_exe.isEmpty()) { + unity_exe = '/Applications/Unity/Unity.app/Contents/MacOS/Unity' + } + + if (!file(unity_exe).exists()) { + throw new GradleException('Unable to locate installation of Unity. Please create a ' + + 'UNITY_EXE environment variable and point it to your Unity installation.') + } + + versionString = '4.6.0' + adapterName = 'Chartboost' + pluginName = "GoogleMobileAds${adapterName}Mediation" + pluginFileName = "${pluginName}.unitypackage" + zipName = "${adapterName}UnityAdapter-${versionString}" + zipFileName = "${zipName}.zip" + pluginSource = file('source/plugin').absolutePath + pluginBuildDir = file('temp/plugin-build-dir').absolutePath + buildPath = file('temp').absolutePath + exportPath = file(pluginFileName).absolutePath +} + +// Build unity package using through command line interface. +// Create new unity project with files in temporary build directory and export files to a unity package. +// Command line usage and arguments documented at http://docs.unity3d.com/Manual/CommandLineArguments.html. +task exportPackage(type: Exec) { + description = "Creates and exports the Plugin unity package" + executable "${unity_exe}" + args "-g.building", + "-batchmode", + "-projectPath", "${pluginBuildDir}", + "-logFile", "temp/unity.log", + "-exportPackage", + "Assets/GoogleMobileAds", + "${exportPath}", + "-quit" + + ignoreExitValue true + + doLast { + if (executionResult.get().exitValue != 0) { + copy { + from "temp/" + into "./" + include "unity.log" + } + } + } +} + +task createTempBuildFolder(type: Copy) { + from { "${pluginSource}" } + into { "${pluginBuildDir}" } +} + +task clearTempBuildFolder(type: Delete) { + delete { "${buildPath}" } +} + +exportPackage.dependsOn(createTempBuildFolder) +exportPackage.finalizedBy(clearTempBuildFolder) + +/** + * Delete task to delete any previously generated .zip files by makeZip task. + * makeZip depends on this task. + */ +task clearZip(type: Delete) { + // Targets to be deleted. + delete(zipFileName) +} + +/** + * Zip task to make a zip archive. This task depends on exportPackage and clearZip tasks. + */ +task makeZip(type: Zip) { + // Targets to be added to the zip archive. + from('./' + pluginFileName, './README.md') + from('./' + pluginFileName, './LICENSE') + // Root directory name for the zip archive. + into(zipName) + // Name of the zip archive. + archiveFileName = zipFileName + // Destination directory in which the archive needs to be saved. + destinationDirectory = file('.') +} + +makeZip.dependsOn([clearZip, exportPackage]) +makeZip.mustRunAfter([clearZip, exportPackage]) diff --git a/Chartboost/package.json b/Chartboost/package.json new file mode 100644 index 0000000..b5b9a8f --- /dev/null +++ b/Chartboost/package.json @@ -0,0 +1,22 @@ +{ + "name": "com.google.ads.mobile.mediation.chartboost", + "version": "4.6.0", + "displayName": "Google Mobile Ads Chartboost Mediation", + "keywords": [ + "Google", + "Mobile", + "Ads", + "Mediation", + "vh-name:GoogleMobileAdsMediationChartboost", + "vh-name:Google Mobile Ads Chartboost Mediation" + ], + "author": { + "name": "Google LLC", + "url": "https://github.com/googleads/googleads-mobile-unity" + }, + "description": "The Google Mobile Ads mediation plugin for Chartboost package allows you to load and display ads from Chartboost using mediation, covering waterfall and bidding integrations.", + "unity": "2019.4", + "dependencies": { + "com.google.ads.mobile": "9.0.0" + } +} diff --git a/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api.meta b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api.meta new file mode 100644 index 0000000..1a1cbba --- /dev/null +++ b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8689859b7c7cf4578a38007ce5aaa58d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/Chartboost.cs b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/Chartboost.cs new file mode 100644 index 0000000..1dba347 --- /dev/null +++ b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/Chartboost.cs @@ -0,0 +1,76 @@ +// Copyright 2018 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using UnityEngine; + +using GoogleMobileAds.Mediation.Chartboost.Common; + +namespace GoogleMobileAds.Mediation.Chartboost.Api +{ + public class Chartboost + { + internal static readonly IChartboostClient client = GetChartboostClient(); + + private static IChartboostClient GetChartboostClient() + { + return ChartboostClientFactory.ChartboostInstance (); + } + + public static void AddDataUseConsent(CBGDPRDataUseConsent gdprConsent) + { + client.AddDataUseConsent(gdprConsent); + } + + public static void AddDataUseConsent(CBCCPADataUseConsent ccpaConsent) + { + client.AddDataUseConsent(ccpaConsent); + } + + public static void AddDataUseConsent(string customConsentName, string customConsentValue) + { + if (customConsentName == null || customConsentValue == null) + { + Debug.Log("Invalid custom consent name or value."); + return; + } + + client.AddDataUseConsent(customConsentName, customConsentValue); + } + } +} + +namespace GoogleMobileAds.Api.Mediation.Chartboost +{ + [System.Obsolete("Use `GoogleMobileAds.Mediation.Chartboost.Api.Chartboost` instead.")] + public class Chartboost + { + public static void AddDataUseConsent( + GoogleMobileAds.Mediation.Chartboost.Api.CBGDPRDataUseConsent gdprConsent) + { + GoogleMobileAds.Mediation.Chartboost.Api.Chartboost.AddDataUseConsent(gdprConsent); + } + + public static void AddDataUseConsent( + GoogleMobileAds.Mediation.Chartboost.Api.CBCCPADataUseConsent ccpaConsent) + { + GoogleMobileAds.Mediation.Chartboost.Api.Chartboost.AddDataUseConsent(ccpaConsent); + } + + public static void AddDataUseConsent(string customConsentName, string customConsentValue) + { + GoogleMobileAds.Mediation.Chartboost.Api.Chartboost + .AddDataUseConsent(customConsentName, customConsentValue); + } + } +} diff --git a/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/Chartboost.cs.meta b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/Chartboost.cs.meta new file mode 100644 index 0000000..e3fc72d --- /dev/null +++ b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/Chartboost.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 57b1ddc0c7dc34d2cb1113b42b699fc7 +timeCreated: 1526430624 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/ChartboostClientFactory.cs b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/ChartboostClientFactory.cs new file mode 100644 index 0000000..6b4851f --- /dev/null +++ b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/ChartboostClientFactory.cs @@ -0,0 +1,36 @@ +// Copyright 2018 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using GoogleMobileAds.Mediation.Chartboost.Common; + +namespace GoogleMobileAds.Mediation.Chartboost +{ + public class ChartboostClientFactory + { + public static IChartboostClient ChartboostInstance() + { + #if UNITY_EDITOR + // Testing UNITY_EDITOR first because the editor also responds to the currently + // selected platform. + return new GoogleMobileAds.Mediation.Chartboost.Common.PlaceholderClient(); + #elif UNITY_ANDROID + return GoogleMobileAds.Mediation.Chartboost.Android.ChartboostClient.Instance; + #elif UNITY_IOS + return GoogleMobileAds.Mediation.Chartboost.iOS.ChartboostClient.Instance; + #else + return new GoogleMobileAds.Mediation.Chartboost.Common.PlaceholderClient(); + #endif + } + } +} diff --git a/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/ChartboostClientFactory.cs.meta b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/ChartboostClientFactory.cs.meta new file mode 100644 index 0000000..dc386ea --- /dev/null +++ b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/ChartboostClientFactory.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 0e751bfb1453447009630485229a0ee1 +timeCreated: 1526430624 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/Core.meta b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/Core.meta new file mode 100644 index 0000000..a5331fa --- /dev/null +++ b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/Core.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a40a312a47a774b7da91993ecec3491f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/Core/CBCCPADataUseConsent.cs b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/Core/CBCCPADataUseConsent.cs new file mode 100644 index 0000000..808074a --- /dev/null +++ b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/Core/CBCCPADataUseConsent.cs @@ -0,0 +1,33 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +namespace GoogleMobileAds.Mediation.Chartboost.Api +{ + /// + /// Consent options for CCPA compliance. + /// + public enum CBCCPADataUseConsent + { + /// + /// User does not consent to the sale of their personal information in compliance with CCPA. + /// + OptOutSale = 0, + + /// + /// User consents to the sale of their personal information in compliance with CCPA. + /// + OptInSale, + } +} diff --git a/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/Core/CBCCPADataUseConsent.cs.meta b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/Core/CBCCPADataUseConsent.cs.meta new file mode 100644 index 0000000..caaf5e2 --- /dev/null +++ b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/Core/CBCCPADataUseConsent.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 08113f9b23261469abc638f761e496ab +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/Core/CBGDPRDataUseConsent.cs b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/Core/CBGDPRDataUseConsent.cs new file mode 100644 index 0000000..9418da8 --- /dev/null +++ b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/Core/CBGDPRDataUseConsent.cs @@ -0,0 +1,33 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +namespace GoogleMobileAds.Mediation.Chartboost.Api +{ + /// + /// Consent options for GDPR compliance. + /// + public enum CBGDPRDataUseConsent + { + /// + /// User does not consent to behavioral targeting in compliance with GDPR. + /// + NonBehavioral = 0, + + /// + /// User consents to behavioral targeting in compliance with GDPR. + /// + Behavioral, + } +} diff --git a/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/Core/CBGDPRDataUseConsent.cs.meta b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/Core/CBGDPRDataUseConsent.cs.meta new file mode 100644 index 0000000..d860424 --- /dev/null +++ b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/Core/CBGDPRDataUseConsent.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5272c17ebe9eb4b949005862d4d50f9d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/Core/GoogleMobileAds.Mediation.Chartboost.Core.asmdef b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/Core/GoogleMobileAds.Mediation.Chartboost.Core.asmdef new file mode 100644 index 0000000..490dfb2 --- /dev/null +++ b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/Core/GoogleMobileAds.Mediation.Chartboost.Core.asmdef @@ -0,0 +1,6 @@ +{ + "name": "GoogleMobileAds.Mediation.Chartboost.Core", + "references": [], + "includePlatforms": [], + "excludePlatforms": [] +} diff --git a/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/Core/GoogleMobileAds.Mediation.Chartboost.Core.asmdef.meta b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/Core/GoogleMobileAds.Mediation.Chartboost.Core.asmdef.meta new file mode 100644 index 0000000..1e223e9 --- /dev/null +++ b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/Core/GoogleMobileAds.Mediation.Chartboost.Core.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e4b2b54c7f84b42f6ba03a4dc0c60767 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/GoogleMobileAds.Mediation.Chartboost.Api.asmdef b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/GoogleMobileAds.Mediation.Chartboost.Api.asmdef new file mode 100644 index 0000000..5e567ef --- /dev/null +++ b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/GoogleMobileAds.Mediation.Chartboost.Api.asmdef @@ -0,0 +1,12 @@ +{ + "name": "GoogleMobileAds.Mediation.Chartboost.Api", + "references": [ + "GoogleMobileAds.Api.Mediation", + "GoogleMobileAds.Mediation.Chartboost.Common", + "GoogleMobileAds.Mediation.Chartboost.Core", + "GoogleMobileAds.Mediation.Chartboost.Android", + "GoogleMobileAds.Mediation.Chartboost.iOS" + ], + "includePlatforms": [], + "excludePlatforms": [] +} diff --git a/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/GoogleMobileAds.Mediation.Chartboost.Api.asmdef.meta b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/GoogleMobileAds.Mediation.Chartboost.Api.asmdef.meta new file mode 100644 index 0000000..4e4ed49 --- /dev/null +++ b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Api/GoogleMobileAds.Mediation.Chartboost.Api.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f29d10c7313684292b5e092e342d01d0 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Common.meta b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Common.meta new file mode 100644 index 0000000..ffae7f8 --- /dev/null +++ b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Common.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e8824fd24b6ee487aa962154ea8ffd39 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Common/GoogleMobileAds.Mediation.Chartboost.Common.asmdef b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Common/GoogleMobileAds.Mediation.Chartboost.Common.asmdef new file mode 100644 index 0000000..0873e47 --- /dev/null +++ b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Common/GoogleMobileAds.Mediation.Chartboost.Common.asmdef @@ -0,0 +1,8 @@ +{ + "name": "GoogleMobileAds.Mediation.Chartboost.Common", + "references": [ + "GoogleMobileAds.Mediation.Chartboost.Core" + ], + "includePlatforms": [], + "excludePlatforms": [] +} diff --git a/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Common/GoogleMobileAds.Mediation.Chartboost.Common.asmdef.meta b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Common/GoogleMobileAds.Mediation.Chartboost.Common.asmdef.meta new file mode 100644 index 0000000..75b176a --- /dev/null +++ b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Common/GoogleMobileAds.Mediation.Chartboost.Common.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9a67bec694dca4d17a80acb06e358d12 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Common/IChartboostClient.cs b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Common/IChartboostClient.cs new file mode 100644 index 0000000..4ccb936 --- /dev/null +++ b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Common/IChartboostClient.cs @@ -0,0 +1,27 @@ +// Copyright 2018 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using System; + +using GoogleMobileAds.Mediation.Chartboost.Api; + +namespace GoogleMobileAds.Mediation.Chartboost.Common +{ + public interface IChartboostClient + { + void AddDataUseConsent(CBGDPRDataUseConsent gdprConsent); + void AddDataUseConsent(CBCCPADataUseConsent ccpaConsent); + void AddDataUseConsent(string customConsentName, string customConsentValue); + } +} diff --git a/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Common/IChartboostClient.cs.meta b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Common/IChartboostClient.cs.meta new file mode 100644 index 0000000..7c3caba --- /dev/null +++ b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Common/IChartboostClient.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: f8f931199b7bf4905859ae46fe9fe495 +timeCreated: 1526430624 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Common/PlaceholderClient.cs b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Common/PlaceholderClient.cs new file mode 100644 index 0000000..5bf51b1 --- /dev/null +++ b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Common/PlaceholderClient.cs @@ -0,0 +1,46 @@ +// Copyright 2018 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using System; +using System.Reflection; + +using UnityEngine; + +using GoogleMobileAds.Mediation.Chartboost.Api; + +namespace GoogleMobileAds.Mediation.Chartboost.Common +{ + public class PlaceholderClient : IChartboostClient + { + public PlaceholderClient () + { + Debug.Log ("Placeholder " + MethodBase.GetCurrentMethod ().Name); + } + + public void AddDataUseConsent(CBGDPRDataUseConsent gdprConsent) + { + Debug.Log ("Placeholder " + MethodBase.GetCurrentMethod().Name); + } + + public void AddDataUseConsent(CBCCPADataUseConsent ccpaConsent) + { + Debug.Log ("Placeholder " + MethodBase.GetCurrentMethod().Name); + } + + public void AddDataUseConsent(string customConsentName, string customConsentValue) + { + Debug.Log ("Placeholder " + MethodBase.GetCurrentMethod().Name); + } + } +} diff --git a/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Common/PlaceholderClient.cs.meta b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Common/PlaceholderClient.cs.meta new file mode 100644 index 0000000..c304eec --- /dev/null +++ b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Common/PlaceholderClient.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 7f39d430b5936446f8551547a4731e8c +timeCreated: 1526430624 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Editor.meta b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Editor.meta new file mode 100644 index 0000000..877a504 --- /dev/null +++ b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5479fb0b389e5418c8bfff734c043aa3 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Editor/ChartboostMediationDependencies.xml b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Editor/ChartboostMediationDependencies.xml new file mode 100644 index 0000000..e6b73a0 --- /dev/null +++ b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Editor/ChartboostMediationDependencies.xml @@ -0,0 +1,31 @@ + + + + + + + https://repo.maven.apache.org/maven2/ + https://dl.google.com/dl/android/maven2/ + https://cboost.jfrog.io/artifactory/chartboost-ads/ + + + + + + + + diff --git a/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Editor/ChartboostMediationDependencies.xml.meta b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Editor/ChartboostMediationDependencies.xml.meta new file mode 100644 index 0000000..4d5f597 --- /dev/null +++ b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Editor/ChartboostMediationDependencies.xml.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 05941deca2ea84b2d97e2d0b85f2761a +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms.meta b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms.meta new file mode 100644 index 0000000..2c4c8d3 --- /dev/null +++ b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8d2b0940ac7934362a39529989783457 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/Android.meta b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/Android.meta new file mode 100644 index 0000000..7d1163f --- /dev/null +++ b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/Android.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ec64416e41f6645d0b087dad9473cc06 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/Android/ChartboostClient.cs b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/Android/ChartboostClient.cs new file mode 100644 index 0000000..dfc2312 --- /dev/null +++ b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/Android/ChartboostClient.cs @@ -0,0 +1,126 @@ +// Copyright 2018 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#if UNITY_ANDROID + +using UnityEngine; + +using GoogleMobileAds.Mediation.Chartboost.Api; +using GoogleMobileAds.Mediation.Chartboost.Common; + +namespace GoogleMobileAds.Mediation.Chartboost.Android +{ + public class ChartboostClient : IChartboostClient + { + private const string chartboostSDKClass = "com.chartboost.sdk.Chartboost"; + private const string chartboostCustomPrivacyClass = + "com.chartboost.sdk.privacy.model.Custom"; + private const string chartboostGDPRModelClass = "com.chartboost.sdk.privacy.model.GDPR"; + private const string chartboostGDPRModelEnum = + "com.chartboost.sdk.privacy.model.GDPR$GDPR_CONSENT"; + private const string chartboostCCPAModelClass = "com.chartboost.sdk.privacy.model.CCPA"; + private const string chartboostCCPAModelEnum = + "com.chartboost.sdk.privacy.model.CCPA$CCPA_CONSENT"; + private const string UnityActivityClassName = "com.unity3d.player.UnityPlayer"; + + private static ChartboostClient instance = new ChartboostClient(); + private ChartboostClient() {} + + public static ChartboostClient Instance + { + get + { + return instance; + } + } + + public void AddDataUseConsent(CBGDPRDataUseConsent gdprConsent) + { + AndroidJavaClass chartboostGDPRConsentEnum = + new AndroidJavaClass(chartboostGDPRModelEnum); + AndroidJavaObject gdprConsentObject; + if (gdprConsent == CBGDPRDataUseConsent.NonBehavioral) + { + gdprConsentObject = + chartboostGDPRConsentEnum.GetStatic("NON_BEHAVIORAL"); + } + else if (gdprConsent == CBGDPRDataUseConsent.Behavioral) + { + gdprConsentObject = + chartboostGDPRConsentEnum.GetStatic("BEHAVIORAL"); + } + else + { + MonoBehaviour.print("Invalid Chartboost GDPR consent configuration."); + return; + } + + AndroidJavaObject currentActivity = getCurrentActivityAndroidJavaObject(); + AndroidJavaObject dataUseConsent = + new AndroidJavaObject(chartboostGDPRModelClass, gdprConsentObject); + AndroidJavaClass chartboost = new AndroidJavaClass(chartboostSDKClass); + chartboost.CallStatic("addDataUseConsent", currentActivity, dataUseConsent); + } + + public void AddDataUseConsent(CBCCPADataUseConsent ccpaConsent) + { + AndroidJavaClass chartboostCCPAConsentEnum = + new AndroidJavaClass(chartboostCCPAModelEnum); + AndroidJavaObject ccpaConsentObject; + if (ccpaConsent == CBCCPADataUseConsent.OptOutSale) + { + ccpaConsentObject = + chartboostCCPAConsentEnum.GetStatic("OPT_OUT_SALE"); + } + else if (ccpaConsent == CBCCPADataUseConsent.OptInSale) + { + ccpaConsentObject = + chartboostCCPAConsentEnum.GetStatic("OPT_IN_SALE"); + } + else + { + MonoBehaviour.print("Invalid Chartboost CCPA consent configuration."); + return; + } + + AndroidJavaObject currentActivity = getCurrentActivityAndroidJavaObject(); + AndroidJavaObject dataUseConsent = + new AndroidJavaObject(chartboostCCPAModelClass, ccpaConsentObject); + AndroidJavaClass chartboost = new AndroidJavaClass(chartboostSDKClass); + chartboost.CallStatic("addDataUseConsent", currentActivity, dataUseConsent); + } + + public void AddDataUseConsent(string customConsentName, string customConsentValue) + { + AndroidJavaObject currentActivity = getCurrentActivityAndroidJavaObject(); + AndroidJavaObject dataUseConsent = + new AndroidJavaObject(chartboostCustomPrivacyClass, customConsentName, + customConsentValue); + AndroidJavaClass chartboost = new AndroidJavaClass(chartboostSDKClass); + chartboost.CallStatic("addDataUseConsent", currentActivity, dataUseConsent); + } + + // Private utility methods + + private AndroidJavaObject getCurrentActivityAndroidJavaObject() + { + AndroidJavaClass unityPlayer = new AndroidJavaClass(UnityActivityClassName); + AndroidJavaObject currentActivity = + unityPlayer.GetStatic("currentActivity"); + return currentActivity; + } + } +} + +#endif diff --git a/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/Android/ChartboostClient.cs.meta b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/Android/ChartboostClient.cs.meta new file mode 100644 index 0000000..9a16d7e --- /dev/null +++ b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/Android/ChartboostClient.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: ad562f2da17044dcb90fa7fac8765d6f +timeCreated: 1526430624 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/Android/GoogleMobileAds.Mediation.Chartboost.Android.asmdef b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/Android/GoogleMobileAds.Mediation.Chartboost.Android.asmdef new file mode 100644 index 0000000..4bc2b7a --- /dev/null +++ b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/Android/GoogleMobileAds.Mediation.Chartboost.Android.asmdef @@ -0,0 +1,9 @@ +{ + "name": "GoogleMobileAds.Mediation.Chartboost.Android", + "references": [ + "GoogleMobileAds.Mediation.Chartboost.Core", + "GoogleMobileAds.Mediation.Chartboost.Common" + ], + "includePlatforms": [], + "excludePlatforms": [] +} diff --git a/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/Android/GoogleMobileAds.Mediation.Chartboost.Android.asmdef.meta b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/Android/GoogleMobileAds.Mediation.Chartboost.Android.asmdef.meta new file mode 100644 index 0000000..01214b2 --- /dev/null +++ b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/Android/GoogleMobileAds.Mediation.Chartboost.Android.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 196bfc610cd184257b121f8667c5f3cb +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/iOS.meta b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/iOS.meta new file mode 100644 index 0000000..b9da542 --- /dev/null +++ b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/iOS.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4d1388375abc74bce95587ca74ccc8b4 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/iOS/ChartboostClient.cs b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/iOS/ChartboostClient.cs new file mode 100644 index 0000000..c5741b2 --- /dev/null +++ b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/iOS/ChartboostClient.cs @@ -0,0 +1,54 @@ +// Copyright 2018 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#if UNITY_IOS + +using UnityEngine; + +using GoogleMobileAds.Mediation.Chartboost.Api; +using GoogleMobileAds.Mediation.Chartboost.Common; + +namespace GoogleMobileAds.Mediation.Chartboost.iOS +{ + public class ChartboostClient : IChartboostClient + { + private static ChartboostClient instance = new ChartboostClient(); + private ChartboostClient() {} + + public static ChartboostClient Instance + { + get + { + return instance; + } + } + + public void AddDataUseConsent(CBGDPRDataUseConsent gdprConsent) + { + Externs.GADUMChartboostAddGDPRDataUseConsent((int)gdprConsent); + } + + public void AddDataUseConsent(CBCCPADataUseConsent ccpaConsent) + { + Externs.GADUMChartboostAddCCPADataUseConsent((int)ccpaConsent); + } + + public void AddDataUseConsent(string customConsentName, string customConsentValue) + { + Externs.GADUMChartboostAddCustomDataUseConsent(customConsentName, customConsentValue); + } + } +} + +#endif diff --git a/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/iOS/ChartboostClient.cs.meta b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/iOS/ChartboostClient.cs.meta new file mode 100644 index 0000000..668866b --- /dev/null +++ b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/iOS/ChartboostClient.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: f712206ea18b84b70943ded29ff3f84a +timeCreated: 1526430624 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/iOS/Externs.cs b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/iOS/Externs.cs new file mode 100644 index 0000000..ad6540d --- /dev/null +++ b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/iOS/Externs.cs @@ -0,0 +1,37 @@ +// Copyright 2018 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#if UNITY_IOS + +using System; +using System.Runtime.InteropServices; + +namespace GoogleMobileAds.Mediation.Chartboost.iOS +{ + // Externs used by the iOS component. + internal class Externs + { + [DllImport("__Internal")] + internal static extern void GADUMChartboostAddGDPRDataUseConsent(int gdprConsent); + + [DllImport("__Internal")] + internal static extern void GADUMChartboostAddCCPADataUseConsent(int ccpaConsent); + + [DllImport("__Internal")] + internal static extern void GADUMChartboostAddCustomDataUseConsent(string customConsentName, + string customConsentValue); + } +} + +#endif diff --git a/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/iOS/Externs.cs.meta b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/iOS/Externs.cs.meta new file mode 100644 index 0000000..bb83f25 --- /dev/null +++ b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/iOS/Externs.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 91fe07fe71ad5490583f4efe24cbe97e +timeCreated: 1526430624 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/iOS/GoogleMobileAds.Mediation.Chartboost.iOS.asmdef b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/iOS/GoogleMobileAds.Mediation.Chartboost.iOS.asmdef new file mode 100644 index 0000000..79d7979 --- /dev/null +++ b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/iOS/GoogleMobileAds.Mediation.Chartboost.iOS.asmdef @@ -0,0 +1,9 @@ +{ + "name": "GoogleMobileAds.Mediation.Chartboost.iOS", + "references": [ + "GoogleMobileAds.Mediation.Chartboost.Core", + "GoogleMobileAds.Mediation.Chartboost.Common" + ], + "includePlatforms": [], + "excludePlatforms": [] +} diff --git a/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/iOS/GoogleMobileAds.Mediation.Chartboost.iOS.asmdef.meta b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/iOS/GoogleMobileAds.Mediation.Chartboost.iOS.asmdef.meta new file mode 100644 index 0000000..6b4cc2a --- /dev/null +++ b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Platforms/iOS/GoogleMobileAds.Mediation.Chartboost.iOS.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8e36a041c19684f93a8a9cf231d05a8e +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Plugins.meta b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Plugins.meta new file mode 100644 index 0000000..be4b535 --- /dev/null +++ b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Plugins.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 64ba57b6a872843a89a7c7a7bdb51053 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Plugins/iOS.meta b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Plugins/iOS.meta new file mode 100644 index 0000000..a0c644f --- /dev/null +++ b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Plugins/iOS.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b26c1e22a66334868a7f6ae07d4fe95a +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Plugins/iOS/GADUMChartboostInterface.m b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Plugins/iOS/GADUMChartboostInterface.m new file mode 100644 index 0000000..7587be7 --- /dev/null +++ b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Plugins/iOS/GADUMChartboostInterface.m @@ -0,0 +1,57 @@ +// Copyright 2018 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#import + +void GADUMChartboostAddGDPRDataUseConsent(int GDPRConsent) { + CHBGDPRDataUseConsent *chbGDPRconsent; + switch (GDPRConsent) { + case CHBGDPRConsentNonBehavioral: + chbGDPRconsent = [CHBGDPRDataUseConsent gdprConsent:CHBGDPRConsentNonBehavioral]; + break; + case CHBGDPRConsentBehavioral: + chbGDPRconsent = [CHBGDPRDataUseConsent gdprConsent:CHBGDPRConsentBehavioral]; + break; + default: + NSLog(@"Invalid Chartboost GDPR consent value."); + return; + } + + [Chartboost addDataUseConsent:chbGDPRconsent]; +} + +void GADUMChartboostAddCCPADataUseConsent(int CCPAConsent) { + CHBCCPADataUseConsent *chbCCPAconsent; + switch (CCPAConsent) { + case CHBCCPAConsentOptOutSale: + chbCCPAconsent = [CHBCCPADataUseConsent ccpaConsent:CHBCCPAConsentOptOutSale]; + break; + case CHBCCPAConsentOptInSale: + chbCCPAconsent = [CHBCCPADataUseConsent ccpaConsent:CHBCCPAConsentOptInSale]; + break; + default: + NSLog(@"Invalid Chartboost CCPA consent value."); + return; + } + + [Chartboost addDataUseConsent:chbCCPAconsent]; +} + +void GADUMChartboostAddCustomDataUseConsent(const char *_Nonnull customConsentName, + const char *_Nonnull customConsentValue) { + CHBCustomDataUseConsent *customDataConsent = + [CHBCustomDataUseConsent customConsentWithPrivacyStandard:@(customConsentName) + consent:@(customConsentValue)]; + [Chartboost addDataUseConsent:customDataConsent]; +} diff --git a/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Plugins/iOS/GADUMChartboostInterface.m.meta b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Plugins/iOS/GADUMChartboostInterface.m.meta new file mode 100644 index 0000000..52dc178 --- /dev/null +++ b/Chartboost/source/plugin/Assets/GoogleMobileAds/Mediation/Chartboost/Plugins/iOS/GADUMChartboostInterface.m.meta @@ -0,0 +1,31 @@ +fileFormatVersion: 2 +guid: 41334661906444412a8b877e7d716e70 +timeCreated: 1526431207 +licenseType: Pro +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + - first: + iPhone: iOS + second: + enabled: 1 + settings: {} + userData: + assetBundleName: + assetBundleVariant: