diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 7742c5a6c..774e04e24 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -20,7 +20,6 @@ jobs: fail-fast: false matrix: regex: - - "samples/admob/adaptive_banner_example" - "samples/admob/app_open_example" - "samples/admob/banner_example" - "samples/admob/interstitial_example" @@ -30,7 +29,7 @@ jobs: - "samples/admob/rewarded_example" - "samples/admob/rewarded_interstitial_example" steps: - - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: fetch-depth: 0 - name: "Install Flutter" @@ -52,7 +51,6 @@ jobs: fail-fast: false matrix: regex: - - "samples/admob/adaptive_banner_example" - "samples/admob/app_open_example" - "samples/admob/banner_example" - "samples/admob/interstitial_example" @@ -62,9 +60,11 @@ jobs: - "samples/admob/rewarded_example" - "samples/admob/rewarded_interstitial_example" steps: - - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: - fetch-depth: 0 + fetch-depth: 0 + - name: Select Xcode version + run: sudo xcode-select -s '/Applications/Xcode_16.3.0.app/Contents/Developer' - name: "Install Flutter" run: ./.github/workflows/scripts/install-flutter.sh stable - name: "Install Tools" @@ -85,7 +85,6 @@ jobs: fail-fast: false matrix: regex: - - "samples/admob/adaptive_banner_example" - "samples/admob/app_open_example" - "samples/admob/banner_example" - "samples/admob/interstitial_example" @@ -95,7 +94,7 @@ jobs: - "samples/admob/rewarded_example" - "samples/admob/rewarded_interstitial_example" steps: - - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: fetch-depth: 0 - name: "Install Flutter" @@ -107,11 +106,13 @@ jobs: - name: "Flutter Analyze" run: | cd $GOOGLEMOBILEADS_PLUGIN_SCOPE_EXAMPLE + flutter clean + flutter pub get flutter analyze env: GOOGLEMOBILEADS_PLUGIN_SCOPE_EXAMPLE: ${{ matrix.REGEX }} - name: "Flutter Format" run: | - flutter pub global activate flutter_plugin_tools - flutter pub global run flutter_plugin_tools format + dart format --version + dart format samples/ --language-version latest ./.github/workflows/scripts/validate-formatting.sh diff --git a/.github/workflows/cancel.yaml b/.github/workflows/cancel.yaml index 54c4b5807..c0f41e7af 100644 --- a/.github/workflows/cancel.yaml +++ b/.github/workflows/cancel.yaml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 3 steps: - - uses: styfle/cancel-workflow-action@0.11.0 + - uses: styfle/cancel-workflow-action@0.12.1 with: workflow_id: 5958127 access_token: ${{ github.token }} diff --git a/.github/workflows/gma_mediation_applovin.yaml b/.github/workflows/gma_mediation_applovin.yaml new file mode 100644 index 000000000..8d648f831 --- /dev/null +++ b/.github/workflows/gma_mediation_applovin.yaml @@ -0,0 +1,97 @@ +# 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 +# +# https://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. + +name: gma_mediation_applovin + +on: + pull_request: + paths: + - "packages/mediation/gma_mediation_applovin/**" + - ".github/workflows/gma_mediation_applovin.yaml" + - "packages/mediation/gma_mediation_applovin/ios/**" + - "packages/mediation/gma_mediation_applovin/android/**" + push: + branches: + - main + +jobs: + android: + runs-on: macos-latest + if: github.event_name == 'pull_request' + timeout-minutes: 30 + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + with: + fetch-depth: 0 + - uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '17' + - name: "Install Flutter" + run: ./.github/workflows/scripts/install-flutter.sh stable + - name: "Install Tools" + run: ./.github/workflows/scripts/install-tools.sh + - name: "Build Example" + run: ./.github/workflows/scripts/build-example.sh android ./lib/main.dart packages/mediation/gma_mediation_applovin/example + - name: "Unit Tests" + run: | + cd packages/mediation/gma_mediation_applovin/example/android + ./gradlew :gma_mediation_applovin:testDebugUnitTest + + iOS: + runs-on: macos-latest + timeout-minutes: 40 + steps: + - uses: swift-actions/setup-swift@v2 + with: + swift-version: "5.7.2" + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + with: + fetch-depth: 0 + - name: Select Xcode version + run: sudo xcode-select -s '/Applications/Xcode_16.2.0.app/Contents/Developer' + - name: "Install Flutter" + run: ./.github/workflows/scripts/install-flutter.sh stable + - name: "Install Tools" + run: | + ./.github/workflows/scripts/install-tools.sh + - name: "Unit Tests" + run: | + cd packages/mediation/gma_mediation_applovin/example/ios + flutter clean + flutter pub get + flutter precache --ios + pod install --repo-update + xcodebuild -configuration Debug -resultBundlePath TestResults VERBOSE_SCRIPT_LOGGING=YES -workspace Runner.xcworkspace -scheme Runner -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 15,OS=17.5' test + - uses: actions/upload-artifact@v4 + if: failure() + with: + name: iOSTestResults + path: packages/mediation/gma_mediation_applovin/example/ios/TestResults.xcresult + flutter: + runs-on: ubuntu-latest + if: github.event_name == 'pull_request' + timeout-minutes: 30 + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + with: + fetch-depth: 0 + - name: "Install Flutter" + run: ./.github/workflows/scripts/install-flutter.sh stable + - name: "Install Tools" + run: ./.github/workflows/scripts/install-tools.sh + - name: "Flutter Analyze" + run: | + cd packages/mediation/gma_mediation_applovin/ + flutter analyze diff --git a/.github/workflows/gma_mediation_chartboost.yaml b/.github/workflows/gma_mediation_chartboost.yaml new file mode 100644 index 000000000..4589ecf6b --- /dev/null +++ b/.github/workflows/gma_mediation_chartboost.yaml @@ -0,0 +1,44 @@ +# 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 +# +# https://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. + +name: gma_mediation_chartboost + +on: + pull_request: + paths: + - "packages/mediation/gma_mediation_chartboost/**" + - ".github/workflows/gma_mediation_chartboost.yaml" + - "packages/mediation/gma_mediation_chartboost/ios/**" + - "packages/mediation/gma_mediation_chartboost/android/**" + push: + branches: + - main + +jobs: + flutter: + runs-on: ubuntu-latest + if: github.event_name == 'pull_request' + timeout-minutes: 30 + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + with: + fetch-depth: 0 + - name: "Install Flutter" + run: ./.github/workflows/scripts/install-flutter.sh stable + - name: "Install Tools" + run: ./.github/workflows/scripts/install-tools.sh + - name: "Flutter Analyze" + run: | + cd packages/mediation/gma_mediation_chartboost/ + flutter analyze diff --git a/.github/workflows/gma_mediation_dtexchange.yaml b/.github/workflows/gma_mediation_dtexchange.yaml new file mode 100644 index 000000000..8a2dbe17e --- /dev/null +++ b/.github/workflows/gma_mediation_dtexchange.yaml @@ -0,0 +1,97 @@ +# 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 +# +# https://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. + +name: gma_mediation_dtexchange + +on: + pull_request: + paths: + - "packages/mediation/gma_mediation_dtexchange/**" + - ".github/workflows/gma_mediation_dtexchange.yaml" + - "packages/mediation/gma_mediation_dtexchange/ios/**" + - "packages/mediation/gma_mediation_dtexchange/android/**" + push: + branches: + - main + +jobs: + android: + runs-on: macos-latest + if: github.event_name == 'pull_request' + timeout-minutes: 30 + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + with: + fetch-depth: 0 + - uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '17' + - name: "Install Flutter" + run: ./.github/workflows/scripts/install-flutter.sh stable + - name: "Install Tools" + run: ./.github/workflows/scripts/install-tools.sh + - name: "Build Example" + run: ./.github/workflows/scripts/build-example.sh android ./lib/main.dart packages/mediation/gma_mediation_dtexchange/example + - name: "Unit Tests" + run: | + cd packages/mediation/gma_mediation_dtexchange/example/android + ./gradlew :gma_mediation_dtexchange:testDebugUnitTest + + iOS: + runs-on: macos-latest + timeout-minutes: 40 + steps: + - uses: swift-actions/setup-swift@v2 + with: + swift-version: "6.0.0" + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + with: + fetch-depth: 0 + - name: Select Xcode version + run: sudo xcode-select -s '/Applications/Xcode_16.2.0.app/Contents/Developer' + - name: "Install Flutter" + run: ./.github/workflows/scripts/install-flutter.sh stable + - name: "Install Tools" + run: | + ./.github/workflows/scripts/install-tools.sh + - name: "Unit Tests" + run: | + cd packages/mediation/gma_mediation_dtexchange/example/ios + flutter clean + flutter pub get + flutter precache --ios + pod install + xcodebuild -configuration Debug -resultBundlePath TestResults VERBOSE_SCRIPT_LOGGING=YES -workspace Runner.xcworkspace -scheme Runner -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 15,OS=17.5' test + - uses: actions/upload-artifact@v4 + if: failure() + with: + name: iOSTestResults + path: packages/mediation/gma_mediation_dtexchange/example/ios/TestResults.xcresult + flutter: + runs-on: ubuntu-latest + if: github.event_name == 'pull_request' + timeout-minutes: 30 + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + with: + fetch-depth: 0 + - name: "Install Flutter" + run: ./.github/workflows/scripts/install-flutter.sh stable + - name: "Install Tools" + run: ./.github/workflows/scripts/install-tools.sh + - name: "Flutter Analyze" + run: | + cd packages/mediation/gma_mediation_dtexchange + flutter analyze diff --git a/.github/workflows/gma_mediation_inmobi.yaml b/.github/workflows/gma_mediation_inmobi.yaml new file mode 100644 index 000000000..944721f33 --- /dev/null +++ b/.github/workflows/gma_mediation_inmobi.yaml @@ -0,0 +1,44 @@ +# 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 +# +# https://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. + +name: gma_mediation_inmobi + +on: + pull_request: + paths: + - "packages/mediation/gma_mediation_inmobi/**" + - ".github/workflows/gma_mediation_inmobi.yaml" + - "packages/mediation/gma_mediation_inmobi/ios/**" + - "packages/mediation/gma_mediation_inmobi/android/**" + push: + branches: + - main + +jobs: + flutter: + runs-on: ubuntu-latest + if: github.event_name == 'pull_request' + timeout-minutes: 30 + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + with: + fetch-depth: 0 + - name: "Install Flutter" + run: ./.github/workflows/scripts/install-flutter.sh stable + - name: "Install Tools" + run: ./.github/workflows/scripts/install-tools.sh + - name: "Flutter Analyze" + run: | + cd packages/mediation/gma_mediation_inmobi + flutter analyze diff --git a/.github/workflows/gma_mediation_ironsource.yaml b/.github/workflows/gma_mediation_ironsource.yaml new file mode 100644 index 000000000..5807d8cb8 --- /dev/null +++ b/.github/workflows/gma_mediation_ironsource.yaml @@ -0,0 +1,96 @@ +# 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 +# +# https://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. + +name: gma_mediation_ironsource + +on: + pull_request: + paths: + - "packages/mediation/gma_mediation_ironsource/**" + - ".github/workflows/gma_mediation_ironsource.yaml" + - "packages/mediation/gma_mediation_ironsource/ios/**" + - "packages/mediation/gma_mediation_ironsource/android/**" + push: + branches: + - main + +jobs: + android: + runs-on: macos-latest + if: github.event_name == 'pull_request' + timeout-minutes: 30 + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + with: + fetch-depth: 0 + - uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '17' + - name: "Install Flutter" + run: ./.github/workflows/scripts/install-flutter.sh stable + - name: "Install Tools" + run: ./.github/workflows/scripts/install-tools.sh + - name: "Build Example" + run: ./.github/workflows/scripts/build-example.sh android ./lib/main.dart packages/mediation/gma_mediation_ironsource/example + - name: "Unit Tests" + run: | + cd packages/mediation/gma_mediation_ironsource/example/android + ./gradlew :gma_mediation_ironsource:testDebugUnitTest + iOS: + runs-on: macos-latest + timeout-minutes: 40 + steps: + - uses: swift-actions/setup-swift@v2 + with: + swift-version: "6.0.0" + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + with: + fetch-depth: 0 + - name: Select Xcode version + run: sudo xcode-select -s '/Applications/Xcode_16.2.0.app/Contents/Developer' + - name: "Install Flutter" + run: ./.github/workflows/scripts/install-flutter.sh stable + - name: "Install Tools" + run: | + ./.github/workflows/scripts/install-tools.sh + - name: "Unit Tests" + run: | + cd packages/mediation/gma_mediation_ironsource/example/ios + flutter clean + flutter pub get + flutter precache --ios + pod install + xcodebuild -configuration Debug -resultBundlePath TestResults VERBOSE_SCRIPT_LOGGING=YES -workspace Runner.xcworkspace -scheme Runner -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 15,OS=17.5' test + - uses: actions/upload-artifact@v4 + if: failure() + with: + name: iOSTestResults + path: packages/mediation/gma_mediation_ironsource/example/ios/TestResults.xcresult + flutter: + runs-on: ubuntu-latest + if: github.event_name == 'pull_request' + timeout-minutes: 30 + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + with: + fetch-depth: 0 + - name: "Install Flutter" + run: ./.github/workflows/scripts/install-flutter.sh stable + - name: "Install Tools" + run: ./.github/workflows/scripts/install-tools.sh + - name: "Flutter Analyze" + run: | + cd packages/mediation/gma_mediation_ironsource + flutter analyze diff --git a/.github/workflows/gma_mediation_liftoffmonetize.yaml b/.github/workflows/gma_mediation_liftoffmonetize.yaml new file mode 100644 index 000000000..6a20ad0b1 --- /dev/null +++ b/.github/workflows/gma_mediation_liftoffmonetize.yaml @@ -0,0 +1,98 @@ +# 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 +# +# https://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. + +name: gma_mediation_liftoffmonetize + +on: + pull_request: + paths: + - "packages/mediation/gma_mediation_liftoffmonetize/**" + - ".github/workflows/gma_mediation_liftoffmonetize.yaml" + - "packages/mediation/gma_mediation_liftoffmonetize/ios/**" + - "packages/mediation/gma_mediation_liftoffmonetize/android/**" + push: + branches: + - master + +jobs: + android: + runs-on: macos-latest + if: github.event_name == 'pull_request' + timeout-minutes: 30 + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + with: + fetch-depth: 0 + - uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '17' + - name: "Install Flutter" + run: ./.github/workflows/scripts/install-flutter.sh stable + - name: "Install Tools" + run: ./.github/workflows/scripts/install-tools.sh + - name: "Build Example" + run: ./.github/workflows/scripts/build-example.sh android ./lib/main.dart packages/mediation/gma_mediation_liftoffmonetize/example + - name: "Unit Tests" + run: | + cd packages/mediation/gma_mediation_liftoffmonetize/example/android + ./gradlew :gma_mediation_liftoffmonetize:testDebugUnitTest + + iOS: + runs-on: macos-latest + timeout-minutes: 40 + steps: + - uses: swift-actions/setup-swift@v2 + with: + swift-version: "5.7.2" + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + with: + fetch-depth: 0 + - name: Select Xcode version + run: sudo xcode-select -s '/Applications/Xcode_16.2.0.app/Contents/Developer' + - name: "Install Flutter" + run: ./.github/workflows/scripts/install-flutter.sh stable + - name: "Install Tools" + run: | + ./.github/workflows/scripts/install-tools.sh + - name: "Unit Tests" + run: | + cd packages/mediation/gma_mediation_liftoffmonetize/example/ios + flutter clean + flutter pub get + flutter precache --ios + pod install + xcodebuild -configuration Debug -resultBundlePath TestResults VERBOSE_SCRIPT_LOGGING=YES -workspace Runner.xcworkspace -scheme Runner -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 15,OS=17.5' test + - uses: actions/upload-artifact@v4 + if: failure() + with: + name: iOSTestResults + path: packages/mediation/gma_mediation_liftoffmonetize/example/ios/TestResults.xcresult + + flutter: + runs-on: ubuntu-latest + if: github.event_name == 'pull_request' + timeout-minutes: 30 + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + with: + fetch-depth: 0 + - name: "Install Flutter" + run: ./.github/workflows/scripts/install-flutter.sh stable + - name: "Install Tools" + run: ./.github/workflows/scripts/install-tools.sh + - name: "Flutter Analyze" + run: | + cd packages/mediation/gma_mediation_liftoffmonetize + flutter analyze diff --git a/.github/workflows/gma_mediation_meta.yaml b/.github/workflows/gma_mediation_meta.yaml new file mode 100644 index 000000000..ff7134bd3 --- /dev/null +++ b/.github/workflows/gma_mediation_meta.yaml @@ -0,0 +1,44 @@ +# 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 +# +# https://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. + +name: gma_mediation_meta + +on: + pull_request: + paths: + - "packages/mediation/gma_mediation_meta/**" + - ".github/workflows/gma_mediation_meta.yaml" + - "packages/mediation/gma_mediation_meta/ios/**" + - "packages/mediation/gma_mediation_meta/android/**" + push: + branches: + - main + +jobs: + flutter: + runs-on: ubuntu-latest + if: github.event_name == 'pull_request' + timeout-minutes: 30 + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + with: + fetch-depth: 0 + - name: "Install Flutter" + run: ./.github/workflows/scripts/install-flutter.sh stable + - name: "Install Tools" + run: ./.github/workflows/scripts/install-tools.sh + - name: "Flutter Analyze" + run: | + cd packages/mediation/gma_mediation_meta + flutter analyze diff --git a/.github/workflows/gma_mediation_mintegral.yaml b/.github/workflows/gma_mediation_mintegral.yaml new file mode 100644 index 000000000..bd9ff3e1d --- /dev/null +++ b/.github/workflows/gma_mediation_mintegral.yaml @@ -0,0 +1,44 @@ +# 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 +# +# https://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. + +name: gma_mediation_mintegral + +on: + pull_request: + paths: + - "packages/mediation/gma_mediation_mintegral/**" + - ".github/workflows/gma_mediation_mintegral.yaml" + - "packages/mediation/gma_mediation_mintegral/ios/**" + - "packages/mediation/gma_mediation_mintegral/android/**" + push: + branches: + - main + +jobs: + flutter: + runs-on: ubuntu-latest + if: github.event_name == 'pull_request' + timeout-minutes: 30 + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + with: + fetch-depth: 0 + - name: "Install Flutter" + run: ./.github/workflows/scripts/install-flutter.sh stable + - name: "Install Tools" + run: ./.github/workflows/scripts/install-tools.sh + - name: "Flutter Analyze" + run: | + cd packages/mediation/gma_mediation_mintegral + flutter analyze diff --git a/.github/workflows/gma_mediation_pangle.yaml b/.github/workflows/gma_mediation_pangle.yaml new file mode 100644 index 000000000..d4b573ef8 --- /dev/null +++ b/.github/workflows/gma_mediation_pangle.yaml @@ -0,0 +1,44 @@ +# 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 +# +# https://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. + +name: gma_mediation_pangle + +on: + pull_request: + paths: + - "packages/mediation/gma_mediation_pangle/**" + - ".github/workflows/gma_mediation_pangle.yaml" + - "packages/mediation/gma_mediation_pangle/ios/**" + - "packages/mediation/gma_mediation_pangle/android/**" + push: + branches: + - main + +jobs: + flutter: + runs-on: ubuntu-latest + if: github.event_name == 'pull_request' + timeout-minutes: 30 + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + with: + fetch-depth: 0 + - name: "Install Flutter" + run: ./.github/workflows/scripts/install-flutter.sh stable + - name: "Install Tools" + run: ./.github/workflows/scripts/install-tools.sh + - name: "Flutter Analyze" + run: | + cd packages/mediation/gma_mediation_pangle/ + flutter analyze diff --git a/.github/workflows/gma_mediation_unity.yaml b/.github/workflows/gma_mediation_unity.yaml new file mode 100644 index 000000000..e0fc3fffd --- /dev/null +++ b/.github/workflows/gma_mediation_unity.yaml @@ -0,0 +1,98 @@ +# 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 +# +# https://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. + +name: gma_mediation_unity + +on: + pull_request: + paths: + - "packages/mediation/gma_mediation_unity/**" + - ".github/workflows/gma_mediation_unity.yaml" + - "packages/mediation/gma_mediation_unity/ios/**" + - "packages/mediation/gma_mediation_unity/android/**" + push: + branches: + - main + +jobs: + android: + runs-on: macos-latest + if: github.event_name == 'pull_request' + timeout-minutes: 30 + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + with: + fetch-depth: 0 + - uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '17' + - name: "Install Flutter" + run: ./.github/workflows/scripts/install-flutter.sh stable + - name: "Install Tools" + run: ./.github/workflows/scripts/install-tools.sh + - name: "Build Example" + run: ./.github/workflows/scripts/build-example.sh android ./lib/main.dart packages/mediation/gma_mediation_unity/example + - name: "Unit Tests" + run: | + cd packages/mediation/gma_mediation_unity/example/android + ./gradlew :gma_mediation_unity:testDebugUnitTest + + iOS: + runs-on: macos-latest + timeout-minutes: 40 + steps: + - uses: swift-actions/setup-swift@v2 + with: + swift-version: "6.0.0" + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + with: + fetch-depth: 0 + - name: Select Xcode version + run: sudo xcode-select -s '/Applications/Xcode_16.2.0.app/Contents/Developer' + - name: "Install Flutter" + run: ./.github/workflows/scripts/install-flutter.sh stable + - name: "Install Tools" + run: | + ./.github/workflows/scripts/install-tools.sh + - name: "Unit Tests" + run: | + cd packages/mediation/gma_mediation_unity/example/ios + flutter clean + flutter pub get + flutter precache --ios + pod install + xcodebuild -configuration Debug -resultBundlePath TestResults VERBOSE_SCRIPT_LOGGING=YES -workspace Runner.xcworkspace -scheme Runner -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 15,OS=17.5' test + - uses: actions/upload-artifact@v4 + if: failure() + with: + name: iOSTestResults + path: packages/mediation/gma_mediation_unity/example/ios/TestResults.xcresult + + flutter: + runs-on: ubuntu-latest + if: github.event_name == 'pull_request' + timeout-minutes: 30 + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + with: + fetch-depth: 0 + - name: "Install Flutter" + run: ./.github/workflows/scripts/install-flutter.sh stable + - name: "Install Tools" + run: ./.github/workflows/scripts/install-tools.sh + - name: "Flutter Analyze" + run: | + cd packages/mediation/gma_mediation_unity/ + flutter analyze diff --git a/.github/workflows/google_mobile_ads.yaml b/.github/workflows/google_mobile_ads.yaml index 2b7c5ef2a..9024b03cb 100644 --- a/.github/workflows/google_mobile_ads.yaml +++ b/.github/workflows/google_mobile_ads.yaml @@ -23,7 +23,7 @@ on: - "packages/google_mobile_ads/android/**" push: branches: - - master + - main env: GOOGLEMOBILEADS_PLUGIN_SCOPE: "*google_mobile_ads*" @@ -34,10 +34,10 @@ jobs: if: github.event_name == 'pull_request' timeout-minutes: 30 steps: - - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: fetch-depth: 0 - - uses: actions/setup-java@v3 + - uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: '17' @@ -56,9 +56,11 @@ jobs: runs-on: macos-latest timeout-minutes: 40 steps: - - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: fetch-depth: 0 + - name: Select Xcode version + run: sudo xcode-select -s '/Applications/Xcode_16.3.0.app/Contents/Developer' - name: "Install Flutter" run: ./.github/workflows/scripts/install-flutter.sh stable - name: "Install Tools" @@ -72,8 +74,8 @@ jobs: flutter clean flutter pub get pod install - xcodebuild -configuration Debug -resultBundlePath TestResults VERBOSE_SCRIPT_LOGGING=YES -workspace Runner.xcworkspace -scheme Runner -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 14 Pro,OS=16.2' test - - uses: actions/upload-artifact@v3 + xcodebuild -configuration Debug -resultBundlePath TestResults VERBOSE_SCRIPT_LOGGING=YES -workspace Runner.xcworkspace -scheme Runner -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 16,OS=18.4' test + - uses: actions/upload-artifact@v4 if: failure() with: name: iOSTestResults @@ -83,7 +85,7 @@ jobs: if: github.event_name == 'pull_request' timeout-minutes: 30 steps: - - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: fetch-depth: 0 - name: "Install Flutter" @@ -97,13 +99,12 @@ jobs: - name: "Flutter Analyze" run: | cd packages/google_mobile_ads/ - flutter analyze + flutter analyze --no-fatal-warnings - name: "Flutter Publish" run: | cd packages/google_mobile_ads/ flutter pub publish --dry-run - name: "Flutter Format" run: | - flutter pub global activate flutter_plugin_tools - flutter pub global run flutter_plugin_tools format + dart format packages/google_mobile_ads/ ./.github/workflows/scripts/validate-formatting.sh diff --git a/.github/workflows/scripts/install-flutter.sh b/.github/workflows/scripts/install-flutter.sh index 38f4b8d3a..86677dd5f 100755 --- a/.github/workflows/scripts/install-flutter.sh +++ b/.github/workflows/scripts/install-flutter.sh @@ -14,5 +14,6 @@ # limitations under the License. BRANCH=$1 +git config --global core.autocrlf input git clone https://github.com/flutter/flutter.git --depth 1 -b $BRANCH _flutter echo "$GITHUB_WORKSPACE/_flutter/bin" >> $GITHUB_PATH diff --git a/analysis_options.yaml b/analysis_options.yaml index 5bc20088b..0585d64f7 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -15,6 +15,17 @@ include: package:pedantic/analysis_options.1.11.0.yaml analyzer: + exclude: [ + packages/mediation/gma_mediation_applovin/**, + packages/mediation/gma_mediation_dtexchange/** + packages/mediation/gma_mediation_inmobi/** + packages/mediation/gma_mediation_ironsource/** + packages/mediation/gma_mediation_liftoffmonetize/** + packages/mediation/gma_mediation_meta/** + packages/mediation/gma_mediation_mintegral/** + packages/mediation/gma_mediation_pangle/** + packages/mediation/gma_mediation_unity/** + ] errors: omit_local_variable_types: ignore diff --git a/packages/google_mobile_ads/CHANGELOG.md b/packages/google_mobile_ads/CHANGELOG.md index 499d324b5..c1026e399 100644 --- a/packages/google_mobile_ads/CHANGELOG.md +++ b/packages/google_mobile_ads/CHANGELOG.md @@ -1,3 +1,65 @@ +## 7.0.0 +* Added character limits expected for Native Ad Templates. Issues [1243](https://github.com/googleads/googleads-mobile-flutter/issues/1243) and [1332](https://github.com/googleads/googleads-mobile-flutter/issues/1332) +* Fixed padding for Native Ads small template. [Issue 1357](https://github.com/googleads/googleads-mobile-flutter/issues/1357) +* Updated to use Gradle plugin 9.2.1 [Issue 1361](https://github.com/googleads/googleads-mobile-flutter/issues/1361) +* Updates dependencies. [Issue 1366](https://github.com/googleads/googleads-mobile-flutter/issues/1366) +* Updates GMA [Android](https://developers.google.com/admob/android/rel-notes) dependency to 24.9.0 +* Updates GMA [iOS](https://developers.google.com/admob/ios/rel-notes) dependency to 12.14.0 +* Uses latest UMP SDK: + * [Android](https://developers.google.com/admob/android/privacy/release-notes) UMP SDK version 4.0.0. + * [iOS](https://developers.google.com/admob/ios/privacy/download#release_notes) UMP SDK version 3.1.0. + +## 6.0.0 +* Updates minimum Flutter SDK to 3.27.0 +* Updates Dart SDK low bound to 3.6.0. +* Fixes AdMessageCodec deprecated API issue: https://github.com/googleads/googleads-mobile-flutter/issues/1242 +* Adds a new API (`isMounted`) to support recycling ad banners +* Updates GMA [Android](https://developers.google.com/admob/android/rel-notes) dependency to 24.1.0 +* Updates GMA [iOS](https://developers.google.com/admob/ios/rel-notes) dependency to 12.2.0 +* Uses latest UMP SDK: + * [Android](https://developers.google.com/admob/android/privacy/release-notes) UMP SDK version 3.2.0. + * [iOS](https://developers.google.com/admob/ios/privacy/download#release_notes) UMP SDK version 3.0.0. + +## 5.3.1 +* Fixes dart SDK low bound building issues: https://github.com/googleads/googleads-mobile-flutter/issues/1234 + +## 5.3.0 +* Updated WebView Flutter Android dependency +* Adds support for the new Debug Geography enums for the UMP SDK: + * [Android](https://developers.google.com/admob/android/privacy/release-notes) UMP SDK version 3.1.0. + * [iOS](https://developers.google.com/admob/ios/privacy/download#release_notes) UMP SDK version 2.7.0. +* Updates GMA [iOS](https://developers.google.com/admob/ios/rel-notes) dependency to 11.13.0 +* Updates GMA [Android](https://developers.google.com/admob/android/rel-notes) dependency to 23.6.0 + +## 5.2.0 +* Removed use of rootViewController for iOS GMA SDK which solved issues like + https://github.com/googleads/googleads-mobile-flutter/issues/1146 and https://github.com/googleads/googleads-mobile-flutter/issues/700. +* Android GMA SDK is now initialized on a background thread. +* Updates GMA [iOS](https://developers.google.com/admob/ios/rel-notes) dependency to 11.10.0 +* Updates GMA [Android](https://developers.google.com/admob/android/rel-notes) dependency to 23.4.0 + +## 5.1.0 +* Adds support for APIs from the [Android](https://developers.google.com/admob/android/privacy/release-notes) UMP SDK version 2.2.0. +* Adds support for APIs from the [iOS](https://developers.google.com/admob/ios/privacy/download#release_notes) UMP SDK version 2.4.0. + +## 5.0.0 +* Adds `MediationExtras` class to include parameters when using mediation through the implementation of `FlutterMediationExtras` in Android and `FlutterMediationExtras` in iOS. +* Deprecates `MediationNetworkExtrasProvider` and `FLTMediationNetworkExtrasProvider`. +* Removed the `orientation` parameter for the AppOpen Ad format. +* Bumps minimum Android SDK version to 21. +* Updates GMA iOS dependency to 11.2.0 +* Updates GMA Android dependency to 23.0.0 + +## 4.0.0 +* The minimum supported Flutter version is now 3.7.0. +* Removes `visibility_detector` as a dependency, and the workaround added in + https://github.com/googleads/googleads-mobile-flutter/pull/610. +* Adds null checks for Ad Ids for Android in + https://github.com/googleads/googleads-mobile-flutter/pull/967 +* Updated Android dependencies in https://github.com/googleads/googleads-mobile-flutter/pull/843 +* Updates GMA iOS dependency to 10.11.0 +* Updates GMA Android dependency to 22.5.0 + ## 3.1.0 * Updates GMA iOS dependency to 10.9.0 * Adds explicit UMP SDK 2.1.0 dependency for Android. diff --git a/packages/google_mobile_ads/README.md b/packages/google_mobile_ads/README.md index 922f5a4e5..622eb3c9e 100644 --- a/packages/google_mobile_ads/README.md +++ b/packages/google_mobile_ads/README.md @@ -30,4 +30,4 @@ use [github's issue tracker](https://github.com/googleads/googleads-mobile-flutt ## License -[Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0.html) \ No newline at end of file +[Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0) \ No newline at end of file diff --git a/packages/google_mobile_ads/android/build.gradle b/packages/google_mobile_ads/android/build.gradle index 6e80321e4..009e9518e 100644 --- a/packages/google_mobile_ads/android/build.gradle +++ b/packages/google_mobile_ads/android/build.gradle @@ -1,14 +1,17 @@ group 'io.flutter.plugins.googlemobileads' -version '1.0-SNAPSHOT' +version '7.0.0' buildscript { + ext { + agp_version = '8.13.1' + } repositories { google() mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:8.0.1' + classpath "com.android.tools.build:gradle:$agp_version" } } @@ -22,29 +25,29 @@ rootProject.allprojects { apply plugin: 'com.android.library' android { - compileSdkVersion 33 + compileSdk 36 if (project.android.hasProperty('namespace')) { namespace 'io.flutter.plugins.googlemobileads' } defaultConfig { - minSdkVersion 19 + minSdk 24 } lintOptions { disable 'InvalidPackage' } dependencies { - api 'com.google.android.gms:play-services-ads:22.4.0' - implementation 'com.google.android.ump:user-messaging-platform:2.1.0' - implementation 'androidx.constraintlayout:constraintlayout:2.1.4' - implementation 'androidx.lifecycle:lifecycle-process:2.6.2' - implementation 'com.google.errorprone:error_prone_annotations:2.16' + api 'com.google.android.gms:play-services-ads:24.9.0' + implementation 'com.google.android.ump:user-messaging-platform:4.0.0' + implementation 'androidx.constraintlayout:constraintlayout:2.2.1' + implementation 'androidx.lifecycle:lifecycle-process:2.10.0' + implementation 'com.google.errorprone:error_prone_annotations:2.44.0' testImplementation 'junit:junit:4.13.2' - testImplementation 'org.hamcrest:hamcrest:2.2' - testImplementation 'org.mockito:mockito-inline:5.2.0' - testImplementation 'org.robolectric:robolectric:4.10.3' - testImplementation 'androidx.test:core:1.5.0' + testImplementation 'org.hamcrest:hamcrest:3.0' + testImplementation 'org.mockito:mockito-core:5.20.0' + testImplementation 'org.robolectric:robolectric:4.16' + testImplementation 'androidx.test:core:1.7.0' } testOptions { unitTests { @@ -54,15 +57,11 @@ android { } afterEvaluate { - def containsEmbeddingDependencies = false - for (def configuration : configurations.all) { - for (def dependency : configuration.dependencies) { - if (dependency.group == 'io.flutter' && + def containsEmbeddingDependencies = configurations.any { configuration -> + configuration.dependencies.any { dependency -> + dependency.group == 'io.flutter' && dependency.name.startsWith('flutter_embedding') && - dependency.isTransitive()) { - containsEmbeddingDependencies = true - break - } + (dependency instanceof ModuleDependency && dependency.isTransitive()) } } if (!containsEmbeddingDependencies) { diff --git a/packages/google_mobile_ads/android/gradle/wrapper/gradle-wrapper.properties b/packages/google_mobile_ads/android/gradle/wrapper/gradle-wrapper.properties index d72b5889f..c5856afbe 100644 --- a/packages/google_mobile_ads/android/gradle/wrapper/gradle-wrapper.properties +++ b/packages/google_mobile_ads/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Sat May 13 14:37:03 CEST 2023 +#Thu Dec 04 10:45:11 PST 2025 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/AdMessageCodec.java b/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/AdMessageCodec.java index 4bbaf063b..65f370cf4 100644 --- a/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/AdMessageCodec.java +++ b/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/AdMessageCodec.java @@ -18,6 +18,7 @@ import android.content.Context; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; +import android.util.Log; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.annotation.VisibleForTesting; @@ -31,7 +32,9 @@ import io.flutter.plugins.googlemobileads.nativetemplates.FlutterNativeTemplateStyle; import io.flutter.plugins.googlemobileads.nativetemplates.FlutterNativeTemplateTextStyle; import io.flutter.plugins.googlemobileads.nativetemplates.FlutterNativeTemplateType; +import java.lang.reflect.InvocationTargetException; import java.io.ByteArrayOutputStream; +import java.lang.reflect.InvocationTargetException; import java.nio.ByteBuffer; import java.util.List; import java.util.Map; @@ -65,10 +68,15 @@ class AdMessageCodec extends StandardMessageCodec { private static final byte VALUE_NATIVE_TEMPLATE_FONT_STYLE = (byte) 151; private static final byte VALUE_NATIVE_TEMPLATE_TYPE = (byte) 152; private static final byte VALUE_COLOR = (byte) 153; + private static final byte VALUE_MEDIATION_EXTRAS = (byte) 154; @NonNull Context context; @NonNull final FlutterAdSize.AdSizeFactory adSizeFactory; - @Nullable private MediationNetworkExtrasProvider mediationNetworkExtrasProvider; + + @SuppressWarnings("deprecation") // Keeping for compatibility + @Nullable + private MediationNetworkExtrasProvider mediationNetworkExtrasProvider; + @NonNull private final FlutterRequestAgentProvider requestAgentProvider; AdMessageCodec( @@ -92,6 +100,7 @@ void setContext(@NonNull Context context) { this.context = context; } + @SuppressWarnings("deprecation") // Keeping for compatibility void setMediationNetworkExtrasProvider( @Nullable MediationNetworkExtrasProvider mediationNetworkExtrasProvider) { this.mediationNetworkExtrasProvider = mediationNetworkExtrasProvider; @@ -114,6 +123,7 @@ protected void writeValue(ByteArrayOutputStream stream, Object value) { writeValue(stream, request.getPublisherProvidedId()); writeValue(stream, request.getMediationExtrasIdentifier()); writeValue(stream, request.getAdMobExtras()); + writeValue(stream, request.getMediationExtras()); } else if (value instanceof FlutterAdRequest) { stream.write(VALUE_AD_REQUEST); final FlutterAdRequest request = (FlutterAdRequest) value; @@ -124,6 +134,13 @@ protected void writeValue(ByteArrayOutputStream stream, Object value) { writeValue(stream, request.getHttpTimeoutMillis()); writeValue(stream, request.getMediationExtrasIdentifier()); writeValue(stream, request.getAdMobExtras()); + writeValue(stream, request.getMediationExtras()); + } else if (value instanceof FlutterMediationExtras) { + stream.write(VALUE_MEDIATION_EXTRAS); + final FlutterMediationExtras mediationExtras = (FlutterMediationExtras) value; + String className = mediationExtras.getClass().getCanonicalName(); + writeValue(stream, className); + writeValue(stream, mediationExtras.extras); } else if (value instanceof FlutterRewardedAd.FlutterRewardItem) { stream.write(VALUE_REWARD_ITEM); final FlutterRewardedAd.FlutterRewardItem item = (FlutterRewardedAd.FlutterRewardItem) value; @@ -283,7 +300,31 @@ protected Object readValueOfType(byte type, ByteBuffer buffer) { .setMediationNetworkExtrasProvider(mediationNetworkExtrasProvider) .setAdMobExtras((Map) readValueOfType(buffer.get(), buffer)) .setRequestAgent(requestAgentProvider.getRequestAgent()) + .setMediationExtras( + (List) readValueOfType(buffer.get(), buffer)) .build(); + case VALUE_MEDIATION_EXTRAS: + String className = (String) readValueOfType(buffer.get(), buffer); + Map extras = (Map) readValueOfType(buffer.get(), buffer); + try { + assert className != null; + Class cls = Class.forName(className); + FlutterMediationExtras flutterExtras = (FlutterMediationExtras) cls.getDeclaredConstructor() + .newInstance(); + flutterExtras.setMediationExtras(extras); + return flutterExtras; + } catch (ClassNotFoundException e) { + Log.e("FlutterMediationExtras", "Class not found: " + className); + } catch (NoSuchMethodException e) { + Log.e("FlutterMediationExtras", "No such method found: " + className + ".getDeclaredConstructor()"); + } catch (InvocationTargetException e) { + Log.e("FlutterMediationExtras", "Invocation Target Exception for: " + className); + } catch (IllegalAccessException e) { + Log.e("FlutterMediationExtras", "Illegal Access to " + className); + } catch (InstantiationException e) { + Log.e("FlutterMediationExtras", "Unable to instantiate class " + className); + } + return null; case VALUE_REWARD_ITEM: return new FlutterRewardedAd.FlutterRewardItem( (Integer) readValueOfType(buffer.get(), buffer), @@ -332,6 +373,8 @@ protected Object readValueOfType(byte type, ByteBuffer buffer) { builder.setMediationNetworkExtrasProvider(mediationNetworkExtrasProvider); builder.setAdMobExtras((Map) readValueOfType(buffer.get(), buffer)); builder.setRequestAgent(requestAgentProvider.getRequestAgent()); + builder.setMediationExtras( + (List) readValueOfType(buffer.get(), buffer)); return builder.build(); case VALUE_INITIALIZATION_STATE: final String state = (String) readValueOfType(buffer.get(), buffer); diff --git a/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/Constants.java b/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/Constants.java index 71403356d..fc8c808aa 100644 --- a/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/Constants.java +++ b/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/Constants.java @@ -17,7 +17,7 @@ /** Constants used in the plugin. */ public class Constants { /** Version request agent. Should be bumped alongside plugin versions. */ - public static final String REQUEST_AGENT_PREFIX_VERSIONED = "Flutter-GMA-3.1.0"; + public static final String REQUEST_AGENT_PREFIX_VERSIONED = "Flutter-GMA-7.0.0"; /** Prefix for news template */ public static final String REQUEST_AGENT_NEWS_TEMPLATE_PREFIX = "News"; diff --git a/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/FlutterAd.java b/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/FlutterAd.java index 7d036bf05..9730b514a 100644 --- a/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/FlutterAd.java +++ b/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/FlutterAd.java @@ -72,8 +72,8 @@ static class FlutterResponseInfo { Map extras = new HashMap<>(); if (responseInfo.getResponseExtras() != null) { for (String key : responseInfo.getResponseExtras().keySet()) { - Object value = responseInfo.getResponseExtras().get(key); - extras.put(key, value.toString()); + String value = responseInfo.getResponseExtras().getString(key); + extras.put(key, value); } } @@ -160,7 +160,7 @@ static class FlutterAdapterResponseInfo { if (responseInfo.getCredentials() != null) { this.adUnitMapping = new HashMap<>(); for (String key : responseInfo.getCredentials().keySet()) { - adUnitMapping.put(key, responseInfo.getCredentials().get(key).toString()); + adUnitMapping.put(key, responseInfo.getCredentials().getString(key)); } } else { adUnitMapping = new HashMap<>(); diff --git a/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/FlutterAdLoader.java b/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/FlutterAdLoader.java index 580d2e2e3..0e864e7d9 100644 --- a/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/FlutterAdLoader.java +++ b/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/FlutterAdLoader.java @@ -48,18 +48,16 @@ public FlutterAdLoader(@NonNull Context context) { public void loadAppOpen( @NonNull String adUnitId, @NonNull AdRequest adRequest, - int orientation, @NonNull AppOpenAdLoadCallback loadCallback) { - AppOpenAd.load(context, adUnitId, adRequest, orientation, loadCallback); + AppOpenAd.load(context, adUnitId, adRequest, loadCallback); } /** Load an ad manager app open ad. */ public void loadAdManagerAppOpen( @NonNull String adUnitId, @NonNull AdManagerAdRequest adRequest, - int orientation, @NonNull AppOpenAdLoadCallback loadCallback) { - AppOpenAd.load(context, adUnitId, adRequest, orientation, loadCallback); + AppOpenAd.load(context, adUnitId, adRequest, loadCallback); } /** Load an interstitial ad. */ diff --git a/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/FlutterAdManagerAdRequest.java b/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/FlutterAdManagerAdRequest.java index b0eca5972..2ae5f99f8 100644 --- a/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/FlutterAdManagerAdRequest.java +++ b/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/FlutterAdManagerAdRequest.java @@ -71,10 +71,12 @@ FlutterAdManagerAdRequest build() { getMediationExtrasIdentifier(), getMediationNetworkExtrasProvider(), getAdMobExtras(), - getRequestAgent()); + getRequestAgent(), + getMediationExtras()); } } + @SuppressWarnings("deprecation") // Keeping for compatibility private FlutterAdManagerAdRequest( @Nullable List keywords, @Nullable String contentUrl, @@ -87,7 +89,8 @@ private FlutterAdManagerAdRequest( @Nullable String mediationExtrasIdentifier, @Nullable MediationNetworkExtrasProvider mediationNetworkExtrasProvider, @Nullable Map adMobExtras, - @NonNull String requestAgent) { + @NonNull String requestAgent, + @Nullable List mediationExtras) { super( keywords, contentUrl, @@ -97,7 +100,8 @@ private FlutterAdManagerAdRequest( mediationExtrasIdentifier, mediationNetworkExtrasProvider, adMobExtras, - requestAgent); + requestAgent, + mediationExtras); this.customTargeting = customTargeting; this.customTargetingLists = customTargetingLists; this.publisherProvidedId = publisherProvidedId; diff --git a/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/FlutterAdRequest.java b/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/FlutterAdRequest.java index 78b5c6a22..e1c658776 100644 --- a/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/FlutterAdRequest.java +++ b/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/FlutterAdRequest.java @@ -15,9 +15,11 @@ package io.flutter.plugins.googlemobileads; import android.os.Bundle; +import android.util.Pair; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import com.google.ads.mediation.admob.AdMobAdapter; +import com.google.android.gms.ads.AbstractAdRequestBuilder; import com.google.android.gms.ads.AdRequest; import com.google.android.gms.ads.mediation.MediationExtrasReceiver; import com.google.errorprone.annotations.CanIgnoreReturnValue; @@ -34,9 +36,14 @@ class FlutterAdRequest { @Nullable private final List neighboringContentUrls; @Nullable private final Integer httpTimeoutMillis; @Nullable private final String mediationExtrasIdentifier; - @Nullable private final MediationNetworkExtrasProvider mediationNetworkExtrasProvider; + + @SuppressWarnings("deprecation") // Keeping for compatibility + @Nullable + private final MediationNetworkExtrasProvider mediationNetworkExtrasProvider; + @Nullable private final Map adMobExtras; @NonNull private final String requestAgent; + @Nullable private final List mediationExtras; protected static class Builder { @Nullable private List keywords; @@ -45,10 +52,16 @@ protected static class Builder { @Nullable private List neighboringContentUrls; @Nullable private Integer httpTimeoutMillis; @Nullable private String mediationExtrasIdentifier; - @Nullable private MediationNetworkExtrasProvider mediationNetworkExtrasProvider; + + @SuppressWarnings("deprecation") // Keeping for compatibility + @Nullable + private MediationNetworkExtrasProvider mediationNetworkExtrasProvider; + @Nullable private Map adMobExtras; @NonNull private String requestAgent; + @Nullable private List mediationExtras; + @CanIgnoreReturnValue Builder setRequestAgent(String requestAgent) { this.requestAgent = requestAgent; @@ -92,6 +105,7 @@ Builder setMediationNetworkExtrasIdentifier(@Nullable String mediationExtrasIden } @CanIgnoreReturnValue + @SuppressWarnings("deprecation") // Keeping for compatibility Builder setMediationNetworkExtrasProvider( @Nullable MediationNetworkExtrasProvider mediationNetworkExtrasProvider) { this.mediationNetworkExtrasProvider = mediationNetworkExtrasProvider; @@ -104,6 +118,12 @@ Builder setAdMobExtras(@Nullable Map adMobExtras) { return this; } + @CanIgnoreReturnValue + Builder setMediationExtras(@Nullable List mediationExtras) { + this.mediationExtras = mediationExtras; + return this; + } + @Nullable protected List getKeywords() { return keywords; @@ -134,6 +154,7 @@ protected String getMediationExtrasIdentifier() { return mediationExtrasIdentifier; } + @SuppressWarnings("deprecation") // Keeping for compatibility @Nullable protected MediationNetworkExtrasProvider getMediationNetworkExtrasProvider() { return mediationNetworkExtrasProvider; @@ -149,6 +170,11 @@ protected String getRequestAgent() { return requestAgent; } + @Nullable + protected List getMediationExtras() { + return mediationExtras; + } + FlutterAdRequest build() { return new FlutterAdRequest( keywords, @@ -159,10 +185,12 @@ FlutterAdRequest build() { mediationExtrasIdentifier, mediationNetworkExtrasProvider, adMobExtras, - requestAgent); + requestAgent, + mediationExtras); } } + @SuppressWarnings("deprecation") // Keeping for compatibility protected FlutterAdRequest( @Nullable List keywords, @Nullable String contentUrl, @@ -172,7 +200,8 @@ protected FlutterAdRequest( @Nullable String mediationExtrasIdentifier, @Nullable MediationNetworkExtrasProvider mediationNetworkExtrasProvider, @Nullable Map adMobExtras, - String requestAgent) { + String requestAgent, + @Nullable List mediationExtras) { this.keywords = keywords; this.contentUrl = contentUrl; this.nonPersonalizedAds = nonPersonalizedAds; @@ -182,12 +211,20 @@ protected FlutterAdRequest( this.mediationNetworkExtrasProvider = mediationNetworkExtrasProvider; this.adMobExtras = adMobExtras; this.requestAgent = requestAgent; + this.mediationExtras = mediationExtras; } /** Adds network extras to the ad request builder, if any. */ - private void addNetworkExtras(AdRequest.Builder builder, String adUnitId) { + private > void addNetworkExtras( + AbstractAdRequestBuilder builder, String adUnitId) { Map, Bundle> networkExtras = new HashMap<>(); - if (mediationNetworkExtrasProvider != null) { + if (mediationExtras != null) { + for (FlutterMediationExtras flutterExtras : mediationExtras) { + Pair, Bundle> pair = + flutterExtras.getMediationExtras(); + networkExtras.put(pair.first, pair.second); + } + } else if (mediationNetworkExtrasProvider != null) { Map, Bundle> providedExtras = mediationNetworkExtrasProvider.getMediationExtras(adUnitId, mediationExtrasIdentifier); networkExtras.putAll(providedExtras); @@ -216,7 +253,9 @@ private void addNetworkExtras(AdRequest.Builder builder, String adUnitId) { } /** Updates the {@link AdRequest.Builder} with the properties in this {@link FlutterAdRequest}. */ - protected AdRequest.Builder updateAdRequestBuilder(AdRequest.Builder builder, String adUnitId) { + protected > + AbstractAdRequestBuilder updateAdRequestBuilder( + AbstractAdRequestBuilder builder, String adUnitId) { if (keywords != null) { for (final String keyword : keywords) { builder.addKeyword(keyword); @@ -237,7 +276,7 @@ protected AdRequest.Builder updateAdRequestBuilder(AdRequest.Builder builder, St } AdRequest asAdRequest(String adUnitId) { - return updateAdRequestBuilder(new AdRequest.Builder(), adUnitId).build(); + return ((AdRequest.Builder) updateAdRequestBuilder(new AdRequest.Builder(), adUnitId)).build(); } @Nullable @@ -280,6 +319,11 @@ protected String getRequestAgent() { return requestAgent; } + @Nullable + protected List getMediationExtras() { + return mediationExtras; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -296,7 +340,8 @@ public boolean equals(Object o) { && Objects.equals(httpTimeoutMillis, request.httpTimeoutMillis) && Objects.equals(mediationExtrasIdentifier, request.mediationExtrasIdentifier) && Objects.equals(mediationNetworkExtrasProvider, request.mediationNetworkExtrasProvider) - && Objects.equals(adMobExtras, request.adMobExtras); + && Objects.equals(adMobExtras, request.adMobExtras) + && Objects.equals(mediationExtras, request.mediationExtras); } @Override @@ -308,6 +353,7 @@ public int hashCode() { neighboringContentUrls, httpTimeoutMillis, mediationExtrasIdentifier, - mediationNetworkExtrasProvider); + mediationNetworkExtrasProvider, + mediationExtras); } } diff --git a/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/FlutterAppOpenAd.java b/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/FlutterAppOpenAd.java index 1130f1cf0..28e468f97 100644 --- a/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/FlutterAppOpenAd.java +++ b/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/FlutterAppOpenAd.java @@ -30,7 +30,6 @@ class FlutterAppOpenAd extends FlutterAd.FlutterOverlayAd { @NonNull private final AdInstanceManager manager; @NonNull private final String adUnitId; - private final int orientation; @Nullable private final FlutterAdRequest request; @Nullable private final FlutterAdManagerAdRequest adManagerAdRequest; @Nullable private AppOpenAd ad; @@ -38,7 +37,6 @@ class FlutterAppOpenAd extends FlutterAd.FlutterOverlayAd { FlutterAppOpenAd( int adId, - int orientation, @NonNull AdInstanceManager manager, @NonNull String adUnitId, @Nullable FlutterAdRequest request, @@ -49,7 +47,6 @@ class FlutterAppOpenAd extends FlutterAd.FlutterOverlayAd { request != null || adManagerAdRequest != null, "One of request and adManagerAdRequest must be non-null."); this.manager = manager; - this.orientation = orientation; this.adUnitId = adUnitId; this.request = request; this.adManagerAdRequest = adManagerAdRequest; @@ -60,29 +57,15 @@ class FlutterAppOpenAd extends FlutterAd.FlutterOverlayAd { void load() { if (request != null) { flutterAdLoader.loadAppOpen( - adUnitId, - request.asAdRequest(adUnitId), - getOrientation(), - new DelegatingAppOpenAdLoadCallback(this)); + adUnitId, request.asAdRequest(adUnitId), new DelegatingAppOpenAdLoadCallback(this)); } else if (adManagerAdRequest != null) { flutterAdLoader.loadAdManagerAppOpen( adUnitId, adManagerAdRequest.asAdManagerAdRequest(adUnitId), - getOrientation(), new DelegatingAppOpenAdLoadCallback(this)); } } - private int getOrientation() { - if (orientation == 1) { - return AppOpenAd.APP_OPEN_AD_ORIENTATION_PORTRAIT; - } else if (orientation == 2 || orientation == 3) { - return AppOpenAd.APP_OPEN_AD_ORIENTATION_LANDSCAPE; - } - Log.e(TAG, "Passed unknown app open orientation: " + orientation); - return AppOpenAd.APP_OPEN_AD_ORIENTATION_PORTRAIT; - } - private void onAdLoaded(@NonNull AppOpenAd ad) { this.ad = ad; ad.setOnPaidEventListener(new FlutterPaidEventListener(manager, this)); diff --git a/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/FlutterMediationExtras.java b/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/FlutterMediationExtras.java new file mode 100644 index 000000000..21612988b --- /dev/null +++ b/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/FlutterMediationExtras.java @@ -0,0 +1,68 @@ +// 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 +// +// https://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. + +package io.flutter.plugins.googlemobileads; + +import android.os.Bundle; +import android.util.Pair; +import com.google.android.gms.ads.mediation.MediationExtrasReceiver; +import java.util.Map; +import java.util.Objects; + +/** + * Mediation Adapters that require extra parameters provide implementations of this interface to + * further be sent to the {@link com.google.android.gms.ads.AdRequest} + * + *

Implementation will receive the Map of Extras via the {@link + * FlutterMediationExtras#setMediationExtras} which the implementation must store and later parse to + * the proper pair of Class and Bundle values returned by {@link + * FlutterMediationExtras#getMediationExtras()} + */ +public abstract class FlutterMediationExtras { + Map extras; + /** + * Called when the {@link FlutterAdRequest} is parsed into an {@link + * com.google.android.gms.ads.AdRequest}. + * + * @return The parsed values to be sent to the {@link + * com.google.android.gms.ads.AdRequest.Builder#addNetworkExtrasBundle} + */ + public abstract Pair, Bundle> getMediationExtras(); + + /** + * Pair of key-values to be stored and later be parsed into a {@link Bundle}. + * + * @param extras Received from the dart layer through the MediationExtras class. + */ + public void setMediationExtras(Map extras) { + this.extras = extras; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } else if (!(o instanceof FlutterMediationExtras)) { + return false; + } + + FlutterMediationExtras mediationExtras = (FlutterMediationExtras) o; + return Objects.equals(extras, mediationExtras.extras); + } + + @Override + public int hashCode() { + return Objects.hash(extras); + } +} diff --git a/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/FlutterMobileAdsWrapper.java b/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/FlutterMobileAdsWrapper.java index d8d9d65c7..83f0f783d 100644 --- a/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/FlutterMobileAdsWrapper.java +++ b/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/FlutterMobileAdsWrapper.java @@ -36,7 +36,14 @@ public FlutterMobileAdsWrapper() {} /** Initializes the sdk. */ public void initialize( @NonNull Context context, @NonNull OnInitializationCompleteListener listener) { - MobileAds.initialize(context, listener); + new Thread( + new Runnable() { + @Override + public void run() { + MobileAds.initialize(context, listener); + } + }) + .start(); } /** Wrapper for setAppMuted. */ @@ -77,9 +84,7 @@ public void openAdInspector(Context context, OnAdInspectorClosedListener listene /** Register the webView for monetization. */ public void registerWebView(int webViewId, FlutterEngine flutterEngine) { WebView webView = WebViewFlutterAndroidExternalApi.getWebView(flutterEngine, webViewId); - if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) { - Log.w(TAG, "MobileAds.registerWebView does not support API levels less than 21"); - } else if (webView == null) { + if (webView == null) { Log.w(TAG, "MobileAds.registerWebView unable to find webView with id: " + webViewId); } else { MobileAds.registerWebView(webView); diff --git a/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/FlutterRequestAgentProvider.java b/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/FlutterRequestAgentProvider.java index 2366c40bf..1322df6d9 100644 --- a/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/FlutterRequestAgentProvider.java +++ b/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/FlutterRequestAgentProvider.java @@ -4,6 +4,7 @@ import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.content.pm.PackageManager.NameNotFoundException; +import android.os.Build; import android.os.Bundle; import androidx.annotation.Nullable; @@ -24,11 +25,22 @@ class FlutterRequestAgentProvider { private void processGameAndNewsTemplateVersions(Context context) { try { - ApplicationInfo info = - context - .getApplicationContext() - .getPackageManager() - .getApplicationInfo(context.getPackageName(), PackageManager.GET_META_DATA); + ApplicationInfo info; + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { + info = + context + .getApplicationContext() + .getPackageManager() + .getApplicationInfo( + context.getPackageName(), + PackageManager.ApplicationInfoFlags.of(PackageManager.GET_META_DATA)); + } else { + info = + context + .getApplicationContext() + .getPackageManager() + .getApplicationInfo(context.getPackageName(), PackageManager.GET_META_DATA); + } Bundle metaData = info.metaData; if (metaData != null) { gameTemplateVersion = info.metaData.getString(GAME_VERSION_KEY); diff --git a/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/GoogleMobileAdsPlugin.java b/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/GoogleMobileAdsPlugin.java index b2981981e..91479ca77 100644 --- a/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/GoogleMobileAdsPlugin.java +++ b/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/GoogleMobileAdsPlugin.java @@ -68,7 +68,11 @@ private static T requireNonNull(T obj) { @Nullable private AppStateNotifier appStateNotifier; @Nullable private UserMessagingPlatformManager userMessagingPlatformManager; private final Map nativeAdFactories = new HashMap<>(); - @Nullable private MediationNetworkExtrasProvider mediationNetworkExtrasProvider; + + @SuppressWarnings("deprecation") // Keeping for compatibility + @Nullable + private MediationNetworkExtrasProvider mediationNetworkExtrasProvider; + private final FlutterMobileAdsWrapper flutterMobileAds; /** * Public constructor for the plugin. Dependency initialization is handled in lifecycle methods @@ -144,7 +148,9 @@ public static boolean registerNativeAdFactory( * used to provide network extras when ad requests are created * @return whether {@code mediationNetworkExtrasProvider} was registered to a {@code * GoogleMobileAdsPlugin} associated with {@code engine} + * @deprecated Use {@link FlutterMediationExtras} instead. */ + @Deprecated public static boolean registerMediationNetworkExtrasProvider( FlutterEngine engine, MediationNetworkExtrasProvider mediationNetworkExtrasProvider) { final GoogleMobileAdsPlugin gmaPlugin = @@ -164,7 +170,9 @@ public static boolean registerMediationNetworkExtrasProvider( * with the plugin using {@code unregisterMediationNetworkExtrasProvider}. * * @param engine The {@link FlutterEngine} which should have an attached instance of this plugin + * @deprecated Use {@link FlutterMediationExtras} instead. */ + @Deprecated public static void unregisterMediationNetworkExtrasProvider(FlutterEngine engine) { final GoogleMobileAdsPlugin gmaPlugin = (GoogleMobileAdsPlugin) engine.getPlugins().get(GoogleMobileAdsPlugin.class); @@ -547,7 +555,6 @@ public void onAdInspectorClosed(@Nullable AdInspectorError adInspectorError) { final FlutterAppOpenAd appOpenAd = new FlutterAppOpenAd( call.argument("adId"), - call.argument("orientation"), requireNonNull(instanceManager), requireNonNull(call.argument("adUnitId")), call.argument("request"), diff --git a/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/GoogleMobileAdsViewFactory.java b/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/GoogleMobileAdsViewFactory.java index ed14a3e7d..43d6437fb 100644 --- a/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/GoogleMobileAdsViewFactory.java +++ b/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/GoogleMobileAdsViewFactory.java @@ -56,6 +56,9 @@ public GoogleMobileAdsViewFactory(@NonNull AdInstanceManager manager) { @Override public PlatformView create(Context context, int viewId, Object args) { + if (args == null) { + return getErrorView(context, 0); + } final Integer adId = (Integer) args; FlutterAd ad = manager.adForId(adId); if (ad == null || ad.getPlatformView() == null) { diff --git a/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/MediationNetworkExtrasProvider.java b/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/MediationNetworkExtrasProvider.java index afb8d8a49..63d249062 100644 --- a/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/MediationNetworkExtrasProvider.java +++ b/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/MediationNetworkExtrasProvider.java @@ -27,7 +27,10 @@ * GoogleMobileAdsPlugin#registerMediationNetworkExtrasProvider(FlutterEngine, * MediationNetworkExtrasProvider)}, the plugin will use it to pass extras when constructing ad * requests. + * + * @deprecated User {@link FlutterMediationExtras} instead. */ +@Deprecated public interface MediationNetworkExtrasProvider { /** diff --git a/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/usermessagingplatform/UserMessagingCodec.java b/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/usermessagingplatform/UserMessagingCodec.java index 04f3a6497..88aba3e00 100644 --- a/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/usermessagingplatform/UserMessagingCodec.java +++ b/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/usermessagingplatform/UserMessagingCodec.java @@ -17,6 +17,7 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import com.google.android.ump.ConsentForm; +import com.google.android.ump.FormError; import io.flutter.plugin.common.StandardMessageCodec; import java.io.ByteArrayOutputStream; import java.nio.ByteBuffer; @@ -31,6 +32,7 @@ public class UserMessagingCodec extends StandardMessageCodec { private static final byte VALUE_CONSENT_REQUEST_PARAMETERS = (byte) 129; private static final byte VALUE_CONSENT_DEBUG_SETTINGS = (byte) 130; private static final byte VALUE_CONSENT_FORM = (byte) 131; + private static final byte VALUE_FORM_ERROR = (byte) 132; private final Map consentFormMap; @@ -53,6 +55,11 @@ protected void writeValue(@NonNull ByteArrayOutputStream stream, @NonNull Object } else if (value instanceof ConsentForm) { stream.write(VALUE_CONSENT_FORM); writeValue(stream, value.hashCode()); + } else if (value instanceof FormError) { + stream.write(VALUE_FORM_ERROR); + FormError formError = (FormError) value; + writeValue(stream, formError.getErrorCode()); + writeValue(stream, formError.getMessage()); } else { super.writeValue(stream, value); } @@ -96,6 +103,12 @@ protected Object readValueOfType(byte type, @NonNull ByteBuffer buffer) { Integer hash = (Integer) readValueOfType(buffer.get(), buffer); return consentFormMap.get(hash); } + case VALUE_FORM_ERROR: + { + Integer errorCode = (Integer) readValueOfType(buffer.get(), buffer); + String errorMessage = (String) readValueOfType(buffer.get(), buffer); + return new FormError(errorCode, errorMessage); + } default: return super.readValueOfType(type, buffer); } diff --git a/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/usermessagingplatform/UserMessagingPlatformManager.java b/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/usermessagingplatform/UserMessagingPlatformManager.java index 234e2c25d..dde127149 100644 --- a/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/usermessagingplatform/UserMessagingPlatformManager.java +++ b/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/usermessagingplatform/UserMessagingPlatformManager.java @@ -131,6 +131,35 @@ public void onConsentInfoUpdateFailure(FormError error) { }); break; } + case "ConsentInformation#canRequestAds": + result.success(getConsentInformation().canRequestAds()); + break; + case "ConsentInformation#getPrivacyOptionsRequirementStatus": + switch (getConsentInformation().getPrivacyOptionsRequirementStatus()) { + case NOT_REQUIRED: + result.success(0); + break; + case REQUIRED: + result.success(1); + break; + default: + result.success(2); + } + break; + case "UserMessagingPlatform#loadAndShowConsentFormIfRequired": + if (activity == null) { + result.error( + INTERNAL_ERROR_CODE, + "UserMessagingPlatform#loadAndShowConsentFormIfRequired called before plugin has been registered to an activity.", + null); + break; + } + UserMessagingPlatform.loadAndShowConsentFormIfRequired( + activity, + loadAndShowError -> { + result.success(loadAndShowError); + }); + break; case "UserMessagingPlatform#loadConsentForm": UserMessagingPlatform.loadConsentForm( context, @@ -149,6 +178,20 @@ public void onConsentFormLoadFailure(FormError formError) { } }); break; + case "UserMessagingPlatform#showPrivacyOptionsForm": + if (activity == null) { + result.error( + INTERNAL_ERROR_CODE, + "UserMessagingPlatform#showPrivacyOptionsForm called before plugin has been registered to an activity.", + null); + break; + } + UserMessagingPlatform.showPrivacyOptionsForm( + activity, + loadAndShowError -> { + result.success(loadAndShowError); + }); + break; case "ConsentInformation#isConsentFormAvailable": { result.success(getConsentInformation().isConsentFormAvailable()); diff --git a/packages/google_mobile_ads/android/src/main/res/layout/gnt_medium_template_view.xml b/packages/google_mobile_ads/android/src/main/res/layout/gnt_medium_template_view.xml index a9153d795..d4184b806 100644 --- a/packages/google_mobile_ads/android/src/main/res/layout/gnt_medium_template_view.xml +++ b/packages/google_mobile_ads/android/src/main/res/layout/gnt_medium_template_view.xml @@ -86,6 +86,7 @@ android:layout_width="match_parent" android:layout_height="@dimen/gnt_no_size" android:layout_weight="0.5" + android:maxLength="25" android:gravity="left" android:background="@android:color/transparent" app:layout_constraintBottom_toTopOf="@+id/row_two" @@ -197,17 +198,21 @@ android:paddingBottom="@dimen/gnt_default_margin" android:paddingLeft="@dimen/gnt_default_margin" android:id="@+id/body" + android:maxLength="90" + android:maxLines="2" + android:ellipsize="end" app:layout_constraintBottom_toTopOf="@+id/cta" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/middle" + app:layout_constraintHeight_max="50dp" android:paddingStart="@dimen/gnt_default_margin" android:layout_marginBottom="@dimen/gnt_small_margin" /> diff --git a/packages/google_mobile_ads/android/src/main/res/layout/gnt_small_template_view.xml b/packages/google_mobile_ads/android/src/main/res/layout/gnt_small_template_view.xml index 02db5fda2..189dbef42 100644 --- a/packages/google_mobile_ads/android/src/main/res/layout/gnt_small_template_view.xml +++ b/packages/google_mobile_ads/android/src/main/res/layout/gnt_small_template_view.xml @@ -18,10 +18,10 @@ extras = Collections.singletonMap("key", "value"); + List mediationExtras = new ArrayList<>(); + DummyMediationExtras randomExtra = new DummyMediationExtras(); + Map flutterRandomExtra = new HashMap<>(); + flutterRandomExtra.put("TEST_KEY", "TEST_VALUE"); + randomExtra.extras = flutterRandomExtra; + mediationExtras.add(randomExtra); FlutterAdRequest adRequest = new FlutterAdRequest.Builder() .setKeywords(Arrays.asList("1", "2", "3")) @@ -403,16 +413,25 @@ public void encodeFlutterAdRequest() { .setHttpTimeoutMillis(1000) .setMediationNetworkExtrasIdentifier("identifier") .setAdMobExtras(extras) + .setMediationExtras(mediationExtras) .build(); final ByteBuffer message = codec.encodeMessage(adRequest); final FlutterAdRequest decodedRequest = (FlutterAdRequest) codec.decodeMessage((ByteBuffer) message.position(0)); + assert decodedRequest != null; assertEquals(adRequest, decodedRequest); + assertEquals(flutterRandomExtra, decodedRequest.getMediationExtras().get(0).extras); } @Test public void encodeFlutterAdManagerAdRequest() { + List mediationExtras = new ArrayList<>(); + DummyMediationExtras randomExtra = new DummyMediationExtras(); + Map flutterRandomExtra = new HashMap<>(); + flutterRandomExtra.put("TEST_KEY", "TEST_VALUE"); + randomExtra.extras = flutterRandomExtra; + mediationExtras.add(randomExtra); doReturn("mock-request-agent").when(mockFlutterRequestAgentProvider).getRequestAgent(); FlutterAdManagerAdRequest.Builder builder = new FlutterAdManagerAdRequest.Builder(); builder.setKeywords(Arrays.asList("1", "2", "3")); @@ -424,6 +443,7 @@ public void encodeFlutterAdManagerAdRequest() { builder.setPublisherProvidedId("pub-provided-id"); builder.setMediationNetworkExtrasIdentifier("identifier"); builder.setAdMobExtras(Collections.singletonMap("key", "value")); + builder.setMediationExtras(mediationExtras); FlutterAdManagerAdRequest flutterAdManagerAdRequest = builder.build(); @@ -432,6 +452,7 @@ public void encodeFlutterAdManagerAdRequest() { (FlutterAdManagerAdRequest) codec.decodeMessage((ByteBuffer) message.position(0)); assertEquals(decodedAdRequest, flutterAdManagerAdRequest); assertEquals(decodedAdRequest.getRequestAgent(), "mock-request-agent"); + assertEquals(flutterRandomExtra, decodedAdRequest.getMediationExtras().get(0).extras); } @Test @@ -539,3 +560,10 @@ public void encodeRequestConfiguration() { assertEquals(result.getTestDeviceIds(), Arrays.asList("test-device-id")); } } + +class DummyMediationExtras extends FlutterMediationExtras { + @Override + public Pair, Bundle> getMediationExtras() { + return null; + } +} diff --git a/packages/google_mobile_ads/android/src/test/java/io/flutter/plugins/googlemobileads/FlutterAppOpenAdTest.java b/packages/google_mobile_ads/android/src/test/java/io/flutter/plugins/googlemobileads/FlutterAppOpenAdTest.java index 2991d8390..6f924ddef 100644 --- a/packages/google_mobile_ads/android/src/test/java/io/flutter/plugins/googlemobileads/FlutterAppOpenAdTest.java +++ b/packages/google_mobile_ads/android/src/test/java/io/flutter/plugins/googlemobileads/FlutterAppOpenAdTest.java @@ -18,7 +18,6 @@ import static org.junit.Assert.assertNull; import static org.mockito.ArgumentCaptor.forClass; import static org.mockito.ArgumentMatchers.any; -import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.doAnswer; @@ -75,7 +74,7 @@ private void setupAdmobMocks() { when(mockFlutterAdRequest.asAdRequest(anyString())).thenReturn(mockAdRequest); flutterAppOpenAd = new FlutterAppOpenAd( - 1, 2, mockManager, "testId", mockFlutterAdRequest, null, mockFlutterAdLoader); + 1, mockManager, "testId", mockFlutterAdRequest, null, mockFlutterAdLoader); } private void setupAdManagerMocks() { @@ -85,7 +84,7 @@ private void setupAdManagerMocks() { .thenReturn(mockAdManagerAdRequest); flutterAppOpenAd = new FlutterAppOpenAd( - 1, 2, mockManager, "testId", null, mockAdManagerFlutterRequest, mockFlutterAdLoader); + 1, mockManager, "testId", null, mockAdManagerFlutterRequest, mockFlutterAdLoader); } @Test @@ -100,7 +99,7 @@ public void loadAdManager_failedToLoad() { new Answer() { @Override public Object answer(InvocationOnMock invocation) throws Throwable { - AppOpenAdLoadCallback adLoadCallback = invocation.getArgument(3); + AppOpenAdLoadCallback adLoadCallback = invocation.getArgument(2); // Pass back null for ad adLoadCallback.onAdFailedToLoad(loadAdError); return null; @@ -108,13 +107,13 @@ public Object answer(InvocationOnMock invocation) throws Throwable { }) .when(mockFlutterAdLoader) .loadAdManagerAppOpen( - anyString(), any(AdManagerAdRequest.class), anyInt(), any(AppOpenAdLoadCallback.class)); + anyString(), any(AdManagerAdRequest.class), any(AppOpenAdLoadCallback.class)); flutterAppOpenAd.load(); verify(mockFlutterAdLoader) .loadAdManagerAppOpen( - eq("testId"), eq(mockAdManagerAdRequest), eq(2), any(AppOpenAdLoadCallback.class)); + eq("testId"), eq(mockAdManagerAdRequest), any(AppOpenAdLoadCallback.class)); FlutterLoadAdError expectedError = new FlutterLoadAdError(loadAdError); verify(mockManager).onAdFailedToLoad(eq(1), eq(expectedError)); @@ -132,19 +131,19 @@ public void loadAdmob_failedToLoad() { new Answer() { @Override public Object answer(InvocationOnMock invocation) throws Throwable { - AppOpenAdLoadCallback adLoadCallback = invocation.getArgument(3); + AppOpenAdLoadCallback adLoadCallback = invocation.getArgument(2); // Pass back null for ad adLoadCallback.onAdFailedToLoad(loadAdError); return null; } }) .when(mockFlutterAdLoader) - .loadAppOpen(anyString(), any(AdRequest.class), anyInt(), any(AppOpenAdLoadCallback.class)); + .loadAppOpen(anyString(), any(AdRequest.class), any(AppOpenAdLoadCallback.class)); flutterAppOpenAd.load(); verify(mockFlutterAdLoader) - .loadAppOpen(eq("testId"), eq(mockAdRequest), eq(2), any(AppOpenAdLoadCallback.class)); + .loadAppOpen(eq("testId"), eq(mockAdRequest), any(AppOpenAdLoadCallback.class)); FlutterLoadAdError expectedError = new FlutterLoadAdError(loadAdError); verify(mockManager).onAdFailedToLoad(eq(1), eq(expectedError)); @@ -160,7 +159,7 @@ public void loadAdManager_success() { new Answer() { @Override public Object answer(InvocationOnMock invocation) throws Throwable { - AppOpenAdLoadCallback adLoadCallback = invocation.getArgument(3); + AppOpenAdLoadCallback adLoadCallback = invocation.getArgument(2); // Pass back null for ad adLoadCallback.onAdLoaded(mockAd); return null; @@ -168,7 +167,7 @@ public Object answer(InvocationOnMock invocation) throws Throwable { }) .when(mockFlutterAdLoader) .loadAdManagerAppOpen( - anyString(), any(AdManagerAdRequest.class), anyInt(), any(AppOpenAdLoadCallback.class)); + anyString(), any(AdManagerAdRequest.class), any(AppOpenAdLoadCallback.class)); final ResponseInfo responseInfo = mock(ResponseInfo.class); doReturn(responseInfo).when(mockAd).getResponseInfo(); @@ -193,7 +192,7 @@ public Object answer(InvocationOnMock invocation) { verify(mockFlutterAdLoader) .loadAdManagerAppOpen( - eq("testId"), eq(mockAdManagerAdRequest), eq(2), any(AppOpenAdLoadCallback.class)); + eq("testId"), eq(mockAdManagerAdRequest), any(AppOpenAdLoadCallback.class)); verify(mockManager).onAdLoaded(eq(1), eq(responseInfo)); verify(mockAd).setOnPaidEventListener(any(FlutterPaidEventListener.class)); @@ -214,14 +213,14 @@ public void loadAdmob_success() { new Answer() { @Override public Object answer(InvocationOnMock invocation) throws Throwable { - AppOpenAdLoadCallback adLoadCallback = invocation.getArgument(3); + AppOpenAdLoadCallback adLoadCallback = invocation.getArgument(2); // Pass back null for ad adLoadCallback.onAdLoaded(mockAd); return null; } }) .when(mockFlutterAdLoader) - .loadAppOpen(anyString(), any(AdRequest.class), anyInt(), any(AppOpenAdLoadCallback.class)); + .loadAppOpen(anyString(), any(AdRequest.class), any(AppOpenAdLoadCallback.class)); final ResponseInfo responseInfo = mock(ResponseInfo.class); doReturn(responseInfo).when(mockAd).getResponseInfo(); @@ -245,7 +244,7 @@ public Object answer(InvocationOnMock invocation) { flutterAppOpenAd.load(); verify(mockFlutterAdLoader) - .loadAppOpen(eq("testId"), eq(mockAdRequest), eq(2), any(AppOpenAdLoadCallback.class)); + .loadAppOpen(eq("testId"), eq(mockAdRequest), any(AppOpenAdLoadCallback.class)); verify(mockManager).onAdLoaded(eq(1), eq(responseInfo)); verify(mockAd).setOnPaidEventListener(any(FlutterPaidEventListener.class)); @@ -263,7 +262,7 @@ private void loadAdManagerAd() { new Answer() { @Override public Object answer(InvocationOnMock invocation) throws Throwable { - AppOpenAdLoadCallback adLoadCallback = invocation.getArgument(3); + AppOpenAdLoadCallback adLoadCallback = invocation.getArgument(2); // Pass back null for ad adLoadCallback.onAdLoaded(mockAd); return null; @@ -271,7 +270,7 @@ public Object answer(InvocationOnMock invocation) throws Throwable { }) .when(mockFlutterAdLoader) .loadAdManagerAppOpen( - anyString(), any(AdManagerAdRequest.class), anyInt(), any(AppOpenAdLoadCallback.class)); + anyString(), any(AdManagerAdRequest.class), any(AppOpenAdLoadCallback.class)); final ResponseInfo responseInfo = mock(ResponseInfo.class); doReturn(responseInfo).when(mockAd).getResponseInfo(); @@ -288,14 +287,14 @@ private void loadAdmobAd() { new Answer() { @Override public Object answer(InvocationOnMock invocation) throws Throwable { - AppOpenAdLoadCallback adLoadCallback = invocation.getArgument(3); + AppOpenAdLoadCallback adLoadCallback = invocation.getArgument(2); // Pass back null for ad adLoadCallback.onAdLoaded(mockAd); return null; } }) .when(mockFlutterAdLoader) - .loadAppOpen(anyString(), any(AdRequest.class), anyInt(), any(AppOpenAdLoadCallback.class)); + .loadAppOpen(anyString(), any(AdRequest.class), any(AppOpenAdLoadCallback.class)); final ResponseInfo responseInfo = mock(ResponseInfo.class); doReturn(responseInfo).when(mockAd).getResponseInfo(); @@ -444,14 +443,14 @@ public void setImmersiveMode() { new Answer() { @Override public Object answer(InvocationOnMock invocation) throws Throwable { - AppOpenAdLoadCallback adLoadCallback = invocation.getArgument(3); + AppOpenAdLoadCallback adLoadCallback = invocation.getArgument(2); adLoadCallback.onAdLoaded(mockAd); // Pass back null for ad return null; } }) .when(mockFlutterAdLoader) - .loadAppOpen(anyString(), any(AdRequest.class), anyInt(), any(AppOpenAdLoadCallback.class)); + .loadAppOpen(anyString(), any(AdRequest.class), any(AppOpenAdLoadCallback.class)); flutterAppOpenAd.load(); flutterAppOpenAd.setImmersiveMode(false); verify(mockAd).setImmersiveMode(eq(false)); diff --git a/packages/google_mobile_ads/android/src/test/java/io/flutter/plugins/googlemobileads/FlutterRequestAgentProviderTest.java b/packages/google_mobile_ads/android/src/test/java/io/flutter/plugins/googlemobileads/FlutterRequestAgentProviderTest.java index 980e2ff5a..c457f87a8 100644 --- a/packages/google_mobile_ads/android/src/test/java/io/flutter/plugins/googlemobileads/FlutterRequestAgentProviderTest.java +++ b/packages/google_mobile_ads/android/src/test/java/io/flutter/plugins/googlemobileads/FlutterRequestAgentProviderTest.java @@ -14,7 +14,10 @@ package io.flutter.plugins.googlemobileads; +import static android.os.Build.VERSION_CODES.S; +import static android.os.Build.VERSION_CODES.TIRAMISU; import static org.junit.Assert.assertEquals; +import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.mock; @@ -23,14 +26,17 @@ import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.content.pm.PackageManager.NameNotFoundException; +import android.os.Build; import android.os.Bundle; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.robolectric.RobolectricTestRunner; +import org.robolectric.annotation.Config; /** Tests {@link FlutterRequestAgentProvider}. */ @RunWith(RobolectricTestRunner.class) +@Config(sdk = {S, TIRAMISU}) public class FlutterRequestAgentProviderTest { private Context mockContext; @@ -49,9 +55,15 @@ public void setUp() throws NameNotFoundException { doReturn(mockContext).when(mockContext).getApplicationContext(); doReturn(mockPackageManager).when(mockContext).getPackageManager(); doReturn(PACKAGE_NAME).when(mockContext).getPackageName(); - doReturn(mockApplicationInfo) - .when(mockPackageManager) - .getApplicationInfo(eq(PACKAGE_NAME), eq(PackageManager.GET_META_DATA)); + if (Build.VERSION.SDK_INT >= TIRAMISU) { + doReturn(mockApplicationInfo) + .when(mockPackageManager) + .getApplicationInfo(eq(PACKAGE_NAME), any()); + } else { + doReturn(mockApplicationInfo) + .when(mockPackageManager) + .getApplicationInfo(eq(PACKAGE_NAME), eq(PackageManager.GET_META_DATA)); + } } @Test diff --git a/packages/google_mobile_ads/android/src/test/java/io/flutter/plugins/googlemobileads/usermessagingplatform/UserMessagingCodecTest.java b/packages/google_mobile_ads/android/src/test/java/io/flutter/plugins/googlemobileads/usermessagingplatform/UserMessagingCodecTest.java index 8a03e8f84..ad6e1c751 100644 --- a/packages/google_mobile_ads/android/src/test/java/io/flutter/plugins/googlemobileads/usermessagingplatform/UserMessagingCodecTest.java +++ b/packages/google_mobile_ads/android/src/test/java/io/flutter/plugins/googlemobileads/usermessagingplatform/UserMessagingCodecTest.java @@ -19,6 +19,7 @@ import static org.mockito.Mockito.mock; import com.google.android.ump.ConsentForm; +import com.google.android.ump.FormError; import java.nio.ByteBuffer; import java.util.Collections; import java.util.List; @@ -130,4 +131,16 @@ public void testConsentForm() { decoded = (ConsentForm) codec.decodeMessage((ByteBuffer) message.position(0)); assertNull(decoded); } + + @Test + public void testFormError() { + FormError formError = new FormError(123, "testMessage"); + + final ByteBuffer message = codec.encodeMessage(formError); + FormError decoded = (FormError) codec.decodeMessage((ByteBuffer) message.position(0)); + + assert decoded != null; + assertEquals(formError.getErrorCode(), decoded.getErrorCode()); + assertEquals(formError.getMessage(), decoded.getMessage()); + } } diff --git a/packages/google_mobile_ads/android/src/test/java/io/flutter/plugins/googlemobileads/usermessagingplatform/UserMessagingPlatformManagerTest.java b/packages/google_mobile_ads/android/src/test/java/io/flutter/plugins/googlemobileads/usermessagingplatform/UserMessagingPlatformManagerTest.java index 78e959827..7c5782488 100644 --- a/packages/google_mobile_ads/android/src/test/java/io/flutter/plugins/googlemobileads/usermessagingplatform/UserMessagingPlatformManagerTest.java +++ b/packages/google_mobile_ads/android/src/test/java/io/flutter/plugins/googlemobileads/usermessagingplatform/UserMessagingPlatformManagerTest.java @@ -30,6 +30,7 @@ import com.google.android.ump.ConsentInformation.ConsentStatus; import com.google.android.ump.ConsentInformation.OnConsentInfoUpdateFailureListener; import com.google.android.ump.ConsentInformation.OnConsentInfoUpdateSuccessListener; +import com.google.android.ump.ConsentInformation.PrivacyOptionsRequirementStatus; import com.google.android.ump.ConsentRequestParameters; import com.google.android.ump.FormError; import com.google.android.ump.UserMessagingPlatform; @@ -170,6 +171,59 @@ public void testConsentInformation_isConsentFormAvailable() { verify(result).success(eq(false)); } + @Test + public void testConsentInformation_canRequestAds() { + doReturn(true).when(mockConsentInformation).canRequestAds(); + MethodCall methodCall = new MethodCall("ConsentInformation#canRequestAds", null); + Result result = mock(Result.class); + + manager.onMethodCall(methodCall, result); + + verify(result).success(eq(true)); + } + + @Test + public void testConsentInformation_getPrivacyOptionsRequirementStatus_notRequiredReturns0() { + doReturn(PrivacyOptionsRequirementStatus.NOT_REQUIRED) + .when(mockConsentInformation) + .getPrivacyOptionsRequirementStatus(); + MethodCall methodCall = + new MethodCall("ConsentInformation#getPrivacyOptionsRequirementStatus", null); + Result result = mock(Result.class); + + manager.onMethodCall(methodCall, result); + + verify(result).success(eq(0)); + } + + @Test + public void testConsentInformation_getPrivacyOptionsRequirementStatus_requiredReturns1() { + doReturn(PrivacyOptionsRequirementStatus.REQUIRED) + .when(mockConsentInformation) + .getPrivacyOptionsRequirementStatus(); + MethodCall methodCall = + new MethodCall("ConsentInformation#getPrivacyOptionsRequirementStatus", null); + Result result = mock(Result.class); + + manager.onMethodCall(methodCall, result); + + verify(result).success(eq(1)); + } + + @Test + public void testConsentInformation_getPrivacyOptionsRequirementStatus_requiredReturns2() { + doReturn(PrivacyOptionsRequirementStatus.UNKNOWN) + .when(mockConsentInformation) + .getPrivacyOptionsRequirementStatus(); + MethodCall methodCall = + new MethodCall("ConsentInformation#getPrivacyOptionsRequirementStatus", null); + Result result = mock(Result.class); + + manager.onMethodCall(methodCall, result); + + verify(result).success(eq(2)); + } + @Test public void testUserMessagingPlatform_loadConsentFormAndDispose() { MethodCall methodCall = new MethodCall("UserMessagingPlatform#loadConsentForm", null); @@ -204,6 +258,78 @@ public void testUserMessagingPlatform_loadConsentFormAndDispose() { verify(result).success(null); } + @Test + public void testUserMessagingPlatform_loadAndShowConsentFormIfRequired() { + manager.setActivity(activity); + MethodCall methodCall = + new MethodCall("UserMessagingPlatform#loadAndShowConsentFormIfRequired", null); + Result result = mock(Result.class); + + manager.onMethodCall(methodCall, result); + + ArgumentCaptor listenerCaptor = + ArgumentCaptor.forClass(OnConsentFormDismissedListener.class); + mockedUmp.verify( + () -> + UserMessagingPlatform.loadAndShowConsentFormIfRequired( + eq(activity), listenerCaptor.capture())); + listenerCaptor.getValue().onConsentFormDismissed(null); + verify(result).success(isNull()); + } + + @Test + public void testUserMessagingPlatform_loadAndShowConsentFormIfRequired_withFormError() { + manager.setActivity(activity); + FormError mockFormError = mock(FormError.class); + MethodCall methodCall = + new MethodCall("UserMessagingPlatform#loadAndShowConsentFormIfRequired", null); + Result result = mock(Result.class); + + manager.onMethodCall(methodCall, result); + + ArgumentCaptor listenerCaptor = + ArgumentCaptor.forClass(OnConsentFormDismissedListener.class); + mockedUmp.verify( + () -> + UserMessagingPlatform.loadAndShowConsentFormIfRequired( + eq(activity), listenerCaptor.capture())); + listenerCaptor.getValue().onConsentFormDismissed(mockFormError); + verify(result).success(mockFormError); + } + + @Test + public void testUserMessagingPlatform_showPrivacyOptionsForm() { + manager.setActivity(activity); + MethodCall methodCall = new MethodCall("UserMessagingPlatform#showPrivacyOptionsForm", null); + Result result = mock(Result.class); + + manager.onMethodCall(methodCall, result); + + ArgumentCaptor listenerCaptor = + ArgumentCaptor.forClass(OnConsentFormDismissedListener.class); + mockedUmp.verify( + () -> UserMessagingPlatform.showPrivacyOptionsForm(eq(activity), listenerCaptor.capture())); + listenerCaptor.getValue().onConsentFormDismissed(null); + verify(result).success(isNull()); + } + + @Test + public void testUserMessagingPlatform_showPrivacyOptionsForm_withFormError() { + manager.setActivity(activity); + FormError mockFormError = mock(FormError.class); + MethodCall methodCall = new MethodCall("UserMessagingPlatform#showPrivacyOptionsForm", null); + Result result = mock(Result.class); + + manager.onMethodCall(methodCall, result); + + ArgumentCaptor listenerCaptor = + ArgumentCaptor.forClass(OnConsentFormDismissedListener.class); + mockedUmp.verify( + () -> UserMessagingPlatform.showPrivacyOptionsForm(eq(activity), listenerCaptor.capture())); + listenerCaptor.getValue().onConsentFormDismissed(mockFormError); + verify(result).success(mockFormError); + } + @Test public void testConsentForm_show() { manager.setActivity(activity); diff --git a/packages/google_mobile_ads/example/android/app/build.gradle b/packages/google_mobile_ads/example/android/app/build.gradle index 2c2e6e541..c1b39b6ae 100644 --- a/packages/google_mobile_ads/example/android/app/build.gradle +++ b/packages/google_mobile_ads/example/android/app/build.gradle @@ -1,3 +1,9 @@ +plugins { + id "com.android.application" + id "kotlin-android" + id "dev.flutter.flutter-gradle-plugin" +} + def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { @@ -6,11 +12,6 @@ if (localPropertiesFile.exists()) { } } -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - def flutterVersionCode = localProperties.getProperty('flutter.versionCode') if (flutterVersionCode == null) { flutterVersionCode = '1' @@ -21,11 +22,8 @@ if (flutterVersionName == null) { flutterVersionName = '1.0' } -apply plugin: 'com.android.application' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - android { - compileSdkVersion 33 + compileSdk 36 namespace 'io.flutter.plugins.googlemobileadsexample' @@ -35,8 +33,8 @@ android { defaultConfig { applicationId "io.flutter.plugins.googlemobileadsexample" - minSdkVersion 19 - targetSdkVersion 33 + minSdkVersion flutter.minSdkVersion + targetSdkVersion 34 versionCode flutterVersionCode.toInteger() versionName flutterVersionName testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" @@ -52,8 +50,8 @@ android { } compileOptions { - sourceCompatibility JavaVersion.VERSION_17 - targetCompatibility JavaVersion.VERSION_17 + sourceCompatibility JavaLanguageVersion.of(17) + targetCompatibility JavaLanguageVersion.of(17) } } @@ -62,7 +60,10 @@ flutter { } dependencies { - testImplementation 'junit:junit:4.12' + testImplementation 'junit:junit:4.13.2' + testImplementation 'org.robolectric:robolectric:4.14.1' + testImplementation 'org.mockito:mockito-core:5.15.2' + androidTestImplementation 'org.robolectric:robolectric:4.10.3' androidTestImplementation 'androidx.test:runner:1.2.0' androidTestImplementation 'androidx.test:rules:1.2.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' diff --git a/packages/google_mobile_ads/example/android/build.gradle b/packages/google_mobile_ads/example/android/build.gradle index 67f5524b5..bc157bd1a 100644 --- a/packages/google_mobile_ads/example/android/build.gradle +++ b/packages/google_mobile_ads/example/android/build.gradle @@ -1,14 +1,3 @@ -buildscript { - repositories { - google() - mavenCentral() - } - - dependencies { - classpath 'com.android.tools.build:gradle:8.0.1' - } -} - allprojects { repositories { google() @@ -24,6 +13,6 @@ subprojects { project.evaluationDependsOn(':app') } -task clean(type: Delete) { +tasks.register("clean", Delete) { delete rootProject.buildDir } diff --git a/packages/google_mobile_ads/example/android/gradle.properties b/packages/google_mobile_ads/example/android/gradle.properties index 08f2b5f91..f17eebabc 100644 --- a/packages/google_mobile_ads/example/android/gradle.properties +++ b/packages/google_mobile_ads/example/android/gradle.properties @@ -1,3 +1,3 @@ -org.gradle.jvmargs=-Xmx1536M +org.gradle.jvmargs=-Xmx4G android.enableJetifier=true android.useAndroidX=true diff --git a/packages/google_mobile_ads/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/google_mobile_ads/example/android/gradle/wrapper/gradle-wrapper.properties index 5bab02b5d..be540d717 100644 --- a/packages/google_mobile_ads/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/packages/google_mobile_ads/example/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Sat May 13 14:40:00 CEST 2023 +#Tue Nov 25 09:25:58 PST 2025 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/packages/google_mobile_ads/example/android/settings.gradle b/packages/google_mobile_ads/example/android/settings.gradle index 115da6cb4..3080135e8 100644 --- a/packages/google_mobile_ads/example/android/settings.gradle +++ b/packages/google_mobile_ads/example/android/settings.gradle @@ -1,15 +1,25 @@ -include ':app' +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + }() -def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") -def plugins = new Properties() -def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') -if (pluginsFile.exists()) { - pluginsFile.withInputStream { stream -> plugins.load(stream) } + repositories { + google() + mavenCentral() + gradlePluginPortal() + } } -plugins.each { name, path -> - def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() - include ":$name" - project(":$name").projectDir = pluginDirectory +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "8.13.1" apply false + id "org.jetbrains.kotlin.android" version "2.2.21" apply false } + +include ":app" \ No newline at end of file diff --git a/packages/google_mobile_ads/example/ios/Flutter/AppFrameworkInfo.plist b/packages/google_mobile_ads/example/ios/Flutter/AppFrameworkInfo.plist index 9b41e7d87..1f6b98f11 100644 --- a/packages/google_mobile_ads/example/ios/Flutter/AppFrameworkInfo.plist +++ b/packages/google_mobile_ads/example/ios/Flutter/AppFrameworkInfo.plist @@ -25,6 +25,6 @@ arm64 MinimumOSVersion - 11.0 + 13.0 diff --git a/packages/google_mobile_ads/example/ios/Podfile b/packages/google_mobile_ads/example/ios/Podfile index 0d0a36ca6..5dc3b65f7 100644 --- a/packages/google_mobile_ads/example/ios/Podfile +++ b/packages/google_mobile_ads/example/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -# platform :ios, '11.0' +platform :ios, '13.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' @@ -36,7 +36,7 @@ target 'Runner' do inherit! :search_paths # Matches test_spec dependency. - pod 'OCMock', '3.6' + pod 'OCMock', '3.9.3' end end diff --git a/packages/google_mobile_ads/example/ios/Runner.xcodeproj/project.pbxproj b/packages/google_mobile_ads/example/ios/Runner.xcodeproj/project.pbxproj index 43dafac25..9ec8e605a 100644 --- a/packages/google_mobile_ads/example/ios/Runner.xcodeproj/project.pbxproj +++ b/packages/google_mobile_ads/example/ios/Runner.xcodeproj/project.pbxproj @@ -9,8 +9,7 @@ /* Begin PBXBuildFile section */ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 3D7E269FA8038A55BBCBF250 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A2AB4EE7241D0927BB957D65 /* Pods_Runner.framework */; }; - 588A95C9AF0A9F291BFBAA5B /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 86606948223BE74D544C6A9E /* Pods_RunnerTests.framework */; }; + 887A5D54EBB22EE56FEA68C0 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 27D45D7A6903C5DAFE9FAFAD /* Pods_RunnerTests.framework */; }; 8FC897F52411A9F100415930 /* NativeAdView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8FC897F42411A9F100415930 /* NativeAdView.xib */; }; 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; @@ -39,6 +38,7 @@ 9E61AA6029BBE8FD00801A83 /* FLTNativeTemplateStyleTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 9E61AA5B29BBE8FD00801A83 /* FLTNativeTemplateStyleTest.m */; }; 9E61AA6129BBE8FD00801A83 /* FLTNativeTemplateFontStyleTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 9E61AA5C29BBE8FD00801A83 /* FLTNativeTemplateFontStyleTest.m */; }; 9E61AA6229BBE8FD00801A83 /* FLTNativeTemplateColorTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 9E61AA5D29BBE8FD00801A83 /* FLTNativeTemplateColorTest.m */; }; + EBE2BC5BBFE6DB1E33F703F6 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FE39CA478AEB75A8616A301A /* Pods_Runner.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -65,16 +65,17 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 11876BBEFD14DE336FDF468C /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; + 04096F79A89B65B77A1695FF /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + 0AA51DA50D3118092B5307E1 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; + 0E1C520597602A0CDC46050E /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 27D45D7A6903C5DAFE9FAFAD /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 41FDEFDDDE2EF7FC7A8F36B5 /* Pods-google_mobile_ads_exampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-google_mobile_ads_exampleTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-google_mobile_ads_exampleTests/Pods-google_mobile_ads_exampleTests.release.xcconfig"; sourceTree = ""; }; - 49D53C9BFB8E1019F721B2A9 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; + 44F3DED22B745BEE004D7117 /* FLTMediationExtras.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FLTMediationExtras.h; path = ../../ios/Classes/FLTMediationExtras.h; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 86606948223BE74D544C6A9E /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 8FC897F42411A9F100415930 /* NativeAdView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NativeAdView.xib; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; @@ -155,11 +156,8 @@ 9EF4E6FE26392B230007E4FE /* FLTGoogleMobileAdsCollection_Internal.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = FLTGoogleMobileAdsCollection_Internal.m; path = ../../ios/Classes/FLTGoogleMobileAdsCollection_Internal.m; sourceTree = ""; }; 9EF4E6FF26392B230007E4FE /* FLTMobileAds_Internal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FLTMobileAds_Internal.h; path = ../../ios/Classes/FLTMobileAds_Internal.h; sourceTree = ""; }; 9EFEAB4E29B0019F000A063B /* GoogleMobileAds.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = GoogleMobileAds.xcframework; path = "Pods/Google-Mobile-Ads-SDK/Frameworks/GoogleMobileAdsFramework/GoogleMobileAds.xcframework"; sourceTree = ""; }; - A2AB4EE7241D0927BB957D65 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - B4B811D89E676EBD37E2E206 /* libPods-google_mobile_ads_exampleTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-google_mobile_ads_exampleTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - C0B22AB9B287C9F711EAAF48 /* Pods-google_mobile_ads_exampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-google_mobile_ads_exampleTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-google_mobile_ads_exampleTests/Pods-google_mobile_ads_exampleTests.debug.xcconfig"; sourceTree = ""; }; - CE82265EF05E2A9632B25E60 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; - F74051031B69F8124E38352E /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + A380EE5B67A6B0F501F9FBF1 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + FE39CA478AEB75A8616A301A /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -167,7 +165,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 3D7E269FA8038A55BBCBF250 /* Pods_Runner.framework in Frameworks */, + EBE2BC5BBFE6DB1E33F703F6 /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -175,24 +173,22 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 588A95C9AF0A9F291BFBAA5B /* Pods_RunnerTests.framework in Frameworks */, + 887A5D54EBB22EE56FEA68C0 /* Pods_RunnerTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 07A52D07C2C05D9527204891 /* Pods */ = { + 194BB02CA5CDABA098EA0B10 /* Pods */ = { isa = PBXGroup; children = ( - CE82265EF05E2A9632B25E60 /* Pods-Runner.debug.xcconfig */, - F74051031B69F8124E38352E /* Pods-Runner.release.xcconfig */, - C0B22AB9B287C9F711EAAF48 /* Pods-google_mobile_ads_exampleTests.debug.xcconfig */, - 41FDEFDDDE2EF7FC7A8F36B5 /* Pods-google_mobile_ads_exampleTests.release.xcconfig */, - 49D53C9BFB8E1019F721B2A9 /* Pods-RunnerTests.debug.xcconfig */, - 11876BBEFD14DE336FDF468C /* Pods-RunnerTests.release.xcconfig */, - ); - name = Pods; + 04096F79A89B65B77A1695FF /* Pods-Runner.debug.xcconfig */, + A380EE5B67A6B0F501F9FBF1 /* Pods-Runner.release.xcconfig */, + 0E1C520597602A0CDC46050E /* Pods-RunnerTests.debug.xcconfig */, + 0AA51DA50D3118092B5307E1 /* Pods-RunnerTests.release.xcconfig */, + ); + path = Pods; sourceTree = ""; }; 5B6AAA352BAC85BF7DD68C46 /* Frameworks */ = { @@ -201,9 +197,8 @@ 9EFEAB4E29B0019F000A063B /* GoogleMobileAds.xcframework */, 9EB9FE57280F853D00DDBB4F /* UserMessagingPlatform.xcframework */, 9EA7213525BB6464008D57E3 /* GoogleMobileAds.xcframework */, - B4B811D89E676EBD37E2E206 /* libPods-google_mobile_ads_exampleTests.a */, - A2AB4EE7241D0927BB957D65 /* Pods_Runner.framework */, - 86606948223BE74D544C6A9E /* Pods_RunnerTests.framework */, + FE39CA478AEB75A8616A301A /* Pods_Runner.framework */, + 27D45D7A6903C5DAFE9FAFAD /* Pods_RunnerTests.framework */, ); name = Frameworks; sourceTree = ""; @@ -242,14 +237,15 @@ 9EF4E6FC26392B230007E4FE /* FLTGoogleMobileAdsPlugin.m */, 9EF4E6F826392B230007E4FE /* FLTGoogleMobileAdsReaderWriter_Internal.h */, 9EF4E6FA26392B230007E4FE /* FLTGoogleMobileAdsReaderWriter_Internal.m */, + 44F3DED22B745BEE004D7117 /* FLTMediationExtras.h */, 9EF4E6FF26392B230007E4FE /* FLTMobileAds_Internal.h */, 9EF4E6F626392B230007E4FE /* FLTMobileAds_Internal.m */, 9740EEB11CF90186004384FC /* Flutter */, 97C146F01CF9000F007C117D /* Runner */, 9E61AA1729BBE51900801A83 /* RunnerTests */, 97C146EF1CF9000F007C117D /* Products */, - 07A52D07C2C05D9527204891 /* Pods */, 5B6AAA352BAC85BF7DD68C46 /* Frameworks */, + 194BB02CA5CDABA098EA0B10 /* Pods */, ); sourceTree = ""; }; @@ -388,15 +384,15 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( - 2C1A4E9A6849F7CC6B679EA5 /* [CP] Check Pods Manifest.lock */, + 0EDD04BE717BEB4026757E35 /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - 49DB53F11513926D17758C29 /* [CP] Copy Pods Resources */, - D336851A73EADA4508A711A0 /* [CP] Embed Pods Frameworks */, + D621B7120BAE5B88B39CB730 /* [CP] Embed Pods Frameworks */, + 352E2E45CC90E4DC15A87261 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -411,11 +407,11 @@ isa = PBXNativeTarget; buildConfigurationList = 9E61AA1E29BBE51900801A83 /* Build configuration list for PBXNativeTarget "RunnerTests" */; buildPhases = ( - F0309092BBFE54C4077DB91D /* [CP] Check Pods Manifest.lock */, + 1C462BC1BFB6789887F378CB /* [CP] Check Pods Manifest.lock */, 9E61AA1229BBE51900801A83 /* Sources */, 9E61AA1329BBE51900801A83 /* Frameworks */, 9E61AA1429BBE51900801A83 /* Resources */, - 3C1065414114FFC1A695F30C /* [CP] Embed Pods Frameworks */, + 01F28CB039EB603C0792037A /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -433,7 +429,8 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1300; + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = "The Chromium Authors"; TargetAttributes = { 97C146ED1CF9000F007C117D = { @@ -488,68 +485,83 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 2C1A4E9A6849F7CC6B679EA5 /* [CP] Check Pods Manifest.lock */ = { + 01F28CB039EB603C0792037A /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", + "${PODS_ROOT}/Target Support Files/Pods-RunnerTests/Pods-RunnerTests-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/OCMock/OCMock.framework", ); - name = "[CP] Check Pods Manifest.lock"; + name = "[CP] Embed Pods Frameworks"; outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OCMock.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RunnerTests/Pods-RunnerTests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + 0EDD04BE717BEB4026757E35 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); + inputFileListPaths = ( + ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( ); - name = "Thin Binary"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed\n/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; }; - 3C1065414114FFC1A695F30C /* [CP] Embed Pods Frameworks */ = { + 1C462BC1BFB6789887F378CB /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); + inputFileListPaths = ( + ); inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-RunnerTests/Pods-RunnerTests-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/OCMock/OCMock.framework", + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( ); - name = "[CP] Embed Pods Frameworks"; outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OCMock.framework", + "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RunnerTests/Pods-RunnerTests-frameworks.sh\"\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 49DB53F11513926D17758C29 /* [CP] Copy Pods Resources */ = { + 352E2E45CC90E4DC15A87261 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh", + "${PODS_CONFIGURATION_BUILD_DIR}/Google-Mobile-Ads-SDK/GoogleMobileAdsResources.bundle", + "${PODS_CONFIGURATION_BUILD_DIR}/GoogleUserMessagingPlatform/UserMessagingPlatformResources.bundle", "${PODS_CONFIGURATION_BUILD_DIR}/google_mobile_ads/google_mobile_ads.bundle", ); name = "[CP] Copy Pods Resources"; outputPaths = ( + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GoogleMobileAdsResources.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/UserMessagingPlatformResources.bundle", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/google_mobile_ads.bundle", ); runOnlyForDeploymentPostprocessing = 0; @@ -557,65 +569,53 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; showEnvVarsInLog = 0; }; - 9740EEB61CF901F6004384FC /* Run Script */ = { + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", ); - name = "Run Script"; + name = "Thin Binary"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build\n"; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed\n/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin\n"; }; - D336851A73EADA4508A711A0 /* [CP] Embed Pods Frameworks */ = { + 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/GoogleUtilities/GoogleUtilities.framework", - "${BUILT_PRODUCTS_DIR}/PromisesObjC/FBLPromises.framework", - "${BUILT_PRODUCTS_DIR}/nanopb/nanopb.framework", - "${BUILT_PRODUCTS_DIR}/webview_flutter_wkwebview/webview_flutter_wkwebview.framework", ); - name = "[CP] Embed Pods Frameworks"; + name = "Run Script"; outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleUtilities.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBLPromises.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/nanopb.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/webview_flutter_wkwebview.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; - showEnvVarsInLog = 0; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build\n"; }; - F0309092BBFE54C4077DB91D /* [CP] Check Pods Manifest.lock */ = { + D621B7120BAE5B88B39CB730 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); - inputFileListPaths = ( - ); inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/webview_flutter_wkwebview/webview_flutter_wkwebview.framework", ); + name = "[CP] Embed Pods Frameworks"; outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/webview_flutter_wkwebview.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -725,6 +725,7 @@ DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -739,7 +740,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -782,6 +783,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -790,7 +792,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; @@ -811,7 +813,7 @@ "$(PROJECT_DIR)/Flutter", ); INFOPLIST_FILE = Runner/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -838,7 +840,7 @@ "$(PROJECT_DIR)/Flutter", ); INFOPLIST_FILE = Runner/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -854,7 +856,7 @@ }; 9E61AA1C29BBE51900801A83 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 49D53C9BFB8E1019F721B2A9 /* Pods-RunnerTests.debug.xcconfig */; + baseConfigurationReference = 0E1C520597602A0CDC46050E /* Pods-RunnerTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; @@ -864,6 +866,7 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu11; GENERATE_INFOPLIST_FILE = YES; IPHONEOS_DEPLOYMENT_TARGET = 16.1; @@ -880,7 +883,7 @@ }; 9E61AA1D29BBE51900801A83 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 11876BBEFD14DE336FDF468C /* Pods-RunnerTests.release.xcconfig */; + baseConfigurationReference = 0AA51DA50D3118092B5307E1 /* Pods-RunnerTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; @@ -890,6 +893,7 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu11; GENERATE_INFOPLIST_FILE = YES; IPHONEOS_DEPLOYMENT_TARGET = 16.1; diff --git a/packages/google_mobile_ads/example/ios/RunnerTests/FLTAppOpenAdTest.m b/packages/google_mobile_ads/example/ios/RunnerTests/FLTAppOpenAdTest.m index c0aa33efe..1122044e4 100644 --- a/packages/google_mobile_ads/example/ios/RunnerTests/FLTAppOpenAdTest.m +++ b/packages/google_mobile_ads/example/ios/RunnerTests/FLTAppOpenAdTest.m @@ -56,26 +56,19 @@ - (void)testLoadShowGAMRequest { // Helper method for testing with FLTAdRequest and FLTGAMAdRequest. - (void)testLoadShowAppOpenAd:(FLTAdRequest *)request gadOrGAMRequest:(GADRequest *)gadOrGAMRequest { - UIViewController *mockRootViewController = - OCMClassMock([UIViewController class]); - FLTAppOpenAd *ad = - [[FLTAppOpenAd alloc] initWithAdUnitId:@"testId" - request:request - rootViewController:mockRootViewController - orientation:@1 - adId:@1]; + FLTAppOpenAd *ad = [[FLTAppOpenAd alloc] initWithAdUnitId:@"testId" + request:request + adId:@1]; ad.manager = mockManager; // Stub the load call to invoke successful load callback. id appOpenClassMock = OCMClassMock([GADAppOpenAd class]); - OCMStub(ClassMethod([appOpenClassMock - loadWithAdUnitID:[OCMArg any] - request:[OCMArg any] - orientation:UIInterfaceOrientationPortrait - completionHandler:[OCMArg any]])) + OCMStub(ClassMethod([appOpenClassMock loadWithAdUnitID:[OCMArg any] + request:[OCMArg any] + completionHandler:[OCMArg any]])) .andDo(^(NSInvocation *invocation) { void (^completionHandler)(GADAppOpenAd *ad, NSError *error); - [invocation getArgument:&completionHandler atIndex:5]; + [invocation getArgument:&completionHandler atIndex:4]; completionHandler(appOpenClassMock, nil); }); // Stub setting of FullScreenContentDelegate to invoke delegate callbacks. @@ -113,7 +106,6 @@ - (void)testLoadShowAppOpenAd:(FLTAdRequest *)request OCMVerify(ClassMethod([appOpenClassMock loadWithAdUnitID:[OCMArg isEqual:@"testId"] request:[OCMArg isEqual:gadOrGAMRequest] - orientation:UIInterfaceOrientationPortrait completionHandler:[OCMArg any]])); OCMVerify([mockManager onAdLoaded:[OCMArg isEqual:ad] responseInfo:[OCMArg isEqual:responseInfo]]); @@ -134,8 +126,7 @@ - (void)testLoadShowAppOpenAd:(FLTAdRequest *)request [ad show]; - OCMVerify([appOpenClassMock - presentFromRootViewController:[OCMArg isEqual:mockRootViewController]]); + OCMVerify([appOpenClassMock presentFromRootViewController:[OCMArg isNil]]); // Verify full screen callbacks. OCMVerify([mockManager adWillPresentFullScreenContent:[OCMArg isEqual:ad]]); @@ -166,36 +157,27 @@ - (void)testFailedToLoadGAMRequest { // Helper for testing failed to load. - (void)testFailedToLoad:(FLTAdRequest *)request { - UIViewController *mockRootViewController = - OCMClassMock([UIViewController class]); - FLTAppOpenAd *ad = - [[FLTAppOpenAd alloc] initWithAdUnitId:@"testId" - request:request - rootViewController:mockRootViewController - orientation:@2 - adId:@1]; + FLTAppOpenAd *ad = [[FLTAppOpenAd alloc] initWithAdUnitId:@"testId" + request:request + adId:@1]; ad.manager = mockManager; id appOpenClassMock = OCMClassMock([GADAppOpenAd class]); NSError *error = OCMClassMock([NSError class]); - OCMStub(ClassMethod([appOpenClassMock - loadWithAdUnitID:[OCMArg any] - request:[OCMArg any] - orientation:UIInterfaceOrientationLandscapeLeft - completionHandler:[OCMArg any]])) + OCMStub(ClassMethod([appOpenClassMock loadWithAdUnitID:[OCMArg any] + request:[OCMArg any] + completionHandler:[OCMArg any]])) .andDo(^(NSInvocation *invocation) { void (^completionHandler)(GADAppOpenAd *ad, NSError *error); - [invocation getArgument:&completionHandler atIndex:5]; + [invocation getArgument:&completionHandler atIndex:4]; completionHandler(nil, error); }); [ad load]; - OCMVerify(ClassMethod([appOpenClassMock - loadWithAdUnitID:[OCMArg any] - request:[OCMArg any] - orientation:UIInterfaceOrientationLandscapeLeft - completionHandler:[OCMArg any]])); + OCMVerify(ClassMethod([appOpenClassMock loadWithAdUnitID:[OCMArg any] + request:[OCMArg any] + completionHandler:[OCMArg any]])); OCMVerify([mockManager onAdFailedToLoad:[OCMArg isEqual:ad] error:[OCMArg isEqual:error]]); } diff --git a/packages/google_mobile_ads/example/ios/RunnerTests/FLTGamInterstitialAdTest.m b/packages/google_mobile_ads/example/ios/RunnerTests/FLTGamInterstitialAdTest.m index c02b34fb1..da46fba0b 100644 --- a/packages/google_mobile_ads/example/ios/RunnerTests/FLTGamInterstitialAdTest.m +++ b/packages/google_mobile_ads/example/ios/RunnerTests/FLTGamInterstitialAdTest.m @@ -35,12 +35,9 @@ - (void)testLoadShowInterstitialAd { GAMRequest *gadRequest = OCMClassMock([GAMRequest class]); OCMStub([request asGAMRequest:[OCMArg any]]).andReturn(gadRequest); - UIViewController *mockRootViewController = - OCMClassMock([UIViewController class]); FLTGAMInterstitialAd *ad = [[FLTGAMInterstitialAd alloc] initWithAdUnitId:@"testId" request:request - rootViewController:mockRootViewController adId:@1]; ad.manager = mockManager; @@ -120,8 +117,8 @@ - (void)testLoadShowInterstitialAd { // Show the ad [ad show]; - OCMVerify([interstitialClassMock - presentFromRootViewController:[OCMArg isEqual:mockRootViewController]]); + OCMVerify( + [interstitialClassMock presentFromRootViewController:[OCMArg isNil]]); // Verify full screen callbacks. OCMVerify([mockManager adWillPresentFullScreenContent:[OCMArg isEqual:ad]]); @@ -145,12 +142,9 @@ - (void)testFailToLoad { GAMRequest *gadRequest = OCMClassMock([GAMRequest class]); OCMStub([request asGAMRequest:[OCMArg any]]).andReturn(gadRequest); - UIViewController *mockRootViewController = - OCMClassMock([UIViewController class]); FLTGAMInterstitialAd *ad = [[FLTGAMInterstitialAd alloc] initWithAdUnitId:@"testId" request:request - rootViewController:mockRootViewController adId:@1]; ad.manager = mockManager; diff --git a/packages/google_mobile_ads/example/ios/RunnerTests/FLTGoogleMobileAdsPluginMethodCallsTest.m b/packages/google_mobile_ads/example/ios/RunnerTests/FLTGoogleMobileAdsPluginMethodCallsTest.m index bc405cd38..3f429c90b 100644 --- a/packages/google_mobile_ads/example/ios/RunnerTests/FLTGoogleMobileAdsPluginMethodCallsTest.m +++ b/packages/google_mobile_ads/example/ios/RunnerTests/FLTGoogleMobileAdsPluginMethodCallsTest.m @@ -171,7 +171,7 @@ - (void)testSetSameAppKeyEnabledYes { XCTAssertTrue(resultInvoked); XCTAssertNil(returnedResult); OCMVerify([gadRequestConfigurationMock - setSameAppKeyEnabled:[OCMArg isEqual:@(YES)]]); + setPublisherFirstPartyIDEnabled:[OCMArg isEqual:@(YES)]]); } - (void)testRegisterWebView { @@ -226,7 +226,7 @@ - (void)testSetSameAppKeyEnabledNo { XCTAssertTrue(resultInvoked); XCTAssertNil(returnedResult); - OCMVerify([gadRequestConfigurationMock setSameAppKeyEnabled:NO]); + OCMVerify([gadRequestConfigurationMock setPublisherFirstPartyIDEnabled:NO]); FlutterMethodCall *methodCallWithBool = [FlutterMethodCall methodCallWithMethodName:@"MobileAds#setSameAppKeyEnabled" @@ -244,7 +244,7 @@ - (void)testSetSameAppKeyEnabledNo { XCTAssertTrue(resultInvokedWithBool); XCTAssertNil(returnedResultWithBool); - OCMVerify([gadRequestConfigurationMock setSameAppKeyEnabled:NO]); + OCMVerify([gadRequestConfigurationMock setPublisherFirstPartyIDEnabled:NO]); } - (void)testSetAppMuted { @@ -263,6 +263,11 @@ - (void)testSetAppMuted { XCTAssertTrue(resultInvoked); XCTAssertNil(returnedResult); + NSTimeInterval timeout = 5.0; + NSDate *startTime = [NSDate date]; + while (!GADMobileAds.sharedInstance.applicationMuted && [[NSDate date] timeIntervalSinceDate:startTime] < timeout) { + [NSThread sleepForTimeInterval:0.1]; + } XCTAssertTrue(GADMobileAds.sharedInstance.applicationMuted); methodCall = @@ -279,6 +284,10 @@ - (void)testSetAppMuted { XCTAssertTrue(resultInvoked); XCTAssertNil(returnedResult); + startTime = [NSDate date]; + while (GADMobileAds.sharedInstance.applicationMuted && [[NSDate date] timeIntervalSinceDate:startTime] < timeout) { + [NSThread sleepForTimeInterval:0.1]; + } XCTAssertFalse(GADMobileAds.sharedInstance.applicationMuted); } @@ -361,7 +370,9 @@ - (void)testGetVersionString { [_fltGoogleMobileAdsPlugin handleMethodCall:methodCall result:result]; XCTAssertTrue(resultInvoked); - XCTAssertEqual(returnedResult, [GADMobileAds.sharedInstance sdkVersion]); + XCTAssertEqual( + returnedResult, + GADGetStringFromVersionNumber(GADMobileAds.sharedInstance.versionNumber)); } - (void)testOpenDebugMenu { diff --git a/packages/google_mobile_ads/example/ios/RunnerTests/FLTGoogleMobileAdsReaderWriterTest.m b/packages/google_mobile_ads/example/ios/RunnerTests/FLTGoogleMobileAdsReaderWriterTest.m index 845b984fe..e60d75356 100644 --- a/packages/google_mobile_ads/example/ios/RunnerTests/FLTGoogleMobileAdsReaderWriterTest.m +++ b/packages/google_mobile_ads/example/ios/RunnerTests/FLTGoogleMobileAdsReaderWriterTest.m @@ -21,6 +21,7 @@ #import "FLTGoogleMobileAdsCollection_Internal.h" #import "FLTGoogleMobileAdsPlugin.h" #import "FLTGoogleMobileAdsReaderWriter_Internal.h" +#import "FLTMediationExtras.h" #import "FLTMobileAds_Internal.h" #import "FLTNativeTemplateColor.h" #import "FLTNativeTemplateFontStyle.h" @@ -35,6 +36,9 @@ @interface FLTTestAdSizeFactory : FLTAdSizeFactory @property(readonly) GADAdSize testAdSize; @end +@interface _FlutterMediationExtras : NSObject +@end + @implementation FLTGoogleMobileAdsReaderWriterTest { FlutterStandardMessageCodec *_messageCodec; FLTGoogleMobileAdsReaderWriter *_readerWriter; @@ -60,16 +64,18 @@ - (void)testEncodeDecodeAdSize { } - (void)testEncodeDecodeRequestConfiguration { - GADRequestConfiguration *requestConfiguration = - [GADRequestConfiguration alloc]; - requestConfiguration.maxAdContentRating = GADMaxAdContentRatingMatureAudience; - [GADMobileAds.sharedInstance.requestConfiguration - tagForChildDirectedTreatment:YES]; - [GADMobileAds.sharedInstance.requestConfiguration tagForUnderAgeOfConsent:NO]; + GADMobileAds.sharedInstance.requestConfiguration.maxAdContentRating = + GADMaxAdContentRatingMatureAudience; + GADMobileAds.sharedInstance.requestConfiguration + .tagForChildDirectedTreatment = @YES; + GADMobileAds.sharedInstance.requestConfiguration.tagForUnderAgeOfConsent = + @NO; NSArray *testDeviceIds = [[NSArray alloc] initWithObjects:@"test-device-id", nil]; - requestConfiguration.testDeviceIdentifiers = testDeviceIds; - NSData *encodedMessage = [_messageCodec encode:requestConfiguration]; + GADMobileAds.sharedInstance.requestConfiguration.testDeviceIdentifiers = + testDeviceIds; + NSData *encodedMessage = + [_messageCodec encode:GADMobileAds.sharedInstance.requestConfiguration]; GADRequestConfiguration *decodedSize = [_messageCodec decode:encodedMessage]; XCTAssertEqualObjects(decodedSize.maxAdContentRating, @@ -258,6 +264,9 @@ - (void)testEncodeDecodeFluidAdSize { } - (void)testEncodeDecodeAdRequest { + id mediationExtras = + [[_FlutterMediationExtras alloc] init]; + mediationExtras.extras = @{@"test_key" : @"test_value"}; FLTAdRequest *request = [[FLTAdRequest alloc] init]; request.keywords = @[ @"apple" ]; request.contentURL = @"banana"; @@ -266,6 +275,9 @@ - (void)testEncodeDecodeAdRequest { request.neighboringContentURLs = contentURLs; request.mediationExtrasIdentifier = @"identifier"; request.adMobExtras = @{@"key" : @"value"}; + NSArray> *mediationExtrasArray = + @[ mediationExtras ]; + request.mediationExtras = mediationExtrasArray; NSData *encodedMessage = [_messageCodec encode:request]; FLTAdRequest *decodedRequest = [_messageCodec decode:encodedMessage]; @@ -277,9 +289,14 @@ - (void)testEncodeDecodeAdRequest { @"identifier"); XCTAssertEqualObjects(decodedRequest.adMobExtras, @{@"key" : @"value"}); XCTAssertEqualObjects(decodedRequest.requestAgent, @"request-agent"); + XCTAssertEqualObjects(decodedRequest.mediationExtras[0].extras, + @{@"test_key" : @"test_value"}); } - (void)testEncodeDecodeGAMAdRequest { + id mediationExtras = + [[_FlutterMediationExtras alloc] init]; + mediationExtras.extras = @{@"test_key" : @"test_value"}; FLTGAMAdRequest *request = [[FLTGAMAdRequest alloc] init]; request.keywords = @[ @"apple" ]; request.contentURL = @"banana"; @@ -291,6 +308,9 @@ - (void)testEncodeDecodeGAMAdRequest { request.pubProvidedID = @"pub-id"; request.mediationExtrasIdentifier = @"identifier"; request.adMobExtras = @{@"key" : @"value"}; + NSArray> *mediationExtrasArray = + @[ mediationExtras ]; + request.mediationExtras = mediationExtrasArray; NSData *encodedMessage = [_messageCodec encode:request]; FLTGAMAdRequest *decodedRequest = [_messageCodec decode:encodedMessage]; @@ -307,6 +327,8 @@ - (void)testEncodeDecodeGAMAdRequest { @"identifier"); XCTAssertEqualObjects(decodedRequest.adMobExtras, @{@"key" : @"value"}); XCTAssertEqualObjects(decodedRequest.requestAgent, @"request-agent"); + XCTAssertEqualObjects(decodedRequest.mediationExtras[0].extras, + @{@"test_key" : @"test_value"}); } - (void)testEncodeDecodeRewardItem { @@ -380,10 +402,14 @@ - (void)testEncodeDecodeNSError { - (void)testEncodeDecodeFLTGADLoadError { GADResponseInfo *mockResponseInfo = OCMClassMock([GADResponseInfo class]); + GADAdNetworkResponseInfo *mockAdNetworkResponseInfo = + OCMClassMock([GADAdNetworkResponseInfo class]); NSString *identifier = @"test-identifier"; NSString *className = @"test-class-name"; OCMStub([mockResponseInfo responseIdentifier]).andReturn(identifier); - OCMStub([mockResponseInfo adNetworkClassName]).andReturn(className); + OCMStub(mockResponseInfo.loadedAdNetworkResponseInfo) + .andReturn(mockAdNetworkResponseInfo); + OCMStub(mockAdNetworkResponseInfo.adNetworkClassName).andReturn(className); NSDictionary *userInfo = @{ NSLocalizedDescriptionKey : @"message", GADErrorUserInfoKeyResponseInfo : mockResponseInfo @@ -410,10 +436,14 @@ - (void)testEncodeDecodeFLTGADLoadErrorWithResponseInfo { OCMStub([mockNetworkResponse adNetworkClassName]).andReturn(@"adapter-class"); GADResponseInfo *mockResponseInfo = OCMClassMock([GADResponseInfo class]); + GADAdNetworkResponseInfo *mockAdNetworkResponseInfo = + OCMClassMock([GADAdNetworkResponseInfo class]); NSString *identifier = @"test-identifier"; NSString *className = @"test-class-name"; OCMStub([mockResponseInfo responseIdentifier]).andReturn(identifier); - OCMStub([mockResponseInfo adNetworkClassName]).andReturn(className); + OCMStub(mockResponseInfo.loadedAdNetworkResponseInfo) + .andReturn(mockAdNetworkResponseInfo); + OCMStub(mockAdNetworkResponseInfo.adNetworkClassName).andReturn(className); OCMStub([mockResponseInfo adNetworkInfoArray]).andReturn(@[ mockNetworkResponse ]); @@ -533,7 +563,8 @@ - (void)testEncodeDecodeFLTGADResponseInfo { - (void)testEncodeDecodeFLTGADLoadErrorWithEmptyValues { GADResponseInfo *mockResponseInfo = OCMClassMock([GADResponseInfo class]); OCMStub([mockResponseInfo responseIdentifier]).andReturn(nil); - OCMStub([mockResponseInfo adNetworkClassName]).andReturn(nil); + OCMStub([mockResponseInfo.loadedAdNetworkResponseInfo adNetworkClassName]) + .andReturn(nil); NSDictionary *userInfo = @{ NSLocalizedDescriptionKey : @"message", GADErrorUserInfoKeyResponseInfo : mockResponseInfo @@ -770,3 +801,13 @@ - (GADAdSize)currentOrientationAnchoredAdaptiveBannerAdSizeWithWidth: return GADAdSizeFromCGSize(CGSizeMake(width.doubleValue, 0)); } @end + +@implementation _FlutterMediationExtras + +@synthesize extras; + +- (id _Nonnull)getMediationExtras { + return OCMProtocolMock(@protocol(GADAdNetworkExtras)); +} + +@end diff --git a/packages/google_mobile_ads/example/ios/RunnerTests/FLTGoogleMobileAdsTest.m b/packages/google_mobile_ads/example/ios/RunnerTests/FLTGoogleMobileAdsTest.m index d5b50cae5..427b5e3df 100644 --- a/packages/google_mobile_ads/example/ios/RunnerTests/FLTGoogleMobileAdsTest.m +++ b/packages/google_mobile_ads/example/ios/RunnerTests/FLTGoogleMobileAdsTest.m @@ -249,11 +249,10 @@ - (void)testAdInstanceManagerOnNativeAdEvents { } - (void)testAdInstanceManagerOnRewardedAdUserEarnedReward { - FLTRewardedAd *ad = [[FLTRewardedAd alloc] - initWithAdUnitId:@"testId" - request:[[FLTAdRequest alloc] init] - rootViewController:OCMClassMock([UIViewController class]) - adId:@1]; + FLTRewardedAd *ad = + [[FLTRewardedAd alloc] initWithAdUnitId:@"testId" + request:[[FLTAdRequest alloc] init] + adId:@1]; [_manager loadAd:ad]; [_manager onRewardedAdUserEarnedReward:ad @@ -277,10 +276,9 @@ - (void)testAdInstanceManagerOnRewardedAdUserEarnedReward { - (void)testAdInstanceManagerOnRewardedInterstitialAdUserEarnedReward { FLTRewardedInterstitialAd *ad = [[FLTRewardedInterstitialAd alloc] - initWithAdUnitId:@"testId" - request:[[FLTAdRequest alloc] init] - rootViewController:OCMClassMock([UIViewController class]) - adId:@1]; + initWithAdUnitId:@"testId" + request:[[FLTAdRequest alloc] init] + adId:@1]; [_manager loadAd:ad]; [_manager @@ -369,11 +367,10 @@ - (void)testBannerEvents { } - (void)testFullScreenEventsRewardedAd { - FLTRewardedAd *rewardedAd = [[FLTRewardedAd alloc] - initWithAdUnitId:@"testId" - request:[[FLTAdRequest alloc] init] - rootViewController:OCMClassMock([UIViewController class]) - adId:@1]; + FLTRewardedAd *rewardedAd = + [[FLTRewardedAd alloc] initWithAdUnitId:@"testId" + request:[[FLTAdRequest alloc] init] + adId:@1]; [_manager loadAd:rewardedAd]; [_manager adWillPresentFullScreenContent:rewardedAd]; @@ -400,10 +397,9 @@ - (void)testFullScreenEventsRewardedAd { - (void)testFullScreenEventsRewardedInterstitialAd { FLTRewardedInterstitialAd *rewardedInterstitialAd = [[FLTRewardedInterstitialAd alloc] - initWithAdUnitId:@"testId" - request:[[FLTAdRequest alloc] init] - rootViewController:OCMClassMock([UIViewController class]) - adId:@1]; + initWithAdUnitId:@"testId" + request:[[FLTAdRequest alloc] init] + adId:@1]; [_manager loadAd:rewardedInterstitialAd]; [_manager adWillPresentFullScreenContent:rewardedInterstitialAd]; @@ -464,10 +460,9 @@ - (NSData *)getDataForEvent:(NSString *)name adId:(NSNumber *)adId { - (void)testAdClick { FLTRewardedInterstitialAd *rewardedInterstitialAd = [[FLTRewardedInterstitialAd alloc] - initWithAdUnitId:@"testId" - request:[[FLTAdRequest alloc] init] - rootViewController:OCMClassMock([UIViewController class]) - adId:@1]; + initWithAdUnitId:@"testId" + request:[[FLTAdRequest alloc] init] + adId:@1]; [_manager adDidRecordClick:rewardedInterstitialAd]; NSData *impressionData = [self getDataForEvent:@"adDidRecordClick" adId:@1]; diff --git a/packages/google_mobile_ads/example/ios/RunnerTests/FLTInterstitialAdTest.m b/packages/google_mobile_ads/example/ios/RunnerTests/FLTInterstitialAdTest.m index e850374a8..d3ef3c13d 100644 --- a/packages/google_mobile_ads/example/ios/RunnerTests/FLTInterstitialAdTest.m +++ b/packages/google_mobile_ads/example/ios/RunnerTests/FLTInterstitialAdTest.m @@ -35,13 +35,9 @@ - (void)testLoadShowInterstitialAd { GADRequest *gadRequest = OCMClassMock([GADRequest class]); OCMStub([request asGADRequest:[OCMArg any]]).andReturn(gadRequest); - UIViewController *mockRootViewController = - OCMClassMock([UIViewController class]); - FLTInterstitialAd *ad = - [[FLTInterstitialAd alloc] initWithAdUnitId:@"testId" - request:request - rootViewController:mockRootViewController - adId:@1]; + FLTInterstitialAd *ad = [[FLTInterstitialAd alloc] initWithAdUnitId:@"testId" + request:request + adId:@1]; ad.manager = mockManager; id interstitialClassMock = OCMClassMock([GADInterstitialAd class]); @@ -109,8 +105,8 @@ - (void)testLoadShowInterstitialAd { // Show the ad [ad show]; - OCMVerify([interstitialClassMock - presentFromRootViewController:[OCMArg isEqual:mockRootViewController]]); + OCMVerify( + [interstitialClassMock presentFromRootViewController:[OCMArg isNil]]); // Verify full screen callbacks. OCMVerify([mockManager adWillPresentFullScreenContent:[OCMArg isEqual:ad]]); @@ -129,13 +125,9 @@ - (void)testFailedToLoad { GADRequest *gadRequest = OCMClassMock([GADRequest class]); OCMStub([request asGADRequest:[OCMArg any]]).andReturn(gadRequest); - UIViewController *mockRootViewController = - OCMClassMock([UIViewController class]); - FLTInterstitialAd *ad = - [[FLTInterstitialAd alloc] initWithAdUnitId:@"testId" - request:request - rootViewController:mockRootViewController - adId:@1]; + FLTInterstitialAd *ad = [[FLTInterstitialAd alloc] initWithAdUnitId:@"testId" + request:request + adId:@1]; ad.manager = mockManager; id interstitialClassMock = OCMClassMock([GADInterstitialAd class]); diff --git a/packages/google_mobile_ads/example/ios/RunnerTests/FLTNativeAdTest.m b/packages/google_mobile_ads/example/ios/RunnerTests/FLTNativeAdTest.m index 2bd82573b..4c3b8cb29 100644 --- a/packages/google_mobile_ads/example/ios/RunnerTests/FLTNativeAdTest.m +++ b/packages/google_mobile_ads/example/ios/RunnerTests/FLTNativeAdTest.m @@ -52,7 +52,7 @@ - (void)testLoadNativeAd:(FLTAdRequest *)gadOrGAMRequest GADAdLoaderOptions *mockGADAdLoaderOptions = OCMClassMock([GADAdLoaderOptions class]); OCMStub([mockNativeAdOptions asGADAdLoaderOptions]) - .andReturn(mockGADAdLoaderOptions); + .andReturn([NSArray arrayWithObject:mockGADAdLoaderOptions]); UIViewController *mockViewController = OCMClassMock([UIViewController class]); FLTNativeAd *ad = [[FLTNativeAd alloc] initWithAdUnitId:@"testAdUnitId" @@ -162,7 +162,7 @@ - (void)testLoadNativeAdNativeTemplateStyle { GADAdLoaderOptions *mockGADAdLoaderOptions = OCMClassMock([GADAdLoaderOptions class]); OCMStub([mockNativeAdOptions asGADAdLoaderOptions]) - .andReturn(mockGADAdLoaderOptions); + .andReturn([NSArray arrayWithObject:mockGADAdLoaderOptions]); UIViewController *mockViewController = OCMClassMock([UIViewController class]); FLTNativeTemplateStyle *templateStyle = OCMClassMock([FLTNativeTemplateStyle class]); diff --git a/packages/google_mobile_ads/example/ios/RunnerTests/FLTRewardedAdTest.m b/packages/google_mobile_ads/example/ios/RunnerTests/FLTRewardedAdTest.m index b74965cf7..71d6f66d8 100644 --- a/packages/google_mobile_ads/example/ios/RunnerTests/FLTRewardedAdTest.m +++ b/packages/google_mobile_ads/example/ios/RunnerTests/FLTRewardedAdTest.m @@ -50,13 +50,9 @@ - (void)testLoadShowRewardedAdGAMRequest { // Helper method for testing with FLTAdRequest and FLTGAMAdRequest. - (void)testLoadShowRewardedAd:(FLTAdRequest *)request gadOrGAMRequest:(GADRequest *)gadOrGAMRequest { - UIViewController *mockRootViewController = - OCMClassMock([UIViewController class]); - FLTRewardedAd *ad = - [[FLTRewardedAd alloc] initWithAdUnitId:@"testId" - request:request - rootViewController:mockRootViewController - adId:@1]; + FLTRewardedAd *ad = [[FLTRewardedAd alloc] initWithAdUnitId:@"testId" + request:request + adId:@1]; ad.manager = mockManager; // Stub the load call to invoke successful load callback. @@ -149,9 +145,8 @@ - (void)testLoadShowRewardedAd:(FLTAdRequest *)request // Show the ad and verify callbacks invoked [ad show]; - OCMVerify([rewardedClassMock - presentFromRootViewController:[OCMArg isEqual:mockRootViewController] - userDidEarnRewardHandler:[OCMArg any]]); + OCMVerify([rewardedClassMock presentFromRootViewController:[OCMArg isNil] + userDidEarnRewardHandler:[OCMArg any]]); [fullScreenContentDelegate adWillPresentFullScreenContent:rewardedClassMock]; OCMVerify([mockManager adWillPresentFullScreenContent:[OCMArg isEqual:ad]]); @@ -216,13 +211,9 @@ - (void)testFailedToLoadGAMRequest { // Helper for testing failed to load. - (void)testFailedToLoad:(FLTAdRequest *)request { - UIViewController *mockRootViewController = - OCMClassMock([UIViewController class]); - FLTRewardedAd *ad = - [[FLTRewardedAd alloc] initWithAdUnitId:@"testId" - request:request - rootViewController:mockRootViewController - adId:@1]; + FLTRewardedAd *ad = [[FLTRewardedAd alloc] initWithAdUnitId:@"testId" + request:request + adId:@1]; ad.manager = mockManager; id rewardedClassMock = OCMClassMock([GADRewardedAd class]); diff --git a/packages/google_mobile_ads/example/ios/RunnerTests/FLTRewardedInterstitialAdTest.m b/packages/google_mobile_ads/example/ios/RunnerTests/FLTRewardedInterstitialAdTest.m index 33d9384c5..0c5475638 100644 --- a/packages/google_mobile_ads/example/ios/RunnerTests/FLTRewardedInterstitialAdTest.m +++ b/packages/google_mobile_ads/example/ios/RunnerTests/FLTRewardedInterstitialAdTest.m @@ -50,12 +50,9 @@ - (void)testLoadShowRewardedInterstitialAdGAMRequest { // Helper method for testing with FLTAdRequest and FLTGAMAdRequest. - (void)testLoadShowRewardedInterstitialAd:(FLTAdRequest *)request gadOrGAMRequest:(GADRequest *)gadOrGAMRequest { - UIViewController *mockRootViewController = - OCMClassMock([UIViewController class]); FLTRewardedInterstitialAd *ad = [[FLTRewardedInterstitialAd alloc] initWithAdUnitId:@"testId" request:request - rootViewController:mockRootViewController adId:@1]; ad.manager = mockManager; @@ -155,7 +152,7 @@ - (void)testLoadShowRewardedInterstitialAd:(FLTAdRequest *)request [ad show]; OCMVerify([rewardedInterstitialClassMock - presentFromRootViewController:[OCMArg isEqual:mockRootViewController] + presentFromRootViewController:[OCMArg isNil] userDidEarnRewardHandler:[OCMArg any]]); // Verify full screen callbacks. @@ -202,12 +199,9 @@ - (void)testFailedToLoadGAMRequest { // Helper for testing failed to load. - (void)testFailedToLoad:(FLTAdRequest *)request { - UIViewController *mockRootViewController = - OCMClassMock([UIViewController class]); FLTRewardedInterstitialAd *ad = [[FLTRewardedInterstitialAd alloc] initWithAdUnitId:@"testId" request:request - rootViewController:mockRootViewController adId:@1]; ad.manager = mockManager; diff --git a/packages/google_mobile_ads/example/ios/RunnerTests/FLTUserMessagingPlatformManagerTest.m b/packages/google_mobile_ads/example/ios/RunnerTests/FLTUserMessagingPlatformManagerTest.m index 020c14a09..946460bac 100644 --- a/packages/google_mobile_ads/example/ios/RunnerTests/FLTUserMessagingPlatformManagerTest.m +++ b/packages/google_mobile_ads/example/ios/RunnerTests/FLTUserMessagingPlatformManagerTest.m @@ -81,6 +81,75 @@ - (void)testGetConsentStatus { OCMVerify([mockUmpConsentInformation consentStatus]); } +- (void)testCanRequestAds_yes { + FlutterMethodCall *methodCall = [FlutterMethodCall + methodCallWithMethodName:@"ConsentInformation#canRequestAds" + arguments:@{}]; + OCMStub([mockUmpConsentInformation canRequestAds]).andReturn(YES); + + [umpManager handleMethodCall:methodCall result:flutterResult]; + + XCTAssertTrue(resultInvoked); + XCTAssertEqual(returnedResult, [[NSNumber alloc] initWithBool:YES]); +} + +- (void)testCanRequestAds_no { + FlutterMethodCall *methodCall = [FlutterMethodCall + methodCallWithMethodName:@"ConsentInformation#canRequestAds" + arguments:@{}]; + OCMStub([mockUmpConsentInformation canRequestAds]).andReturn(NO); + + [umpManager handleMethodCall:methodCall result:flutterResult]; + + XCTAssertTrue(resultInvoked); + XCTAssertEqual(returnedResult, [[NSNumber alloc] initWithBool:NO]); +} + +- (void)testGetPrivacyOptionsRequirementStatus_notRequiredReturns0 { + FlutterMethodCall *methodCall = [FlutterMethodCall + methodCallWithMethodName: + @"ConsentInformation#getPrivacyOptionsRequirementStatus" + arguments:@{}]; + OCMStub([mockUmpConsentInformation privacyOptionsRequirementStatus]) + .andReturn(UMPPrivacyOptionsRequirementStatusNotRequired); + + [umpManager handleMethodCall:methodCall result:flutterResult]; + + XCTAssertTrue(resultInvoked); + NSNumber *expected = [[NSNumber alloc] initWithInt:0]; + XCTAssertEqual(returnedResult, expected); +} + +- (void)testGetPrivacyOptionsRequirementStatus_requiredReturns1 { + FlutterMethodCall *methodCall = [FlutterMethodCall + methodCallWithMethodName: + @"ConsentInformation#getPrivacyOptionsRequirementStatus" + arguments:@{}]; + OCMStub([mockUmpConsentInformation privacyOptionsRequirementStatus]) + .andReturn(UMPPrivacyOptionsRequirementStatusRequired); + + [umpManager handleMethodCall:methodCall result:flutterResult]; + + XCTAssertTrue(resultInvoked); + NSNumber *expected = [[NSNumber alloc] initWithInt:1]; + XCTAssertEqual(returnedResult, expected); +} + +- (void)testGetPrivacyOptionsRequirementStatus_unknownReturns2 { + FlutterMethodCall *methodCall = [FlutterMethodCall + methodCallWithMethodName: + @"ConsentInformation#getPrivacyOptionsRequirementStatus" + arguments:@{}]; + OCMStub([mockUmpConsentInformation privacyOptionsRequirementStatus]) + .andReturn(UMPPrivacyOptionsRequirementStatusUnknown); + + [umpManager handleMethodCall:methodCall result:flutterResult]; + + XCTAssertTrue(resultInvoked); + NSNumber *expected = [[NSNumber alloc] initWithInt:2]; + XCTAssertEqual(returnedResult, expected); +} + - (void)testRequestConsentInfoUpdate_success { UMPRequestParameters *params = OCMClassMock([UMPRequestParameters class]); @@ -136,6 +205,61 @@ - (void)testRequestConsentInfoUpdate_error { XCTAssertEqualObjects(resultError.message, @"description"); } +- (void)testLoadAndShowConsentFormIfRequired_success { + UMPRequestParameters *params = OCMClassMock([UMPRequestParameters class]); + FlutterMethodCall *methodCall = [FlutterMethodCall + methodCallWithMethodName: + @"UserMessagingPlatform#loadAndShowConsentFormIfRequired" + arguments:@{@"params" : params}]; + id mockUmpConsentForm = OCMClassMock([UMPConsentForm class]); + OCMStub([mockUmpConsentForm + loadAndPresentIfRequiredFromViewController:[OCMArg any] + completionHandler:[OCMArg any]]) + .andDo(^(NSInvocation *invocation) { + __unsafe_unretained void (^completionHandler)(NSError *loadError); + [invocation getArgument:&completionHandler atIndex:3]; + completionHandler(nil); + }); + + [umpManager handleMethodCall:methodCall result:flutterResult]; + + XCTAssertTrue(resultInvoked); + XCTAssertNil(returnedResult); + OCMVerify([mockUmpConsentForm + loadAndPresentIfRequiredFromViewController:[OCMArg any] + completionHandler:[OCMArg any]]); +} + +- (void)testLoadAndShowConsentFormIfRequired_error { + NSDictionary *userInfo = @{NSLocalizedDescriptionKey : @"description"}; + NSError *error = [NSError errorWithDomain:@"domain" code:1 userInfo:userInfo]; + UMPRequestParameters *params = OCMClassMock([UMPRequestParameters class]); + FlutterMethodCall *methodCall = [FlutterMethodCall + methodCallWithMethodName: + @"UserMessagingPlatform#loadAndShowConsentFormIfRequired" + arguments:@{@"params" : params}]; + id mockUmpConsentForm = OCMClassMock([UMPConsentForm class]); + OCMStub([mockUmpConsentForm + loadAndPresentIfRequiredFromViewController:[OCMArg any] + completionHandler:[OCMArg any]]) + .andDo(^(NSInvocation *invocation) { + __unsafe_unretained void (^completionHandler)(NSError *loadError); + [invocation getArgument:&completionHandler atIndex:3]; + completionHandler(error); + }); + + [umpManager handleMethodCall:methodCall result:flutterResult]; + + XCTAssertTrue(resultInvoked); + FlutterError *resultError = (FlutterError *)returnedResult; + XCTAssertEqualObjects(resultError.code, @"1"); + XCTAssertEqualObjects(resultError.details, @"domain"); + XCTAssertEqualObjects(resultError.message, @"description"); + OCMVerify([mockUmpConsentForm + loadAndPresentIfRequiredFromViewController:[OCMArg any] + completionHandler:[OCMArg any]]); +} + - (void)testLoadConsentForm_successAndDispose { FlutterMethodCall *methodCall = [FlutterMethodCall methodCallWithMethodName:@"UserMessagingPlatform#loadConsentForm" @@ -187,6 +311,59 @@ - (void)testLoadConsentForm_error { XCTAssertEqualObjects(resultError.message, @"description"); } +- (void)testShowPrivacyOptionsForm_success { + UMPRequestParameters *params = OCMClassMock([UMPRequestParameters class]); + FlutterMethodCall *methodCall = [FlutterMethodCall + methodCallWithMethodName:@"UserMessagingPlatform#showPrivacyOptionsForm" + arguments:@{@"params" : params}]; + id mockUmpConsentForm = OCMClassMock([UMPConsentForm class]); + OCMStub([mockUmpConsentForm + presentPrivacyOptionsFormFromViewController:[OCMArg any] + completionHandler:[OCMArg any]]) + .andDo(^(NSInvocation *invocation) { + __unsafe_unretained void (^completionHandler)(NSError *loadError); + [invocation getArgument:&completionHandler atIndex:3]; + completionHandler(nil); + }); + + [umpManager handleMethodCall:methodCall result:flutterResult]; + + XCTAssertTrue(resultInvoked); + XCTAssertNil(returnedResult); + OCMVerify([mockUmpConsentForm + presentPrivacyOptionsFormFromViewController:[OCMArg any] + completionHandler:[OCMArg any]]); +} + +- (void)testShowPrivacyOptionsForm_error { + NSDictionary *userInfo = @{NSLocalizedDescriptionKey : @"description"}; + NSError *error = [NSError errorWithDomain:@"domain" code:1 userInfo:userInfo]; + UMPRequestParameters *params = OCMClassMock([UMPRequestParameters class]); + FlutterMethodCall *methodCall = [FlutterMethodCall + methodCallWithMethodName:@"UserMessagingPlatform#showPrivacyOptionsForm" + arguments:@{@"params" : params}]; + id mockUmpConsentForm = OCMClassMock([UMPConsentForm class]); + OCMStub([mockUmpConsentForm + presentPrivacyOptionsFormFromViewController:[OCMArg any] + completionHandler:[OCMArg any]]) + .andDo(^(NSInvocation *invocation) { + __unsafe_unretained void (^completionHandler)(NSError *loadError); + [invocation getArgument:&completionHandler atIndex:3]; + completionHandler(error); + }); + + [umpManager handleMethodCall:methodCall result:flutterResult]; + + XCTAssertTrue(resultInvoked); + FlutterError *resultError = (FlutterError *)returnedResult; + XCTAssertEqualObjects(resultError.code, @"1"); + XCTAssertEqualObjects(resultError.details, @"domain"); + XCTAssertEqualObjects(resultError.message, @"description"); + OCMVerify([mockUmpConsentForm + presentPrivacyOptionsFormFromViewController:[OCMArg any] + completionHandler:[OCMArg any]]); +} + - (void)testIsConsentFormAvailable_available { FlutterMethodCall *methodCall = [FlutterMethodCall methodCallWithMethodName:@"ConsentInformation#isConsentFormAvailable" diff --git a/packages/google_mobile_ads/example/ios/RunnerTests/FLTUserMessagingPlatformReaderWriterTest.m b/packages/google_mobile_ads/example/ios/RunnerTests/FLTUserMessagingPlatformReaderWriterTest.m index 721acf207..351133c7a 100644 --- a/packages/google_mobile_ads/example/ios/RunnerTests/FLTUserMessagingPlatformReaderWriterTest.m +++ b/packages/google_mobile_ads/example/ios/RunnerTests/FLTUserMessagingPlatformReaderWriterTest.m @@ -69,7 +69,7 @@ - (void)testConsentDebugSettings_default { - (void)testConsentDebugSettings_geographyTestDeviceIdentifiers { UMPDebugSettings *debugSettings = [[UMPDebugSettings alloc] init]; - debugSettings.geography = UMPDebugGeographyNotEEA; + debugSettings.geography = UMPDebugGeographyOther; debugSettings.testDeviceIdentifiers = @[ @"id-1", @"id-2" ]; NSData *encodedMessage = [messageCodec encode:debugSettings]; diff --git a/packages/google_mobile_ads/example/lib/anchored_adaptive_example.dart b/packages/google_mobile_ads/example/lib/anchored_adaptive_example.dart index 492891712..251ecc2e0 100644 --- a/packages/google_mobile_ads/example/lib/anchored_adaptive_example.dart +++ b/packages/google_mobile_ads/example/lib/anchored_adaptive_example.dart @@ -52,7 +52,8 @@ class _AnchoredAdaptiveExampleState extends State { final AnchoredAdaptiveBannerAdSize? size = await AdSize.getCurrentOrientationAnchoredAdaptiveBannerAdSize( - MediaQuery.of(context).size.width.truncate()); + MediaQuery.of(context).size.width.truncate(), + ); if (size == null) { print('Unable to get height of anchored banner.'); @@ -61,8 +62,8 @@ class _AnchoredAdaptiveExampleState extends State { _anchoredAdaptiveAd = BannerAd( adUnitId: Platform.isAndroid - ? 'ca-app-pub-3940256099942544/6300978111' - : 'ca-app-pub-3940256099942544/2934735716', + ? 'ca-app-pub-3940256099942544/9214589741' + : 'ca-app-pub-3940256099942544/2435281174', size: size, request: AdRequest(), listener: BannerAdListener( @@ -113,30 +114,29 @@ class _AnchoredAdaptiveExampleState extends State { @override Widget build(BuildContext context) => Scaffold( - appBar: AppBar( - title: Text('Anchored adaptive banner example'), - ), - body: Center( - child: Stack( - alignment: AlignmentDirectional.bottomCenter, - children: [ - ListView.separated( - padding: const EdgeInsets.symmetric(horizontal: 16.0), - itemBuilder: (context, index) { - return Text( - Constants.placeholderText, - style: TextStyle(fontSize: 24), - ); - }, - separatorBuilder: (context, index) { - return Container(height: 40); - }, - itemCount: 5), - _getAdWidget(), - ], + appBar: AppBar(title: Text('Anchored adaptive banner example')), + body: Center( + child: Stack( + alignment: AlignmentDirectional.bottomCenter, + children: [ + ListView.separated( + padding: const EdgeInsets.symmetric(horizontal: 16.0), + itemBuilder: (context, index) { + return Text( + Constants.placeholderText, + style: TextStyle(fontSize: 24), + ); + }, + separatorBuilder: (context, index) { + return Container(height: 40); + }, + itemCount: 5, ), - ), - ); + _getAdWidget(), + ], + ), + ), + ); @override void dispose() { diff --git a/packages/google_mobile_ads/example/lib/fluid_example.dart b/packages/google_mobile_ads/example/lib/fluid_example.dart index ed2ff51ed..361ffee98 100644 --- a/packages/google_mobile_ads/example/lib/fluid_example.dart +++ b/packages/google_mobile_ads/example/lib/fluid_example.dart @@ -30,53 +30,48 @@ class _FluidExampleExampleState extends State { @override Widget build(BuildContext context) => Scaffold( - appBar: AppBar( - title: Text('Fluid example'), - ), - body: Center( - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 16.0), - child: ListView.separated( - itemCount: 3, - separatorBuilder: (BuildContext context, int index) { - return Container( - height: 40, + appBar: AppBar(title: Text('Fluid example')), + body: Center( + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 16.0), + child: ListView.separated( + itemCount: 3, + separatorBuilder: (BuildContext context, int index) { + return Container(height: 40); + }, + itemBuilder: (BuildContext context, int index) { + if (index == 1) { + return Align( + alignment: Alignment.center, + child: FluidAdWidget(width: _width, ad: _fluidAd!), ); - }, - itemBuilder: (BuildContext context, int index) { - if (index == 1) { - return Align( - alignment: Alignment.center, - child: FluidAdWidget( - width: _width, - ad: _fluidAd!, - ), - ); - } else if (index == 2) { - return ElevatedButton( - onPressed: () { - double newWidth; - if (_width == 200.0) { - newWidth = 100.0; - } else if (_width == 100.0) { - newWidth = 150.0; - } else { - newWidth = 200.0; - } - setState(() { - _width = newWidth; - }); - }, - child: Text('Change size')); - } - return Text( - Constants.placeholderText, - style: TextStyle(fontSize: 24), + } else if (index == 2) { + return ElevatedButton( + onPressed: () { + double newWidth; + if (_width == 200.0) { + newWidth = 100.0; + } else if (_width == 100.0) { + newWidth = 150.0; + } else { + newWidth = 200.0; + } + setState(() { + _width = newWidth; + }); + }, + child: Text('Change size'), ); - }, - ), + } + return Text( + Constants.placeholderText, + style: TextStyle(fontSize: 24), + ); + }, ), - )); + ), + ), + ); @override void didChangeDependencies() { diff --git a/packages/google_mobile_ads/example/lib/inline_adaptive_example.dart b/packages/google_mobile_ads/example/lib/inline_adaptive_example.dart index adaad2a9c..0052508f9 100644 --- a/packages/google_mobile_ads/example/lib/inline_adaptive_example.dart +++ b/packages/google_mobile_ads/example/lib/inline_adaptive_example.dart @@ -14,6 +14,8 @@ // ignore_for_file: public_member_api_docs +import 'dart:io'; + import 'package:flutter/material.dart'; import 'package:google_mobile_ads/google_mobile_ads.dart'; import 'constants.dart'; @@ -52,10 +54,13 @@ class _InlineAdaptiveExampleState extends State { // Get an inline adaptive size for the current orientation. AdSize size = AdSize.getCurrentOrientationInlineAdaptiveBannerAdSize( - _adWidth.truncate()); + _adWidth.truncate(), + ); _inlineAdaptiveAd = AdManagerBannerAd( - adUnitId: 'ca-app-pub-3940256099942544/9214589741', + adUnitId: Platform.isAndroid + ? '/21775744923/example/banner' + : '/21775744923/example/adaptive-banner', sizes: [size], request: AdManagerAdRequest(), listener: AdManagerBannerAdListener( @@ -99,13 +104,12 @@ class _InlineAdaptiveExampleState extends State { _isLoaded && _adSize != null) { return Align( - child: Container( - width: _adWidth, - height: _adSize!.height.toDouble(), - child: AdWidget( - ad: _inlineAdaptiveAd!, + child: Container( + width: _adWidth, + height: _adSize!.height.toDouble(), + child: AdWidget(ad: _inlineAdaptiveAd!), ), - )); + ); } // Reload the ad if the orientation changes. if (_currentOrientation != orientation) { @@ -119,31 +123,28 @@ class _InlineAdaptiveExampleState extends State { @override Widget build(BuildContext context) => Scaffold( - appBar: AppBar( - title: Text('Inline adaptive banner example'), - ), - body: Center( - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: _insets), - child: ListView.separated( - itemCount: 3, - separatorBuilder: (BuildContext context, int index) { - return Container( - height: 40, - ); - }, - itemBuilder: (BuildContext context, int index) { - if (index == 1) { - return _getAdWidget(); - } - return Text( - Constants.placeholderText, - style: TextStyle(fontSize: 24), - ); - }, - ), + appBar: AppBar(title: Text('Inline adaptive banner example')), + body: Center( + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: _insets), + child: ListView.separated( + itemCount: 3, + separatorBuilder: (BuildContext context, int index) { + return Container(height: 40); + }, + itemBuilder: (BuildContext context, int index) { + if (index == 1) { + return _getAdWidget(); + } + return Text( + Constants.placeholderText, + style: TextStyle(fontSize: 24), + ); + }, ), - )); + ), + ), + ); @override void dispose() { diff --git a/packages/google_mobile_ads/example/lib/main.dart b/packages/google_mobile_ads/example/lib/main.dart index 556c8f6b1..8ee75cb54 100644 --- a/packages/google_mobile_ads/example/lib/main.dart +++ b/packages/google_mobile_ads/example/lib/main.dart @@ -23,6 +23,7 @@ import 'dart:developer'; import 'anchored_adaptive_example.dart'; import 'fluid_example.dart'; import 'inline_adaptive_example.dart'; +import 'multi_adaptive_inline_with_recycle_example.dart'; import 'native_template_example.dart'; import 'reusable_inline_example.dart'; import 'webview_example.dart'; @@ -55,6 +56,8 @@ class _MyAppState extends State { static const rewardedInterstitialButtonText = 'RewardedInterstitialAd'; static const fluidButtonText = 'Fluid'; static const inlineAdaptiveButtonText = 'Inline adaptive'; + static const mulipleInlineAdaptiveWithRecycleButtonText = + 'Multiple inline adaptive with recycle'; static const anchoredAdaptiveButtonText = 'Anchored adaptive'; static const nativeTemplateButtonText = 'Native template'; static const webviewExampleButtonText = 'Register WebView'; @@ -73,7 +76,8 @@ class _MyAppState extends State { void initState() { super.initState(); MobileAds.instance.updateRequestConfiguration( - RequestConfiguration(testDeviceIds: [testDevice])); + RequestConfiguration(testDeviceIds: [testDevice]), + ); _createInterstitialAd(); _createRewardedAd(); _createRewardedInterstitialAd(); @@ -81,26 +85,27 @@ class _MyAppState extends State { void _createInterstitialAd() { InterstitialAd.load( - adUnitId: Platform.isAndroid - ? 'ca-app-pub-3940256099942544/1033173712' - : 'ca-app-pub-3940256099942544/4411468910', - request: request, - adLoadCallback: InterstitialAdLoadCallback( - onAdLoaded: (InterstitialAd ad) { - print('$ad loaded'); - _interstitialAd = ad; - _numInterstitialLoadAttempts = 0; - _interstitialAd!.setImmersiveMode(true); - }, - onAdFailedToLoad: (LoadAdError error) { - print('InterstitialAd failed to load: $error.'); - _numInterstitialLoadAttempts += 1; - _interstitialAd = null; - if (_numInterstitialLoadAttempts < maxFailedLoadAttempts) { - _createInterstitialAd(); - } - }, - )); + adUnitId: Platform.isAndroid + ? 'ca-app-pub-3940256099942544/1033173712' + : 'ca-app-pub-3940256099942544/4411468910', + request: request, + adLoadCallback: InterstitialAdLoadCallback( + onAdLoaded: (InterstitialAd ad) { + print('$ad loaded'); + _interstitialAd = ad; + _numInterstitialLoadAttempts = 0; + _interstitialAd!.setImmersiveMode(true); + }, + onAdFailedToLoad: (LoadAdError error) { + print('InterstitialAd failed to load: $error.'); + _numInterstitialLoadAttempts += 1; + _interstitialAd = null; + if (_numInterstitialLoadAttempts < maxFailedLoadAttempts) { + _createInterstitialAd(); + } + }, + ), + ); } void _showInterstitialAd() { @@ -128,25 +133,26 @@ class _MyAppState extends State { void _createRewardedAd() { RewardedAd.load( - adUnitId: Platform.isAndroid - ? 'ca-app-pub-3940256099942544/5224354917' - : 'ca-app-pub-3940256099942544/1712485313', - request: request, - rewardedAdLoadCallback: RewardedAdLoadCallback( - onAdLoaded: (RewardedAd ad) { - print('$ad loaded.'); - _rewardedAd = ad; - _numRewardedLoadAttempts = 0; - }, - onAdFailedToLoad: (LoadAdError error) { - print('RewardedAd failed to load: $error'); - _rewardedAd = null; - _numRewardedLoadAttempts += 1; - if (_numRewardedLoadAttempts < maxFailedLoadAttempts) { - _createRewardedAd(); - } - }, - )); + adUnitId: Platform.isAndroid + ? 'ca-app-pub-3940256099942544/5224354917' + : 'ca-app-pub-3940256099942544/1712485313', + request: request, + rewardedAdLoadCallback: RewardedAdLoadCallback( + onAdLoaded: (RewardedAd ad) { + print('$ad loaded.'); + _rewardedAd = ad; + _numRewardedLoadAttempts = 0; + }, + onAdFailedToLoad: (LoadAdError error) { + print('RewardedAd failed to load: $error'); + _rewardedAd = null; + _numRewardedLoadAttempts += 1; + if (_numRewardedLoadAttempts < maxFailedLoadAttempts) { + _createRewardedAd(); + } + }, + ), + ); } void _showRewardedAd() { @@ -171,33 +177,35 @@ class _MyAppState extends State { _rewardedAd!.setImmersiveMode(true); _rewardedAd!.show( - onUserEarnedReward: (AdWithoutView ad, RewardItem reward) { - print('$ad with reward $RewardItem(${reward.amount}, ${reward.type})'); - }); + onUserEarnedReward: (AdWithoutView ad, RewardItem reward) { + print('$ad with reward $RewardItem(${reward.amount}, ${reward.type})'); + }, + ); _rewardedAd = null; } void _createRewardedInterstitialAd() { RewardedInterstitialAd.load( - adUnitId: Platform.isAndroid - ? 'ca-app-pub-3940256099942544/5354046379' - : 'ca-app-pub-3940256099942544/6978759866', - request: request, - rewardedInterstitialAdLoadCallback: RewardedInterstitialAdLoadCallback( - onAdLoaded: (RewardedInterstitialAd ad) { - print('$ad loaded.'); - _rewardedInterstitialAd = ad; - _numRewardedInterstitialLoadAttempts = 0; - }, - onAdFailedToLoad: (LoadAdError error) { - print('RewardedInterstitialAd failed to load: $error'); - _rewardedInterstitialAd = null; - _numRewardedInterstitialLoadAttempts += 1; - if (_numRewardedInterstitialLoadAttempts < maxFailedLoadAttempts) { - _createRewardedInterstitialAd(); - } - }, - )); + adUnitId: Platform.isAndroid + ? 'ca-app-pub-3940256099942544/5354046379' + : 'ca-app-pub-3940256099942544/6978759866', + request: request, + rewardedInterstitialAdLoadCallback: RewardedInterstitialAdLoadCallback( + onAdLoaded: (RewardedInterstitialAd ad) { + print('$ad loaded.'); + _rewardedInterstitialAd = ad; + _numRewardedInterstitialLoadAttempts = 0; + }, + onAdFailedToLoad: (LoadAdError error) { + print('RewardedInterstitialAd failed to load: $error'); + _rewardedInterstitialAd = null; + _numRewardedInterstitialLoadAttempts += 1; + if (_numRewardedInterstitialLoadAttempts < maxFailedLoadAttempts) { + _createRewardedInterstitialAd(); + } + }, + ), + ); } void _showRewardedInterstitialAd() { @@ -207,26 +215,27 @@ class _MyAppState extends State { } _rewardedInterstitialAd!.fullScreenContentCallback = FullScreenContentCallback( - onAdShowedFullScreenContent: (RewardedInterstitialAd ad) => - print('$ad onAdShowedFullScreenContent.'), - onAdDismissedFullScreenContent: (RewardedInterstitialAd ad) { - print('$ad onAdDismissedFullScreenContent.'); - ad.dispose(); - _createRewardedInterstitialAd(); - }, - onAdFailedToShowFullScreenContent: - (RewardedInterstitialAd ad, AdError error) { - print('$ad onAdFailedToShowFullScreenContent: $error'); - ad.dispose(); - _createRewardedInterstitialAd(); - }, - ); + onAdShowedFullScreenContent: (RewardedInterstitialAd ad) => + print('$ad onAdShowedFullScreenContent.'), + onAdDismissedFullScreenContent: (RewardedInterstitialAd ad) { + print('$ad onAdDismissedFullScreenContent.'); + ad.dispose(); + _createRewardedInterstitialAd(); + }, + onAdFailedToShowFullScreenContent: + (RewardedInterstitialAd ad, AdError error) { + print('$ad onAdFailedToShowFullScreenContent: $error'); + ad.dispose(); + _createRewardedInterstitialAd(); + }, + ); _rewardedInterstitialAd!.setImmersiveMode(true); _rewardedInterstitialAd!.show( - onUserEarnedReward: (AdWithoutView ad, RewardItem reward) { - print('$ad with reward $RewardItem(${reward.amount}, ${reward.type})'); - }); + onUserEarnedReward: (AdWithoutView ad, RewardItem reward) { + print('$ad with reward $RewardItem(${reward.amount}, ${reward.type})'); + }, + ); _rewardedInterstitialAd = null; } @@ -241,112 +250,139 @@ class _MyAppState extends State { @override Widget build(BuildContext context) { return MaterialApp( - home: Builder(builder: (BuildContext context) { - return Scaffold( - appBar: AppBar( - title: const Text('AdMob Plugin example app'), - actions: [ - PopupMenuButton( - onSelected: (String result) { - switch (result) { - case interstitialButtonText: - _showInterstitialAd(); - break; - case rewardedButtonText: - _showRewardedAd(); - break; - case rewardedInterstitialButtonText: - _showRewardedInterstitialAd(); - break; - case fluidButtonText: - Navigator.push( - context, - MaterialPageRoute(builder: (context) => FluidExample()), - ); - break; - case inlineAdaptiveButtonText: - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => InlineAdaptiveExample()), - ); - break; - case anchoredAdaptiveButtonText: - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => AnchoredAdaptiveExample()), - ); - break; - case nativeTemplateButtonText: - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => NativeTemplateExample()), - ); - break; - case webviewExampleButtonText: - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => WebViewExample()), - ); - break; - case adInspectorButtonText: - MobileAds.instance.openAdInspector((error) => log( - 'Ad Inspector ' + - (error == null - ? 'opened.' - : 'error: ' + (error.message ?? '')))); - break; - default: - throw AssertionError('unexpected button: $result'); - } - }, - itemBuilder: (BuildContext context) => >[ - PopupMenuItem( - value: interstitialButtonText, - child: Text(interstitialButtonText), - ), - PopupMenuItem( - value: rewardedButtonText, - child: Text(rewardedButtonText), - ), - PopupMenuItem( - value: rewardedInterstitialButtonText, - child: Text(rewardedInterstitialButtonText), - ), - PopupMenuItem( - value: fluidButtonText, - child: Text(fluidButtonText), - ), - PopupMenuItem( - value: inlineAdaptiveButtonText, - child: Text(inlineAdaptiveButtonText), - ), - PopupMenuItem( - value: anchoredAdaptiveButtonText, - child: Text(anchoredAdaptiveButtonText), - ), - PopupMenuItem( - value: nativeTemplateButtonText, - child: Text(nativeTemplateButtonText), - ), - PopupMenuItem( - value: webviewExampleButtonText, - child: Text(webviewExampleButtonText), - ), - PopupMenuItem( - value: adInspectorButtonText, - child: Text(adInspectorButtonText), - ), - ], - ), - ], - ), - body: SafeArea(child: ReusableInlineExample()), - ); - }), + home: Builder( + builder: (BuildContext context) { + return Scaffold( + appBar: AppBar( + title: const Text('AdMob Plugin example app'), + actions: [ + PopupMenuButton( + onSelected: (String result) { + switch (result) { + case interstitialButtonText: + _showInterstitialAd(); + break; + case rewardedButtonText: + _showRewardedAd(); + break; + case rewardedInterstitialButtonText: + _showRewardedInterstitialAd(); + break; + case fluidButtonText: + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => FluidExample(), + ), + ); + break; + case inlineAdaptiveButtonText: + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => InlineAdaptiveExample(), + ), + ); + break; + case mulipleInlineAdaptiveWithRecycleButtonText: + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + MultiInlineAdaptiveWithRecycleExample(), + ), + ); + break; + case anchoredAdaptiveButtonText: + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => AnchoredAdaptiveExample(), + ), + ); + break; + case nativeTemplateButtonText: + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => NativeTemplateExample(), + ), + ); + break; + case webviewExampleButtonText: + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => WebViewExample(), + ), + ); + break; + case adInspectorButtonText: + MobileAds.instance.openAdInspector( + (error) => log( + 'Ad Inspector ' + + (error == null + ? 'opened.' + : 'error: ' + (error.message ?? '')), + ), + ); + break; + default: + throw AssertionError('unexpected button: $result'); + } + }, + itemBuilder: (BuildContext context) => + >[ + PopupMenuItem( + value: interstitialButtonText, + child: Text(interstitialButtonText), + ), + PopupMenuItem( + value: rewardedButtonText, + child: Text(rewardedButtonText), + ), + PopupMenuItem( + value: rewardedInterstitialButtonText, + child: Text(rewardedInterstitialButtonText), + ), + PopupMenuItem( + value: fluidButtonText, + child: Text(fluidButtonText), + ), + PopupMenuItem( + value: inlineAdaptiveButtonText, + child: Text(inlineAdaptiveButtonText), + ), + PopupMenuItem( + value: mulipleInlineAdaptiveWithRecycleButtonText, + child: Text( + mulipleInlineAdaptiveWithRecycleButtonText, + ), + ), + PopupMenuItem( + value: anchoredAdaptiveButtonText, + child: Text(anchoredAdaptiveButtonText), + ), + PopupMenuItem( + value: nativeTemplateButtonText, + child: Text(nativeTemplateButtonText), + ), + PopupMenuItem( + value: webviewExampleButtonText, + child: Text(webviewExampleButtonText), + ), + PopupMenuItem( + value: adInspectorButtonText, + child: Text(adInspectorButtonText), + ), + ], + ), + ], + ), + body: SafeArea(child: ReusableInlineExample()), + ); + }, + ), ); } } diff --git a/packages/google_mobile_ads/example/lib/multi_adaptive_inline_with_recycle_example.dart b/packages/google_mobile_ads/example/lib/multi_adaptive_inline_with_recycle_example.dart new file mode 100644 index 000000000..f1c310c27 --- /dev/null +++ b/packages/google_mobile_ads/example/lib/multi_adaptive_inline_with_recycle_example.dart @@ -0,0 +1,148 @@ +import 'dart:io'; +import 'package:flutter/material.dart'; +import 'package:collection/collection.dart'; +import 'package:google_mobile_ads/google_mobile_ads.dart'; + +/// This example demonstrates inline adaptive ads in a list view, where banners +/// are recycle to improve performance. +class MultiInlineAdaptiveWithRecycleExample extends StatefulWidget { + @override + _MultiInlineAdaptiveWithRecycleExampleState createState() => + _MultiInlineAdaptiveWithRecycleExampleState(); +} + +class _MultiInlineAdaptiveWithRecycleExampleState + extends State { + // A list of all the banners created. + final List _banners = []; + // Keep track of sizes of the banners (since they can be different sizes). + final Map _bannerSizes = {}; + // A set of all failed banners to retry. + final Set _failedBanners = {}; + + // The maximum number of banners to create. + static const int _cacheSize = 10; + // Show a banner every 3 rows (i.e. row index 0, 3, 6, 9 etc will be banner rows. + static const int _adInterval = 3; + // Keep track of the positions of banners. + final Map _bannerPositions = {}; + + BannerAd _createBannerAd() { + final String bannerId = Platform.isAndroid + ? 'ca-app-pub-3940256099942544/6300978111' + : 'ca-app-pub-3940256099942544/2934735716'; + AdSize adSize = AdSize.getCurrentOrientationInlineAdaptiveBannerAdSize(360); + final BannerAd bannerAd = BannerAd( + adUnitId: bannerId, + request: const AdRequest(), + size: adSize, + listener: BannerAdListener( + onAdLoaded: (Ad ad) async { + BannerAd bannerAd = (ad as BannerAd); + if (_failedBanners.contains(bannerAd)) { + _failedBanners.remove(bannerAd); + } + final AdSize? adSize = await bannerAd.getPlatformAdSize(); + // When the banner size is updated, rebuild by calling setState. + if (adSize != null && adSize != _bannerSizes[bannerAd]) { + setState(() { + _bannerSizes[bannerAd] = adSize; + }); + } + }, + onAdFailedToLoad: (Ad ad, LoadAdError error) { + _failedBanners.add(ad as BannerAd); + }, + onAdImpression: (Ad ad) { + print('Banner ad impression occurred.'); + }, + ), + ); + bannerAd.load(); + return bannerAd; + } + + BannerAd _getRecycledBannerAd(int bannerPosition) { + // If already created a banner for current position, just reuse it. + BannerAd? currentBannerAd = _bannerPositions.entries + .firstWhereOrNull((entry) => entry.value == bannerPosition) + ?.key; + if (currentBannerAd != null) { + return currentBannerAd; + } + + if (_banners.length < _cacheSize) { + // If the cache is not full, create a new banner + BannerAd bannerAd = _createBannerAd(); + _banners.add(bannerAd); + _bannerPositions[bannerAd] = bannerPosition; + return bannerAd; + } + // If cache is full, recycle the banner (if possible). + BannerAd bannerAd = _banners[bannerPosition % _cacheSize]; + if (_failedBanners.contains(bannerAd)) { + // if it's failed previously, reload it. + bannerAd.load(); + _failedBanners.remove(bannerAd); + } + if (bannerAd.isMounted) { + // Create a new banner if it's not possible to recycle the banner + // e.g. show 15 banners on screen, but _cacheSize is only 10. + // This should be a corner case indicating _cacheSize should be increased. + bannerAd = _createBannerAd(); + } + _bannerPositions[bannerAd] = bannerPosition; + return bannerAd; + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar(title: Text('Adaptive Size, Recycle')), + body: ListView.builder( + // Arbitrary example of 100 items in the list. + itemCount: 100, + itemBuilder: (BuildContext context, int index) { + if (index % _adInterval == 0) { + int bannerPosition = index ~/ _adInterval; + BannerAd bannerAd = _getRecycledBannerAd(bannerPosition); + final AdSize? adSize = _bannerSizes[bannerAd]; + if (adSize == null) { + // Null adSize means the banner's content is not fetched yet. + return SizedBox.shrink(); + } + // Now this banner is loaded with ad content and corresponding ad size. + return SizedBox( + width: adSize.width.toDouble(), + height: adSize.height.toDouble(), + child: AdWidget(ad: bannerAd), + ); + } + + // Show your regular non-ad content. + return Container( + decoration: BoxDecoration( + border: Border.all( + color: Colors.blue, + width: 1.0, + style: BorderStyle.solid, + ), + ), + child: SizedBox( + height: 100, + child: ColoredBox(color: Colors.yellow), + ), + ); + }, + ), + ); + } + + @override + void dispose() { + for (final banner in _banners) { + banner.dispose(); + } + super.dispose(); + } +} diff --git a/packages/google_mobile_ads/example/lib/native_template_example.dart b/packages/google_mobile_ads/example/lib/native_template_example.dart index ae2ce51df..415db8ed0 100644 --- a/packages/google_mobile_ads/example/lib/native_template_example.dart +++ b/packages/google_mobile_ads/example/lib/native_template_example.dart @@ -31,41 +31,39 @@ class _NativeTemplateExampleExampleState extends State { @override Widget build(BuildContext context) => Scaffold( - appBar: AppBar( - title: Text('Native templates example'), - ), - body: Center( - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 16.0), - child: ListView.separated( - itemCount: 10, - separatorBuilder: (BuildContext context, int index) { - return Container( - height: 40, - ); - }, - itemBuilder: (BuildContext context, int index) { - if (index == 5 && _nativeAd != null && _nativeAdIsLoaded) { - return Align( - alignment: Alignment.center, - child: ConstrainedBox( - constraints: const BoxConstraints( - minWidth: 300, - minHeight: 350, - maxHeight: 400, - maxWidth: 450, - ), - child: AdWidget(ad: _nativeAd!), - )); - } - return Text( - Constants.placeholderText, - style: TextStyle(fontSize: 24), + appBar: AppBar(title: Text('Native templates example')), + body: Center( + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 16.0), + child: ListView.separated( + itemCount: 10, + separatorBuilder: (BuildContext context, int index) { + return Container(height: 40); + }, + itemBuilder: (BuildContext context, int index) { + if (index == 5 && _nativeAd != null && _nativeAdIsLoaded) { + return Align( + alignment: Alignment.center, + child: ConstrainedBox( + constraints: const BoxConstraints( + minWidth: 300, + minHeight: 350, + maxHeight: 400, + maxWidth: 450, + ), + child: AdWidget(ad: _nativeAd!), + ), ); - }, - ), + } + return Text( + Constants.placeholderText, + style: TextStyle(fontSize: 24), + ); + }, ), - )); + ), + ), + ); @override void didChangeDependencies() { @@ -91,9 +89,7 @@ class _NativeTemplateExampleExampleState extends State { nativeTemplateStyle: NativeTemplateStyle( templateType: TemplateType.medium, mainBackgroundColor: Colors.white12, - callToActionTextStyle: NativeTemplateTextStyle( - size: 16.0, - ), + callToActionTextStyle: NativeTemplateTextStyle(size: 16.0), primaryTextStyle: NativeTemplateTextStyle( textColor: Colors.black38, backgroundColor: Colors.white70, diff --git a/packages/google_mobile_ads/example/lib/reusable_inline_example.dart b/packages/google_mobile_ads/example/lib/reusable_inline_example.dart index cec91c280..187111618 100644 --- a/packages/google_mobile_ads/example/lib/reusable_inline_example.dart +++ b/packages/google_mobile_ads/example/lib/reusable_inline_example.dart @@ -38,74 +38,77 @@ class _ReusableInlineExampleState extends State { @override Widget build(BuildContext context) => Center( - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 16.0), - child: ListView.separated( - itemCount: 20, - separatorBuilder: (BuildContext context, int index) { - return Container( - height: 40, - ); - }, - itemBuilder: (BuildContext context, int index) { - final BannerAd? bannerAd = _bannerAd; - if (index == 5 && _bannerAdIsLoaded && bannerAd != null) { - return Container( - height: bannerAd.size.height.toDouble(), - width: bannerAd.size.width.toDouble(), - child: AdWidget(ad: bannerAd)); - } + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 16.0), + child: ListView.separated( + itemCount: 20, + separatorBuilder: (BuildContext context, int index) { + return Container(height: 40); + }, + itemBuilder: (BuildContext context, int index) { + final BannerAd? bannerAd = _bannerAd; + if (index == 5 && _bannerAdIsLoaded && bannerAd != null) { + return Container( + height: bannerAd.size.height.toDouble(), + width: bannerAd.size.width.toDouble(), + child: AdWidget(ad: bannerAd), + ); + } - final AdManagerBannerAd? adManagerBannerAd = _adManagerBannerAd; - if (index == 10 && - _adManagerBannerAdIsLoaded && - adManagerBannerAd != null) { - return Container( - height: adManagerBannerAd.sizes[0].height.toDouble(), - width: adManagerBannerAd.sizes[0].width.toDouble(), - child: AdWidget(ad: _adManagerBannerAd!)); - } + final AdManagerBannerAd? adManagerBannerAd = _adManagerBannerAd; + if (index == 10 && + _adManagerBannerAdIsLoaded && + adManagerBannerAd != null) { + return Container( + height: adManagerBannerAd.sizes[0].height.toDouble(), + width: adManagerBannerAd.sizes[0].width.toDouble(), + child: AdWidget(ad: _adManagerBannerAd!), + ); + } - final NativeAd? nativeAd = _nativeAd; - if (index == 15 && _nativeAdIsLoaded && nativeAd != null) { - return Container( - width: 250, height: 350, child: AdWidget(ad: nativeAd)); - } + final NativeAd? nativeAd = _nativeAd; + if (index == 15 && _nativeAdIsLoaded && nativeAd != null) { + return Container( + width: 250, + height: 350, + child: AdWidget(ad: nativeAd), + ); + } - return Text( - Constants.placeholderText, - style: TextStyle(fontSize: 24), - ); - }, - ), - ), - ); + return Text( + Constants.placeholderText, + style: TextStyle(fontSize: 24), + ); + }, + ), + ), + ); @override void didChangeDependencies() { super.didChangeDependencies(); // Create the ad objects and load ads. _bannerAd = BannerAd( - size: AdSize.banner, - adUnitId: Platform.isAndroid - ? 'ca-app-pub-3940256099942544/6300978111' - : 'ca-app-pub-3940256099942544/2934735716', - listener: BannerAdListener( - onAdLoaded: (Ad ad) { - print('$BannerAd loaded.'); - setState(() { - _bannerAdIsLoaded = true; - }); - }, - onAdFailedToLoad: (Ad ad, LoadAdError error) { - print('$BannerAd failedToLoad: $error'); - ad.dispose(); - }, - onAdOpened: (Ad ad) => print('$BannerAd onAdOpened.'), - onAdClosed: (Ad ad) => print('$BannerAd onAdClosed.'), - ), - request: AdRequest()) - ..load(); + size: AdSize.banner, + adUnitId: Platform.isAndroid + ? 'ca-app-pub-3940256099942544/6300978111' + : 'ca-app-pub-3940256099942544/2934735716', + listener: BannerAdListener( + onAdLoaded: (Ad ad) { + print('$BannerAd loaded.'); + setState(() { + _bannerAdIsLoaded = true; + }); + }, + onAdFailedToLoad: (Ad ad, LoadAdError error) { + print('$BannerAd failedToLoad: $error'); + ad.dispose(); + }, + onAdOpened: (Ad ad) => print('$BannerAd onAdOpened.'), + onAdClosed: (Ad ad) => print('$BannerAd onAdClosed.'), + ), + request: AdRequest(), + )..load(); _nativeAd = NativeAd( adUnitId: Platform.isAndroid diff --git a/packages/google_mobile_ads/example/lib/snippets/banner_ad_snippets.dart b/packages/google_mobile_ads/example/lib/snippets/banner_ad_snippets.dart new file mode 100644 index 000000000..b2f9370ca --- /dev/null +++ b/packages/google_mobile_ads/example/lib/snippets/banner_ad_snippets.dart @@ -0,0 +1,79 @@ +// Copyright 2025 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 +// +// https://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. + +// ignore_for_file: public_member_api_docs + +import 'dart:async'; +import 'dart:io'; + +import 'package:flutter/material.dart'; +import 'package:google_mobile_ads/google_mobile_ads.dart'; + +/// Dart snippets for the developer guide. +class _BannerAdWidget extends StatefulWidget { + const _BannerAdWidget(); + + @override + State<_BannerAdWidget> createState() => _BannerAdSnippets(); +} + +class _BannerAdSnippets extends State<_BannerAdWidget> { + BannerAd? _bannerAd; + final _adUnitId = Platform.isAndroid + ? 'ca-app-pub-3940256099942544/9214589741' + : 'ca-app-pub-3940256099942544/2435281174'; + final String _adManagerAdUnitId = '/21775744923/example/adaptive-banner'; + + // [START load_ad_ad_manager] + void _loadAd() async { + // Get an AnchoredAdaptiveBannerAdSize before loading the ad. + final size = await AdSize.getCurrentOrientationAnchoredAdaptiveBannerAdSize( + MediaQuery.sizeOf(context).width.truncate(), + ); + + if (size == null) { + // Unable to get width of anchored banner. + return; + } + + unawaited( + BannerAd( + adUnitId: _adUnitId, + request: const AdManagerAdRequest(), + size: size, + listener: BannerAdListener( + onAdLoaded: (ad) { + // Called when an ad is successfully received. + debugPrint('Ad was loaded.'); + setState(() { + _bannerAd = ad as BannerAd; + }); + }, + onAdFailedToLoad: (ad, err) { + // Called when an ad request failed. + debugPrint('Ad failed to load with error: $err'); + ad.dispose(); + }, + ), + ).load(), + ); + } + // [END load_ad_ad_manager] + + @override + Widget build(BuildContext context) { + // TODO: implement build + throw UnimplementedError(); + } +} diff --git a/packages/google_mobile_ads/example/lib/snippets/interstitial_ad_snippets.dart b/packages/google_mobile_ads/example/lib/snippets/interstitial_ad_snippets.dart new file mode 100644 index 000000000..10d49c891 --- /dev/null +++ b/packages/google_mobile_ads/example/lib/snippets/interstitial_ad_snippets.dart @@ -0,0 +1,112 @@ +// Copyright 2025 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 +// +// https://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. + +// ignore_for_file: public_member_api_docs + +import 'dart:io'; + +import 'package:flutter/cupertino.dart'; +import 'package:google_mobile_ads/google_mobile_ads.dart'; + +/// Dart snippets for the developer guide. +class _InterstitialAdSnippets { + InterstitialAd? _interstitialAd; + final String _adUnitId = Platform.isAndroid + ? 'ca-app-pub-3940256099942544/1033173712' + : 'ca-app-pub-3940256099942544/4411468910'; + final String _adManagerAdUnitId = '/21775744923/example/interstitial'; + + void _loadInterstitialAd() { + // [START load_ad] + InterstitialAd.load( + adUnitId: _adUnitId, + request: const AdRequest(), + adLoadCallback: InterstitialAdLoadCallback( + onAdLoaded: (InterstitialAd ad) { + // Called when an ad is successfully received. + debugPrint('Ad was loaded.'); + // Keep a reference to the ad so you can show it later. + _interstitialAd = ad; + // [START_EXCLUDE silent] + _setFullScreenContentCallback(ad); + // [END_EXCLUDE] + }, + onAdFailedToLoad: (LoadAdError error) { + // Called when an ad request failed. + debugPrint('Ad failed to load with error: $error'); + }, + ), + ); + // [END load_ad] + } + + void _setFullScreenContentCallback(InterstitialAd ad) { + // [START ad_events] + ad.fullScreenContentCallback = FullScreenContentCallback( + onAdShowedFullScreenContent: (ad) { + // Called when the ad showed the full screen content. + debugPrint('Ad showed full screen content.'); + }, + onAdFailedToShowFullScreenContent: (ad, err) { + // Called when the ad failed to show full screen content. + debugPrint('Ad failed to show full screen content with error: $err'); + // Dispose the ad here to free resources. + ad.dispose(); + }, + onAdDismissedFullScreenContent: (ad) { + // Called when the ad dismissed full screen content. + debugPrint('Ad was dismissed.'); + // Dispose the ad here to free resources. + ad.dispose(); + }, + onAdImpression: (ad) { + // Called when an impression occurs on the ad. + debugPrint('Ad recorded an impression.'); + }, + onAdClicked: (ad) { + // Called when a click is recorded for an ad. + debugPrint('Ad was clicked.'); + }, + ); + // [END ad_events] + } + + // =================================================================== + // Ad Manager snippets + // =================================================================== + + void _loadAdManagerInterstitialAd() { + // [START load_ad_ad_manager] + InterstitialAd.load( + adUnitId: _adUnitId, + request: const AdManagerAdRequest(), + adLoadCallback: InterstitialAdLoadCallback( + onAdLoaded: (InterstitialAd ad) { + // Called when an ad is successfully received. + debugPrint('Ad was loaded.'); + // Keep a reference to the ad so you can show it later. + _interstitialAd = ad; + // [START_EXCLUDE silent] + _setFullScreenContentCallback(ad); + // [END_EXCLUDE] + }, + onAdFailedToLoad: (LoadAdError error) { + // Called when an ad request failed. + debugPrint('Ad failed to load with error: $error'); + }, + ), + ); + // [END load_ad_ad_manager] + } +} diff --git a/packages/google_mobile_ads/example/lib/snippets/rewarded_ad_snippets.dart b/packages/google_mobile_ads/example/lib/snippets/rewarded_ad_snippets.dart new file mode 100644 index 000000000..82b152ed1 --- /dev/null +++ b/packages/google_mobile_ads/example/lib/snippets/rewarded_ad_snippets.dart @@ -0,0 +1,152 @@ +// Copyright 2025 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 +// +// https://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. + +// ignore_for_file: public_member_api_docs + +import 'dart:io'; + +import 'package:flutter/cupertino.dart'; +import 'package:google_mobile_ads/google_mobile_ads.dart'; + +/// Dart snippets for the developer guide. +class _RewardedAdSnippets { + RewardedAd? _rewardedAd; + final String _adUnitId = Platform.isAndroid + ? 'ca-app-pub-3940256099942544/5224354917' + : 'ca-app-pub-3940256099942544/1712485313'; + final String _adManagerAdUnitId = '/21775744923/example/rewarded'; + + void _loadRewardedAd() { + // [START load_ad] + RewardedAd.load( + adUnitId: _adUnitId, + request: const AdRequest(), + rewardedAdLoadCallback: RewardedAdLoadCallback( + onAdLoaded: (RewardedAd ad) { + // Called when an ad is successfully received. + debugPrint('Ad was loaded.'); + // Keep a reference to the ad so you can show it later. + _rewardedAd = ad; + // [START_EXCLUDE silent] + _setFullScreenContentCallback(ad); + // [END_EXCLUDE] + }, + onAdFailedToLoad: (LoadAdError error) { + // Called when an ad request failed. + debugPrint('Ad failed to load with error: $error'); + }, + ), + ); + // [END load_ad] + } + + void _setFullScreenContentCallback(RewardedAd ad) { + // [START ad_events] + ad.fullScreenContentCallback = FullScreenContentCallback( + onAdShowedFullScreenContent: (ad) { + // Called when the ad showed the full screen content. + debugPrint('Ad showed full screen content.'); + }, + onAdFailedToShowFullScreenContent: (ad, err) { + // Called when the ad failed to show full screen content. + debugPrint('Ad failed to show full screen content with error: $err'); + // Dispose the ad here to free resources. + ad.dispose(); + }, + onAdDismissedFullScreenContent: (ad) { + // Called when the ad dismissed full screen content. + debugPrint('Ad was dismissed.'); + // Dispose the ad here to free resources. + ad.dispose(); + }, + onAdImpression: (ad) { + // Called when an impression occurs on the ad. + debugPrint('Ad recorded an impression.'); + }, + onAdClicked: (ad) { + // Called when a click is recorded for an ad. + debugPrint('Ad was clicked.'); + }, + ); + // [END ad_events] + } + + void _validateServerSideVerification() { + // [START validate_server_side_verification] + RewardedAd.load( + adUnitId: _adUnitId, + request: AdRequest(), + rewardedAdLoadCallback: RewardedAdLoadCallback( + onAdLoaded: (ad) { + ServerSideVerificationOptions _options = + ServerSideVerificationOptions( + customData: 'SAMPLE_CUSTOM_DATA_STRING', + ); + ad.setServerSideOptions(_options); + _rewardedAd = ad; + }, + onAdFailedToLoad: (error) {}, + ), + ); + // [END validate_server_side_verification] + } + + // =================================================================== + // Ad Manager snippets + // =================================================================== + + void _loadAdManagerRewardedAd() { + // [START load_ad_ad_manager] + RewardedAd.load( + adUnitId: _adUnitId, + request: const AdManagerAdRequest(), + rewardedAdLoadCallback: RewardedAdLoadCallback( + onAdLoaded: (RewardedAd ad) { + // Called when an ad is successfully received. + debugPrint('Ad was loaded.'); + // Keep a reference to the ad so you can show it later. + _rewardedAd = ad; + // [START_EXCLUDE silent] + _setFullScreenContentCallback(ad); + // [END_EXCLUDE] + }, + onAdFailedToLoad: (LoadAdError error) { + // Called when an ad request failed. + debugPrint('Ad failed to load with error: $error'); + }, + ), + ); + // [END load_ad_ad_manager] + } + + void _validateAdManagerServerSideVerification() { + // [START validate_server_side_verification_ad_manager] + RewardedAd.load( + adUnitId: _adUnitId, + request: AdManagerAdRequest(), + rewardedAdLoadCallback: RewardedAdLoadCallback( + onAdLoaded: (ad) { + ServerSideVerificationOptions _options = + ServerSideVerificationOptions( + customData: 'SAMPLE_CUSTOM_DATA_STRING', + ); + ad.setServerSideOptions(_options); + _rewardedAd = ad; + }, + onAdFailedToLoad: (error) {}, + ), + ); + // [END validate_server_side_verification_ad_manager] + } +} diff --git a/packages/google_mobile_ads/example/lib/snippets/rewarded_interstitial_ad_snippets.dart b/packages/google_mobile_ads/example/lib/snippets/rewarded_interstitial_ad_snippets.dart new file mode 100644 index 000000000..ff932b61b --- /dev/null +++ b/packages/google_mobile_ads/example/lib/snippets/rewarded_interstitial_ad_snippets.dart @@ -0,0 +1,153 @@ +// Copyright 2025 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 +// +// https://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. + +// ignore_for_file: public_member_api_docs + +import 'dart:io'; + +import 'package:flutter/cupertino.dart'; +import 'package:google_mobile_ads/google_mobile_ads.dart'; + +/// Dart snippets for the developer guide. +class _RewardedInterstitialAdSnippets { + RewardedInterstitialAd? _rewardedInterstitialAd; + final String _adUnitId = Platform.isAndroid + ? 'ca-app-pub-3940256099942544/5354046379' + : 'ca-app-pub-3940256099942544/6978759866'; + final String _adManagerAdUnitId = + '/21775744923/example/rewarded-interstitial'; + + void _loadRewardedInterstitialAd() { + // [START load_ad] + RewardedInterstitialAd.load( + adUnitId: _adUnitId, + request: const AdRequest(), + rewardedInterstitialAdLoadCallback: RewardedInterstitialAdLoadCallback( + onAdLoaded: (RewardedInterstitialAd ad) { + // Called when an ad is successfully received. + debugPrint('Ad was loaded.'); + // Keep a reference to the ad so you can show it later. + _rewardedInterstitialAd = ad; + // [START_EXCLUDE silent] + _setFullScreenContentCallback(ad); + // [END_EXCLUDE] + }, + onAdFailedToLoad: (LoadAdError error) { + // Called when an ad request failed. + debugPrint('Ad failed to load with error: $error'); + }, + ), + ); + // [END load_ad] + } + + void _setFullScreenContentCallback(RewardedInterstitialAd ad) { + // [START ad_events] + ad.fullScreenContentCallback = FullScreenContentCallback( + onAdShowedFullScreenContent: (ad) { + // Called when the ad showed the full screen content. + debugPrint('Ad showed full screen content.'); + }, + onAdFailedToShowFullScreenContent: (ad, err) { + // Called when the ad failed to show full screen content. + debugPrint('Ad failed to show full screen content with error: $err'); + // Dispose the ad here to free resources. + ad.dispose(); + }, + onAdDismissedFullScreenContent: (ad) { + // Called when the ad dismissed full screen content. + debugPrint('Ad was dismissed.'); + // Dispose the ad here to free resources. + ad.dispose(); + }, + onAdImpression: (ad) { + // Called when an impression occurs on the ad. + debugPrint('Ad recorded an impression.'); + }, + onAdClicked: (ad) { + // Called when a click is recorded for an ad. + debugPrint('Ad was clicked.'); + }, + ); + // [END ad_events] + } + + void _validateServerSideVerification() { + // [START validate_server_side_verification] + RewardedInterstitialAd.load( + adUnitId: _adUnitId, + request: AdRequest(), + rewardedInterstitialAdLoadCallback: RewardedInterstitialAdLoadCallback( + onAdLoaded: (ad) { + ServerSideVerificationOptions _options = + ServerSideVerificationOptions( + customData: 'SAMPLE_CUSTOM_DATA_STRING', + ); + ad.setServerSideOptions(_options); + _rewardedInterstitialAd = ad; + }, + onAdFailedToLoad: (error) {}, + ), + ); + // [END validate_server_side_verification] + } + + // =================================================================== + // Ad Manager snippets + // =================================================================== + + void _loadAdManagerRewardedInterstitialAd() { + // [START load_ad_ad_manager] + RewardedInterstitialAd.load( + adUnitId: _adUnitId, + request: const AdManagerAdRequest(), + rewardedInterstitialAdLoadCallback: RewardedInterstitialAdLoadCallback( + onAdLoaded: (RewardedInterstitialAd ad) { + // Called when an ad is successfully received. + debugPrint('Ad was loaded.'); + // Keep a reference to the ad so you can show it later. + _rewardedInterstitialAd = ad; + // [START_EXCLUDE silent] + _setFullScreenContentCallback(ad); + // [END_EXCLUDE] + }, + onAdFailedToLoad: (LoadAdError error) { + // Called when an ad request failed. + debugPrint('Ad failed to load with error: $error'); + }, + ), + ); + // [END load_ad_ad_manager] + } + + void _validateAdManagerServerSideVerification() { + // [START validate_server_side_verification_ad_manager] + RewardedInterstitialAd.load( + adUnitId: _adUnitId, + request: AdManagerAdRequest(), + rewardedInterstitialAdLoadCallback: RewardedInterstitialAdLoadCallback( + onAdLoaded: (ad) { + ServerSideVerificationOptions _options = + ServerSideVerificationOptions( + customData: 'SAMPLE_CUSTOM_DATA_STRING', + ); + ad.setServerSideOptions(_options); + _rewardedInterstitialAd = ad; + }, + onAdFailedToLoad: (error) {}, + ), + ); + // [END validate_server_side_verification_ad_manager] + } +} diff --git a/packages/google_mobile_ads/example/lib/webview_example.dart b/packages/google_mobile_ads/example/lib/webview_example.dart index fb003374f..e0dc505f2 100644 --- a/packages/google_mobile_ads/example/lib/webview_example.dart +++ b/packages/google_mobile_ads/example/lib/webview_example.dart @@ -62,12 +62,16 @@ class _WebViewExampleState extends State { ); if (controller.platform is AndroidWebViewController) { AndroidWebViewCookieManager cookieManager = AndroidWebViewCookieManager( - PlatformWebViewCookieManagerCreationParams()); + PlatformWebViewCookieManagerCreationParams(), + ); await cookieManager.setAcceptThirdPartyCookies( - controller.platform as AndroidWebViewController, true); + controller.platform as AndroidWebViewController, + true, + ); } await MobileAds.instance.registerWebView(controller); - await controller - .loadRequest(Uri.parse('https://webview-api-for-ads-test.glitch.me/')); + await controller.loadRequest( + Uri.parse('https://webview-api-for-ads-test.glitch.me/'), + ); } } diff --git a/packages/google_mobile_ads/example/pubspec.yaml b/packages/google_mobile_ads/example/pubspec.yaml index d1945ae09..aa0ac8594 100644 --- a/packages/google_mobile_ads/example/pubspec.yaml +++ b/packages/google_mobile_ads/example/pubspec.yaml @@ -13,15 +13,17 @@ # limitations under the License. name: google_mobile_ads_example +version: 1.0.0 description: Demonstrates how to use the google mobile ads plugin. +publish_to: none dependencies: flutter: sdk: flutter google_mobile_ads: path: ../ - webview_flutter_android: ^3.7.0 - webview_flutter: ^4.0.5 + webview_flutter_android: ^4.10.9 + webview_flutter: ^4.10.0 dev_dependencies: pedantic: ^1.11.0 @@ -32,4 +34,4 @@ flutter: uses-material-design: true environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=3.9.0 <4.0.0" diff --git a/packages/google_mobile_ads/ios/Classes/FLTAdUtil.h b/packages/google_mobile_ads/ios/Classes/FLTAdUtil.h index 55f8025c2..1a0c2f9ff 100644 --- a/packages/google_mobile_ads/ios/Classes/FLTAdUtil.h +++ b/packages/google_mobile_ads/ios/Classes/FLTAdUtil.h @@ -18,14 +18,14 @@ @interface FLTAdUtil : NSObject -+ (BOOL)isNull:(id)object; ++ (BOOL)isNull:(_Nullable id)object; -+ (BOOL)isNotNull:(id)object; ++ (BOOL)isNotNull:(_Nullable id)object; + (WKWebView *_Nullable)getWebView:(NSNumber *_Nonnull)webViewId flutterPluginRegistry: (id _Nonnull)flutterPluginRegistry; -@property(readonly, class) NSString *requestAgent; +@property(readonly, class) NSString *_Nonnull requestAgent; @end diff --git a/packages/google_mobile_ads/ios/Classes/FLTAd_Internal.h b/packages/google_mobile_ads/ios/Classes/FLTAd_Internal.h index ff18bdc58..7d8b79f65 100644 --- a/packages/google_mobile_ads/ios/Classes/FLTAd_Internal.h +++ b/packages/google_mobile_ads/ios/Classes/FLTAd_Internal.h @@ -14,6 +14,7 @@ #import "FLTAdInstanceManager_Internal.h" #import "FLTGoogleMobileAdsPlugin.h" +#import "FLTMediationExtras.h" #import "FLTMediationNetworkExtrasProvider.h" #import "FLTMobileAds_Internal.h" #import "FLTNativeTemplateStyle.h" @@ -86,11 +87,14 @@ @property NSString *_Nullable contentURL; @property BOOL nonPersonalizedAds; @property NSArray *_Nullable neighboringContentURLs; -@property NSString *_Nullable mediationExtrasIdentifier; +@property NSString *_Nullable mediationExtrasIdentifier + DEPRECATED_MSG_ATTRIBUTE("Use mediationExtras instead."); @property id< - FLTMediationNetworkExtrasProvider> _Nullable mediationNetworkExtrasProvider; + FLTMediationNetworkExtrasProvider> _Nullable mediationNetworkExtrasProvider + DEPRECATED_MSG_ATTRIBUTE("Use mediationExtras instead."); @property NSDictionary *_Nullable adMobExtras; @property NSString *_Nonnull requestAgent; +@property NSArray> *_Nullable mediationExtras; - (GADRequest *_Nonnull)asGADRequest:(NSString *_Nonnull)adUnitId; @end @@ -210,8 +214,6 @@ @interface FLTInterstitialAd : FLTFullScreenAd - (instancetype _Nonnull)initWithAdUnitId:(NSString *_Nonnull)adUnitId request:(FLTAdRequest *_Nonnull)request - rootViewController: - (UIViewController *_Nonnull)rootViewController adId:(NSNumber *_Nonnull)adId; - (GADInterstitialAd *_Nullable)interstitial; - (NSString *_Nonnull)adUnitId; @@ -222,16 +224,12 @@ @interface FLTGAMInterstitialAd : FLTInterstitialAd - (instancetype _Nonnull)initWithAdUnitId:(NSString *_Nonnull)adUnitId request:(FLTGAMAdRequest *_Nonnull)request - rootViewController: - (UIViewController *_Nonnull)rootViewController adId:(NSNumber *_Nonnull)adId; @end @interface FLTRewardedAd : FLTFullScreenAd - (instancetype _Nonnull)initWithAdUnitId:(NSString *_Nonnull)adUnitId request:(FLTAdRequest *_Nonnull)request - rootViewController: - (UIViewController *_Nonnull)rootViewController adId:(NSNumber *_Nonnull)adId; - (GADRewardedAd *_Nullable)rewardedAd; - (void)setServerSideVerificationOptions: @@ -241,8 +239,6 @@ @interface FLTRewardedInterstitialAd : FLTFullScreenAd - (instancetype _Nonnull)initWithAdUnitId:(NSString *_Nonnull)adUnitId request:(FLTAdRequest *_Nonnull)request - rootViewController: - (UIViewController *_Nonnull)rootViewController adId:(NSNumber *_Nonnull)adId; - (GADRewardedInterstitialAd *_Nullable)rewardedInterstitialAd; - (void)setServerSideVerificationOptions: @@ -252,9 +248,6 @@ @interface FLTAppOpenAd : FLTFullScreenAd - (instancetype _Nonnull)initWithAdUnitId:(NSString *_Nonnull)adUnitId request:(FLTAdRequest *_Nonnull)request - rootViewController: - (UIViewController *_Nonnull)rootViewController - orientation:(NSNumber *_Nonnull)orientation adId:(NSNumber *_Nonnull)adId; - (GADAppOpenAd *_Nullable)appOpenAd; @end diff --git a/packages/google_mobile_ads/ios/Classes/FLTAd_Internal.m b/packages/google_mobile_ads/ios/Classes/FLTAd_Internal.m index 01fbe0543..c54947227 100644 --- a/packages/google_mobile_ads/ios/Classes/FLTAd_Internal.m +++ b/packages/google_mobile_ads/ios/Classes/FLTAd_Internal.m @@ -171,9 +171,20 @@ @implementation FLTAdRequest - (void)addNetworkExtrasToGADRequest:(GADRequest *)request adUnitId:(NSString *_Nonnull)adUnitId { - NSArray> *extras = [_mediationNetworkExtrasProvider - getMediationExtras:adUnitId - mediationExtrasIdentifier:_mediationExtrasIdentifier]; + NSArray> *extras; + + if (_mediationExtras != NULL) { + NSMutableArray> *flutterExtras = + [NSMutableArray array]; + for (id extra in _mediationExtras) { + [flutterExtras addObject:[extra getMediationExtras]]; + } + extras = [NSArray arrayWithArray:flutterExtras]; + } else { + extras = [_mediationNetworkExtrasProvider + getMediationExtras:adUnitId + mediationExtrasIdentifier:_mediationExtrasIdentifier]; + } BOOL addedNpaToGADExtras = false; if ([FLTAdUtil isNotNull:extras]) { @@ -234,7 +245,8 @@ - (instancetype _Nonnull)initWithResponseInfo: self = [super init]; if (self) { _responseIdentifier = responseInfo.responseIdentifier; - _adNetworkClassName = responseInfo.adNetworkClassName; + _adNetworkClassName = + responseInfo.loadedAdNetworkResponseInfo.adNetworkClassName; NSMutableArray *infoArray = [[NSMutableArray alloc] init]; for (GADAdNetworkResponseInfo *adNetworkInfo in responseInfo @@ -666,20 +678,17 @@ - (void)adDidRecordClick:(nonnull id)ad { @implementation FLTInterstitialAd { GADInterstitialAd *_interstitialView; FLTAdRequest *_adRequest; - UIViewController *_rootViewController; NSString *_adUnitId; } - (instancetype)initWithAdUnitId:(NSString *_Nonnull)adUnitId request:(FLTAdRequest *_Nonnull)request - rootViewController:(UIViewController *_Nonnull)rootViewController adId:(NSNumber *_Nonnull)adId { self = [super init]; if (self) { self.adId = adId; _adRequest = request; _adUnitId = [adUnitId copy]; - _rootViewController = rootViewController; } return self; } @@ -723,7 +732,7 @@ - (void)load { - (void)show { if (self.interstitial) { - [self.interstitial presentFromRootViewController:_rootViewController]; + [self.interstitial presentFromRootViewController:nil]; } else { NSLog(@"InterstitialAd failed to show because the ad was not ready."); } @@ -736,20 +745,17 @@ - (void)show { @implementation FLTGAMInterstitialAd { GAMInterstitialAd *_insterstitial; FLTGAMAdRequest *_adRequest; - UIViewController *_rootViewController; NSString *_adUnitId; } - (instancetype)initWithAdUnitId:(NSString *_Nonnull)adUnitId request:(FLTGAMAdRequest *_Nonnull)request - rootViewController:(UIViewController *_Nonnull)rootViewController adId:(NSNumber *_Nonnull)adId { self = [super init]; if (self) { self.adId = adId; _adRequest = request; _adUnitId = [adUnitId copy]; - _rootViewController = rootViewController; } return self; } @@ -789,7 +795,7 @@ - (void)load { - (void)show { if (self.interstitial) { - [self.interstitial presentFromRootViewController:_rootViewController]; + [self.interstitial presentFromRootViewController:nil]; } else { NSLog(@"InterstitialAd failed to show because the ad was not ready."); } @@ -809,19 +815,16 @@ - (void)interstitialAd:(nonnull GADInterstitialAd *)interstitialAd @implementation FLTRewardedAd { GADRewardedAd *_rewardedView; FLTAdRequest *_adRequest; - UIViewController *_rootViewController; NSString *_adUnitId; } - (instancetype)initWithAdUnitId:(NSString *_Nonnull)adUnitId request:(FLTAdRequest *_Nonnull)request - rootViewController:(UIViewController *_Nonnull)rootViewController adId:(NSNumber *_Nonnull)adId { self = [super init]; if (self) { self.adId = adId; _adRequest = request; - _rootViewController = rootViewController; _adUnitId = [adUnitId copy]; } return self; @@ -873,7 +876,7 @@ - (void)load { - (void)show { if (self.rewardedAd) { [self.rewardedAd - presentFromRootViewController:_rootViewController + presentFromRootViewController:nil userDidEarnRewardHandler:^{ GADAdReward *reward = self.rewardedAd.adReward; FLTRewardItem *fltReward = @@ -904,19 +907,16 @@ - (void)setServerSideVerificationOptions: @implementation FLTRewardedInterstitialAd { GADRewardedInterstitialAd *_rewardedInterstitialView; FLTAdRequest *_adRequest; - UIViewController *_rootViewController; NSString *_adUnitId; } - (instancetype)initWithAdUnitId:(NSString *_Nonnull)adUnitId request:(FLTAdRequest *_Nonnull)request - rootViewController:(UIViewController *_Nonnull)rootViewController adId:(NSNumber *_Nonnull)adId { self = [super init]; if (self) { self.adId = adId; _adRequest = request; - _rootViewController = rootViewController; _adUnitId = [adUnitId copy]; } return self; @@ -971,7 +971,7 @@ - (void)load { - (void)show { if (self.rewardedInterstitialAd) { [self.rewardedInterstitialAd - presentFromRootViewController:_rootViewController + presentFromRootViewController:nil userDidEarnRewardHandler:^{ GADAdReward *reward = self.rewardedInterstitialAd.adReward; FLTRewardItem *fltReward = @@ -1004,23 +1004,16 @@ - (void)setServerSideVerificationOptions: @implementation FLTAppOpenAd { GADAppOpenAd *_appOpenAd; FLTAdRequest *_adRequest; - UIViewController *_rootViewController; - NSNumber *_orientation; NSString *_adUnitId; } - (instancetype _Nonnull)initWithAdUnitId:(NSString *_Nonnull)adUnitId request:(FLTAdRequest *_Nonnull)request - rootViewController: - (UIViewController *_Nonnull)rootViewController - orientation:(NSNumber *_Nonnull)orientation adId:(NSNumber *_Nonnull)adId { self = [super init]; if (self) { self.adId = adId; _adRequest = request; - _rootViewController = rootViewController; - _orientation = orientation; _adUnitId = [adUnitId copy]; } return self; @@ -1042,18 +1035,8 @@ - (void)load { return; } - UIInterfaceOrientation orientation = UIInterfaceOrientationUnknown; - if ([_orientation isEqualToNumber:@1]) { - orientation = UIInterfaceOrientationPortrait; - } else if ([_orientation isEqualToNumber:@2]) { - orientation = UIInterfaceOrientationLandscapeLeft; - } else if ([_orientation isEqualToNumber:@3]) { - orientation = UIInterfaceOrientationLandscapeRight; - } - [GADAppOpenAd loadWithAdUnitID:_adUnitId request:request - orientation:orientation completionHandler:^(GADAppOpenAd *_Nullable appOpenAd, NSError *_Nullable error) { if (error) { @@ -1082,7 +1065,7 @@ - (void)load { - (void)show { if (self.appOpenAd) { - [self.appOpenAd presentFromRootViewController:_rootViewController]; + [self.appOpenAd presentFromRootViewController:nil]; } else { NSLog(@"AppOpenAd failed to show because the ad was not ready."); } diff --git a/packages/google_mobile_ads/ios/Classes/FLTConstants.h b/packages/google_mobile_ads/ios/Classes/FLTConstants.h index d1402dc27..de436414d 100644 --- a/packages/google_mobile_ads/ios/Classes/FLTConstants.h +++ b/packages/google_mobile_ads/ios/Classes/FLTConstants.h @@ -13,4 +13,4 @@ // limitations under the License. /** Versioned request agent string. */ -#define FLT_REQUEST_AGENT_VERSIONED @"Flutter-GMA-3.1.0" +#define FLT_REQUEST_AGENT_VERSIONED @"Flutter-GMA-7.0.0" diff --git a/packages/google_mobile_ads/ios/Classes/FLTGoogleMobileAdsPlugin.h b/packages/google_mobile_ads/ios/Classes/FLTGoogleMobileAdsPlugin.h index 4a3f2a79d..f01782088 100644 --- a/packages/google_mobile_ads/ios/Classes/FLTGoogleMobileAdsPlugin.h +++ b/packages/google_mobile_ads/ios/Classes/FLTGoogleMobileAdsPlugin.h @@ -67,14 +67,16 @@ mediationNetworkExtrasProvider registry: (id _Nonnull) - registry; + registry + __deprecated_msg("Use MediationExtras instead"); /* * Unregisters any FLTMediationNetworkExtrasProvider that was associated with * the FLTGoogleMobileAdsPlugin in registry. */ + (void)unregisterMediationNetworkExtrasProvider: - (id _Nonnull)registry; + (id _Nonnull)registry + __deprecated_msg("Use MediationExtras instead"); /** * Adds a `FLTNativeAdFactory` used to create a `GADNativeAdView`s from a Native diff --git a/packages/google_mobile_ads/ios/Classes/FLTGoogleMobileAdsPlugin.m b/packages/google_mobile_ads/ios/Classes/FLTGoogleMobileAdsPlugin.m index 7b2d8d3d3..9832c0c9b 100644 --- a/packages/google_mobile_ads/ios/Classes/FLTGoogleMobileAdsPlugin.m +++ b/packages/google_mobile_ads/ios/Classes/FLTGoogleMobileAdsPlugin.m @@ -215,8 +215,8 @@ - (UIViewController *)rootController { UIViewController *root = UIApplication.sharedApplication.delegate.window.rootViewController; if ([FLTAdUtil isNull:root]) { - // UIApplication.sharedApplication.delegate.window is not guaranteed to be - // set. Use the keyWindow in this case. +// UIApplication.sharedApplication.delegate.window is not guaranteed to be +// set. Use the keyWindow in this case. #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" root = UIApplication.sharedApplication.keyWindow.rootViewController; @@ -226,8 +226,20 @@ - (UIViewController *)rootController { // Get the presented view controller. This fixes an issue in the add to app // case: https://github.com/googleads/googleads-mobile-flutter/issues/700 UIViewController *presentedViewController = root; - while (presentedViewController.presentedViewController) { - presentedViewController = presentedViewController.presentedViewController; + while (presentedViewController.presentedViewController && + ![presentedViewController.presentedViewController isBeingDismissed]) { + if ([presentedViewController isKindOfClass:[UITabBarController class]]) { + UITabBarController *tabBarController = + (UITabBarController *)presentedViewController; + presentedViewController = tabBarController.selectedViewController; + } else if ([presentedViewController + isKindOfClass:[UINavigationController class]]) { + UINavigationController *navigationController = + (UINavigationController *)presentedViewController; + presentedViewController = navigationController.visibleViewController; + } else { + presentedViewController = presentedViewController.presentedViewController; + } } return presentedViewController; } @@ -250,7 +262,7 @@ - (void)handleMethodCall:(FlutterMethodCall *)call GADRequestConfiguration *requestConfig = GADMobileAds.sharedInstance.requestConfiguration; NSNumber *isEnabled = call.arguments[@"isEnabled"]; - [requestConfig setSameAppKeyEnabled:isEnabled.boolValue]; + [requestConfig setPublisherFirstPartyIDEnabled:isEnabled.boolValue]; result(nil); } else if ([call.method isEqualToString:@"MobileAds#setAppMuted"]) { GADMobileAds.sharedInstance.applicationMuted = @@ -292,7 +304,8 @@ - (void)handleMethodCall:(FlutterMethodCall *)call } }]; } else if ([call.method isEqualToString:@"MobileAds#getVersionString"]) { - result([GADMobileAds.sharedInstance sdkVersion]); + result(GADGetStringFromVersionNumber( + GADMobileAds.sharedInstance.versionNumber)); } else if ([call.method isEqualToString:@"MobileAds#getRequestConfiguration"]) { result(GADMobileAds.sharedInstance.requestConfiguration); @@ -334,12 +347,12 @@ - (void)handleMethodCall:(FlutterMethodCall *)call tagForChildDirectedTreatment != (id)[NSNull null]) { switch ([tagForChildDirectedTreatment intValue]) { case 0: - [GADMobileAds.sharedInstance.requestConfiguration - tagForChildDirectedTreatment:NO]; + GADMobileAds.sharedInstance.requestConfiguration + .tagForChildDirectedTreatment = @NO; break; case 1: - [GADMobileAds.sharedInstance.requestConfiguration - tagForChildDirectedTreatment:YES]; + GADMobileAds.sharedInstance.requestConfiguration + .tagForChildDirectedTreatment = @YES; break; } } @@ -347,12 +360,12 @@ - (void)handleMethodCall:(FlutterMethodCall *)call tagForUnderAgeOfConsent != (id)[NSNull null]) { switch ([tagForUnderAgeOfConsent intValue]) { case 0: - [GADMobileAds.sharedInstance.requestConfiguration - tagForUnderAgeOfConsent:NO]; + GADMobileAds.sharedInstance.requestConfiguration + .tagForUnderAgeOfConsent = @NO; break; case 1: - [GADMobileAds.sharedInstance.requestConfiguration - tagForUnderAgeOfConsent:YES]; + GADMobileAds.sharedInstance.requestConfiguration + .tagForUnderAgeOfConsent = @YES; break; } } @@ -425,16 +438,14 @@ - (void)handleMethodCall:(FlutterMethodCall *)call FLTInterstitialAd *ad = [[FLTInterstitialAd alloc] initWithAdUnitId:call.arguments[@"adUnitId"] request:call.arguments[@"request"] - rootViewController:rootController adId:call.arguments[@"adId"]]; [_manager loadAd:ad]; result(nil); } else if ([call.method isEqualToString:@"loadAdManagerInterstitialAd"]) { FLTGAMInterstitialAd *ad = [[FLTGAMInterstitialAd alloc] - initWithAdUnitId:call.arguments[@"adUnitId"] - request:call.arguments[@"request"] - rootViewController:rootController - adId:call.arguments[@"adId"]]; + initWithAdUnitId:call.arguments[@"adUnitId"] + request:call.arguments[@"request"] + adId:call.arguments[@"adId"]]; [_manager loadAd:ad]; result(nil); } else if ([call.method isEqualToString:@"loadRewardedAd"]) { @@ -454,7 +465,6 @@ - (void)handleMethodCall:(FlutterMethodCall *)call FLTRewardedAd *ad = [[FLTRewardedAd alloc] initWithAdUnitId:call.arguments[@"adUnitId"] request:request - rootViewController:rootController adId:call.arguments[@"adId"]]; [_manager loadAd:ad]; result(nil); @@ -473,10 +483,9 @@ - (void)handleMethodCall:(FlutterMethodCall *)call } FLTRewardedInterstitialAd *ad = [[FLTRewardedInterstitialAd alloc] - initWithAdUnitId:call.arguments[@"adUnitId"] - request:request - rootViewController:rootController - adId:call.arguments[@"adId"]]; + initWithAdUnitId:call.arguments[@"adUnitId"] + request:request + adId:call.arguments[@"adId"]]; [_manager loadAd:ad]; result(nil); } else if ([call.method isEqualToString:@"loadAppOpenAd"]) { @@ -495,8 +504,6 @@ - (void)handleMethodCall:(FlutterMethodCall *)call FLTAppOpenAd *ad = [[FLTAppOpenAd alloc] initWithAdUnitId:call.arguments[@"adUnitId"] request:request - rootViewController:rootController - orientation:call.arguments[@"orientation"] adId:call.arguments[@"adId"]]; [_manager loadAd:ad]; result(nil); diff --git a/packages/google_mobile_ads/ios/Classes/FLTGoogleMobileAdsReaderWriter_Internal.m b/packages/google_mobile_ads/ios/Classes/FLTGoogleMobileAdsReaderWriter_Internal.m index ef25a1f4b..24572e60f 100644 --- a/packages/google_mobile_ads/ios/Classes/FLTGoogleMobileAdsReaderWriter_Internal.m +++ b/packages/google_mobile_ads/ios/Classes/FLTGoogleMobileAdsReaderWriter_Internal.m @@ -14,6 +14,7 @@ #import "FLTGoogleMobileAdsReaderWriter_Internal.h" #import "FLTAdUtil.h" +#import "FLTMediationExtras.h" #import "NativeTemplates/FLTNativeTemplateColor.h" #import "NativeTemplates/FLTNativeTemplateFontStyle.h" #import "NativeTemplates/FLTNativeTemplateStyle.h" @@ -46,6 +47,7 @@ typedef NS_ENUM(NSInteger, FLTAdMobField) { FLTAdmobFieldNativeTemplateFontStyle = 151, FLTAdmobFieldNativeTemplateType = 152, FLTAdmobFieldNativeTemplateColor = 153, + FLTAdmobFieldMediationExtras = 154 }; @@ -116,8 +118,17 @@ - (id _Nullable)readValueOfType:(UInt8)type { request.mediationNetworkExtrasProvider = _mediationNetworkExtrasProvider; request.adMobExtras = [self readValueOfType:[self readByte]]; request.requestAgent = _requestAgent; + request.mediationExtras = [self readValueOfType:[self readByte]]; return request; } + case FLTAdmobFieldMediationExtras: { + id flutterMediationExtras = + [[NSClassFromString([self readValueOfType:[self readByte]]) alloc] + init]; + NSMutableDictionary *flutterExtras = [self readValueOfType:[self readByte]]; + flutterMediationExtras.extras = flutterExtras; + return flutterMediationExtras; + } case FLTAdMobFieldRewardItem: { return [[FLTRewardItem alloc] initWithAmount:[self readValueOfType:[self readByte]] @@ -199,6 +210,7 @@ - (id _Nullable)readValueOfType:(UInt8)type { request.mediationNetworkExtrasProvider = _mediationNetworkExtrasProvider; request.adMobExtras = [self readValueOfType:[self readByte]]; request.requestAgent = _requestAgent; + request.mediationExtras = [self readValueOfType:[self readByte]]; return request; } case FLTAdMobFieldAdapterInitializationState: { @@ -258,15 +270,15 @@ - (id _Nullable)readValueOfType:(UInt8)type { startMuted:[self readValueOfType:[self readByte]]]; } case FLTAdmobRequestConfigurationParams: { - GADRequestConfiguration *requestConfig = [GADRequestConfiguration alloc]; - requestConfig.maxAdContentRating = [self readValueOfType:[self readByte]]; - [requestConfig - tagForChildDirectedTreatment:[self readValueOfType:[self readByte]]]; - [requestConfig - tagForUnderAgeOfConsent:[self readValueOfType:[self readByte]]]; - requestConfig.testDeviceIdentifiers = + GADMobileAds.sharedInstance.requestConfiguration.maxAdContentRating = + [self readValueOfType:[self readByte]]; + GADMobileAds.sharedInstance.requestConfiguration + .tagForChildDirectedTreatment = [self readValueOfType:[self readByte]]; + GADMobileAds.sharedInstance.requestConfiguration.tagForUnderAgeOfConsent = + [self readValueOfType:[self readByte]]; + GADMobileAds.sharedInstance.requestConfiguration.testDeviceIdentifiers = [self readValueOfType:[self readByte]]; - return requestConfig; + return GADMobileAds.sharedInstance.requestConfiguration; } case FLTAdmobFieldInlineAdaptiveAdSize: { return [[FLTInlineAdaptiveBannerSize alloc] @@ -376,6 +388,7 @@ - (void)writeValue:(id)value { [self writeValue:request.pubProvidedID]; [self writeValue:request.mediationExtrasIdentifier]; [self writeValue:request.adMobExtras]; + [self writeValue:request.mediationExtras]; } else if ([value isKindOfClass:[FLTAdRequest class]]) { [self writeByte:FLTAdMobFieldAdRequest]; FLTAdRequest *request = value; @@ -385,6 +398,12 @@ - (void)writeValue:(id)value { [self writeValue:request.neighboringContentURLs]; [self writeValue:request.mediationExtrasIdentifier]; [self writeValue:request.adMobExtras]; + [self writeValue:request.mediationExtras]; + } else if ([value conformsToProtocol:@protocol(FlutterMediationExtras)]) { + [self writeByte:FLTAdmobFieldMediationExtras]; + NSObject *fltExtras = value; + [self writeValue:NSStringFromClass([fltExtras class])]; + [self writeValue:fltExtras.extras]; } else if ([value isKindOfClass:[FLTRewardItem class]]) { [self writeByte:FLTAdMobFieldRewardItem]; FLTRewardItem *item = value; @@ -470,11 +489,8 @@ - (void)writeValue:(id)value { [self writeByte:FLTAdmobRequestConfigurationParams]; GADRequestConfiguration *params = value; [self writeValue:params.maxAdContentRating]; - // using null temporarily for tagForUnderAgeOfConsent and - // tagForChildDirectedTreatment as there are no getters for them in - // GADRequestConfiguration. - [super writeValue:NSNull.null]; - [super writeValue:NSNull.null]; + [self writeValue:params.tagForChildDirectedTreatment]; + [self writeValue:params.tagForUnderAgeOfConsent]; [self writeValue:params.testDeviceIdentifiers]; } else if ([value isKindOfClass:[FLTNativeTemplateType class]]) { [self writeByte:FLTAdmobFieldNativeTemplateType]; diff --git a/packages/google_mobile_ads/ios/Classes/FLTMediationExtras.h b/packages/google_mobile_ads/ios/Classes/FLTMediationExtras.h new file mode 100644 index 000000000..398d612a4 --- /dev/null +++ b/packages/google_mobile_ads/ios/Classes/FLTMediationExtras.h @@ -0,0 +1,35 @@ +// 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 +// +// https://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 +#import + +/** + * Mediation adapters will provide a class that conforms to this protocol to be + * added to the `FLTAdRequest`. + */ +@protocol FlutterMediationExtras + +// Pair of key-values to be stored received from the dart layer. +@property NSDictionary *_Nullable extras; + +/** + * Parses the values in @c extras to the required protocol to append Mediation + * extras to the `FLTAdRequest`. + * + * @return the parsed extra values to an object that conforms to protocol. + */ +- (id _Nonnull)getMediationExtras; + +@end diff --git a/packages/google_mobile_ads/ios/Classes/FLTMediationNetworkExtrasProvider.h b/packages/google_mobile_ads/ios/Classes/FLTMediationNetworkExtrasProvider.h index bc436c565..3f2c9281e 100644 --- a/packages/google_mobile_ads/ios/Classes/FLTMediationNetworkExtrasProvider.h +++ b/packages/google_mobile_ads/ios/Classes/FLTMediationNetworkExtrasProvider.h @@ -18,7 +18,10 @@ * Provides network specific parameters to include in ad requests. * An implementation of this protocol can be passed to FLTGoogleMobileAdsPlugin * using registerMediationNetworkExtrasProvider + * + * @deprecated Use FLTMediationExtras instead. */ +__attribute__((deprecated)) @protocol FLTMediationNetworkExtrasProvider @required diff --git a/packages/google_mobile_ads/ios/Classes/UserMessagingPlatform/FLTUserMessagingPlatformManager.m b/packages/google_mobile_ads/ios/Classes/UserMessagingPlatform/FLTUserMessagingPlatformManager.m index ab5309680..4201b34d9 100644 --- a/packages/google_mobile_ads/ios/Classes/UserMessagingPlatform/FLTUserMessagingPlatformManager.m +++ b/packages/google_mobile_ads/ios/Classes/UserMessagingPlatform/FLTUserMessagingPlatformManager.m @@ -57,6 +57,25 @@ - (void)handleMethodCall:(FlutterMethodCall *_Nonnull)call UMPConsentStatus status = UMPConsentInformation.sharedInstance.consentStatus; result([[NSNumber alloc] initWithInteger:status]); + } else if ([call.method + isEqualToString:@"ConsentInformation#canRequestAds"]) { + result(@([UMPConsentInformation.sharedInstance canRequestAds])); + } else if ([call.method + isEqualToString:@"ConsentInformation#" + @"getPrivacyOptionsRequirementStatus"]) { + UMPPrivacyOptionsRequirementStatus status = + UMPConsentInformation.sharedInstance.privacyOptionsRequirementStatus; + switch (status) { + case UMPPrivacyOptionsRequirementStatusNotRequired: + result([[NSNumber alloc] initWithInt:0]); + break; + case UMPPrivacyOptionsRequirementStatusRequired: + result([[NSNumber alloc] initWithInt:1]); + break; + default: + result([[NSNumber alloc] initWithInt:2]); + break; + } } else if ([call.method isEqualToString: @"ConsentInformation#requestConsentInfoUpdate"]) { UMPRequestParameters *parameters = call.arguments[@"params"]; @@ -73,6 +92,24 @@ - (void)handleMethodCall:(FlutterMethodCall *_Nonnull)call details:error.domain]); } }]; + } else if ([call.method + isEqualToString:@"UserMessagingPlatform#" + @"loadAndShowConsentFormIfRequired"]) { + [UMPConsentForm + loadAndPresentIfRequiredFromViewController:self.rootController + completionHandler:^(NSError *_Nullable error) { + if ([FLTAdUtil isNull:error]) { + result(nil); + } else { + result([FlutterError + errorWithCode: + [[NSString alloc] + initWithInt:error.code] + message:error + .localizedDescription + details:error.domain]); + } + }]; } else if ([call.method isEqualToString:@"UserMessagingPlatform#loadConsentForm"]) { [UMPConsentForm @@ -87,6 +124,26 @@ - (void)handleMethodCall:(FlutterMethodCall *_Nonnull)call details:loadError.domain]); } }]; + } else if ([call.method + isEqualToString: + @"UserMessagingPlatform#showPrivacyOptionsForm"]) { + [UMPConsentForm + presentPrivacyOptionsFormFromViewController:self.rootController + completionHandler:^( + NSError *_Nullable formError) { + if ([FLTAdUtil isNull:formError]) { + result(nil); + } else { + result([FlutterError + errorWithCode: + [[NSString alloc] + initWithInt:formError.code] + message: + formError + .localizedDescription + details:formError.domain]); + } + }]; } else if ([call.method isEqualToString: @"ConsentInformation#isConsentFormAvailable"]) { BOOL isAvailable = UMPConsentInformation.sharedInstance.formStatus == diff --git a/packages/google_mobile_ads/ios/google_mobile_ads.podspec b/packages/google_mobile_ads/ios/google_mobile_ads.podspec index 3a13fa702..e503293f3 100644 --- a/packages/google_mobile_ads/ios/google_mobile_ads.podspec +++ b/packages/google_mobile_ads/ios/google_mobile_ads.podspec @@ -3,7 +3,7 @@ # Pod::Spec.new do |s| s.name = 'google_mobile_ads' - s.version = '1.0.0' + s.version = '7.0.0' s.summary = 'Google Mobile Ads plugin for Flutter.' s.description = <<-DESC Google Mobile Ads plugin for Flutter. @@ -15,9 +15,9 @@ Google Mobile Ads plugin for Flutter. s.source_files = 'Classes/**/*.{h,m}' s.public_header_files = 'Classes/**/*.h' s.dependency 'Flutter' - s.dependency 'Google-Mobile-Ads-SDK','~> 10.9.0' + s.dependency 'Google-Mobile-Ads-SDK','~> 12.14.0' s.dependency 'webview_flutter_wkwebview' - s.ios.deployment_target = '10.0' + s.ios.deployment_target = '12.0' s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS' => 'armv7 arm64 x86_64' } s.static_framework = true s.resource_bundles = { diff --git a/packages/google_mobile_ads/lib/google_mobile_ads.dart b/packages/google_mobile_ads/lib/google_mobile_ads.dart index c40392582..d33b6e174 100644 --- a/packages/google_mobile_ads/lib/google_mobile_ads.dart +++ b/packages/google_mobile_ads/lib/google_mobile_ads.dart @@ -15,6 +15,7 @@ export 'src/ad_containers.dart'; export 'src/ad_listeners.dart'; export 'src/app_background_event_notifier.dart'; +export 'src/mediation_extras.dart'; export 'src/mobile_ads.dart'; export 'src/request_configuration.dart'; export 'src/ump/consent_request_parameters.dart'; diff --git a/packages/google_mobile_ads/lib/src/ad_containers.dart b/packages/google_mobile_ads/lib/src/ad_containers.dart index b6d25da4c..1a3ef77ca 100644 --- a/packages/google_mobile_ads/lib/src/ad_containers.dart +++ b/packages/google_mobile_ads/lib/src/ad_containers.dart @@ -20,10 +20,10 @@ import 'package:flutter/gestures.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter/services.dart'; import 'package:flutter/widgets.dart'; -import 'package:visibility_detector/visibility_detector.dart'; import 'ad_instance_manager.dart'; import 'ad_listeners.dart'; +import 'mediation_extras.dart'; import 'nativetemplates/native_template_style.dart'; /// Error information about why an ad operation failed. @@ -65,12 +65,13 @@ class AdError { class ResponseInfo { /// Constructs a [ResponseInfo] with the [responseId] and [mediationAdapterClassName]. @protected - const ResponseInfo( - {this.responseId, - this.mediationAdapterClassName, - this.adapterResponses, - this.loadedAdapterResponseInfo, - required this.responseExtras}); + const ResponseInfo({ + this.responseId, + this.mediationAdapterClassName, + this.adapterResponses, + this.loadedAdapterResponseInfo, + required this.responseExtras, + }); /// An identifier for the loaded ad. final String? responseId; @@ -154,6 +155,7 @@ class AdapterResponseInfo { /// /// This is an empty string "" if the ad server did not populate this field. final String adSourceInstanceId; + @override String toString() { return '$runtimeType(adapterClassName: $adapterClassName, ' @@ -173,7 +175,7 @@ class LoadAdError extends AdError { /// Default constructor for [LoadAdError]. @protected LoadAdError(int code, String domain, String message, this.responseInfo) - : super(code, domain, message); + : super(code, domain, message); /// The [ResponseInfo] for the error. final ResponseInfo? responseInfo; @@ -197,8 +199,9 @@ class AdRequest { this.neighboringContentUrls, this.nonPersonalizedAds, this.httpTimeoutMillis, - this.mediationExtrasIdentifier, + @Deprecated('Use mediationExtras instead.') this.mediationExtrasIdentifier, this.extras, + this.mediationExtras, }); /// Words or phrases describing the current user activity. @@ -229,11 +232,15 @@ class AdRequest { /// to the ad request. This identifier will get passed to your platform-side /// mediation extras factory class, allowing for additional customization /// of network extras. + @Deprecated('Use mediationExtras instead.') final String? mediationExtrasIdentifier; /// Extras to pass to the AdMob adapter. final Map? extras; + /// Extra parameters to pass to specific ad adapters. + final List? mediationExtras; + @override bool operator ==(Object other) { return other is AdRequest && @@ -242,9 +249,24 @@ class AdRequest { nonPersonalizedAds == other.nonPersonalizedAds && listEquals(neighboringContentUrls, other.neighboringContentUrls) && httpTimeoutMillis == other.httpTimeoutMillis && + //ignore: deprecated_member_use_from_same_package mediationExtrasIdentifier == other.mediationExtrasIdentifier && - mapEquals(extras, other.extras); + mapEquals(extras, other.extras) && + mediationExtras == other.mediationExtras; } + + @override + int get hashCode => Object.hash( + keywords, + contentUrl, + nonPersonalizedAds, + neighboringContentUrls, + httpTimeoutMillis, + //ignore: deprecated_member_use_from_same_package + mediationExtrasIdentifier, + extras, + mediationExtras, + ); } /// Targeting info per the Ad Manager API. @@ -261,15 +283,18 @@ class AdManagerAdRequest extends AdRequest { this.publisherProvidedId, String? mediationExtrasIdentifier, Map? extras, + List? mediationExtras, }) : super( - keywords: keywords, - contentUrl: contentUrl, - neighboringContentUrls: neighboringContentUrls, - nonPersonalizedAds: nonPersonalizedAds, - httpTimeoutMillis: httpTimeoutMillis, - mediationExtrasIdentifier: mediationExtrasIdentifier, - extras: extras, - ); + keywords: keywords, + contentUrl: contentUrl, + neighboringContentUrls: neighboringContentUrls, + nonPersonalizedAds: nonPersonalizedAds, + httpTimeoutMillis: httpTimeoutMillis, + //ignore: deprecated_member_use_from_same_package + mediationExtrasIdentifier: mediationExtrasIdentifier, + extras: extras, + mediationExtras: mediationExtras, + ); /// Key-value pairs used for custom targeting. final Map? customTargeting; @@ -293,6 +318,10 @@ class AdManagerAdRequest extends AdRequest { other.customTargetingLists.toString() && publisherProvidedId == other.publisherProvidedId; } + + @override + int get hashCode => + Object.hash(customTargeting, customTargetingLists, publisherProvidedId); } /// An [AdSize] with the given width and a Google-optimized height to create a banner ad. @@ -364,8 +393,8 @@ class InlineAdaptiveSize extends AdSize { int? get orientationValue => orientation == null ? null : orientation == Orientation.portrait - ? 0 - : 1; + ? 0 + : 1; } /// [AdSize] represents the size of a banner ad. @@ -376,10 +405,7 @@ class InlineAdaptiveSize extends AdSize { /// additional details. class AdSize { /// Constructs an [AdSize] with the given [width] and [height]. - const AdSize({ - required this.width, - required this.height, - }); + const AdSize({required this.width, required this.height}); /// The vertical span of an ad. final int height; @@ -418,10 +444,7 @@ class AdSize { ) async { final num? height = await instanceManager.channel.invokeMethod( 'AdSize#getAnchoredAdaptiveBannerAdSize', - { - 'orientation': describeEnum(orientation), - 'width': width, - }, + {'orientation': orientation.name, 'width': width}, ); if (height == null) return null; @@ -439,12 +462,10 @@ class AdSize { /// This function always returns the same height for any width / device combination. /// For more details, visit: https://developers.google.com/android/reference/com/google/android/gms/ads/AdSize#getCurrentOrientationAnchoredAdaptiveBannerAdSize(android.content.Context,%20int) static Future - getCurrentOrientationAnchoredAdaptiveBannerAdSize(int width) async { + getCurrentOrientationAnchoredAdaptiveBannerAdSize(int width) async { final num? height = await instanceManager.channel.invokeMethod( 'AdSize#getAnchoredAdaptiveBannerAdSize', - { - 'width': width, - }, + {'width': width}, ); if (height == null) return null; @@ -466,7 +487,8 @@ class AdSize { /// This ad size is most suitable for ads intended to be displayed inside /// scrollable content. static InlineAdaptiveSize getCurrentOrientationInlineAdaptiveBannerAdSize( - int width) { + int width, + ) { return InlineAdaptiveSize._(width: width); } @@ -482,7 +504,9 @@ class AdSize { /// scrollable content. static InlineAdaptiveSize getLandscapeInlineAdaptiveBannerAdSize(int width) { return InlineAdaptiveSize._( - width: width, orientation: Orientation.landscape); + width: width, + orientation: Orientation.landscape, + ); } /// Gets an AdSize in portrait orientation with the given width and 0 height. @@ -497,7 +521,9 @@ class AdSize { /// scrollable content. static InlineAdaptiveSize getPortraitInlineAdaptiveBannerAdSize(int width) { return InlineAdaptiveSize._( - width: width, orientation: Orientation.portrait); + width: width, + orientation: Orientation.portrait, + ); } /// Gets an AdSize with the given width and height that is always 0. @@ -510,7 +536,9 @@ class AdSize { /// This ad size is most suitable for ads intended to be displayed inside /// scrollable content. static InlineAdaptiveSize getInlineAdaptiveBannerAdSize( - int width, int maxHeight) { + int width, + int maxHeight, + ) { return InlineAdaptiveSize._(width: width, maxHeight: maxHeight); } @@ -544,6 +572,9 @@ class AdSize { bool operator ==(Object other) { return other is AdSize && width == other.width && height == other.height; } + + @override + int get hashCode => Object.hash(width, height); } /// The base class for all ads. @@ -575,7 +606,7 @@ abstract class Ad { abstract class AdWithView extends Ad { /// Default constructor, used by subclasses. AdWithView({required String adUnitId, required this.listener}) - : super(adUnitId: adUnitId); + : super(adUnitId: adUnitId); /// The [AdWithViewListener] for the ad. final AdWithViewListener listener; @@ -618,16 +649,6 @@ abstract class AdWithoutView extends Ad { /// Must call `load()` first before showing the widget. Otherwise, a /// [PlatformException] will be thrown. class AdWidget extends StatefulWidget { - /// Opt out of the visibility detector workaround. - /// - /// As a workaround for - /// https://github.com/googleads/googleads-mobile-flutter/issues/580, - /// we wait for the widget to get displayed once before attaching - /// the platform view. - /// - /// Set this flag to true if you are building with Flutter 3.7.0 or higher. - static bool optOutOfVisibilityDetectorWorkaround = false; - /// Default constructor for [AdWidget]. /// /// [ad] must be loaded before this is added to the widget tree. @@ -635,7 +656,6 @@ class AdWidget extends StatefulWidget { Key? key, required this.ad, this.useHybridComposition = false, - this.onlyVisible = false, }) : super(key: key); /// Ad to be displayed as a widget. @@ -644,8 +664,6 @@ class AdWidget extends StatefulWidget { /// Use Hybrid composition or Virtual Display final bool useHybridComposition; - /// Whether should be displayed only when visible - final bool onlyVisible; @override _AdWidgetState createState() => _AdWidgetState(); } @@ -653,12 +671,10 @@ class AdWidget extends StatefulWidget { class _AdWidgetState extends State { bool _adIdAlreadyMounted = false; bool _adLoadNotCalled = false; - bool _firstVisibleOccurred = false; @override void initState() { super.initState(); - _firstVisibleOccurred = !widget.onlyVisible; final int? adId = instanceManager.adIdFor(widget.ad); if (adId != null) { if (instanceManager.isWidgetAdIdMounted(adId)) { @@ -685,75 +701,58 @@ class _AdWidgetState extends State { throw FlutterError.fromParts([ ErrorSummary('This AdWidget is already in the Widget tree'), ErrorHint( - 'If you placed this AdWidget in a list, make sure you create a new instance ' - 'in the builder function with a unique ad object.'), + 'If you placed this AdWidget in a list, make sure you create a new instance ' + 'in the builder function with a unique ad object.', + ), ErrorHint( - 'Make sure you are not using the same ad object in more than one AdWidget.'), + 'Make sure you are not using the same ad object in more than one AdWidget.', + ), ]); } if (_adLoadNotCalled) { throw FlutterError.fromParts([ ErrorSummary( - 'AdWidget requires Ad.load to be called before AdWidget is inserted into the tree'), + 'AdWidget requires Ad.load to be called before AdWidget is inserted into the tree', + ), ErrorHint( - 'Parameter ad is not loaded. Call Ad.load before AdWidget is inserted into the tree.'), + 'Parameter ad is not loaded. Call Ad.load before AdWidget is inserted into the tree.', + ), ]); } final viewType = '${instanceManager.channel.name}/ad_widget'; if (defaultTargetPlatform == TargetPlatform.android) { - // Do not attach the platform view widget until it will actually become - // visible. This is a workaround for - // https://github.com/googleads/googleads-mobile-flutter/issues/580, - // where impressions are erroneously fired due to how platform views are - // rendered. - if (_firstVisibleOccurred || - AdWidget.optOutOfVisibilityDetectorWorkaround) { - return widget.useHybridComposition - ? PlatformViewLink( - viewType: '${instanceManager.channel.name}/ad_widget', - surfaceFactory: - (BuildContext context, PlatformViewController controller) { - return AndroidViewSurface( - controller: controller as AndroidViewController, - gestureRecognizers: const < - Factory>{}, - hitTestBehavior: PlatformViewHitTestBehavior.opaque, - ); - }, - onCreatePlatformView: (PlatformViewCreationParams params) { - return PlatformViewsService.initSurfaceAndroidView( + return widget.useHybridComposition + ? PlatformViewLink( + viewType: viewType, + surfaceFactory: + (BuildContext context, PlatformViewController controller) { + return AndroidViewSurface( + controller: controller as AndroidViewController, + gestureRecognizers: + const >{}, + hitTestBehavior: PlatformViewHitTestBehavior.opaque, + ); + }, + onCreatePlatformView: (PlatformViewCreationParams params) { + return PlatformViewsService.initSurfaceAndroidView( id: params.id, - viewType: '${instanceManager.channel.name}/ad_widget', + viewType: viewType, layoutDirection: TextDirection.ltr, creationParams: instanceManager.adIdFor(widget.ad), creationParamsCodec: StandardMessageCodec(), ) - ..addOnPlatformViewCreatedListener( - params.onPlatformViewCreated) - ..create(); - }, - ) - : AndroidView( - viewType: viewType, - creationParams: instanceManager.adIdFor(widget.ad), - creationParamsCodec: const StandardMessageCodec(), - clipBehavior: Clip.none, - ); - } else { - final adId = instanceManager.adIdFor(widget.ad); - return VisibilityDetector( - key: Key('android-platform-view-$adId'), - onVisibilityChanged: (visibilityInfo) { - if (!_firstVisibleOccurred && - visibilityInfo.visibleFraction > 0.01) { - setState(() { - _firstVisibleOccurred = true; - }); - } - }, - child: Container(), - ); - } + ..addOnPlatformViewCreatedListener( + params.onPlatformViewCreated, + ) + ..create(); + }, + ) + : AndroidView( + viewType: viewType, + creationParams: instanceManager.adIdFor(widget.ad), + creationParamsCodec: const StandardMessageCodec(), + clipBehavior: Clip.none, + ); } return UiKitView( @@ -770,7 +769,7 @@ class _AdWidgetState extends State { class FluidAdWidget extends StatefulWidget { /// Constructs a [FluidAdWidget]. const FluidAdWidget({Key? key, required this.ad, this.width}) - : super(key: key); + : super(key: key); /// Ad to be displayed as a widget. final FluidAdManagerBannerAd ad; @@ -816,18 +815,22 @@ class _FluidAdWidgetState extends State { throw FlutterError.fromParts([ ErrorSummary('This AdWidget is already in the Widget tree'), ErrorHint( - 'If you placed this AdWidget in a list, make sure you create a new instance ' - 'in the builder function with a unique ad object.'), + 'If you placed this AdWidget in a list, make sure you create a new instance ' + 'in the builder function with a unique ad object.', + ), ErrorHint( - 'Make sure you are not using the same ad object in more than one AdWidget.'), + 'Make sure you are not using the same ad object in more than one AdWidget.', + ), ]); } if (_adLoadNotCalled) { throw FlutterError.fromParts([ ErrorSummary( - 'AdWidget requires Ad.load to be called before AdWidget is inserted into the tree'), + 'AdWidget requires Ad.load to be called before AdWidget is inserted into the tree', + ), ErrorHint( - 'Parameter ad is not loaded. Call Ad.load before AdWidget is inserted into the tree.'), + 'Parameter ad is not loaded. Call Ad.load before AdWidget is inserted into the tree.', + ), ]); } @@ -844,20 +847,21 @@ class _FluidAdWidgetState extends State { viewType: '${instanceManager.channel.name}/ad_widget', surfaceFactory: (BuildContext context, PlatformViewController controller) { - return AndroidViewSurface( - controller: controller as AndroidViewController, - gestureRecognizers: const >{}, - hitTestBehavior: PlatformViewHitTestBehavior.opaque, - ); - }, + return AndroidViewSurface( + controller: controller as AndroidViewController, + gestureRecognizers: + const >{}, + hitTestBehavior: PlatformViewHitTestBehavior.opaque, + ); + }, onCreatePlatformView: (PlatformViewCreationParams params) { return PlatformViewsService.initSurfaceAndroidView( - id: params.id, - viewType: '${instanceManager.channel.name}/ad_widget', - layoutDirection: TextDirection.ltr, - creationParams: instanceManager.adIdFor(widget.ad), - creationParamsCodec: StandardMessageCodec(), - ) + id: params.id, + viewType: '${instanceManager.channel.name}/ad_widget', + layoutDirection: TextDirection.ltr, + creationParams: instanceManager.adIdFor(widget.ad), + creationParamsCodec: StandardMessageCodec(), + ) ..addOnPlatformViewCreatedListener(params.onPlatformViewCreated) ..create(); }, @@ -923,6 +927,16 @@ class BannerAd extends AdWithView { Future getPlatformAdSize() async { return await instanceManager.getAdSize(this); } + + /// Returns true if the ad Id is already mounted in a WidgetAd managed + /// by the instanceManager. + bool get isMounted { + final int? id = instanceManager.adIdFor(this); + if (id != null) { + return instanceManager.isWidgetAdIdMounted(id); + } + return false; + } } /// An 'AdManagerBannerAd' that has fluid ad size. @@ -941,11 +955,11 @@ class FluidAdManagerBannerAd extends AdManagerBannerAd { required AdManagerAdRequest request, this.onFluidAdHeightChangedListener, }) : super( - sizes: [FluidAdSize()], - adUnitId: adUnitId, - listener: listener, - request: request, - ); + sizes: [FluidAdSize()], + adUnitId: adUnitId, + listener: listener, + request: request, + ); /// Listener for when the height of the ad changes. OnFluidAdHeightChangedListener? onFluidAdHeightChangedListener; @@ -969,8 +983,8 @@ class AdManagerBannerAd extends AdWithView { required String adUnitId, required this.listener, required this.request, - }) : assert(sizes.isNotEmpty), - super(adUnitId: adUnitId, listener: listener); + }) : assert(sizes.isNotEmpty), + super(adUnitId: adUnitId, listener: listener); /// Targeting information used to fetch an [Ad]. final AdManagerAdRequest request; @@ -1037,10 +1051,10 @@ class NativeAd extends AdWithView { this.nativeAdOptions, this.customOptions, this.nativeTemplateStyle, - }) : adManagerRequest = null, - assert(request != null), - assert(nativeTemplateStyle != null || factoryId != null), - super(adUnitId: adUnitId, listener: listener); + }) : adManagerRequest = null, + assert(request != null), + assert(nativeTemplateStyle != null || factoryId != null), + super(adUnitId: adUnitId, listener: listener); /// Creates a [NativeAd] with Ad Manager. /// @@ -1056,10 +1070,10 @@ class NativeAd extends AdWithView { this.nativeAdOptions, this.customOptions, this.nativeTemplateStyle, - }) : request = null, - assert(adManagerRequest != null), - assert(nativeTemplateStyle != null || factoryId != null), - super(adUnitId: adUnitId, listener: listener); + }) : request = null, + assert(adManagerRequest != null), + assert(nativeTemplateStyle != null || factoryId != null), + super(adUnitId: adUnitId, listener: listener); /// An identifier for the factory that creates the Platform view. final String? factoryId; @@ -1123,7 +1137,10 @@ class InterstitialAd extends AdWithoutView { required InterstitialAdLoadCallback adLoadCallback, }) async { InterstitialAd ad = InterstitialAd._( - adUnitId: adUnitId, adLoadCallback: adLoadCallback, request: request); + adUnitId: adUnitId, + adLoadCallback: adLoadCallback, + request: request, + ); await instanceManager.loadInterstitialAd(ad); } @@ -1169,7 +1186,10 @@ class AdManagerInterstitialAd extends AdWithoutView { AppEventListener? appEventListener, }) async { AdManagerInterstitialAd ad = AdManagerInterstitialAd._( - adUnitId: adUnitId, adLoadCallback: adLoadCallback, request: request); + adUnitId: adUnitId, + adLoadCallback: adLoadCallback, + request: request, + ); await instanceManager.loadAdManagerInterstitialAd(ad); } @@ -1195,8 +1215,8 @@ class RewardedAd extends AdWithoutView { required String adUnitId, required this.rewardedAdLoadCallback, required this.request, - }) : adManagerRequest = null, - super(adUnitId: adUnitId); + }) : adManagerRequest = null, + super(adUnitId: adUnitId); /// Creates a [RewardedAd] with a [AdManagerAdRequest]. /// @@ -1205,8 +1225,8 @@ class RewardedAd extends AdWithoutView { required String adUnitId, required this.rewardedAdLoadCallback, required this.adManagerRequest, - }) : request = null, - super(adUnitId: adUnitId); + }) : request = null, + super(adUnitId: adUnitId); /// Targeting information used to fetch an [Ad]. final AdRequest? request; @@ -1230,9 +1250,10 @@ class RewardedAd extends AdWithoutView { required RewardedAdLoadCallback rewardedAdLoadCallback, }) async { RewardedAd rewardedAd = RewardedAd._( - adUnitId: adUnitId, - request: request, - rewardedAdLoadCallback: rewardedAdLoadCallback); + adUnitId: adUnitId, + request: request, + rewardedAdLoadCallback: rewardedAdLoadCallback, + ); await instanceManager.loadRewardedAd(rewardedAd); } @@ -1244,9 +1265,10 @@ class RewardedAd extends AdWithoutView { required RewardedAdLoadCallback rewardedAdLoadCallback, }) async { RewardedAd rewardedAd = RewardedAd._fromAdManagerRequest( - adUnitId: adUnitId, - adManagerRequest: adManagerRequest, - rewardedAdLoadCallback: rewardedAdLoadCallback); + adUnitId: adUnitId, + adManagerRequest: adManagerRequest, + rewardedAdLoadCallback: rewardedAdLoadCallback, + ); await instanceManager.loadRewardedAd(rewardedAd); } @@ -1284,8 +1306,8 @@ class RewardedInterstitialAd extends AdWithoutView { required String adUnitId, required this.rewardedInterstitialAdLoadCallback, required this.request, - }) : adManagerRequest = null, - super(adUnitId: adUnitId); + }) : adManagerRequest = null, + super(adUnitId: adUnitId); /// Creates a [RewardedInterstitialAd] with an [AdManagerAdRequest]. /// @@ -1294,8 +1316,8 @@ class RewardedInterstitialAd extends AdWithoutView { required String adUnitId, required this.rewardedInterstitialAdLoadCallback, required this.adManagerRequest, - }) : request = null, - super(adUnitId: adUnitId); + }) : request = null, + super(adUnitId: adUnitId); /// Targeting information used to fetch an [Ad]. final AdRequest? request; @@ -1317,12 +1339,13 @@ class RewardedInterstitialAd extends AdWithoutView { required String adUnitId, required AdRequest request, required RewardedInterstitialAdLoadCallback - rewardedInterstitialAdLoadCallback, + rewardedInterstitialAdLoadCallback, }) async { RewardedInterstitialAd rewardedInterstitialAd = RewardedInterstitialAd._( - adUnitId: adUnitId, - request: request, - rewardedInterstitialAdLoadCallback: rewardedInterstitialAdLoadCallback); + adUnitId: adUnitId, + request: request, + rewardedInterstitialAdLoadCallback: rewardedInterstitialAdLoadCallback, + ); await instanceManager.loadRewardedInterstitialAd(rewardedInterstitialAd); } @@ -1332,14 +1355,15 @@ class RewardedInterstitialAd extends AdWithoutView { required String adUnitId, required AdManagerAdRequest adManagerRequest, required RewardedInterstitialAdLoadCallback - rewardedInterstitialAdLoadCallback, + rewardedInterstitialAdLoadCallback, }) async { RewardedInterstitialAd rewardedInterstitialAd = RewardedInterstitialAd._fromAdManagerRequest( - adUnitId: adUnitId, - adManagerRequest: adManagerRequest, - rewardedInterstitialAdLoadCallback: - rewardedInterstitialAdLoadCallback); + adUnitId: adUnitId, + adManagerRequest: adManagerRequest, + rewardedInterstitialAdLoadCallback: + rewardedInterstitialAdLoadCallback, + ); await instanceManager.loadRewardedInterstitialAd(rewardedInterstitialAd); } @@ -1397,40 +1421,26 @@ class ServerSideVerificationOptions { userId == other.userId && customData == other.customData; } + + @override + int get hashCode => Object.hash(userId, customData); } /// A full-screen app open ad for the Google Mobile Ads Plugin. class AppOpenAd extends AdWithoutView { - /// Portrait orientation. - static const int orientationPortrait = 1; - - /// Landscape orientation left. - /// - /// Android does not distinguish between left/right, and will treat this - /// the same way as [orientationLandscapeRight]. - static const int orientationLandscapeLeft = 2; - - /// Landscape orientation right. - /// - /// Android does not distinguish between left/right, and will treat this - /// the same way as [orientationLandscapeLeft]. - static const int orientationLandscapeRight = 3; - AppOpenAd._({ required String adUnitId, required this.adLoadCallback, required this.request, - required this.orientation, - }) : adManagerAdRequest = null, - super(adUnitId: adUnitId); + }) : adManagerAdRequest = null, + super(adUnitId: adUnitId); AppOpenAd._fromAdManagerRequest({ required String adUnitId, required this.adLoadCallback, required this.adManagerAdRequest, - required this.orientation, - }) : request = null, - super(adUnitId: adUnitId); + }) : request = null, + super(adUnitId: adUnitId); /// The [AdRequest] used to load the ad. final AdRequest? request; @@ -1441,12 +1451,6 @@ class AppOpenAd extends AdWithoutView { /// Listener for ad load events. final AppOpenAdLoadCallback adLoadCallback; - /// The requested orientation. - /// - /// Must be [orientationPortrait], [orientationLandscapeLeft], or - /// [orientationLandscapeRight]. - final int orientation; - /// Callbacks to be invoked when ads show and dismiss full screen content. FullScreenContentCallback? fullScreenContentCallback; @@ -1455,13 +1459,11 @@ class AppOpenAd extends AdWithoutView { required String adUnitId, required AdRequest request, required AppOpenAdLoadCallback adLoadCallback, - required int orientation, }) async { AppOpenAd ad = AppOpenAd._( adUnitId: adUnitId, adLoadCallback: adLoadCallback, request: request, - orientation: orientation, ); await instanceManager.loadAppOpenAd(ad); } @@ -1471,13 +1473,11 @@ class AppOpenAd extends AdWithoutView { required String adUnitId, required AdManagerAdRequest adManagerAdRequest, required AppOpenAdLoadCallback adLoadCallback, - required int orientation, }) async { AppOpenAd ad = AppOpenAd._fromAdManagerRequest( adUnitId: adUnitId, adLoadCallback: adLoadCallback, adManagerAdRequest: adManagerAdRequest, - orientation: orientation, ); await instanceManager.loadAppOpenAd(ad); } @@ -1506,7 +1506,7 @@ enum MediaAspectRatio { portrait, /// Close to square media aspect ratio. This is not a strict 1:1 aspect ratio. - square + square, } /// Indicates preferred location of AdChoices icon. @@ -1521,7 +1521,7 @@ enum AdChoicesPlacement { bottomRightCorner, /// Bottom left corner. - bottomLeftCorner + bottomLeftCorner, } /// Used to configure native ad requests. @@ -1576,6 +1576,16 @@ class NativeAdOptions { shouldRequestMultipleImages == other.shouldRequestMultipleImages && shouldReturnUrlsForImageAssets == other.shouldReturnUrlsForImageAssets; } + + @override + int get hashCode => Object.hash( + adChoicesPlacement, + mediaAspectRatio, + videoOptions, + requestCustomMuteThisAd, + shouldRequestMultipleImages, + shouldReturnUrlsForImageAssets, + ); } /// Options for controlling video playback in supported ad formats. @@ -1610,4 +1620,8 @@ class VideoOptions { customControlsRequested == other.customControlsRequested && startMuted == other.startMuted; } + + @override + int get hashCode => + Object.hash(clickToExpandRequested, customControlsRequested, startMuted); } diff --git a/packages/google_mobile_ads/lib/src/ad_inspector_containers.dart b/packages/google_mobile_ads/lib/src/ad_inspector_containers.dart index d3e118a89..cfc42daab 100644 --- a/packages/google_mobile_ads/lib/src/ad_inspector_containers.dart +++ b/packages/google_mobile_ads/lib/src/ad_inspector_containers.dart @@ -18,11 +18,7 @@ typedef OnAdInspectorClosedListener = void Function(AdInspectorError?); /// Error information about why the ad inspector failed. class AdInspectorError { /// Create an AdInspectorError with the given code, domain and message. - AdInspectorError({ - this.code, - this.domain, - this.message, - }); + AdInspectorError({this.code, this.domain, this.message}); /// Code to identifier the error. final String? code; diff --git a/packages/google_mobile_ads/lib/src/ad_instance_manager.dart b/packages/google_mobile_ads/lib/src/ad_instance_manager.dart index f89040c94..aa37a30a0 100644 --- a/packages/google_mobile_ads/lib/src/ad_instance_manager.dart +++ b/packages/google_mobile_ads/lib/src/ad_instance_manager.dart @@ -16,15 +16,19 @@ // ignore_for_file: deprecated_member_use_from_same_package +// ignore_for_file: deprecated_member_use + import 'dart:async'; import 'dart:collection'; import 'dart:io'; import 'package:flutter/cupertino.dart'; import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:google_mobile_ads/src/ad_inspector_containers.dart'; import 'package:google_mobile_ads/src/ad_listeners.dart'; +import 'package:google_mobile_ads/src/mediation_extras.dart'; import 'package:google_mobile_ads/src/mobile_ads.dart'; import 'package:google_mobile_ads/src/nativetemplates/template_type.dart'; import 'package:google_mobile_ads/src/webview_controller_util.dart'; @@ -46,12 +50,13 @@ AdInstanceManager instanceManager = AdInstanceManager( /// Maintains access to loaded [Ad] instances and handles sending/receiving /// messages to platform code. class AdInstanceManager { - AdInstanceManager(String channelName, - {this.webViewControllerUtil = const WebViewControllerUtil()}) - : channel = MethodChannel( - channelName, - StandardMethodCodec(AdMessageCodec()), - ) { + AdInstanceManager( + String channelName, { + this.webViewControllerUtil = const WebViewControllerUtil(), + }) : channel = MethodChannel( + channelName, + StandardMethodCodec(AdMessageCodec()), + ) { channel.setMethodCallHandler((MethodCall call) async { assert(call.method == 'onAdEvent'); @@ -129,20 +134,25 @@ class AdInstanceManager { break; case 'adWillDismissFullScreenContent': if (ad is RewardedAd) { - ad.fullScreenContentCallback?.onAdWillDismissFullScreenContent - ?.call(ad); + ad.fullScreenContentCallback?.onAdWillDismissFullScreenContent?.call( + ad, + ); } else if (ad is InterstitialAd) { - ad.fullScreenContentCallback?.onAdWillDismissFullScreenContent - ?.call(ad); + ad.fullScreenContentCallback?.onAdWillDismissFullScreenContent?.call( + ad, + ); } else if (ad is RewardedInterstitialAd) { - ad.fullScreenContentCallback?.onAdWillDismissFullScreenContent - ?.call(ad); + ad.fullScreenContentCallback?.onAdWillDismissFullScreenContent?.call( + ad, + ); } else if (ad is AdManagerInterstitialAd) { - ad.fullScreenContentCallback?.onAdWillDismissFullScreenContent - ?.call(ad); + ad.fullScreenContentCallback?.onAdWillDismissFullScreenContent?.call( + ad, + ); } else if (ad is AppOpenAd) { - ad.fullScreenContentCallback?.onAdWillDismissFullScreenContent - ?.call(ad); + ad.fullScreenContentCallback?.onAdWillDismissFullScreenContent?.call( + ad, + ); } else { debugPrint('invalid ad: $ad, for event name: $eventName'); } @@ -162,7 +172,10 @@ class AdInstanceManager { } void _onAdEventAndroid( - Ad ad, String eventName, Map arguments) { + Ad ad, + String eventName, + Map arguments, + ) { switch (eventName) { case 'onAdLoaded': _invokeOnAdLoaded(ad, eventName, arguments); @@ -211,13 +224,17 @@ class AdInstanceManager { void _invokeFluidAdHeightChanged(Ad ad, Map arguments) { assert(ad is FluidAdManagerBannerAd); - (ad as FluidAdManagerBannerAd) - .onFluidAdHeightChangedListener - ?.call(ad, arguments['height'].toDouble()); + (ad as FluidAdManagerBannerAd).onFluidAdHeightChangedListener?.call( + ad, + arguments['height'].toDouble(), + ); } void _invokeOnAdLoaded( - Ad ad, String eventName, Map arguments) { + Ad ad, + String eventName, + Map arguments, + ) { ad.responseInfo = arguments['responseInfo']; if (ad is AdWithView) { ad.listener.onAdLoaded?.call(ad); @@ -237,7 +254,10 @@ class AdInstanceManager { } void _invokeOnAdFailedToLoad( - Ad ad, String eventName, Map arguments) { + Ad ad, + String eventName, + Map arguments, + ) { if (ad is AdWithView) { ad.listener.onAdFailedToLoad?.call(ad, arguments['loadAdError']); } else if (ad is RewardedAd) { @@ -248,8 +268,9 @@ class AdInstanceManager { ad.adLoadCallback.onAdFailedToLoad.call(arguments['loadAdError']); } else if (ad is RewardedInterstitialAd) { ad.dispose(); - ad.rewardedInterstitialAdLoadCallback.onAdFailedToLoad - .call(arguments['loadAdError']); + ad.rewardedInterstitialAdLoadCallback.onAdFailedToLoad.call( + arguments['loadAdError'], + ); } else if (ad is AdManagerInterstitialAd) { ad.dispose(); ad.adLoadCallback.onAdFailedToLoad.call(arguments['loadAdError']); @@ -261,19 +282,28 @@ class AdInstanceManager { } void _invokeOnAppEvent( - Ad ad, String eventName, Map arguments) { + Ad ad, + String eventName, + Map arguments, + ) { if (ad is AdManagerBannerAd) { ad.listener.onAppEvent?.call(ad, arguments['name'], arguments['data']); } else if (ad is AdManagerInterstitialAd) { - ad.appEventListener?.onAppEvent - ?.call(ad, arguments['name'], arguments['data']); + ad.appEventListener?.onAppEvent?.call( + ad, + arguments['name'], + arguments['data'], + ); } else { debugPrint('invalid ad: $ad, for event name: $eventName'); } } void _invokeOnUserEarnedReward( - Ad ad, String eventName, Map arguments) { + Ad ad, + String eventName, + Map arguments, + ) { assert(arguments['rewardItem'] != null); if (ad is RewardedAd) { ad.onUserEarnedRewardCallback?.call(ad, arguments['rewardItem']); @@ -333,22 +363,35 @@ class AdInstanceManager { } void _invokeOnAdFailedToShowFullScreenContent( - Ad ad, String eventName, Map arguments) { + Ad ad, + String eventName, + Map arguments, + ) { if (ad is RewardedAd) { - ad.fullScreenContentCallback?.onAdFailedToShowFullScreenContent - ?.call(ad, arguments['error']); + ad.fullScreenContentCallback?.onAdFailedToShowFullScreenContent?.call( + ad, + arguments['error'], + ); } else if (ad is InterstitialAd) { - ad.fullScreenContentCallback?.onAdFailedToShowFullScreenContent - ?.call(ad, arguments['error']); + ad.fullScreenContentCallback?.onAdFailedToShowFullScreenContent?.call( + ad, + arguments['error'], + ); } else if (ad is RewardedInterstitialAd) { - ad.fullScreenContentCallback?.onAdFailedToShowFullScreenContent - ?.call(ad, arguments['error']); + ad.fullScreenContentCallback?.onAdFailedToShowFullScreenContent?.call( + ad, + arguments['error'], + ); } else if (ad is AdManagerInterstitialAd) { - ad.fullScreenContentCallback?.onAdFailedToShowFullScreenContent - ?.call(ad, arguments['error']); + ad.fullScreenContentCallback?.onAdFailedToShowFullScreenContent?.call( + ad, + arguments['error'], + ); } else if (ad is AppOpenAd) { - ad.fullScreenContentCallback?.onAdFailedToShowFullScreenContent - ?.call(ad, arguments['error']); + ad.fullScreenContentCallback?.onAdFailedToShowFullScreenContent?.call( + ad, + arguments['error'], + ); } else { debugPrint('invalid ad: $ad, for event name: $eventName'); } @@ -393,7 +436,10 @@ class AdInstanceManager { } void _invokePaidEvent( - Ad ad, String eventName, Map arguments) { + Ad ad, + String eventName, + Map arguments, + ) { assert(arguments['valueMicros'] != null && arguments['valueMicros'] is num); int precisionTypeInt = arguments['precision']; @@ -444,9 +490,7 @@ class AdInstanceManager { Future getAdSize(Ad ad) => instanceManager.channel.invokeMethod( 'getAdSize', - { - 'adId': adIdFor(ad), - }, + {'adId': adIdFor(ad)}, ); /// Returns null if an invalid [adId] was passed in. @@ -476,15 +520,12 @@ class AdInstanceManager { final int adId = _nextAdId++; _loadedAds[adId] = ad; - return channel.invokeMethod( - 'loadBannerAd', - { - 'adId': adId, - 'adUnitId': ad.adUnitId, - 'request': ad.request, - 'size': ad.size, - }, - ); + return channel.invokeMethod('loadBannerAd', { + 'adId': adId, + 'adUnitId': ad.adUnitId, + 'request': ad.request, + 'size': ad.size, + }); } Future loadInterstitialAd(InterstitialAd ad) { @@ -494,14 +535,11 @@ class AdInstanceManager { final int adId = _nextAdId++; _loadedAds[adId] = ad; - return channel.invokeMethod( - 'loadInterstitialAd', - { - 'adId': adId, - 'adUnitId': ad.adUnitId, - 'request': ad.request, - }, - ); + return channel.invokeMethod('loadInterstitialAd', { + 'adId': adId, + 'adUnitId': ad.adUnitId, + 'request': ad.request, + }); } /// Starts loading the ad if not previously loaded. @@ -514,19 +552,16 @@ class AdInstanceManager { final int adId = _nextAdId++; _loadedAds[adId] = ad; - return channel.invokeMethod( - 'loadNativeAd', - { - 'adId': adId, - 'adUnitId': ad.adUnitId, - 'request': ad.request, - 'adManagerRequest': ad.adManagerRequest, - 'factoryId': ad.factoryId, - 'nativeAdOptions': ad.nativeAdOptions, - 'customOptions': ad.customOptions, - 'nativeTemplateStyle': ad.nativeTemplateStyle, - }, - ); + return channel.invokeMethod('loadNativeAd', { + 'adId': adId, + 'adUnitId': ad.adUnitId, + 'request': ad.request, + 'adManagerRequest': ad.adManagerRequest, + 'factoryId': ad.factoryId, + 'nativeAdOptions': ad.nativeAdOptions, + 'customOptions': ad.customOptions, + 'nativeTemplateStyle': ad.nativeTemplateStyle, + }); } /// Starts loading the ad if not previously loaded. @@ -539,15 +574,12 @@ class AdInstanceManager { final int adId = _nextAdId++; _loadedAds[adId] = ad; - return channel.invokeMethod( - 'loadRewardedAd', - { - 'adId': adId, - 'adUnitId': ad.adUnitId, - 'request': ad.request, - 'adManagerRequest': ad.adManagerRequest, - }, - ); + return channel.invokeMethod('loadRewardedAd', { + 'adId': adId, + 'adUnitId': ad.adUnitId, + 'request': ad.request, + 'adManagerRequest': ad.adManagerRequest, + }); } /// Starts loading the ad if not previously loaded. @@ -560,15 +592,13 @@ class AdInstanceManager { final int adId = _nextAdId++; _loadedAds[adId] = ad; - return channel.invokeMethod( - 'loadRewardedInterstitialAd', - { - 'adId': adId, - 'adUnitId': ad.adUnitId, - 'request': ad.request, - 'adManagerRequest': ad.adManagerRequest, - }, - ); + return channel + .invokeMethod('loadRewardedInterstitialAd', { + 'adId': adId, + 'adUnitId': ad.adUnitId, + 'request': ad.request, + 'adManagerRequest': ad.adManagerRequest, + }); } /// Load an app open ad. @@ -579,16 +609,12 @@ class AdInstanceManager { final int adId = _nextAdId++; _loadedAds[adId] = ad; - return channel.invokeMethod( - 'loadAppOpenAd', - { - 'adId': adId, - 'adUnitId': ad.adUnitId, - 'request': ad.request, - 'adManagerRequest': ad.adManagerAdRequest, - 'orientation': ad.orientation, - }, - ); + return channel.invokeMethod('loadAppOpenAd', { + 'adId': adId, + 'adUnitId': ad.adUnitId, + 'request': ad.request, + 'adManagerRequest': ad.adManagerAdRequest, + }); } /// Starts loading the ad if not previously loaded. @@ -622,15 +648,12 @@ class AdInstanceManager { final int adId = _nextAdId++; _loadedAds[adId] = ad; - return channel.invokeMethod( - 'loadFluidAd', - { - 'adId': adId, - 'sizes': ad.sizes, - 'adUnitId': ad.adUnitId, - 'request': ad.request, - }, - ); + return channel.invokeMethod('loadFluidAd', { + 'adId': adId, + 'sizes': ad.sizes, + 'adUnitId': ad.adUnitId, + 'request': ad.request, + }); } /// Loads an ad if not currently loading or loaded. @@ -663,12 +686,9 @@ class AdInstanceManager { if (disposedAd == null) { return Future.value(); } - return channel.invokeMethod( - 'disposeAd', - { - 'adId': adId, - }, - ); + return channel.invokeMethod('disposeAd', { + 'adId': adId, + }); } /// Display an [AdWithoutView] that is overlaid on top of the application. @@ -678,23 +698,22 @@ class AdInstanceManager { '$Ad has not been loaded or has already been disposed.', ); - return channel.invokeMethod( - 'showAdWithoutView', - { - 'adId': adIdFor(ad), - }, - ); + return channel.invokeMethod('showAdWithoutView', { + 'adId': adIdFor(ad), + }); } /// Gets the global [RequestConfiguration]. Future getRequestConfiguration() async { return (await instanceManager.channel.invokeMethod( - 'MobileAds#getRequestConfiguration'))!; + 'MobileAds#getRequestConfiguration', + ))!; } /// Set the [RequestConfiguration] to apply for future ad requests. Future updateRequestConfiguration( - RequestConfiguration requestConfiguration) { + RequestConfiguration requestConfiguration, + ) { return channel.invokeMethod( 'MobileAds#updateRequestConfiguration', { @@ -711,9 +730,7 @@ class AdInstanceManager { Future setSameAppKeyEnabled(bool isEnabled) { return channel.invokeMethod( 'MobileAds#setSameAppKeyEnabled', - { - 'isEnabled': isEnabled, - }, + {'isEnabled': isEnabled}, ); } @@ -721,9 +738,7 @@ class AdInstanceManager { Future setAppMuted(bool muted) { return channel.invokeMethod( 'MobileAds#setAppMuted', - { - 'muted': muted, - }, + {'muted': muted}, ); } @@ -731,9 +746,7 @@ class AdInstanceManager { Future setAppVolume(double volume) { return channel.invokeMethod( 'MobileAds#setAppVolume', - { - 'volume': volume, - }, + {'volume': volume}, ); } @@ -744,13 +757,10 @@ class AdInstanceManager { '$ad has not been loaded or has already been disposed.', ); - return channel.invokeMethod( - 'setImmersiveMode', - { - 'adId': adIdFor(ad), - 'immersiveModeEnabled': immersiveModeEnabled, - }, - ); + return channel.invokeMethod('setImmersiveMode', { + 'adId': adIdFor(ad), + 'immersiveModeEnabled': immersiveModeEnabled, + }); } /// Disables automated SDK crash reporting. @@ -760,14 +770,16 @@ class AdInstanceManager { /// Disables mediation adapter initialization during initialization of the GMA SDK. Future disableMediationInitialization() { - return channel - .invokeMethod('MobileAds#disableMediationInitialization'); + return channel.invokeMethod( + 'MobileAds#disableMediationInitialization', + ); } /// Gets the version string of Google Mobile Ads SDK. Future getVersionString() async { - return (await instanceManager.channel - .invokeMethod('MobileAds#getVersionString'))!; + return (await instanceManager.channel.invokeMethod( + 'MobileAds#getVersionString', + ))!; } /// Set server side verification options on the ad. @@ -791,9 +803,7 @@ class AdInstanceManager { Future openDebugMenu(String adUnitId) async { return channel.invokeMethod( 'MobileAds#openDebugMenu', - { - 'adUnitId': adUnitId, - }, + {'adUnitId': adUnitId}, ); } @@ -824,8 +834,11 @@ class AdInstanceManager { await channel.invokeMethod('MobileAds#openAdInspector'); listener(null); } on PlatformException catch (e) { - var error = - AdInspectorError(code: e.code, domain: e.details, message: e.message); + var error = AdInspectorError( + code: e.code, + domain: e.details, + message: e.message, + ); listener(error); } } @@ -858,6 +871,7 @@ class AdMessageCodec extends StandardMessageCodec { static const int _valueNativeTemplateFontStyle = 151; static const int _valueNativeTemplateType = 152; static const int _valueColor = 153; + static const int _valueMediationExtras = 154; @override void writeValue(WriteBuffer buffer, dynamic value) { @@ -877,6 +891,7 @@ class AdMessageCodec extends StandardMessageCodec { writeValue(buffer, value.publisherProvidedId); writeValue(buffer, value.mediationExtrasIdentifier); writeValue(buffer, value.extras); + writeValue(buffer, value.mediationExtras); } else if (value is AdRequest) { buffer.putUint8(_valueAdRequest); writeValue(buffer, value.keywords); @@ -888,6 +903,15 @@ class AdMessageCodec extends StandardMessageCodec { } writeValue(buffer, value.mediationExtrasIdentifier); writeValue(buffer, value.extras); + writeValue(buffer, value.mediationExtras); + } else if (value is MediationExtras) { + buffer.putUint8(_valueMediationExtras); + if (defaultTargetPlatform == TargetPlatform.android) { + writeValue(buffer, value.getAndroidClassName()); + } else { + writeValue(buffer, value.getIOSClassName()); + } + writeValue(buffer, value.getExtras()); } else if (value is RewardItem) { buffer.putUint8(_valueRewardItem); writeValue(buffer, value.amount); @@ -923,7 +947,7 @@ class AdMessageCodec extends StandardMessageCodec { writeValue(buffer, value.message); } else if (value is AdapterInitializationState) { buffer.putUint8(_valueInitializationState); - writeValue(buffer, describeEnum(value)); + writeValue(buffer, value.name); } else if (value is AdapterStatus) { buffer.putUint8(_valueAdapterStatus); writeValue(buffer, value.state); @@ -977,10 +1001,10 @@ class AdMessageCodec extends StandardMessageCodec { writeValue(buffer, value.size); } else if (value is Color) { buffer.putUint8(_valueColor); - writeValue(buffer, value.alpha); - writeValue(buffer, value.red); - writeValue(buffer, value.green); - writeValue(buffer, value.blue); + writeValue(buffer, (value.a * 255).toInt()); + writeValue(buffer, (value.r * 255).toInt()); + writeValue(buffer, (value.g * 255).toInt()); + writeValue(buffer, (value.b * 255).toInt()); } else if (value is NativeTemplateFontStyle) { buffer.putUint8(_valueNativeTemplateFontStyle); writeValue(buffer, value.index); @@ -1002,21 +1026,25 @@ class AdMessageCodec extends StandardMessageCodec { : AdSize.getLandscapeInlineAdaptiveBannerAdSize(width.toInt()); } else if (maxHeight != null) { return AdSize.getInlineAdaptiveBannerAdSize( - width.toInt(), maxHeight.toInt()); + width.toInt(), + maxHeight.toInt(), + ); } else { return AdSize.getCurrentOrientationInlineAdaptiveBannerAdSize( - width.toInt()); + width.toInt(), + ); } case _valueAnchoredAdaptiveBannerAdSize: - final String? orientationStr = - readValueOfType(buffer.getUint8(), buffer); + final String? orientationStr = readValueOfType( + buffer.getUint8(), + buffer, + ); final num width = readValueOfType(buffer.getUint8(), buffer); Orientation? orientation; if (orientationStr != null) { orientation = Orientation.values.firstWhere( - (Orientation orientation) => - describeEnum(orientation) == orientationStr, + (Orientation orientation) => orientation.name == orientationStr, ); } return AnchoredAdaptiveBannerAdSize( @@ -1025,21 +1053,19 @@ class AdMessageCodec extends StandardMessageCodec { height: -1, // Unused value ); case _valueSmartBannerAdSize: - final String orientationStr = - readValueOfType(buffer.getUint8(), buffer); + final String orientationStr = readValueOfType( + buffer.getUint8(), + buffer, + ); return SmartBannerAdSize( Orientation.values.firstWhere( - (Orientation orientation) => - describeEnum(orientation) == orientationStr, + (Orientation orientation) => orientation.name == orientationStr, ), ); case _valueAdSize: num width = readValueOfType(buffer.getUint8(), buffer); num height = readValueOfType(buffer.getUint8(), buffer); - return AdSize( - width: width.toInt(), - height: height.toInt(), - ); + return AdSize(width: width.toInt(), height: height.toInt()); case _valueFluidAdSize: return FluidAdSize(); case _valueAdRequest: @@ -1047,14 +1073,27 @@ class AdMessageCodec extends StandardMessageCodec { keywords: readValueOfType(buffer.getUint8(), buffer)?.cast(), contentUrl: readValueOfType(buffer.getUint8(), buffer), nonPersonalizedAds: readValueOfType(buffer.getUint8(), buffer), - neighboringContentUrls: - readValueOfType(buffer.getUint8(), buffer)?.cast(), + neighboringContentUrls: readValueOfType( + buffer.getUint8(), + buffer, + )?.cast(), httpTimeoutMillis: (defaultTargetPlatform == TargetPlatform.android) ? readValueOfType(buffer.getUint8(), buffer) : null, mediationExtrasIdentifier: readValueOfType(buffer.getUint8(), buffer), - extras: readValueOfType(buffer.getUint8(), buffer) - ?.cast(), + extras: readValueOfType( + buffer.getUint8(), + buffer, + )?.cast(), + mediationExtras: readValueOfType( + buffer.getUint8(), + buffer, + )?.cast>(), + ); + case _valueMediationExtras: + return _MediationExtras( + readValueOfType(buffer.getUint8(), buffer), + readValueOfType(buffer.getUint8(), buffer), ); case _valueRewardItem: return RewardItem( @@ -1065,24 +1104,29 @@ class AdMessageCodec extends StandardMessageCodec { return ResponseInfo( responseId: readValueOfType(buffer.getUint8(), buffer), mediationAdapterClassName: readValueOfType(buffer.getUint8(), buffer), - adapterResponses: readValueOfType(buffer.getUint8(), buffer) - ?.cast(), + adapterResponses: readValueOfType( + buffer.getUint8(), + buffer, + )?.cast(), loadedAdapterResponseInfo: readValueOfType(buffer.getUint8(), buffer), responseExtras: _deepCastStringKeyDynamicValueMap( - readValueOfType(buffer.getUint8(), buffer)), + readValueOfType(buffer.getUint8(), buffer), + ), ); case _valueAdapterResponseInfo: return AdapterResponseInfo( - adapterClassName: _safeReadString(buffer), - latencyMillis: readValueOfType(buffer.getUint8(), buffer), - description: _safeReadString(buffer), - adUnitMapping: - _deepCastStringMap(readValueOfType(buffer.getUint8(), buffer)), - adError: readValueOfType(buffer.getUint8(), buffer), - adSourceName: _safeReadString(buffer), - adSourceId: _safeReadString(buffer), - adSourceInstanceName: _safeReadString(buffer), - adSourceInstanceId: _safeReadString(buffer)); + adapterClassName: _safeReadString(buffer), + latencyMillis: readValueOfType(buffer.getUint8(), buffer), + description: _safeReadString(buffer), + adUnitMapping: _deepCastStringMap( + readValueOfType(buffer.getUint8(), buffer), + ), + adError: readValueOfType(buffer.getUint8(), buffer), + adSourceName: _safeReadString(buffer), + adSourceId: _safeReadString(buffer), + adSourceInstanceName: _safeReadString(buffer), + adSourceInstanceId: _safeReadString(buffer), + ); case _valueLoadAdError: return LoadAdError( readValueOfType(buffer.getUint8(), buffer), @@ -1092,28 +1136,39 @@ class AdMessageCodec extends StandardMessageCodec { ); case _valueAdError: return AdError( - readValueOfType(buffer.getUint8(), buffer), - readValueOfType(buffer.getUint8(), buffer), - readValueOfType(buffer.getUint8(), buffer)); + readValueOfType(buffer.getUint8(), buffer), + readValueOfType(buffer.getUint8(), buffer), + readValueOfType(buffer.getUint8(), buffer), + ); case _valueAdManagerAdRequest: return AdManagerAdRequest( keywords: readValueOfType(buffer.getUint8(), buffer)?.cast(), contentUrl: readValueOfType(buffer.getUint8(), buffer), - customTargeting: readValueOfType(buffer.getUint8(), buffer) - ?.cast(), + customTargeting: readValueOfType( + buffer.getUint8(), + buffer, + )?.cast(), customTargetingLists: _tryDeepMapCast( readValueOfType(buffer.getUint8(), buffer), ), nonPersonalizedAds: readValueOfType(buffer.getUint8(), buffer), - neighboringContentUrls: - readValueOfType(buffer.getUint8(), buffer)?.cast(), + neighboringContentUrls: readValueOfType( + buffer.getUint8(), + buffer, + )?.cast(), httpTimeoutMillis: (defaultTargetPlatform == TargetPlatform.android) ? readValueOfType(buffer.getUint8(), buffer) : null, publisherProvidedId: readValueOfType(buffer.getUint8(), buffer), mediationExtrasIdentifier: readValueOfType(buffer.getUint8(), buffer), - extras: readValueOfType(buffer.getUint8(), buffer) - ?.cast(), + extras: readValueOfType( + buffer.getUint8(), + buffer, + )?.cast(), + mediationExtras: readValueOfType( + buffer.getUint8(), + buffer, + )?.cast>(), ); case _valueInitializationState: switch (readValueOfType(buffer.getUint8(), buffer)) { @@ -1124,8 +1179,10 @@ class AdMessageCodec extends StandardMessageCodec { } throw ArgumentError(); case _valueAdapterStatus: - final AdapterInitializationState state = - readValueOfType(buffer.getUint8(), buffer); + final AdapterInitializationState state = readValueOfType( + buffer.getUint8(), + buffer, + ); final String description = readValueOfType(buffer.getUint8(), buffer); double latency = readValueOfType(buffer.getUint8(), buffer).toDouble(); @@ -1138,13 +1195,16 @@ class AdMessageCodec extends StandardMessageCodec { return AdapterStatus(state, description, latency); case _valueInitializationStatus: return InitializationStatus( - readValueOfType(buffer.getUint8(), buffer) - .cast(), + readValueOfType( + buffer.getUint8(), + buffer, + ).cast(), ); case _valueServerSideVerificationOptions: return ServerSideVerificationOptions( - userId: readValueOfType(buffer.getUint8(), buffer), - customData: readValueOfType(buffer.getUint8(), buffer)); + userId: readValueOfType(buffer.getUint8(), buffer), + customData: readValueOfType(buffer.getUint8(), buffer), + ); case _valueNativeAdOptions: int? adChoices = readValueOfType(buffer.getUint8(), buffer); int? mediaAspectRatio = readValueOfType(buffer.getUint8(), buffer); @@ -1153,10 +1213,14 @@ class AdMessageCodec extends StandardMessageCodec { mediaAspectRatio: MediaAspectRatioExtension.fromInt(mediaAspectRatio), videoOptions: readValueOfType(buffer.getUint8(), buffer), requestCustomMuteThisAd: readValueOfType(buffer.getUint8(), buffer), - shouldRequestMultipleImages: - readValueOfType(buffer.getUint8(), buffer), - shouldReturnUrlsForImageAssets: - readValueOfType(buffer.getUint8(), buffer), + shouldRequestMultipleImages: readValueOfType( + buffer.getUint8(), + buffer, + ), + shouldReturnUrlsForImageAssets: readValueOfType( + buffer.getUint8(), + buffer, + ), ); case _valueVideoOptions: return VideoOptions( @@ -1167,11 +1231,15 @@ class AdMessageCodec extends StandardMessageCodec { case _valueRequestConfigurationParams: return RequestConfiguration( maxAdContentRating: readValueOfType(buffer.getUint8(), buffer), - tagForChildDirectedTreatment: - readValueOfType(buffer.getUint8(), buffer), + tagForChildDirectedTreatment: readValueOfType( + buffer.getUint8(), + buffer, + ), tagForUnderAgeOfConsent: readValueOfType(buffer.getUint8(), buffer), - testDeviceIds: - readValueOfType(buffer.getUint8(), buffer).cast(), + testDeviceIds: readValueOfType( + buffer.getUint8(), + buffer, + ).cast(), ); case _valueNativeTemplateStyle: return NativeTemplateStyle( @@ -1196,13 +1264,16 @@ class AdMessageCodec extends StandardMessageCodec { ); case _valueColor: return Color.fromARGB( - readValueOfType(buffer.getUint8(), buffer), - readValueOfType(buffer.getUint8(), buffer), - readValueOfType(buffer.getUint8(), buffer), - readValueOfType(buffer.getUint8(), buffer)); + readValueOfType(buffer.getUint8(), buffer), + readValueOfType(buffer.getUint8(), buffer), + readValueOfType(buffer.getUint8(), buffer), + readValueOfType(buffer.getUint8(), buffer), + ); case _valueNativeTemplateFontStyle: - return NativeTemplateFontStyle - .values[readValueOfType(buffer.getUint8(), buffer)]; + return NativeTemplateFontStyle.values[readValueOfType( + buffer.getUint8(), + buffer, + )]; default: return super.readValueOfType(type, buffer); } @@ -1211,31 +1282,24 @@ class AdMessageCodec extends StandardMessageCodec { Map>? _tryDeepMapCast(Map? map) { if (map == null) return null; return map.map>( - (dynamic key, dynamic value) => MapEntry>( - key, - value?.cast(), - ), + (dynamic key, dynamic value) => + MapEntry>(key, value?.cast()), ); } Map _deepCastStringMap(Map? map) { if (map == null) return {}; return map.map( - (dynamic key, dynamic value) => MapEntry( - key, - value, - ), + (dynamic key, dynamic value) => MapEntry(key, value), ); } Map _deepCastStringKeyDynamicValueMap( - Map? map) { + Map? map, + ) { if (map == null) return {}; return map.map( - (dynamic key, dynamic value) => MapEntry( - key, - value, - ), + (dynamic key, dynamic value) => MapEntry(key, value), ); } @@ -1254,16 +1318,16 @@ class AdMessageCodec extends StandardMessageCodec { writeValue(buffer, value.orientationValue); } else if (value is AnchoredAdaptiveBannerAdSize) { buffer.putUint8(_valueAnchoredAdaptiveBannerAdSize); - var orientationValue; + String? orientationValue; if (value.orientation != null) { - orientationValue = describeEnum(value.orientation as Orientation); + orientationValue = (value.orientation as Orientation).name; } writeValue(buffer, orientationValue); writeValue(buffer, value.width); } else if (value is SmartBannerAdSize) { buffer.putUint8(_valueSmartBannerAdSize); if (defaultTargetPlatform == TargetPlatform.iOS) { - writeValue(buffer, describeEnum(value.orientation)); + writeValue(buffer, value.orientation.name); } } else if (value is FluidAdSize) { buffer.putUint8(_valueFluidAdSize); @@ -1275,6 +1339,32 @@ class AdMessageCodec extends StandardMessageCodec { } } +class _MediationExtras implements MediationExtras { + _MediationExtras(String className, Map extras) + : _androidClassName = className, + _iOSClassName = className, + _extras = extras; + + final String _androidClassName; + final String _iOSClassName; + final Map _extras; + + @override + String getAndroidClassName() { + return _androidClassName; + } + + @override + Map getExtras() { + return _extras; + } + + @override + String getIOSClassName() { + return _iOSClassName; + } +} + /// An extension that maps each [MediaAspectRatio] to an int. extension MediaAspectRatioExtension on MediaAspectRatio { /// Gets the int mapping to pass to platform channel. diff --git a/packages/google_mobile_ads/lib/src/ad_listeners.dart b/packages/google_mobile_ads/lib/src/ad_listeners.dart index 5677a2469..2645bf98c 100644 --- a/packages/google_mobile_ads/lib/src/ad_listeners.dart +++ b/packages/google_mobile_ads/lib/src/ad_listeners.dart @@ -26,19 +26,24 @@ typedef GenericAdEventCallback = void Function(Ad ad); typedef FullScreenAdLoadErrorCallback = void Function(LoadAdError error); /// The callback type for when a user earns a reward. -typedef OnUserEarnedRewardCallback = void Function( - AdWithoutView ad, RewardItem reward); +typedef OnUserEarnedRewardCallback = + void Function(AdWithoutView ad, RewardItem reward); /// The callback type to handle an error loading an [Ad]. typedef AdLoadErrorCallback = void Function(Ad ad, LoadAdError error); /// The callback type for when an ad receives revenue value. -typedef OnPaidEventCallback = void Function( - Ad ad, double valueMicros, PrecisionType precision, String currencyCode); +typedef OnPaidEventCallback = + void Function( + Ad ad, + double valueMicros, + PrecisionType precision, + String currencyCode, + ); /// The callback type for when a fluid ad's height changes. -typedef OnFluidAdHeightChangedListener = void Function( - FluidAdManagerBannerAd ad, double height); +typedef OnFluidAdHeightChangedListener = + void Function(FluidAdManagerBannerAd ad, double height); /// Allowed constants for precision type in [OnPaidEventCallback]. enum PrecisionType { @@ -52,7 +57,7 @@ enum PrecisionType { publisherProvided, /// The precise value paid for this ad. - precise + precise, } /// Listener for app events. @@ -131,15 +136,15 @@ class BannerAdListener extends AdWithViewListener { OnPaidEventCallback? onPaidEvent, AdEventCallback? onAdClicked, }) : super( - onAdLoaded: onAdLoaded, - onAdFailedToLoad: onAdFailedToLoad, - onAdOpened: onAdOpened, - onAdClosed: onAdClosed, - onAdWillDismissScreen: onAdWillDismissScreen, - onAdImpression: onAdImpression, - onPaidEvent: onPaidEvent, - onAdClicked: onAdClicked, - ); + onAdLoaded: onAdLoaded, + onAdFailedToLoad: onAdFailedToLoad, + onAdOpened: onAdOpened, + onAdClosed: onAdClosed, + onAdWillDismissScreen: onAdWillDismissScreen, + onAdImpression: onAdImpression, + onPaidEvent: onPaidEvent, + onAdClicked: onAdClicked, + ); } /// A listener for receiving notifications for the lifecycle of an [AdManagerBannerAd]. @@ -170,15 +175,15 @@ class AdManagerBannerAdListener extends BannerAdListener this.onAppEvent, AdEventCallback? onAdClicked, }) : super( - onAdLoaded: onAdLoaded, - onAdFailedToLoad: onAdFailedToLoad, - onAdOpened: onAdOpened, - onAdWillDismissScreen: onAdWillDismissScreen, - onAdClosed: onAdClosed, - onAdImpression: onAdImpression, - onPaidEvent: onPaidEvent, - onAdClicked: onAdClicked, - ); + onAdLoaded: onAdLoaded, + onAdFailedToLoad: onAdFailedToLoad, + onAdOpened: onAdOpened, + onAdWillDismissScreen: onAdWillDismissScreen, + onAdClosed: onAdClosed, + onAdImpression: onAdImpression, + onPaidEvent: onPaidEvent, + onAdClicked: onAdClicked, + ); /// Called when an app event is received. @override @@ -211,14 +216,15 @@ class NativeAdListener extends AdWithViewListener { OnPaidEventCallback? onPaidEvent, AdEventCallback? onAdClicked, }) : super( - onAdLoaded: onAdLoaded, - onAdFailedToLoad: onAdFailedToLoad, - onAdOpened: onAdOpened, - onAdWillDismissScreen: onAdWillDismissScreen, - onAdClosed: onAdClosed, - onAdImpression: onAdImpression, - onPaidEvent: onPaidEvent, - onAdClicked: onAdClicked); + onAdLoaded: onAdLoaded, + onAdFailedToLoad: onAdFailedToLoad, + onAdOpened: onAdOpened, + onAdWillDismissScreen: onAdWillDismissScreen, + onAdClosed: onAdClosed, + onAdImpression: onAdImpression, + onPaidEvent: onPaidEvent, + onAdClicked: onAdClicked, + ); } /// Callback events for for full screen ads, such as Rewarded and Interstitial. diff --git a/packages/google_mobile_ads/lib/src/app_background_event_notifier.dart b/packages/google_mobile_ads/lib/src/app_background_event_notifier.dart index 5fb61ed58..8c0d1e280 100644 --- a/packages/google_mobile_ads/lib/src/app_background_event_notifier.dart +++ b/packages/google_mobile_ads/lib/src/app_background_event_notifier.dart @@ -23,7 +23,7 @@ enum AppState { background, /// App is foregrounded. - foreground + foreground, } /// Notifies changes in app foreground/background. @@ -46,8 +46,10 @@ class AppStateEventNotifier { /// Call [startListening] before subscribing to this stream to /// start listening to background/foreground events on the platform side. static Stream get appStateStream => - _eventChannel.receiveBroadcastStream().map((event) => - event == 'foreground' ? AppState.foreground : AppState.background); + _eventChannel.receiveBroadcastStream().map( + (event) => + event == 'foreground' ? AppState.foreground : AppState.background, + ); /// Start listening to background/foreground events. static Future startListening() async { diff --git a/packages/google_mobile_ads/lib/src/mediation_extras.dart b/packages/google_mobile_ads/lib/src/mediation_extras.dart new file mode 100644 index 000000000..c2ecc05f4 --- /dev/null +++ b/packages/google_mobile_ads/lib/src/mediation_extras.dart @@ -0,0 +1,39 @@ +// 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 +// +// https://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 'package:google_mobile_ads/src/ad_containers.dart'; + +/// Contains information for a particular ad network set by developer. +abstract class MediationExtras { + /// Fully-qualified name of an Android FlutterMediationExtras class. + /// + /// The name of the class must implement the FlutterMediationExtras interface. + /// The flutter plugin will try to instantiate it via reflection when an + /// [AdRequest] is created and an instance of this class is assigned to its + /// mediationExtras. + String getAndroidClassName(); + + /// Name of an iOS class that conforms to the FLTMediationExtras protocol. + /// + /// The flutter plugin will try to instantiate it via reflection when an + /// [AdRequest] is created and an instance of this class is assigned to its + /// mediationExtras. + String getIOSClassName(); + + /// Key-Value pair to be sent to the host platform to parse. + /// + /// The Android or iOS parse classes are responsible to take these values and + /// parse them to Mediation Extras that the Ad Request can register. + Map getExtras(); +} diff --git a/packages/google_mobile_ads/lib/src/mobile_ads.dart b/packages/google_mobile_ads/lib/src/mobile_ads.dart index ac6ab1eac..ab6facb40 100644 --- a/packages/google_mobile_ads/lib/src/mobile_ads.dart +++ b/packages/google_mobile_ads/lib/src/mobile_ads.dart @@ -63,7 +63,8 @@ class MobileAds { /// Update the [RequestConfiguration] to apply for future ad requests. Future updateRequestConfiguration( - RequestConfiguration requestConfiguration) { + RequestConfiguration requestConfiguration, + ) { return instanceManager.updateRequestConfiguration(requestConfiguration); } @@ -157,9 +158,9 @@ class InitializationStatus { /// /// Returned when calling [MobileAds.initialize]; InitializationStatus(Map adapterStatuses) - : adapterStatuses = Map.unmodifiable( - adapterStatuses, - ); + : adapterStatuses = Map.unmodifiable( + adapterStatuses, + ); /// Initialization status of each known ad network, keyed by its adapter's class name. final Map adapterStatuses; diff --git a/packages/google_mobile_ads/lib/src/nativetemplates/native_template_font_style.dart b/packages/google_mobile_ads/lib/src/nativetemplates/native_template_font_style.dart index d7f9b81c8..451362ffd 100644 --- a/packages/google_mobile_ads/lib/src/nativetemplates/native_template_font_style.dart +++ b/packages/google_mobile_ads/lib/src/nativetemplates/native_template_font_style.dart @@ -24,5 +24,5 @@ enum NativeTemplateFontStyle { italic, /// Monospace - monospace + monospace, } diff --git a/packages/google_mobile_ads/lib/src/nativetemplates/native_template_style.dart b/packages/google_mobile_ads/lib/src/nativetemplates/native_template_style.dart index 71947dbfc..8d6873ee8 100644 --- a/packages/google_mobile_ads/lib/src/nativetemplates/native_template_style.dart +++ b/packages/google_mobile_ads/lib/src/nativetemplates/native_template_style.dart @@ -68,18 +68,18 @@ class NativeTemplateStyle { primaryTextStyle == other.primaryTextStyle && secondaryTextStyle == other.secondaryTextStyle && tertiaryTextStyle == other.tertiaryTextStyle && - mainBackgroundColor?.value == other.mainBackgroundColor?.value && + mainBackgroundColor == other.mainBackgroundColor && cornerRadius == other.cornerRadius; } @override int get hashCode => Object.hashAll([ - templateType, - callToActionTextStyle, - primaryTextStyle, - secondaryTextStyle, - tertiaryTextStyle, - mainBackgroundColor, - cornerRadius - ]); + templateType, + callToActionTextStyle, + primaryTextStyle, + secondaryTextStyle, + tertiaryTextStyle, + mainBackgroundColor, + cornerRadius, + ]); } diff --git a/packages/google_mobile_ads/lib/src/nativetemplates/native_template_text_style.dart b/packages/google_mobile_ads/lib/src/nativetemplates/native_template_text_style.dart index d5d170fbd..f2c7b6f22 100644 --- a/packages/google_mobile_ads/lib/src/nativetemplates/native_template_text_style.dart +++ b/packages/google_mobile_ads/lib/src/nativetemplates/native_template_text_style.dart @@ -40,8 +40,8 @@ class NativeTemplateTextStyle { @override bool operator ==(Object other) { return other is NativeTemplateTextStyle && - textColor?.value == other.textColor?.value && - backgroundColor?.value == other.backgroundColor?.value && + textColor == other.textColor && + backgroundColor == other.backgroundColor && style == other.style && size == other.size; } diff --git a/packages/google_mobile_ads/lib/src/nativetemplates/template_type.dart b/packages/google_mobile_ads/lib/src/nativetemplates/template_type.dart index 48ba90c50..86b63c5b9 100644 --- a/packages/google_mobile_ads/lib/src/nativetemplates/template_type.dart +++ b/packages/google_mobile_ads/lib/src/nativetemplates/template_type.dart @@ -18,5 +18,5 @@ enum TemplateType { small, /// Medium layout - medium + medium, } diff --git a/packages/google_mobile_ads/lib/src/request_configuration.dart b/packages/google_mobile_ads/lib/src/request_configuration.dart index e027b5c1a..47491c7a2 100644 --- a/packages/google_mobile_ads/lib/src/request_configuration.dart +++ b/packages/google_mobile_ads/lib/src/request_configuration.dart @@ -30,11 +30,12 @@ class RequestConfiguration { final List? testDeviceIds; /// Creates a [RequestConfiguration]. - RequestConfiguration( - {this.maxAdContentRating, - this.tagForChildDirectedTreatment, - this.tagForUnderAgeOfConsent, - this.testDeviceIds}); + RequestConfiguration({ + this.maxAdContentRating, + this.tagForChildDirectedTreatment, + this.tagForUnderAgeOfConsent, + this.testDeviceIds, + }); } /// Values for [RequestConfiguration.maxAdContentRating]. diff --git a/packages/google_mobile_ads/lib/src/ump/consent_form.dart b/packages/google_mobile_ads/lib/src/ump/consent_form.dart index 9a4f71666..0cd3dd01f 100644 --- a/packages/google_mobile_ads/lib/src/ump/consent_form.dart +++ b/packages/google_mobile_ads/lib/src/ump/consent_form.dart @@ -21,8 +21,8 @@ import 'user_messaging_channel.dart'; typedef OnConsentFormDismissedListener = void Function(FormError? formError); /// Callback to be invoked when a consent form loads successfully -typedef OnConsentFormLoadSuccessListener = void Function( - ConsentForm consentForm); +typedef OnConsentFormLoadSuccessListener = + void Function(ConsentForm consentForm); /// Callback to be invoked when a consent form failed to load. typedef OnConsentFormLoadFailureListener = void Function(FormError formError); @@ -32,6 +32,15 @@ abstract class ConsentForm { /// Shows the consent form. void show(OnConsentFormDismissedListener onConsentFormDismissedListener); + /// Presents a privacy options form. + static Future showPrivacyOptionsForm( + OnConsentFormDismissedListener onConsentFormDismissedListener, + ) async { + onConsentFormDismissedListener( + await UserMessagingChannel.instance.showPrivacyOptionsForm(), + ); + } + /// Free platform resources associated with this object. /// /// Returns a future that completes when the platform resources are freed. @@ -41,9 +50,22 @@ abstract class ConsentForm { /// /// Check that [ConsentInformation.isConsentFormAvailable()] returns true /// prior to calling this method. - static void loadConsentForm(OnConsentFormLoadSuccessListener successListener, - OnConsentFormLoadFailureListener failureListener) { - UserMessagingChannel.instance - .loadConsentForm(successListener, failureListener); + static void loadConsentForm( + OnConsentFormLoadSuccessListener successListener, + OnConsentFormLoadFailureListener failureListener, + ) { + UserMessagingChannel.instance.loadConsentForm( + successListener, + failureListener, + ); + } + + /// Loads a consent form and immediately shows it. + static Future loadAndShowConsentFormIfRequired( + OnConsentFormDismissedListener onConsentFormDismissedListener, + ) async { + onConsentFormDismissedListener( + await UserMessagingChannel.instance.loadAndShowConsentFormIfRequired(), + ); } } diff --git a/packages/google_mobile_ads/lib/src/ump/consent_form_impl.dart b/packages/google_mobile_ads/lib/src/ump/consent_form_impl.dart index 45dff718d..8ad486f75 100644 --- a/packages/google_mobile_ads/lib/src/ump/consent_form_impl.dart +++ b/packages/google_mobile_ads/lib/src/ump/consent_form_impl.dart @@ -37,4 +37,7 @@ class ConsentFormImpl extends ConsentForm { bool operator ==(Object other) { return other is ConsentFormImpl && platformHash == other.platformHash; } + + @override + int get hashCode => platformHash.hashCode; } diff --git a/packages/google_mobile_ads/lib/src/ump/consent_information.dart b/packages/google_mobile_ads/lib/src/ump/consent_information.dart index 47b9944fd..5d265941d 100644 --- a/packages/google_mobile_ads/lib/src/ump/consent_information.dart +++ b/packages/google_mobile_ads/lib/src/ump/consent_information.dart @@ -42,9 +42,10 @@ enum ConsentStatus { abstract class ConsentInformation { /// Requests a consent information update. void requestConsentInfoUpdate( - ConsentRequestParameters params, - OnConsentInfoUpdateSuccessListener successListener, - OnConsentInfoUpdateFailureListener failureListener); + ConsentRequestParameters params, + OnConsentInfoUpdateSuccessListener successListener, + OnConsentInfoUpdateFailureListener failureListener, + ); /// Returns true if a ConsentForm is available, false otherwise. Future isConsentFormAvailable(); @@ -61,6 +62,24 @@ abstract class ConsentInformation { /// the platform API has been called. Future reset(); + /// Indicates whether the app has completed the necessary steps for gathering updated user consent. + Future canRequestAds(); + + /// Indicates the privacy options requirement status as a [PrivacyOptionsRequirementStatus]. + Future getPrivacyOptionsRequirementStatus(); + /// The static [ConsentInformation] instance. static ConsentInformation instance = ConsentInformationImpl(); } + +/// Values indicate whether a privacy options button is required. +enum PrivacyOptionsRequirementStatus { + /// Privacy options entry point is not required. + notRequired, + + /// Privacy options entry point is required. + required, + + /// Privacy options requirement status is unknown. + unknown, +} diff --git a/packages/google_mobile_ads/lib/src/ump/consent_information_impl.dart b/packages/google_mobile_ads/lib/src/ump/consent_information_impl.dart index 5e1f87867..c2a4fe811 100644 --- a/packages/google_mobile_ads/lib/src/ump/consent_information_impl.dart +++ b/packages/google_mobile_ads/lib/src/ump/consent_information_impl.dart @@ -23,11 +23,15 @@ class ConsentInformationImpl extends ConsentInformation { @override void requestConsentInfoUpdate( - ConsentRequestParameters params, - OnConsentInfoUpdateSuccessListener successListener, - OnConsentInfoUpdateFailureListener failureListener) { - UserMessagingChannel.instance - .requestConsentInfoUpdate(params, successListener, failureListener); + ConsentRequestParameters params, + OnConsentInfoUpdateSuccessListener successListener, + OnConsentInfoUpdateFailureListener failureListener, + ) { + UserMessagingChannel.instance.requestConsentInfoUpdate( + params, + successListener, + failureListener, + ); } @override @@ -44,4 +48,14 @@ class ConsentInformationImpl extends ConsentInformation { Future reset() { return UserMessagingChannel.instance.reset(); } + + @override + Future canRequestAds() { + return UserMessagingChannel.instance.canRequestAds(); + } + + @override + Future getPrivacyOptionsRequirementStatus() { + return UserMessagingChannel.instance.getPrivacyOptionsRequirementStatus(); + } } diff --git a/packages/google_mobile_ads/lib/src/ump/consent_request_parameters.dart b/packages/google_mobile_ads/lib/src/ump/consent_request_parameters.dart index 91f5f346e..f9f031a6a 100644 --- a/packages/google_mobile_ads/lib/src/ump/consent_request_parameters.dart +++ b/packages/google_mobile_ads/lib/src/ump/consent_request_parameters.dart @@ -17,8 +17,10 @@ import 'package:flutter/foundation.dart'; /// Parameters sent on updating user consent info. class ConsentRequestParameters { /// Construct a [ConsentRequestParameters]. - ConsentRequestParameters( - {this.tagForUnderAgeOfConsent, this.consentDebugSettings}); + ConsentRequestParameters({ + this.tagForUnderAgeOfConsent, + this.consentDebugSettings, + }); /// Tag for underage of consent. /// @@ -34,6 +36,10 @@ class ConsentRequestParameters { tagForUnderAgeOfConsent == other.tagForUnderAgeOfConsent && consentDebugSettings == other.consentDebugSettings; } + + @override + int get hashCode => + Object.hash(tagForUnderAgeOfConsent, consentDebugSettings); } /// Debug settings to hardcode in test requests. @@ -55,6 +61,9 @@ class ConsentDebugSettings { debugGeography == other.debugGeography && listEquals(testIdentifiers, other.testIdentifiers); } + + @override + int get hashCode => Object.hash(debugGeography, testIdentifiers); } /// Debug values for testing geography. @@ -66,5 +75,12 @@ enum DebugGeography { debugGeographyEea, /// Geography appears as not in EEA for debug devices. - debugGeographyNotEea + @Deprecated('Use DebugGeography.debugGeographyOther') + debugGeographyNotEea, + + /// Geography appears as in a regulated US State for debug devices. + debugGeographyRegulatedUsState, + + /// Geography appears as in a region with no regulation in force. + debugGeographyOther, } diff --git a/packages/google_mobile_ads/lib/src/ump/form_error.dart b/packages/google_mobile_ads/lib/src/ump/form_error.dart index 911e5fb58..7ff1c006d 100644 --- a/packages/google_mobile_ads/lib/src/ump/form_error.dart +++ b/packages/google_mobile_ads/lib/src/ump/form_error.dart @@ -37,4 +37,7 @@ class FormError { errorCode == other.errorCode && message == other.message; } + + @override + int get hashCode => Object.hash(errorCode, message); } diff --git a/packages/google_mobile_ads/lib/src/ump/user_messaging_channel.dart b/packages/google_mobile_ads/lib/src/ump/user_messaging_channel.dart index 64ea4bec4..9a64e2f1d 100644 --- a/packages/google_mobile_ads/lib/src/ump/user_messaging_channel.dart +++ b/packages/google_mobile_ads/lib/src/ump/user_messaging_channel.dart @@ -29,8 +29,12 @@ class UserMessagingChannel { UserMessagingChannel(MethodChannel channel) : _methodChannel = channel; /// The shared [UserMessagingChannel] instance. - static UserMessagingChannel instance = UserMessagingChannel(MethodChannel( - _methodChannelName, StandardMethodCodec(UserMessagingCodec()))); + static UserMessagingChannel instance = UserMessagingChannel( + MethodChannel( + _methodChannelName, + StandardMethodCodec(UserMessagingCodec()), + ), + ); final MethodChannel _methodChannel; @@ -39,15 +43,14 @@ class UserMessagingChannel { /// Invokes [successListener] or [failureListener] depending on if there was /// an error. void requestConsentInfoUpdate( - ConsentRequestParameters params, - OnConsentInfoUpdateSuccessListener successListener, - OnConsentInfoUpdateFailureListener failureListener) async { + ConsentRequestParameters params, + OnConsentInfoUpdateSuccessListener successListener, + OnConsentInfoUpdateFailureListener failureListener, + ) async { try { await _methodChannel.invokeMethod( 'ConsentInformation#requestConsentInfoUpdate', - { - 'params': params, - }, + {'params': params}, ); successListener(); } on PlatformException catch (e) { @@ -57,14 +60,16 @@ class UserMessagingChannel { /// Returns a future indicating whether a consent form is available. Future isConsentFormAvailable() async { - return (await _methodChannel - .invokeMethod('ConsentInformation#isConsentFormAvailable'))!; + return (await _methodChannel.invokeMethod( + 'ConsentInformation#isConsentFormAvailable', + ))!; } /// Gets the consent status. Future getConsentStatus() async { - int consentStatus = (await _methodChannel - .invokeMethod('ConsentInformation#getConsentStatus'))!; + int consentStatus = (await _methodChannel.invokeMethod( + 'ConsentInformation#getConsentStatus', + ))!; if (defaultTargetPlatform == TargetPlatform.iOS) { switch (consentStatus) { @@ -102,27 +107,64 @@ class UserMessagingChannel { return _methodChannel.invokeMethod('ConsentInformation#reset'); } + /// Returns indicating whether it is ok to request ads. + Future canRequestAds() async { + return (await _methodChannel.invokeMethod( + 'ConsentInformation#canRequestAds', + ))!; + } + + /// Indicates the privacy options requirement status as a [PrivacyOptionsRequirementStatus]. + Future + getPrivacyOptionsRequirementStatus() async { + int? privacyOptionsStatusInt = (await _methodChannel.invokeMethod( + 'ConsentInformation#getPrivacyOptionsRequirementStatus', + )); + switch (privacyOptionsStatusInt) { + case 0: + return PrivacyOptionsRequirementStatus.notRequired; + case 1: + return PrivacyOptionsRequirementStatus.required; + default: + return PrivacyOptionsRequirementStatus.unknown; + } + } + /// Loads a consent form and calls the corresponding listener. - void loadConsentForm(OnConsentFormLoadSuccessListener successListener, - OnConsentFormLoadFailureListener failureListener) async { + void loadConsentForm( + OnConsentFormLoadSuccessListener successListener, + OnConsentFormLoadFailureListener failureListener, + ) async { try { - ConsentForm form = (await _methodChannel - .invokeMethod('UserMessagingPlatform#loadConsentForm'))!; + ConsentForm form = (await _methodChannel.invokeMethod( + 'UserMessagingPlatform#loadConsentForm', + ))!; successListener(form); } on PlatformException catch (e) { failureListener(_formErrorFromPlatformException(e)); } } + /// Loads a consent form and calls the listener afterwards. + Future loadAndShowConsentFormIfRequired() async { + try { + return await _methodChannel.invokeMethod( + 'UserMessagingPlatform#loadAndShowConsentFormIfRequired', + ); + } on PlatformException catch (e) { + return _formErrorFromPlatformException(e); + } + } + /// Show the consent form. - void show(ConsentForm consentForm, - OnConsentFormDismissedListener onConsentFormDismissedListener) async { + void show( + ConsentForm consentForm, + OnConsentFormDismissedListener onConsentFormDismissedListener, + ) async { try { await _methodChannel.invokeMethod( 'ConsentForm#show', - { - 'consentForm': consentForm, - }, + {'consentForm': consentForm}, ); onConsentFormDismissedListener(null); } on PlatformException catch (e) { @@ -130,18 +172,29 @@ class UserMessagingChannel { } } + /// Presents a privacy options form. + Future showPrivacyOptionsForm() async { + try { + return await _methodChannel.invokeMethod( + 'UserMessagingPlatform#showPrivacyOptionsForm', + ); + } on PlatformException catch (e) { + return _formErrorFromPlatformException(e); + } + } + FormError _formErrorFromPlatformException(PlatformException e) { return FormError( - errorCode: int.tryParse(e.code) ?? -1, message: e.message ?? ''); + errorCode: int.tryParse(e.code) ?? -1, + message: e.message ?? '', + ); } /// Free platform resources associated with the [ConsentForm]. Future disposeConsentForm(ConsentForm consentForm) { return _methodChannel.invokeMethod( 'ConsentForm#dispose', - { - 'consentForm': consentForm, - }, + {'consentForm': consentForm}, ); } } diff --git a/packages/google_mobile_ads/lib/src/ump/user_messaging_codec.dart b/packages/google_mobile_ads/lib/src/ump/user_messaging_codec.dart index 22fd870d0..f81a5250f 100644 --- a/packages/google_mobile_ads/lib/src/ump/user_messaging_codec.dart +++ b/packages/google_mobile_ads/lib/src/ump/user_messaging_codec.dart @@ -13,6 +13,7 @@ // limitations under the License. import 'package:flutter/services.dart'; +import 'package:google_mobile_ads/src/ump/form_error.dart'; import 'consent_form_impl.dart'; import 'consent_request_parameters.dart'; @@ -22,6 +23,7 @@ class UserMessagingCodec extends StandardMessageCodec { static const int _valueConsentRequestParameters = 129; static const int _valueConsentDebugSettings = 130; static const int _valueConsentForm = 131; + static const int _valueFormError = 132; @override void writeValue(WriteBuffer buffer, dynamic value) { @@ -36,6 +38,10 @@ class UserMessagingCodec extends StandardMessageCodec { } else if (value is ConsentFormImpl) { buffer.putUint8(_valueConsentForm); writeValue(buffer, value.platformHash); + } else if (value is FormError) { + buffer.putUint8(_valueFormError); + writeValue(buffer, value.errorCode); + writeValue(buffer, value.message); } else { super.writeValue(buffer, value); } @@ -46,24 +52,35 @@ class UserMessagingCodec extends StandardMessageCodec { switch (type) { case _valueConsentRequestParameters: bool? tfuac = readValueOfType(buffer.getUint8(), buffer); - ConsentDebugSettings? debugSettings = - readValueOfType(buffer.getUint8(), buffer); + ConsentDebugSettings? debugSettings = readValueOfType( + buffer.getUint8(), + buffer, + ); return ConsentRequestParameters( - tagForUnderAgeOfConsent: tfuac, - consentDebugSettings: debugSettings); + tagForUnderAgeOfConsent: tfuac, + consentDebugSettings: debugSettings, + ); case _valueConsentDebugSettings: int? debugGeographyInt = readValueOfType(buffer.getUint8(), buffer); DebugGeography? debugGeography; if (debugGeographyInt != null) { debugGeography = DebugGeography.values[debugGeographyInt]; } - List? testIds = - readValueOfType(buffer.getUint8(), buffer)?.cast(); + List? testIds = readValueOfType( + buffer.getUint8(), + buffer, + )?.cast(); return ConsentDebugSettings( - debugGeography: debugGeography, testIdentifiers: testIds); + debugGeography: debugGeography, + testIdentifiers: testIds, + ); case _valueConsentForm: final int hashCode = readValueOfType(buffer.getUint8(), buffer); return ConsentFormImpl(hashCode); + case _valueFormError: + final int errorCode = readValueOfType(buffer.getUint8(), buffer); + final String errorMessage = readValueOfType(buffer.getUint8(), buffer); + return FormError(errorCode: errorCode, message: errorMessage); default: return super.readValueOfType(type, buffer); } diff --git a/packages/google_mobile_ads/pubspec.yaml b/packages/google_mobile_ads/pubspec.yaml index 96e13e369..275a0470d 100644 --- a/packages/google_mobile_ads/pubspec.yaml +++ b/packages/google_mobile_ads/pubspec.yaml @@ -13,7 +13,7 @@ # limitations under the License. name: google_mobile_ads -version: 3.1.0 +version: 7.0.0 description: Flutter plugin for Google Mobile Ads, supporting banner, interstitial (full-screen), rewarded and native ads repository: https://github.com/googleads/googleads-mobile-flutter/tree/main/packages/google_mobile_ads @@ -28,27 +28,25 @@ flutter: pluginClass: FLTGoogleMobileAdsPlugin dependencies: - meta: ^1.0.4 + meta: ^1.16.0 flutter: sdk: flutter - visibility_detector: ^0.4.0+2 - webview_flutter_android: ^3.3.1 - webview_flutter_wkwebview: ^3.1.1 - webview_flutter: ^4.0.5 + webview_flutter_android: ^4.10.9 + webview_flutter_wkwebview: ^3.23.4 + webview_flutter: ^4.10.0 dev_dependencies: - pedantic: ^1.11.0 # e2e: ^0.7.0 flutter_driver: sdk: flutter - mockito: ^5.0.0-0 - build_runner: ^2.1.10 + mockito: ^5.4.5 + build_runner: ^2.4.15 + flutter_lints: ^6.0.0 flutter_test: sdk: flutter - flutter_plugin_tools: ^0.8.5 - webview_flutter_platform_interface: ^2.1.0 + webview_flutter_platform_interface: ^2.10.0 environment: - sdk: ">=2.14.0 <3.0.0" - flutter: ">=1.12.13+hotfix.5" + sdk: ">=3.9.0 <4.0.0" + flutter: ">=3.35.1" diff --git a/packages/google_mobile_ads/test/ad_containers_test.dart b/packages/google_mobile_ads/test/ad_containers_test.dart index 475762e9c..5649d4bbf 100644 --- a/packages/google_mobile_ads/test/ad_containers_test.dart +++ b/packages/google_mobile_ads/test/ad_containers_test.dart @@ -20,12 +20,14 @@ import 'package:google_mobile_ads/src/ad_instance_manager.dart'; import 'package:google_mobile_ads/google_mobile_ads.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:flutter/services.dart'; -import 'package:visibility_detector/visibility_detector.dart'; Future handlePlatformMessage(ByteData? data) async { await TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger .handlePlatformMessage( - 'plugins.flutter.io/google_mobile_ads', data, (data) {}); + 'plugins.flutter.io/google_mobile_ads', + data, + (data) {}, + ); } // ignore_for_file: deprecated_member_use_from_same_package @@ -38,33 +40,35 @@ void main() { setUp(() async { log.clear(); - instanceManager = - AdInstanceManager('plugins.flutter.io/google_mobile_ads'); + instanceManager = AdInstanceManager( + 'plugins.flutter.io/google_mobile_ads', + ); TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger - .setMockMethodCallHandler(instanceManager.channel, - (MethodCall methodCall) async { - log.add(methodCall); - switch (methodCall.method) { - case 'MobileAds#updateRequestConfiguration': - case 'MobileAds#setSameAppKeyEnabled': - case 'setImmersiveMode': - case 'loadBannerAd': - case 'loadNativeAd': - case 'showAdWithoutView': - case 'disposeAd': - case 'loadRewardedAd': - case 'loadInterstitialAd': - case 'loadAdManagerInterstitialAd': - case 'loadAdManagerBannerAd': - case 'setServerSideVerificationOptions': - return Future.value(); - case 'getAdSize': - return Future.value(AdSize.banner); - default: - assert(false); - return null; - } - }); + .setMockMethodCallHandler(instanceManager.channel, ( + MethodCall methodCall, + ) async { + log.add(methodCall); + switch (methodCall.method) { + case 'MobileAds#updateRequestConfiguration': + case 'MobileAds#setSameAppKeyEnabled': + case 'setImmersiveMode': + case 'loadBannerAd': + case 'loadNativeAd': + case 'showAdWithoutView': + case 'disposeAd': + case 'loadRewardedAd': + case 'loadInterstitialAd': + case 'loadAdManagerInterstitialAd': + case 'loadAdManagerBannerAd': + case 'setServerSideVerificationOptions': + return Future.value(); + case 'getAdSize': + return Future.value(AdSize.banner); + default: + assert(false); + return null; + } + }); }); test('updateRequestConfiguration', () async { @@ -76,13 +80,15 @@ void main() { ); await instanceManager.updateRequestConfiguration(requestConfiguration); expect(log, [ - isMethodCall('MobileAds#updateRequestConfiguration', - arguments: { - 'maxAdContentRating': MaxAdContentRating.ma, - 'tagForChildDirectedTreatment': TagForChildDirectedTreatment.yes, - 'tagForUnderAgeOfConsent': TagForUnderAgeOfConsent.yes, - 'testDeviceIds': ['test-device-id'], - }) + isMethodCall( + 'MobileAds#updateRequestConfiguration', + arguments: { + 'maxAdContentRating': MaxAdContentRating.ma, + 'tagForChildDirectedTreatment': TagForChildDirectedTreatment.yes, + 'tagForUnderAgeOfConsent': TagForUnderAgeOfConsent.yes, + 'testDeviceIds': ['test-device-id'], + }, + ), ]); }); @@ -90,23 +96,23 @@ void main() { await instanceManager.setSameAppKeyEnabled(true); expect(log, [ - isMethodCall('MobileAds#setSameAppKeyEnabled', - arguments: { - 'isEnabled': true, - }) + isMethodCall( + 'MobileAds#setSameAppKeyEnabled', + arguments: {'isEnabled': true}, + ), ]); await instanceManager.setSameAppKeyEnabled(false); expect(log, [ - isMethodCall('MobileAds#setSameAppKeyEnabled', - arguments: { - 'isEnabled': true, - }), - isMethodCall('MobileAds#setSameAppKeyEnabled', - arguments: { - 'isEnabled': false, - }) + isMethodCall( + 'MobileAds#setSameAppKeyEnabled', + arguments: {'isEnabled': true}, + ), + isMethodCall( + 'MobileAds#setSameAppKeyEnabled', + arguments: {'isEnabled': false}, + ), ]); }); @@ -117,22 +123,26 @@ void main() { adUnitId: 'test-ad-unit', request: request, rewardedAdLoadCallback: RewardedAdLoadCallback( - onAdLoaded: (ad) { - rewarded = ad; - }, - onAdFailedToLoad: (error) => null), + onAdLoaded: (ad) { + rewarded = ad; + }, + onAdFailedToLoad: (error) => null, + ), ); RewardedAd createdAd = instanceManager.adFor(0) as RewardedAd; (createdAd).rewardedAdLoadCallback.onAdLoaded(createdAd); expect(log, [ - isMethodCall('loadRewardedAd', arguments: { - 'adId': 0, - 'adUnitId': 'test-ad-unit', - 'request': request, - 'adManagerRequest': null, - }), + isMethodCall( + 'loadRewardedAd', + arguments: { + 'adId': 0, + 'adUnitId': 'test-ad-unit', + 'request': request, + 'adManagerRequest': null, + }, + ), ]); expect(instanceManager.adFor(0), isNotNull); @@ -142,8 +152,10 @@ void main() { log.clear(); await createdAd.setImmersiveMode(true); expect(log, [ - isMethodCall('setImmersiveMode', - arguments: {'adId': 0, 'immersiveModeEnabled': true}) + isMethodCall( + 'setImmersiveMode', + arguments: {'adId': 0, 'immersiveModeEnabled': true}, + ), ]); // Set ssv @@ -151,8 +163,10 @@ void main() { final ssv = ServerSideVerificationOptions(); await createdAd.setServerSideOptions(ssv); expect(log, [ - isMethodCall('setServerSideVerificationOptions', - arguments: {'adId': 0, 'serverSideVerificationOptions': ssv}) + isMethodCall( + 'setServerSideVerificationOptions', + arguments: {'adId': 0, 'serverSideVerificationOptions': ssv}, + ), ]); }); @@ -162,21 +176,25 @@ void main() { adUnitId: 'test-ad-unit', request: AdRequest(), adLoadCallback: InterstitialAdLoadCallback( - onAdLoaded: (ad) { - interstitial = ad; - }, - onAdFailedToLoad: (error) => null), + onAdLoaded: (ad) { + interstitial = ad; + }, + onAdFailedToLoad: (error) => null, + ), ); InterstitialAd createdAd = (instanceManager.adFor(0) as InterstitialAd); (createdAd).adLoadCallback.onAdLoaded(createdAd); expect(log, [ - isMethodCall('loadInterstitialAd', arguments: { - 'adId': 0, - 'adUnitId': 'test-ad-unit', - 'request': interstitial!.request, - }) + isMethodCall( + 'loadInterstitialAd', + arguments: { + 'adId': 0, + 'adUnitId': 'test-ad-unit', + 'request': interstitial!.request, + }, + ), ]); expect(instanceManager.adFor(0), isNotNull); @@ -184,8 +202,10 @@ void main() { log.clear(); await createdAd.setImmersiveMode(false); expect(log, [ - isMethodCall('setImmersiveMode', - arguments: {'adId': 0, 'immersiveModeEnabled': false}) + isMethodCall( + 'setImmersiveMode', + arguments: {'adId': 0, 'immersiveModeEnabled': false}, + ), ]); }); @@ -195,10 +215,11 @@ void main() { adUnitId: 'test-id', request: AdManagerAdRequest(), adLoadCallback: AdManagerInterstitialAdLoadCallback( - onAdLoaded: (ad) { - interstitial = ad; - }, - onAdFailedToLoad: (error) => null), + onAdLoaded: (ad) { + interstitial = ad; + }, + onAdFailedToLoad: (error) => null, + ), ); AdManagerInterstitialAd createdAd = @@ -206,12 +227,14 @@ void main() { (createdAd).adLoadCallback.onAdLoaded(createdAd); expect(log, [ - isMethodCall('loadAdManagerInterstitialAd', - arguments: { - 'adId': 0, - 'adUnitId': 'test-id', - 'request': interstitial!.request, - }) + isMethodCall( + 'loadAdManagerInterstitialAd', + arguments: { + 'adId': 0, + 'adUnitId': 'test-id', + 'request': interstitial!.request, + }, + ), ]); expect(instanceManager.adFor(0), isNotNull); @@ -219,24 +242,27 @@ void main() { log.clear(); await createdAd.setImmersiveMode(true); expect(log, [ - isMethodCall('setImmersiveMode', - arguments: {'adId': 0, 'immersiveModeEnabled': true}) + isMethodCall( + 'setImmersiveMode', + arguments: {'adId': 0, 'immersiveModeEnabled': true}, + ), ]); }); test('load native', () async { final Map options = {'a': 1, 'b': 2}; final NativeAdOptions nativeAdOptions = NativeAdOptions( - adChoicesPlacement: AdChoicesPlacement.bottomLeftCorner, - mediaAspectRatio: MediaAspectRatio.any, - videoOptions: VideoOptions( - clickToExpandRequested: true, - customControlsRequested: true, - startMuted: true, - ), - requestCustomMuteThisAd: false, - shouldRequestMultipleImages: true, - shouldReturnUrlsForImageAssets: false); + adChoicesPlacement: AdChoicesPlacement.bottomLeftCorner, + mediaAspectRatio: MediaAspectRatio.any, + videoOptions: VideoOptions( + clickToExpandRequested: true, + customControlsRequested: true, + startMuted: true, + ), + requestCustomMuteThisAd: false, + shouldRequestMultipleImages: true, + shouldReturnUrlsForImageAssets: false, + ); final NativeAd native = NativeAd( adUnitId: 'test-ad-unit', factoryId: '0', @@ -248,16 +274,19 @@ void main() { await native.load(); expect(log, [ - isMethodCall('loadNativeAd', arguments: { - 'adId': 0, - 'adUnitId': 'test-ad-unit', - 'request': native.request, - 'adManagerRequest': null, - 'factoryId': '0', - 'nativeAdOptions': nativeAdOptions, - 'customOptions': options, - 'nativeTemplateStyle': null, - }) + isMethodCall( + 'loadNativeAd', + arguments: { + 'adId': 0, + 'adUnitId': 'test-ad-unit', + 'request': native.request, + 'adManagerRequest': null, + 'factoryId': '0', + 'nativeAdOptions': nativeAdOptions, + 'customOptions': options, + 'nativeTemplateStyle': null, + }, + ), ]); expect(instanceManager.adFor(0), isNotNull); @@ -271,22 +300,26 @@ void main() { customOptions: options, listener: NativeAdListener(), adManagerRequest: AdManagerAdRequest(), - nativeTemplateStyle: - NativeTemplateStyle(templateType: TemplateType.medium), + nativeTemplateStyle: NativeTemplateStyle( + templateType: TemplateType.medium, + ), ); await native.load(); expect(log, [ - isMethodCall('loadNativeAd', arguments: { - 'adId': 0, - 'adUnitId': 'test-id', - 'request': null, - 'adManagerRequest': native.adManagerRequest, - 'factoryId': '0', - 'nativeAdOptions': null, - 'customOptions': options, - 'nativeTemplateStyle': native.nativeTemplateStyle, - }) + isMethodCall( + 'loadNativeAd', + arguments: { + 'adId': 0, + 'adUnitId': 'test-id', + 'request': null, + 'adManagerRequest': native.adManagerRequest, + 'factoryId': '0', + 'nativeAdOptions': null, + 'customOptions': options, + 'nativeTemplateStyle': native.nativeTemplateStyle, + }, + ), ]); expect(instanceManager.adFor(0), isNotNull); @@ -331,193 +364,6 @@ void main() { debugDefaultTargetPlatformOverride = null; }); - testWidgets('Build ad widget Android, visibility detector workaround on', - (WidgetTester tester) async { - AdWidget.optOutOfVisibilityDetectorWorkaround = false; - debugDefaultTargetPlatformOverride = TargetPlatform.android; - // Create a loaded ad - final ad = NativeAd( - adUnitId: 'test-ad-unit', - factoryId: '0', - listener: NativeAdListener(), - request: AdRequest(), - ); - await ad.load(); - - // Render ad in a scrolling view - VisibilityDetectorController.instance.updateInterval = Duration.zero; - await tester.pumpWidget( - MaterialApp( - home: Material( - child: SingleChildScrollView( - child: Column( - key: UniqueKey(), - children: [ - SizedBox.fromSize(size: Size(200, 1000)), - Container( - height: 200, - width: 200, - child: AdWidget(ad: ad), - ), - ], - ), - ), - ), - ), - ); - await tester.pumpAndSettle(); - - // On initial render, VisibilityRender should be in the UI - final visibilityDetectorWidget = - tester.widget(find.byKey(Key('android-platform-view-0'))); - expect(visibilityDetectorWidget, isNotNull); - expect(visibilityDetectorWidget, isA()); - final platformViewLinks = - tester.widgetList(find.byType(PlatformViewLink)); - expect(platformViewLinks.isEmpty, true); - - // Drag the ad widget into view - await tester.drag(find.byType(SingleChildScrollView), Offset(0.0, -1000)); - await tester.pumpAndSettle(); - - // PlatformViewLink should now be present instead of VisibilityDetector - final detectors = tester.widgetList(find.byType(VisibilityDetector)); - expect(detectors.isEmpty, true); - final platformViewLink = tester.widget(find.byType(PlatformViewLink)); - expect(platformViewLink, isNotNull); - - // Reset platform override - await ad.dispose(); - debugDefaultTargetPlatformOverride = null; - }); - - testWidgets('Build ad widget Android, visibility detector opted out', - (WidgetTester tester) async { - AdWidget.optOutOfVisibilityDetectorWorkaround = true; - debugDefaultTargetPlatformOverride = TargetPlatform.android; - // Create a loaded ad - final ad = NativeAd( - adUnitId: 'test-ad-unit', - factoryId: '0', - listener: NativeAdListener(), - request: AdRequest(), - ); - await ad.load(); - - // Render ad in a scrolling view - VisibilityDetectorController.instance.updateInterval = Duration.zero; - await tester.pumpWidget( - MaterialApp( - home: Material( - child: SingleChildScrollView( - child: Column( - key: UniqueKey(), - children: [ - SizedBox.fromSize(size: Size(200, 1000)), - Container( - height: 200, - width: 200, - child: AdWidget(ad: ad), - ), - ], - ), - ), - ), - ), - ); - await tester.pumpAndSettle(); - - // VisibilityRender should not be in the UI - final visibilityDetectors = - tester.widgetList(find.byType(VisibilityDetector)); - expect(visibilityDetectors.isEmpty, true); - - final platformViewLink = tester.widget(find.byType(PlatformViewLink)); - expect(platformViewLink, isNotNull); - - // Reset platform override - await ad.dispose(); - debugDefaultTargetPlatformOverride = null; - }); - - testWidgets('warns when ad has not been loaded', - (WidgetTester tester) async { - final NativeAd ad = NativeAd( - adUnitId: 'test-ad-unit', - factoryId: '0', - listener: NativeAdListener(), - request: AdRequest(), - ); - - try { - await tester.pumpWidget( - Directionality( - textDirection: TextDirection.ltr, - child: SizedBox( - width: 100, - height: 100, - child: Stack( - children: [ - AdWidget(ad: ad), - ], - ), - ), - ), - ); - } finally { - dynamic exception = tester.takeException(); - expect(exception, isA()); - expect( - (exception as FlutterError).toStringDeep(), - 'FlutterError\n' - ' AdWidget requires Ad.load to be called before AdWidget is\n' - ' inserted into the tree\n' - ' Parameter ad is not loaded. Call Ad.load before AdWidget is\n' - ' inserted into the tree.\n'); - } - }); - - testWidgets('warns when ad object is reused', (WidgetTester tester) async { - final NativeAd ad = NativeAd( - adUnitId: 'test-ad-unit', - factoryId: '0', - listener: NativeAdListener(), - request: AdRequest(), - ); - - await ad.load(); - - try { - await tester.pumpWidget( - Directionality( - textDirection: TextDirection.ltr, - child: SizedBox( - width: 100, - height: 100, - child: Stack( - children: [ - AdWidget(ad: ad), - AdWidget(ad: ad), - ], - ), - ), - ), - ); - } finally { - dynamic exception = tester.takeException(); - expect(exception, isA()); - expect( - (exception as FlutterError).toStringDeep(), - 'FlutterError\n' - ' This AdWidget is already in the Widget tree\n' - ' If you placed this AdWidget in a list, make sure you create a new\n' - ' instance in the builder function with a unique ad object.\n' - ' Make sure you are not using the same ad object in more than one\n' - ' AdWidget.\n' - ''); - } - }); - testWidgets('warns when the widget is reused', (WidgetTester tester) async { final NativeAd ad = NativeAd( adUnitId: 'test-ad-unit', @@ -536,12 +382,7 @@ void main() { child: SizedBox( width: 100, height: 100, - child: Stack( - children: [ - widget, - widget, - ], - ), + child: Stack(children: [widget, widget]), ), ), ); @@ -549,56 +390,50 @@ void main() { dynamic exception = tester.takeException(); expect(exception, isA()); expect( - (exception as FlutterError).toStringDeep(), - 'FlutterError\n' - ' This AdWidget is already in the Widget tree\n' - ' If you placed this AdWidget in a list, make sure you create a new\n' - ' instance in the builder function with a unique ad object.\n' - ' Make sure you are not using the same ad object in more than one\n' - ' AdWidget.\n' - ''); + (exception as FlutterError).toStringDeep(), + 'FlutterError\n' + ' This AdWidget is already in the Widget tree\n' + ' If you placed this AdWidget in a list, make sure you create a new\n' + ' instance in the builder function with a unique ad object.\n' + ' Make sure you are not using the same ad object in more than one\n' + ' AdWidget.\n' + '', + ); } }); testWidgets( - 'ad objects can be reused if the widget holding the object is disposed', - (WidgetTester tester) async { - final NativeAd ad = NativeAd( - adUnitId: 'test-ad-unit', - factoryId: '0', - listener: NativeAdListener(), - request: AdRequest(), - ); - await ad.load(); - final AdWidget widget = AdWidget(ad: ad); - try { - await tester.pumpWidget( - Directionality( - textDirection: TextDirection.ltr, - child: SizedBox( - width: 100, - height: 100, - child: widget, - ), - ), + 'ad objects can be reused if the widget holding the object is disposed', + (WidgetTester tester) async { + final NativeAd ad = NativeAd( + adUnitId: 'test-ad-unit', + factoryId: '0', + listener: NativeAdListener(), + request: AdRequest(), ); + await ad.load(); + final AdWidget widget = AdWidget(ad: ad); + try { + await tester.pumpWidget( + Directionality( + textDirection: TextDirection.ltr, + child: SizedBox(width: 100, height: 100, child: widget), + ), + ); - await tester.pumpWidget(Container()); + await tester.pumpWidget(Container()); - await tester.pumpWidget( - Directionality( - textDirection: TextDirection.ltr, - child: SizedBox( - width: 100, - height: 100, - child: widget, + await tester.pumpWidget( + Directionality( + textDirection: TextDirection.ltr, + child: SizedBox(width: 100, height: 100, child: widget), ), - ), - ); - } finally { - expect(tester.takeException(), isNull); - } - }); + ); + } finally { + expect(tester.takeException(), isNull); + } + }, + ); test('load show rewarded', () async { RewardedAd? rewarded; @@ -607,22 +442,26 @@ void main() { adUnitId: 'test-ad-unit', request: request, rewardedAdLoadCallback: RewardedAdLoadCallback( - onAdLoaded: (ad) { - rewarded = ad; - }, - onAdFailedToLoad: (error) => null), + onAdLoaded: (ad) { + rewarded = ad; + }, + onAdFailedToLoad: (error) => null, + ), ); RewardedAd createdAd = instanceManager.adFor(0) as RewardedAd; (createdAd).rewardedAdLoadCallback.onAdLoaded(createdAd); expect(log, [ - isMethodCall('loadRewardedAd', arguments: { - 'adId': 0, - 'adUnitId': 'test-ad-unit', - 'request': request, - 'adManagerRequest': null, - }), + isMethodCall( + 'loadRewardedAd', + arguments: { + 'adId': 0, + 'adUnitId': 'test-ad-unit', + 'request': request, + 'adManagerRequest': null, + }, + ), ]); expect(instanceManager.adFor(0), isNotNull); @@ -631,9 +470,10 @@ void main() { log.clear(); await rewarded!.show(onUserEarnedReward: (ad, reward) => null); expect(log, [ - isMethodCall('showAdWithoutView', arguments: { - 'adId': 0, - }) + isMethodCall( + 'showAdWithoutView', + arguments: {'adId': 0}, + ), ]); }); @@ -644,22 +484,26 @@ void main() { adUnitId: 'test-ad-unit', adManagerRequest: request, rewardedAdLoadCallback: RewardedAdLoadCallback( - onAdLoaded: (ad) { - rewarded = ad; - }, - onAdFailedToLoad: (error) => null), + onAdLoaded: (ad) { + rewarded = ad; + }, + onAdFailedToLoad: (error) => null, + ), ); RewardedAd createdAd = instanceManager.adFor(0) as RewardedAd; (createdAd).rewardedAdLoadCallback.onAdLoaded(createdAd); expect(log, [ - isMethodCall('loadRewardedAd', arguments: { - 'adId': 0, - 'adUnitId': 'test-ad-unit', - 'request': null, - 'adManagerRequest': request, - }), + isMethodCall( + 'loadRewardedAd', + arguments: { + 'adId': 0, + 'adUnitId': 'test-ad-unit', + 'request': null, + 'adManagerRequest': request, + }, + ), ]); expect(instanceManager.adFor(0), isNotNull); @@ -667,9 +511,10 @@ void main() { log.clear(); await rewarded!.show(onUserEarnedReward: (ad, reward) => null); expect(log, [ - isMethodCall('showAdWithoutView', arguments: { - 'adId': 0, - }) + isMethodCall( + 'showAdWithoutView', + arguments: {'adId': 0}, + ), ]); }); @@ -679,21 +524,25 @@ void main() { adUnitId: 'test-ad-unit', request: AdRequest(), adLoadCallback: InterstitialAdLoadCallback( - onAdLoaded: (ad) { - interstitial = ad; - }, - onAdFailedToLoad: (error) => null), + onAdLoaded: (ad) { + interstitial = ad; + }, + onAdFailedToLoad: (error) => null, + ), ); InterstitialAd createdAd = (instanceManager.adFor(0) as InterstitialAd); (createdAd).adLoadCallback.onAdLoaded(createdAd); expect(log, [ - isMethodCall('loadInterstitialAd', arguments: { - 'adId': 0, - 'adUnitId': 'test-ad-unit', - 'request': interstitial!.request, - }) + isMethodCall( + 'loadInterstitialAd', + arguments: { + 'adId': 0, + 'adUnitId': 'test-ad-unit', + 'request': interstitial!.request, + }, + ), ]); expect(instanceManager.adFor(0), isNotNull); @@ -701,9 +550,10 @@ void main() { log.clear(); await interstitial!.show(); expect(log, [ - isMethodCall('showAdWithoutView', arguments: { - 'adId': 0, - }) + isMethodCall( + 'showAdWithoutView', + arguments: {'adId': 0}, + ), ]); }); @@ -713,10 +563,11 @@ void main() { adUnitId: 'test-id', request: AdManagerAdRequest(), adLoadCallback: AdManagerInterstitialAdLoadCallback( - onAdLoaded: (ad) { - interstitial = ad; - }, - onAdFailedToLoad: (error) => null), + onAdLoaded: (ad) { + interstitial = ad; + }, + onAdFailedToLoad: (error) => null, + ), ); AdManagerInterstitialAd createdAd = @@ -724,12 +575,14 @@ void main() { (createdAd).adLoadCallback.onAdLoaded(createdAd); expect(log, [ - isMethodCall('loadAdManagerInterstitialAd', - arguments: { - 'adId': 0, - 'adUnitId': 'test-id', - 'request': interstitial!.request, - }) + isMethodCall( + 'loadAdManagerInterstitialAd', + arguments: { + 'adId': 0, + 'adUnitId': 'test-id', + 'request': interstitial!.request, + }, + ), ]); expect(instanceManager.adFor(0), isNotNull); @@ -737,9 +590,10 @@ void main() { log.clear(); await interstitial!.show(); expect(log, [ - isMethodCall('showAdWithoutView', arguments: { - 'adId': 0, - }) + isMethodCall( + 'showAdWithoutView', + arguments: {'adId': 0}, + ), ]); }); @@ -750,16 +604,20 @@ void main() { adUnitId: 'test-ad-unit', request: request, adLoadCallback: InterstitialAdLoadCallback( - onAdLoaded: (ad) => null, - onAdFailedToLoad: (error) => resultsCompleter.complete(error)), + onAdLoaded: (ad) => null, + onAdFailedToLoad: (error) => resultsCompleter.complete(error), + ), ); expect(log, [ - isMethodCall('loadInterstitialAd', arguments: { - 'adId': 0, - 'adUnitId': 'test-ad-unit', - 'request': request, - }) + isMethodCall( + 'loadInterstitialAd', + arguments: { + 'adId': 0, + 'adUnitId': 'test-ad-unit', + 'request': request, + }, + ), ]); expect(instanceManager.adFor(0), isNotNull); @@ -792,8 +650,9 @@ void main() { 'loadAdError': LoadAdError(1, 'domain', 'message', responseInfo), }); - final ByteData data = - instanceManager.channel.codec.encodeMethodCall(methodCall); + final ByteData data = instanceManager.channel.codec.encodeMethodCall( + methodCall, + ); await handlePlatformMessage(data); @@ -806,8 +665,10 @@ void main() { expect(result.domain, 'domain'); expect(result.message, 'message'); expect(result.responseInfo!.responseId, responseInfo.responseId); - expect(result.responseInfo!.mediationAdapterClassName, - responseInfo.mediationAdapterClassName); + expect( + result.responseInfo!.mediationAdapterClassName, + responseInfo.mediationAdapterClassName, + ); expect(result.responseInfo!.responseExtras, responseInfo.responseExtras); List responses = result.responseInfo!.adapterResponses!; @@ -827,17 +688,20 @@ void main() { adUnitId: 'test-ad-unit', request: request, adLoadCallback: AdManagerInterstitialAdLoadCallback( - onAdLoaded: (ad) => null, - onAdFailedToLoad: (error) => resultsCompleter.complete(error)), + onAdLoaded: (ad) => null, + onAdFailedToLoad: (error) => resultsCompleter.complete(error), + ), ); expect(log, [ - isMethodCall('loadAdManagerInterstitialAd', - arguments: { - 'adId': 0, - 'adUnitId': 'test-ad-unit', - 'request': request, - }) + isMethodCall( + 'loadAdManagerInterstitialAd', + arguments: { + 'adId': 0, + 'adUnitId': 'test-ad-unit', + 'request': request, + }, + ), ]); expect(instanceManager.adFor(0), isNotNull); @@ -870,8 +734,9 @@ void main() { 'loadAdError': LoadAdError(1, 'domain', 'message', responseInfo), }); - final ByteData data = - instanceManager.channel.codec.encodeMethodCall(methodCall); + final ByteData data = instanceManager.channel.codec.encodeMethodCall( + methodCall, + ); await handlePlatformMessage(data); // The ad reference should be freed when load failure occurs. expect(instanceManager.adFor(0), isNull); @@ -882,8 +747,10 @@ void main() { expect(result.domain, 'domain'); expect(result.message, 'message'); expect(result.responseInfo!.responseId, responseInfo.responseId); - expect(result.responseInfo!.mediationAdapterClassName, - responseInfo.mediationAdapterClassName); + expect( + result.responseInfo!.mediationAdapterClassName, + responseInfo.mediationAdapterClassName, + ); expect(result.responseInfo!.responseExtras, responseInfo.responseExtras); List responses = result.responseInfo!.adapterResponses!; @@ -903,17 +770,21 @@ void main() { adUnitId: 'test-ad-unit', request: request, rewardedAdLoadCallback: RewardedAdLoadCallback( - onAdLoaded: (ad) => null, - onAdFailedToLoad: (error) => resultsCompleter.complete(error)), + onAdLoaded: (ad) => null, + onAdFailedToLoad: (error) => resultsCompleter.complete(error), + ), ); expect(log, [ - isMethodCall('loadRewardedAd', arguments: { - 'adId': 0, - 'adUnitId': 'test-ad-unit', - 'request': request, - 'adManagerRequest': null, - }) + isMethodCall( + 'loadRewardedAd', + arguments: { + 'adId': 0, + 'adUnitId': 'test-ad-unit', + 'request': request, + 'adManagerRequest': null, + }, + ), ]); expect(instanceManager.adFor(0), isNotNull); @@ -946,8 +817,9 @@ void main() { 'loadAdError': LoadAdError(1, 'domain', 'message', responseInfo), }); - final ByteData data = - instanceManager.channel.codec.encodeMethodCall(methodCall); + final ByteData data = instanceManager.channel.codec.encodeMethodCall( + methodCall, + ); await handlePlatformMessage(data); @@ -960,8 +832,10 @@ void main() { expect(result.domain, 'domain'); expect(result.message, 'message'); expect(result.responseInfo!.responseId, responseInfo.responseId); - expect(result.responseInfo!.mediationAdapterClassName, - responseInfo.mediationAdapterClassName); + expect( + result.responseInfo!.mediationAdapterClassName, + responseInfo.mediationAdapterClassName, + ); expect(result.responseInfo!.responseExtras, responseInfo.responseExtras); List responses = result.responseInfo!.adapterResponses!; @@ -981,17 +855,21 @@ void main() { adUnitId: 'test-ad-unit', factoryId: 'testId', listener: NativeAdListener( - onAdImpression: (Ad ad) => adEventCompleter.complete(ad)), + onAdImpression: (Ad ad) => adEventCompleter.complete(ad), + ), request: AdRequest(), ); await native.load(); - final MethodCall methodCall = MethodCall('onAdEvent', - {'adId': 0, 'eventName': 'onAdImpression'}); + final MethodCall methodCall = MethodCall('onAdEvent', { + 'adId': 0, + 'eventName': 'onAdImpression', + }); - final ByteData data = - instanceManager.channel.codec.encodeMethodCall(methodCall); + final ByteData data = instanceManager.channel.codec.encodeMethodCall( + methodCall, + ); await handlePlatformMessage(data); @@ -1004,13 +882,15 @@ void main() { AdRequest request = AdRequest(); await RewardedAd.load( - adUnitId: 'test-ad-unit', - request: request, - rewardedAdLoadCallback: RewardedAdLoadCallback( - onAdLoaded: (ad) { - loadCompleter.complete(ad); - }, - onAdFailedToLoad: (error) => null)); + adUnitId: 'test-ad-unit', + request: request, + rewardedAdLoadCallback: RewardedAdLoadCallback( + onAdLoaded: (ad) { + loadCompleter.complete(ad); + }, + onAdFailedToLoad: (error) => null, + ), + ); AdapterResponseInfo adapterResponseInfo = AdapterResponseInfo( adapterClassName: 'adapter-name', @@ -1046,8 +926,9 @@ void main() { 'responseInfo': responseInfo, }); - ByteData data = - instanceManager.channel.codec.encodeMethodCall(methodCall); + ByteData data = instanceManager.channel.codec.encodeMethodCall( + methodCall, + ); await handlePlatformMessage(data); final ad = await loadCompleter.future; @@ -1087,20 +968,23 @@ void main() { RewardedAd? rewarded; await RewardedAd.load( - adUnitId: 'test-ad-unit', - request: AdRequest(), - rewardedAdLoadCallback: RewardedAdLoadCallback( - onAdLoaded: (ad) { - rewarded = ad; - }, - onAdFailedToLoad: (error) => null)); + adUnitId: 'test-ad-unit', + request: AdRequest(), + rewardedAdLoadCallback: RewardedAdLoadCallback( + onAdLoaded: (ad) { + rewarded = ad; + }, + onAdFailedToLoad: (error) => null, + ), + ); RewardedAd createdAd = instanceManager.adFor(0) as RewardedAd; createdAd.rewardedAdLoadCallback.onAdLoaded(createdAd); // Reward callback is now set when you call show. await rewarded!.show( - onUserEarnedReward: (ad, item) => - resultCompleter.complete([ad, item])); + onUserEarnedReward: (ad, item) => + resultCompleter.complete([ad, item]), + ); final MethodCall methodCall = MethodCall('onAdEvent', { 'adId': 0, @@ -1108,8 +992,9 @@ void main() { 'rewardItem': RewardItem(1, 'one'), }); - final ByteData data = - instanceManager.channel.codec.encodeMethodCall(methodCall); + final ByteData data = instanceManager.channel.codec.encodeMethodCall( + methodCall, + ); await handlePlatformMessage(data); @@ -1127,8 +1012,12 @@ void main() { size: AdSize.banner, listener: BannerAdListener( onPaidEvent: (Ad ad, double value, precision, String currencyCode) => - resultCompleter - .complete([ad, value, precision, currencyCode]), + resultCompleter.complete([ + ad, + value, + precision, + currencyCode, + ]), ), request: AdRequest(), ); @@ -1144,8 +1033,9 @@ void main() { 'currencyCode': 'USD', }); - ByteData data = - instanceManager.channel.codec.encodeMethodCall(methodCall); + ByteData data = instanceManager.channel.codec.encodeMethodCall( + methodCall, + ); await handlePlatformMessage(data); @@ -1166,7 +1056,8 @@ void main() { }); data = instanceManager.channel.codec.encodeMethodCall(methodCall); await handlePlatformMessage( - instanceManager.channel.codec.encodeMethodCall(methodCall)); + instanceManager.channel.codec.encodeMethodCall(methodCall), + ); result = await resultCompleter.future; expect(result[2], PrecisionType.unknown); @@ -1182,7 +1073,8 @@ void main() { }); data = instanceManager.channel.codec.encodeMethodCall(methodCall); await handlePlatformMessage( - instanceManager.channel.codec.encodeMethodCall(methodCall)); + instanceManager.channel.codec.encodeMethodCall(methodCall), + ); result = await resultCompleter.future; expect(result[1], 12345); expect(result[2], PrecisionType.estimated); @@ -1288,8 +1180,10 @@ void main() { expect(error.message, 'message'); expect(error.responseInfo?.responseId, responseInfo.responseId); expect(error.responseInfo?.responseExtras, responseInfo.responseExtras); - expect(error.responseInfo?.mediationAdapterClassName, - responseInfo.mediationAdapterClassName); + expect( + error.responseInfo?.mediationAdapterClassName, + responseInfo.mediationAdapterClassName, + ); expect(error.responseInfo?.adapterResponses, null); }); @@ -1303,7 +1197,8 @@ void main() { test('encode/decode $InlineAdaptiveSize', () async { ByteData byteData = codec.encodeMessage( - AdSize.getCurrentOrientationInlineAdaptiveBannerAdSize(100))!; + AdSize.getCurrentOrientationInlineAdaptiveBannerAdSize(100), + )!; InlineAdaptiveSize result = codec.decodeMessage(byteData); expect(result.orientation, null); @@ -1311,8 +1206,9 @@ void main() { expect(result.maxHeight, null); expect(result.height, 0); - byteData = codec - .encodeMessage(AdSize.getPortraitInlineAdaptiveBannerAdSize(200))!; + byteData = codec.encodeMessage( + AdSize.getPortraitInlineAdaptiveBannerAdSize(200), + )!; result = codec.decodeMessage(byteData); expect(result.orientation, Orientation.portrait); @@ -1320,8 +1216,9 @@ void main() { expect(result.maxHeight, null); expect(result.height, 0); - byteData = codec - .encodeMessage(AdSize.getLandscapeInlineAdaptiveBannerAdSize(20))!; + byteData = codec.encodeMessage( + AdSize.getLandscapeInlineAdaptiveBannerAdSize(20), + )!; result = codec.decodeMessage(byteData); expect(result.orientation, Orientation.landscape); @@ -1329,8 +1226,9 @@ void main() { expect(result.maxHeight, null); expect(result.height, 0); - byteData = - codec.encodeMessage(AdSize.getInlineAdaptiveBannerAdSize(20, 50))!; + byteData = codec.encodeMessage( + AdSize.getInlineAdaptiveBannerAdSize(20, 50), + )!; result = codec.decodeMessage(byteData); expect(result.orientation, null); @@ -1341,27 +1239,38 @@ void main() { test('encode/decode $AnchoredAdaptiveBannerAdSize', () async { final ByteData byteDataPortrait = codec.encodeMessage( - AnchoredAdaptiveBannerAdSize(Orientation.portrait, - width: 23, height: 34))!; + AnchoredAdaptiveBannerAdSize( + Orientation.portrait, + width: 23, + height: 34, + ), + )!; - final AnchoredAdaptiveBannerAdSize resultPortrait = - codec.decodeMessage(byteDataPortrait); + final AnchoredAdaptiveBannerAdSize resultPortrait = codec.decodeMessage( + byteDataPortrait, + ); expect(resultPortrait.orientation, Orientation.portrait); expect(resultPortrait.width, 23); expect(resultPortrait.height, -1); final ByteData byteDataLandscape = codec.encodeMessage( - AnchoredAdaptiveBannerAdSize(Orientation.landscape, - width: 34, height: 23))!; + AnchoredAdaptiveBannerAdSize( + Orientation.landscape, + width: 34, + height: 23, + ), + )!; - final AnchoredAdaptiveBannerAdSize resultLandscape = - codec.decodeMessage(byteDataLandscape); + final AnchoredAdaptiveBannerAdSize resultLandscape = codec.decodeMessage( + byteDataLandscape, + ); expect(resultLandscape.orientation, Orientation.landscape); expect(resultLandscape.width, 34); expect(resultLandscape.height, -1); final ByteData byteData = codec.encodeMessage( - AnchoredAdaptiveBannerAdSize(null, width: 45, height: 34))!; + AnchoredAdaptiveBannerAdSize(null, width: 45, height: 34), + )!; final AnchoredAdaptiveBannerAdSize result = codec.decodeMessage(byteData); expect(result.orientation, null); @@ -1371,8 +1280,9 @@ void main() { test('encode/decode $SmartBannerAdSize', () async { debugDefaultTargetPlatformOverride = TargetPlatform.iOS; - final ByteData byteData = - codec.encodeMessage(SmartBannerAdSize(Orientation.portrait))!; + final ByteData byteData = codec.encodeMessage( + SmartBannerAdSize(Orientation.portrait), + )!; final SmartBannerAdSize result = codec.decodeMessage(byteData); expect(result.orientation, Orientation.portrait); @@ -1416,7 +1326,7 @@ void main() { contentUrl: 'dat', customTargeting: {'boy': 'who'}, customTargetingLists: >{ - 'him': ['is'] + 'him': ['is'], }, nonPersonalizedAds: true, neighboringContentUrls: ['url1.com', 'url2.com'], @@ -1432,7 +1342,7 @@ void main() { contentUrl: 'dat', customTargeting: {'boy': 'who'}, customTargetingLists: >{ - 'him': ['is'] + 'him': ['is'], }, nonPersonalizedAds: true, neighboringContentUrls: ['url1.com', 'url2.com'], @@ -1441,10 +1351,7 @@ void main() { mediationExtrasIdentifier: 'identifier', extras: {'key': 'value'}, ); - expect( - codec.decodeMessage(byteData), - decodedRequest, - ); + expect(codec.decodeMessage(byteData), decodedRequest); }); test('encode/decode $AdManagerAdRequest iOS', () async { @@ -1455,7 +1362,7 @@ void main() { contentUrl: 'dat', customTargeting: {'boy': 'who'}, customTargetingLists: >{ - 'him': ['is'] + 'him': ['is'], }, nonPersonalizedAds: true, neighboringContentUrls: ['url1.com', 'url2.com'], @@ -1486,17 +1393,21 @@ void main() { adUnitId: 'test-ad-unit', factoryId: 'testId', listener: NativeAdListener( - onAdClicked: (ad) => adClickCompleter.complete(ad)), + onAdClicked: (ad) => adClickCompleter.complete(ad), + ), request: AdRequest(), ); await native.load(); - final MethodCall methodCall = MethodCall('onAdEvent', - {'adId': adId, 'eventName': eventName}); + final MethodCall methodCall = MethodCall( + 'onAdEvent', + {'adId': adId, 'eventName': eventName}, + ); - final ByteData data = - instanceManager.channel.codec.encodeMethodCall(methodCall); + final ByteData data = instanceManager.channel.codec.encodeMethodCall( + methodCall, + ); await handlePlatformMessage(data); expect(adClickCompleter.future, completion(native)); @@ -1517,28 +1428,34 @@ void main() { RewardedAd? rewarded; AdRequest request = AdRequest(); await RewardedAd.load( - adUnitId: 'test-ad-unit', - request: request, - rewardedAdLoadCallback: RewardedAdLoadCallback( - onAdLoaded: (ad) { - rewarded = ad; - ad.fullScreenContentCallback = FullScreenContentCallback( - onAdClicked: (ad) => adClickCompleter.complete(ad)); - }, - onAdFailedToLoad: (error) => null)); + adUnitId: 'test-ad-unit', + request: request, + rewardedAdLoadCallback: RewardedAdLoadCallback( + onAdLoaded: (ad) { + rewarded = ad; + ad.fullScreenContentCallback = FullScreenContentCallback( + onAdClicked: (ad) => adClickCompleter.complete(ad), + ); + }, + onAdFailedToLoad: (error) => null, + ), + ); MethodCall methodCall = MethodCall('onAdEvent', { 'adId': adId, 'eventName': 'onAdLoaded', }); - ByteData data = - instanceManager.channel.codec.encodeMethodCall(methodCall); + ByteData data = instanceManager.channel.codec.encodeMethodCall( + methodCall, + ); await handlePlatformMessage(data); // Handle adDidRecordClick method call - methodCall = MethodCall('onAdEvent', - {'adId': adId, 'eventName': eventName}); + methodCall = MethodCall('onAdEvent', { + 'adId': adId, + 'eventName': eventName, + }); data = instanceManager.channel.codec.encodeMethodCall(methodCall); await handlePlatformMessage(data); @@ -1564,12 +1481,14 @@ void main() { adUnitId: 'test-ad-unit', request: request, adLoadCallback: InterstitialAdLoadCallback( - onAdLoaded: (ad) { - interstitialAd = ad; - ad.fullScreenContentCallback = FullScreenContentCallback( - onAdClicked: (ad) => adClickCompleter.complete(ad)); - }, - onAdFailedToLoad: (error) => null), + onAdLoaded: (ad) { + interstitialAd = ad; + ad.fullScreenContentCallback = FullScreenContentCallback( + onAdClicked: (ad) => adClickCompleter.complete(ad), + ); + }, + onAdFailedToLoad: (error) => null, + ), ); MethodCall methodCall = MethodCall('onAdEvent', { @@ -1577,13 +1496,16 @@ void main() { 'eventName': 'onAdLoaded', }); - ByteData data = - instanceManager.channel.codec.encodeMethodCall(methodCall); + ByteData data = instanceManager.channel.codec.encodeMethodCall( + methodCall, + ); await handlePlatformMessage(data); // Handle adDidRecordClick method call - methodCall = MethodCall('onAdEvent', - {'adId': adId, 'eventName': eventName}); + methodCall = MethodCall('onAdEvent', { + 'adId': adId, + 'eventName': eventName, + }); data = instanceManager.channel.codec.encodeMethodCall(methodCall); await handlePlatformMessage(data); @@ -1609,12 +1531,14 @@ void main() { adUnitId: 'test-ad-unit', request: request, adLoadCallback: InterstitialAdLoadCallback( - onAdLoaded: (ad) { - interstitialAd = ad; - ad.fullScreenContentCallback = FullScreenContentCallback( - onAdClicked: (ad) => adClickCompleter.complete(ad)); - }, - onAdFailedToLoad: (error) => null), + onAdLoaded: (ad) { + interstitialAd = ad; + ad.fullScreenContentCallback = FullScreenContentCallback( + onAdClicked: (ad) => adClickCompleter.complete(ad), + ); + }, + onAdFailedToLoad: (error) => null, + ), ); MethodCall methodCall = MethodCall('onAdEvent', { @@ -1622,13 +1546,16 @@ void main() { 'eventName': 'onAdLoaded', }); - ByteData data = - instanceManager.channel.codec.encodeMethodCall(methodCall); + ByteData data = instanceManager.channel.codec.encodeMethodCall( + methodCall, + ); await handlePlatformMessage(data); // Handle adDidRecordClick method call - methodCall = MethodCall('onAdEvent', - {'adId': adId, 'eventName': eventName}); + methodCall = MethodCall('onAdEvent', { + 'adId': adId, + 'eventName': eventName, + }); data = instanceManager.channel.codec.encodeMethodCall(methodCall); await handlePlatformMessage(data); diff --git a/packages/google_mobile_ads/test/admanager_banner_ad_test.dart b/packages/google_mobile_ads/test/admanager_banner_ad_test.dart index 804f9f341..b2fdaa14f 100644 --- a/packages/google_mobile_ads/test/admanager_banner_ad_test.dart +++ b/packages/google_mobile_ads/test/admanager_banner_ad_test.dart @@ -30,22 +30,24 @@ void main() { setUp(() async { log.clear(); - instanceManager = - AdInstanceManager('plugins.flutter.io/google_mobile_ads'); + instanceManager = AdInstanceManager( + 'plugins.flutter.io/google_mobile_ads', + ); TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger - .setMockMethodCallHandler(instanceManager.channel, - (MethodCall methodCall) async { - log.add(methodCall); - switch (methodCall.method) { - case 'loadAdManagerBannerAd': - case 'disposeAd': - return Future.value(); - default: - assert(false); - return null; - } - }); + .setMockMethodCallHandler(instanceManager.channel, ( + MethodCall methodCall, + ) async { + log.add(methodCall); + switch (methodCall.method) { + case 'loadAdManagerBannerAd': + case 'disposeAd': + return Future.value(); + default: + assert(false); + return null; + } + }); }); test('android loaded events', () async { @@ -82,12 +84,15 @@ void main() { await bannerAd.load(); expect(log, [ - isMethodCall('loadAdManagerBannerAd', arguments: { - 'adId': 0, - 'adUnitId': 'ad-unit', - 'request': request, - 'sizes': [AdSize.banner], - }), + isMethodCall( + 'loadAdManagerBannerAd', + arguments: { + 'adId': 0, + 'adUnitId': 'ad-unit', + 'request': request, + 'sizes': [AdSize.banner], + }, + ), ]); // Simulate load callback @@ -120,7 +125,11 @@ void main() { 'currencyCode': 'USD', }; await TestUtil.sendAdEvent( - 0, 'onPaidEvent', instanceManager, paidEventArgs); + 0, + 'onPaidEvent', + instanceManager, + paidEventArgs, + ); List paidEventCallback = await paidEvent.future; expect(paidEventCallback[0], bannerAd); expect(paidEventCallback[1], 1.2345); @@ -137,8 +146,9 @@ void main() { adUnitId: 'test-ad-unit', sizes: [AdSize.banner], listener: AdManagerBannerAdListener( - onAdFailedToLoad: (Ad ad, LoadAdError error) => - resultsCompleter.complete([ad, error])), + onAdFailedToLoad: (Ad ad, LoadAdError error) => + resultsCompleter.complete([ad, error]), + ), request: AdManagerAdRequest(), ); @@ -166,16 +176,20 @@ void main() { final MethodCall methodCall = MethodCall('onAdEvent', { - 'adId': adId, - 'eventName': 'onAdFailedToLoad', - 'loadAdError': LoadAdError(1, 'domain', 'message', responseInfo), - }); + 'adId': adId, + 'eventName': 'onAdFailedToLoad', + 'loadAdError': LoadAdError(1, 'domain', 'message', responseInfo), + }); - final ByteData data = - instanceManager.channel.codec.encodeMethodCall(methodCall); + final ByteData data = instanceManager.channel.codec.encodeMethodCall( + methodCall, + ); await TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger .handlePlatformMessage( - 'plugins.flutter.io/google_mobile_ads', data, (data) {}); + 'plugins.flutter.io/google_mobile_ads', + data, + (data) {}, + ); final List results = await resultsCompleter.future; expect(results[0], banner); @@ -183,10 +197,14 @@ void main() { expect(results[1].domain, 'domain'); expect(results[1].message, 'message'); expect(results[1].responseInfo.responseId, responseInfo.responseId); - expect(results[1].responseInfo.mediationAdapterClassName, - responseInfo.mediationAdapterClassName); - expect(results[1].responseInfo.responseExtras, - responseInfo.responseExtras); + expect( + results[1].responseInfo.mediationAdapterClassName, + responseInfo.mediationAdapterClassName, + ); + expect( + results[1].responseInfo.responseExtras, + responseInfo.responseExtras, + ); List responses = results[1].responseInfo.adapterResponses; expect(responses.first.adapterClassName, 'adapter-name'); @@ -241,12 +259,15 @@ void main() { await bannerAd.load(); expect(log, [ - isMethodCall('loadAdManagerBannerAd', arguments: { - 'adId': 0, - 'adUnitId': 'ad-unit', - 'request': request, - 'sizes': [AdSize.banner], - }), + isMethodCall( + 'loadAdManagerBannerAd', + arguments: { + 'adId': 0, + 'adUnitId': 'ad-unit', + 'request': request, + 'sizes': [AdSize.banner], + }, + ), ]); // Simulate load callback @@ -265,15 +286,24 @@ void main() { expect(await clicked.future, bannerAd); await TestUtil.sendAdEvent( - 0, 'onBannerWillPresentScreen', instanceManager); + 0, + 'onBannerWillPresentScreen', + instanceManager, + ); expect(await opened.future, bannerAd); await TestUtil.sendAdEvent( - 0, 'onBannerDidDismissScreen', instanceManager); + 0, + 'onBannerDidDismissScreen', + instanceManager, + ); expect(await closed.future, bannerAd); await TestUtil.sendAdEvent( - 0, 'onBannerWillDismissScreen', instanceManager); + 0, + 'onBannerWillDismissScreen', + instanceManager, + ); expect(await willDismiss.future, bannerAd); const paidEventArgs = { @@ -282,7 +312,11 @@ void main() { 'currencyCode': 'USD', }; await TestUtil.sendAdEvent( - 0, 'onPaidEvent', instanceManager, paidEventArgs); + 0, + 'onPaidEvent', + instanceManager, + paidEventArgs, + ); List paidEventCallback = await paidEvent.future; expect(paidEventCallback[0], bannerAd); expect(paidEventCallback[1], 1.2345); @@ -302,9 +336,7 @@ void main() { log.clear(); await banner.dispose(); expect(log, [ - isMethodCall('disposeAd', arguments: { - 'adId': 0, - }) + isMethodCall('disposeAd', arguments: {'adId': 0}), ]); expect(instanceManager.adFor(0), isNull); diff --git a/packages/google_mobile_ads/test/app_open_test.dart b/packages/google_mobile_ads/test/app_open_test.dart index 5c6ac2f00..9b38f01b6 100644 --- a/packages/google_mobile_ads/test/app_open_test.dart +++ b/packages/google_mobile_ads/test/app_open_test.dart @@ -30,22 +30,24 @@ void main() { setUp(() async { log.clear(); - instanceManager = - AdInstanceManager('plugins.flutter.io/google_mobile_ads'); + instanceManager = AdInstanceManager( + 'plugins.flutter.io/google_mobile_ads', + ); TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger - .setMockMethodCallHandler(instanceManager.channel, - (MethodCall methodCall) async { - log.add(methodCall); - switch (methodCall.method) { - case 'loadAppOpenAd': - case 'showAdWithoutView': - case 'disposeAd': - return Future.value(); - default: - assert(false); - return null; - } - }); + .setMockMethodCallHandler(instanceManager.channel, ( + MethodCall methodCall, + ) async { + log.add(methodCall); + switch (methodCall.method) { + case 'loadAppOpenAd': + case 'showAdWithoutView': + case 'disposeAd': + return Future.value(); + default: + assert(false); + return null; + } + }); }); test('load show android', () async { @@ -56,21 +58,23 @@ void main() { adUnitId: 'test-ad-unit', request: request, adLoadCallback: AppOpenAdLoadCallback( - onAdLoaded: (ad) { - appOpenAd = ad; - }, - onAdFailedToLoad: (error) {}), - orientation: AppOpenAd.orientationPortrait, + onAdLoaded: (ad) { + appOpenAd = ad; + }, + onAdFailedToLoad: (error) {}, + ), ); expect(log, [ - isMethodCall('loadAppOpenAd', arguments: { - 'adId': 0, - 'adUnitId': 'test-ad-unit', - 'request': request, - 'adManagerRequest': null, - 'orientation': AppOpenAd.orientationPortrait - }), + isMethodCall( + 'loadAppOpenAd', + arguments: { + 'adId': 0, + 'adUnitId': 'test-ad-unit', + 'request': request, + 'adManagerRequest': null, + }, + ), ]); // Simulate load callback @@ -86,9 +90,10 @@ void main() { // Show the ad and verify method call. await appOpenAd!.show(); expect(log, [ - isMethodCall('showAdWithoutView', arguments: { - 'adId': 0, - }) + isMethodCall( + 'showAdWithoutView', + arguments: {'adId': 0}, + ), ]); // Check that full screen events are passed correctly. @@ -114,15 +119,25 @@ void main() { expect(await clickedCompleter.future, appOpenAd); await TestUtil.sendAdEvent( - 0, 'onAdShowedFullScreenContent', instanceManager); + 0, + 'onAdShowedFullScreenContent', + instanceManager, + ); expect(await showedCompleter.future, appOpenAd); await TestUtil.sendAdEvent( - 0, 'onAdDismissedFullScreenContent', instanceManager); + 0, + 'onAdDismissedFullScreenContent', + instanceManager, + ); expect(await dismissedCompleter.future, appOpenAd); - await TestUtil.sendAdEvent(0, 'onFailedToShowFullScreenContent', - instanceManager, {'error': AdError(1, 'domain', 'message')}); + await TestUtil.sendAdEvent( + 0, + 'onFailedToShowFullScreenContent', + instanceManager, + {'error': AdError(1, 'domain', 'message')}, + ); expect(await failedToShowCompleter.future, appOpenAd); // Check paid event callback @@ -137,7 +152,11 @@ void main() { 'currencyCode': 'USD', }; await TestUtil.sendAdEvent( - 0, 'onPaidEvent', instanceManager, paidEventArgs); + 0, + 'onPaidEvent', + instanceManager, + paidEventArgs, + ); List paidEventCallback = await paidEventCompleter.future; expect(paidEventCallback[0], appOpenAd); expect(paidEventCallback[1], 1.2345); @@ -154,21 +173,23 @@ void main() { adUnitId: 'test-ad-unit', request: request, adLoadCallback: AppOpenAdLoadCallback( - onAdLoaded: (ad) { - appOpenAd = ad; - }, - onAdFailedToLoad: (error) {}), - orientation: AppOpenAd.orientationLandscapeLeft, + onAdLoaded: (ad) { + appOpenAd = ad; + }, + onAdFailedToLoad: (error) {}, + ), ); expect(log, [ - isMethodCall('loadAppOpenAd', arguments: { - 'adId': 0, - 'adUnitId': 'test-ad-unit', - 'request': request, - 'adManagerRequest': null, - 'orientation': AppOpenAd.orientationLandscapeLeft - }), + isMethodCall( + 'loadAppOpenAd', + arguments: { + 'adId': 0, + 'adUnitId': 'test-ad-unit', + 'request': request, + 'adManagerRequest': null, + }, + ), ]); // Simulate load callback @@ -184,9 +205,10 @@ void main() { // Show the ad and verify method call. await appOpenAd!.show(); expect(log, [ - isMethodCall('showAdWithoutView', arguments: { - 'adId': 0, - }) + isMethodCall( + 'showAdWithoutView', + arguments: {'adId': 0}, + ), ]); // Check that full screen events are passed correctly. @@ -215,22 +237,32 @@ void main() { expect(await clickedCompleter.future, appOpenAd); await TestUtil.sendAdEvent( - 0, 'adWillPresentFullScreenContent', instanceManager); + 0, + 'adWillPresentFullScreenContent', + instanceManager, + ); expect(await showedCompleter.future, appOpenAd); await TestUtil.sendAdEvent( - 0, 'adDidDismissFullScreenContent', instanceManager); + 0, + 'adDidDismissFullScreenContent', + instanceManager, + ); expect(await dismissedCompleter.future, appOpenAd); await TestUtil.sendAdEvent( - 0, 'adWillDismissFullScreenContent', instanceManager); + 0, + 'adWillDismissFullScreenContent', + instanceManager, + ); expect(await dismissedCompleter.future, appOpenAd); await TestUtil.sendAdEvent( - 0, - 'didFailToPresentFullScreenContentWithError', - instanceManager, - {'error': AdError(1, 'domain', 'message')}); + 0, + 'didFailToPresentFullScreenContentWithError', + instanceManager, + {'error': AdError(1, 'domain', 'message')}, + ); expect(await failedToShowCompleter.future, appOpenAd); // Check paid event callback @@ -245,7 +277,11 @@ void main() { 'currencyCode': 'USD', }; await TestUtil.sendAdEvent( - 0, 'onPaidEvent', instanceManager, paidEventArgs); + 0, + 'onPaidEvent', + instanceManager, + paidEventArgs, + ); List paidEventCallback = await paidEventCompleter.future; expect(paidEventCallback[0], appOpenAd); expect(paidEventCallback[1], 1.2345); diff --git a/packages/google_mobile_ads/test/banner_ad_test.dart b/packages/google_mobile_ads/test/banner_ad_test.dart index 06d364395..c54b87fb0 100644 --- a/packages/google_mobile_ads/test/banner_ad_test.dart +++ b/packages/google_mobile_ads/test/banner_ad_test.dart @@ -30,21 +30,23 @@ void main() { setUp(() async { log.clear(); - instanceManager = - AdInstanceManager('plugins.flutter.io/google_mobile_ads'); + instanceManager = AdInstanceManager( + 'plugins.flutter.io/google_mobile_ads', + ); TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger - .setMockMethodCallHandler(instanceManager.channel, - (MethodCall methodCall) async { - log.add(methodCall); - switch (methodCall.method) { - case 'loadBannerAd': - case 'disposeAd': - return Future.value(); - default: - assert(false); - return null; - } - }); + .setMockMethodCallHandler(instanceManager.channel, ( + MethodCall methodCall, + ) async { + log.add(methodCall); + switch (methodCall.method) { + case 'loadBannerAd': + case 'disposeAd': + return Future.value(); + default: + assert(false); + return null; + } + }); }); test('android loaded events', () async { @@ -81,12 +83,15 @@ void main() { await bannerAd.load(); expect(log, [ - isMethodCall('loadBannerAd', arguments: { - 'adId': 0, - 'adUnitId': 'ad-unit', - 'request': request, - 'size': AdSize.banner, - }), + isMethodCall( + 'loadBannerAd', + arguments: { + 'adId': 0, + 'adUnitId': 'ad-unit', + 'request': request, + 'size': AdSize.banner, + }, + ), ]); // Simulate load callback @@ -118,7 +123,11 @@ void main() { 'currencyCode': 'USD', }; await TestUtil.sendAdEvent( - 0, 'onPaidEvent', instanceManager, paidEventArgs); + 0, + 'onPaidEvent', + instanceManager, + paidEventArgs, + ); List paidEventCallback = await paidEvent.future; expect(paidEventCallback[0], bannerAd); expect(paidEventCallback[1], 1.2345); @@ -135,8 +144,9 @@ void main() { adUnitId: 'test-ad-unit', size: AdSize.banner, listener: BannerAdListener( - onAdFailedToLoad: (Ad ad, LoadAdError error) => - resultsCompleter.complete([ad, error])), + onAdFailedToLoad: (Ad ad, LoadAdError error) => + resultsCompleter.complete([ad, error]), + ), request: AdRequest(), ); @@ -164,16 +174,20 @@ void main() { final MethodCall methodCall = MethodCall('onAdEvent', { - 'adId': adId, - 'eventName': 'onAdFailedToLoad', - 'loadAdError': LoadAdError(1, 'domain', 'message', responseInfo), - }); + 'adId': adId, + 'eventName': 'onAdFailedToLoad', + 'loadAdError': LoadAdError(1, 'domain', 'message', responseInfo), + }); - final ByteData data = - instanceManager.channel.codec.encodeMethodCall(methodCall); + final ByteData data = instanceManager.channel.codec.encodeMethodCall( + methodCall, + ); await TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger .handlePlatformMessage( - 'plugins.flutter.io/google_mobile_ads', data, (data) {}); + 'plugins.flutter.io/google_mobile_ads', + data, + (data) {}, + ); final List results = await resultsCompleter.future; expect(results[0], banner); @@ -181,10 +195,14 @@ void main() { expect(results[1].domain, 'domain'); expect(results[1].message, 'message'); expect(results[1].responseInfo.responseId, responseInfo.responseId); - expect(results[1].responseInfo.mediationAdapterClassName, - responseInfo.mediationAdapterClassName); - expect(results[1].responseInfo.responseExtras, - responseInfo.responseExtras); + expect( + results[1].responseInfo.mediationAdapterClassName, + responseInfo.mediationAdapterClassName, + ); + expect( + results[1].responseInfo.responseExtras, + responseInfo.responseExtras, + ); List responses = results[1].responseInfo.adapterResponses; expect(responses.first.adapterClassName, 'adapter-name'); @@ -239,12 +257,15 @@ void main() { await bannerAd.load(); expect(log, [ - isMethodCall('loadBannerAd', arguments: { - 'adId': 0, - 'adUnitId': 'ad-unit', - 'request': request, - 'size': AdSize.banner, - }), + isMethodCall( + 'loadBannerAd', + arguments: { + 'adId': 0, + 'adUnitId': 'ad-unit', + 'request': request, + 'size': AdSize.banner, + }, + ), ]); // Simulate load callback @@ -262,15 +283,24 @@ void main() { expect(await clicked.future, bannerAd); await TestUtil.sendAdEvent( - 0, 'onBannerWillPresentScreen', instanceManager); + 0, + 'onBannerWillPresentScreen', + instanceManager, + ); expect(await opened.future, bannerAd); await TestUtil.sendAdEvent( - 0, 'onBannerDidDismissScreen', instanceManager); + 0, + 'onBannerDidDismissScreen', + instanceManager, + ); expect(await closed.future, bannerAd); await TestUtil.sendAdEvent( - 0, 'onBannerWillDismissScreen', instanceManager); + 0, + 'onBannerWillDismissScreen', + instanceManager, + ); expect(await willDismiss.future, bannerAd); const paidEventArgs = { @@ -279,7 +309,11 @@ void main() { 'currencyCode': 'USD', }; await TestUtil.sendAdEvent( - 0, 'onPaidEvent', instanceManager, paidEventArgs); + 0, + 'onPaidEvent', + instanceManager, + paidEventArgs, + ); List paidEventCallback = await paidEvent.future; expect(paidEventCallback[0], bannerAd); expect(paidEventCallback[1], 1.2345); @@ -299,9 +333,7 @@ void main() { log.clear(); await banner.dispose(); expect(log, [ - isMethodCall('disposeAd', arguments: { - 'adId': 0, - }) + isMethodCall('disposeAd', arguments: {'adId': 0}), ]); expect(instanceManager.adFor(0), isNull); @@ -321,5 +353,28 @@ void main() { expect(instanceManager.adFor(0), isNull); expect(instanceManager.adIdFor(banner), isNull); }); + + test('isMounted returns correct value', () { + final BannerAd banner = BannerAd( + adUnitId: 'test-ad-unit', + size: AdSize.banner, + listener: BannerAdListener(), + request: AdRequest(), + ); + + expect(instanceManager.adIdFor(banner), isNull); + expect(banner.isMounted, isFalse); + + banner.load(); + final int? adId = instanceManager.adIdFor(banner); + expect(adId, isNotNull); + expect(banner.isMounted, isFalse); + + instanceManager.mountWidgetAdId(adId!); + expect(banner.isMounted, isTrue); + + instanceManager.unmountWidgetAdId(adId); + expect(banner.isMounted, isFalse); + }); }); } diff --git a/packages/google_mobile_ads/test/fluid_ad_test.dart b/packages/google_mobile_ads/test/fluid_ad_test.dart index 22727b162..c1e540318 100644 --- a/packages/google_mobile_ads/test/fluid_ad_test.dart +++ b/packages/google_mobile_ads/test/fluid_ad_test.dart @@ -19,7 +19,6 @@ import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:google_mobile_ads/google_mobile_ads.dart'; import 'package:google_mobile_ads/src/ad_instance_manager.dart'; -import 'package:pedantic/pedantic.dart'; import 'test_util.dart'; // ignore_for_file: deprecated_member_use_from_same_package @@ -31,21 +30,23 @@ void main() { setUp(() async { log.clear(); - instanceManager = - AdInstanceManager('plugins.flutter.io/google_mobile_ads'); + instanceManager = AdInstanceManager( + 'plugins.flutter.io/google_mobile_ads', + ); TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger - .setMockMethodCallHandler(instanceManager.channel, - (MethodCall methodCall) async { - log.add(methodCall); - switch (methodCall.method) { - case 'loadFluidAd': - case 'disposeAd': - return Future.value(); - default: - assert(false); - return null; - } - }); + .setMockMethodCallHandler(instanceManager.channel, ( + MethodCall methodCall, + ) async { + log.add(methodCall); + switch (methodCall.method) { + case 'loadFluidAd': + case 'disposeAd': + return Future.value(); + default: + assert(false); + return null; + } + }); }); test('load android with callbacks', () async { @@ -85,12 +86,15 @@ void main() { await fluidAd.load(); expect(log, [ - isMethodCall('loadFluidAd', arguments: { - 'adId': 0, - 'adUnitId': 'testId', - 'sizes': [FluidAdSize()], - 'request': AdManagerAdRequest(), - }) + isMethodCall( + 'loadFluidAd', + arguments: { + 'adId': 0, + 'adUnitId': 'testId', + 'sizes': [FluidAdSize()], + 'request': AdManagerAdRequest(), + }, + ), ]); await TestUtil.sendAdEvent(0, 'onAdLoaded', instanceManager); @@ -109,28 +113,46 @@ void main() { const heightChangedArgs = {'height': 25}; await TestUtil.sendAdEvent( - 0, 'onFluidAdHeightChanged', instanceManager, heightChangedArgs); + 0, + 'onFluidAdHeightChanged', + instanceManager, + heightChangedArgs, + ); expect(await heightChangedCompleter.future, [fluidAd, 25]); LoadAdError error = LoadAdError(1, 'domain', 'message', null); var errorArgs = {'loadAdError': error}; await TestUtil.sendAdEvent( - 0, 'onAdFailedToLoad', instanceManager, errorArgs); + 0, + 'onAdFailedToLoad', + instanceManager, + errorArgs, + ); List adAndError = await failedToLoadCompleter.future; expect(adAndError[0], loadedAd); expect(adAndError[1].toString(), error.toString()); const appEventArgs = {'name': 'name', 'data': '1234'}; await TestUtil.sendAdEvent( - 0, 'onAppEvent', instanceManager, appEventArgs); + 0, + 'onAppEvent', + instanceManager, + appEventArgs, + ); expect(await appEventCompleter.future, [fluidAd, 'name', '1234']); // will dismiss is iOS only event. var willDismissCompleted = false; - unawaited(willDismissCompleter.future - .whenComplete(() => willDismissCompleted = true)); + unawaited( + willDismissCompleter.future.whenComplete( + () => willDismissCompleted = true, + ), + ); await TestUtil.sendAdEvent( - 0, 'onBannerWillDismissScreen', instanceManager); + 0, + 'onBannerWillDismissScreen', + instanceManager, + ); expect(willDismissCompleted, false); }); @@ -171,12 +193,15 @@ void main() { await fluidAd.load(); expect(log, [ - isMethodCall('loadFluidAd', arguments: { - 'adId': 0, - 'adUnitId': 'testId', - 'sizes': [FluidAdSize()], - 'request': AdManagerAdRequest(), - }) + isMethodCall( + 'loadFluidAd', + arguments: { + 'adId': 0, + 'adUnitId': 'testId', + 'sizes': [FluidAdSize()], + 'request': AdManagerAdRequest(), + }, + ), ]); await TestUtil.sendAdEvent(0, 'onAdLoaded', instanceManager); @@ -188,34 +213,55 @@ void main() { expect(await impressionCompleter.future, loadedAd); await TestUtil.sendAdEvent( - 0, 'onBannerWillPresentScreen', instanceManager); + 0, + 'onBannerWillPresentScreen', + instanceManager, + ); expect(await openedCompleter.future, loadedAd); await TestUtil.sendAdEvent( - 0, 'onBannerDidDismissScreen', instanceManager); + 0, + 'onBannerDidDismissScreen', + instanceManager, + ); expect(await closedCompleter.future, loadedAd); const heightChangedArgs = {'height': 25}; await TestUtil.sendAdEvent( - 0, 'onFluidAdHeightChanged', instanceManager, heightChangedArgs); + 0, + 'onFluidAdHeightChanged', + instanceManager, + heightChangedArgs, + ); expect(await heightChangedCompleter.future, [fluidAd, 25]); LoadAdError error = LoadAdError(1, 'domain', 'message', null); var errorArgs = {'loadAdError': error}; await TestUtil.sendAdEvent( - 0, 'onAdFailedToLoad', instanceManager, errorArgs); + 0, + 'onAdFailedToLoad', + instanceManager, + errorArgs, + ); List adAndError = await failedToLoadCompleter.future; expect(adAndError[0], loadedAd); expect(adAndError[1].toString(), error.toString()); const appEventArgs = {'name': 'name', 'data': '1234'}; await TestUtil.sendAdEvent( - 0, 'onAppEvent', instanceManager, appEventArgs); + 0, + 'onAppEvent', + instanceManager, + appEventArgs, + ); expect(await appEventCompleter.future, [fluidAd, 'name', '1234']); // will dismiss is iOS only event. await TestUtil.sendAdEvent( - 0, 'onBannerWillDismissScreen', instanceManager); + 0, + 'onBannerWillDismissScreen', + instanceManager, + ); expect(await willDismissCompleter.future, fluidAd); }); }); diff --git a/packages/google_mobile_ads/test/mobile_ads_test.dart b/packages/google_mobile_ads/test/mobile_ads_test.dart index 9addf96b7..ab7eddad7 100644 --- a/packages/google_mobile_ads/test/mobile_ads_test.dart +++ b/packages/google_mobile_ads/test/mobile_ads_test.dart @@ -40,57 +40,62 @@ void main() { }); setUp(() async { - instanceManager = - AdInstanceManager('plugins.flutter.io/google_mobile_ads'); + instanceManager = AdInstanceManager( + 'plugins.flutter.io/google_mobile_ads', + ); log.clear(); TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger .setMockMethodCallHandler( - MethodChannel( - 'plugins.flutter.io/google_mobile_ads', - StandardMethodCodec(AdMessageCodec()), - ), (MethodCall methodCall) async { - log.add(methodCall); - switch (methodCall.method) { - case 'MobileAds#initialize': - return InitializationStatus({ - 'aName': AdapterStatus( - AdapterInitializationState.notReady, - 'desc', - 0, - ), - }); - case '_init': - case 'MobileAds#setSameAppKeyEnabled': - case 'MobileAds#setAppMuted': - case 'MobileAds#setAppVolume': - case 'MobileAds#disableSDKCrashReporting': - case 'MobileAds#disableMediationInitialization': - return null; - case 'MobileAds#getVersionString': - return Future.value('Test-SDK-Version'); - case 'MobileAds#updateRequestConfiguration': - return null; - case 'MobileAds#registerWebView': - return null; - case 'MobileAds#getRequestConfiguration': - return RequestConfiguration( - maxAdContentRating: MaxAdContentRating.ma, - tagForChildDirectedTreatment: TagForChildDirectedTreatment.yes, - tagForUnderAgeOfConsent: TagForUnderAgeOfConsent.no, - testDeviceIds: ['test-device-id'], - ); - case 'AdSize#getAnchoredAdaptiveBannerAdSize': - return null; - default: - assert(false); - return null; - } - }); + MethodChannel( + 'plugins.flutter.io/google_mobile_ads', + StandardMethodCodec(AdMessageCodec()), + ), + (MethodCall methodCall) async { + log.add(methodCall); + switch (methodCall.method) { + case 'MobileAds#initialize': + return InitializationStatus({ + 'aName': AdapterStatus( + AdapterInitializationState.notReady, + 'desc', + 0, + ), + }); + case '_init': + case 'MobileAds#setSameAppKeyEnabled': + case 'MobileAds#setAppMuted': + case 'MobileAds#setAppVolume': + case 'MobileAds#disableSDKCrashReporting': + case 'MobileAds#disableMediationInitialization': + return null; + case 'MobileAds#getVersionString': + return Future.value('Test-SDK-Version'); + case 'MobileAds#updateRequestConfiguration': + return null; + case 'MobileAds#registerWebView': + return null; + case 'MobileAds#getRequestConfiguration': + return RequestConfiguration( + maxAdContentRating: MaxAdContentRating.ma, + tagForChildDirectedTreatment: + TagForChildDirectedTreatment.yes, + tagForUnderAgeOfConsent: TagForUnderAgeOfConsent.no, + testDeviceIds: ['test-device-id'], + ); + case 'AdSize#getAnchoredAdaptiveBannerAdSize': + return null; + default: + assert(false); + return null; + } + }, + ); }); test('encode/decode $AdapterInitializationState', () { - final ByteData byteData = - codec.encodeMessage(AdapterInitializationState.ready)!; + final ByteData byteData = codec.encodeMessage( + AdapterInitializationState.ready, + )!; final AdapterInitializationState result = codec.decodeMessage(byteData); expect(result, AdapterInitializationState.ready); @@ -98,11 +103,9 @@ void main() { test('encode/decode $AdapterStatus', () { debugDefaultTargetPlatformOverride = TargetPlatform.android; - final ByteData byteData = codec.encodeMessage(AdapterStatus( - AdapterInitializationState.notReady, - 'describe', - 23, - ))!; + final ByteData byteData = codec.encodeMessage( + AdapterStatus(AdapterInitializationState.notReady, 'describe', 23), + )!; AdapterStatus result = codec.decodeMessage(byteData); expect(result.state, AdapterInitializationState.notReady); @@ -132,14 +135,15 @@ void main() { }); test('encode/decode $InitializationStatus', () { - final ByteData byteData = - codec.encodeMessage(InitializationStatus({ - 'adMediation': AdapterStatus( - AdapterInitializationState.ready, - 'aDescription', - 0, - ), - }))!; + final ByteData byteData = codec.encodeMessage( + InitializationStatus({ + 'adMediation': AdapterStatus( + AdapterInitializationState.ready, + 'aDescription', + 0, + ), + }), + )!; final InitializationStatus result = codec.decodeMessage(byteData); expect(result.adapterStatuses, hasLength(1)); @@ -154,7 +158,7 @@ void main() { expect(log, [ isMethodCall('_init', arguments: null), - isMethodCall('MobileAds#initialize', arguments: null) + isMethodCall('MobileAds#initialize', arguments: null), ]); expect(result.adapterStatuses, hasLength(1)); @@ -167,8 +171,9 @@ void main() { test('$MobileAds.registerWebView', () async { instanceManager = MockAdInstanceManager(); final webView = MockWebViewController(); - when(instanceManager.registerWebView(webView)) - .thenAnswer((realInvocation) => Future.value()); + when( + instanceManager.registerWebView(webView), + ).thenAnswer((realInvocation) => Future.value()); await MobileAds.instance.registerWebView(webView); verify(instanceManager.registerWebView(webView)); @@ -179,13 +184,14 @@ void main() { final mockWebViewControllerUtil = MockWebViewControllerUtil(); when(mockWebViewControllerUtil.webViewIdentifier(any)).thenReturn(1); instanceManager = AdInstanceManager( - 'plugins.flutter.io/google_mobile_ads', - webViewControllerUtil: mockWebViewControllerUtil); + 'plugins.flutter.io/google_mobile_ads', + webViewControllerUtil: mockWebViewControllerUtil, + ); final webView = MockWebViewController(); await MobileAds.instance.registerWebView(webView); expect(log, [ - isMethodCall('MobileAds#registerWebView', arguments: {'webViewId': 1}) + isMethodCall('MobileAds#registerWebView', arguments: {'webViewId': 1}), ]); }); @@ -194,25 +200,28 @@ void main() { final mockWebViewControllerUtil = MockWebViewControllerUtil(); when(mockWebViewControllerUtil.webViewIdentifier(any)).thenReturn(1); instanceManager = AdInstanceManager( - 'plugins.flutter.io/google_mobile_ads', - webViewControllerUtil: mockWebViewControllerUtil); + 'plugins.flutter.io/google_mobile_ads', + webViewControllerUtil: mockWebViewControllerUtil, + ); final webView = MockWebViewController(); await MobileAds.instance.registerWebView(webView); expect(log, [ - isMethodCall('MobileAds#registerWebView', arguments: {'webViewId': 1}) + isMethodCall('MobileAds#registerWebView', arguments: {'webViewId': 1}), ]); }); test('$MobileAds.openAdInspector success', () async { TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger .setMockMethodCallHandler( - MethodChannel( - 'plugins.flutter.io/google_mobile_ads', - StandardMethodCodec(AdMessageCodec()), - ), (MethodCall methodCall) async { - return null; - }); + MethodChannel( + 'plugins.flutter.io/google_mobile_ads', + StandardMethodCodec(AdMessageCodec()), + ), + (MethodCall methodCall) async { + return null; + }, + ); Completer completer = Completer(); MobileAds.instance.openAdInspector((error) { @@ -226,13 +235,18 @@ void main() { test('$MobileAds.openAdInspector error', () async { TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger .setMockMethodCallHandler( - MethodChannel( - 'plugins.flutter.io/google_mobile_ads', - StandardMethodCodec(AdMessageCodec()), - ), (MethodCall methodCall) async { - throw PlatformException( - code: '1', details: 'details', message: 'message'); - }); + MethodChannel( + 'plugins.flutter.io/google_mobile_ads', + StandardMethodCodec(AdMessageCodec()), + ), + (MethodCall methodCall) async { + throw PlatformException( + code: '1', + details: 'details', + message: 'message', + ); + }, + ); Completer completer = Completer(); MobileAds.instance.openAdInspector((error) { @@ -251,17 +265,23 @@ void main() { await MobileAds.instance.setSameAppKeyEnabled(true); expect(log, [ - isMethodCall('MobileAds#setSameAppKeyEnabled', - arguments: {'isEnabled': true}) + isMethodCall( + 'MobileAds#setSameAppKeyEnabled', + arguments: {'isEnabled': true}, + ), ]); await MobileAds.instance.setSameAppKeyEnabled(false); expect(log, [ - isMethodCall('MobileAds#setSameAppKeyEnabled', - arguments: {'isEnabled': true}), - isMethodCall('MobileAds#setSameAppKeyEnabled', - arguments: {'isEnabled': false}) + isMethodCall( + 'MobileAds#setSameAppKeyEnabled', + arguments: {'isEnabled': true}, + ), + isMethodCall( + 'MobileAds#setSameAppKeyEnabled', + arguments: {'isEnabled': false}, + ), ]); }); @@ -277,8 +297,9 @@ void main() { expect(result.shouldReturnUrlsForImageAssets, null); expect(result.videoOptions, null); - byteData = - codec.encodeMessage(NativeAdOptions(videoOptions: VideoOptions()))!; + byteData = codec.encodeMessage( + NativeAdOptions(videoOptions: VideoOptions()), + )!; result = codec.decodeMessage(byteData); expect(result.mediaAspectRatio, null); expect(result.adChoicesPlacement, null); @@ -292,16 +313,17 @@ void main() { test('encode/decode native ad options', () { NativeAdOptions nativeAdOptions = NativeAdOptions( - adChoicesPlacement: AdChoicesPlacement.topRightCorner, - mediaAspectRatio: MediaAspectRatio.unknown, - videoOptions: VideoOptions( - clickToExpandRequested: false, - customControlsRequested: false, - startMuted: false, - ), - requestCustomMuteThisAd: false, - shouldRequestMultipleImages: false, - shouldReturnUrlsForImageAssets: false); + adChoicesPlacement: AdChoicesPlacement.topRightCorner, + mediaAspectRatio: MediaAspectRatio.unknown, + videoOptions: VideoOptions( + clickToExpandRequested: false, + customControlsRequested: false, + startMuted: false, + ), + requestCustomMuteThisAd: false, + shouldRequestMultipleImages: false, + shouldReturnUrlsForImageAssets: false, + ); debugDefaultTargetPlatformOverride = TargetPlatform.android; ByteData byteData = codec.encodeMessage(nativeAdOptions)!; @@ -317,16 +339,17 @@ void main() { expect(result.videoOptions!.clickToExpandRequested, false); nativeAdOptions = NativeAdOptions( - adChoicesPlacement: AdChoicesPlacement.bottomLeftCorner, - mediaAspectRatio: MediaAspectRatio.landscape, - videoOptions: VideoOptions( - clickToExpandRequested: true, - customControlsRequested: true, - startMuted: true, - ), - requestCustomMuteThisAd: true, - shouldRequestMultipleImages: true, - shouldReturnUrlsForImageAssets: true); + adChoicesPlacement: AdChoicesPlacement.bottomLeftCorner, + mediaAspectRatio: MediaAspectRatio.landscape, + videoOptions: VideoOptions( + clickToExpandRequested: true, + customControlsRequested: true, + startMuted: true, + ), + requestCustomMuteThisAd: true, + shouldRequestMultipleImages: true, + shouldReturnUrlsForImageAssets: true, + ); byteData = codec.encodeMessage(nativeAdOptions)!; result = codec.decodeMessage(byteData); @@ -345,14 +368,14 @@ void main() { await MobileAds.instance.setAppMuted(true); expect(log, [ - isMethodCall('MobileAds#setAppMuted', arguments: {'muted': true}) + isMethodCall('MobileAds#setAppMuted', arguments: {'muted': true}), ]); await MobileAds.instance.setAppMuted(false); expect(log, [ isMethodCall('MobileAds#setAppMuted', arguments: {'muted': true}), - isMethodCall('MobileAds#setAppMuted', arguments: {'muted': false}) + isMethodCall('MobileAds#setAppMuted', arguments: {'muted': false}), ]); }); @@ -360,7 +383,7 @@ void main() { await MobileAds.instance.setAppVolume(1.0); expect(log, [ - isMethodCall('MobileAds#setAppVolume', arguments: {'volume': 1.0}) + isMethodCall('MobileAds#setAppVolume', arguments: {'volume': 1.0}), ]); }); @@ -369,7 +392,7 @@ void main() { await MobileAds.instance.disableSDKCrashReporting(); expect(log, [ - isMethodCall('MobileAds#disableSDKCrashReporting', arguments: null) + isMethodCall('MobileAds#disableSDKCrashReporting', arguments: null), ]); }); @@ -377,8 +400,10 @@ void main() { await MobileAds.instance.disableMediationInitialization(); expect(log, [ - isMethodCall('MobileAds#disableMediationInitialization', - arguments: null) + isMethodCall( + 'MobileAds#disableMediationInitialization', + arguments: null, + ), ]); }); @@ -386,7 +411,7 @@ void main() { await MobileAds.instance.getVersionString(); expect(log, [ - isMethodCall('MobileAds#getVersionString', arguments: null) + isMethodCall('MobileAds#getVersionString', arguments: null), ]); }); @@ -394,42 +419,56 @@ void main() { await AdSize.getAnchoredAdaptiveBannerAdSize(Orientation.portrait, 23); expect(log, [ - isMethodCall('AdSize#getAnchoredAdaptiveBannerAdSize', - arguments: {'orientation': 'portrait', 'width': 23}) + isMethodCall( + 'AdSize#getAnchoredAdaptiveBannerAdSize', + arguments: {'orientation': 'portrait', 'width': 23}, + ), ]); await AdSize.getAnchoredAdaptiveBannerAdSize(Orientation.landscape, 34); expect(log, [ - isMethodCall('AdSize#getAnchoredAdaptiveBannerAdSize', - arguments: {'orientation': 'portrait', 'width': 23}), - isMethodCall('AdSize#getAnchoredAdaptiveBannerAdSize', - arguments: {'orientation': 'landscape', 'width': 34}) + isMethodCall( + 'AdSize#getAnchoredAdaptiveBannerAdSize', + arguments: {'orientation': 'portrait', 'width': 23}, + ), + isMethodCall( + 'AdSize#getAnchoredAdaptiveBannerAdSize', + arguments: {'orientation': 'landscape', 'width': 34}, + ), ]); await AdSize.getCurrentOrientationAnchoredAdaptiveBannerAdSize(45); expect(log, [ - isMethodCall('AdSize#getAnchoredAdaptiveBannerAdSize', - arguments: {'orientation': 'portrait', 'width': 23}), - isMethodCall('AdSize#getAnchoredAdaptiveBannerAdSize', - arguments: {'orientation': 'landscape', 'width': 34}), - isMethodCall('AdSize#getAnchoredAdaptiveBannerAdSize', - arguments: {'width': 45}) + isMethodCall( + 'AdSize#getAnchoredAdaptiveBannerAdSize', + arguments: {'orientation': 'portrait', 'width': 23}, + ), + isMethodCall( + 'AdSize#getAnchoredAdaptiveBannerAdSize', + arguments: {'orientation': 'landscape', 'width': 34}, + ), + isMethodCall( + 'AdSize#getAnchoredAdaptiveBannerAdSize', + arguments: {'width': 45}, + ), ]); }); test('encode/decode $MobileAds.getRequestConfiguration', () async { - RequestConfiguration requestConfig = - await MobileAds.instance.getRequestConfiguration(); + RequestConfiguration requestConfig = await MobileAds.instance + .getRequestConfiguration(); debugDefaultTargetPlatformOverride = TargetPlatform.iOS; ByteData byteData = codec.encodeMessage(requestConfig)!; RequestConfiguration result = codec.decodeMessage(byteData); expect(result.maxAdContentRating, MaxAdContentRating.ma); - expect(result.tagForChildDirectedTreatment, - TagForChildDirectedTreatment.yes); + expect( + result.tagForChildDirectedTreatment, + TagForChildDirectedTreatment.yes, + ); expect(result.tagForUnderAgeOfConsent, TagForUnderAgeOfConsent.no); expect(result.testDeviceIds, ['test-device-id']); @@ -438,8 +477,10 @@ void main() { result = codec.decodeMessage(byteData); expect(result.maxAdContentRating, MaxAdContentRating.ma); - expect(result.tagForChildDirectedTreatment, - TagForChildDirectedTreatment.yes); + expect( + result.tagForChildDirectedTreatment, + TagForChildDirectedTreatment.yes, + ); expect(result.tagForUnderAgeOfConsent, TagForUnderAgeOfConsent.no); expect(result.testDeviceIds, ['test-device-id']); }); @@ -455,39 +496,49 @@ void main() { await MobileAds.instance.updateRequestConfiguration(requestConfiguration); debugDefaultTargetPlatformOverride = TargetPlatform.iOS; - RequestConfiguration result = - await MobileAds.instance.getRequestConfiguration(); + RequestConfiguration result = await MobileAds.instance + .getRequestConfiguration(); expect(result.maxAdContentRating, MaxAdContentRating.ma); - expect(result.tagForChildDirectedTreatment, - TagForChildDirectedTreatment.yes); + expect( + result.tagForChildDirectedTreatment, + TagForChildDirectedTreatment.yes, + ); expect(result.tagForUnderAgeOfConsent, TagForUnderAgeOfConsent.no); expect(result.testDeviceIds, ['test-device-id']); expect(log, [ - isMethodCall('MobileAds#updateRequestConfiguration', arguments: { - 'maxAdContentRating': MaxAdContentRating.ma, - 'tagForChildDirectedTreatment': TagForChildDirectedTreatment.yes, - 'testDeviceIds': ['test-device-id'], - 'tagForUnderAgeOfConsent': TagForUnderAgeOfConsent.no, - }), - isMethodCall('MobileAds#getRequestConfiguration', arguments: null) + isMethodCall( + 'MobileAds#updateRequestConfiguration', + arguments: { + 'maxAdContentRating': MaxAdContentRating.ma, + 'tagForChildDirectedTreatment': TagForChildDirectedTreatment.yes, + 'testDeviceIds': ['test-device-id'], + 'tagForUnderAgeOfConsent': TagForUnderAgeOfConsent.no, + }, + ), + isMethodCall('MobileAds#getRequestConfiguration', arguments: null), ]); debugDefaultTargetPlatformOverride = TargetPlatform.android; result = await MobileAds.instance.getRequestConfiguration(); expect(result.maxAdContentRating, MaxAdContentRating.ma); - expect(result.tagForChildDirectedTreatment, - TagForChildDirectedTreatment.yes); + expect( + result.tagForChildDirectedTreatment, + TagForChildDirectedTreatment.yes, + ); expect(result.tagForUnderAgeOfConsent, TagForUnderAgeOfConsent.no); expect(result.testDeviceIds, ['test-device-id']); expect(log, [ - isMethodCall('MobileAds#updateRequestConfiguration', arguments: { - 'maxAdContentRating': MaxAdContentRating.ma, - 'tagForChildDirectedTreatment': TagForChildDirectedTreatment.yes, - 'testDeviceIds': ['test-device-id'], - 'tagForUnderAgeOfConsent': TagForUnderAgeOfConsent.no, - }), + isMethodCall( + 'MobileAds#updateRequestConfiguration', + arguments: { + 'maxAdContentRating': MaxAdContentRating.ma, + 'tagForChildDirectedTreatment': TagForChildDirectedTreatment.yes, + 'testDeviceIds': ['test-device-id'], + 'tagForUnderAgeOfConsent': TagForUnderAgeOfConsent.no, + }, + ), + isMethodCall('MobileAds#getRequestConfiguration', arguments: null), isMethodCall('MobileAds#getRequestConfiguration', arguments: null), - isMethodCall('MobileAds#getRequestConfiguration', arguments: null) ]); }); @@ -516,7 +567,7 @@ void main() { test('encode/decode non-empty native text style', () { final textStyle = NativeTemplateTextStyle( - textColor: Colors.red, + textColor: Colors.red.shade900, backgroundColor: Colors.blue.withAlpha(50), style: NativeTemplateFontStyle.normal, size: 20, @@ -527,8 +578,9 @@ void main() { }); test('encode/decode empty native template style', () { - final templateStyle = - NativeTemplateStyle(templateType: TemplateType.medium); + final templateStyle = NativeTemplateStyle( + templateType: TemplateType.medium, + ); final byteData = codec.encodeMessage(templateStyle); final result = codec.decodeMessage(byteData); expect(result, templateStyle); @@ -537,20 +589,19 @@ void main() { test('encode/decode non-empty native template style, ios', () { debugDefaultTargetPlatformOverride = TargetPlatform.iOS; final templateStyle = NativeTemplateStyle( - templateType: TemplateType.medium, - callToActionTextStyle: NativeTemplateTextStyle(), - primaryTextStyle: NativeTemplateTextStyle( - textColor: Colors.blue, - ), - secondaryTextStyle: NativeTemplateTextStyle( - backgroundColor: Colors.green, - style: NativeTemplateFontStyle.italic, - ), - tertiaryTextStyle: NativeTemplateTextStyle( - size: 15, - ), - mainBackgroundColor: Colors.cyan, - cornerRadius: 12); + templateType: TemplateType.medium, + callToActionTextStyle: NativeTemplateTextStyle(), + primaryTextStyle: NativeTemplateTextStyle( + textColor: Colors.blue.shade900, + ), + secondaryTextStyle: NativeTemplateTextStyle( + backgroundColor: Colors.green.shade900, + style: NativeTemplateFontStyle.italic, + ), + tertiaryTextStyle: NativeTemplateTextStyle(size: 15), + mainBackgroundColor: Colors.cyan.shade900, + cornerRadius: 12, + ); final byteData = codec.encodeMessage(templateStyle); final result = codec.decodeMessage(byteData); expect(result, templateStyle); @@ -559,20 +610,19 @@ void main() { test('encode/decode non-empty native template style, android', () { debugDefaultTargetPlatformOverride = TargetPlatform.android; final templateStyle = NativeTemplateStyle( - templateType: TemplateType.medium, - callToActionTextStyle: NativeTemplateTextStyle(), - primaryTextStyle: NativeTemplateTextStyle( - textColor: Colors.blue, - ), - secondaryTextStyle: NativeTemplateTextStyle( - backgroundColor: Colors.green, - style: NativeTemplateFontStyle.italic, - ), - tertiaryTextStyle: NativeTemplateTextStyle( - size: 15, - ), - mainBackgroundColor: Color.fromARGB(1, 2, 3, 4), - cornerRadius: 12); + templateType: TemplateType.medium, + callToActionTextStyle: NativeTemplateTextStyle(), + primaryTextStyle: NativeTemplateTextStyle( + textColor: Colors.blue.shade900, + ), + secondaryTextStyle: NativeTemplateTextStyle( + backgroundColor: Colors.green.shade900, + style: NativeTemplateFontStyle.italic, + ), + tertiaryTextStyle: NativeTemplateTextStyle(size: 15), + mainBackgroundColor: Color.fromARGB(1, 2, 3, 4), + cornerRadius: 12, + ); final byteData = codec.encodeMessage(templateStyle); final NativeTemplateStyle result = codec.decodeMessage(byteData); // cornerRadius is dropped on android diff --git a/packages/google_mobile_ads/test/mobile_ads_test.mocks.dart b/packages/google_mobile_ads/test/mobile_ads_test.mocks.dart index c10ad472c..95d6bd0b9 100644 --- a/packages/google_mobile_ads/test/mobile_ads_test.mocks.dart +++ b/packages/google_mobile_ads/test/mobile_ads_test.mocks.dart @@ -1,22 +1,23 @@ -// Mocks generated by Mockito 5.3.2 from annotations -// in google_mobile_ads/example/ios/.symlinks/plugins/google_mobile_ads/test/mobile_ads_test.dart. +// Mocks generated by Mockito 5.4.4 from annotations +// in google_mobile_ads/test/mobile_ads_test.dart. // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i10; -import 'dart:typed_data' as _i11; +import 'dart:async' as _i9; +import 'dart:typed_data' as _i10; import 'dart:ui' as _i3; import 'package:flutter/services.dart' as _i4; -import 'package:google_mobile_ads/src/ad_containers.dart' as _i7; -import 'package:google_mobile_ads/src/ad_inspector_containers.dart' as _i14; -import 'package:google_mobile_ads/src/ad_instance_manager.dart' as _i13; +import 'package:google_mobile_ads/src/ad_containers.dart' as _i13; +import 'package:google_mobile_ads/src/ad_inspector_containers.dart' as _i15; +import 'package:google_mobile_ads/src/ad_instance_manager.dart' as _i12; import 'package:google_mobile_ads/src/mobile_ads.dart' as _i6; -import 'package:google_mobile_ads/src/request_configuration.dart' as _i8; +import 'package:google_mobile_ads/src/request_configuration.dart' as _i7; import 'package:google_mobile_ads/src/webview_controller_util.dart' as _i5; import 'package:mockito/mockito.dart' as _i1; -import 'package:webview_flutter/src/navigation_delegate.dart' as _i12; -import 'package:webview_flutter/webview_flutter.dart' as _i9; +import 'package:mockito/src/dummies.dart' as _i14; +import 'package:webview_flutter/src/navigation_delegate.dart' as _i11; +import 'package:webview_flutter/webview_flutter.dart' as _i8; import 'package:webview_flutter_platform_interface/webview_flutter_platform_interface.dart' as _i2; @@ -24,6 +25,8 @@ import 'package:webview_flutter_platform_interface/webview_flutter_platform_inte // ignore_for_file: avoid_redundant_argument_values // ignore_for_file: avoid_setters_without_getters // ignore_for_file: comment_references +// ignore_for_file: deprecated_member_use +// ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member // ignore_for_file: prefer_const_constructors @@ -33,717 +36,701 @@ import 'package:webview_flutter_platform_interface/webview_flutter_platform_inte class _FakePlatformWebViewController_0 extends _i1.SmartFake implements _i2.PlatformWebViewController { - _FakePlatformWebViewController_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakePlatformWebViewController_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeObject_1 extends _i1.SmartFake implements Object { - _FakeObject_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeObject_1(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeOffset_2 extends _i1.SmartFake implements _i3.Offset { - _FakeOffset_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeOffset_2(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeMethodChannel_3 extends _i1.SmartFake implements _i4.MethodChannel { - _FakeMethodChannel_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeMethodChannel_3(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeWebViewControllerUtil_4 extends _i1.SmartFake implements _i5.WebViewControllerUtil { - _FakeWebViewControllerUtil_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWebViewControllerUtil_4(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeInitializationStatus_5 extends _i1.SmartFake implements _i6.InitializationStatus { - _FakeInitializationStatus_5( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeInitializationStatus_5(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } -class _FakeAdSize_6 extends _i1.SmartFake implements _i7.AdSize { - _FakeAdSize_6( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeRequestConfiguration_7 extends _i1.SmartFake - implements _i8.RequestConfiguration { - _FakeRequestConfiguration_7( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); +class _FakeRequestConfiguration_6 extends _i1.SmartFake + implements _i7.RequestConfiguration { + _FakeRequestConfiguration_6(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [WebViewController]. /// /// See the documentation for Mockito's code generation for more information. -class MockWebViewController extends _i1.Mock implements _i9.WebViewController { +class MockWebViewController extends _i1.Mock implements _i8.WebViewController { MockWebViewController() { _i1.throwOnMissingStub(this); } @override - _i2.PlatformWebViewController get platform => (super.noSuchMethod( - Invocation.getter(#platform), - returnValue: _FakePlatformWebViewController_0( - this, - Invocation.getter(#platform), - ), - ) as _i2.PlatformWebViewController); - @override - _i10.Future loadFile(String? absoluteFilePath) => (super.noSuchMethod( - Invocation.method( - #loadFile, - [absoluteFilePath], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - @override - _i10.Future loadFlutterAsset(String? key) => (super.noSuchMethod( - Invocation.method( - #loadFlutterAsset, - [key], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - @override - _i10.Future loadHtmlString( - String? html, { - String? baseUrl, - }) => + _i2.PlatformWebViewController get platform => + (super.noSuchMethod( + Invocation.getter(#platform), + returnValue: _FakePlatformWebViewController_0( + this, + Invocation.getter(#platform), + ), + ) + as _i2.PlatformWebViewController); + + @override + _i9.Future loadFile(String? absoluteFilePath) => + (super.noSuchMethod( + Invocation.method(#loadFile, [absoluteFilePath]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future loadFlutterAsset(String? key) => + (super.noSuchMethod( + Invocation.method(#loadFlutterAsset, [key]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future loadHtmlString(String? html, {String? baseUrl}) => (super.noSuchMethod( - Invocation.method( - #loadHtmlString, - [html], - {#baseUrl: baseUrl}, - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + Invocation.method(#loadHtmlString, [html], {#baseUrl: baseUrl}), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + @override - _i10.Future loadRequest( + _i9.Future loadRequest( Uri? uri, { _i2.LoadRequestMethod? method = _i2.LoadRequestMethod.get, Map? headers = const {}, - _i11.Uint8List? body, + _i10.Uint8List? body, }) => (super.noSuchMethod( - Invocation.method( - #loadRequest, - [uri], - { - #method: method, - #headers: headers, - #body: body, - }, - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - @override - _i10.Future currentUrl() => (super.noSuchMethod( - Invocation.method( - #currentUrl, - [], - ), - returnValue: _i10.Future.value(), - ) as _i10.Future); - @override - _i10.Future canGoBack() => (super.noSuchMethod( - Invocation.method( - #canGoBack, - [], - ), - returnValue: _i10.Future.value(false), - ) as _i10.Future); - @override - _i10.Future canGoForward() => (super.noSuchMethod( - Invocation.method( - #canGoForward, - [], - ), - returnValue: _i10.Future.value(false), - ) as _i10.Future); - @override - _i10.Future goBack() => (super.noSuchMethod( - Invocation.method( - #goBack, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - @override - _i10.Future goForward() => (super.noSuchMethod( - Invocation.method( - #goForward, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - @override - _i10.Future reload() => (super.noSuchMethod( - Invocation.method( - #reload, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - @override - _i10.Future setNavigationDelegate(_i12.NavigationDelegate? delegate) => - (super.noSuchMethod( - Invocation.method( - #setNavigationDelegate, - [delegate], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - @override - _i10.Future clearCache() => (super.noSuchMethod( - Invocation.method( - #clearCache, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - @override - _i10.Future clearLocalStorage() => (super.noSuchMethod( - Invocation.method( - #clearLocalStorage, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - @override - _i10.Future runJavaScript(String? javaScript) => (super.noSuchMethod( - Invocation.method( - #runJavaScript, - [javaScript], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - @override - _i10.Future runJavaScriptReturningResult(String? javaScript) => - (super.noSuchMethod( - Invocation.method( - #runJavaScriptReturningResult, - [javaScript], - ), - returnValue: _i10.Future.value(_FakeObject_1( - this, - Invocation.method( - #runJavaScriptReturningResult, - [javaScript], - ), - )), - ) as _i10.Future); - @override - _i10.Future addJavaScriptChannel( + Invocation.method( + #loadRequest, + [uri], + {#method: method, #headers: headers, #body: body}, + ), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future currentUrl() => + (super.noSuchMethod( + Invocation.method(#currentUrl, []), + returnValue: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future canGoBack() => + (super.noSuchMethod( + Invocation.method(#canGoBack, []), + returnValue: _i9.Future.value(false), + ) + as _i9.Future); + + @override + _i9.Future canGoForward() => + (super.noSuchMethod( + Invocation.method(#canGoForward, []), + returnValue: _i9.Future.value(false), + ) + as _i9.Future); + + @override + _i9.Future goBack() => + (super.noSuchMethod( + Invocation.method(#goBack, []), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future goForward() => + (super.noSuchMethod( + Invocation.method(#goForward, []), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future reload() => + (super.noSuchMethod( + Invocation.method(#reload, []), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future setNavigationDelegate(_i11.NavigationDelegate? delegate) => + (super.noSuchMethod( + Invocation.method(#setNavigationDelegate, [delegate]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future clearCache() => + (super.noSuchMethod( + Invocation.method(#clearCache, []), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future clearLocalStorage() => + (super.noSuchMethod( + Invocation.method(#clearLocalStorage, []), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future runJavaScript(String? javaScript) => + (super.noSuchMethod( + Invocation.method(#runJavaScript, [javaScript]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future runJavaScriptReturningResult(String? javaScript) => + (super.noSuchMethod( + Invocation.method(#runJavaScriptReturningResult, [javaScript]), + returnValue: _i9.Future.value( + _FakeObject_1( + this, + Invocation.method(#runJavaScriptReturningResult, [javaScript]), + ), + ), + ) + as _i9.Future); + + @override + _i9.Future addJavaScriptChannel( String? name, { required void Function(_i2.JavaScriptMessage)? onMessageReceived, }) => (super.noSuchMethod( - Invocation.method( - #addJavaScriptChannel, - [name], - {#onMessageReceived: onMessageReceived}, - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - @override - _i10.Future removeJavaScriptChannel(String? javaScriptChannelName) => - (super.noSuchMethod( - Invocation.method( - #removeJavaScriptChannel, - [javaScriptChannelName], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - @override - _i10.Future getTitle() => (super.noSuchMethod( - Invocation.method( - #getTitle, - [], - ), - returnValue: _i10.Future.value(), - ) as _i10.Future); - @override - _i10.Future scrollTo( - int? x, - int? y, + Invocation.method( + #addJavaScriptChannel, + [name], + {#onMessageReceived: onMessageReceived}, + ), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future removeJavaScriptChannel(String? javaScriptChannelName) => + (super.noSuchMethod( + Invocation.method(#removeJavaScriptChannel, [ + javaScriptChannelName, + ]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future getTitle() => + (super.noSuchMethod( + Invocation.method(#getTitle, []), + returnValue: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future scrollTo(int? x, int? y) => + (super.noSuchMethod( + Invocation.method(#scrollTo, [x, y]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future scrollBy(int? x, int? y) => + (super.noSuchMethod( + Invocation.method(#scrollBy, [x, y]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future<_i3.Offset> getScrollPosition() => + (super.noSuchMethod( + Invocation.method(#getScrollPosition, []), + returnValue: _i9.Future<_i3.Offset>.value( + _FakeOffset_2(this, Invocation.method(#getScrollPosition, [])), + ), + ) + as _i9.Future<_i3.Offset>); + + @override + _i9.Future enableZoom(bool? enabled) => + (super.noSuchMethod( + Invocation.method(#enableZoom, [enabled]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future setBackgroundColor(_i3.Color? color) => + (super.noSuchMethod( + Invocation.method(#setBackgroundColor, [color]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future setJavaScriptMode(_i2.JavaScriptMode? javaScriptMode) => + (super.noSuchMethod( + Invocation.method(#setJavaScriptMode, [javaScriptMode]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future setUserAgent(String? userAgent) => + (super.noSuchMethod( + Invocation.method(#setUserAgent, [userAgent]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future setOnConsoleMessage( + void Function(_i2.JavaScriptConsoleMessage)? onConsoleMessage, + ) => + (super.noSuchMethod( + Invocation.method(#setOnConsoleMessage, [onConsoleMessage]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future setOnJavaScriptAlertDialog( + _i9.Future Function(_i2.JavaScriptAlertDialogRequest)? + onJavaScriptAlertDialog, + ) => + (super.noSuchMethod( + Invocation.method(#setOnJavaScriptAlertDialog, [ + onJavaScriptAlertDialog, + ]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future setOnJavaScriptConfirmDialog( + _i9.Future Function(_i2.JavaScriptConfirmDialogRequest)? + onJavaScriptConfirmDialog, + ) => + (super.noSuchMethod( + Invocation.method(#setOnJavaScriptConfirmDialog, [ + onJavaScriptConfirmDialog, + ]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future setOnJavaScriptTextInputDialog( + _i9.Future Function(_i2.JavaScriptTextInputDialogRequest)? + onJavaScriptTextInputDialog, ) => (super.noSuchMethod( - Invocation.method( - #scrollTo, - [ - x, - y, - ], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - @override - _i10.Future scrollBy( - int? x, - int? y, + Invocation.method(#setOnJavaScriptTextInputDialog, [ + onJavaScriptTextInputDialog, + ]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future getUserAgent() => + (super.noSuchMethod( + Invocation.method(#getUserAgent, []), + returnValue: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future setOnScrollPositionChange( + void Function(_i2.ScrollPositionChange)? onScrollPositionChange, ) => (super.noSuchMethod( - Invocation.method( - #scrollBy, - [ - x, - y, - ], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - @override - _i10.Future<_i3.Offset> getScrollPosition() => (super.noSuchMethod( - Invocation.method( - #getScrollPosition, - [], - ), - returnValue: _i10.Future<_i3.Offset>.value(_FakeOffset_2( - this, - Invocation.method( - #getScrollPosition, - [], - ), - )), - ) as _i10.Future<_i3.Offset>); - @override - _i10.Future enableZoom(bool? enabled) => (super.noSuchMethod( - Invocation.method( - #enableZoom, - [enabled], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - @override - _i10.Future setBackgroundColor(_i3.Color? color) => (super.noSuchMethod( - Invocation.method( - #setBackgroundColor, - [color], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - @override - _i10.Future setJavaScriptMode(_i2.JavaScriptMode? javaScriptMode) => - (super.noSuchMethod( - Invocation.method( - #setJavaScriptMode, - [javaScriptMode], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - @override - _i10.Future setUserAgent(String? userAgent) => (super.noSuchMethod( - Invocation.method( - #setUserAgent, - [userAgent], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + Invocation.method(#setOnScrollPositionChange, [ + onScrollPositionChange, + ]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); } /// A class which mocks [AdInstanceManager]. /// /// See the documentation for Mockito's code generation for more information. -class MockAdInstanceManager extends _i1.Mock implements _i13.AdInstanceManager { +class MockAdInstanceManager extends _i1.Mock implements _i12.AdInstanceManager { MockAdInstanceManager() { _i1.throwOnMissingStub(this); } @override - _i4.MethodChannel get channel => (super.noSuchMethod( - Invocation.getter(#channel), - returnValue: _FakeMethodChannel_3( - this, - Invocation.getter(#channel), - ), - ) as _i4.MethodChannel); - @override - _i5.WebViewControllerUtil get webViewControllerUtil => (super.noSuchMethod( - Invocation.getter(#webViewControllerUtil), - returnValue: _FakeWebViewControllerUtil_4( - this, - Invocation.getter(#webViewControllerUtil), - ), - ) as _i5.WebViewControllerUtil); - @override - _i10.Future<_i6.InitializationStatus> initialize() => (super.noSuchMethod( - Invocation.method( - #initialize, - [], - ), - returnValue: _i10.Future<_i6.InitializationStatus>.value( - _FakeInitializationStatus_5( - this, - Invocation.method( - #initialize, - [], - ), - )), - ) as _i10.Future<_i6.InitializationStatus>); - @override - _i10.Future<_i7.AdSize> getAdSize(_i7.Ad? ad) => (super.noSuchMethod( - Invocation.method( - #getAdSize, - [ad], - ), - returnValue: _i10.Future<_i7.AdSize>.value(_FakeAdSize_6( - this, - Invocation.method( - #getAdSize, - [ad], - ), - )), - ) as _i10.Future<_i7.AdSize>); - @override - _i7.Ad? adFor(int? adId) => (super.noSuchMethod(Invocation.method( - #adFor, - [adId], - )) as _i7.Ad?); - @override - int? adIdFor(_i7.Ad? ad) => (super.noSuchMethod(Invocation.method( - #adIdFor, - [ad], - )) as int?); - @override - bool isWidgetAdIdMounted(int? adId) => (super.noSuchMethod( - Invocation.method( - #isWidgetAdIdMounted, - [adId], - ), - returnValue: false, - ) as bool); + _i4.MethodChannel get channel => + (super.noSuchMethod( + Invocation.getter(#channel), + returnValue: _FakeMethodChannel_3( + this, + Invocation.getter(#channel), + ), + ) + as _i4.MethodChannel); + + @override + _i5.WebViewControllerUtil get webViewControllerUtil => + (super.noSuchMethod( + Invocation.getter(#webViewControllerUtil), + returnValue: _FakeWebViewControllerUtil_4( + this, + Invocation.getter(#webViewControllerUtil), + ), + ) + as _i5.WebViewControllerUtil); + + @override + _i9.Future<_i6.InitializationStatus> initialize() => + (super.noSuchMethod( + Invocation.method(#initialize, []), + returnValue: _i9.Future<_i6.InitializationStatus>.value( + _FakeInitializationStatus_5( + this, + Invocation.method(#initialize, []), + ), + ), + ) + as _i9.Future<_i6.InitializationStatus>); + + @override + _i9.Future<_i13.AdSize?> getAdSize(_i13.Ad? ad) => + (super.noSuchMethod( + Invocation.method(#getAdSize, [ad]), + returnValue: _i9.Future<_i13.AdSize?>.value(), + ) + as _i9.Future<_i13.AdSize?>); + + @override + _i13.Ad? adFor(int? adId) => + (super.noSuchMethod(Invocation.method(#adFor, [adId])) as _i13.Ad?); + + @override + int? adIdFor(_i13.Ad? ad) => + (super.noSuchMethod(Invocation.method(#adIdFor, [ad])) as int?); + + @override + bool isWidgetAdIdMounted(int? adId) => + (super.noSuchMethod( + Invocation.method(#isWidgetAdIdMounted, [adId]), + returnValue: false, + ) + as bool); + @override void mountWidgetAdId(int? adId) => super.noSuchMethod( - Invocation.method( - #mountWidgetAdId, - [adId], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#mountWidgetAdId, [adId]), + returnValueForMissingStub: null, + ); + @override void unmountWidgetAdId(int? adId) => super.noSuchMethod( - Invocation.method( - #unmountWidgetAdId, - [adId], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#unmountWidgetAdId, [adId]), + returnValueForMissingStub: null, + ); + + @override + _i9.Future loadBannerAd(_i13.BannerAd? ad) => + (super.noSuchMethod( + Invocation.method(#loadBannerAd, [ad]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future loadInterstitialAd(_i13.InterstitialAd? ad) => + (super.noSuchMethod( + Invocation.method(#loadInterstitialAd, [ad]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future loadNativeAd(_i13.NativeAd? ad) => + (super.noSuchMethod( + Invocation.method(#loadNativeAd, [ad]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future loadRewardedAd(_i13.RewardedAd? ad) => + (super.noSuchMethod( + Invocation.method(#loadRewardedAd, [ad]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future loadRewardedInterstitialAd( + _i13.RewardedInterstitialAd? ad, + ) => + (super.noSuchMethod( + Invocation.method(#loadRewardedInterstitialAd, [ad]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future loadAppOpenAd(_i13.AppOpenAd? ad) => + (super.noSuchMethod( + Invocation.method(#loadAppOpenAd, [ad]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future loadAdManagerBannerAd(_i13.AdManagerBannerAd? ad) => + (super.noSuchMethod( + Invocation.method(#loadAdManagerBannerAd, [ad]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future loadFluidAd(_i13.FluidAdManagerBannerAd? ad) => + (super.noSuchMethod( + Invocation.method(#loadFluidAd, [ad]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + @override - _i10.Future loadBannerAd(_i7.BannerAd? ad) => (super.noSuchMethod( - Invocation.method( - #loadBannerAd, - [ad], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - @override - _i10.Future loadInterstitialAd(_i7.InterstitialAd? ad) => - (super.noSuchMethod( - Invocation.method( - #loadInterstitialAd, - [ad], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - @override - _i10.Future loadNativeAd(_i7.NativeAd? ad) => (super.noSuchMethod( - Invocation.method( - #loadNativeAd, - [ad], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - @override - _i10.Future loadRewardedAd(_i7.RewardedAd? ad) => (super.noSuchMethod( - Invocation.method( - #loadRewardedAd, - [ad], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - @override - _i10.Future loadRewardedInterstitialAd( - _i7.RewardedInterstitialAd? ad) => - (super.noSuchMethod( - Invocation.method( - #loadRewardedInterstitialAd, - [ad], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - @override - _i10.Future loadAppOpenAd(_i7.AppOpenAd? ad) => (super.noSuchMethod( - Invocation.method( - #loadAppOpenAd, - [ad], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - @override - _i10.Future loadAdManagerBannerAd(_i7.AdManagerBannerAd? ad) => - (super.noSuchMethod( - Invocation.method( - #loadAdManagerBannerAd, - [ad], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - @override - _i10.Future loadFluidAd(_i7.FluidAdManagerBannerAd? ad) => - (super.noSuchMethod( - Invocation.method( - #loadFluidAd, - [ad], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - @override - _i10.Future loadAdManagerInterstitialAd( - _i7.AdManagerInterstitialAd? ad) => - (super.noSuchMethod( - Invocation.method( - #loadAdManagerInterstitialAd, - [ad], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - @override - _i10.Future disposeAd(_i7.Ad? ad) => (super.noSuchMethod( - Invocation.method( - #disposeAd, - [ad], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - @override - _i10.Future showAdWithoutView(_i7.AdWithoutView? ad) => - (super.noSuchMethod( - Invocation.method( - #showAdWithoutView, - [ad], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - @override - _i10.Future<_i8.RequestConfiguration> getRequestConfiguration() => - (super.noSuchMethod( - Invocation.method( - #getRequestConfiguration, - [], - ), - returnValue: _i10.Future<_i8.RequestConfiguration>.value( - _FakeRequestConfiguration_7( - this, - Invocation.method( - #getRequestConfiguration, - [], - ), - )), - ) as _i10.Future<_i8.RequestConfiguration>); - @override - _i10.Future updateRequestConfiguration( - _i8.RequestConfiguration? requestConfiguration) => - (super.noSuchMethod( - Invocation.method( - #updateRequestConfiguration, - [requestConfiguration], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - @override - _i10.Future setSameAppKeyEnabled(bool? isEnabled) => - (super.noSuchMethod( - Invocation.method( - #setSameAppKeyEnabled, - [isEnabled], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - @override - _i10.Future setAppMuted(bool? muted) => (super.noSuchMethod( - Invocation.method( - #setAppMuted, - [muted], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - @override - _i10.Future setAppVolume(double? volume) => (super.noSuchMethod( - Invocation.method( - #setAppVolume, - [volume], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - @override - _i10.Future setImmersiveMode( - _i7.AdWithoutView? ad, + _i9.Future loadAdManagerInterstitialAd( + _i13.AdManagerInterstitialAd? ad, + ) => + (super.noSuchMethod( + Invocation.method(#loadAdManagerInterstitialAd, [ad]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future disposeAd(_i13.Ad? ad) => + (super.noSuchMethod( + Invocation.method(#disposeAd, [ad]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future showAdWithoutView(_i13.AdWithoutView? ad) => + (super.noSuchMethod( + Invocation.method(#showAdWithoutView, [ad]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future<_i7.RequestConfiguration> getRequestConfiguration() => + (super.noSuchMethod( + Invocation.method(#getRequestConfiguration, []), + returnValue: _i9.Future<_i7.RequestConfiguration>.value( + _FakeRequestConfiguration_6( + this, + Invocation.method(#getRequestConfiguration, []), + ), + ), + ) + as _i9.Future<_i7.RequestConfiguration>); + + @override + _i9.Future updateRequestConfiguration( + _i7.RequestConfiguration? requestConfiguration, + ) => + (super.noSuchMethod( + Invocation.method(#updateRequestConfiguration, [ + requestConfiguration, + ]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future setSameAppKeyEnabled(bool? isEnabled) => + (super.noSuchMethod( + Invocation.method(#setSameAppKeyEnabled, [isEnabled]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future setAppMuted(bool? muted) => + (super.noSuchMethod( + Invocation.method(#setAppMuted, [muted]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future setAppVolume(double? volume) => + (super.noSuchMethod( + Invocation.method(#setAppVolume, [volume]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future setImmersiveMode( + _i13.AdWithoutView? ad, bool? immersiveModeEnabled, ) => (super.noSuchMethod( - Invocation.method( - #setImmersiveMode, - [ - ad, - immersiveModeEnabled, - ], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - @override - _i10.Future disableSDKCrashReporting() => (super.noSuchMethod( - Invocation.method( - #disableSDKCrashReporting, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - @override - _i10.Future disableMediationInitialization() => (super.noSuchMethod( - Invocation.method( - #disableMediationInitialization, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - @override - _i10.Future getVersionString() => (super.noSuchMethod( - Invocation.method( - #getVersionString, - [], - ), - returnValue: _i10.Future.value(''), - ) as _i10.Future); - @override - _i10.Future setServerSideVerificationOptions( - _i7.ServerSideVerificationOptions? options, - _i7.Ad? ad, + Invocation.method(#setImmersiveMode, [ad, immersiveModeEnabled]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future disableSDKCrashReporting() => + (super.noSuchMethod( + Invocation.method(#disableSDKCrashReporting, []), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future disableMediationInitialization() => + (super.noSuchMethod( + Invocation.method(#disableMediationInitialization, []), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future getVersionString() => + (super.noSuchMethod( + Invocation.method(#getVersionString, []), + returnValue: _i9.Future.value( + _i14.dummyValue( + this, + Invocation.method(#getVersionString, []), + ), + ), + ) + as _i9.Future); + + @override + _i9.Future setServerSideVerificationOptions( + _i13.ServerSideVerificationOptions? options, + _i13.Ad? ad, ) => (super.noSuchMethod( - Invocation.method( - #setServerSideVerificationOptions, - [ - options, - ad, - ], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - @override - _i10.Future openDebugMenu(String? adUnitId) => (super.noSuchMethod( - Invocation.method( - #openDebugMenu, - [adUnitId], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - @override - _i10.Future registerWebView(_i9.WebViewController? controller) => - (super.noSuchMethod( - Invocation.method( - #registerWebView, - [controller], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - @override - int getWebViewId(_i9.WebViewController? controller) => (super.noSuchMethod( - Invocation.method( - #getWebViewId, - [controller], - ), - returnValue: 0, - ) as int); - @override - void openAdInspector(_i14.OnAdInspectorClosedListener? listener) => + Invocation.method(#setServerSideVerificationOptions, [options, ad]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future openDebugMenu(String? adUnitId) => + (super.noSuchMethod( + Invocation.method(#openDebugMenu, [adUnitId]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future registerWebView(_i8.WebViewController? controller) => + (super.noSuchMethod( + Invocation.method(#registerWebView, [controller]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + int getWebViewId(_i8.WebViewController? controller) => + (super.noSuchMethod( + Invocation.method(#getWebViewId, [controller]), + returnValue: 0, + ) + as int); + + @override + void openAdInspector(_i15.OnAdInspectorClosedListener? listener) => super.noSuchMethod( - Invocation.method( - #openAdInspector, - [listener], - ), + Invocation.method(#openAdInspector, [listener]), returnValueForMissingStub: null, ); } @@ -758,12 +745,10 @@ class MockWebViewControllerUtil extends _i1.Mock } @override - int webViewIdentifier(_i9.WebViewController? controller) => + int webViewIdentifier(_i8.WebViewController? controller) => (super.noSuchMethod( - Invocation.method( - #webViewIdentifier, - [controller], - ), - returnValue: 0, - ) as int); + Invocation.method(#webViewIdentifier, [controller]), + returnValue: 0, + ) + as int); } diff --git a/packages/google_mobile_ads/test/rewarded_interstitial_ad_test.dart b/packages/google_mobile_ads/test/rewarded_interstitial_ad_test.dart index 1eb2b15f1..96bf75db1 100644 --- a/packages/google_mobile_ads/test/rewarded_interstitial_ad_test.dart +++ b/packages/google_mobile_ads/test/rewarded_interstitial_ad_test.dart @@ -30,23 +30,25 @@ void main() { setUp(() async { log.clear(); - instanceManager = - AdInstanceManager('plugins.flutter.io/google_mobile_ads'); + instanceManager = AdInstanceManager( + 'plugins.flutter.io/google_mobile_ads', + ); TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger - .setMockMethodCallHandler(instanceManager.channel, - (MethodCall methodCall) async { - log.add(methodCall); - switch (methodCall.method) { - case 'loadRewardedInterstitialAd': - case 'showAdWithoutView': - case 'disposeAd': - case 'setServerSideVerificationOptions': - return Future.value(); - default: - assert(false); - return null; - } - }); + .setMockMethodCallHandler(instanceManager.channel, ( + MethodCall methodCall, + ) async { + log.add(methodCall); + switch (methodCall.method) { + case 'loadRewardedInterstitialAd': + case 'showAdWithoutView': + case 'disposeAd': + case 'setServerSideVerificationOptions': + return Future.value(); + default: + assert(false); + return null; + } + }); }); test('load show rewarded interstitial android', () async { @@ -57,10 +59,11 @@ void main() { adUnitId: 'test-ad-unit', request: request, rewardedInterstitialAdLoadCallback: RewardedInterstitialAdLoadCallback( - onAdLoaded: (ad) { - rewardedInterstitial = ad; - }, - onAdFailedToLoad: (error) => null), + onAdLoaded: (ad) { + rewardedInterstitial = ad; + }, + onAdFailedToLoad: (error) => null, + ), ); RewardedInterstitialAd createdAd = @@ -68,24 +71,29 @@ void main() { (createdAd).rewardedInterstitialAdLoadCallback.onAdLoaded(createdAd); expect(log, [ - isMethodCall('loadRewardedInterstitialAd', arguments: { - 'adId': 0, - 'adUnitId': 'test-ad-unit', - 'request': request, - 'adManagerRequest': null, - }), + isMethodCall( + 'loadRewardedInterstitialAd', + arguments: { + 'adId': 0, + 'adUnitId': 'test-ad-unit', + 'request': request, + 'adManagerRequest': null, + }, + ), ]); expect(instanceManager.adFor(0), isNotNull); expect(rewardedInterstitial, createdAd); log.clear(); - await rewardedInterstitial! - .show(onUserEarnedReward: (ad, reward) => null); + await rewardedInterstitial!.show( + onUserEarnedReward: (ad, reward) => null, + ); expect(log, [ - isMethodCall('showAdWithoutView', arguments: { - 'adId': 0, - }) + isMethodCall( + 'showAdWithoutView', + arguments: {'adId': 0}, + ), ]); // Check that full screen events are passed correctly. @@ -102,30 +110,41 @@ void main() { rewardedInterstitial!.fullScreenContentCallback = FullScreenContentCallback( - onAdImpression: (ad) => impressionCompleter.complete(ad), - onAdShowedFullScreenContent: (ad) => showedCompleter.complete(ad), - onAdFailedToShowFullScreenContent: (ad, error) => - failedToShowCompleter.complete(ad), - onAdDismissedFullScreenContent: (ad) => dismissedCompleter.complete(ad), - onAdClicked: (ad) => clickedCompleter.complete(ad), - ); + onAdImpression: (ad) => impressionCompleter.complete(ad), + onAdShowedFullScreenContent: (ad) => showedCompleter.complete(ad), + onAdFailedToShowFullScreenContent: (ad, error) => + failedToShowCompleter.complete(ad), + onAdDismissedFullScreenContent: (ad) => + dismissedCompleter.complete(ad), + onAdClicked: (ad) => clickedCompleter.complete(ad), + ); await TestUtil.sendAdEvent(0, 'onAdImpression', instanceManager); expect(await impressionCompleter.future, rewardedInterstitial); await TestUtil.sendAdEvent( - 0, 'onAdShowedFullScreenContent', instanceManager); + 0, + 'onAdShowedFullScreenContent', + instanceManager, + ); expect(await showedCompleter.future, rewardedInterstitial); await TestUtil.sendAdEvent( - 0, 'onAdDismissedFullScreenContent', instanceManager); + 0, + 'onAdDismissedFullScreenContent', + instanceManager, + ); expect(await dismissedCompleter.future, rewardedInterstitial); await TestUtil.sendAdEvent(0, 'onAdClicked', instanceManager); expect(await clickedCompleter.future, rewardedInterstitial); - await TestUtil.sendAdEvent(0, 'onFailedToShowFullScreenContent', - instanceManager, {'error': AdError(1, 'domain', 'message')}); + await TestUtil.sendAdEvent( + 0, + 'onFailedToShowFullScreenContent', + instanceManager, + {'error': AdError(1, 'domain', 'message')}, + ); expect(await failedToShowCompleter.future, rewardedInterstitial); // Check paid event callback @@ -140,7 +159,11 @@ void main() { 'currencyCode': 'USD', }; await TestUtil.sendAdEvent( - 0, 'onPaidEvent', instanceManager, paidEventArgs); + 0, + 'onPaidEvent', + instanceManager, + paidEventArgs, + ); List paidEventCallback = await paidEventCompleter.future; expect(paidEventCallback[0], rewardedInterstitial); expect(paidEventCallback[1], 1.2345); @@ -156,10 +179,11 @@ void main() { adUnitId: 'test-ad-unit', request: request, rewardedInterstitialAdLoadCallback: RewardedInterstitialAdLoadCallback( - onAdLoaded: (ad) { - rewardedInterstitial = ad; - }, - onAdFailedToLoad: (error) => null), + onAdLoaded: (ad) { + rewardedInterstitial = ad; + }, + onAdFailedToLoad: (error) => null, + ), ); RewardedInterstitialAd createdAd = @@ -167,24 +191,29 @@ void main() { (createdAd).rewardedInterstitialAdLoadCallback.onAdLoaded(createdAd); expect(log, [ - isMethodCall('loadRewardedInterstitialAd', arguments: { - 'adId': 0, - 'adUnitId': 'test-ad-unit', - 'request': request, - 'adManagerRequest': null, - }), + isMethodCall( + 'loadRewardedInterstitialAd', + arguments: { + 'adId': 0, + 'adUnitId': 'test-ad-unit', + 'request': request, + 'adManagerRequest': null, + }, + ), ]); expect(instanceManager.adFor(0), isNotNull); expect(rewardedInterstitial, createdAd); log.clear(); - await rewardedInterstitial! - .show(onUserEarnedReward: (ad, reward) => null); + await rewardedInterstitial!.show( + onUserEarnedReward: (ad, reward) => null, + ); expect(log, [ - isMethodCall('showAdWithoutView', arguments: { - 'adId': 0, - }) + isMethodCall( + 'showAdWithoutView', + arguments: {'adId': 0}, + ), ]); // Check that full screen events are passed correctly. @@ -203,39 +232,50 @@ void main() { rewardedInterstitial!.fullScreenContentCallback = FullScreenContentCallback( - onAdImpression: (ad) => impressionCompleter.complete(ad), - onAdShowedFullScreenContent: (ad) => showedCompleter.complete(ad), - onAdFailedToShowFullScreenContent: (ad, error) => - failedToShowCompleter.complete(ad), - onAdDismissedFullScreenContent: (ad) => dismissedCompleter.complete(ad), - onAdClicked: (ad) => clickedCompleter.complete(ad), - onAdWillDismissFullScreenContent: (ad) => - willDismissCompleter.complete(ad), - ); + onAdImpression: (ad) => impressionCompleter.complete(ad), + onAdShowedFullScreenContent: (ad) => showedCompleter.complete(ad), + onAdFailedToShowFullScreenContent: (ad, error) => + failedToShowCompleter.complete(ad), + onAdDismissedFullScreenContent: (ad) => + dismissedCompleter.complete(ad), + onAdClicked: (ad) => clickedCompleter.complete(ad), + onAdWillDismissFullScreenContent: (ad) => + willDismissCompleter.complete(ad), + ); await TestUtil.sendAdEvent(0, 'adDidRecordImpression', instanceManager); expect(await impressionCompleter.future, rewardedInterstitial); await TestUtil.sendAdEvent( - 0, 'adWillPresentFullScreenContent', instanceManager); + 0, + 'adWillPresentFullScreenContent', + instanceManager, + ); expect(await showedCompleter.future, rewardedInterstitial); await TestUtil.sendAdEvent( - 0, 'adDidDismissFullScreenContent', instanceManager); + 0, + 'adDidDismissFullScreenContent', + instanceManager, + ); expect(await dismissedCompleter.future, rewardedInterstitial); await TestUtil.sendAdEvent( - 0, 'adWillDismissFullScreenContent', instanceManager); + 0, + 'adWillDismissFullScreenContent', + instanceManager, + ); expect(await dismissedCompleter.future, rewardedInterstitial); await TestUtil.sendAdEvent(0, 'adDidRecordClick', instanceManager); expect(await clickedCompleter.future, rewardedInterstitial); await TestUtil.sendAdEvent( - 0, - 'didFailToPresentFullScreenContentWithError', - instanceManager, - {'error': AdError(1, 'domain', 'message')}); + 0, + 'didFailToPresentFullScreenContentWithError', + instanceManager, + {'error': AdError(1, 'domain', 'message')}, + ); expect(await failedToShowCompleter.future, rewardedInterstitial); // Check paid event callback @@ -250,7 +290,11 @@ void main() { 'currencyCode': 'USD', }; await TestUtil.sendAdEvent( - 0, 'onPaidEvent', instanceManager, paidEventArgs); + 0, + 'onPaidEvent', + instanceManager, + paidEventArgs, + ); List paidEventCallback = await paidEventCompleter.future; expect(paidEventCallback[0], rewardedInterstitial); expect(paidEventCallback[1], 1.2345); @@ -265,10 +309,11 @@ void main() { adUnitId: 'test-ad-unit', adManagerRequest: request, rewardedInterstitialAdLoadCallback: RewardedInterstitialAdLoadCallback( - onAdLoaded: (ad) { - rewardedInterstitial = ad; - }, - onAdFailedToLoad: (error) => null), + onAdLoaded: (ad) { + rewardedInterstitial = ad; + }, + onAdFailedToLoad: (error) => null, + ), ); RewardedInterstitialAd createdAd = @@ -276,23 +321,28 @@ void main() { (createdAd).rewardedInterstitialAdLoadCallback.onAdLoaded(createdAd); expect(log, [ - isMethodCall('loadRewardedInterstitialAd', arguments: { - 'adId': 0, - 'adUnitId': 'test-ad-unit', - 'request': null, - 'adManagerRequest': request, - }), + isMethodCall( + 'loadRewardedInterstitialAd', + arguments: { + 'adId': 0, + 'adUnitId': 'test-ad-unit', + 'request': null, + 'adManagerRequest': request, + }, + ), ]); expect(instanceManager.adFor(0), isNotNull); log.clear(); - await rewardedInterstitial! - .show(onUserEarnedReward: (ad, reward) => null); + await rewardedInterstitial!.show( + onUserEarnedReward: (ad, reward) => null, + ); expect(log, [ - isMethodCall('showAdWithoutView', arguments: { - 'adId': 0, - }) + isMethodCall( + 'showAdWithoutView', + arguments: {'adId': 0}, + ), ]); }); @@ -303,17 +353,21 @@ void main() { adUnitId: 'test-ad-unit', request: request, rewardedInterstitialAdLoadCallback: RewardedInterstitialAdLoadCallback( - onAdLoaded: (ad) => null, - onAdFailedToLoad: (error) => resultsCompleter.complete(error)), + onAdLoaded: (ad) => null, + onAdFailedToLoad: (error) => resultsCompleter.complete(error), + ), ); expect(log, [ - isMethodCall('loadRewardedInterstitialAd', arguments: { - 'adId': 0, - 'adUnitId': 'test-ad-unit', - 'request': request, - 'adManagerRequest': null, - }) + isMethodCall( + 'loadRewardedInterstitialAd', + arguments: { + 'adId': 0, + 'adUnitId': 'test-ad-unit', + 'request': request, + 'adManagerRequest': null, + }, + ), ]); expect(instanceManager.adFor(0), isNotNull); @@ -346,11 +400,15 @@ void main() { 'loadAdError': LoadAdError(1, 'domain', 'message', responseInfo), }); - final ByteData data = - instanceManager.channel.codec.encodeMethodCall(methodCall); + final ByteData data = instanceManager.channel.codec.encodeMethodCall( + methodCall, + ); await TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger .handlePlatformMessage( - 'plugins.flutter.io/google_mobile_ads', data, (data) {}); + 'plugins.flutter.io/google_mobile_ads', + data, + (data) {}, + ); // The ad reference should be freed when load failure occurs. expect(instanceManager.adFor(0), isNull); @@ -361,8 +419,10 @@ void main() { expect(result.domain, 'domain'); expect(result.message, 'message'); expect(result.responseInfo!.responseId, responseInfo.responseId); - expect(result.responseInfo!.mediationAdapterClassName, - responseInfo.mediationAdapterClassName); + expect( + result.responseInfo!.mediationAdapterClassName, + responseInfo.mediationAdapterClassName, + ); expect(result.responseInfo!.responseExtras, responseInfo.responseExtras); List responses = result.responseInfo!.adapterResponses!; @@ -384,10 +444,11 @@ void main() { adUnitId: 'test-ad-unit', request: AdRequest(), rewardedInterstitialAdLoadCallback: RewardedInterstitialAdLoadCallback( - onAdLoaded: (ad) { - rewardedInterstitial = ad; - }, - onAdFailedToLoad: (error) => null), + onAdLoaded: (ad) { + rewardedInterstitial = ad; + }, + onAdFailedToLoad: (error) => null, + ), ); RewardedInterstitialAd createdAd = @@ -395,8 +456,9 @@ void main() { createdAd.rewardedInterstitialAdLoadCallback.onAdLoaded(createdAd); // Reward callback is now set when you call show. await rewardedInterstitial!.show( - onUserEarnedReward: (ad, item) => - resultCompleter.complete([ad, item])); + onUserEarnedReward: (ad, item) => + resultCompleter.complete([ad, item]), + ); final MethodCall methodCall = MethodCall('onAdEvent', { 'adId': 0, @@ -404,11 +466,15 @@ void main() { 'rewardItem': RewardItem(1, 'one'), }); - final ByteData data = - instanceManager.channel.codec.encodeMethodCall(methodCall); + final ByteData data = instanceManager.channel.codec.encodeMethodCall( + methodCall, + ); await TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger .handlePlatformMessage( - 'plugins.flutter.io/google_mobile_ads', data, (data) {}); + 'plugins.flutter.io/google_mobile_ads', + data, + (data) {}, + ); final List result = await resultCompleter.future; expect(result[0], rewardedInterstitial!); @@ -422,10 +488,11 @@ void main() { adUnitId: 'test-ad-unit', request: AdRequest(), rewardedInterstitialAdLoadCallback: RewardedInterstitialAdLoadCallback( - onAdLoaded: (ad) { - adLoadCompleter.complete(ad); - }, - onAdFailedToLoad: (_) => null), + onAdLoaded: (ad) { + adLoadCompleter.complete(ad); + }, + onAdFailedToLoad: (_) => null, + ), ); await TestUtil.sendAdEvent(0, 'onAdLoaded', instanceManager); @@ -433,15 +500,19 @@ void main() { final ad = await adLoadCompleter.future; log.clear(); - final ssv = - ServerSideVerificationOptions(userId: 'id', customData: 'data'); + final ssv = ServerSideVerificationOptions( + userId: 'id', + customData: 'data', + ); await ad.setServerSideOptions(ssv); expect(log, [ - isMethodCall('setServerSideVerificationOptions', - arguments: { - 'adId': 0, - 'serverSideVerificationOptions': ssv, - }), + isMethodCall( + 'setServerSideVerificationOptions', + arguments: { + 'adId': 0, + 'serverSideVerificationOptions': ssv, + }, + ), ]); }); }); diff --git a/packages/google_mobile_ads/test/test_util.dart b/packages/google_mobile_ads/test/test_util.dart index 79f47c3b9..cfaa6b6ed 100644 --- a/packages/google_mobile_ads/test/test_util.dart +++ b/packages/google_mobile_ads/test/test_util.dart @@ -24,19 +24,24 @@ class TestUtil { /// [additionalArgs], encodes it into [ByteData] and sends it as a platform /// message to [instanceManager]. static Future sendAdEvent( - int adId, String eventName, AdInstanceManager instanceManager, - [Map? additionalArgs]) async { - Map args = { - 'adId': adId, - 'eventName': eventName, - }; - additionalArgs?.entries - .forEach((element) => args[element.key] = element.value); + int adId, + String eventName, + AdInstanceManager instanceManager, [ + Map? additionalArgs, + ]) async { + Map args = {'adId': adId, 'eventName': eventName}; + additionalArgs?.entries.forEach( + (element) => args[element.key] = element.value, + ); final MethodCall methodCall = MethodCall('onAdEvent', args); - final ByteData data = - instanceManager.channel.codec.encodeMethodCall(methodCall); + final ByteData data = instanceManager.channel.codec.encodeMethodCall( + methodCall, + ); await TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger .handlePlatformMessage( - 'plugins.flutter.io/google_mobile_ads', data, (data) {}); + 'plugins.flutter.io/google_mobile_ads', + data, + (data) {}, + ); } } diff --git a/packages/google_mobile_ads/test/ump/consent_form_impl_test.dart b/packages/google_mobile_ads/test/ump/consent_form_impl_test.dart index 090354600..4f44551e8 100644 --- a/packages/google_mobile_ads/test/ump/consent_form_impl_test.dart +++ b/packages/google_mobile_ads/test/ump/consent_form_impl_test.dart @@ -69,8 +69,9 @@ void main() { test('dispose()', () async { ConsentFormImpl form = ConsentFormImpl(1); - when(mockChannel.disposeConsentForm(form)) - .thenAnswer((realInvocation) => Future.value()); + when( + mockChannel.disposeConsentForm(form), + ).thenAnswer((realInvocation) => Future.value()); await form.dispose(); verify(mockChannel.disposeConsentForm(form)); diff --git a/packages/google_mobile_ads/test/ump/consent_form_impl_test.mocks.dart b/packages/google_mobile_ads/test/ump/consent_form_impl_test.mocks.dart index 21c533dc6..72bb79f76 100644 --- a/packages/google_mobile_ads/test/ump/consent_form_impl_test.mocks.dart +++ b/packages/google_mobile_ads/test/ump/consent_form_impl_test.mocks.dart @@ -1,5 +1,5 @@ -// Mocks generated by Mockito 5.3.2 from annotations -// in google_mobile_ads/example/ios/.symlinks/plugins/google_mobile_ads/test/ump/consent_form_impl_test.dart. +// Mocks generated by Mockito 5.4.4 from annotations +// in google_mobile_ads/test/ump/consent_form_impl_test.dart. // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes @@ -9,6 +9,7 @@ import 'package:google_mobile_ads/src/ump/consent_form.dart' as _i6; import 'package:google_mobile_ads/src/ump/consent_information.dart' as _i4; import 'package:google_mobile_ads/src/ump/consent_request_parameters.dart' as _i3; +import 'package:google_mobile_ads/src/ump/form_error.dart' as _i7; import 'package:google_mobile_ads/src/ump/user_messaging_channel.dart' as _i2; import 'package:mockito/mockito.dart' as _i1; @@ -16,6 +17,8 @@ import 'package:mockito/mockito.dart' as _i1; // ignore_for_file: avoid_redundant_argument_values // ignore_for_file: avoid_setters_without_getters // ignore_for_file: comment_references +// ignore_for_file: deprecated_member_use +// ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member // ignore_for_file: prefer_const_constructors @@ -37,82 +40,101 @@ class MockUserMessagingChannel extends _i1.Mock _i3.ConsentRequestParameters? params, _i4.OnConsentInfoUpdateSuccessListener? successListener, _i4.OnConsentInfoUpdateFailureListener? failureListener, - ) => - super.noSuchMethod( - Invocation.method( - #requestConsentInfoUpdate, - [ - params, - successListener, - failureListener, - ], - ), - returnValueForMissingStub: null, - ); + ) => super.noSuchMethod( + Invocation.method(#requestConsentInfoUpdate, [ + params, + successListener, + failureListener, + ]), + returnValueForMissingStub: null, + ); + @override - _i5.Future isConsentFormAvailable() => (super.noSuchMethod( - Invocation.method( - #isConsentFormAvailable, - [], - ), - returnValue: _i5.Future.value(false), - ) as _i5.Future); + _i5.Future isConsentFormAvailable() => + (super.noSuchMethod( + Invocation.method(#isConsentFormAvailable, []), + returnValue: _i5.Future.value(false), + ) + as _i5.Future); + @override - _i5.Future<_i4.ConsentStatus> getConsentStatus() => (super.noSuchMethod( - Invocation.method( - #getConsentStatus, - [], - ), - returnValue: - _i5.Future<_i4.ConsentStatus>.value(_i4.ConsentStatus.notRequired), - ) as _i5.Future<_i4.ConsentStatus>); + _i5.Future<_i4.ConsentStatus> getConsentStatus() => + (super.noSuchMethod( + Invocation.method(#getConsentStatus, []), + returnValue: _i5.Future<_i4.ConsentStatus>.value( + _i4.ConsentStatus.notRequired, + ), + ) + as _i5.Future<_i4.ConsentStatus>); + @override - _i5.Future reset() => (super.noSuchMethod( - Invocation.method( - #reset, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + _i5.Future reset() => + (super.noSuchMethod( + Invocation.method(#reset, []), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); + + @override + _i5.Future canRequestAds() => + (super.noSuchMethod( + Invocation.method(#canRequestAds, []), + returnValue: _i5.Future.value(false), + ) + as _i5.Future); + + @override + _i5.Future<_i4.PrivacyOptionsRequirementStatus> + getPrivacyOptionsRequirementStatus() => + (super.noSuchMethod( + Invocation.method(#getPrivacyOptionsRequirementStatus, []), + returnValue: _i5.Future<_i4.PrivacyOptionsRequirementStatus>.value( + _i4.PrivacyOptionsRequirementStatus.notRequired, + ), + ) + as _i5.Future<_i4.PrivacyOptionsRequirementStatus>); + @override void loadConsentForm( _i6.OnConsentFormLoadSuccessListener? successListener, _i6.OnConsentFormLoadFailureListener? failureListener, - ) => - super.noSuchMethod( - Invocation.method( - #loadConsentForm, - [ - successListener, - failureListener, - ], - ), - returnValueForMissingStub: null, - ); + ) => super.noSuchMethod( + Invocation.method(#loadConsentForm, [successListener, failureListener]), + returnValueForMissingStub: null, + ); + + @override + _i5.Future<_i7.FormError?> loadAndShowConsentFormIfRequired() => + (super.noSuchMethod( + Invocation.method(#loadAndShowConsentFormIfRequired, []), + returnValue: _i5.Future<_i7.FormError?>.value(), + ) + as _i5.Future<_i7.FormError?>); + @override void show( _i6.ConsentForm? consentForm, _i6.OnConsentFormDismissedListener? onConsentFormDismissedListener, - ) => - super.noSuchMethod( - Invocation.method( - #show, - [ - consentForm, - onConsentFormDismissedListener, - ], - ), - returnValueForMissingStub: null, - ); + ) => super.noSuchMethod( + Invocation.method(#show, [consentForm, onConsentFormDismissedListener]), + returnValueForMissingStub: null, + ); + + @override + _i5.Future<_i7.FormError?> showPrivacyOptionsForm() => + (super.noSuchMethod( + Invocation.method(#showPrivacyOptionsForm, []), + returnValue: _i5.Future<_i7.FormError?>.value(), + ) + as _i5.Future<_i7.FormError?>); + @override _i5.Future disposeConsentForm(_i6.ConsentForm? consentForm) => (super.noSuchMethod( - Invocation.method( - #disposeConsentForm, - [consentForm], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + Invocation.method(#disposeConsentForm, [consentForm]), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); } diff --git a/packages/google_mobile_ads/test/ump/consent_form_test.dart b/packages/google_mobile_ads/test/ump/consent_form_test.dart index 90eb7c23d..27a510aa2 100644 --- a/packages/google_mobile_ads/test/ump/consent_form_test.dart +++ b/packages/google_mobile_ads/test/ump/consent_form_test.dart @@ -24,7 +24,7 @@ import 'package:mockito/mockito.dart'; import 'consent_form_test.mocks.dart'; -@GenerateMocks([UserMessagingChannel]) +@GenerateNiceMocks(>[MockSpec()]) void main() { TestWidgetsFlutterBinding.ensureInitialized(); @@ -36,18 +36,46 @@ void main() { UserMessagingChannel.instance = mockChannel; }); + test('showPrivacyOptionsForm success', () async { + Completer formCompleter = Completer(); + + await ConsentForm.showPrivacyOptionsForm( + (formError) => formCompleter.complete(formError), + ); + + FormError? formError = await formCompleter.future; + expect(formError, null); + }); + + test('showPrivacyOptionsForm failure', () async { + FormError? testError = FormError(errorCode: 1, message: 'testErrorMsg'); + when( + mockChannel.showPrivacyOptionsForm(), + ).thenAnswer((realInvocation) => Future.value(testError)); + Completer formCompleter = Completer(); + + await ConsentForm.showPrivacyOptionsForm( + (formError) => formCompleter.complete(formError), + ); + + FormError? formError = await formCompleter.future; + expect(formError, testError); + }); + test('loadConsentForm() success', () async { ConsentForm form = ConsentFormImpl(2); when(mockChannel.loadConsentForm(any, any)).thenAnswer( - (realInvocation) => realInvocation.positionalArguments[0](form)); + (realInvocation) => realInvocation.positionalArguments[0](form), + ); Completer successCompleter = Completer(); Completer errorCompleter = Completer(); ConsentForm.loadConsentForm( - (consentForm) => successCompleter.complete(consentForm), - (formError) => errorCompleter.complete(formError)); + (consentForm) => successCompleter.complete(consentForm), + (formError) => errorCompleter.complete(formError), + ); ConsentForm responseForm = await successCompleter.future; expect(successCompleter.isCompleted, true); @@ -59,19 +87,47 @@ void main() { FormError formError = FormError(errorCode: 1, message: 'message'); when(mockChannel.loadConsentForm(any, any)).thenAnswer( - (realInvocation) => realInvocation.positionalArguments[1](formError)); + (realInvocation) => realInvocation.positionalArguments[1](formError), + ); Completer successCompleter = Completer(); Completer errorCompleter = Completer(); ConsentForm.loadConsentForm( - (consentForm) => successCompleter.complete(consentForm), - (formError) => errorCompleter.complete(formError)); + (consentForm) => successCompleter.complete(consentForm), + (formError) => errorCompleter.complete(formError), + ); FormError responseError = await errorCompleter.future; expect(formError, responseError); expect(successCompleter.isCompleted, false); expect(errorCompleter.isCompleted, true); }); + + test('loadAndShowConsentFormIfRequired success', () async { + Completer formCompleter = Completer(); + + await ConsentForm.loadAndShowConsentFormIfRequired( + (formError) => formCompleter.complete(formError), + ); + + FormError? formError = await formCompleter.future; + expect(formError, null); + }); + + test('loadAndShowConsentFormIfRequired failure', () async { + FormError? testError = FormError(errorCode: 1, message: 'testErrorMsg'); + when( + mockChannel.loadAndShowConsentFormIfRequired(), + ).thenAnswer((realInvocation) => Future.value(testError)); + Completer formCompleter = Completer(); + + await ConsentForm.loadAndShowConsentFormIfRequired( + (formError) => formCompleter.complete(formError), + ); + + FormError? formError = await formCompleter.future; + expect(formError, testError); + }); }); } diff --git a/packages/google_mobile_ads/test/ump/consent_form_test.mocks.dart b/packages/google_mobile_ads/test/ump/consent_form_test.mocks.dart index aa468f25f..301aee2f2 100644 --- a/packages/google_mobile_ads/test/ump/consent_form_test.mocks.dart +++ b/packages/google_mobile_ads/test/ump/consent_form_test.mocks.dart @@ -1,5 +1,5 @@ -// Mocks generated by Mockito 5.3.2 from annotations -// in google_mobile_ads/example/ios/.symlinks/plugins/google_mobile_ads/test/ump/consent_form_test.dart. +// Mocks generated by Mockito 5.4.4 from annotations +// in google_mobile_ads/test/ump/consent_form_test.dart. // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes @@ -9,6 +9,7 @@ import 'package:google_mobile_ads/src/ump/consent_form.dart' as _i6; import 'package:google_mobile_ads/src/ump/consent_information.dart' as _i4; import 'package:google_mobile_ads/src/ump/consent_request_parameters.dart' as _i3; +import 'package:google_mobile_ads/src/ump/form_error.dart' as _i7; import 'package:google_mobile_ads/src/ump/user_messaging_channel.dart' as _i2; import 'package:mockito/mockito.dart' as _i1; @@ -16,6 +17,8 @@ import 'package:mockito/mockito.dart' as _i1; // ignore_for_file: avoid_redundant_argument_values // ignore_for_file: avoid_setters_without_getters // ignore_for_file: comment_references +// ignore_for_file: deprecated_member_use +// ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member // ignore_for_file: prefer_const_constructors @@ -28,91 +31,117 @@ import 'package:mockito/mockito.dart' as _i1; /// See the documentation for Mockito's code generation for more information. class MockUserMessagingChannel extends _i1.Mock implements _i2.UserMessagingChannel { - MockUserMessagingChannel() { - _i1.throwOnMissingStub(this); - } - @override void requestConsentInfoUpdate( _i3.ConsentRequestParameters? params, _i4.OnConsentInfoUpdateSuccessListener? successListener, _i4.OnConsentInfoUpdateFailureListener? failureListener, - ) => - super.noSuchMethod( - Invocation.method( - #requestConsentInfoUpdate, - [ - params, - successListener, - failureListener, - ], - ), - returnValueForMissingStub: null, - ); + ) => super.noSuchMethod( + Invocation.method(#requestConsentInfoUpdate, [ + params, + successListener, + failureListener, + ]), + returnValueForMissingStub: null, + ); + @override - _i5.Future isConsentFormAvailable() => (super.noSuchMethod( - Invocation.method( - #isConsentFormAvailable, - [], - ), - returnValue: _i5.Future.value(false), - ) as _i5.Future); + _i5.Future isConsentFormAvailable() => + (super.noSuchMethod( + Invocation.method(#isConsentFormAvailable, []), + returnValue: _i5.Future.value(false), + returnValueForMissingStub: _i5.Future.value(false), + ) + as _i5.Future); + @override - _i5.Future<_i4.ConsentStatus> getConsentStatus() => (super.noSuchMethod( - Invocation.method( - #getConsentStatus, - [], - ), - returnValue: - _i5.Future<_i4.ConsentStatus>.value(_i4.ConsentStatus.notRequired), - ) as _i5.Future<_i4.ConsentStatus>); + _i5.Future<_i4.ConsentStatus> getConsentStatus() => + (super.noSuchMethod( + Invocation.method(#getConsentStatus, []), + returnValue: _i5.Future<_i4.ConsentStatus>.value( + _i4.ConsentStatus.notRequired, + ), + returnValueForMissingStub: _i5.Future<_i4.ConsentStatus>.value( + _i4.ConsentStatus.notRequired, + ), + ) + as _i5.Future<_i4.ConsentStatus>); + + @override + _i5.Future reset() => + (super.noSuchMethod( + Invocation.method(#reset, []), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); + + @override + _i5.Future canRequestAds() => + (super.noSuchMethod( + Invocation.method(#canRequestAds, []), + returnValue: _i5.Future.value(false), + returnValueForMissingStub: _i5.Future.value(false), + ) + as _i5.Future); + @override - _i5.Future reset() => (super.noSuchMethod( - Invocation.method( - #reset, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + _i5.Future<_i4.PrivacyOptionsRequirementStatus> + getPrivacyOptionsRequirementStatus() => + (super.noSuchMethod( + Invocation.method(#getPrivacyOptionsRequirementStatus, []), + returnValue: _i5.Future<_i4.PrivacyOptionsRequirementStatus>.value( + _i4.PrivacyOptionsRequirementStatus.notRequired, + ), + returnValueForMissingStub: + _i5.Future<_i4.PrivacyOptionsRequirementStatus>.value( + _i4.PrivacyOptionsRequirementStatus.notRequired, + ), + ) + as _i5.Future<_i4.PrivacyOptionsRequirementStatus>); + @override void loadConsentForm( _i6.OnConsentFormLoadSuccessListener? successListener, _i6.OnConsentFormLoadFailureListener? failureListener, - ) => - super.noSuchMethod( - Invocation.method( - #loadConsentForm, - [ - successListener, - failureListener, - ], - ), - returnValueForMissingStub: null, - ); + ) => super.noSuchMethod( + Invocation.method(#loadConsentForm, [successListener, failureListener]), + returnValueForMissingStub: null, + ); + + @override + _i5.Future<_i7.FormError?> loadAndShowConsentFormIfRequired() => + (super.noSuchMethod( + Invocation.method(#loadAndShowConsentFormIfRequired, []), + returnValue: _i5.Future<_i7.FormError?>.value(), + returnValueForMissingStub: _i5.Future<_i7.FormError?>.value(), + ) + as _i5.Future<_i7.FormError?>); + @override void show( _i6.ConsentForm? consentForm, _i6.OnConsentFormDismissedListener? onConsentFormDismissedListener, - ) => - super.noSuchMethod( - Invocation.method( - #show, - [ - consentForm, - onConsentFormDismissedListener, - ], - ), - returnValueForMissingStub: null, - ); + ) => super.noSuchMethod( + Invocation.method(#show, [consentForm, onConsentFormDismissedListener]), + returnValueForMissingStub: null, + ); + + @override + _i5.Future<_i7.FormError?> showPrivacyOptionsForm() => + (super.noSuchMethod( + Invocation.method(#showPrivacyOptionsForm, []), + returnValue: _i5.Future<_i7.FormError?>.value(), + returnValueForMissingStub: _i5.Future<_i7.FormError?>.value(), + ) + as _i5.Future<_i7.FormError?>); + @override _i5.Future disposeConsentForm(_i6.ConsentForm? consentForm) => (super.noSuchMethod( - Invocation.method( - #disposeConsentForm, - [consentForm], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + Invocation.method(#disposeConsentForm, [consentForm]), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); } diff --git a/packages/google_mobile_ads/test/ump/consent_information_impl_test.dart b/packages/google_mobile_ads/test/ump/consent_information_impl_test.dart index 9baaa17da..9e8027e7f 100644 --- a/packages/google_mobile_ads/test/ump/consent_information_impl_test.dart +++ b/packages/google_mobile_ads/test/ump/consent_information_impl_test.dart @@ -47,8 +47,9 @@ void main() { test('getConsentStatus()', () async { ConsentStatus status = ConsentStatus.required; - when(mockChannel.getConsentStatus()) - .thenAnswer((_) => Future.value(status)); + when( + mockChannel.getConsentStatus(), + ).thenAnswer((_) => Future.value(status)); ConsentStatus responseStatus = await consentInfo.getConsentStatus(); @@ -57,8 +58,9 @@ void main() { }); test('isConsentFormAvailable()', () async { - when(mockChannel.isConsentFormAvailable()) - .thenAnswer((_) => Future.value(false)); + when( + mockChannel.isConsentFormAvailable(), + ).thenAnswer((_) => Future.value(false)); bool isConsentFormAvailable = await consentInfo.isConsentFormAvailable(); @@ -67,8 +69,9 @@ void main() { }); test('requestConsentInfoUpdate() success', () async { - when(mockChannel.requestConsentInfoUpdate(any, any, any)) - .thenAnswer((invocation) { + when(mockChannel.requestConsentInfoUpdate(any, any, any)).thenAnswer(( + invocation, + ) { invocation.positionalArguments[1](); }); @@ -77,9 +80,10 @@ void main() { Completer errorCompleter = Completer(); consentInfo.requestConsentInfoUpdate( - params, - () => successCompleter.complete(), - (error) => errorCompleter.complete(error)); + params, + () => successCompleter.complete(), + (error) => errorCompleter.complete(error), + ); await successCompleter.future; verify(mockChannel.requestConsentInfoUpdate(params, any, any)); @@ -89,8 +93,9 @@ void main() { test('requestConsentInfoUpdate() failure', () async { FormError formError = FormError(errorCode: 1, message: 'msg'); - when(mockChannel.requestConsentInfoUpdate(any, any, any)) - .thenAnswer((invocation) { + when(mockChannel.requestConsentInfoUpdate(any, any, any)).thenAnswer(( + invocation, + ) { invocation.positionalArguments[2](formError); }); @@ -99,9 +104,10 @@ void main() { Completer errorCompleter = Completer(); consentInfo.requestConsentInfoUpdate( - params, - () => successCompleter.complete(), - (error) => errorCompleter.complete(error)); + params, + () => successCompleter.complete(), + (error) => errorCompleter.complete(error), + ); FormError responseError = await errorCompleter.future; verify(mockChannel.requestConsentInfoUpdate(params, any, any)); @@ -109,5 +115,26 @@ void main() { expect(errorCompleter.isCompleted, true); expect(responseError, formError); }); + + test('canRequestAds()', () async { + when(mockChannel.canRequestAds()).thenAnswer((_) => Future.value(true)); + + bool canRequestAds = await consentInfo.canRequestAds(); + + verify(mockChannel.canRequestAds()); + expect(canRequestAds, true); + }); + + test('getPrivacyOptionsRequirementStatus()', () async { + when(mockChannel.getPrivacyOptionsRequirementStatus()).thenAnswer( + (_) => Future.value(PrivacyOptionsRequirementStatus.required), + ); + + PrivacyOptionsRequirementStatus status = await consentInfo + .getPrivacyOptionsRequirementStatus(); + + verify(mockChannel.getPrivacyOptionsRequirementStatus()); + expect(status, PrivacyOptionsRequirementStatus.required); + }); }); } diff --git a/packages/google_mobile_ads/test/ump/consent_information_impl_test.mocks.dart b/packages/google_mobile_ads/test/ump/consent_information_impl_test.mocks.dart index 6b8f13cbb..3edbd3b17 100644 --- a/packages/google_mobile_ads/test/ump/consent_information_impl_test.mocks.dart +++ b/packages/google_mobile_ads/test/ump/consent_information_impl_test.mocks.dart @@ -1,5 +1,5 @@ -// Mocks generated by Mockito 5.3.2 from annotations -// in google_mobile_ads/example/ios/.symlinks/plugins/google_mobile_ads/test/ump/consent_information_impl_test.dart. +// Mocks generated by Mockito 5.4.4 from annotations +// in google_mobile_ads/test/ump/consent_information_impl_test.dart. // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes @@ -9,6 +9,7 @@ import 'package:google_mobile_ads/src/ump/consent_form.dart' as _i6; import 'package:google_mobile_ads/src/ump/consent_information.dart' as _i4; import 'package:google_mobile_ads/src/ump/consent_request_parameters.dart' as _i3; +import 'package:google_mobile_ads/src/ump/form_error.dart' as _i7; import 'package:google_mobile_ads/src/ump/user_messaging_channel.dart' as _i2; import 'package:mockito/mockito.dart' as _i1; @@ -16,6 +17,8 @@ import 'package:mockito/mockito.dart' as _i1; // ignore_for_file: avoid_redundant_argument_values // ignore_for_file: avoid_setters_without_getters // ignore_for_file: comment_references +// ignore_for_file: deprecated_member_use +// ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member // ignore_for_file: prefer_const_constructors @@ -37,82 +40,101 @@ class MockUserMessagingChannel extends _i1.Mock _i3.ConsentRequestParameters? params, _i4.OnConsentInfoUpdateSuccessListener? successListener, _i4.OnConsentInfoUpdateFailureListener? failureListener, - ) => - super.noSuchMethod( - Invocation.method( - #requestConsentInfoUpdate, - [ - params, - successListener, - failureListener, - ], - ), - returnValueForMissingStub: null, - ); + ) => super.noSuchMethod( + Invocation.method(#requestConsentInfoUpdate, [ + params, + successListener, + failureListener, + ]), + returnValueForMissingStub: null, + ); + @override - _i5.Future isConsentFormAvailable() => (super.noSuchMethod( - Invocation.method( - #isConsentFormAvailable, - [], - ), - returnValue: _i5.Future.value(false), - ) as _i5.Future); + _i5.Future isConsentFormAvailable() => + (super.noSuchMethod( + Invocation.method(#isConsentFormAvailable, []), + returnValue: _i5.Future.value(false), + ) + as _i5.Future); + @override - _i5.Future<_i4.ConsentStatus> getConsentStatus() => (super.noSuchMethod( - Invocation.method( - #getConsentStatus, - [], - ), - returnValue: - _i5.Future<_i4.ConsentStatus>.value(_i4.ConsentStatus.notRequired), - ) as _i5.Future<_i4.ConsentStatus>); + _i5.Future<_i4.ConsentStatus> getConsentStatus() => + (super.noSuchMethod( + Invocation.method(#getConsentStatus, []), + returnValue: _i5.Future<_i4.ConsentStatus>.value( + _i4.ConsentStatus.notRequired, + ), + ) + as _i5.Future<_i4.ConsentStatus>); + @override - _i5.Future reset() => (super.noSuchMethod( - Invocation.method( - #reset, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + _i5.Future reset() => + (super.noSuchMethod( + Invocation.method(#reset, []), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); + + @override + _i5.Future canRequestAds() => + (super.noSuchMethod( + Invocation.method(#canRequestAds, []), + returnValue: _i5.Future.value(false), + ) + as _i5.Future); + + @override + _i5.Future<_i4.PrivacyOptionsRequirementStatus> + getPrivacyOptionsRequirementStatus() => + (super.noSuchMethod( + Invocation.method(#getPrivacyOptionsRequirementStatus, []), + returnValue: _i5.Future<_i4.PrivacyOptionsRequirementStatus>.value( + _i4.PrivacyOptionsRequirementStatus.notRequired, + ), + ) + as _i5.Future<_i4.PrivacyOptionsRequirementStatus>); + @override void loadConsentForm( _i6.OnConsentFormLoadSuccessListener? successListener, _i6.OnConsentFormLoadFailureListener? failureListener, - ) => - super.noSuchMethod( - Invocation.method( - #loadConsentForm, - [ - successListener, - failureListener, - ], - ), - returnValueForMissingStub: null, - ); + ) => super.noSuchMethod( + Invocation.method(#loadConsentForm, [successListener, failureListener]), + returnValueForMissingStub: null, + ); + + @override + _i5.Future<_i7.FormError?> loadAndShowConsentFormIfRequired() => + (super.noSuchMethod( + Invocation.method(#loadAndShowConsentFormIfRequired, []), + returnValue: _i5.Future<_i7.FormError?>.value(), + ) + as _i5.Future<_i7.FormError?>); + @override void show( _i6.ConsentForm? consentForm, _i6.OnConsentFormDismissedListener? onConsentFormDismissedListener, - ) => - super.noSuchMethod( - Invocation.method( - #show, - [ - consentForm, - onConsentFormDismissedListener, - ], - ), - returnValueForMissingStub: null, - ); + ) => super.noSuchMethod( + Invocation.method(#show, [consentForm, onConsentFormDismissedListener]), + returnValueForMissingStub: null, + ); + + @override + _i5.Future<_i7.FormError?> showPrivacyOptionsForm() => + (super.noSuchMethod( + Invocation.method(#showPrivacyOptionsForm, []), + returnValue: _i5.Future<_i7.FormError?>.value(), + ) + as _i5.Future<_i7.FormError?>); + @override _i5.Future disposeConsentForm(_i6.ConsentForm? consentForm) => (super.noSuchMethod( - Invocation.method( - #disposeConsentForm, - [consentForm], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + Invocation.method(#disposeConsentForm, [consentForm]), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); } diff --git a/packages/google_mobile_ads/test/ump/user_messaging_channel_test.dart b/packages/google_mobile_ads/test/ump/user_messaging_channel_test.dart index 2c43a1a75..0b92a19eb 100644 --- a/packages/google_mobile_ads/test/ump/user_messaging_channel_test.dart +++ b/packages/google_mobile_ads/test/ump/user_messaging_channel_test.dart @@ -29,31 +29,40 @@ void main() { late UserMessagingChannel channel; setUp(() async { methodChannel = MethodChannel( - 'test-channel', StandardMethodCodec(UserMessagingCodec())); + 'test-channel', + StandardMethodCodec(UserMessagingCodec()), + ); channel = UserMessagingChannel(methodChannel); }); test('requestConsentInfoUpdate() success', () async { ConsentRequestParameters params = ConsentRequestParameters( - tagForUnderAgeOfConsent: true, - consentDebugSettings: ConsentDebugSettings()); + tagForUnderAgeOfConsent: true, + consentDebugSettings: ConsentDebugSettings(), + ); TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger .setMockMethodCallHandler(methodChannel, (MethodCall call) async { - expect( - call.method, equals('ConsentInformation#requestConsentInfoUpdate')); - expect(call.arguments, equals({'params': params})); - return Future.value(); - }); + expect( + call.method, + equals('ConsentInformation#requestConsentInfoUpdate'), + ); + expect(call.arguments, equals({'params': params})); + return Future.value(); + }); Completer successCompleter = Completer(); Completer failureCompleter = Completer(); // Test function - channel.requestConsentInfoUpdate(params, () { - successCompleter.complete(); - }, (error) { - failureCompleter.complete(error); - }); + channel.requestConsentInfoUpdate( + params, + () { + successCompleter.complete(); + }, + (error) { + failureCompleter.complete(error); + }, + ); await successCompleter.future; expect(successCompleter.isCompleted, true); @@ -62,17 +71,25 @@ void main() { test('requestConsentInfoUpdate() failure', () async { ConsentRequestParameters params = ConsentRequestParameters( - tagForUnderAgeOfConsent: true, - consentDebugSettings: ConsentDebugSettings()); + tagForUnderAgeOfConsent: true, + consentDebugSettings: ConsentDebugSettings(), + ); TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger .setMockMethodCallHandler(methodChannel, (MethodCall call) async { - expect( - call.method, equals('ConsentInformation#requestConsentInfoUpdate')); - expect(call.arguments, equals({'params': params})); - return Future.error(PlatformException( - code: '1', message: 'message', details: 'details')); - }); + expect( + call.method, + equals('ConsentInformation#requestConsentInfoUpdate'), + ); + expect(call.arguments, equals({'params': params})); + return Future.error( + PlatformException( + code: '1', + message: 'message', + details: 'details', + ), + ); + }); Completer successCompleter = Completer(); Completer failureCompleter = Completer(); @@ -98,11 +115,13 @@ void main() { test('isConsentFormAvailable() true', () async { TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger .setMockMethodCallHandler(methodChannel, (MethodCall call) async { - expect( - call.method, equals('ConsentInformation#isConsentFormAvailable')); - expect(call.arguments, null); - return Future.value(true); - }); + expect( + call.method, + equals('ConsentInformation#isConsentFormAvailable'), + ); + expect(call.arguments, null); + return Future.value(true); + }); bool isAvailable = await channel.isConsentFormAvailable(); @@ -112,11 +131,13 @@ void main() { test('isConsentFormAvailable() false', () async { TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger .setMockMethodCallHandler(methodChannel, (MethodCall call) async { - expect( - call.method, equals('ConsentInformation#isConsentFormAvailable')); - expect(call.arguments, null); - return Future.value(false); - }); + expect( + call.method, + equals('ConsentInformation#isConsentFormAvailable'), + ); + expect(call.arguments, null); + return Future.value(false); + }); bool isAvailable = await channel.isConsentFormAvailable(); @@ -126,10 +147,10 @@ void main() { test('getConsentStatus()', () async { TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger .setMockMethodCallHandler(methodChannel, (MethodCall call) async { - expect(call.method, equals('ConsentInformation#getConsentStatus')); - expect(call.arguments, null); - return Future.value(1); - }); + expect(call.method, equals('ConsentInformation#getConsentStatus')); + expect(call.arguments, null); + return Future.value(1); + }); ConsentStatus status = await channel.getConsentStatus(); @@ -141,10 +162,10 @@ void main() { dynamic arguments; TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger .setMockMethodCallHandler(methodChannel, (MethodCall call) async { - method = call.method; - arguments = call.arguments; - return Future.value(); - }); + method = call.method; + arguments = call.arguments; + return Future.value(); + }); await channel.reset(); @@ -158,18 +179,19 @@ void main() { ConsentForm consentForm = ConsentFormImpl(1); TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger .setMockMethodCallHandler(methodChannel, (MethodCall call) async { - method = call.method; - arguments = call.arguments; - return Future.value(consentForm); - }); + method = call.method; + arguments = call.arguments; + return Future.value(consentForm); + }); Completer successCompleter = Completer(); Completer failureCompleter = Completer(); // Test function channel.loadConsentForm( - (consentForm) => successCompleter.complete(consentForm), - (formError) => failureCompleter.complete(formError)); + (consentForm) => successCompleter.complete(consentForm), + (formError) => failureCompleter.complete(formError), + ); ConsentForm response = await successCompleter.future; expect(successCompleter.isCompleted, true); @@ -184,18 +206,21 @@ void main() { dynamic arguments; TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger .setMockMethodCallHandler(methodChannel, (MethodCall call) async { - method = call.method; - arguments = call.arguments; - return Future.error(PlatformException(code: '2', message: 'message')); - }); + method = call.method; + arguments = call.arguments; + return Future.error( + PlatformException(code: '2', message: 'message'), + ); + }); Completer successCompleter = Completer(); Completer failureCompleter = Completer(); // Test function channel.loadConsentForm( - (consentForm) => successCompleter.complete(consentForm), - (formError) => failureCompleter.complete(formError)); + (consentForm) => successCompleter.complete(consentForm), + (formError) => failureCompleter.complete(formError), + ); FormError error = await failureCompleter.future; expect(successCompleter.isCompleted, false); @@ -211,10 +236,10 @@ void main() { ConsentFormImpl consentForm = ConsentFormImpl(1); TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger .setMockMethodCallHandler(methodChannel, (MethodCall call) async { - method = call.method; - arguments = call.arguments; - return Future.value(); - }); + method = call.method; + arguments = call.arguments; + return Future.value(); + }); Completer successCompleter = Completer(); @@ -234,10 +259,10 @@ void main() { ConsentFormImpl consentForm = ConsentFormImpl(1); TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger .setMockMethodCallHandler(methodChannel, (MethodCall call) async { - method = call.method; - arguments = call.arguments; - return Future.error(PlatformException(code: '55', message: 'msg')); - }); + method = call.method; + arguments = call.arguments; + return Future.error(PlatformException(code: '55', message: 'msg')); + }); Completer successCompleter = Completer(); @@ -256,10 +281,10 @@ void main() { dynamic arguments; TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger .setMockMethodCallHandler(methodChannel, (MethodCall call) async { - method = call.method; - arguments = call.arguments; - return Future.value(); - }); + method = call.method; + arguments = call.arguments; + return Future.value(); + }); ConsentForm consentForm = ConsentFormImpl(1); await channel.disposeConsentForm(consentForm); @@ -267,5 +292,169 @@ void main() { expect(method, equals('ConsentForm#dispose')); expect(arguments, {'consentForm': consentForm}); }); + + test('canRequestAds()', () async { + TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger + .setMockMethodCallHandler(methodChannel, (call) async { + expect(call.method, equals('ConsentInformation#canRequestAds')); + expect(call.arguments, null); + return Future.value(true); + }); + + bool canRequestAds = await channel.canRequestAds(); + + expect(canRequestAds, true); + }); + + test('getPrivacyOptionsRequirementStatus() maps 1 to required', () async { + TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger + .setMockMethodCallHandler(methodChannel, (call) async { + expect( + call.method, + equals('ConsentInformation#getPrivacyOptionsRequirementStatus'), + ); + expect(call.arguments, null); + return Future.value(1); + }); + + PrivacyOptionsRequirementStatus privacyStatus = await channel + .getPrivacyOptionsRequirementStatus(); + + expect(privacyStatus, PrivacyOptionsRequirementStatus.required); + }); + + test( + 'getPrivacyOptionsRequirementStatus() maps 0 to notRequired', + () async { + TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger + .setMockMethodCallHandler(methodChannel, (call) async { + expect( + call.method, + equals('ConsentInformation#getPrivacyOptionsRequirementStatus'), + ); + expect(call.arguments, null); + return Future.value(0); + }); + + PrivacyOptionsRequirementStatus privacyStatus = await channel + .getPrivacyOptionsRequirementStatus(); + + expect(privacyStatus, PrivacyOptionsRequirementStatus.notRequired); + }, + ); + + test('loadAndShowConsentFormIfRequired() success', () async { + TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger + .setMockMethodCallHandler(methodChannel, (call) async { + expect( + call.method, + equals('UserMessagingPlatform#loadAndShowConsentFormIfRequired'), + ); + expect(call.arguments, null); + return Future.value(); + }); + Completer successCompleter = Completer(); + + successCompleter.complete(channel.loadAndShowConsentFormIfRequired()); + + FormError? error = await successCompleter.future; + expect(error, null); + }); + + test('loadAndShowConsentFormIfRequired() failure', () async { + FormError? testError = FormError(errorCode: 55, message: 'msg'); + TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger + .setMockMethodCallHandler(methodChannel, (call) async { + expect( + call.method, + equals('UserMessagingPlatform#loadAndShowConsentFormIfRequired'), + ); + expect(call.arguments, null); + return Future.value(testError); + }); + Completer failureCompleter = Completer(); + + failureCompleter.complete(channel.loadAndShowConsentFormIfRequired()); + + FormError? error = await failureCompleter.future; + expect(failureCompleter.isCompleted, true); + expect(error, testError); + }); + + test('loadAndShowConsentFormIfRequired() error', () async { + TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger + .setMockMethodCallHandler(methodChannel, (call) async { + expect( + call.method, + equals('UserMessagingPlatform#loadAndShowConsentFormIfRequired'), + ); + expect(call.arguments, null); + return Future.error(PlatformException(code: '55', message: 'msg')); + }); + Completer errorCompleter = Completer(); + + errorCompleter.complete(channel.loadAndShowConsentFormIfRequired()); + + FormError? error = await errorCompleter.future; + expect(errorCompleter.isCompleted, true); + expect(error, FormError(errorCode: 55, message: 'msg')); + }); + + test('showPrivacyOptionsForm() success', () async { + TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger + .setMockMethodCallHandler(methodChannel, (call) async { + expect( + call.method, + equals('UserMessagingPlatform#showPrivacyOptionsForm'), + ); + expect(call.arguments, null); + return Future.value(); + }); + Completer successCompleter = Completer(); + + successCompleter.complete(channel.showPrivacyOptionsForm()); + + FormError? error = await successCompleter.future; + expect(error, null); + }); + + test('showPrivacyOptionsForm() failure', () async { + FormError? testError = FormError(errorCode: 55, message: 'msg'); + TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger + .setMockMethodCallHandler(methodChannel, (call) async { + expect( + call.method, + equals('UserMessagingPlatform#showPrivacyOptionsForm'), + ); + expect(call.arguments, null); + return Future.value(testError); + }); + Completer failureCompleter = Completer(); + + failureCompleter.complete(channel.showPrivacyOptionsForm()); + + FormError? error = await failureCompleter.future; + expect(failureCompleter.isCompleted, true); + expect(error, testError); + }); + + test('showPrivacyOptionsForm() error', () async { + TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger + .setMockMethodCallHandler(methodChannel, (call) async { + expect( + call.method, + equals('UserMessagingPlatform#showPrivacyOptionsForm'), + ); + expect(call.arguments, null); + return Future.error(PlatformException(code: '55', message: 'msg')); + }); + Completer errorCompleter = Completer(); + + errorCompleter.complete(channel.showPrivacyOptionsForm()); + + FormError? error = await errorCompleter.future; + expect(errorCompleter.isCompleted, true); + expect(error, FormError(errorCode: 55, message: 'msg')); + }); }); } diff --git a/packages/google_mobile_ads/test/ump/user_messaging_codec_test.dart b/packages/google_mobile_ads/test/ump/user_messaging_codec_test.dart index d4d05287e..6f89bc14b 100644 --- a/packages/google_mobile_ads/test/ump/user_messaging_codec_test.dart +++ b/packages/google_mobile_ads/test/ump/user_messaging_codec_test.dart @@ -41,7 +41,8 @@ void main() { test('encode and decode ConsentDebugSettings only geography', () async { ConsentDebugSettings debugSettings = ConsentDebugSettings( - debugGeography: DebugGeography.debugGeographyDisabled); + debugGeography: DebugGeography.debugGeographyDisabled, + ); ByteData? byteData = codec.encodeMessage(debugSettings); ConsentDebugSettings decodedDebugSettings = codec.decodeMessage(byteData); expect(debugSettings, decodedDebugSettings); @@ -49,7 +50,8 @@ void main() { test('encode and decode ConsentDebugSettings only testIds', () async { ConsentDebugSettings debugSettings = ConsentDebugSettings( - testIdentifiers: ['test-identifier1', 'test-identifier2']); + testIdentifiers: ['test-identifier1', 'test-identifier2'], + ); ByteData? byteData = codec.encodeMessage(debugSettings); ConsentDebugSettings decodedDebugSettings = codec.decodeMessage(byteData); expect(debugSettings, equals(decodedDebugSettings)); @@ -57,8 +59,9 @@ void main() { test('encode and decode ConsentDebugSettings testIds and geo', () async { ConsentDebugSettings debugSettings = ConsentDebugSettings( - debugGeography: DebugGeography.debugGeographyEea, - testIdentifiers: ['test-identifier1', 'test-identifier2']); + debugGeography: DebugGeography.debugGeographyEea, + testIdentifiers: ['test-identifier1', 'test-identifier2'], + ); ByteData? byteData = codec.encodeMessage(debugSettings); ConsentDebugSettings decodedDebugSettings = codec.decodeMessage(byteData); expect(debugSettings, equals(decodedDebugSettings)); @@ -70,5 +73,12 @@ void main() { ConsentForm decodedConsentForm = codec.decodeMessage(byteData); expect(decodedConsentForm, equals(consentFormImpl)); }); + + test('encode and decode FormError', () async { + FormError formError = FormError(errorCode: 123, message: 'testError'); + ByteData? byteData = codec.encodeMessage(formError); + FormError decodedFormError = codec.decodeMessage(byteData); + expect(decodedFormError, equals(formError)); + }); }); } diff --git a/packages/mediation/gma_mediation_applovin/.gitignore b/packages/mediation/gma_mediation_applovin/.gitignore new file mode 100644 index 000000000..ac5aa9893 --- /dev/null +++ b/packages/mediation/gma_mediation_applovin/.gitignore @@ -0,0 +1,29 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. +/pubspec.lock +**/doc/api/ +.dart_tool/ +build/ diff --git a/packages/mediation/gma_mediation_applovin/.metadata b/packages/mediation/gma_mediation_applovin/.metadata new file mode 100644 index 000000000..5a15fe0d0 --- /dev/null +++ b/packages/mediation/gma_mediation_applovin/.metadata @@ -0,0 +1,33 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "41456452f29d64e8deb623a3c927524bcf9f111b" + channel: "stable" + +project_type: plugin + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: 41456452f29d64e8deb623a3c927524bcf9f111b + base_revision: 41456452f29d64e8deb623a3c927524bcf9f111b + - platform: android + create_revision: 41456452f29d64e8deb623a3c927524bcf9f111b + base_revision: 41456452f29d64e8deb623a3c927524bcf9f111b + - platform: ios + create_revision: 41456452f29d64e8deb623a3c927524bcf9f111b + base_revision: 41456452f29d64e8deb623a3c927524bcf9f111b + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/packages/mediation/gma_mediation_applovin/CHANGELOG.md b/packages/mediation/gma_mediation_applovin/CHANGELOG.md new file mode 100644 index 000000000..89c91f4c4 --- /dev/null +++ b/packages/mediation/gma_mediation_applovin/CHANGELOG.md @@ -0,0 +1,68 @@ +## AppLovin Flutter Mediation Adapter Changelog + +#### Version 2.5.1 +- Supports [AppLovin Android adapter version 13.5.1.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/applovin/CHANGELOG.md#version-13510). +- Supports [AppLovin iOS adapter version 13.5.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/AppLovin/CHANGELOG.md#version-13500). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 2.5.0 +- Supports [AppLovin Android adapter version 13.5.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/applovin/CHANGELOG.md#version-13500). +- Supports [AppLovin iOS adapter version 13.5.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/AppLovin/CHANGELOG.md#version-13500). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 2.4.0 +- Supports [AppLovin Android adapter version 13.4.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/applovin/CHANGELOG.md#version-13400). +- Supports [AppLovin iOS adapter version 13.4.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/AppLovin/CHANGELOG.md#version-13400). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 2.3.2 +- Supports [AppLovin Android adapter version 13.3.1.1](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/applovin/CHANGELOG.md#version-13311). +- Supports [AppLovin iOS adapter version 13.3.1.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/AppLovin/CHANGELOG.md#version-13310). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 2.3.1 +- Supports [AppLovin Android adapter version 13.3.1.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/applovin/CHANGELOG.md#version-13310). +- Supports [AppLovin iOS adapter version 13.3.1.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/AppLovin/CHANGELOG.md#version-13310). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 2.3.0 +- Supports [AppLovin Android adapter version 13.3.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/applovin/CHANGELOG.md#version-13300). +- Supports [AppLovin iOS adapter version 13.3.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/AppLovin/CHANGELOG.md#version-13300). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 2.2.1 +- Supports [AppLovin Android adapter version 13.2.0.1](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/applovin/CHANGELOG.md#version-13201). +- Supports [AppLovin iOS adapter version 13.2.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/AppLovin/CHANGELOG.md#version-13200). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 2.2.0 +- Supports [AppLovin Android adapter version 13.2.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/applovin/CHANGELOG.md#version-13200). +- Supports [AppLovin iOS adapter version 13.2.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/AppLovin/CHANGELOG.md#version-13200). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 2.1.0 +- Supports [AppLovin Android adapter version 13.1.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/applovin/CHANGELOG.md#version-13100). +- Supports [AppLovin iOS adapter version 13.1.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/AppLovin/CHANGELOG.md#version-13100). +* Built and tested with the Google Mobile Ads Flutter Plugin version 5.3.1. + +#### Version 2.0.0 +- Supports [AppLovin Android adapter version 13.0.1.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/applovin/CHANGELOG.md#version-13010). +- Supports [AppLovin iOS adapter version 13.0.1.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/AppLovin/CHANGELOG.md#version-13010). +* Built and tested with the Google Mobile Ads Flutter Plugin version 5.3.1. + +#### Version 1.2.0 +- Supports [AppLovin Android adapter version 12.6.1.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/applovin/CHANGELOG.md#version-12610). +- Supports [AppLovin iOS adapter version 12.6.1.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/AppLovin/CHANGELOG.md#version-12610). +* Built and tested with the Google Mobile Ads Flutter Plugin version 5.1.0. + +#### Version 1.1.0 +- API for the GmaMediationApplovin is no longer static. +- Supports [AppLovin Android adapter version 12.4.3.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/applovin/CHANGELOG.md#version-12430). +- Supports [AppLovin iOS adapter version 12.4.2.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/AppLovin/CHANGELOG.md#version-12420). +* Built and tested with the Google Mobile Ads Flutter Plugin version 5.1.0. + +#### Version 1.0.0 +* Initial release. +- Supports [AppLovin Android adapter version 12.3.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/applovin/CHANGELOG.md#version-12300). +- Supports [AppLovin iOS adapter version 12.2.1.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/AppLovin/CHANGELOG.md#version-12210). +* Built and tested with the Google Mobile Ads Flutter Plugin version 5.0.0. diff --git a/packages/mediation/gma_mediation_applovin/LICENSE b/packages/mediation/gma_mediation_applovin/LICENSE new file mode 100644 index 000000000..e58143fcc --- /dev/null +++ b/packages/mediation/gma_mediation_applovin/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 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. diff --git a/packages/mediation/gma_mediation_applovin/README.md b/packages/mediation/gma_mediation_applovin/README.md new file mode 100644 index 000000000..369e7c757 --- /dev/null +++ b/packages/mediation/gma_mediation_applovin/README.md @@ -0,0 +1,36 @@ +# Google Mobile Ads Mediation of AppLovin for Flutter + +[![gma_mediation_applovin](https://github.com/googleads/googleads-mobile-flutter/actions/workflows/google_mobile_ads.yaml/badge.svg)](https://github.com/googleads/googleads-mobile-flutter/actions/workflows/google_mobile_ads.yaml) + +This repository contains the source code for the Mediation AppLovin Flutter +plugin to be used with the Google Mobile Ads plugin. It enables mediation of the +AppLovin Ad Network through the Google Mobile Ads SDK. + +This plugin use the [Pigeon Flutter plugin](https://pub.dev/packages/pigeon) to +generate the classes that bridge the dart layer with each platform's code. +To add or modify the third party sdk, use the classes in the pigeons folder +following [this guide](https://github.com/flutter/packages/blob/main/packages/pigeon/example/README.md). + +## Documentation +For instructions on how to use with the google_mobile_ads plugin, refer to the +developer guide for [AppLovin](https://developers.google.com/admob/flutter/mediation/applovin). + +## Downloads + +See [pub.dev](https://pub.dev/packages/gma_mediation_applovin/versions) for the +latest releases of the plugin. + +## Suggesting improvements + +To file bugs, make feature requests, or to suggest other improvements, please +use [github's issue tracker](https://github.com/googleads/googleads-mobile-flutter/issues). + + +## Other resources + +* [AdMob help center](https://support.google.com/admob/?hl=en#topic=7383088) +* [Ad Manager help center](https://support.google.com/admanager/?hl=en#topic=7505988) + +## License + +[Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0) \ No newline at end of file diff --git a/packages/mediation/gma_mediation_applovin/analysis_options.yaml b/packages/mediation/gma_mediation_applovin/analysis_options.yaml new file mode 100644 index 000000000..b52daef95 --- /dev/null +++ b/packages/mediation/gma_mediation_applovin/analysis_options.yaml @@ -0,0 +1,19 @@ +# 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 +# +# https://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. + +include: package:lint/package.yaml + +analyzer: + exclude: + - '**.g.dart' diff --git a/packages/mediation/gma_mediation_applovin/android/.gitignore b/packages/mediation/gma_mediation_applovin/android/.gitignore new file mode 100644 index 000000000..161bdcdaf --- /dev/null +++ b/packages/mediation/gma_mediation_applovin/android/.gitignore @@ -0,0 +1,9 @@ +*.iml +.gradle +/local.properties +/.idea/workspace.xml +/.idea/libraries +.DS_Store +/build +/captures +.cxx diff --git a/packages/mediation/gma_mediation_applovin/android/build.gradle b/packages/mediation/gma_mediation_applovin/android/build.gradle new file mode 100644 index 000000000..5c58a90a3 --- /dev/null +++ b/packages/mediation/gma_mediation_applovin/android/build.gradle @@ -0,0 +1,86 @@ +group 'io.flutter.plugins.googlemobileads.mediation.gma_mediation_applovin' +version = "2.5.1" + +buildscript { + ext.kotlin_version = '2.0.21' + repositories { + google() + mavenCentral() + } + + dependencies { + classpath 'com.android.tools.build:gradle:8.0.2' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + +allprojects { + repositories { + google() + mavenCentral() + } +} + +apply plugin: 'com.android.library' +apply plugin: 'kotlin-android' + +ext { + stringVersion = "13.5.1.0" +} + +android { + if (project.android.hasProperty("namespace")) { + namespace 'io.flutter.plugins.googlemobileads.mediation.gma_mediation_applovin' + } + + compileSdkVersion 34 + + compileOptions { + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + test.java.srcDirs += 'src/test/kotlin' + } + + defaultConfig { + minSdkVersion 23 + } + + dependencies { + implementation 'com.applovin:applovin-sdk:13.1.0' + implementation "com.google.ads.mediation:applovin:$stringVersion" + implementation 'com.google.android.gms:play-services-ads:23.6.0' + implementation 'androidx.core:core-ktx:1.8.0' + testImplementation 'junit:junit:4.13.2' + testImplementation 'androidx.test:core:1.5.0' + testImplementation 'androidx.test:core-ktx:1.5.0' + testImplementation 'androidx.test.ext:junit:1.1.5' + testImplementation 'org.jetbrains.kotlin:kotlin-stdlib:1.8.20' + testImplementation 'org.mockito:mockito-core:5.5.0' + testImplementation 'org.mockito.kotlin:mockito-kotlin:5.1.0' + testImplementation 'org.robolectric:robolectric:4.10.3' + } + + testOptions { + unitTests.all { + useJUnit() + + testLogging { + events "passed", "skipped", "failed", "standardOut", "standardError" + outputs.upToDateWhen {false} + showStandardStreams = true + } + } + unitTests { + includeAndroidResources = true + unitTests.returnDefaultValues = true + } + } +} diff --git a/packages/mediation/gma_mediation_applovin/android/gradle.properties b/packages/mediation/gma_mediation_applovin/android/gradle.properties new file mode 100644 index 000000000..d015431a8 --- /dev/null +++ b/packages/mediation/gma_mediation_applovin/android/gradle.properties @@ -0,0 +1,2 @@ +android.useAndroidX=true +android.enableJetifier=true \ No newline at end of file diff --git a/packages/mediation/gma_mediation_applovin/android/gradle/wrapper/gradle-wrapper.properties b/packages/mediation/gma_mediation_applovin/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 000000000..62f495dfe --- /dev/null +++ b/packages/mediation/gma_mediation_applovin/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,7 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip +networkTimeout=10000 +validateDistributionUrl=true +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/packages/mediation/gma_mediation_applovin/android/settings.gradle b/packages/mediation/gma_mediation_applovin/android/settings.gradle new file mode 100644 index 000000000..896a3567d --- /dev/null +++ b/packages/mediation/gma_mediation_applovin/android/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'gma_mediation_applovin' diff --git a/packages/mediation/gma_mediation_applovin/android/src/main/AndroidManifest.xml b/packages/mediation/gma_mediation_applovin/android/src/main/AndroidManifest.xml new file mode 100644 index 000000000..66e1ed28c --- /dev/null +++ b/packages/mediation/gma_mediation_applovin/android/src/main/AndroidManifest.xml @@ -0,0 +1,3 @@ + + diff --git a/packages/mediation/gma_mediation_applovin/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_applovin/AppLovinFlutterMediationExtras.kt b/packages/mediation/gma_mediation_applovin/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_applovin/AppLovinFlutterMediationExtras.kt new file mode 100644 index 000000000..13da718d1 --- /dev/null +++ b/packages/mediation/gma_mediation_applovin/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_applovin/AppLovinFlutterMediationExtras.kt @@ -0,0 +1,48 @@ +// 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 +// +// https://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. + +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_applovin + +import android.os.Bundle +import android.util.Pair +import androidx.core.os.bundleOf +import com.applovin.mediation.ApplovinAdapter +import com.applovin.mediation.AppLovinExtras +import com.google.android.gms.ads.mediation.MediationExtrasReceiver +import io.flutter.plugins.googlemobileads.FlutterMediationExtras + +class AppLovinFlutterMediationExtras : FlutterMediationExtras() { + private var flutterExtras: Map? = null + + override fun setMediationExtras(extras: MutableMap) { + flutterExtras = extras + } + + override fun getMediationExtras(): Pair, Bundle> { + val extrasMap = flutterExtras + if (extrasMap == null) { + return Pair, Bundle>(ApplovinAdapter::class.java, bundleOf()) + } + var extrasBundle = bundleOf() + val isMutedValue = extrasMap[IS_MUTED] + if (isMutedValue is Boolean) { + extrasBundle = AppLovinExtras.Builder().setMuteAudio(isMutedValue).build() + } + return Pair, Bundle>(ApplovinAdapter::class.java, extrasBundle) + } + + companion object { + private const val IS_MUTED = "isMuted" + } +} diff --git a/packages/mediation/gma_mediation_applovin/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_applovin/AppLovinSDKApi.g.kt b/packages/mediation/gma_mediation_applovin/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_applovin/AppLovinSDKApi.g.kt new file mode 100644 index 000000000..638e9197f --- /dev/null +++ b/packages/mediation/gma_mediation_applovin/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_applovin/AppLovinSDKApi.g.kt @@ -0,0 +1,130 @@ +// Autogenerated from Pigeon (v22.7.2), do not edit directly. +// See also: https://pub.dev/packages/pigeon +@file:Suppress("UNCHECKED_CAST", "ArrayInDataClass") + +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_applovin + +import android.util.Log +import io.flutter.plugin.common.BasicMessageChannel +import io.flutter.plugin.common.BinaryMessenger +import io.flutter.plugin.common.MessageCodec +import io.flutter.plugin.common.StandardMessageCodec +import java.io.ByteArrayOutputStream +import java.nio.ByteBuffer + +private fun wrapResult(result: Any?): List { + return listOf(result) +} + +private fun wrapError(exception: Throwable): List { + return if (exception is FlutterError) { + listOf(exception.code, exception.message, exception.details) + } else { + listOf( + exception.javaClass.simpleName, + exception.toString(), + "Cause: " + exception.cause + ", Stacktrace: " + Log.getStackTraceString(exception), + ) + } +} + +/** + * Error class for passing custom error details to Flutter via a thrown PlatformException. + * + * @property code The error code. + * @property message The error message. + * @property details The error details. Must be a datatype supported by the api codec. + */ +class FlutterError( + val code: String, + override val message: String? = null, + val details: Any? = null, +) : Throwable() + +private open class AppLovinSDKApiPigeonCodec : StandardMessageCodec() { + override fun readValueOfType(type: Byte, buffer: ByteBuffer): Any? { + return super.readValueOfType(type, buffer) + } + + override fun writeValue(stream: ByteArrayOutputStream, value: Any?) { + super.writeValue(stream, value) + } +} + +/** + * The generated classes set the channels to call the methods in the corresponding kotlin + * AppLovinSDKApi interface and swift AppLovinSDKApi protocol from the dart layer. + * + * Generated interface from Pigeon that represents a handler of messages from Flutter. + */ +interface AppLovinSDKApi { + /** Used to configure GDPR consent on the Android or iOS AppLovin SDK */ + fun setHasUserConsent(hasUserConsent: Boolean) + + /** Used to opt out of the sale of personal information in AppLovin SDK. */ + fun setDoNotSell(doNotSell: Boolean) + + companion object { + /** The codec used by AppLovinSDKApi. */ + val codec: MessageCodec by lazy { AppLovinSDKApiPigeonCodec() } + + /** Sets up an instance of `AppLovinSDKApi` to handle messages through the `binaryMessenger`. */ + @JvmOverloads + fun setUp( + binaryMessenger: BinaryMessenger, + api: AppLovinSDKApi?, + messageChannelSuffix: String = "", + ) { + val separatedMessageChannelSuffix = + if (messageChannelSuffix.isNotEmpty()) ".$messageChannelSuffix" else "" + run { + val channel = + BasicMessageChannel( + binaryMessenger, + "dev.flutter.pigeon.gma_mediation_applovin.AppLovinSDKApi.setHasUserConsent$separatedMessageChannelSuffix", + codec, + ) + if (api != null) { + channel.setMessageHandler { message, reply -> + val args = message as List + val hasUserConsentArg = args[0] as Boolean + val wrapped: List = + try { + api.setHasUserConsent(hasUserConsentArg) + listOf(null) + } catch (exception: Throwable) { + wrapError(exception) + } + reply.reply(wrapped) + } + } else { + channel.setMessageHandler(null) + } + } + run { + val channel = + BasicMessageChannel( + binaryMessenger, + "dev.flutter.pigeon.gma_mediation_applovin.AppLovinSDKApi.setDoNotSell$separatedMessageChannelSuffix", + codec, + ) + if (api != null) { + channel.setMessageHandler { message, reply -> + val args = message as List + val doNotSellArg = args[0] as Boolean + val wrapped: List = + try { + api.setDoNotSell(doNotSellArg) + listOf(null) + } catch (exception: Throwable) { + wrapError(exception) + } + reply.reply(wrapped) + } + } else { + channel.setMessageHandler(null) + } + } + } + } +} diff --git a/packages/mediation/gma_mediation_applovin/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_applovin/GmaMediationApplovinPlugin.kt b/packages/mediation/gma_mediation_applovin/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_applovin/GmaMediationApplovinPlugin.kt new file mode 100644 index 000000000..c7b3701ff --- /dev/null +++ b/packages/mediation/gma_mediation_applovin/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_applovin/GmaMediationApplovinPlugin.kt @@ -0,0 +1,51 @@ +// 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 +// +// https://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. + +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_applovin + +import android.content.Context +import com.applovin.sdk.AppLovinPrivacySettings +import io.flutter.embedding.engine.plugins.FlutterPlugin +import io.flutter.embedding.engine.plugins.activity.ActivityAware +import io.flutter.embedding.engine.plugins.activity.ActivityPluginBinding + +/** Links the Android dependency of the AppLovin Adapter and calls the AppLovin SDK APIs. */ +class GmaMediationApplovinPlugin : FlutterPlugin, ActivityAware, AppLovinSDKApi { + private lateinit var context: Context + + override fun onAttachedToEngine(flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) { + context = flutterPluginBinding.applicationContext + AppLovinSDKApi.setUp(flutterPluginBinding.binaryMessenger, this) + } + + override fun onDetachedFromEngine(binding: FlutterPlugin.FlutterPluginBinding) { + AppLovinSDKApi.setUp(binding.binaryMessenger, null) + } + + override fun setHasUserConsent(hasUserConsent: Boolean) { + AppLovinPrivacySettings.setHasUserConsent(hasUserConsent, context) + } + + override fun setDoNotSell(doNotSell: Boolean) { + AppLovinPrivacySettings.setDoNotSell(doNotSell, context) + } + + override fun onDetachedFromActivity() {} + + override fun onReattachedToActivityForConfigChanges(binding: ActivityPluginBinding) {} + + override fun onAttachedToActivity(binding: ActivityPluginBinding) {} + + override fun onDetachedFromActivityForConfigChanges() {} +} diff --git a/packages/mediation/gma_mediation_applovin/android/src/test/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_applovin/GmaMediationApplovinPluginTest.kt b/packages/mediation/gma_mediation_applovin/android/src/test/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_applovin/GmaMediationApplovinPluginTest.kt new file mode 100644 index 000000000..6a91d9d9b --- /dev/null +++ b/packages/mediation/gma_mediation_applovin/android/src/test/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_applovin/GmaMediationApplovinPluginTest.kt @@ -0,0 +1,68 @@ +// 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 +// +// https://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. + +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_applovin + +import android.content.Context +import androidx.test.core.app.ApplicationProvider +import androidx.test.ext.junit.runners.AndroidJUnit4 +import com.applovin.sdk.AppLovinPrivacySettings +import io.flutter.embedding.engine.plugins.FlutterPlugin +import io.flutter.plugin.common.BinaryMessenger +import org.junit.Test +import org.junit.runner.RunWith +import org.mockito.Mockito.mockStatic +import org.mockito.kotlin.doReturn +import org.mockito.kotlin.eq +import org.mockito.kotlin.mock +import org.mockito.kotlin.verify + +@RunWith(AndroidJUnit4::class) +internal class GmaMediationApplovinPluginTest { + private val context = ApplicationProvider.getApplicationContext() + private val mockBinaryMessenger = mock() + private val mockFlutterPluginBinding = + mock { + on { applicationContext } doReturn context + on { binaryMessenger } doReturn mockBinaryMessenger + } + + @Test + fun setHasUserConsent_withTrueValue_invokesSetHasUserConsent() { + val plugin = GmaMediationApplovinPlugin() + mockStatic(AppLovinPrivacySettings::class.java).use { mockedAppLovinPrivacySettings -> + plugin.onAttachedToEngine(mockFlutterPluginBinding) + + plugin.setHasUserConsent(true) + + mockedAppLovinPrivacySettings.verify { + AppLovinPrivacySettings.setHasUserConsent(eq(true), eq(context)) + } + } + } + + @Test + fun setDoNotSell_withTrueValue_invokesSetDoNotSell() { + val plugin = GmaMediationApplovinPlugin() + mockStatic(AppLovinPrivacySettings::class.java).use { mockedAppLovinPrivacySettings -> + plugin.onAttachedToEngine(mockFlutterPluginBinding) + + plugin.setDoNotSell(true) + + mockedAppLovinPrivacySettings.verify { + AppLovinPrivacySettings.setDoNotSell(eq(true), eq(context)) + } + } + } +} diff --git a/samples/admob/adaptive_banner_example/.gitignore b/packages/mediation/gma_mediation_applovin/example/.gitignore similarity index 98% rename from samples/admob/adaptive_banner_example/.gitignore rename to packages/mediation/gma_mediation_applovin/example/.gitignore index 24476c5d1..29a3a5017 100644 --- a/samples/admob/adaptive_banner_example/.gitignore +++ b/packages/mediation/gma_mediation_applovin/example/.gitignore @@ -27,7 +27,6 @@ migrate_working_dir/ .dart_tool/ .flutter-plugins .flutter-plugins-dependencies -.packages .pub-cache/ .pub/ /build/ diff --git a/packages/mediation/gma_mediation_applovin/example/README.md b/packages/mediation/gma_mediation_applovin/example/README.md new file mode 100644 index 000000000..960340425 --- /dev/null +++ b/packages/mediation/gma_mediation_applovin/example/README.md @@ -0,0 +1,17 @@ +# gma_mediation_applovin_example + +Learn how to integrate with your app that uses the [google_mobile_ads](https://pub.dev/packages/google_mobile_ads) plugin +by following the [development guide](https://developers.google.com/admob/flutter/mediation/applovin). + +## Getting Started + +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) + +For help getting started with Flutter development, view the +[online documentation](https://docs.flutter.dev/), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/samples/admob/adaptive_banner_example/analysis_options.yaml b/packages/mediation/gma_mediation_applovin/example/analysis_options.yaml similarity index 93% rename from samples/admob/adaptive_banner_example/analysis_options.yaml rename to packages/mediation/gma_mediation_applovin/example/analysis_options.yaml index 61b6c4de1..0d2902135 100644 --- a/samples/admob/adaptive_banner_example/analysis_options.yaml +++ b/packages/mediation/gma_mediation_applovin/example/analysis_options.yaml @@ -13,8 +13,7 @@ linter: # The lint rules applied to this project can be customized in the # section below to disable rules from the `package:flutter_lints/flutter.yaml` # included above or to enable additional rules. A list of all available lints - # and their documentation is published at - # https://dart-lang.github.io/linter/lints/index.html. + # and their documentation is published at https://dart.dev/lints. # # Instead of disabling a lint rule for the entire project in the # section below, it can also be suppressed for a single line of code diff --git a/samples/admob/adaptive_banner_example/android/.gitignore b/packages/mediation/gma_mediation_applovin/example/android/.gitignore similarity index 100% rename from samples/admob/adaptive_banner_example/android/.gitignore rename to packages/mediation/gma_mediation_applovin/example/android/.gitignore diff --git a/samples/admob/rewarded_example/android/app/build.gradle b/packages/mediation/gma_mediation_applovin/example/android/app/build.gradle similarity index 68% rename from samples/admob/rewarded_example/android/app/build.gradle rename to packages/mediation/gma_mediation_applovin/example/android/app/build.gradle index eedd48981..58616ed81 100644 --- a/samples/admob/rewarded_example/android/app/build.gradle +++ b/packages/mediation/gma_mediation_applovin/example/android/app/build.gradle @@ -1,3 +1,9 @@ +plugins { + id "com.android.application" + id "kotlin-android" + id "dev.flutter.flutter-gradle-plugin" +} + def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { @@ -6,11 +12,6 @@ if (localPropertiesFile.exists()) { } } -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - def flutterVersionCode = localProperties.getProperty('flutter.versionCode') if (flutterVersionCode == null) { flutterVersionCode = '1' @@ -21,21 +22,18 @@ if (flutterVersionName == null) { flutterVersionName = '1.0' } -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - android { + namespace "io.flutter.plugins.googlemobileads.mediation.gma_mediation_applovin_example" compileSdkVersion flutter.compileSdkVersion ndkVersion flutter.ndkVersion compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } kotlinOptions { - jvmTarget = '1.8' + jvmTarget = JavaVersion.VERSION_11.toString() } sourceSets { @@ -44,14 +42,14 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.rewarded_example" + applicationId "io.flutter.plugins.googlemobileads.mediation.gma_mediation_applovin_example" // You can update the following values to match your application needs. - // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. - minSdkVersion 19 - multiDexEnabled true + // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. + minSdkVersion 23 targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName + multiDexEnabled true } buildTypes { @@ -67,6 +65,4 @@ flutter { source '../..' } -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" -} +dependencies {} diff --git a/samples/admob/adaptive_banner_example/android/app/src/debug/AndroidManifest.xml b/packages/mediation/gma_mediation_applovin/example/android/app/src/debug/AndroidManifest.xml similarity index 86% rename from samples/admob/adaptive_banner_example/android/app/src/debug/AndroidManifest.xml rename to packages/mediation/gma_mediation_applovin/example/android/app/src/debug/AndroidManifest.xml index c789695ca..399f6981d 100644 --- a/samples/admob/adaptive_banner_example/android/app/src/debug/AndroidManifest.xml +++ b/packages/mediation/gma_mediation_applovin/example/android/app/src/debug/AndroidManifest.xml @@ -1,5 +1,4 @@ - + + + + diff --git a/packages/mediation/gma_mediation_bidmachine/example/android/app/src/main/AndroidManifest.xml b/packages/mediation/gma_mediation_bidmachine/example/android/app/src/main/AndroidManifest.xml new file mode 100644 index 000000000..7e079e8f7 --- /dev/null +++ b/packages/mediation/gma_mediation_bidmachine/example/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_bidmachine/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_bidmachine_example/MainActivity.kt b/packages/mediation/gma_mediation_bidmachine/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_bidmachine_example/MainActivity.kt new file mode 100644 index 000000000..dbae4a0ce --- /dev/null +++ b/packages/mediation/gma_mediation_bidmachine/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_bidmachine_example/MainActivity.kt @@ -0,0 +1,5 @@ +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_bidmachine_example + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity : FlutterActivity() diff --git a/packages/mediation/gma_mediation_bidmachine/example/android/app/src/main/res/drawable-v21/launch_background.xml b/packages/mediation/gma_mediation_bidmachine/example/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 000000000..f74085f3f --- /dev/null +++ b/packages/mediation/gma_mediation_bidmachine/example/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/mediation/gma_mediation_bidmachine/example/android/app/src/main/res/drawable/launch_background.xml b/packages/mediation/gma_mediation_bidmachine/example/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 000000000..304732f88 --- /dev/null +++ b/packages/mediation/gma_mediation_bidmachine/example/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/mediation/gma_mediation_bidmachine/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/mediation/gma_mediation_bidmachine/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..db77bb4b7 Binary files /dev/null and b/packages/mediation/gma_mediation_bidmachine/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_bidmachine/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/mediation/gma_mediation_bidmachine/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..17987b79b Binary files /dev/null and b/packages/mediation/gma_mediation_bidmachine/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_bidmachine/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/mediation/gma_mediation_bidmachine/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..09d439148 Binary files /dev/null and b/packages/mediation/gma_mediation_bidmachine/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_bidmachine/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/mediation/gma_mediation_bidmachine/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..d5f1c8d34 Binary files /dev/null and b/packages/mediation/gma_mediation_bidmachine/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_bidmachine/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/packages/mediation/gma_mediation_bidmachine/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..4d6372eeb Binary files /dev/null and b/packages/mediation/gma_mediation_bidmachine/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_bidmachine/example/android/app/src/main/res/values-night/styles.xml b/packages/mediation/gma_mediation_bidmachine/example/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 000000000..06952be74 --- /dev/null +++ b/packages/mediation/gma_mediation_bidmachine/example/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/packages/mediation/gma_mediation_bidmachine/example/android/app/src/main/res/values/styles.xml b/packages/mediation/gma_mediation_bidmachine/example/android/app/src/main/res/values/styles.xml new file mode 100644 index 000000000..cb1ef8805 --- /dev/null +++ b/packages/mediation/gma_mediation_bidmachine/example/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/packages/mediation/gma_mediation_bidmachine/example/android/app/src/profile/AndroidManifest.xml b/packages/mediation/gma_mediation_bidmachine/example/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 000000000..399f6981d --- /dev/null +++ b/packages/mediation/gma_mediation_bidmachine/example/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/packages/mediation/gma_mediation_bidmachine/example/android/build.gradle.kts b/packages/mediation/gma_mediation_bidmachine/example/android/build.gradle.kts new file mode 100644 index 000000000..97eed2dd6 --- /dev/null +++ b/packages/mediation/gma_mediation_bidmachine/example/android/build.gradle.kts @@ -0,0 +1,19 @@ +allprojects { + repositories { + google() + mavenCentral() + } +} + +val newBuildDir: Directory = rootProject.layout.buildDirectory.dir("../../build").get() + +rootProject.layout.buildDirectory.value(newBuildDir) + +subprojects { + val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name) + project.layout.buildDirectory.value(newSubprojectBuildDir) +} + +subprojects { project.evaluationDependsOn(":app") } + +tasks.register("clean") { delete(rootProject.layout.buildDirectory) } diff --git a/packages/mediation/gma_mediation_bidmachine/example/android/gma_mediation_bidmachine_example_android.iml b/packages/mediation/gma_mediation_bidmachine/example/android/gma_mediation_bidmachine_example_android.iml new file mode 100644 index 000000000..18999696a --- /dev/null +++ b/packages/mediation/gma_mediation_bidmachine/example/android/gma_mediation_bidmachine_example_android.iml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_bidmachine/example/android/gradle.properties b/packages/mediation/gma_mediation_bidmachine/example/android/gradle.properties new file mode 100644 index 000000000..f018a6181 --- /dev/null +++ b/packages/mediation/gma_mediation_bidmachine/example/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError +android.useAndroidX=true +android.enableJetifier=true diff --git a/packages/mediation/gma_mediation_bidmachine/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/mediation/gma_mediation_bidmachine/example/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 000000000..f004c34c0 --- /dev/null +++ b/packages/mediation/gma_mediation_bidmachine/example/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip diff --git a/packages/mediation/gma_mediation_bidmachine/example/android/gradlew b/packages/mediation/gma_mediation_bidmachine/example/android/gradlew new file mode 100755 index 000000000..9d82f7891 --- /dev/null +++ b/packages/mediation/gma_mediation_bidmachine/example/android/gradlew @@ -0,0 +1,160 @@ +#!/usr/bin/env bash + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn ( ) { + echo "$*" +} + +die ( ) { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; +esac + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules +function splitJvmOpts() { + JVM_OPTS=("$@") +} +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS +JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" + +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/packages/mediation/gma_mediation_bidmachine/example/android/gradlew.bat b/packages/mediation/gma_mediation_bidmachine/example/android/gradlew.bat new file mode 100644 index 000000000..aec99730b --- /dev/null +++ b/packages/mediation/gma_mediation_bidmachine/example/android/gradlew.bat @@ -0,0 +1,90 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windowz variants + +if not "%OS%" == "Windows_NT" goto win9xME_args +if "%@eval[2+2]" == "4" goto 4NT_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* +goto execute + +:4NT_args +@rem Get arguments from the 4NT Shell from JP Software +set CMD_LINE_ARGS=%$ + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/packages/mediation/gma_mediation_bidmachine/example/android/settings.gradle.kts b/packages/mediation/gma_mediation_bidmachine/example/android/settings.gradle.kts new file mode 100644 index 000000000..4eac8be0d --- /dev/null +++ b/packages/mediation/gma_mediation_bidmachine/example/android/settings.gradle.kts @@ -0,0 +1,25 @@ +pluginManagement { + val flutterSdkPath = run { + val properties = java.util.Properties() + file("local.properties").inputStream().use { properties.load(it) } + val flutterSdkPath = properties.getProperty("flutter.sdk") + require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" } + flutterSdkPath + } + + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") + + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +plugins { + id("dev.flutter.flutter-plugin-loader") version "1.0.0" + id("com.android.application") version "8.13.1" apply false + id("org.jetbrains.kotlin.android") version "2.2.21" apply false +} + +include(":app") diff --git a/packages/mediation/gma_mediation_bidmachine/example/gma_mediation_bidmachine_example.iml b/packages/mediation/gma_mediation_bidmachine/example/gma_mediation_bidmachine_example.iml new file mode 100644 index 000000000..f66303d53 --- /dev/null +++ b/packages/mediation/gma_mediation_bidmachine/example/gma_mediation_bidmachine_example.iml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_bidmachine/example/ios/Flutter/AppFrameworkInfo.plist b/packages/mediation/gma_mediation_bidmachine/example/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 000000000..7c5696400 --- /dev/null +++ b/packages/mediation/gma_mediation_bidmachine/example/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 12.0 + + diff --git a/packages/mediation/gma_mediation_bidmachine/example/ios/Flutter/Debug.xcconfig b/packages/mediation/gma_mediation_bidmachine/example/ios/Flutter/Debug.xcconfig new file mode 100644 index 000000000..592ceee85 --- /dev/null +++ b/packages/mediation/gma_mediation_bidmachine/example/ios/Flutter/Debug.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/packages/mediation/gma_mediation_bidmachine/example/ios/Flutter/Release.xcconfig b/packages/mediation/gma_mediation_bidmachine/example/ios/Flutter/Release.xcconfig new file mode 100644 index 000000000..592ceee85 --- /dev/null +++ b/packages/mediation/gma_mediation_bidmachine/example/ios/Flutter/Release.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/packages/mediation/gma_mediation_bidmachine/example/ios/Runner.xcodeproj/project.pbxproj b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 000000000..d31cf7b95 --- /dev/null +++ b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,616 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 97C146E61CF9000F007C117D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 97C146ED1CF9000F007C117D; + remoteInfo = Runner; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 331C8082294A63A400263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C807B294A618700263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + 331C8082294A63A400263BE5 /* RunnerTests */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + 331C8081294A63A400263BE5 /* RunnerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C8080294A63A400263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 331C807D294A63A400263BE5 /* Sources */, + 331C807F294A63A400263BE5 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 331C8086294A63A400263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1510; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 331C8080294A63A400263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 97C146ED1CF9000F007C117D; + }; + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + 331C8080294A63A400263BE5 /* RunnerTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 331C807F294A63A400263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 331C807D294A63A400263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 331C8086294A63A400263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 97C146ED1CF9000F007C117D /* Runner */; + targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationBidmachineExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 331C8088294A63A400263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationBidmachineExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Debug; + }; + 331C8089294A63A400263BE5 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationBidmachineExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Release; + }; + 331C808A294A63A400263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationBidmachineExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationBidmachineExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationBidmachineExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C8088294A63A400263BE5 /* Debug */, + 331C8089294A63A400263BE5 /* Release */, + 331C808A294A63A400263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/packages/mediation/gma_mediation_bidmachine/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..919434a62 --- /dev/null +++ b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/packages/mediation/gma_mediation_bidmachine/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000..18d981003 --- /dev/null +++ b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/packages/mediation/gma_mediation_bidmachine/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 000000000..f9b0d7c5e --- /dev/null +++ b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/packages/mediation/gma_mediation_bidmachine/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 000000000..e3773d42e --- /dev/null +++ b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_bidmachine/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..1d526a16e --- /dev/null +++ b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/packages/mediation/gma_mediation_bidmachine/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000..18d981003 --- /dev/null +++ b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/packages/mediation/gma_mediation_bidmachine/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 000000000..f9b0d7c5e --- /dev/null +++ b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/AppDelegate.swift b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/AppDelegate.swift new file mode 100644 index 000000000..626664468 --- /dev/null +++ b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import Flutter +import UIKit + +@main +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..d36b1fab2 --- /dev/null +++ b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 000000000..dc9ada472 Binary files /dev/null and b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 000000000..7353c41ec Binary files /dev/null and b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 000000000..797d452e4 Binary files /dev/null and b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 000000000..6ed2d933e Binary files /dev/null and b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 000000000..4cd7b0099 Binary files /dev/null and b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 000000000..fe730945a Binary files /dev/null and b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 000000000..321773cd8 Binary files /dev/null and b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 000000000..797d452e4 Binary files /dev/null and b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 000000000..502f463a9 Binary files /dev/null and b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 000000000..0ec303439 Binary files /dev/null and b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 000000000..0ec303439 Binary files /dev/null and b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 000000000..e9f5fea27 Binary files /dev/null and b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 000000000..84ac32ae7 Binary files /dev/null and b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 000000000..8953cba09 Binary files /dev/null and b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 000000000..0467bf12a Binary files /dev/null and b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 000000000..0bedcf2fd --- /dev/null +++ b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchImage.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 000000000..89c2725b7 --- /dev/null +++ b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 000000000..f2e259c7c --- /dev/null +++ b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Base.lproj/Main.storyboard b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 000000000..f3c28516f --- /dev/null +++ b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Info.plist b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Info.plist new file mode 100644 index 000000000..c0b96a57c --- /dev/null +++ b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Info.plist @@ -0,0 +1,49 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Gma Mediation Bidmachine + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + gma_mediation_bidmachine_example + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + CADisableMinimumFrameDurationOnPhone + + UIApplicationSupportsIndirectInputEvents + + + diff --git a/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Runner-Bridging-Header.h b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 000000000..308a2a560 --- /dev/null +++ b/packages/mediation/gma_mediation_bidmachine/example/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/packages/mediation/gma_mediation_bidmachine/example/lib/main.dart b/packages/mediation/gma_mediation_bidmachine/example/lib/main.dart new file mode 100644 index 000000000..ea02decb7 --- /dev/null +++ b/packages/mediation/gma_mediation_bidmachine/example/lib/main.dart @@ -0,0 +1,29 @@ +import 'package:flutter/material.dart'; + +void main() { + runApp(const MyApp()); +} + +class MyApp extends StatefulWidget { + const MyApp({super.key}); + + @override + State createState() => _MyAppState(); +} + +class _MyAppState extends State { + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Scaffold( + appBar: AppBar(title: const Text('Plugin example app')), + body: const Center(child: Text('Test app')), + ), + ); + } +} diff --git a/packages/mediation/gma_mediation_bidmachine/example/pubspec.lock b/packages/mediation/gma_mediation_bidmachine/example/pubspec.lock new file mode 100644 index 000000000..b5600a117 --- /dev/null +++ b/packages/mediation/gma_mediation_bidmachine/example/pubspec.lock @@ -0,0 +1,323 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + async: + dependency: transitive + description: + name: async + sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb" + url: "https://pub.dev" + source: hosted + version: "2.13.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + characters: + dependency: transitive + description: + name: characters + sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 + url: "https://pub.dev" + source: hosted + version: "1.4.0" + clock: + dependency: transitive + description: + name: clock + sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b + url: "https://pub.dev" + source: hosted + version: "1.1.2" + collection: + dependency: transitive + description: + name: collection + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" + url: "https://pub.dev" + source: hosted + version: "1.19.1" + cupertino_icons: + dependency: "direct main" + description: + name: cupertino_icons + sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 + url: "https://pub.dev" + source: hosted + version: "1.0.8" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44" + url: "https://pub.dev" + source: hosted + version: "1.3.3" + file: + dependency: transitive + description: + name: file + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 + url: "https://pub.dev" + source: hosted + version: "7.0.1" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_driver: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" + url: "https://pub.dev" + source: hosted + version: "5.0.0" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + fuchsia_remote_debug_protocol: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + gma_mediation_bidmachine: + dependency: "direct main" + description: + path: ".." + relative: true + source: path + version: "1.0.0" + google_mobile_ads: + dependency: transitive + description: + name: google_mobile_ads + sha256: a4f59019f2c32769fb6c60ed8aa321e9c21a36297e2c4f23452b3e779a3e7a26 + url: "https://pub.dev" + source: hosted + version: "6.0.0" + integration_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0" + url: "https://pub.dev" + source: hosted + version: "10.0.9" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 + url: "https://pub.dev" + source: hosted + version: "3.0.9" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + lints: + dependency: transitive + description: + name: lints + sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7 + url: "https://pub.dev" + source: hosted + version: "5.1.1" + matcher: + dependency: transitive + description: + name: matcher + sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 + url: "https://pub.dev" + source: hosted + version: "0.12.17" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + url: "https://pub.dev" + source: hosted + version: "0.11.1" + meta: + dependency: transitive + description: + name: meta + sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c + url: "https://pub.dev" + source: hosted + version: "1.16.0" + path: + dependency: transitive + description: + name: path + sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" + url: "https://pub.dev" + source: hosted + version: "1.9.1" + platform: + dependency: transitive + description: + name: platform + sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" + url: "https://pub.dev" + source: hosted + version: "3.1.6" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" + process: + dependency: transitive + description: + name: process + sha256: "107d8be718f120bbba9dcd1e95e3bd325b1b4a4f07db64154635ba03f2567a0d" + url: "https://pub.dev" + source: hosted + version: "5.0.3" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + source_span: + dependency: transitive + description: + name: source_span + sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" + url: "https://pub.dev" + source: hosted + version: "1.10.1" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" + url: "https://pub.dev" + source: hosted + version: "1.12.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" + url: "https://pub.dev" + source: hosted + version: "1.4.1" + sync_http: + dependency: transitive + description: + name: sync_http + sha256: "7f0cd72eca000d2e026bcd6f990b81d0ca06022ef4e32fb257b30d3d1014a961" + url: "https://pub.dev" + source: hosted + version: "0.3.1" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" + url: "https://pub.dev" + source: hosted + version: "1.2.2" + test_api: + dependency: transitive + description: + name: test_api + sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd + url: "https://pub.dev" + source: hosted + version: "0.7.4" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02 + url: "https://pub.dev" + source: hosted + version: "15.0.0" + webdriver: + dependency: transitive + description: + name: webdriver + sha256: "2f3a14ca026957870cfd9c635b83507e0e51d8091568e90129fbf805aba7cade" + url: "https://pub.dev" + source: hosted + version: "3.1.0" + webview_flutter: + dependency: transitive + description: + name: webview_flutter + sha256: c3e4fe614b1c814950ad07186007eff2f2e5dd2935eba7b9a9a1af8e5885f1ba + url: "https://pub.dev" + source: hosted + version: "4.13.0" + webview_flutter_android: + dependency: transitive + description: + name: webview_flutter_android + sha256: "0a42444056b24ed832bdf3442d65c5194f6416f7e782152384944053c2ecc9a3" + url: "https://pub.dev" + source: hosted + version: "4.10.0" + webview_flutter_platform_interface: + dependency: transitive + description: + name: webview_flutter_platform_interface + sha256: "63d26ee3aca7256a83ccb576a50272edd7cfc80573a4305caa98985feb493ee0" + url: "https://pub.dev" + source: hosted + version: "2.14.0" + webview_flutter_wkwebview: + dependency: transitive + description: + name: webview_flutter_wkwebview + sha256: fb46db8216131a3e55bcf44040ca808423539bc6732e7ed34fb6d8044e3d512f + url: "https://pub.dev" + source: hosted + version: "3.23.0" +sdks: + dart: ">=3.8.1 <4.0.0" + flutter: ">=3.27.0" diff --git a/packages/mediation/gma_mediation_bidmachine/example/pubspec.yaml b/packages/mediation/gma_mediation_bidmachine/example/pubspec.yaml new file mode 100644 index 000000000..536551a04 --- /dev/null +++ b/packages/mediation/gma_mediation_bidmachine/example/pubspec.yaml @@ -0,0 +1,86 @@ +name: gma_mediation_bidmachine_example +description: "Demonstrates how to use the gma_mediation_bidmachine plugin." +# The following line prevents the package from being accidentally published to +# pub.dev using `flutter pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +environment: + sdk: ^3.9.0 + +# Dependencies specify other packages that your package needs in order to work. +# To automatically upgrade your package dependencies to the latest versions +# consider running `flutter pub upgrade --major-versions`. Alternatively, +# dependencies can be manually updated by changing the version numbers below to +# the latest version available on pub.dev. To see which dependencies have newer +# versions available, run `flutter pub outdated`. +dependencies: + flutter: + sdk: flutter + + google_mobile_ads: ^7.0.0 + gma_mediation_bidmachine: + # When depending on this package from a real application you should use: + # gma_mediation_bidmachine: ^x.y.z + # See https://dart.dev/tools/pub/dependencies#version-constraints + # The example app is bundled with the plugin so we use a path dependency on + # the parent directory to use the current plugin's version. + path: ../ + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^1.0.8 + +dev_dependencies: + integration_test: + sdk: flutter + flutter_test: + sdk: flutter + + # The "flutter_lints" package below contains a set of recommended lints to + # encourage good coding practices. The lint set provided by the package is + # activated in the `analysis_options.yaml` file located at the root of your + # package. See that file for information about deactivating specific lint + # rules and activating additional ones. + flutter_lints: ^6.0.0 + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter packages. +flutter: + + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + + # To add assets to your application, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/to/resolution-aware-images + + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/to/asset-from-package + + # To add custom fonts to your application, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts from package dependencies, + # see https://flutter.dev/to/font-from-package diff --git a/packages/mediation/gma_mediation_bidmachine/gma_mediation_bidmachine.iml b/packages/mediation/gma_mediation_bidmachine/gma_mediation_bidmachine.iml new file mode 100644 index 000000000..27686dd4b --- /dev/null +++ b/packages/mediation/gma_mediation_bidmachine/gma_mediation_bidmachine.iml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_bidmachine/ios/Classes/GmaMediationBidMachinePlugin.swift b/packages/mediation/gma_mediation_bidmachine/ios/Classes/GmaMediationBidMachinePlugin.swift new file mode 100644 index 000000000..657465ff3 --- /dev/null +++ b/packages/mediation/gma_mediation_bidmachine/ios/Classes/GmaMediationBidMachinePlugin.swift @@ -0,0 +1,23 @@ +// Copyright 2025 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 +// +// https://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 Flutter +import UIKit + +/// Required to link the iOS dependency of the BidMachine Adapter. +public class GmaMediationBidMachinePlugin: NSObject, FlutterPlugin { + public static func register(with registrar: FlutterPluginRegistrar) {} + + public func detachFromEngine(for registrar: FlutterPluginRegistrar) {} +} diff --git a/packages/mediation/gma_mediation_bidmachine/ios/Resources/PrivacyInfo.xcprivacy b/packages/mediation/gma_mediation_bidmachine/ios/Resources/PrivacyInfo.xcprivacy new file mode 100644 index 000000000..a34b7e2e6 --- /dev/null +++ b/packages/mediation/gma_mediation_bidmachine/ios/Resources/PrivacyInfo.xcprivacy @@ -0,0 +1,14 @@ + + + + + NSPrivacyTrackingDomains + + NSPrivacyAccessedAPITypes + + NSPrivacyCollectedDataTypes + + NSPrivacyTracking + + + diff --git a/packages/mediation/gma_mediation_bidmachine/ios/gma_mediation_bidmachine.podspec b/packages/mediation/gma_mediation_bidmachine/ios/gma_mediation_bidmachine.podspec new file mode 100644 index 000000000..7abc81a93 --- /dev/null +++ b/packages/mediation/gma_mediation_bidmachine/ios/gma_mediation_bidmachine.podspec @@ -0,0 +1,21 @@ +Pod::Spec.new do |s| + s.name = 'gma_mediation_bidmachine' + s.version = '1.3.1' + s.summary = 'Google Mobile Ads Mediation of BidMachine.' + s.description = <<-DESC + Mediation Adapter for BidMachine to use with Google Mobile Ads. + DESC + s.homepage = 'https://developers.google.com/admob/flutter/mediation/bidmachine' + s.license = { :file => '../LICENSE' } + s.author = { 'Google LLC' => 'mediation-support@google.com' } + s.source = { :path => '.' } + s.source_files = 'Classes/**/*' + s.dependency 'Flutter' + s.dependency 'GoogleMobileAdsMediationBidMachine', '~> 3.5.1.0' + s.platform = :ios, '13.0' + s.static_framework = true + + s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' } + s.swift_version = '5.0' + +end diff --git a/packages/mediation/gma_mediation_bidmachine/lib/gma_mediation_bidmachine.dart b/packages/mediation/gma_mediation_bidmachine/lib/gma_mediation_bidmachine.dart new file mode 100644 index 000000000..a9ccb64af --- /dev/null +++ b/packages/mediation/gma_mediation_bidmachine/lib/gma_mediation_bidmachine.dart @@ -0,0 +1,16 @@ +// Copyright 2025 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 +// +// https://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. + +/// This empty class is needed to allow correct compatibility analysis with host platforms. +class GmaMediationBidMachine {} diff --git a/packages/mediation/gma_mediation_bidmachine/pubspec.lock b/packages/mediation/gma_mediation_bidmachine/pubspec.lock new file mode 100644 index 000000000..cbcb47510 --- /dev/null +++ b/packages/mediation/gma_mediation_bidmachine/pubspec.lock @@ -0,0 +1,261 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + async: + dependency: transitive + description: + name: async + sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb" + url: "https://pub.dev" + source: hosted + version: "2.13.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + characters: + dependency: transitive + description: + name: characters + sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 + url: "https://pub.dev" + source: hosted + version: "1.4.0" + clock: + dependency: transitive + description: + name: clock + sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b + url: "https://pub.dev" + source: hosted + version: "1.1.2" + collection: + dependency: transitive + description: + name: collection + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" + url: "https://pub.dev" + source: hosted + version: "1.19.1" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44" + url: "https://pub.dev" + source: hosted + version: "1.3.3" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" + url: "https://pub.dev" + source: hosted + version: "5.0.0" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + google_mobile_ads: + dependency: "direct main" + description: + name: google_mobile_ads + sha256: a4f59019f2c32769fb6c60ed8aa321e9c21a36297e2c4f23452b3e779a3e7a26 + url: "https://pub.dev" + source: hosted + version: "6.0.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0" + url: "https://pub.dev" + source: hosted + version: "10.0.9" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 + url: "https://pub.dev" + source: hosted + version: "3.0.9" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + lint: + dependency: "direct dev" + description: + name: lint + sha256: "3cd03646de313481336500ba02eb34d07c590535525f154aae7fda7362aa07a9" + url: "https://pub.dev" + source: hosted + version: "2.8.0" + lints: + dependency: transitive + description: + name: lints + sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7 + url: "https://pub.dev" + source: hosted + version: "5.1.1" + matcher: + dependency: transitive + description: + name: matcher + sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 + url: "https://pub.dev" + source: hosted + version: "0.12.17" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + url: "https://pub.dev" + source: hosted + version: "0.11.1" + meta: + dependency: transitive + description: + name: meta + sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c + url: "https://pub.dev" + source: hosted + version: "1.16.0" + path: + dependency: transitive + description: + name: path + sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" + url: "https://pub.dev" + source: hosted + version: "1.9.1" + plugin_platform_interface: + dependency: "direct main" + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + source_span: + dependency: transitive + description: + name: source_span + sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" + url: "https://pub.dev" + source: hosted + version: "1.10.1" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" + url: "https://pub.dev" + source: hosted + version: "1.12.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" + url: "https://pub.dev" + source: hosted + version: "1.4.1" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" + url: "https://pub.dev" + source: hosted + version: "1.2.2" + test_api: + dependency: transitive + description: + name: test_api + sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd + url: "https://pub.dev" + source: hosted + version: "0.7.4" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02 + url: "https://pub.dev" + source: hosted + version: "15.0.0" + webview_flutter: + dependency: transitive + description: + name: webview_flutter + sha256: c3e4fe614b1c814950ad07186007eff2f2e5dd2935eba7b9a9a1af8e5885f1ba + url: "https://pub.dev" + source: hosted + version: "4.13.0" + webview_flutter_android: + dependency: transitive + description: + name: webview_flutter_android + sha256: "0a42444056b24ed832bdf3442d65c5194f6416f7e782152384944053c2ecc9a3" + url: "https://pub.dev" + source: hosted + version: "4.10.0" + webview_flutter_platform_interface: + dependency: transitive + description: + name: webview_flutter_platform_interface + sha256: "63d26ee3aca7256a83ccb576a50272edd7cfc80573a4305caa98985feb493ee0" + url: "https://pub.dev" + source: hosted + version: "2.14.0" + webview_flutter_wkwebview: + dependency: transitive + description: + name: webview_flutter_wkwebview + sha256: fb46db8216131a3e55bcf44040ca808423539bc6732e7ed34fb6d8044e3d512f + url: "https://pub.dev" + source: hosted + version: "3.23.0" +sdks: + dart: ">=3.8.1 <4.0.0" + flutter: ">=3.27.0" diff --git a/packages/mediation/gma_mediation_bidmachine/pubspec.yaml b/packages/mediation/gma_mediation_bidmachine/pubspec.yaml new file mode 100644 index 000000000..954ebc265 --- /dev/null +++ b/packages/mediation/gma_mediation_bidmachine/pubspec.yaml @@ -0,0 +1,26 @@ +name: gma_mediation_bidmachine +description: 'Mediation Adapter that enables sending ad requests to the BidMachine + ad network using the google_mobile_ads plugin.' +version: 1.3.1 +environment: + sdk: '>=3.9.0 <4.0.0' + flutter: '>=3.35.1' +dependencies: + flutter: + sdk: flutter + google_mobile_ads: ^7.0.0 + plugin_platform_interface: ^2.0.2 +dev_dependencies: + flutter_test: + sdk: flutter + flutter_lints: ^6.0.0 + lint: ^2.4.0 +flutter: + plugin: + platforms: + android: + package: io.flutter.plugins.googlemobileads.mediation.gma_mediation_bidmachine + pluginClass: GmaMediationBidMachinePlugin + ios: + pluginClass: GmaMediationBidMachinePlugin +repository: https://github.com/googleads/googleads-mobile-flutter/tree/main/packages/mediation/gma_mediation_bidmachine diff --git a/packages/mediation/gma_mediation_chartboost/CHANGELOG.md b/packages/mediation/gma_mediation_chartboost/CHANGELOG.md new file mode 100644 index 000000000..be5027225 --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/CHANGELOG.md @@ -0,0 +1,52 @@ +## Chartboost Flutter Mediation Adapter Changelog + +#### Version 1.3.3 +- Supports [Chartboost Android adapter version 9.10.2.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/chartboost/CHANGELOG.md#version-91020). +- Supports [Chartboost iOS adapter version 9.10.1.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Chartboost/CHANGELOG.md#version-91010). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.3.2 +- Supports [Chartboost Android adapter version 9.10.1.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/chartboost/CHANGELOG.md#version-91010). +- Supports [Chartboost iOS adapter version 9.10.1.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Chartboost/CHANGELOG.md#version-91010). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.3.1 +- Supports [Chartboost Android adapter version 9.10.0.1](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/chartboost/CHANGELOG.md#version-91001). +- Supports [Chartboost iOS adapter version 9.10.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Chartboost/CHANGELOG.md#version-91000). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.3.0 +- Supports [Chartboost Android adapter version 9.10.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/chartboost/CHANGELOG.md#version-91000). +- Supports [Chartboost iOS adapter version 9.10.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Chartboost/CHANGELOG.md#version-91000). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.2.1 +- Supports [Chartboost Android adapter version 9.9.2.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/chartboost/CHANGELOG.md#version-9920). +- Supports [Chartboost iOS adapter version 9.9.2.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Chartboost/CHANGELOG.md#version-9920). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.2.0 +- Supports [Chartboost Android adapter version 9.9.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/chartboost/CHANGELOG.md#version-9900). +- Supports [Chartboost iOS adapter version 9.9.1.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Chartboost/CHANGELOG.md#version-9910). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.1.0 +- Supports [Chartboost Android adapter version 9.8.3.1](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/chartboost/CHANGELOG.md#version-9831). +- Supports [Chartboost iOS adapter version 9.9.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Chartboost/CHANGELOG.md#version-9900). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.0.2 +- Supports [Chartboost Android adapter version 9.8.3.1](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/chartboost/CHANGELOG.md#version-9831). +- Supports [Chartboost iOS adapter version 9.8.1.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Chartboost/CHANGELOG.md#version-9810). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.0.1 +- Supports [Chartboost Android adapter version 9.8.3.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/chartboost/CHANGELOG.md#version-9830). +- Supports [Chartboost iOS adapter version 9.8.1.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Chartboost/CHANGELOG.md#version-9810). +- Built and tested with the Google Mobile Ads Flutter Plugin version 5.3.1. + +#### Version 1.0.0 +- Initial release. +- Supports [Chartboost Android adapter version 9.8.1.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/chartboost/CHANGELOG.md#version-9810). +- Supports [Chartboost iOS adapter version 9.8.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Chartboost/CHANGELOG.md#version-9800). +- Built and tested with the Google Mobile Ads Flutter Plugin version 5.2.0. \ No newline at end of file diff --git a/packages/mediation/gma_mediation_chartboost/LICENSE b/packages/mediation/gma_mediation_chartboost/LICENSE new file mode 100644 index 000000000..e58143fcc --- /dev/null +++ b/packages/mediation/gma_mediation_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 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. diff --git a/packages/mediation/gma_mediation_chartboost/README.md b/packages/mediation/gma_mediation_chartboost/README.md new file mode 100644 index 000000000..05820ea1d --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/README.md @@ -0,0 +1,36 @@ +# Google Mobile Ads Mediation of Chartboost for Flutter + +[![gma_mediation_chartboost](https://github.com/googleads/googleads-mobile-flutter/actions/workflows/google_mobile_ads.yaml/badge.svg)](https://github.com/googleads/googleads-mobile-flutter/actions/workflows/google_mobile_ads.yaml) + +This repository contains the source code for the Mediation Chartboost Flutter +plugin to be used with the Google Mobile Ads plugin. It enables mediation of the +Chartboost Ad Network through the Google Mobile Ads SDK. + +This plugin use the [Pigeon Flutter plugin](https://pub.dev/packages/pigeon) to +generate the classes that bridge the dart layer with each platform's code. +To add or modify the third party sdk, use the classes in the pigeons folder +following [this guide](https://github.com/flutter/packages/blob/main/packages/pigeon/example/README.md). + +## Documentation +For instructions on how to use with the google_mobile_ads plugin, refer to the +developer guide for [Chartboost](https://developers.google.com/admob/flutter/mediation/chartboost). + +## Downloads + +See [pub.dev](https://pub.dev/packages/gma_mediation_chartboost/versions) for the +latest releases of the plugin. + +## Suggesting improvements + +To file bugs, make feature requests, or to suggest other improvements, please +use [github's issue tracker](https://github.com/googleads/googleads-mobile-flutter/issues). + + +## Other resources + +* [AdMob help center](https://support.google.com/admob/?hl=en#topic=7383088) +* [Ad Manager help center](https://support.google.com/admanager/?hl=en#topic=7505988) + +## License + +[Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0) \ No newline at end of file diff --git a/packages/mediation/gma_mediation_chartboost/analysis_options.yaml b/packages/mediation/gma_mediation_chartboost/analysis_options.yaml new file mode 100644 index 000000000..fac4bcd12 --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/analysis_options.yaml @@ -0,0 +1,19 @@ +# 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 +# +# https://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. + +include: package:lint/package.yaml + +analyzer: + exclude: + - '**.g.dart' \ No newline at end of file diff --git a/packages/mediation/gma_mediation_chartboost/android/build.gradle b/packages/mediation/gma_mediation_chartboost/android/build.gradle new file mode 100644 index 000000000..4e414de21 --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/android/build.gradle @@ -0,0 +1,76 @@ +group = "io.flutter.plugins.googlemobileads.mediation.gma_mediation_chartboost" +version = "1.3.3" + +buildscript { + ext.kotlin_version = "1.8.22" + repositories { + google() + mavenCentral() + } + + dependencies { + classpath("com.android.tools.build:gradle:8.1.0") + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version") + } +} + +allprojects { + repositories { + google() + mavenCentral() + maven { + url = uri("https://cboost.jfrog.io/artifactory/chartboost-ads/") + } + } +} + +apply plugin: "com.android.library" +apply plugin: "kotlin-android" + +ext { + stringVersion = "9.10.2.0" +} + +android { + if (project.android.hasProperty("namespace")) { + namespace = "io.flutter.plugins.googlemobileads.mediation.gma_mediation_chartboost" + } + + compileSdk = 34 + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11 + } + + sourceSets { + main.java.srcDirs += "src/main/kotlin" + test.java.srcDirs += "src/test/kotlin" + } + + defaultConfig { + minSdk = 23 + } + + dependencies { + implementation("com.google.ads.mediation:chartboost:$stringVersion") + testImplementation("org.jetbrains.kotlin:kotlin-test") + testImplementation("org.mockito:mockito-core:5.0.0") + } + + testOptions { + unitTests.all { + useJUnitPlatform() + + testLogging { + events "passed", "skipped", "failed", "standardOut", "standardError" + outputs.upToDateWhen {false} + showStandardStreams = true + } + } + } +} diff --git a/packages/mediation/gma_mediation_chartboost/android/gma_mediation_chartboost_android.iml b/packages/mediation/gma_mediation_chartboost/android/gma_mediation_chartboost_android.iml new file mode 100644 index 000000000..e8b9110d5 --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/android/gma_mediation_chartboost_android.iml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_chartboost/android/settings.gradle b/packages/mediation/gma_mediation_chartboost/android/settings.gradle new file mode 100644 index 000000000..5edb33d81 --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/android/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'gma_mediation_chartboost' diff --git a/packages/mediation/gma_mediation_chartboost/android/src/main/AndroidManifest.xml b/packages/mediation/gma_mediation_chartboost/android/src/main/AndroidManifest.xml new file mode 100644 index 000000000..47a5a794c --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/android/src/main/AndroidManifest.xml @@ -0,0 +1,3 @@ + + diff --git a/packages/mediation/gma_mediation_chartboost/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_chartboost/GmaMediationChartboostPlugin.kt b/packages/mediation/gma_mediation_chartboost/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_chartboost/GmaMediationChartboostPlugin.kt new file mode 100644 index 000000000..4c4b35124 --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_chartboost/GmaMediationChartboostPlugin.kt @@ -0,0 +1,24 @@ +// 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 +// +// https://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. + +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_chartboost + +import io.flutter.embedding.engine.plugins.FlutterPlugin + +/** Required to link the Android dependency of the Chartboost Adapter. */ +class GmaMediationChartboostPlugin: FlutterPlugin { + override fun onAttachedToEngine(flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) { } + + override fun onDetachedFromEngine(binding: FlutterPlugin.FlutterPluginBinding) { } +} diff --git a/packages/mediation/gma_mediation_chartboost/android/src/test/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_chartboost/GmaMediationChartboostPluginTest.kt b/packages/mediation/gma_mediation_chartboost/android/src/test/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_chartboost/GmaMediationChartboostPluginTest.kt new file mode 100644 index 000000000..d929f89a2 --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/android/src/test/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_chartboost/GmaMediationChartboostPluginTest.kt @@ -0,0 +1,17 @@ +// 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 +// +// https://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. + +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_chartboost + +internal class GmaMediationChartboostPluginTest {} diff --git a/packages/mediation/gma_mediation_chartboost/example/README.md b/packages/mediation/gma_mediation_chartboost/example/README.md new file mode 100644 index 000000000..6c251c2e9 --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/example/README.md @@ -0,0 +1,17 @@ +# gma_mediation_chartboost_example + +Learn how to integrate with your app that uses the [google_mobile_ads](https://pub.dev/packages/google_mobile_ads) plugin +by following the [development guide](https://developers.google.com/admob/flutter/mediation/chartboost). + +## Getting Started + +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) + +For help getting started with Flutter development, view the +[online documentation](https://docs.flutter.dev/), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/packages/mediation/gma_mediation_chartboost/example/analysis_options.yaml b/packages/mediation/gma_mediation_chartboost/example/analysis_options.yaml new file mode 100644 index 000000000..0d2902135 --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/example/analysis_options.yaml @@ -0,0 +1,28 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at https://dart.dev/lints. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/packages/mediation/gma_mediation_chartboost/example/android/app/build.gradle b/packages/mediation/gma_mediation_chartboost/example/android/app/build.gradle new file mode 100644 index 000000000..2ccf073e7 --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/example/android/app/build.gradle @@ -0,0 +1,42 @@ +plugins { + id "com.android.application" + id "kotlin-android" + // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. + id "dev.flutter.flutter-gradle-plugin" +} + +android { + namespace = "io.flutter.plugins.googlemobileads.mediation.gma_mediation_chartboost_example" + compileSdk = flutter.compileSdkVersion + ndkVersion = flutter.ndkVersion + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11 + } + + defaultConfig { + applicationId = "io.flutter.plugins.googlemobileads.mediation.gma_mediation_chartboost_example" + // You can update the following values to match your application needs. + // For more information, see: https://flutter.dev/to/review-gradle-config. + minSdk = 23 + targetSdk = flutter.targetSdkVersion + versionCode = flutter.versionCode + versionName = flutter.versionName + } + + buildTypes { + release { + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig = signingConfigs.debug + } + } +} + +flutter { + source = "../.." +} diff --git a/packages/mediation/gma_mediation_chartboost/example/android/app/src/debug/AndroidManifest.xml b/packages/mediation/gma_mediation_chartboost/example/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 000000000..399f6981d --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/example/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/packages/mediation/gma_mediation_chartboost/example/android/app/src/main/AndroidManifest.xml b/packages/mediation/gma_mediation_chartboost/example/android/app/src/main/AndroidManifest.xml new file mode 100644 index 000000000..1c7d46939 --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/example/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_chartboost/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_chartboost_example/MainActivity.kt b/packages/mediation/gma_mediation_chartboost/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_chartboost_example/MainActivity.kt new file mode 100644 index 000000000..bb90a9f36 --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_chartboost_example/MainActivity.kt @@ -0,0 +1,5 @@ +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_chartboost_example + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() diff --git a/packages/mediation/gma_mediation_chartboost/example/android/app/src/main/res/drawable-v21/launch_background.xml b/packages/mediation/gma_mediation_chartboost/example/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 000000000..f74085f3f --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/example/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/mediation/gma_mediation_chartboost/example/android/app/src/main/res/drawable/launch_background.xml b/packages/mediation/gma_mediation_chartboost/example/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 000000000..304732f88 --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/example/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/mediation/gma_mediation_chartboost/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/mediation/gma_mediation_chartboost/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..db77bb4b7 Binary files /dev/null and b/packages/mediation/gma_mediation_chartboost/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_chartboost/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/mediation/gma_mediation_chartboost/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..17987b79b Binary files /dev/null and b/packages/mediation/gma_mediation_chartboost/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_chartboost/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/mediation/gma_mediation_chartboost/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..09d439148 Binary files /dev/null and b/packages/mediation/gma_mediation_chartboost/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_chartboost/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/mediation/gma_mediation_chartboost/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..d5f1c8d34 Binary files /dev/null and b/packages/mediation/gma_mediation_chartboost/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_chartboost/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/packages/mediation/gma_mediation_chartboost/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..4d6372eeb Binary files /dev/null and b/packages/mediation/gma_mediation_chartboost/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_chartboost/example/android/app/src/main/res/values-night/styles.xml b/packages/mediation/gma_mediation_chartboost/example/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 000000000..06952be74 --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/example/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/packages/mediation/gma_mediation_chartboost/example/android/app/src/main/res/values/styles.xml b/packages/mediation/gma_mediation_chartboost/example/android/app/src/main/res/values/styles.xml new file mode 100644 index 000000000..cb1ef8805 --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/example/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/packages/mediation/gma_mediation_chartboost/example/android/app/src/profile/AndroidManifest.xml b/packages/mediation/gma_mediation_chartboost/example/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 000000000..399f6981d --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/example/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/packages/mediation/gma_mediation_chartboost/example/android/build.gradle b/packages/mediation/gma_mediation_chartboost/example/android/build.gradle new file mode 100644 index 000000000..d2ffbffa4 --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/example/android/build.gradle @@ -0,0 +1,18 @@ +allprojects { + repositories { + google() + mavenCentral() + } +} + +rootProject.buildDir = "../build" +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(":app") +} + +tasks.register("clean", Delete) { + delete rootProject.buildDir +} diff --git a/packages/mediation/gma_mediation_chartboost/example/android/gma_mediation_chartboost_example_android.iml b/packages/mediation/gma_mediation_chartboost/example/android/gma_mediation_chartboost_example_android.iml new file mode 100644 index 000000000..18999696a --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/example/android/gma_mediation_chartboost_example_android.iml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_chartboost/example/android/gradle.properties b/packages/mediation/gma_mediation_chartboost/example/android/gradle.properties new file mode 100644 index 000000000..259717082 --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/example/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError +android.useAndroidX=true +android.enableJetifier=true diff --git a/samples/admob/adaptive_banner_example/android/gradle/wrapper/gradle-wrapper.properties b/packages/mediation/gma_mediation_chartboost/example/android/gradle/wrapper/gradle-wrapper.properties similarity index 93% rename from samples/admob/adaptive_banner_example/android/gradle/wrapper/gradle-wrapper.properties rename to packages/mediation/gma_mediation_chartboost/example/android/gradle/wrapper/gradle-wrapper.properties index cb24abda1..7bb2df6ba 100644 --- a/samples/admob/adaptive_banner_example/android/gradle/wrapper/gradle-wrapper.properties +++ b/packages/mediation/gma_mediation_chartboost/example/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip diff --git a/packages/mediation/gma_mediation_chartboost/example/android/gradlew b/packages/mediation/gma_mediation_chartboost/example/android/gradlew new file mode 100755 index 000000000..9d82f7891 --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/example/android/gradlew @@ -0,0 +1,160 @@ +#!/usr/bin/env bash + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn ( ) { + echo "$*" +} + +die ( ) { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; +esac + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules +function splitJvmOpts() { + JVM_OPTS=("$@") +} +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS +JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" + +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/packages/mediation/gma_mediation_chartboost/example/android/gradlew.bat b/packages/mediation/gma_mediation_chartboost/example/android/gradlew.bat new file mode 100644 index 000000000..aec99730b --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/example/android/gradlew.bat @@ -0,0 +1,90 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windowz variants + +if not "%OS%" == "Windows_NT" goto win9xME_args +if "%@eval[2+2]" == "4" goto 4NT_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* +goto execute + +:4NT_args +@rem Get arguments from the 4NT Shell from JP Software +set CMD_LINE_ARGS=%$ + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/packages/mediation/gma_mediation_chartboost/example/android/settings.gradle b/packages/mediation/gma_mediation_chartboost/example/android/settings.gradle new file mode 100644 index 000000000..b9e43bd37 --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/example/android/settings.gradle @@ -0,0 +1,25 @@ +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + }() + + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") + + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "8.1.0" apply false + id "org.jetbrains.kotlin.android" version "1.8.22" apply false +} + +include ":app" diff --git a/packages/mediation/gma_mediation_chartboost/example/gma_mediation_chartboost_example.iml b/packages/mediation/gma_mediation_chartboost/example/gma_mediation_chartboost_example.iml new file mode 100644 index 000000000..f66303d53 --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/example/gma_mediation_chartboost_example.iml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_chartboost/example/ios/Flutter/AppFrameworkInfo.plist b/packages/mediation/gma_mediation_chartboost/example/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 000000000..7c5696400 --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/example/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 12.0 + + diff --git a/packages/mediation/gma_mediation_chartboost/example/ios/Flutter/Debug.xcconfig b/packages/mediation/gma_mediation_chartboost/example/ios/Flutter/Debug.xcconfig new file mode 100644 index 000000000..592ceee85 --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/example/ios/Flutter/Debug.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/packages/mediation/gma_mediation_chartboost/example/ios/Flutter/Release.xcconfig b/packages/mediation/gma_mediation_chartboost/example/ios/Flutter/Release.xcconfig new file mode 100644 index 000000000..592ceee85 --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/example/ios/Flutter/Release.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/packages/mediation/gma_mediation_chartboost/example/ios/Runner.xcodeproj/project.pbxproj b/packages/mediation/gma_mediation_chartboost/example/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 000000000..cdc9a5205 --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/example/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,616 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 97C146E61CF9000F007C117D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 97C146ED1CF9000F007C117D; + remoteInfo = Runner; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 331C8082294A63A400263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C807B294A618700263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + 331C8082294A63A400263BE5 /* RunnerTests */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + 331C8081294A63A400263BE5 /* RunnerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C8080294A63A400263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 331C807D294A63A400263BE5 /* Sources */, + 331C807F294A63A400263BE5 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 331C8086294A63A400263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1510; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 331C8080294A63A400263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 97C146ED1CF9000F007C117D; + }; + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + 331C8080294A63A400263BE5 /* RunnerTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 331C807F294A63A400263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 331C807D294A63A400263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 331C8086294A63A400263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 97C146ED1CF9000F007C117D /* Runner */; + targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationChartboostExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 331C8088294A63A400263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationChartboostExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Debug; + }; + 331C8089294A63A400263BE5 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationChartboostExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Release; + }; + 331C808A294A63A400263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationChartboostExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationChartboostExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationChartboostExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C8088294A63A400263BE5 /* Debug */, + 331C8089294A63A400263BE5 /* Release */, + 331C808A294A63A400263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/packages/mediation/gma_mediation_chartboost/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/mediation/gma_mediation_chartboost/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..919434a62 --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/packages/mediation/gma_mediation_chartboost/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/mediation/gma_mediation_chartboost/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000..18d981003 --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/packages/mediation/gma_mediation_chartboost/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/mediation/gma_mediation_chartboost/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 000000000..f9b0d7c5e --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/packages/mediation/gma_mediation_chartboost/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/mediation/gma_mediation_chartboost/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 000000000..8e3ca5dfe --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_chartboost/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/packages/mediation/gma_mediation_chartboost/example/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..1d526a16e --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/example/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/packages/mediation/gma_mediation_chartboost/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/mediation/gma_mediation_chartboost/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000..18d981003 --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/packages/mediation/gma_mediation_chartboost/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/mediation/gma_mediation_chartboost/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 000000000..f9b0d7c5e --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/packages/mediation/gma_mediation_chartboost/example/ios/Runner/AppDelegate.swift b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/AppDelegate.swift new file mode 100644 index 000000000..626664468 --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import Flutter +import UIKit + +@main +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..d36b1fab2 --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 000000000..dc9ada472 Binary files /dev/null and b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 000000000..7353c41ec Binary files /dev/null and b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 000000000..797d452e4 Binary files /dev/null and b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 000000000..6ed2d933e Binary files /dev/null and b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 000000000..4cd7b0099 Binary files /dev/null and b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 000000000..fe730945a Binary files /dev/null and b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 000000000..321773cd8 Binary files /dev/null and b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 000000000..797d452e4 Binary files /dev/null and b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 000000000..502f463a9 Binary files /dev/null and b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 000000000..0ec303439 Binary files /dev/null and b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 000000000..0ec303439 Binary files /dev/null and b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 000000000..e9f5fea27 Binary files /dev/null and b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 000000000..84ac32ae7 Binary files /dev/null and b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 000000000..8953cba09 Binary files /dev/null and b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 000000000..0467bf12a Binary files /dev/null and b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 000000000..0bedcf2fd --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchImage.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 000000000..89c2725b7 --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 000000000..f2e259c7c --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Base.lproj/Main.storyboard b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 000000000..f3c28516f --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Info.plist b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Info.plist new file mode 100644 index 000000000..6637c3943 --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Info.plist @@ -0,0 +1,49 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Gma Mediation Chartboost + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + gma_mediation_chartboost_example + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + CADisableMinimumFrameDurationOnPhone + + UIApplicationSupportsIndirectInputEvents + + + diff --git a/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Runner-Bridging-Header.h b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 000000000..308a2a560 --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/example/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/packages/mediation/gma_mediation_chartboost/example/ios/RunnerTests/GmaMediationChartboostPluginTest.swift b/packages/mediation/gma_mediation_chartboost/example/ios/RunnerTests/GmaMediationChartboostPluginTest.swift new file mode 100644 index 000000000..ccc66805e --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/example/ios/RunnerTests/GmaMediationChartboostPluginTest.swift @@ -0,0 +1,20 @@ +// 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 +// +// https://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 UIKit +import XCTest + +@testable import gma_mediation_chartboost + +class GmaMediationChartboostPluginTests: XCTestCase { } diff --git a/packages/mediation/gma_mediation_chartboost/example/lib/main.dart b/packages/mediation/gma_mediation_chartboost/example/lib/main.dart new file mode 100644 index 000000000..ea02decb7 --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/example/lib/main.dart @@ -0,0 +1,29 @@ +import 'package:flutter/material.dart'; + +void main() { + runApp(const MyApp()); +} + +class MyApp extends StatefulWidget { + const MyApp({super.key}); + + @override + State createState() => _MyAppState(); +} + +class _MyAppState extends State { + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Scaffold( + appBar: AppBar(title: const Text('Plugin example app')), + body: const Center(child: Text('Test app')), + ), + ); + } +} diff --git a/packages/mediation/gma_mediation_chartboost/example/pubspec.lock b/packages/mediation/gma_mediation_chartboost/example/pubspec.lock new file mode 100644 index 000000000..e9f86a3ab --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/example/pubspec.lock @@ -0,0 +1,323 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + async: + dependency: transitive + description: + name: async + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" + source: hosted + version: "2.11.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + characters: + dependency: transitive + description: + name: characters + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" + source: hosted + version: "1.3.0" + clock: + dependency: transitive + description: + name: clock + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" + source: hosted + version: "1.1.1" + collection: + dependency: transitive + description: + name: collection + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + url: "https://pub.dev" + source: hosted + version: "1.18.0" + cupertino_icons: + dependency: "direct main" + description: + name: cupertino_icons + sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 + url: "https://pub.dev" + source: hosted + version: "1.0.8" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" + source: hosted + version: "1.3.1" + file: + dependency: transitive + description: + name: file + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" + url: "https://pub.dev" + source: hosted + version: "7.0.0" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_driver: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" + url: "https://pub.dev" + source: hosted + version: "4.0.0" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + fuchsia_remote_debug_protocol: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + gma_mediation_chartboost: + dependency: "direct main" + description: + path: ".." + relative: true + source: path + version: "1.0.0" + google_mobile_ads: + dependency: transitive + description: + name: google_mobile_ads + sha256: "4775006383a27a5d86d46f8fb452bfcb17794fc0a46c732979e49a8eb1c8963f" + url: "https://pub.dev" + source: hosted + version: "5.2.0" + integration_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" + url: "https://pub.dev" + source: hosted + version: "10.0.5" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" + url: "https://pub.dev" + source: hosted + version: "3.0.5" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + lints: + dependency: transitive + description: + name: lints + sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" + url: "https://pub.dev" + source: hosted + version: "4.0.0" + matcher: + dependency: transitive + description: + name: matcher + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + url: "https://pub.dev" + source: hosted + version: "0.12.16+1" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + url: "https://pub.dev" + source: hosted + version: "0.11.1" + meta: + dependency: transitive + description: + name: meta + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 + url: "https://pub.dev" + source: hosted + version: "1.15.0" + path: + dependency: transitive + description: + name: path + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + url: "https://pub.dev" + source: hosted + version: "1.9.0" + platform: + dependency: transitive + description: + name: platform + sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" + url: "https://pub.dev" + source: hosted + version: "3.1.5" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" + process: + dependency: transitive + description: + name: process + sha256: "21e54fd2faf1b5bdd5102afd25012184a6793927648ea81eea80552ac9405b32" + url: "https://pub.dev" + source: hosted + version: "5.0.2" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + source_span: + dependency: transitive + description: + name: source_span + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" + source: hosted + version: "1.10.0" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + url: "https://pub.dev" + source: hosted + version: "1.11.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" + source: hosted + version: "2.1.2" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + sync_http: + dependency: transitive + description: + name: sync_http + sha256: "7f0cd72eca000d2e026bcd6f990b81d0ca06022ef4e32fb257b30d3d1014a961" + url: "https://pub.dev" + source: hosted + version: "0.3.1" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + test_api: + dependency: transitive + description: + name: test_api + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" + url: "https://pub.dev" + source: hosted + version: "0.7.2" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" + url: "https://pub.dev" + source: hosted + version: "14.2.5" + webdriver: + dependency: transitive + description: + name: webdriver + sha256: "003d7da9519e1e5f329422b36c4dcdf18d7d2978d1ba099ea4e45ba490ed845e" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + webview_flutter: + dependency: transitive + description: + name: webview_flutter + sha256: ec81f57aa1611f8ebecf1d2259da4ef052281cb5ad624131c93546c79ccc7736 + url: "https://pub.dev" + source: hosted + version: "4.9.0" + webview_flutter_android: + dependency: transitive + description: + name: webview_flutter_android + sha256: "47a8da40d02befda5b151a26dba71f47df471cddd91dfdb7802d0a87c5442558" + url: "https://pub.dev" + source: hosted + version: "3.16.9" + webview_flutter_platform_interface: + dependency: transitive + description: + name: webview_flutter_platform_interface + sha256: d937581d6e558908d7ae3dc1989c4f87b786891ab47bb9df7de548a151779d8d + url: "https://pub.dev" + source: hosted + version: "2.10.0" + webview_flutter_wkwebview: + dependency: transitive + description: + name: webview_flutter_wkwebview + sha256: b7e92f129482460951d96ef9a46b49db34bd2e1621685de26e9eaafd9674e7eb + url: "https://pub.dev" + source: hosted + version: "3.16.3" +sdks: + dart: ">=3.5.4 <4.0.0" + flutter: ">=3.24.0" diff --git a/packages/mediation/gma_mediation_chartboost/example/pubspec.yaml b/packages/mediation/gma_mediation_chartboost/example/pubspec.yaml new file mode 100644 index 000000000..882e8ee57 --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/example/pubspec.yaml @@ -0,0 +1,86 @@ +name: gma_mediation_chartboost_example +description: "Demonstrates how to use the gma_mediation_chartboost plugin." +# The following line prevents the package from being accidentally published to +# pub.dev using `flutter pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +environment: + sdk: ^3.6.0 + +# Dependencies specify other packages that your package needs in order to work. +# To automatically upgrade your package dependencies to the latest versions +# consider running `flutter pub upgrade --major-versions`. Alternatively, +# dependencies can be manually updated by changing the version numbers below to +# the latest version available on pub.dev. To see which dependencies have newer +# versions available, run `flutter pub outdated`. +dependencies: + flutter: + sdk: flutter + + google_mobile_ads: ^6.0.0 + gma_mediation_chartboost: + # When depending on this package from a real application you should use: + # gma_mediation_chartboost: ^x.y.z + # See https://dart.dev/tools/pub/dependencies#version-constraints + # The example app is bundled with the plugin so we use a path dependency on + # the parent directory to use the current plugin's version. + path: ../ + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^1.0.8 + +dev_dependencies: + integration_test: + sdk: flutter + flutter_test: + sdk: flutter + + # The "flutter_lints" package below contains a set of recommended lints to + # encourage good coding practices. The lint set provided by the package is + # activated in the `analysis_options.yaml` file located at the root of your + # package. See that file for information about deactivating specific lint + # rules and activating additional ones. + flutter_lints: ^4.0.0 + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter packages. +flutter: + + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + + # To add assets to your application, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/to/resolution-aware-images + + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/to/asset-from-package + + # To add custom fonts to your application, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts from package dependencies, + # see https://flutter.dev/to/font-from-package diff --git a/packages/mediation/gma_mediation_chartboost/gma_mediation_chartboost.iml b/packages/mediation/gma_mediation_chartboost/gma_mediation_chartboost.iml new file mode 100644 index 000000000..27686dd4b --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/gma_mediation_chartboost.iml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_chartboost/ios/Classes/GmaMediationChartboostPlugin.swift b/packages/mediation/gma_mediation_chartboost/ios/Classes/GmaMediationChartboostPlugin.swift new file mode 100644 index 000000000..ef294f815 --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/ios/Classes/GmaMediationChartboostPlugin.swift @@ -0,0 +1,21 @@ +// 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 +// +// https://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 Flutter +import UIKit + +/** Required to link the iOS dependency of the Chartboost Adapter. */ +public class GmaMediationChartboostPlugin: NSObject, FlutterPlugin { + public static func register(with registrar: FlutterPluginRegistrar) { } +} diff --git a/packages/mediation/gma_mediation_chartboost/ios/Resources/PrivacyInfo.xcprivacy b/packages/mediation/gma_mediation_chartboost/ios/Resources/PrivacyInfo.xcprivacy new file mode 100644 index 000000000..a34b7e2e6 --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/ios/Resources/PrivacyInfo.xcprivacy @@ -0,0 +1,14 @@ + + + + + NSPrivacyTrackingDomains + + NSPrivacyAccessedAPITypes + + NSPrivacyCollectedDataTypes + + NSPrivacyTracking + + + diff --git a/packages/mediation/gma_mediation_chartboost/ios/gma_mediation_chartboost.podspec b/packages/mediation/gma_mediation_chartboost/ios/gma_mediation_chartboost.podspec new file mode 100644 index 000000000..4391b41c1 --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/ios/gma_mediation_chartboost.podspec @@ -0,0 +1,21 @@ +Pod::Spec.new do |s| + s.name = 'gma_mediation_chartboost' + s.version = '1.3.3' + s.summary = 'Google Mobile Ads Mediation of Chartboost.' + s.description = <<-DESC + Mediation Adapter for Chartboost to use with Google Mobile Ads. + DESC + s.homepage = 'https://developers.google.com/admob/flutter/mediation/chartboost' + s.license = { :file => '../LICENSE' } + s.author = { 'Google LLC' => 'mediation-support@google.com' } + s.source = { :path => '.' } + s.source_files = 'Classes/**/*' + s.dependency 'Flutter' + s.dependency 'GoogleMobileAdsMediationChartboost', '~>9.10.1.0' + s.platform = :ios, '12.0' + s.static_framework = true + + s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' } + s.swift_version = '5.0' + +end diff --git a/packages/mediation/gma_mediation_chartboost/lib/gma_mediation_chartboost.dart b/packages/mediation/gma_mediation_chartboost/lib/gma_mediation_chartboost.dart new file mode 100644 index 000000000..666426317 --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/lib/gma_mediation_chartboost.dart @@ -0,0 +1,16 @@ +// 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 +// +// https://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. + +/// This empty class is needed to allow correct compatibility analysis with host platforms. +class GmaMediationChartboost {} diff --git a/packages/mediation/gma_mediation_chartboost/pigeons/chartboost_sdk_api.dart b/packages/mediation/gma_mediation_chartboost/pigeons/chartboost_sdk_api.dart new file mode 100644 index 000000000..2dee582e4 --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/pigeons/chartboost_sdk_api.dart @@ -0,0 +1,35 @@ +// 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 +// +// https://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 'package:pigeon/pigeon.dart'; + +@ConfigurePigeon( + PigeonOptions( + dartOut: 'lib/chartboost_sdk_api.g.dart', + dartOptions: DartOptions(), + kotlinOut: + 'android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_chartboost/ChartboostSDKApi.g.kt', + kotlinOptions: KotlinOptions( + package: + "io.flutter.plugins.googlemobileads.mediation.gma_mediation_chartboost", + ), + swiftOut: 'ios/Classes/ChartboostSDKApi.g.swift', + swiftOptions: SwiftOptions(), + dartPackageName: 'gma_mediation_chartboost', + ), +) +@HostApi() + +/// The generated classes set the channels to call the methods in the corresponding kotlin ChartboostSDKApi interface and swift ChartboostSDKApi protocol from the dart layer. +abstract class ChartboostSDKApi {} diff --git a/packages/mediation/gma_mediation_chartboost/pubspec.lock b/packages/mediation/gma_mediation_chartboost/pubspec.lock new file mode 100644 index 000000000..49b6a2583 --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/pubspec.lock @@ -0,0 +1,426 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + sha256: f256b0c0ba6c7577c15e2e4e114755640a875e885099367bf6e012b19314c834 + url: "https://pub.dev" + source: hosted + version: "72.0.0" + _macros: + dependency: transitive + description: dart + source: sdk + version: "0.3.2" + analyzer: + dependency: transitive + description: + name: analyzer + sha256: b652861553cd3990d8ed361f7979dc6d7053a9ac8843fa73820ab68ce5410139 + url: "https://pub.dev" + source: hosted + version: "6.7.0" + args: + dependency: transitive + description: + name: args + sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6 + url: "https://pub.dev" + source: hosted + version: "2.6.0" + async: + dependency: transitive + description: + name: async + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" + source: hosted + version: "2.11.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + built_collection: + dependency: transitive + description: + name: built_collection + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" + url: "https://pub.dev" + source: hosted + version: "5.1.1" + built_value: + dependency: transitive + description: + name: built_value + sha256: c7913a9737ee4007efedaffc968c049fd0f3d0e49109e778edc10de9426005cb + url: "https://pub.dev" + source: hosted + version: "8.9.2" + characters: + dependency: transitive + description: + name: characters + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" + source: hosted + version: "1.3.0" + clock: + dependency: transitive + description: + name: clock + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" + source: hosted + version: "1.1.1" + code_builder: + dependency: transitive + description: + name: code_builder + sha256: "0ec10bf4a89e4c613960bf1e8b42c64127021740fb21640c29c909826a5eea3e" + url: "https://pub.dev" + source: hosted + version: "4.10.1" + collection: + dependency: transitive + description: + name: collection + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + url: "https://pub.dev" + source: hosted + version: "1.18.0" + convert: + dependency: transitive + description: + name: convert + sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 + url: "https://pub.dev" + source: hosted + version: "3.1.2" + crypto: + dependency: transitive + description: + name: crypto + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" + url: "https://pub.dev" + source: hosted + version: "3.0.6" + dart_style: + dependency: transitive + description: + name: dart_style + sha256: "7856d364b589d1f08986e140938578ed36ed948581fbc3bc9aef1805039ac5ab" + url: "https://pub.dev" + source: hosted + version: "2.3.7" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" + source: hosted + version: "1.3.1" + file: + dependency: transitive + description: + name: file + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 + url: "https://pub.dev" + source: hosted + version: "7.0.1" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be + url: "https://pub.dev" + source: hosted + version: "1.1.1" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" + url: "https://pub.dev" + source: hosted + version: "4.0.0" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + glob: + dependency: transitive + description: + name: glob + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + google_mobile_ads: + dependency: "direct main" + description: + name: google_mobile_ads + sha256: "4775006383a27a5d86d46f8fb452bfcb17794fc0a46c732979e49a8eb1c8963f" + url: "https://pub.dev" + source: hosted + version: "5.2.0" + graphs: + dependency: transitive + description: + name: graphs + sha256: "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" + url: "https://pub.dev" + source: hosted + version: "10.0.5" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" + url: "https://pub.dev" + source: hosted + version: "3.0.5" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + lint: + dependency: "direct dev" + description: + name: lint + sha256: d758a5211fce7fd3f5e316f804daefecdc34c7e53559716125e6da7388ae8565 + url: "https://pub.dev" + source: hosted + version: "2.3.0" + lints: + dependency: transitive + description: + name: lints + sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" + url: "https://pub.dev" + source: hosted + version: "4.0.0" + macros: + dependency: transitive + description: + name: macros + sha256: "0acaed5d6b7eab89f63350bccd82119e6c602df0f391260d0e32b5e23db79536" + url: "https://pub.dev" + source: hosted + version: "0.1.2-main.4" + matcher: + dependency: transitive + description: + name: matcher + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + url: "https://pub.dev" + source: hosted + version: "0.12.16+1" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + url: "https://pub.dev" + source: hosted + version: "0.11.1" + meta: + dependency: transitive + description: + name: meta + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 + url: "https://pub.dev" + source: hosted + version: "1.15.0" + package_config: + dependency: transitive + description: + name: package_config + sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + path: + dependency: transitive + description: + name: path + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + url: "https://pub.dev" + source: hosted + version: "1.9.0" + pigeon: + dependency: "direct dev" + description: + name: pigeon + sha256: "8e72590d29cdf327d290c266eb88983842fd3cfa027d8ad3599997be7e523746" + url: "https://pub.dev" + source: hosted + version: "22.6.2" + plugin_platform_interface: + dependency: "direct main" + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + source_span: + dependency: transitive + description: + name: source_span + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" + source: hosted + version: "1.10.0" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + url: "https://pub.dev" + source: hosted + version: "1.11.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" + source: hosted + version: "2.1.2" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + test_api: + dependency: transitive + description: + name: test_api + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" + url: "https://pub.dev" + source: hosted + version: "0.7.2" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 + url: "https://pub.dev" + source: hosted + version: "1.4.0" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" + url: "https://pub.dev" + source: hosted + version: "14.2.5" + watcher: + dependency: transitive + description: + name: watcher + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + webview_flutter: + dependency: transitive + description: + name: webview_flutter + sha256: ec81f57aa1611f8ebecf1d2259da4ef052281cb5ad624131c93546c79ccc7736 + url: "https://pub.dev" + source: hosted + version: "4.9.0" + webview_flutter_android: + dependency: transitive + description: + name: webview_flutter_android + sha256: "47a8da40d02befda5b151a26dba71f47df471cddd91dfdb7802d0a87c5442558" + url: "https://pub.dev" + source: hosted + version: "3.16.9" + webview_flutter_platform_interface: + dependency: transitive + description: + name: webview_flutter_platform_interface + sha256: d937581d6e558908d7ae3dc1989c4f87b786891ab47bb9df7de548a151779d8d + url: "https://pub.dev" + source: hosted + version: "2.10.0" + webview_flutter_wkwebview: + dependency: transitive + description: + name: webview_flutter_wkwebview + sha256: b7e92f129482460951d96ef9a46b49db34bd2e1621685de26e9eaafd9674e7eb + url: "https://pub.dev" + source: hosted + version: "3.16.3" + yaml: + dependency: transitive + description: + name: yaml + sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" + url: "https://pub.dev" + source: hosted + version: "3.1.2" +sdks: + dart: ">=3.5.4 <4.0.0" + flutter: ">=3.24.0" diff --git a/packages/mediation/gma_mediation_chartboost/pubspec.yaml b/packages/mediation/gma_mediation_chartboost/pubspec.yaml new file mode 100644 index 000000000..568b4c81a --- /dev/null +++ b/packages/mediation/gma_mediation_chartboost/pubspec.yaml @@ -0,0 +1,27 @@ +name: gma_mediation_chartboost +description: 'Mediation Adapter that enables sending ad requests to the Chartboost + ad network using the google_mobile_ads plugin.' +version: 1.3.3 +environment: + sdk: '>=3.6.0 <4.0.0' + flutter: '>=3.27.0' +dependencies: + flutter: + sdk: flutter + google_mobile_ads: ^6.0.0 + plugin_platform_interface: ^2.0.2 +dev_dependencies: + flutter_lints: ^4.0.0 + flutter_test: + sdk: flutter + lint: ^2.3.0 + pigeon: ^22.6.2 +flutter: + plugin: + platforms: + android: + package: io.flutter.plugins.googlemobileads.mediation.gma_mediation_chartboost + pluginClass: GmaMediationChartboostPlugin + ios: + pluginClass: GmaMediationChartboostPlugin +repository: https://github.com/googleads/googleads-mobile-flutter/tree/main/packages/mediation/gma_mediation_chartboost diff --git a/packages/mediation/gma_mediation_dtexchange/.gitignore b/packages/mediation/gma_mediation_dtexchange/.gitignore new file mode 100644 index 000000000..ac5aa9893 --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/.gitignore @@ -0,0 +1,29 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. +/pubspec.lock +**/doc/api/ +.dart_tool/ +build/ diff --git a/packages/mediation/gma_mediation_dtexchange/.metadata b/packages/mediation/gma_mediation_dtexchange/.metadata new file mode 100644 index 000000000..a7455847d --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/.metadata @@ -0,0 +1,33 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "300451adae589accbece3490f4396f10bdf15e6e" + channel: "stable" + +project_type: plugin + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: 300451adae589accbece3490f4396f10bdf15e6e + base_revision: 300451adae589accbece3490f4396f10bdf15e6e + - platform: android + create_revision: 300451adae589accbece3490f4396f10bdf15e6e + base_revision: 300451adae589accbece3490f4396f10bdf15e6e + - platform: ios + create_revision: 300451adae589accbece3490f4396f10bdf15e6e + base_revision: 300451adae589accbece3490f4396f10bdf15e6e + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/packages/mediation/gma_mediation_dtexchange/CHANGELOG.md b/packages/mediation/gma_mediation_dtexchange/CHANGELOG.md new file mode 100644 index 000000000..4e1609152 --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/CHANGELOG.md @@ -0,0 +1,52 @@ +## DT Exchange Flutter Mediation Adapter Changelog + +#### Version 1.3.2 (In progress) +- Updated minimum Flutter version to 3.35.1 +- Updated to support Google Mobile Ads Flutter Plugin version 7.0.0 + +#### Version 1.3.1 +* Supports [DT Exchange Android adapter version 8.4.0.1](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/dtexchange/CHANGELOG.md#version-8401). +* Supports [DT Exchange iOS adapter version 8.4.2.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/DTExchange/CHANGELOG.md#version-8420). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.2.0 +* Supports [DT Exchange Android adapter version 8.4.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/dtexchange/CHANGELOG.md#version-8400). +* Supports [DT Exchange iOS adapter version 8.3.8.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/DTExchange/CHANGELOG.md#version-8380). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.1.5 +* Supports [DT Exchange Android adapter version 8.3.8.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/dtexchange/CHANGELOG.md#version-8380). +* Supports [DT Exchange iOS adapter version 8.3.8.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/DTExchange/CHANGELOG.md#version-8380). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.1.4 +* Supports [DT Exchange Android adapter version 8.3.7.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/dtexchange/CHANGELOG.md#version-8370). +* Supports [DT Exchange iOS adapter version 8.3.7.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/DTExchange/CHANGELOG.md#version-8370). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.1.3 +* Supports [DT Exchange Android adapter version 8.3.7.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/dtexchange/CHANGELOG.md#version-8370). +* Supports [DT Exchange iOS adapter version 8.3.6.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/DTExchange/CHANGELOG.md#version-8360). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.1.2 +* Supports [DT Exchange Android adapter version 8.3.6.1](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/dtexchange/CHANGELOG.md#version-8361). +* Supports [DT Exchange iOS adapter version 8.3.6.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/DTExchange/CHANGELOG.md#version-8360). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.1.1 +* Supports [DT Exchange Android adapter version 8.3.6.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/dtexchange/CHANGELOG.md#version-8360). +* Supports [DT Exchange iOS adapter version 8.3.5.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/DTExchange/CHANGELOG.md#version-8350). +* Built and tested with the Google Mobile Ads Flutter Plugin version 5.3.1. + +#### Version 1.1.0 +* iOS plugin is now a static framework. +* Supports [DT Exchange Android adapter version 8.3.5.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/dtexchange/CHANGELOG.md#version-8350). +* Supports [DT Exchange iOS adapter version 8.3.4.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/DTExchange/CHANGELOG.md#version-8340). +* Built and tested with the Google Mobile Ads Flutter Plugin version 5.3.1. + +#### Version 1.0.0 +* Initial release. +* Supports [DT Exchange Android adapter version 8.2.7.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/dtexchange/CHANGELOG.md#version-8270). +* Supports [DT Exchange iOS adapter version 8.2.8.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/DTExchange/CHANGELOG.md#version-8280). +* Built and tested with the Google Mobile Ads Flutter Plugin version 5.1.0. diff --git a/packages/mediation/gma_mediation_dtexchange/LICENSE b/packages/mediation/gma_mediation_dtexchange/LICENSE new file mode 100644 index 000000000..d64569567 --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/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/packages/mediation/gma_mediation_dtexchange/README.md b/packages/mediation/gma_mediation_dtexchange/README.md new file mode 100644 index 000000000..6f827634d --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/README.md @@ -0,0 +1,36 @@ +# Google Mobile Ads Mediation of DT Exchange for Flutter + +[![gma_mediation_dtexchange](https://github.com/googleads/googleads-mobile-flutter/actions/workflows/google_mobile_ads.yaml/badge.svg)](https://github.com/googleads/googleads-mobile-flutter/actions/workflows/google_mobile_ads.yaml) + +This repository contains the source code for the Mediation DT Exchange Flutter +plugin to be used with the Google Mobile Ads plugin. It enables mediation of the +DT Exchange Ad Network through the Google Mobile Ads SDK. + +This plugin use the [Pigeon Flutter plugin](https://pub.dev/packages/pigeon) to +generate the classes that bridge the dart layer with each platform's code. +To add or modify the third party sdk, use the classes in the pigeons folder +following [this guide](https://github.com/flutter/packages/blob/main/packages/pigeon/example/README.md). + +## Documentation +For instructions on how to use with the google_mobile_ads plugin, refer to the +developer guide for [DT Exchange](https://developers.google.com/admob/flutter/mediation/dt-exchange). + +## Downloads + +See [pub.dev](https://pub.dev/packages/gma_mediation_dtexchange/versions) for the +latest releases of the plugin. + +## Suggesting improvements + +To file bugs, make feature requests, or to suggest other improvements, please +use [github's issue tracker](https://github.com/googleads/googleads-mobile-flutter/issues). + + +## Other resources + +* [AdMob help center](https://support.google.com/admob/?hl=en#topic=7383088) +* [Ad Manager help center](https://support.google.com/admanager/?hl=en#topic=7505988) + +## License + +[Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0) \ No newline at end of file diff --git a/packages/mediation/gma_mediation_dtexchange/analysis_options.yaml b/packages/mediation/gma_mediation_dtexchange/analysis_options.yaml new file mode 100644 index 000000000..7ccbffbb3 --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/analysis_options.yaml @@ -0,0 +1,19 @@ +#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 +# +#https://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. + +include: package:lint/package.yaml + +analyzer: + exclude: + - '**.g.dart' diff --git a/packages/mediation/gma_mediation_dtexchange/android/.gitignore b/packages/mediation/gma_mediation_dtexchange/android/.gitignore new file mode 100644 index 000000000..161bdcdaf --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/android/.gitignore @@ -0,0 +1,9 @@ +*.iml +.gradle +/local.properties +/.idea/workspace.xml +/.idea/libraries +.DS_Store +/build +/captures +.cxx diff --git a/packages/mediation/gma_mediation_dtexchange/android/build.gradle b/packages/mediation/gma_mediation_dtexchange/android/build.gradle new file mode 100644 index 000000000..113c63d42 --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/android/build.gradle @@ -0,0 +1,83 @@ +group 'io.flutter.plugins.googlemobileads.mediation.gma_mediation_dtexchange' +version = "1.3.2" + +buildscript { + ext.kotlin_version = '2.2.21' + repositories { + google() + mavenCentral() + } + + dependencies { + classpath 'com.android.tools.build:gradle:8.13.1' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + +allprojects { + repositories { + google() + mavenCentral() + } +} + +apply plugin: 'com.android.library' +apply plugin: 'kotlin-android' + +ext { + stringVersion = "8.4.1.0" +} + +android { + if (project.android.hasProperty("namespace")) { + namespace 'io.flutter.plugins.googlemobileads.mediation.gma_mediation_dtexchange' + } + + compileSdk 36 + + compileOptions { + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + test.java.srcDirs += 'src/test/kotlin' + } + + defaultConfig { + minSdkVersion 24 + } + + dependencies { + implementation "com.google.ads.mediation:fyber:$stringVersion" + testImplementation 'junit:junit:4.13.2' + testImplementation 'androidx.test:core:1.5.0' + testImplementation 'androidx.test:core-ktx:1.5.0' + testImplementation 'androidx.test.ext:junit:1.1.5' + testImplementation 'org.jetbrains.kotlin:kotlin-stdlib:1.8.20' + testImplementation 'org.mockito:mockito-core:5.5.0' + testImplementation 'org.mockito.kotlin:mockito-kotlin:5.1.0' + testImplementation 'org.robolectric:robolectric:4.16' + } + + testOptions { + unitTests.all { + useJUnit() + + testLogging { + events "passed", "skipped", "failed", "standardOut", "standardError" + outputs.upToDateWhen {false} + showStandardStreams = true + } + } + unitTests { + includeAndroidResources = true + unitTests.returnDefaultValues = true + } + } +} diff --git a/packages/mediation/gma_mediation_dtexchange/android/settings.gradle b/packages/mediation/gma_mediation_dtexchange/android/settings.gradle new file mode 100644 index 000000000..e0325a919 --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/android/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'gma_mediation_dtexchange' diff --git a/packages/mediation/gma_mediation_dtexchange/android/src/main/AndroidManifest.xml b/packages/mediation/gma_mediation_dtexchange/android/src/main/AndroidManifest.xml new file mode 100644 index 000000000..06e305086 --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/android/src/main/AndroidManifest.xml @@ -0,0 +1,3 @@ + + diff --git a/packages/mediation/gma_mediation_dtexchange/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_dtexchange/DTExchangePrivacyApi.g.kt b/packages/mediation/gma_mediation_dtexchange/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_dtexchange/DTExchangePrivacyApi.g.kt new file mode 100644 index 000000000..ba689dcf9 --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_dtexchange/DTExchangePrivacyApi.g.kt @@ -0,0 +1,139 @@ +// Autogenerated from Pigeon (v19.0.0), do not edit directly. +// See also: https://pub.dev/packages/pigeon +@file:Suppress("UNCHECKED_CAST", "ArrayInDataClass") + +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_dtexchange + +import android.util.Log +import io.flutter.plugin.common.BasicMessageChannel +import io.flutter.plugin.common.BinaryMessenger +import io.flutter.plugin.common.MessageCodec +import io.flutter.plugin.common.StandardMessageCodec +import java.io.ByteArrayOutputStream +import java.nio.ByteBuffer + +private fun wrapResult(result: Any?): List { + return listOf(result) +} + +private fun wrapError(exception: Throwable): List { + return if (exception is FlutterError) { + listOf( + exception.code, + exception.message, + exception.details + ) + } else { + listOf( + exception.javaClass.simpleName, + exception.toString(), + "Cause: " + exception.cause + ", Stacktrace: " + Log.getStackTraceString(exception) + ) + } +} + +/** + * Error class for passing custom error details to Flutter via a thrown PlatformException. + * @property code The error code. + * @property message The error message. + * @property details The error details. Must be a datatype supported by the api codec. + */ +class FlutterError ( + val code: String, + override val message: String? = null, + val details: Any? = null +) : Throwable() +/** + * The generated classes set the channels to call the methods in the corresponding kotlin DTExchangePrivacyApi interface and swift DTExchangePrivacyApi protocol from the dart layer. + * + * Generated interface from Pigeon that represents a handler of messages from Flutter. + */ +interface DTExchangePrivacyApi { + /** Used to configure LGDP on the Android or iOS DTExchange SDK. */ + fun setLgpdConsent(wasConsentGiven: Boolean) + /** Used to clear the LGDP flag on the Android or iOS DTExchange SDK. */ + fun clearLgpdConsentData() + /** Used to configure consent to Sell Personal Information on the Android or iOS DTExchange SDK. */ + fun setUSPrivacyString(usPrivacyString: String) + /** Used to clear the US Privacy flag on the Android or iOS DTExchange SDK. */ + fun clearUSPrivacyString() + + companion object { + /** The codec used by DTExchangePrivacyApi. */ + val codec: MessageCodec by lazy { + StandardMessageCodec() + } + /** Sets up an instance of `DTExchangePrivacyApi` to handle messages through the `binaryMessenger`. */ + fun setUp(binaryMessenger: BinaryMessenger, api: DTExchangePrivacyApi?, messageChannelSuffix: String = "") { + val separatedMessageChannelSuffix = if (messageChannelSuffix.isNotEmpty()) ".$messageChannelSuffix" else "" + run { + val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.gma_mediation_dtexchange.DTExchangePrivacyApi.setLgpdConsent$separatedMessageChannelSuffix", codec) + if (api != null) { + channel.setMessageHandler { message, reply -> + val args = message as List + val wasConsentGivenArg = args[0] as Boolean + val wrapped: List = try { + api.setLgpdConsent(wasConsentGivenArg) + listOf(null) + } catch (exception: Throwable) { + wrapError(exception) + } + reply.reply(wrapped) + } + } else { + channel.setMessageHandler(null) + } + } + run { + val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.gma_mediation_dtexchange.DTExchangePrivacyApi.clearLgpdConsentData$separatedMessageChannelSuffix", codec) + if (api != null) { + channel.setMessageHandler { _, reply -> + val wrapped: List = try { + api.clearLgpdConsentData() + listOf(null) + } catch (exception: Throwable) { + wrapError(exception) + } + reply.reply(wrapped) + } + } else { + channel.setMessageHandler(null) + } + } + run { + val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.gma_mediation_dtexchange.DTExchangePrivacyApi.setUSPrivacyString$separatedMessageChannelSuffix", codec) + if (api != null) { + channel.setMessageHandler { message, reply -> + val args = message as List + val usPrivacyStringArg = args[0] as String + val wrapped: List = try { + api.setUSPrivacyString(usPrivacyStringArg) + listOf(null) + } catch (exception: Throwable) { + wrapError(exception) + } + reply.reply(wrapped) + } + } else { + channel.setMessageHandler(null) + } + } + run { + val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.gma_mediation_dtexchange.DTExchangePrivacyApi.clearUSPrivacyString$separatedMessageChannelSuffix", codec) + if (api != null) { + channel.setMessageHandler { _, reply -> + val wrapped: List = try { + api.clearUSPrivacyString() + listOf(null) + } catch (exception: Throwable) { + wrapError(exception) + } + reply.reply(wrapped) + } + } else { + channel.setMessageHandler(null) + } + } + } + } +} diff --git a/packages/mediation/gma_mediation_dtexchange/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_dtexchange/GmaMediationDTExchangePlugin.kt b/packages/mediation/gma_mediation_dtexchange/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_dtexchange/GmaMediationDTExchangePlugin.kt new file mode 100644 index 000000000..d07fd5298 --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_dtexchange/GmaMediationDTExchangePlugin.kt @@ -0,0 +1,31 @@ +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_dtexchange + +import com.fyber.inneractive.sdk.external.InneractiveAdManager +import io.flutter.embedding.engine.plugins.FlutterPlugin + +/** Manages DTExchangePrivacyApi and implements the needed methods. */ +class GmaMediationDTExchangePlugin: FlutterPlugin, DTExchangePrivacyApi { + override fun onAttachedToEngine(flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) { + DTExchangePrivacyApi.setUp(flutterPluginBinding.binaryMessenger, this) + } + + override fun onDetachedFromEngine(binding: FlutterPlugin.FlutterPluginBinding) { + DTExchangePrivacyApi.setUp(binding.binaryMessenger, null) + } + + override fun setLgpdConsent(wasConsentGiven: Boolean) { + InneractiveAdManager.setLgpdConsent(wasConsentGiven) + } + + override fun clearLgpdConsentData() { + InneractiveAdManager.clearLgpdConsentData() + } + + override fun setUSPrivacyString(usPrivacyString: String) { + InneractiveAdManager.setUSPrivacyString(usPrivacyString) + } + + override fun clearUSPrivacyString() { + InneractiveAdManager.clearUSPrivacyString() + } +} diff --git a/packages/mediation/gma_mediation_dtexchange/android/src/test/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_dtexchange/GmaMediationDtexchangePluginTest.kt b/packages/mediation/gma_mediation_dtexchange/android/src/test/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_dtexchange/GmaMediationDtexchangePluginTest.kt new file mode 100644 index 000000000..e0a2238fc --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/android/src/test/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_dtexchange/GmaMediationDtexchangePluginTest.kt @@ -0,0 +1,80 @@ +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_dtexchange + +import androidx.test.ext.junit.runners.AndroidJUnit4 +import com.fyber.inneractive.sdk.external.InneractiveAdManager +import org.junit.Test +import org.junit.runner.RunWith +import org.mockito.Mockito.mockStatic +import org.mockito.kotlin.eq + +@RunWith(AndroidJUnit4::class) +internal class GmaMediationDtexchangePluginTest { + @Test + fun setLgpdConsent_withTrueValue_invokesSetLgpdConsentWithTrueValue() { + val plugin = GmaMediationDTExchangePlugin() + mockStatic(InneractiveAdManager::class.java).use { mockedDTExchangeAdManager -> + + plugin.setLgpdConsent(true) + + mockedDTExchangeAdManager.verify { + InneractiveAdManager.setLgpdConsent(eq(true)) + } + } + } + + @Test + fun setLgpdConsent_withFalseValue_invokesSetLgpdConsentWithFalseValue() { + val plugin = GmaMediationDTExchangePlugin() + mockStatic(InneractiveAdManager::class.java).use { mockedDTExchangeAdManager -> + + plugin.setLgpdConsent(false) + + mockedDTExchangeAdManager.verify { + InneractiveAdManager.setLgpdConsent(eq(false)) + } + } + } + + @Test + fun clearLgpdConsentData_invokesClearLgpdConsentData() { + val plugin = GmaMediationDTExchangePlugin() + mockStatic(InneractiveAdManager::class.java).use { mockedDTExchangeAdManager -> + + plugin.clearLgpdConsentData() + + mockedDTExchangeAdManager.verify { + InneractiveAdManager.clearLgpdConsentData() + } + } + } + + @Test + fun setUSPrivacyString_invokesSetUSPrivacyString() { + val plugin = GmaMediationDTExchangePlugin() + mockStatic(InneractiveAdManager::class.java).use { mockedDTExchangeAdManager -> + + plugin.setUSPrivacyString(TEST_CONSENT_STRING) + + mockedDTExchangeAdManager.verify { + InneractiveAdManager.setUSPrivacyString(eq(TEST_CONSENT_STRING)) + } + } + } + + @Test + fun clearUSPrivacyString_invokesClearUSPrivacyString() { + val plugin = GmaMediationDTExchangePlugin() + mockStatic(InneractiveAdManager::class.java).use { mockedDTExchangeAdManager -> + + plugin.clearUSPrivacyString() + + mockedDTExchangeAdManager.verify { + InneractiveAdManager.clearUSPrivacyString() + } + } + } + + companion object { + const val TEST_CONSENT_STRING = "testConsentString" + } +} diff --git a/packages/mediation/gma_mediation_dtexchange/example/.gitignore b/packages/mediation/gma_mediation_dtexchange/example/.gitignore new file mode 100644 index 000000000..29a3a5017 --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/example/.gitignore @@ -0,0 +1,43 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.pub-cache/ +.pub/ +/build/ + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/packages/mediation/gma_mediation_dtexchange/example/README.md b/packages/mediation/gma_mediation_dtexchange/example/README.md new file mode 100644 index 000000000..c66eede08 --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/example/README.md @@ -0,0 +1,17 @@ +# gma_mediation_dtexchange_example + +Learn how to integrate with your app that uses the [google_mobile_ads](https://pub.dev/packages/google_mobile_ads) plugin +by following the [development guide](https://developers.google.com/admob/flutter/mediation/dt-exchange). + +## Getting Started + +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) + +For help getting started with Flutter development, view the +[online documentation](https://docs.flutter.dev/), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/packages/mediation/gma_mediation_dtexchange/example/analysis_options.yaml b/packages/mediation/gma_mediation_dtexchange/example/analysis_options.yaml new file mode 100644 index 000000000..0d2902135 --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/example/analysis_options.yaml @@ -0,0 +1,28 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at https://dart.dev/lints. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/packages/mediation/gma_mediation_dtexchange/example/android/.gitignore b/packages/mediation/gma_mediation_dtexchange/example/android/.gitignore new file mode 100644 index 000000000..6f568019d --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/example/android/.gitignore @@ -0,0 +1,13 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +key.properties +**/*.keystore +**/*.jks diff --git a/packages/mediation/gma_mediation_dtexchange/example/android/app/build.gradle b/packages/mediation/gma_mediation_dtexchange/example/android/app/build.gradle new file mode 100644 index 000000000..e465a5369 --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/example/android/app/build.gradle @@ -0,0 +1,67 @@ +plugins { + id "com.android.application" + id "kotlin-android" + id "dev.flutter.flutter-gradle-plugin" +} + +def localProperties = new Properties() +def localPropertiesFile = rootProject.file('local.properties') +if (localPropertiesFile.exists()) { + localPropertiesFile.withReader('UTF-8') { reader -> + localProperties.load(reader) + } +} + +def flutterVersionCode = localProperties.getProperty('flutter.versionCode') +if (flutterVersionCode == null) { + flutterVersionCode = '1' +} + +def flutterVersionName = localProperties.getProperty('flutter.versionName') +if (flutterVersionName == null) { + flutterVersionName = '1.0' +} + +android { + namespace "io.flutter.plugins.googlemobileads.mediation.gma_mediation_dtexchange_example" + compileSdk flutter.compileSdkVersion + ndkVersion flutter.ndkVersion + + compileOptions { + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId "io.flutter.plugins.googlemobileads.mediation.gma_mediation_dtexchange_example" + // You can update the following values to match your application needs. + // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. + minSdkVersion 24 + targetSdkVersion flutter.targetSdkVersion + versionCode flutterVersionCode.toInteger() + versionName flutterVersionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig signingConfigs.debug + } + } +} + +flutter { + source '../..' +} + +dependencies {} diff --git a/packages/mediation/gma_mediation_dtexchange/example/android/app/src/debug/AndroidManifest.xml b/packages/mediation/gma_mediation_dtexchange/example/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 000000000..399f6981d --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/example/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/packages/mediation/gma_mediation_dtexchange/example/android/app/src/main/AndroidManifest.xml b/packages/mediation/gma_mediation_dtexchange/example/android/app/src/main/AndroidManifest.xml new file mode 100644 index 000000000..5800a984b --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/example/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_dtexchange/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_dtexchange_example/MainActivity.kt b/packages/mediation/gma_mediation_dtexchange/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_dtexchange_example/MainActivity.kt new file mode 100644 index 000000000..5c78f3fe8 --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_dtexchange_example/MainActivity.kt @@ -0,0 +1,5 @@ +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_dtexchange_example + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() diff --git a/packages/mediation/gma_mediation_dtexchange/example/android/app/src/main/res/drawable-v21/launch_background.xml b/packages/mediation/gma_mediation_dtexchange/example/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 000000000..f74085f3f --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/example/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/mediation/gma_mediation_dtexchange/example/android/app/src/main/res/drawable/launch_background.xml b/packages/mediation/gma_mediation_dtexchange/example/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 000000000..304732f88 --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/example/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/mediation/gma_mediation_dtexchange/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/mediation/gma_mediation_dtexchange/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..db77bb4b7 Binary files /dev/null and b/packages/mediation/gma_mediation_dtexchange/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_dtexchange/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/mediation/gma_mediation_dtexchange/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..17987b79b Binary files /dev/null and b/packages/mediation/gma_mediation_dtexchange/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_dtexchange/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/mediation/gma_mediation_dtexchange/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..09d439148 Binary files /dev/null and b/packages/mediation/gma_mediation_dtexchange/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_dtexchange/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/mediation/gma_mediation_dtexchange/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..d5f1c8d34 Binary files /dev/null and b/packages/mediation/gma_mediation_dtexchange/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_dtexchange/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/packages/mediation/gma_mediation_dtexchange/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..4d6372eeb Binary files /dev/null and b/packages/mediation/gma_mediation_dtexchange/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_dtexchange/example/android/app/src/main/res/values-night/styles.xml b/packages/mediation/gma_mediation_dtexchange/example/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 000000000..06952be74 --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/example/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/packages/mediation/gma_mediation_dtexchange/example/android/app/src/main/res/values/styles.xml b/packages/mediation/gma_mediation_dtexchange/example/android/app/src/main/res/values/styles.xml new file mode 100644 index 000000000..cb1ef8805 --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/example/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/packages/mediation/gma_mediation_dtexchange/example/android/app/src/profile/AndroidManifest.xml b/packages/mediation/gma_mediation_dtexchange/example/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 000000000..399f6981d --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/example/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/packages/mediation/gma_mediation_dtexchange/example/android/build.gradle b/packages/mediation/gma_mediation_dtexchange/example/android/build.gradle new file mode 100644 index 000000000..bc157bd1a --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/example/android/build.gradle @@ -0,0 +1,18 @@ +allprojects { + repositories { + google() + mavenCentral() + } +} + +rootProject.buildDir = '../build' +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(':app') +} + +tasks.register("clean", Delete) { + delete rootProject.buildDir +} diff --git a/packages/mediation/gma_mediation_dtexchange/example/android/gradle.properties b/packages/mediation/gma_mediation_dtexchange/example/android/gradle.properties new file mode 100644 index 000000000..598d13fee --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/example/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx4G +android.useAndroidX=true +android.enableJetifier=true diff --git a/packages/mediation/gma_mediation_dtexchange/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/mediation/gma_mediation_dtexchange/example/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 000000000..f004c34c0 --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/example/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip diff --git a/packages/mediation/gma_mediation_dtexchange/example/android/settings.gradle b/packages/mediation/gma_mediation_dtexchange/example/android/settings.gradle new file mode 100644 index 000000000..a512319b9 --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/example/android/settings.gradle @@ -0,0 +1,26 @@ +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + } + settings.ext.flutterSdkPath = flutterSdkPath() + + includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") + + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "8.13.1" apply false + id "org.jetbrains.kotlin.android" version "2.2.21" apply false +} + +include ":app" diff --git a/packages/mediation/gma_mediation_dtexchange/example/ios/.gitignore b/packages/mediation/gma_mediation_dtexchange/example/ios/.gitignore new file mode 100644 index 000000000..7a7f9873a --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/example/ios/.gitignore @@ -0,0 +1,34 @@ +**/dgph +*.mode1v3 +*.mode2v3 +*.moved-aside +*.pbxuser +*.perspectivev3 +**/*sync/ +.sconsign.dblite +.tags* +**/.vagrant/ +**/DerivedData/ +Icon? +**/Pods/ +**/.symlinks/ +profile +xcuserdata +**/.generated/ +Flutter/App.framework +Flutter/Flutter.framework +Flutter/Flutter.podspec +Flutter/Generated.xcconfig +Flutter/ephemeral/ +Flutter/app.flx +Flutter/app.zip +Flutter/flutter_assets/ +Flutter/flutter_export_environment.sh +ServiceDefinitions.json +Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!default.mode1v3 +!default.mode2v3 +!default.pbxuser +!default.perspectivev3 diff --git a/packages/mediation/gma_mediation_dtexchange/example/ios/Flutter/AppFrameworkInfo.plist b/packages/mediation/gma_mediation_dtexchange/example/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 000000000..7c5696400 --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/example/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 12.0 + + diff --git a/packages/mediation/gma_mediation_dtexchange/example/ios/Flutter/Debug.xcconfig b/packages/mediation/gma_mediation_dtexchange/example/ios/Flutter/Debug.xcconfig new file mode 100644 index 000000000..ec97fc6f3 --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/example/ios/Flutter/Debug.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" +#include "Generated.xcconfig" diff --git a/packages/mediation/gma_mediation_dtexchange/example/ios/Flutter/Release.xcconfig b/packages/mediation/gma_mediation_dtexchange/example/ios/Flutter/Release.xcconfig new file mode 100644 index 000000000..c4855bfe2 --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/example/ios/Flutter/Release.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" +#include "Generated.xcconfig" diff --git a/packages/mediation/gma_mediation_dtexchange/example/ios/Podfile b/packages/mediation/gma_mediation_dtexchange/example/ios/Podfile new file mode 100644 index 000000000..b2d735017 --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/example/ios/Podfile @@ -0,0 +1,42 @@ +platform :ios, '13.0' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_ios_podfile_setup + +target 'Runner' do + use_modular_headers! + + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) + target 'RunnerTests' do + inherit! :search_paths + end +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_ios_build_settings(target) + end +end diff --git a/packages/mediation/gma_mediation_dtexchange/example/ios/Runner.xcodeproj/project.pbxproj b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 000000000..6822a923c --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,727 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 331C808B294A63AB00263BE5 /* GmaMediationDtexchangePluginTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* GmaMediationDtexchangePluginTests.swift */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 7ED3FF60DFA5AF8AFF6AB4C8 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E92C8C6658B2F16CF151B264 /* libPods-Runner.a */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; + B7373BCFDC6F242653274BD8 /* libPods-RunnerTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0FE6932FC6A221D2A065BA19 /* libPods-RunnerTests.a */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 97C146E61CF9000F007C117D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 97C146ED1CF9000F007C117D; + remoteInfo = Runner; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 0FE6932FC6A221D2A065BA19 /* libPods-RunnerTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RunnerTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 331C807B294A618700263BE5 /* GmaMediationDtexchangePluginTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GmaMediationDtexchangePluginTests.swift; sourceTree = ""; }; + 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7890833C8A06A38A9C6B8346 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 9B3AD38CDF99309487DCE609 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; + DD3DB214A5A7FC659D11247C /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; + E6B8122A81F4D5FEF3259BB4 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; }; + E92C8C6658B2F16CF151B264 /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + EEF3DFF0CD2042A5E4AA0DCA /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; + F8929DB9C0880FE085C306CE /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 7479BD3A993BCA69DD5BAE53 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + B7373BCFDC6F242653274BD8 /* libPods-RunnerTests.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 7ED3FF60DFA5AF8AFF6AB4C8 /* libPods-Runner.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 331C8082294A63A400263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C807B294A618700263BE5 /* GmaMediationDtexchangePluginTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 477D1DB2ED00F2BF4C86A6A4 /* Frameworks */ = { + isa = PBXGroup; + children = ( + E92C8C6658B2F16CF151B264 /* libPods-Runner.a */, + 0FE6932FC6A221D2A065BA19 /* libPods-RunnerTests.a */, + ); + name = Frameworks; + sourceTree = ""; + }; + 7F5876306538D9102F2D1064 /* Pods */ = { + isa = PBXGroup; + children = ( + F8929DB9C0880FE085C306CE /* Pods-Runner.debug.xcconfig */, + 7890833C8A06A38A9C6B8346 /* Pods-Runner.release.xcconfig */, + 9B3AD38CDF99309487DCE609 /* Pods-Runner.profile.xcconfig */, + EEF3DFF0CD2042A5E4AA0DCA /* Pods-RunnerTests.debug.xcconfig */, + DD3DB214A5A7FC659D11247C /* Pods-RunnerTests.release.xcconfig */, + E6B8122A81F4D5FEF3259BB4 /* Pods-RunnerTests.profile.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + 331C8082294A63A400263BE5 /* RunnerTests */, + 7F5876306538D9102F2D1064 /* Pods */, + 477D1DB2ED00F2BF4C86A6A4 /* Frameworks */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + 331C8081294A63A400263BE5 /* RunnerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C8080294A63A400263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 1BA28C831D9FE41B481A5CD7 /* [CP] Check Pods Manifest.lock */, + 331C807D294A63A400263BE5 /* Sources */, + 331C807F294A63A400263BE5 /* Resources */, + 7479BD3A993BCA69DD5BAE53 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 331C8086294A63A400263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + FF8E996C495CEC35947A4FF9 /* [CP] Check Pods Manifest.lock */, + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + 835FC7364862FD04126FFAAF /* [CP] Copy Pods Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1510; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 331C8080294A63A400263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 97C146ED1CF9000F007C117D; + }; + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + 331C8080294A63A400263BE5 /* RunnerTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 331C807F294A63A400263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 1BA28C831D9FE41B481A5CD7 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 835FC7364862FD04126FFAAF /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Copy Pods Resources"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; + FF8E996C495CEC35947A4FF9 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 331C807D294A63A400263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C808B294A63AB00263BE5 /* GmaMediationDtexchangePluginTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 331C8086294A63A400263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 97C146ED1CF9000F007C117D /* Runner */; + targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationDtexchangeExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 331C8088294A63A400263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = EEF3DFF0CD2042A5E4AA0DCA /* Pods-RunnerTests.debug.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationDtexchangeExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Debug; + }; + 331C8089294A63A400263BE5 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = DD3DB214A5A7FC659D11247C /* Pods-RunnerTests.release.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationDtexchangeExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Release; + }; + 331C808A294A63A400263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = E6B8122A81F4D5FEF3259BB4 /* Pods-RunnerTests.profile.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationDtexchangeExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationDtexchangeExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationDtexchangeExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C8088294A63A400263BE5 /* Debug */, + 331C8089294A63A400263BE5 /* Release */, + 331C808A294A63A400263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/packages/mediation/gma_mediation_dtexchange/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..919434a62 --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/packages/mediation/gma_mediation_dtexchange/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..21a3cc14c --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/AppDelegate.swift b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/AppDelegate.swift new file mode 100644 index 000000000..70693e4a8 --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import UIKit +import Flutter + +@UIApplicationMain +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..d36b1fab2 --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 000000000..dc9ada472 Binary files /dev/null and b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 000000000..7353c41ec Binary files /dev/null and b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 000000000..797d452e4 Binary files /dev/null and b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 000000000..6ed2d933e Binary files /dev/null and b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 000000000..4cd7b0099 Binary files /dev/null and b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 000000000..fe730945a Binary files /dev/null and b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 000000000..321773cd8 Binary files /dev/null and b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 000000000..797d452e4 Binary files /dev/null and b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 000000000..502f463a9 Binary files /dev/null and b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 000000000..0ec303439 Binary files /dev/null and b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 000000000..0ec303439 Binary files /dev/null and b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 000000000..e9f5fea27 Binary files /dev/null and b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 000000000..84ac32ae7 Binary files /dev/null and b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 000000000..8953cba09 Binary files /dev/null and b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 000000000..0467bf12a Binary files /dev/null and b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 000000000..0bedcf2fd --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchImage.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 000000000..89c2725b7 --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 000000000..f2e259c7c --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Base.lproj/Main.storyboard b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 000000000..f3c28516f --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Info.plist b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Info.plist new file mode 100644 index 000000000..74a403cd5 --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Info.plist @@ -0,0 +1,51 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Gma Mediation Dtexchange + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + gma_mediation_dtexchange_example + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + CADisableMinimumFrameDurationOnPhone + + UIApplicationSupportsIndirectInputEvents + + GADApplicationIdentifier + ca-app-pub-3940256099942544~1458002511 + + diff --git a/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Runner-Bridging-Header.h b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 000000000..308a2a560 --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/example/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/packages/mediation/gma_mediation_dtexchange/example/ios/RunnerTests/GmaMediationDtexchangePluginTests.swift b/packages/mediation/gma_mediation_dtexchange/example/ios/RunnerTests/GmaMediationDtexchangePluginTests.swift new file mode 100644 index 000000000..bfe8262a1 --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/example/ios/RunnerTests/GmaMediationDtexchangePluginTests.swift @@ -0,0 +1,88 @@ +import UIKit +import XCTest + +@testable import gma_mediation_dtexchange + +class GmaMediationDtexchangePluginTests: XCTestCase { + func testSetLgpdConsent() { + let dtExchangeFake = DTExchangePrivacyFake() + let plugin = GmaMediationDTExchangePlugin.init(dtExchangeApi: dtExchangeFake) + + do { + try plugin.setLgpdConsent(wasConsentGiven: true) + } catch { + fatalError("testSetLgpdConsent FAILED: setLgpdConsent did not complete.") + } + + XCTAssertEqual(dtExchangeFake.lgdpConsent, true) + } + + func testClearLgpdConsentData() { + let dtExchangeFake = DTExchangePrivacyFake() + let plugin = GmaMediationDTExchangePlugin.init(dtExchangeApi: dtExchangeFake) + + do { + try plugin.clearLgpdConsentData() + } catch { + fatalError("testClearLgpdConsentData FAILED: clearLgpdConsentData did not complete.") + } + + XCTAssertEqual(dtExchangeFake.clearLgdp, 1) + } + + func testSetUSPrivacyString() { + let dtExchangeFake = DTExchangePrivacyFake() + let plugin = GmaMediationDTExchangePlugin.init(dtExchangeApi: dtExchangeFake) + + do { + try plugin.setUSPrivacyString(usPrivacyString: "testString") + } catch { + fatalError("testSetUSPrivacyString FAILED: setUSPrivacyString did not complete.") + } + + XCTAssertEqual(dtExchangeFake.usPrivacyString, "testString") + } + + func testClearUSPrivacyString() { + let dtExchangeFake = DTExchangePrivacyFake() + let plugin = GmaMediationDTExchangePlugin.init(dtExchangeApi: dtExchangeFake) + + do { + try plugin.clearUSPrivacyString() + } catch { + fatalError("testClearUSPrivacyString FAILED: clearUSPrivacyString did not complete.") + } + + XCTAssertEqual(dtExchangeFake.clearUSPrivacy, 1) + } +} + +class DTExchangePrivacyFake : DTExchangePrivacyProtocol { + var lgdpConsent: Bool + var clearLgdp: Int + var usPrivacyString: String + var clearUSPrivacy: Int + + init() { + lgdpConsent = false + clearLgdp = 0 + usPrivacyString = "" + clearUSPrivacy = 0 + } + + func setLgpdConsent(wasConsentGiven: Bool) { + self.lgdpConsent = wasConsentGiven + } + + func clearLgpdConsentData() { + self.clearLgdp += 1 + } + + func setUSPrivacyString(usPrivacyString: String) { + self.usPrivacyString = usPrivacyString + } + + func clearUSPrivacyString() { + self.clearUSPrivacy += 1 + } +} diff --git a/packages/mediation/gma_mediation_dtexchange/example/lib/main.dart b/packages/mediation/gma_mediation_dtexchange/example/lib/main.dart new file mode 100644 index 000000000..665bfe31b --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/example/lib/main.dart @@ -0,0 +1,33 @@ +import 'package:flutter/material.dart'; + +void main() { + runApp(const MyApp()); +} + +class MyApp extends StatefulWidget { + const MyApp({super.key}); + + @override + State createState() => _MyAppState(); +} + +class _MyAppState extends State { + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Scaffold( + appBar: AppBar( + title: const Text('Plugin example app'), + ), + body: const Center( + child: Text('Test app'), + ), + ), + ); + } +} diff --git a/packages/mediation/gma_mediation_dtexchange/example/pubspec.yaml b/packages/mediation/gma_mediation_dtexchange/example/pubspec.yaml new file mode 100644 index 000000000..e3087e7ff --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/example/pubspec.yaml @@ -0,0 +1,86 @@ +name: gma_mediation_dtexchange_example +description: "Demonstrates how to use the gma_mediation_dtexchange plugin." +# The following line prevents the package from being accidentally published to +# pub.dev using `flutter pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +environment: + sdk: '>=3.9.0 <4.0.0' + +# Dependencies specify other packages that your package needs in order to work. +# To automatically upgrade your package dependencies to the latest versions +# consider running `flutter pub upgrade --major-versions`. Alternatively, +# dependencies can be manually updated by changing the version numbers below to +# the latest version available on pub.dev. To see which dependencies have newer +# versions available, run `flutter pub outdated`. +dependencies: + flutter: + sdk: flutter + + google_mobile_ads: ^7.0.0 + gma_mediation_dtexchange: + # When depending on this package from a real application you should use: + # gma_mediation_dtexchange: ^x.y.z + # See https://dart.dev/tools/pub/dependencies#version-constraints + # The example app is bundled with the plugin so we use a path dependency on + # the parent directory to use the current plugin's version. + path: ../ + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^1.0.6 + +dev_dependencies: + integration_test: + sdk: flutter + flutter_test: + sdk: flutter + + # The "flutter_lints" package below contains a set of recommended lints to + # encourage good coding practices. The lint set provided by the package is + # activated in the `analysis_options.yaml` file located at the root of your + # package. See that file for information about deactivating specific lint + # rules and activating additional ones. + flutter_lints: ^6.0.0 + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter packages. +flutter: + + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + + # To add assets to your application, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/assets-and-images/#resolution-aware + + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/assets-and-images/#from-packages + + # To add custom fonts to your application, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts from package dependencies, + # see https://flutter.dev/custom-fonts/#from-packages diff --git a/packages/mediation/gma_mediation_dtexchange/ios/.gitignore b/packages/mediation/gma_mediation_dtexchange/ios/.gitignore new file mode 100644 index 000000000..0c885071e --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/ios/.gitignore @@ -0,0 +1,38 @@ +.idea/ +.vagrant/ +.sconsign.dblite +.svn/ + +.DS_Store +*.swp +profile + +DerivedData/ +build/ +GeneratedPluginRegistrant.h +GeneratedPluginRegistrant.m + +.generated/ + +*.pbxuser +*.mode1v3 +*.mode2v3 +*.perspectivev3 + +!default.pbxuser +!default.mode1v3 +!default.mode2v3 +!default.perspectivev3 + +xcuserdata + +*.moved-aside + +*.pyc +*sync/ +Icon? +.tags* + +/Flutter/Generated.xcconfig +/Flutter/ephemeral/ +/Flutter/flutter_export_environment.sh \ No newline at end of file diff --git a/packages/mediation/gma_mediation_dtexchange/ios/Assets/.gitkeep b/packages/mediation/gma_mediation_dtexchange/ios/Assets/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/packages/mediation/gma_mediation_dtexchange/ios/Classes/DTExchangePrivacyApi.g.swift b/packages/mediation/gma_mediation_dtexchange/ios/Classes/DTExchangePrivacyApi.g.swift new file mode 100644 index 000000000..ef5dd6be6 --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/ios/Classes/DTExchangePrivacyApi.g.swift @@ -0,0 +1,147 @@ +// Autogenerated from Pigeon (v19.0.0), do not edit directly. +// See also: https://pub.dev/packages/pigeon + +import Foundation + +#if os(iOS) + import Flutter +#elseif os(macOS) + import FlutterMacOS +#else + #error("Unsupported platform.") +#endif + +/// Error class for passing custom error details to Dart side. +final class PigeonError: Error { + let code: String + let message: String? + let details: Any? + + init(code: String, message: String?, details: Any?) { + self.code = code + self.message = message + self.details = details + } + + var localizedDescription: String { + return + "PigeonError(code: \(code), message: \(message ?? ""), details: \(details ?? "")" + } +} + +private func wrapResult(_ result: Any?) -> [Any?] { + return [result] +} + +private func wrapError(_ error: Any) -> [Any?] { + if let pigeonError = error as? PigeonError { + return [ + pigeonError.code, + pigeonError.message, + pigeonError.details, + ] + } + if let flutterError = error as? FlutterError { + return [ + flutterError.code, + flutterError.message, + flutterError.details, + ] + } + return [ + "\(error)", + "\(type(of: error))", + "Stacktrace: \(Thread.callStackSymbols)", + ] +} + +private func isNullish(_ value: Any?) -> Bool { + return value is NSNull || value == nil +} + +private func nilOrValue(_ value: Any?) -> T? { + if value is NSNull { return nil } + return value as! T? +} +/// The generated classes set the channels to call the methods in the corresponding kotlin DTExchangePrivacyApi interface and swift DTExchangePrivacyApi protocol from the dart layer. +/// +/// Generated protocol from Pigeon that represents a handler of messages from Flutter. +protocol DTExchangePrivacyApi { + /// Used to configure LGDP on the Android or iOS DTExchange SDK. + func setLgpdConsent(wasConsentGiven: Bool) throws + /// Used to clear the LGDP flag on the Android or iOS DTExchange SDK. + func clearLgpdConsentData() throws + /// Used to configure consent to Sell Personal Information on the Android or iOS DTExchange SDK. + func setUSPrivacyString(usPrivacyString: String) throws + /// Used to clear the US Privacy flag on the Android or iOS DTExchange SDK. + func clearUSPrivacyString() throws +} + +/// Generated setup class from Pigeon to handle messages through the `binaryMessenger`. +class DTExchangePrivacyApiSetup { + /// The codec used by DTExchangePrivacyApi. + /// Sets up an instance of `DTExchangePrivacyApi` to handle messages through the `binaryMessenger`. + static func setUp(binaryMessenger: FlutterBinaryMessenger, api: DTExchangePrivacyApi?, messageChannelSuffix: String = "") { + let channelSuffix = messageChannelSuffix.count > 0 ? ".\(messageChannelSuffix)" : "" + /// Used to configure LGDP on the Android or iOS DTExchange SDK. + let setLgpdConsentChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.gma_mediation_dtexchange.DTExchangePrivacyApi.setLgpdConsent\(channelSuffix)", binaryMessenger: binaryMessenger) + if let api = api { + setLgpdConsentChannel.setMessageHandler { message, reply in + let args = message as! [Any?] + let wasConsentGivenArg = args[0] as! Bool + do { + try api.setLgpdConsent(wasConsentGiven: wasConsentGivenArg) + reply(wrapResult(nil)) + } catch { + reply(wrapError(error)) + } + } + } else { + setLgpdConsentChannel.setMessageHandler(nil) + } + /// Used to clear the LGDP flag on the Android or iOS DTExchange SDK. + let clearLgpdConsentDataChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.gma_mediation_dtexchange.DTExchangePrivacyApi.clearLgpdConsentData\(channelSuffix)", binaryMessenger: binaryMessenger) + if let api = api { + clearLgpdConsentDataChannel.setMessageHandler { _, reply in + do { + try api.clearLgpdConsentData() + reply(wrapResult(nil)) + } catch { + reply(wrapError(error)) + } + } + } else { + clearLgpdConsentDataChannel.setMessageHandler(nil) + } + /// Used to configure consent to Sell Personal Information on the Android or iOS DTExchange SDK. + let setUSPrivacyStringChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.gma_mediation_dtexchange.DTExchangePrivacyApi.setUSPrivacyString\(channelSuffix)", binaryMessenger: binaryMessenger) + if let api = api { + setUSPrivacyStringChannel.setMessageHandler { message, reply in + let args = message as! [Any?] + let usPrivacyStringArg = args[0] as! String + do { + try api.setUSPrivacyString(usPrivacyString: usPrivacyStringArg) + reply(wrapResult(nil)) + } catch { + reply(wrapError(error)) + } + } + } else { + setUSPrivacyStringChannel.setMessageHandler(nil) + } + /// Used to clear the US Privacy flag on the Android or iOS DTExchange SDK. + let clearUSPrivacyStringChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.gma_mediation_dtexchange.DTExchangePrivacyApi.clearUSPrivacyString\(channelSuffix)", binaryMessenger: binaryMessenger) + if let api = api { + clearUSPrivacyStringChannel.setMessageHandler { _, reply in + do { + try api.clearUSPrivacyString() + reply(wrapResult(nil)) + } catch { + reply(wrapError(error)) + } + } + } else { + clearUSPrivacyStringChannel.setMessageHandler(nil) + } + } +} diff --git a/packages/mediation/gma_mediation_dtexchange/ios/Classes/GmaMediationDTExchangePlugin.swift b/packages/mediation/gma_mediation_dtexchange/ios/Classes/GmaMediationDTExchangePlugin.swift new file mode 100644 index 000000000..11671ac31 --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/ios/Classes/GmaMediationDTExchangePlugin.swift @@ -0,0 +1,66 @@ +import Flutter +import IASDKCore +import UIKit + +/// Manages DTExchangePrivacyApi and implements the needed methods. +public class GmaMediationDTExchangePlugin: NSObject, FlutterPlugin, DTExchangePrivacyApi { + let dtExchangeApi: DTExchangePrivacyProtocol + + init (dtExchangeApi: DTExchangePrivacyProtocol) { + self.dtExchangeApi = dtExchangeApi + } + + public static func register(with registrar: FlutterPluginRegistrar) { + let messenger : FlutterBinaryMessenger = registrar.messenger() + let api : DTExchangePrivacyApi&NSObjectProtocol=GmaMediationDTExchangePlugin.init(dtExchangeApi: DTExchangePrivacyImpl()) + DTExchangePrivacyApiSetup.setUp(binaryMessenger: messenger, api: api) + } + public func detachFromEngine(for registrar: FlutterPluginRegistrar) { + let messenger : FlutterBinaryMessenger = registrar.messenger() + DTExchangePrivacyApiSetup.setUp(binaryMessenger: messenger, api: nil) + } + + func setLgpdConsent(wasConsentGiven: Bool) throws { + dtExchangeApi.setLgpdConsent(wasConsentGiven: wasConsentGiven) + } + + func clearLgpdConsentData() throws { + dtExchangeApi.clearLgpdConsentData() + } + + func setUSPrivacyString(usPrivacyString: String) throws { + dtExchangeApi.setUSPrivacyString(usPrivacyString: usPrivacyString) + } + + func clearUSPrivacyString() throws { + dtExchangeApi.clearUSPrivacyString() + } +} + +protocol DTExchangePrivacyProtocol { + func setLgpdConsent(wasConsentGiven: Bool) + + func clearLgpdConsentData() + + func setUSPrivacyString(usPrivacyString: String) + + func clearUSPrivacyString() +} + +class DTExchangePrivacyImpl : DTExchangePrivacyProtocol { + func setLgpdConsent(wasConsentGiven: Bool) { + IASDKCore.sharedInstance().lgpdConsent = wasConsentGiven ? IALGPDConsentType.given : IALGPDConsentType.denied + } + + func clearLgpdConsentData() { + IASDKCore.sharedInstance().clearLGPDConsentData() + } + + func setUSPrivacyString(usPrivacyString: String) { + IASDKCore.sharedInstance().ccpaString = usPrivacyString + } + + func clearUSPrivacyString() { + IASDKCore.sharedInstance().ccpaString = nil + } +} diff --git a/packages/mediation/gma_mediation_dtexchange/ios/gma_mediation_dtexchange.podspec b/packages/mediation/gma_mediation_dtexchange/ios/gma_mediation_dtexchange.podspec new file mode 100644 index 000000000..b761daf55 --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/ios/gma_mediation_dtexchange.podspec @@ -0,0 +1,25 @@ +# +# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. +# Run `pod lib lint gma_mediation_dtexchange.podspec` to validate before publishing. +# +Pod::Spec.new do |s| + s.name = 'gma_mediation_dtexchange' + s.version = '1.3.2' + s.summary = 'Google Mobile Ads Mediation of DT Exchange.' + s.description = <<-DESC +Mediation Adapter for DT Exchange to use with Google Mobile Ads. + DESC + s.homepage = 'https://developers.google.com/admob/flutter/mediation/dt-exchange' + s.license = { :file => '../LICENSE' } + s.author = { 'Google LLC' => 'mediation-support@google.com' } + s.source = { :path => '.' } + s.source_files = 'Classes/**/*' + s.public_header_files = 'Classes/**/*.h' + s.dependency 'Flutter' + s.dependency 'GoogleMobileAdsMediationFyber', '~> 8.4.2.1' + s.platform = :ios, '13.0' + s.static_framework = true + # Flutter.framework does not contain a i386 slice. + s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' } + s.swift_version = '5.0' +end diff --git a/packages/mediation/gma_mediation_dtexchange/lib/dtexchange_privacy_api.g.dart b/packages/mediation/gma_mediation_dtexchange/lib/dtexchange_privacy_api.g.dart new file mode 100644 index 000000000..19917f254 --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/lib/dtexchange_privacy_api.g.dart @@ -0,0 +1,134 @@ +// Autogenerated from Pigeon (v19.0.0), do not edit directly. +// See also: https://pub.dev/packages/pigeon +// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers + +import 'dart:async'; +import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; + +import 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer; +import 'package:flutter/services.dart'; + +PlatformException _createConnectionError(String channelName) { + return PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel: "$channelName".', + ); +} + +/// The generated classes set the channels to call the methods in the corresponding kotlin DTExchangePrivacyApi interface and swift DTExchangePrivacyApi protocol from the dart layer. +class DTExchangePrivacyApi { + /// Constructor for [DTExchangePrivacyApi]. The [binaryMessenger] named argument is + /// available for dependency injection. If it is left null, the default + /// BinaryMessenger will be used which routes to the host platform. + DTExchangePrivacyApi( + {BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) + : __pigeon_binaryMessenger = binaryMessenger, + __pigeon_messageChannelSuffix = + messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + final BinaryMessenger? __pigeon_binaryMessenger; + + static const MessageCodec pigeonChannelCodec = + StandardMessageCodec(); + + final String __pigeon_messageChannelSuffix; + + /// Used to configure LGDP on the Android or iOS DTExchange SDK. + Future setLgpdConsent(bool wasConsentGiven) async { + final String __pigeon_channelName = + 'dev.flutter.pigeon.gma_mediation_dtexchange.DTExchangePrivacyApi.setLgpdConsent$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( + __pigeon_channelName, + pigeonChannelCodec, + binaryMessenger: __pigeon_binaryMessenger, + ); + final List? __pigeon_replyList = await __pigeon_channel + .send([wasConsentGiven]) as List?; + if (__pigeon_replyList == null) { + throw _createConnectionError(__pigeon_channelName); + } else if (__pigeon_replyList.length > 1) { + throw PlatformException( + code: __pigeon_replyList[0]! as String, + message: __pigeon_replyList[1] as String?, + details: __pigeon_replyList[2], + ); + } else { + return; + } + } + + /// Used to clear the LGDP flag on the Android or iOS DTExchange SDK. + Future clearLgpdConsentData() async { + final String __pigeon_channelName = + 'dev.flutter.pigeon.gma_mediation_dtexchange.DTExchangePrivacyApi.clearLgpdConsentData$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( + __pigeon_channelName, + pigeonChannelCodec, + binaryMessenger: __pigeon_binaryMessenger, + ); + final List? __pigeon_replyList = + await __pigeon_channel.send(null) as List?; + if (__pigeon_replyList == null) { + throw _createConnectionError(__pigeon_channelName); + } else if (__pigeon_replyList.length > 1) { + throw PlatformException( + code: __pigeon_replyList[0]! as String, + message: __pigeon_replyList[1] as String?, + details: __pigeon_replyList[2], + ); + } else { + return; + } + } + + /// Used to configure consent to Sell Personal Information on the Android or iOS DTExchange SDK. + Future setUSPrivacyString(String usPrivacyString) async { + final String __pigeon_channelName = + 'dev.flutter.pigeon.gma_mediation_dtexchange.DTExchangePrivacyApi.setUSPrivacyString$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( + __pigeon_channelName, + pigeonChannelCodec, + binaryMessenger: __pigeon_binaryMessenger, + ); + final List? __pigeon_replyList = await __pigeon_channel + .send([usPrivacyString]) as List?; + if (__pigeon_replyList == null) { + throw _createConnectionError(__pigeon_channelName); + } else if (__pigeon_replyList.length > 1) { + throw PlatformException( + code: __pigeon_replyList[0]! as String, + message: __pigeon_replyList[1] as String?, + details: __pigeon_replyList[2], + ); + } else { + return; + } + } + + /// Used to clear the US Privacy flag on the Android or iOS DTExchange SDK. + Future clearUSPrivacyString() async { + final String __pigeon_channelName = + 'dev.flutter.pigeon.gma_mediation_dtexchange.DTExchangePrivacyApi.clearUSPrivacyString$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( + __pigeon_channelName, + pigeonChannelCodec, + binaryMessenger: __pigeon_binaryMessenger, + ); + final List? __pigeon_replyList = + await __pigeon_channel.send(null) as List?; + if (__pigeon_replyList == null) { + throw _createConnectionError(__pigeon_channelName); + } else if (__pigeon_replyList.length > 1) { + throw PlatformException( + code: __pigeon_replyList[0]! as String, + message: __pigeon_replyList[1] as String?, + details: __pigeon_replyList[2], + ); + } else { + return; + } + } +} diff --git a/packages/mediation/gma_mediation_dtexchange/lib/gma_mediation_dtexchange.dart b/packages/mediation/gma_mediation_dtexchange/lib/gma_mediation_dtexchange.dart new file mode 100644 index 000000000..1821de350 --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/lib/gma_mediation_dtexchange.dart @@ -0,0 +1,34 @@ +// 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 +// +// https://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 'package:gma_mediation_dtexchange/dtexchange_privacy_api.g.dart'; + +/// This class has entrypoint to call DT Exchange's SDK APIs. +class GmaMediationDTExchange { + Future setLgpdConsent(bool wasConsentGiven) async { + DTExchangePrivacyApi().setLgpdConsent(wasConsentGiven); + } + + Future clearLgpdConsentData() async { + DTExchangePrivacyApi().clearLgpdConsentData(); + } + + Future setUSPrivacyString(String usPrivacyString) async { + DTExchangePrivacyApi().setUSPrivacyString(usPrivacyString); + } + + Future clearUSPrivacyString() async { + DTExchangePrivacyApi().clearUSPrivacyString(); + } +} diff --git a/packages/mediation/gma_mediation_dtexchange/pigeons/dtexchange_privacy_api.dart b/packages/mediation/gma_mediation_dtexchange/pigeons/dtexchange_privacy_api.dart new file mode 100644 index 000000000..1344795d0 --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/pigeons/dtexchange_privacy_api.dart @@ -0,0 +1,47 @@ +// 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 +// +// https://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 'package:pigeon/pigeon.dart'; + +@ConfigurePigeon( + PigeonOptions( + dartOut: 'lib/dtexchange_privacy_api.g.dart', + dartOptions: DartOptions(), + kotlinOut: + 'android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_dtexchange/DTExchangePrivacyApi.g.kt', + kotlinOptions: KotlinOptions( + package: + 'io.flutter.plugins.googlemobileads.mediation.gma_mediation_dtexchange', + ), + swiftOut: 'ios/Classes/DTExchangePrivacyApi.g.swift', + swiftOptions: SwiftOptions(), + dartPackageName: 'gma_mediation_dtexchange', + ), +) +@HostApi() + +/// The generated classes set the channels to call the methods in the corresponding kotlin DTExchangePrivacyApi interface and swift DTExchangePrivacyApi protocol from the dart layer. +abstract class DTExchangePrivacyApi { + /// Used to configure LGDP on the Android or iOS DTExchange SDK. + void setLgpdConsent(bool wasConsentGiven); + + /// Used to clear the LGDP flag on the Android or iOS DTExchange SDK. + void clearLgpdConsentData(); + + /// Used to configure consent to Sell Personal Information on the Android or iOS DTExchange SDK. + void setUSPrivacyString(String usPrivacyString); + + /// Used to clear the US Privacy flag on the Android or iOS DTExchange SDK. + void clearUSPrivacyString(); +} diff --git a/packages/mediation/gma_mediation_dtexchange/pubspec.yaml b/packages/mediation/gma_mediation_dtexchange/pubspec.yaml new file mode 100644 index 000000000..8fa897800 --- /dev/null +++ b/packages/mediation/gma_mediation_dtexchange/pubspec.yaml @@ -0,0 +1,30 @@ +name: gma_mediation_dtexchange +description: "Mediation Adapter that enables sending ad requests to the DT Exchange ad network using the google_mobile_ads plugin." +version: 1.3.2 +repository: https://github.com/googleads/googleads-mobile-flutter/tree/main/packages/mediation/gma_mediation_dtexchange + +environment: + sdk: '>=3.9.0 <4.0.0' + flutter: '>=3.35.1' + +dependencies: + flutter: + sdk: flutter + google_mobile_ads: ^7.0.0 + plugin_platform_interface: ^2.0.2 + +dev_dependencies: + flutter_lints: ^6.0.0 + flutter_test: + sdk: flutter + lint: ^2.3.0 + pigeon: ^19.0.0 + +flutter: + plugin: + platforms: + android: + package: io.flutter.plugins.googlemobileads.mediation.gma_mediation_dtexchange + pluginClass: GmaMediationDTExchangePlugin + ios: + pluginClass: GmaMediationDTExchangePlugin diff --git a/packages/mediation/gma_mediation_imobile/CHANGELOG.md b/packages/mediation/gma_mediation_imobile/CHANGELOG.md new file mode 100644 index 000000000..343b2c414 --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/CHANGELOG.md @@ -0,0 +1,17 @@ +## i-mobile Flutter Mediation Adapter Changelog + +#### Version 1.0.2 +* Supports [i-mobile Android adapter version 2.3.2.1](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/imobile/CHANGELOG.md#version-2321). +* Supports [i-mobile iOS adapter version 2.3.4.3](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/I-Mobile/CHANGELOG.md#version-2343). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.0.1 +* Supports [i-mobile Android adapter version 2.3.2.1](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/imobile/CHANGELOG.md#version-2321). +* Supports [i-mobile iOS adapter version 2.3.4.2](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/I-Mobile/CHANGELOG.md#version-2342). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.0.0 +* Initial release. +* Supports [i-mobile Android adapter version 2.3.2.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/imobile/CHANGELOG.md#version-2320). +* Supports [i-mobile iOS adapter version 2.3.4.1](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/I-Mobile/CHANGELOG.md#version-2341). +* Built and tested with the Google Mobile Ads Flutter Plugin version 5.3.1. diff --git a/packages/mediation/gma_mediation_imobile/LICENSE b/packages/mediation/gma_mediation_imobile/LICENSE new file mode 100644 index 000000000..e58143fcc --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/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 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. diff --git a/packages/mediation/gma_mediation_imobile/README.md b/packages/mediation/gma_mediation_imobile/README.md new file mode 100644 index 000000000..46679cfbe --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/README.md @@ -0,0 +1,31 @@ +# Google Mobile Ads Mediation of imobile for Flutter + +[![gma_mediation_imobile](https://github.com/googleads/googleads-mobile-flutter/actions/workflows/google_mobile_ads.yaml/badge.svg)](https://github.com/googleads/googleads-mobile-flutter/actions/workflows/google_mobile_ads.yaml) + +This repository contains the source code for the Mediation imobile Flutter +plugin to be used with the Google Mobile Ads plugin. It enables mediation of the +imobile Ad Network through the Google Mobile Ads SDK. + +## Documentation +For instructions on how to use with the google_mobile_ads plugin, refer to the +developer guide for [imobile](https://developers.google.com/admob/flutter/mediation/imobile). + +## Downloads + +See [pub.dev](https://pub.dev/packages/gma_mediation_imobile/versions) for the +latest releases of the plugin. + +## Suggesting improvements + +To file bugs, make feature requests, or to suggest other improvements, please +use [github's issue tracker](https://github.com/googleads/googleads-mobile-flutter/issues). + + +## Other resources + +* [AdMob help center](https://support.google.com/admob/?hl=en#topic=7383088) +* [Ad Manager help center](https://support.google.com/admanager/?hl=en#topic=7505988) + +## License + +[Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0) \ No newline at end of file diff --git a/packages/mediation/gma_mediation_imobile/analysis_options.yaml b/packages/mediation/gma_mediation_imobile/analysis_options.yaml new file mode 100644 index 000000000..632d08c98 --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/analysis_options.yaml @@ -0,0 +1,19 @@ +# Copyright 2025 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 +# +# https://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. + +include: package:lint/package.yaml + +analyzer: + exclude: + - '**.g.dart' \ No newline at end of file diff --git a/packages/mediation/gma_mediation_imobile/android/build.gradle b/packages/mediation/gma_mediation_imobile/android/build.gradle new file mode 100644 index 000000000..0d0996ae2 --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/android/build.gradle @@ -0,0 +1,71 @@ +group = "io.flutter.plugins.googlemobileads.mediation.gma_mediation_imobile" +version = "1.0.2" + +buildscript { + ext.kotlin_version = "1.8.22" + repositories { + google() + mavenCentral() + } + + dependencies { + classpath("com.android.tools.build:gradle:8.7.0") + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version") + } +} + +allprojects { + repositories { + google() + mavenCentral() + } +} + +apply plugin: "com.android.library" +apply plugin: "kotlin-android" + +ext { + stringVersion = "2.3.2.1" +} + +android { + namespace = "io.flutter.plugins.googlemobileads.mediation.gma_mediation_imobile" + + compileSdk = 35 + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11 + } + + sourceSets { + main.java.srcDirs += "src/main/kotlin" + test.java.srcDirs += "src/test/kotlin" + } + + defaultConfig { + minSdk = 23 + } + + dependencies { + implementation("com.google.ads.mediation:imobile:$stringVersion") + testImplementation("org.jetbrains.kotlin:kotlin-test") + testImplementation("org.mockito:mockito-core:5.0.0") + } + + testOptions { + unitTests.all { + useJUnitPlatform() + + testLogging { + events "passed", "skipped", "failed", "standardOut", "standardError" + outputs.upToDateWhen {false} + showStandardStreams = true + } + } + } +} diff --git a/packages/mediation/gma_mediation_imobile/android/gma_mediation_imobile_android.iml b/packages/mediation/gma_mediation_imobile/android/gma_mediation_imobile_android.iml new file mode 100644 index 000000000..e8b9110d5 --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/android/gma_mediation_imobile_android.iml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_imobile/android/settings.gradle b/packages/mediation/gma_mediation_imobile/android/settings.gradle new file mode 100644 index 000000000..7d650fe0a --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/android/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'gma_mediation_imobile' diff --git a/packages/mediation/gma_mediation_imobile/android/src/main/AndroidManifest.xml b/packages/mediation/gma_mediation_imobile/android/src/main/AndroidManifest.xml new file mode 100644 index 000000000..501ea232b --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/android/src/main/AndroidManifest.xml @@ -0,0 +1,3 @@ + + diff --git a/packages/mediation/gma_mediation_imobile/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_imobile/GmaMediationimobilePlugin.kt b/packages/mediation/gma_mediation_imobile/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_imobile/GmaMediationimobilePlugin.kt new file mode 100644 index 000000000..34614fd45 --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_imobile/GmaMediationimobilePlugin.kt @@ -0,0 +1,24 @@ +// Copyright 2025 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 +// +// https://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. + +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_imobile + +import io.flutter.embedding.engine.plugins.FlutterPlugin + +/** Required to link the Android dependency of the imobile Adapter. */ +class GmaMediationimobilePlugin : FlutterPlugin { + override fun onAttachedToEngine(flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) {} + + override fun onDetachedFromEngine(binding: FlutterPlugin.FlutterPluginBinding) {} +} diff --git a/packages/mediation/gma_mediation_imobile/example/README.md b/packages/mediation/gma_mediation_imobile/example/README.md new file mode 100644 index 000000000..4d40328e9 --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/example/README.md @@ -0,0 +1,17 @@ +# gma_mediation_imobile_example + +Learn how to integrate with your app that uses the [google_mobile_ads](https://pub.dev/packages/google_mobile_ads) plugin +by following the [development guide](https://developers.google.com/admob/flutter/mediation/imobile). + +## Getting Started + +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) + +For help getting started with Flutter development, view the +[online documentation](https://docs.flutter.dev/), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/packages/mediation/gma_mediation_imobile/example/analysis_options.yaml b/packages/mediation/gma_mediation_imobile/example/analysis_options.yaml new file mode 100644 index 000000000..0d2902135 --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/example/analysis_options.yaml @@ -0,0 +1,28 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at https://dart.dev/lints. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/packages/mediation/gma_mediation_imobile/example/android/app/build.gradle.kts b/packages/mediation/gma_mediation_imobile/example/android/app/build.gradle.kts new file mode 100644 index 000000000..25c851504 --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/example/android/app/build.gradle.kts @@ -0,0 +1,41 @@ +plugins { + id("com.android.application") + id("kotlin-android") + // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. + id("dev.flutter.flutter-gradle-plugin") +} + +android { + namespace = "io.flutter.plugins.googlemobileads.mediation.gma_mediation_imobile_example" + compileSdk = flutter.compileSdkVersion + ndkVersion = flutter.ndkVersion + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlinOptions { jvmTarget = JavaVersion.VERSION_11.toString() } + + defaultConfig { + // TODO: Specify your own unique Application ID + // (https://developer.android.com/studio/build/application-id.html). + applicationId = "io.flutter.plugins.googlemobileads.mediation.gma_mediation_imobile_example" + // You can update the following values to match your application needs. + // For more information, see: https://flutter.dev/to/review-gradle-config. + minSdk = 23 + targetSdk = flutter.targetSdkVersion + versionCode = flutter.versionCode + versionName = flutter.versionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig = signingConfigs.getByName("debug") + } + } +} + +flutter { source = "../.." } diff --git a/packages/mediation/gma_mediation_imobile/example/android/app/src/debug/AndroidManifest.xml b/packages/mediation/gma_mediation_imobile/example/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 000000000..399f6981d --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/example/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/packages/mediation/gma_mediation_imobile/example/android/app/src/main/AndroidManifest.xml b/packages/mediation/gma_mediation_imobile/example/android/app/src/main/AndroidManifest.xml new file mode 100644 index 000000000..dbe9d7941 --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/example/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_imobile/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_imobile_example/MainActivity.kt b/packages/mediation/gma_mediation_imobile/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_imobile_example/MainActivity.kt new file mode 100644 index 000000000..09a57a8be --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_imobile_example/MainActivity.kt @@ -0,0 +1,5 @@ +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_imobile_example + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity : FlutterActivity() diff --git a/packages/mediation/gma_mediation_imobile/example/android/app/src/main/res/drawable-v21/launch_background.xml b/packages/mediation/gma_mediation_imobile/example/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 000000000..f74085f3f --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/example/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/mediation/gma_mediation_imobile/example/android/app/src/main/res/drawable/launch_background.xml b/packages/mediation/gma_mediation_imobile/example/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 000000000..304732f88 --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/example/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/mediation/gma_mediation_imobile/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/mediation/gma_mediation_imobile/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..db77bb4b7 Binary files /dev/null and b/packages/mediation/gma_mediation_imobile/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_imobile/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/mediation/gma_mediation_imobile/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..17987b79b Binary files /dev/null and b/packages/mediation/gma_mediation_imobile/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_imobile/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/mediation/gma_mediation_imobile/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..09d439148 Binary files /dev/null and b/packages/mediation/gma_mediation_imobile/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_imobile/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/mediation/gma_mediation_imobile/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..d5f1c8d34 Binary files /dev/null and b/packages/mediation/gma_mediation_imobile/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_imobile/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/packages/mediation/gma_mediation_imobile/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..4d6372eeb Binary files /dev/null and b/packages/mediation/gma_mediation_imobile/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_imobile/example/android/app/src/main/res/values-night/styles.xml b/packages/mediation/gma_mediation_imobile/example/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 000000000..06952be74 --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/example/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/packages/mediation/gma_mediation_imobile/example/android/app/src/main/res/values/styles.xml b/packages/mediation/gma_mediation_imobile/example/android/app/src/main/res/values/styles.xml new file mode 100644 index 000000000..cb1ef8805 --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/example/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/packages/mediation/gma_mediation_imobile/example/android/app/src/profile/AndroidManifest.xml b/packages/mediation/gma_mediation_imobile/example/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 000000000..399f6981d --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/example/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/packages/mediation/gma_mediation_imobile/example/android/build.gradle.kts b/packages/mediation/gma_mediation_imobile/example/android/build.gradle.kts new file mode 100644 index 000000000..2417aee25 --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/example/android/build.gradle.kts @@ -0,0 +1,20 @@ +allprojects { + repositories { + google() + mavenCentral() + maven { url = uri("https://imobile.github.io/adnw-sdk-android") } + } +} + +val newBuildDir: Directory = rootProject.layout.buildDirectory.dir("../../build").get() + +rootProject.layout.buildDirectory.value(newBuildDir) + +subprojects { + val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name) + project.layout.buildDirectory.value(newSubprojectBuildDir) +} + +subprojects { project.evaluationDependsOn(":app") } + +tasks.register("clean") { delete(rootProject.layout.buildDirectory) } diff --git a/packages/mediation/gma_mediation_imobile/example/android/gma_mediation_imobile_example_android.iml b/packages/mediation/gma_mediation_imobile/example/android/gma_mediation_imobile_example_android.iml new file mode 100644 index 000000000..18999696a --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/example/android/gma_mediation_imobile_example_android.iml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_imobile/example/android/gradle.properties b/packages/mediation/gma_mediation_imobile/example/android/gradle.properties new file mode 100644 index 000000000..f018a6181 --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/example/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError +android.useAndroidX=true +android.enableJetifier=true diff --git a/packages/mediation/gma_mediation_imobile/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/mediation/gma_mediation_imobile/example/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 000000000..afa1e8eb0 --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/example/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip diff --git a/packages/mediation/gma_mediation_imobile/example/android/gradlew b/packages/mediation/gma_mediation_imobile/example/android/gradlew new file mode 100755 index 000000000..9d82f7891 --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/example/android/gradlew @@ -0,0 +1,160 @@ +#!/usr/bin/env bash + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn ( ) { + echo "$*" +} + +die ( ) { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; +esac + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules +function splitJvmOpts() { + JVM_OPTS=("$@") +} +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS +JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" + +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/packages/mediation/gma_mediation_imobile/example/android/gradlew.bat b/packages/mediation/gma_mediation_imobile/example/android/gradlew.bat new file mode 100644 index 000000000..aec99730b --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/example/android/gradlew.bat @@ -0,0 +1,90 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windowz variants + +if not "%OS%" == "Windows_NT" goto win9xME_args +if "%@eval[2+2]" == "4" goto 4NT_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* +goto execute + +:4NT_args +@rem Get arguments from the 4NT Shell from JP Software +set CMD_LINE_ARGS=%$ + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/packages/mediation/gma_mediation_imobile/example/android/settings.gradle.kts b/packages/mediation/gma_mediation_imobile/example/android/settings.gradle.kts new file mode 100644 index 000000000..b58f94546 --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/example/android/settings.gradle.kts @@ -0,0 +1,25 @@ +pluginManagement { + val flutterSdkPath = run { + val properties = java.util.Properties() + file("local.properties").inputStream().use { properties.load(it) } + val flutterSdkPath = properties.getProperty("flutter.sdk") + require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" } + flutterSdkPath + } + + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") + + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +plugins { + id("dev.flutter.flutter-plugin-loader") version "1.0.0" + id("com.android.application") version "8.7.0" apply false + id("org.jetbrains.kotlin.android") version "1.8.22" apply false +} + +include(":app") diff --git a/packages/mediation/gma_mediation_imobile/example/gma_mediation_imobile_example.iml b/packages/mediation/gma_mediation_imobile/example/gma_mediation_imobile_example.iml new file mode 100644 index 000000000..f66303d53 --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/example/gma_mediation_imobile_example.iml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_imobile/example/ios/Flutter/AppFrameworkInfo.plist b/packages/mediation/gma_mediation_imobile/example/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 000000000..7c5696400 --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/example/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 12.0 + + diff --git a/packages/mediation/gma_mediation_imobile/example/ios/Flutter/Debug.xcconfig b/packages/mediation/gma_mediation_imobile/example/ios/Flutter/Debug.xcconfig new file mode 100644 index 000000000..592ceee85 --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/example/ios/Flutter/Debug.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/packages/mediation/gma_mediation_imobile/example/ios/Flutter/Release.xcconfig b/packages/mediation/gma_mediation_imobile/example/ios/Flutter/Release.xcconfig new file mode 100644 index 000000000..592ceee85 --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/example/ios/Flutter/Release.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/packages/mediation/gma_mediation_imobile/example/ios/Runner.xcodeproj/project.pbxproj b/packages/mediation/gma_mediation_imobile/example/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 000000000..ad1b7cd37 --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/example/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,616 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 97C146E61CF9000F007C117D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 97C146ED1CF9000F007C117D; + remoteInfo = Runner; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 331C8082294A63A400263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C807B294A618700263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + 331C8082294A63A400263BE5 /* RunnerTests */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + 331C8081294A63A400263BE5 /* RunnerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C8080294A63A400263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 331C807D294A63A400263BE5 /* Sources */, + 331C807F294A63A400263BE5 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 331C8086294A63A400263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1510; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 331C8080294A63A400263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 97C146ED1CF9000F007C117D; + }; + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + 331C8080294A63A400263BE5 /* RunnerTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 331C807F294A63A400263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 331C807D294A63A400263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 331C8086294A63A400263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 97C146ED1CF9000F007C117D /* Runner */; + targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationImobileExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 331C8088294A63A400263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationImobileExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Debug; + }; + 331C8089294A63A400263BE5 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationImobileExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Release; + }; + 331C808A294A63A400263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationImobileExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationImobileExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationImobileExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C8088294A63A400263BE5 /* Debug */, + 331C8089294A63A400263BE5 /* Release */, + 331C808A294A63A400263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/packages/mediation/gma_mediation_imobile/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/mediation/gma_mediation_imobile/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..919434a62 --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/packages/mediation/gma_mediation_imobile/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/mediation/gma_mediation_imobile/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000..18d981003 --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/packages/mediation/gma_mediation_imobile/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/mediation/gma_mediation_imobile/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 000000000..f9b0d7c5e --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/packages/mediation/gma_mediation_imobile/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/mediation/gma_mediation_imobile/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 000000000..15cada483 --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_imobile/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/packages/mediation/gma_mediation_imobile/example/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..1d526a16e --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/example/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/packages/mediation/gma_mediation_imobile/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/mediation/gma_mediation_imobile/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000..18d981003 --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/packages/mediation/gma_mediation_imobile/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/mediation/gma_mediation_imobile/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 000000000..f9b0d7c5e --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/packages/mediation/gma_mediation_imobile/example/ios/Runner/AppDelegate.swift b/packages/mediation/gma_mediation_imobile/example/ios/Runner/AppDelegate.swift new file mode 100644 index 000000000..626664468 --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/example/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import Flutter +import UIKit + +@main +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..d36b1fab2 --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 000000000..dc9ada472 Binary files /dev/null and b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 000000000..7353c41ec Binary files /dev/null and b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 000000000..797d452e4 Binary files /dev/null and b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 000000000..6ed2d933e Binary files /dev/null and b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 000000000..4cd7b0099 Binary files /dev/null and b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 000000000..fe730945a Binary files /dev/null and b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 000000000..321773cd8 Binary files /dev/null and b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 000000000..797d452e4 Binary files /dev/null and b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 000000000..502f463a9 Binary files /dev/null and b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 000000000..0ec303439 Binary files /dev/null and b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 000000000..0ec303439 Binary files /dev/null and b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 000000000..e9f5fea27 Binary files /dev/null and b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 000000000..84ac32ae7 Binary files /dev/null and b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 000000000..8953cba09 Binary files /dev/null and b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 000000000..0467bf12a Binary files /dev/null and b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 000000000..0bedcf2fd --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchImage.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 000000000..89c2725b7 --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/packages/mediation/gma_mediation_imobile/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 000000000..f2e259c7c --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_imobile/example/ios/Runner/Base.lproj/Main.storyboard b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 000000000..f3c28516f --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_imobile/example/ios/Runner/Info.plist b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Info.plist new file mode 100644 index 000000000..3fb255807 --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Info.plist @@ -0,0 +1,49 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Gma Mediation Imobile + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + gma_mediation_imobile_example + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + CADisableMinimumFrameDurationOnPhone + + UIApplicationSupportsIndirectInputEvents + + + diff --git a/packages/mediation/gma_mediation_imobile/example/ios/Runner/Runner-Bridging-Header.h b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 000000000..308a2a560 --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/example/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/packages/mediation/gma_mediation_imobile/example/lib/main.dart b/packages/mediation/gma_mediation_imobile/example/lib/main.dart new file mode 100644 index 000000000..ea02decb7 --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/example/lib/main.dart @@ -0,0 +1,29 @@ +import 'package:flutter/material.dart'; + +void main() { + runApp(const MyApp()); +} + +class MyApp extends StatefulWidget { + const MyApp({super.key}); + + @override + State createState() => _MyAppState(); +} + +class _MyAppState extends State { + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Scaffold( + appBar: AppBar(title: const Text('Plugin example app')), + body: const Center(child: Text('Test app')), + ), + ); + } +} diff --git a/packages/mediation/gma_mediation_imobile/example/pubspec.lock b/packages/mediation/gma_mediation_imobile/example/pubspec.lock new file mode 100644 index 000000000..9062495ad --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/example/pubspec.lock @@ -0,0 +1,323 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + async: + dependency: transitive + description: + name: async + sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63 + url: "https://pub.dev" + source: hosted + version: "2.12.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + characters: + dependency: transitive + description: + name: characters + sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 + url: "https://pub.dev" + source: hosted + version: "1.4.0" + clock: + dependency: transitive + description: + name: clock + sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b + url: "https://pub.dev" + source: hosted + version: "1.1.2" + collection: + dependency: transitive + description: + name: collection + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" + url: "https://pub.dev" + source: hosted + version: "1.19.1" + cupertino_icons: + dependency: "direct main" + description: + name: cupertino_icons + sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 + url: "https://pub.dev" + source: hosted + version: "1.0.8" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc" + url: "https://pub.dev" + source: hosted + version: "1.3.2" + file: + dependency: transitive + description: + name: file + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 + url: "https://pub.dev" + source: hosted + version: "7.0.1" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_driver: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" + url: "https://pub.dev" + source: hosted + version: "5.0.0" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + fuchsia_remote_debug_protocol: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + gma_mediation_imobile: + dependency: "direct main" + description: + path: ".." + relative: true + source: path + version: "1.0.0" + google_mobile_ads: + dependency: transitive + description: + name: google_mobile_ads + sha256: "0d4a3744b5e8ed1b8be6a1b452d309f811688855a497c6113fc4400f922db603" + url: "https://pub.dev" + source: hosted + version: "5.3.1" + integration_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec + url: "https://pub.dev" + source: hosted + version: "10.0.8" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 + url: "https://pub.dev" + source: hosted + version: "3.0.9" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + lints: + dependency: transitive + description: + name: lints + sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7 + url: "https://pub.dev" + source: hosted + version: "5.1.1" + matcher: + dependency: transitive + description: + name: matcher + sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 + url: "https://pub.dev" + source: hosted + version: "0.12.17" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + url: "https://pub.dev" + source: hosted + version: "0.11.1" + meta: + dependency: transitive + description: + name: meta + sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c + url: "https://pub.dev" + source: hosted + version: "1.16.0" + path: + dependency: transitive + description: + name: path + sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" + url: "https://pub.dev" + source: hosted + version: "1.9.1" + platform: + dependency: transitive + description: + name: platform + sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" + url: "https://pub.dev" + source: hosted + version: "3.1.6" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" + process: + dependency: transitive + description: + name: process + sha256: "107d8be718f120bbba9dcd1e95e3bd325b1b4a4f07db64154635ba03f2567a0d" + url: "https://pub.dev" + source: hosted + version: "5.0.3" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + source_span: + dependency: transitive + description: + name: source_span + sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" + url: "https://pub.dev" + source: hosted + version: "1.10.1" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" + url: "https://pub.dev" + source: hosted + version: "1.12.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" + url: "https://pub.dev" + source: hosted + version: "1.4.1" + sync_http: + dependency: transitive + description: + name: sync_http + sha256: "7f0cd72eca000d2e026bcd6f990b81d0ca06022ef4e32fb257b30d3d1014a961" + url: "https://pub.dev" + source: hosted + version: "0.3.1" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" + url: "https://pub.dev" + source: hosted + version: "1.2.2" + test_api: + dependency: transitive + description: + name: test_api + sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd + url: "https://pub.dev" + source: hosted + version: "0.7.4" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14" + url: "https://pub.dev" + source: hosted + version: "14.3.1" + webdriver: + dependency: transitive + description: + name: webdriver + sha256: "3d773670966f02a646319410766d3b5e1037efb7f07cc68f844d5e06cd4d61c8" + url: "https://pub.dev" + source: hosted + version: "3.0.4" + webview_flutter: + dependency: transitive + description: + name: webview_flutter + sha256: "889a0a678e7c793c308c68739996227c9661590605e70b1f6cf6b9a6634f7aec" + url: "https://pub.dev" + source: hosted + version: "4.10.0" + webview_flutter_android: + dependency: transitive + description: + name: webview_flutter_android + sha256: "512c26ccc5b8a571fd5d13ec994b7509f142ff6faf85835e243dde3538fdc713" + url: "https://pub.dev" + source: hosted + version: "4.3.2" + webview_flutter_platform_interface: + dependency: transitive + description: + name: webview_flutter_platform_interface + sha256: d937581d6e558908d7ae3dc1989c4f87b786891ab47bb9df7de548a151779d8d + url: "https://pub.dev" + source: hosted + version: "2.10.0" + webview_flutter_wkwebview: + dependency: transitive + description: + name: webview_flutter_wkwebview + sha256: d7403ef4f042714c9ee2b26eaac4cadae7394cb0d4e608b1dd850c3ff96bd893 + url: "https://pub.dev" + source: hosted + version: "3.18.2" +sdks: + dart: ">=3.7.0 <4.0.0" + flutter: ">=3.24.0" diff --git a/packages/mediation/gma_mediation_imobile/example/pubspec.yaml b/packages/mediation/gma_mediation_imobile/example/pubspec.yaml new file mode 100644 index 000000000..38ebf52fa --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/example/pubspec.yaml @@ -0,0 +1,86 @@ +name: gma_mediation_imobile_example +description: "Demonstrates how to use the gma_mediation_imobile plugin." +# The following line prevents the package from being accidentally published to +# pub.dev using `flutter pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +environment: + sdk: ^3.7.0 + +# Dependencies specify other packages that your package needs in order to work. +# To automatically upgrade your package dependencies to the latest versions +# consider running `flutter pub upgrade --major-versions`. Alternatively, +# dependencies can be manually updated by changing the version numbers below to +# the latest version available on pub.dev. To see which dependencies have newer +# versions available, run `flutter pub outdated`. +dependencies: + flutter: + sdk: flutter + + google_mobile_ads: ^6.0.0 + gma_mediation_imobile: + # When depending on this package from a real application you should use: + # gma_mediation_imobile: ^x.y.z + # See https://dart.dev/tools/pub/dependencies#version-constraints + # The example app is bundled with the plugin so we use a path dependency on + # the parent directory to use the current plugin's version. + path: ../ + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^1.0.8 + +dev_dependencies: + integration_test: + sdk: flutter + flutter_test: + sdk: flutter + + # The "flutter_lints" package below contains a set of recommended lints to + # encourage good coding practices. The lint set provided by the package is + # activated in the `analysis_options.yaml` file located at the root of your + # package. See that file for information about deactivating specific lint + # rules and activating additional ones. + flutter_lints: ^5.0.0 + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter packages. +flutter: + + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + + # To add assets to your application, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/to/resolution-aware-images + + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/to/asset-from-package + + # To add custom fonts to your application, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts from package dependencies, + # see https://flutter.dev/to/font-from-package diff --git a/packages/mediation/gma_mediation_imobile/gma_mediation_imobile.iml b/packages/mediation/gma_mediation_imobile/gma_mediation_imobile.iml new file mode 100644 index 000000000..27686dd4b --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/gma_mediation_imobile.iml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_imobile/ios/Classes/GmaMediationimobilePlugin.swift b/packages/mediation/gma_mediation_imobile/ios/Classes/GmaMediationimobilePlugin.swift new file mode 100644 index 000000000..6aaeec58e --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/ios/Classes/GmaMediationimobilePlugin.swift @@ -0,0 +1,23 @@ +// Copyright 2025 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 +// +// https://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 Flutter +import UIKit + +/// Required to link the iOS dependency of the imobile Adapter. +public class GmaMediationimobilePlugin: NSObject, FlutterPlugin { + public static func register(with registrar: FlutterPluginRegistrar) {} + + public func detachFromEngine(for registrar: FlutterPluginRegistrar) {} +} diff --git a/packages/mediation/gma_mediation_imobile/ios/Resources/PrivacyInfo.xcprivacy b/packages/mediation/gma_mediation_imobile/ios/Resources/PrivacyInfo.xcprivacy new file mode 100644 index 000000000..a34b7e2e6 --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/ios/Resources/PrivacyInfo.xcprivacy @@ -0,0 +1,14 @@ + + + + + NSPrivacyTrackingDomains + + NSPrivacyAccessedAPITypes + + NSPrivacyCollectedDataTypes + + NSPrivacyTracking + + + diff --git a/packages/mediation/gma_mediation_imobile/ios/gma_mediation_imobile.podspec b/packages/mediation/gma_mediation_imobile/ios/gma_mediation_imobile.podspec new file mode 100644 index 000000000..b660472cd --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/ios/gma_mediation_imobile.podspec @@ -0,0 +1,21 @@ +Pod::Spec.new do |s| + s.name = 'gma_mediation_imobile' + s.version = '1.0.2' + s.summary = 'Google Mobile Ads Mediation of imobile.' + s.description = <<-DESC + Mediation Adapter for imobile to use with Google Mobile Ads. + DESC + s.homepage = 'https://developers.google.com/admob/flutter/mediation/imobile' + s.license = { :file => '../LICENSE' } + s.author = { 'Google LLC' => 'mediation-support@google.com' } + s.source = { :path => '.' } + s.source_files = 'Classes/**/*' + s.dependency 'Flutter' + s.dependency 'GoogleMobileAdsMediationIMobile', '~> 2.3.4.3' + s.platform = :ios, '12.0' + s.static_framework = true + + s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' } + s.swift_version = '5.0' + +end diff --git a/packages/mediation/gma_mediation_imobile/lib/gma_mediation_imobile.dart b/packages/mediation/gma_mediation_imobile/lib/gma_mediation_imobile.dart new file mode 100644 index 000000000..63bfbaa36 --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/lib/gma_mediation_imobile.dart @@ -0,0 +1,16 @@ +// Copyright 2025 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 +// +// https://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. + +/// This empty class is needed to allow correct compatibility analysis with host platforms. +class GmaMediationimobile {} diff --git a/packages/mediation/gma_mediation_imobile/pubspec.lock b/packages/mediation/gma_mediation_imobile/pubspec.lock new file mode 100644 index 000000000..e72b0d763 --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/pubspec.lock @@ -0,0 +1,261 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + async: + dependency: transitive + description: + name: async + sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63 + url: "https://pub.dev" + source: hosted + version: "2.12.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + characters: + dependency: transitive + description: + name: characters + sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 + url: "https://pub.dev" + source: hosted + version: "1.4.0" + clock: + dependency: transitive + description: + name: clock + sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b + url: "https://pub.dev" + source: hosted + version: "1.1.2" + collection: + dependency: transitive + description: + name: collection + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" + url: "https://pub.dev" + source: hosted + version: "1.19.1" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc" + url: "https://pub.dev" + source: hosted + version: "1.3.2" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" + url: "https://pub.dev" + source: hosted + version: "5.0.0" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + google_mobile_ads: + dependency: "direct main" + description: + name: google_mobile_ads + sha256: "0d4a3744b5e8ed1b8be6a1b452d309f811688855a497c6113fc4400f922db603" + url: "https://pub.dev" + source: hosted + version: "5.3.1" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec + url: "https://pub.dev" + source: hosted + version: "10.0.8" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 + url: "https://pub.dev" + source: hosted + version: "3.0.9" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + lint: + dependency: "direct dev" + description: + name: lint + sha256: "68d71111816dc7c1de358281e506efe574bb5072eae4a19f8a57484bf96825f5" + url: "https://pub.dev" + source: hosted + version: "2.6.1" + lints: + dependency: transitive + description: + name: lints + sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7 + url: "https://pub.dev" + source: hosted + version: "5.1.1" + matcher: + dependency: transitive + description: + name: matcher + sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 + url: "https://pub.dev" + source: hosted + version: "0.12.17" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + url: "https://pub.dev" + source: hosted + version: "0.11.1" + meta: + dependency: transitive + description: + name: meta + sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c + url: "https://pub.dev" + source: hosted + version: "1.16.0" + path: + dependency: transitive + description: + name: path + sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" + url: "https://pub.dev" + source: hosted + version: "1.9.1" + plugin_platform_interface: + dependency: "direct main" + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + source_span: + dependency: transitive + description: + name: source_span + sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" + url: "https://pub.dev" + source: hosted + version: "1.10.1" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" + url: "https://pub.dev" + source: hosted + version: "1.12.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" + url: "https://pub.dev" + source: hosted + version: "1.4.1" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" + url: "https://pub.dev" + source: hosted + version: "1.2.2" + test_api: + dependency: transitive + description: + name: test_api + sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd + url: "https://pub.dev" + source: hosted + version: "0.7.4" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14" + url: "https://pub.dev" + source: hosted + version: "14.3.1" + webview_flutter: + dependency: transitive + description: + name: webview_flutter + sha256: "889a0a678e7c793c308c68739996227c9661590605e70b1f6cf6b9a6634f7aec" + url: "https://pub.dev" + source: hosted + version: "4.10.0" + webview_flutter_android: + dependency: transitive + description: + name: webview_flutter_android + sha256: "512c26ccc5b8a571fd5d13ec994b7509f142ff6faf85835e243dde3538fdc713" + url: "https://pub.dev" + source: hosted + version: "4.3.2" + webview_flutter_platform_interface: + dependency: transitive + description: + name: webview_flutter_platform_interface + sha256: d937581d6e558908d7ae3dc1989c4f87b786891ab47bb9df7de548a151779d8d + url: "https://pub.dev" + source: hosted + version: "2.10.0" + webview_flutter_wkwebview: + dependency: transitive + description: + name: webview_flutter_wkwebview + sha256: d7403ef4f042714c9ee2b26eaac4cadae7394cb0d4e608b1dd850c3ff96bd893 + url: "https://pub.dev" + source: hosted + version: "3.18.2" +sdks: + dart: ">=3.7.0 <4.0.0" + flutter: ">=3.24.0" diff --git a/packages/mediation/gma_mediation_imobile/pubspec.yaml b/packages/mediation/gma_mediation_imobile/pubspec.yaml new file mode 100644 index 000000000..2f43f6596 --- /dev/null +++ b/packages/mediation/gma_mediation_imobile/pubspec.yaml @@ -0,0 +1,26 @@ +name: gma_mediation_imobile +description: 'Mediation Adapter that enables sending ad requests to the imobile + ad network using the google_mobile_ads plugin.' +version: 1.0.2 +environment: + sdk: '>=3.6.0 <4.0.0' + flutter: '>=3.27.0' +dependencies: + flutter: + sdk: flutter + google_mobile_ads: ^6.0.0 + plugin_platform_interface: ^2.0.2 +dev_dependencies: + flutter_test: + sdk: flutter + flutter_lints: ^5.0.0 + lint: ^2.6.1 +flutter: + plugin: + platforms: + android: + package: io.flutter.plugins.googlemobileads.mediation.gma_mediation_imobile + pluginClass: GmaMediationimobilePlugin + ios: + pluginClass: GmaMediationimobilePlugin +repository: https://github.com/googleads/googleads-mobile-flutter/tree/main/packages/mediation/gma_mediation_imobile diff --git a/packages/mediation/gma_mediation_inmobi/.gitignore b/packages/mediation/gma_mediation_inmobi/.gitignore new file mode 100644 index 000000000..ac5aa9893 --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/.gitignore @@ -0,0 +1,29 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. +/pubspec.lock +**/doc/api/ +.dart_tool/ +build/ diff --git a/packages/mediation/gma_mediation_inmobi/.metadata b/packages/mediation/gma_mediation_inmobi/.metadata new file mode 100644 index 000000000..a7455847d --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/.metadata @@ -0,0 +1,33 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "300451adae589accbece3490f4396f10bdf15e6e" + channel: "stable" + +project_type: plugin + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: 300451adae589accbece3490f4396f10bdf15e6e + base_revision: 300451adae589accbece3490f4396f10bdf15e6e + - platform: android + create_revision: 300451adae589accbece3490f4396f10bdf15e6e + base_revision: 300451adae589accbece3490f4396f10bdf15e6e + - platform: ios + create_revision: 300451adae589accbece3490f4396f10bdf15e6e + base_revision: 300451adae589accbece3490f4396f10bdf15e6e + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/packages/mediation/gma_mediation_inmobi/CHANGELOG.md b/packages/mediation/gma_mediation_inmobi/CHANGELOG.md new file mode 100644 index 000000000..d5624c4e3 --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/CHANGELOG.md @@ -0,0 +1,48 @@ +## InMobi Flutter Mediation Adapter Changelog + +#### Version 2.0.0 +* Supports [inMobi Android adapter version 11.1.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/inmobi/CHANGELOG.md#version-11100). +* Supports [inMobi iOS adapter version 11.1.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/InMobi/CHANGELOG.md#version-11100). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.1.6 +* Supports [inMobi Android adapter version 10.8.8.1](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/inmobi/CHANGELOG.md#version-10881). +* Supports [inMobi iOS adapter version 10.8.8.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/InMobi/CHANGELOG.md#version-10880). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.1.5 +* Supports [inMobi Android adapter version 10.8.8.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/inmobi/CHANGELOG.md#version-10880). +* Supports [inMobi iOS adapter version 10.8.8.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/InMobi/CHANGELOG.md#version-10880). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.1.4 +* Supports [inMobi Android adapter version 10.8.7.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/inmobi/CHANGELOG.md#version-10870). +* Supports [inMobi iOS adapter version 10.8.6.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/InMobi/CHANGELOG.md#version-10860). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.1.3 +* Supports [inMobi Android adapter version 10.8.3.1](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/inmobi/CHANGELOG.md#version-10831). +* Supports [inMobi iOS adapter version 10.8.3.1](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/InMobi/CHANGELOG.md#version-10831). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.1.2 +* Supports [inMobi Android adapter version 10.8.3.1](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/inmobi/CHANGELOG.md#version-10831). +* Supports [inMobi iOS adapter version 10.8.3.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/InMobi/CHANGELOG.md#version-10830). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.1.1 +* Supports [inMobi Android adapter version 10.8.2.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/inmobi/CHANGELOG.md#version-10820). +* Supports [inMobi iOS adapter version 10.8.2.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/InMobi/CHANGELOG.md#version-10820). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.1.0 +* iOS plugin is now a static framework. +* Supports [inMobi Android adapter version 10.8.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/inmobi/CHANGELOG.md#version-10800). +* Supports [inMobi iOS adapter version 10.8.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/InMobi/CHANGELOG.md#version-10800). +* Built and tested with the Google Mobile Ads Flutter Plugin version 5.3.1. + +#### Version 1.0.0 +* Initial release. +* Supports [inMobi Android adapter version 10.6.7.1](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/inmobi/CHANGELOG.md#version-10671). +* Supports [inMobi iOS adapter version 10.7.2.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/InMobi/CHANGELOG.md#version-10720). +* Built and tested with the Google Mobile Ads Flutter Plugin version 5.1.0. diff --git a/packages/mediation/gma_mediation_inmobi/LICENSE b/packages/mediation/gma_mediation_inmobi/LICENSE new file mode 100644 index 000000000..d64569567 --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/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/packages/mediation/gma_mediation_inmobi/README.md b/packages/mediation/gma_mediation_inmobi/README.md new file mode 100644 index 000000000..9df33ce8e --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/README.md @@ -0,0 +1,36 @@ +# Google Mobile Ads Mediation of InMobi for Flutter + +[![gma_mediation_inmobi](https://github.com/googleads/googleads-mobile-flutter/actions/workflows/google_mobile_ads.yaml/badge.svg)](https://github.com/googleads/googleads-mobile-flutter/actions/workflows/google_mobile_ads.yaml) + +This repository contains the source code for the Mediation InMobi Flutter +plugin to be used with the Google Mobile Ads plugin. It enables mediation of the +InMobi Ad Network through the Google Mobile Ads SDK. + +This plugin use the [Pigeon Flutter plugin](https://pub.dev/packages/pigeon) to +generate the classes that bridge the dart layer with each platform's code. +To add or modify the third party sdk, use the classes in the pigeons folder +following [this guide](https://github.com/flutter/packages/blob/main/packages/pigeon/example/README.md). + +## Documentation +For instructions on how to use with the google_mobile_ads plugin, refer to the +developer guide for [InMobi](https://developers.google.com/admob/flutter/mediation/inmobi). + +## Downloads + +See [pub.dev](https://pub.dev/packages/gma_mediation_inmobi/versions) for the +latest releases of the plugin. + +## Suggesting improvements + +To file bugs, make feature requests, or to suggest other improvements, please +use [github's issue tracker](https://github.com/googleads/googleads-mobile-flutter/issues). + + +## Other resources + +* [AdMob help center](https://support.google.com/admob/?hl=en#topic=7383088) +* [Ad Manager help center](https://support.google.com/admanager/?hl=en#topic=7505988) + +## License + +[Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0) \ No newline at end of file diff --git a/packages/mediation/gma_mediation_inmobi/analysis_options.yaml b/packages/mediation/gma_mediation_inmobi/analysis_options.yaml new file mode 100644 index 000000000..7ccbffbb3 --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/analysis_options.yaml @@ -0,0 +1,19 @@ +#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 +# +#https://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. + +include: package:lint/package.yaml + +analyzer: + exclude: + - '**.g.dart' diff --git a/packages/mediation/gma_mediation_inmobi/android/.gitignore b/packages/mediation/gma_mediation_inmobi/android/.gitignore new file mode 100644 index 000000000..161bdcdaf --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/android/.gitignore @@ -0,0 +1,9 @@ +*.iml +.gradle +/local.properties +/.idea/workspace.xml +/.idea/libraries +.DS_Store +/build +/captures +.cxx diff --git a/packages/mediation/gma_mediation_inmobi/android/build.gradle b/packages/mediation/gma_mediation_inmobi/android/build.gradle new file mode 100644 index 000000000..75100bdfe --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/android/build.gradle @@ -0,0 +1,73 @@ +group 'io.flutter.plugins.googlemobileads.mediation.gma_mediation_inmobi' +version = "2.0.0" + +buildscript { + ext.kotlin_version = '2.0.21' + repositories { + google() + mavenCentral() + } + + dependencies { + classpath 'com.android.tools.build:gradle:7.3.0' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + +allprojects { + repositories { + google() + mavenCentral() + } +} + +apply plugin: 'com.android.library' +apply plugin: 'kotlin-android' + +ext { + stringVersion = "11.1.0.0" +} + +android { + if (project.android.hasProperty("namespace")) { + namespace 'io.flutter.plugins.googlemobileads.mediation.gma_mediation_inmobi' + } + + compileSdk 33 + + compileOptions { + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + test.java.srcDirs += 'src/test/kotlin' + } + + defaultConfig { + minSdkVersion 23 + } + + dependencies { + implementation "com.google.ads.mediation:inmobi:$stringVersion" + testImplementation 'org.jetbrains.kotlin:kotlin-test' + testImplementation 'org.mockito:mockito-core:5.0.0' + } + + testOptions { + unitTests.all { + useJUnitPlatform() + + testLogging { + events "passed", "skipped", "failed", "standardOut", "standardError" + outputs.upToDateWhen {false} + showStandardStreams = true + } + } + } +} diff --git a/packages/mediation/gma_mediation_inmobi/android/gradle/wrapper/gradle-wrapper.properties b/packages/mediation/gma_mediation_inmobi/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 000000000..62f495dfe --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,7 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip +networkTimeout=10000 +validateDistributionUrl=true +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/packages/mediation/gma_mediation_inmobi/android/settings.gradle b/packages/mediation/gma_mediation_inmobi/android/settings.gradle new file mode 100644 index 000000000..3fcb9b1e7 --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/android/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'gma_mediation_inmobi' diff --git a/packages/mediation/gma_mediation_inmobi/android/src/main/AndroidManifest.xml b/packages/mediation/gma_mediation_inmobi/android/src/main/AndroidManifest.xml new file mode 100644 index 000000000..4c5e032fd --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/android/src/main/AndroidManifest.xml @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/mediation/gma_mediation_inmobi/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_inmobi/GmaMediationInMobiPlugin.kt b/packages/mediation/gma_mediation_inmobi/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_inmobi/GmaMediationInMobiPlugin.kt new file mode 100644 index 000000000..880208962 --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_inmobi/GmaMediationInMobiPlugin.kt @@ -0,0 +1,24 @@ +// 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 +// +// https://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. + +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_inmobi + +import io.flutter.embedding.engine.plugins.FlutterPlugin + +/** Class that serves as bridge to get the adapter android dependency and make it available to a Flutter app. */ +class GmaMediationInMobiPlugin: FlutterPlugin { + override fun onAttachedToEngine(flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) {} + + override fun onDetachedFromEngine(binding: FlutterPlugin.FlutterPluginBinding) {} +} diff --git a/packages/mediation/gma_mediation_inmobi/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_inmobi/InMobiFlutterMediationExtras.kt b/packages/mediation/gma_mediation_inmobi/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_inmobi/InMobiFlutterMediationExtras.kt new file mode 100644 index 000000000..69ad5dbb5 --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_inmobi/InMobiFlutterMediationExtras.kt @@ -0,0 +1,128 @@ +// 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 +// +// https://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. + +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_inmobi + +import android.os.Bundle +import android.util.Log +import android.util.Pair +import androidx.core.os.bundleOf +import com.google.ads.mediation.inmobi.InMobiAdapter +import com.google.ads.mediation.inmobi.InMobiNetworkKeys +import com.google.ads.mediation.inmobi.InMobiNetworkValues +import com.google.android.gms.ads.mediation.MediationExtrasReceiver +import io.flutter.plugins.googlemobileads.FlutterMediationExtras + +class InMobiFlutterMediationExtras : FlutterMediationExtras() { + private var flutterExtras: Map? = null + + override fun setMediationExtras(extras: MutableMap) { + flutterExtras = extras + } + + override fun getMediationExtras(): Pair, Bundle> { + val extrasMap = flutterExtras + if (extrasMap == null) { + return Pair, Bundle>(InMobiAdapter::class.java, bundleOf()) + } + val extrasBundle = bundleOf() + val ageGroupValue = extrasMap[AGE_GROUP] + if (ageGroupValue is Int) { + Log.d("InMobiMediationExtras", "ageGroup: $ageGroupValue") + when(ageGroupValue) { + 0 -> extrasBundle.putString(InMobiNetworkKeys.AGE_GROUP, InMobiNetworkValues.BELOW_18) + 1 -> extrasBundle.putString(InMobiNetworkKeys.AGE_GROUP, InMobiNetworkValues.BETWEEN_18_AND_24) + 2 -> extrasBundle.putString(InMobiNetworkKeys.AGE_GROUP, InMobiNetworkValues.BETWEEN_25_AND_29) + 3 -> extrasBundle.putString(InMobiNetworkKeys.AGE_GROUP, InMobiNetworkValues.BETWEEN_30_AND_34) + 4 -> extrasBundle.putString(InMobiNetworkKeys.AGE_GROUP, InMobiNetworkValues.BETWEEN_35_AND_44) + 5 -> extrasBundle.putString(InMobiNetworkKeys.AGE_GROUP, InMobiNetworkValues.BETWEEN_45_AND_54) + 6 -> extrasBundle.putString(InMobiNetworkKeys.AGE_GROUP, InMobiNetworkValues.BETWEEN_55_AND_65) + 7 -> extrasBundle.putString(InMobiNetworkKeys.AGE_GROUP, InMobiNetworkValues.ABOVE_65) + } + } + val educationValue = extrasMap[EDUCATION] + if (educationValue is Int) { + Log.d("InMobiMediationExtras", "education: $educationValue") + when (educationValue) { + 0 -> extrasBundle.putString(InMobiNetworkKeys.EDUCATION, InMobiNetworkValues.EDUCATION_HIGHSCHOOLORLESS) + 1 -> extrasBundle.putString(InMobiNetworkKeys.EDUCATION, InMobiNetworkValues.EDUCATION_COLLEGEORGRADUATE) + 2 -> extrasBundle.putString(InMobiNetworkKeys.EDUCATION, InMobiNetworkValues.EDUCATION_POSTGRADUATEORABOVE) + } + } + val ageValue = extrasMap[AGE] + if (ageValue is Int) { + Log.d("InMobiMediationExtras", "age: $ageValue") + extrasBundle.putString(InMobiNetworkKeys.AGE, ageValue.toString()) + } + val postalCodeValue = extrasMap[POSTAL_CODE] + if (postalCodeValue is String) { + Log.d("InMobiMediationExtras", "postalCode: $postalCodeValue") + extrasBundle.putString(InMobiNetworkKeys.POSTAL_CODE, postalCodeValue) + } + val areaCodeValue = extrasMap[AREA_CODE] + if (areaCodeValue is String) { + Log.d("InMobiMediationExtras", "areaCode: $areaCodeValue") + extrasBundle.putString(InMobiNetworkKeys.AREA_CODE, areaCodeValue) + } + val languageValue = extrasMap[LANGUAGE] + if (languageValue is String) { + Log.d("InMobiMediationExtras", "language: $languageValue") + extrasBundle.putString(InMobiNetworkKeys.LANGUAGE, languageValue) + } + val cityValue = extrasMap[CITY] + if (cityValue is String) { + Log.d("InMobiMediationExtras", "city: $cityValue") + extrasBundle.putString(InMobiNetworkKeys.CITY, cityValue) + } + val stateValue = extrasMap[STATE] + if (stateValue is String) { + Log.d("InMobiMediationExtras", "state: $stateValue") + extrasBundle.putString(InMobiNetworkKeys.STATE, stateValue) + } + val countryValue = extrasMap[COUNTRY] + if (countryValue is String) { + Log.d("InMobiMediationExtras", "country: $countryValue") + extrasBundle.putString(InMobiNetworkKeys.COUNTRY, countryValue) + } + val logLevelValue = extrasMap[LOGLEVEL] + if (logLevelValue is Int) { + Log.d("InMobiMediationExtras", "logLevel: $logLevelValue") + when (logLevelValue) { + 0 -> extrasBundle.putString(InMobiNetworkKeys.LOGLEVEL, InMobiNetworkValues.LOGLEVEL_NONE) + 1 -> extrasBundle.putString(InMobiNetworkKeys.LOGLEVEL, InMobiNetworkValues.LOGLEVEL_DEBUG) + 2 -> extrasBundle.putString(InMobiNetworkKeys.LOGLEVEL, InMobiNetworkValues.LOGLEVEL_ERROR) + } + } + val interestsValue = extrasMap[INTERESTS] + if (interestsValue is String) { + Log.d("InMobiMediationExtras", "interests: $interestsValue") + extrasBundle.putString(InMobiNetworkKeys.INTERESTS, interestsValue) + } + return Pair, Bundle>(InMobiAdapter::class.java, extrasBundle) + } + + companion object { + private const val AGE_GROUP = "ageGroup" + private const val EDUCATION = "education" + private const val AGE = "age" + private const val POSTAL_CODE = "postalCode" + private const val AREA_CODE = "areaCode" + private const val LANGUAGE = "language" + private const val CITY = "city" + private const val STATE = "state" + private const val COUNTRY = "country" + private const val INTERESTS = "interests" + private const val LOGLEVEL = "logLevel" + } +} \ No newline at end of file diff --git a/packages/mediation/gma_mediation_inmobi/android/src/test/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_inmobi/GmaMediationInmobiPluginTest.kt b/packages/mediation/gma_mediation_inmobi/android/src/test/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_inmobi/GmaMediationInmobiPluginTest.kt new file mode 100644 index 000000000..698d7ffdb --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/android/src/test/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_inmobi/GmaMediationInmobiPluginTest.kt @@ -0,0 +1,17 @@ +// 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 +// +// https://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. + +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_inmobi + +internal class GmaMediationInmobiPluginTest {} diff --git a/packages/mediation/gma_mediation_inmobi/example/.gitignore b/packages/mediation/gma_mediation_inmobi/example/.gitignore new file mode 100644 index 000000000..29a3a5017 --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/example/.gitignore @@ -0,0 +1,43 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.pub-cache/ +.pub/ +/build/ + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/packages/mediation/gma_mediation_inmobi/example/README.md b/packages/mediation/gma_mediation_inmobi/example/README.md new file mode 100644 index 000000000..997377514 --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/example/README.md @@ -0,0 +1,17 @@ +# gma_mediation_inmobi_example + +Learn how to integrate with your app that uses the [google_mobile_ads](https://pub.dev/packages/google_mobile_ads) plugin +by following the [development guide](https://developers.google.com/admob/flutter/mediation/inmobi). + +## Getting Started + +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) + +For help getting started with Flutter development, view the +[online documentation](https://docs.flutter.dev/), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/packages/mediation/gma_mediation_inmobi/example/analysis_options.yaml b/packages/mediation/gma_mediation_inmobi/example/analysis_options.yaml new file mode 100644 index 000000000..0d2902135 --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/example/analysis_options.yaml @@ -0,0 +1,28 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at https://dart.dev/lints. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/packages/mediation/gma_mediation_inmobi/example/android/.gitignore b/packages/mediation/gma_mediation_inmobi/example/android/.gitignore new file mode 100644 index 000000000..6f568019d --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/example/android/.gitignore @@ -0,0 +1,13 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +key.properties +**/*.keystore +**/*.jks diff --git a/packages/mediation/gma_mediation_inmobi/example/android/app/build.gradle b/packages/mediation/gma_mediation_inmobi/example/android/app/build.gradle new file mode 100644 index 000000000..b716ee693 --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/example/android/app/build.gradle @@ -0,0 +1,67 @@ +plugins { + id "com.android.application" + id "kotlin-android" + id "dev.flutter.flutter-gradle-plugin" +} + +def localProperties = new Properties() +def localPropertiesFile = rootProject.file('local.properties') +if (localPropertiesFile.exists()) { + localPropertiesFile.withReader('UTF-8') { reader -> + localProperties.load(reader) + } +} + +def flutterVersionCode = localProperties.getProperty('flutter.versionCode') +if (flutterVersionCode == null) { + flutterVersionCode = '1' +} + +def flutterVersionName = localProperties.getProperty('flutter.versionName') +if (flutterVersionName == null) { + flutterVersionName = '1.0' +} + +android { + namespace "io.flutter.plugins.googlemobileads.mediation.gma_mediation_inmobi_example" + compileSdk flutter.compileSdkVersion + ndkVersion flutter.ndkVersion + + compileOptions { + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId "io.flutter.plugins.googlemobileads.mediation.gma_mediation_inmobi_example" + // You can update the following values to match your application needs. + // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. + minSdkVersion 23 + targetSdkVersion flutter.targetSdkVersion + versionCode flutterVersionCode.toInteger() + versionName flutterVersionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig signingConfigs.debug + } + } +} + +flutter { + source '../..' +} + +dependencies {} diff --git a/packages/mediation/gma_mediation_inmobi/example/android/app/src/debug/AndroidManifest.xml b/packages/mediation/gma_mediation_inmobi/example/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 000000000..399f6981d --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/example/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/packages/mediation/gma_mediation_inmobi/example/android/app/src/main/AndroidManifest.xml b/packages/mediation/gma_mediation_inmobi/example/android/app/src/main/AndroidManifest.xml new file mode 100644 index 000000000..8ffbad18f --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/example/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_inmobi/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_inmobi_example/MainActivity.kt b/packages/mediation/gma_mediation_inmobi/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_inmobi_example/MainActivity.kt new file mode 100644 index 000000000..acc9c9cd6 --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_inmobi_example/MainActivity.kt @@ -0,0 +1,5 @@ +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_inmobi_example + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() diff --git a/packages/mediation/gma_mediation_inmobi/example/android/app/src/main/res/drawable-v21/launch_background.xml b/packages/mediation/gma_mediation_inmobi/example/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 000000000..f74085f3f --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/example/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/mediation/gma_mediation_inmobi/example/android/app/src/main/res/drawable/launch_background.xml b/packages/mediation/gma_mediation_inmobi/example/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 000000000..304732f88 --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/example/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/mediation/gma_mediation_inmobi/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/mediation/gma_mediation_inmobi/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..db77bb4b7 Binary files /dev/null and b/packages/mediation/gma_mediation_inmobi/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_inmobi/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/mediation/gma_mediation_inmobi/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..17987b79b Binary files /dev/null and b/packages/mediation/gma_mediation_inmobi/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_inmobi/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/mediation/gma_mediation_inmobi/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..09d439148 Binary files /dev/null and b/packages/mediation/gma_mediation_inmobi/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_inmobi/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/mediation/gma_mediation_inmobi/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..d5f1c8d34 Binary files /dev/null and b/packages/mediation/gma_mediation_inmobi/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_inmobi/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/packages/mediation/gma_mediation_inmobi/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..4d6372eeb Binary files /dev/null and b/packages/mediation/gma_mediation_inmobi/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_inmobi/example/android/app/src/main/res/values-night/styles.xml b/packages/mediation/gma_mediation_inmobi/example/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 000000000..06952be74 --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/example/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/packages/mediation/gma_mediation_inmobi/example/android/app/src/main/res/values/styles.xml b/packages/mediation/gma_mediation_inmobi/example/android/app/src/main/res/values/styles.xml new file mode 100644 index 000000000..cb1ef8805 --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/example/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/packages/mediation/gma_mediation_inmobi/example/android/app/src/profile/AndroidManifest.xml b/packages/mediation/gma_mediation_inmobi/example/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 000000000..399f6981d --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/example/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/packages/mediation/gma_mediation_inmobi/example/android/build.gradle b/packages/mediation/gma_mediation_inmobi/example/android/build.gradle new file mode 100644 index 000000000..bc157bd1a --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/example/android/build.gradle @@ -0,0 +1,18 @@ +allprojects { + repositories { + google() + mavenCentral() + } +} + +rootProject.buildDir = '../build' +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(':app') +} + +tasks.register("clean", Delete) { + delete rootProject.buildDir +} diff --git a/packages/mediation/gma_mediation_inmobi/example/android/gradle.properties b/packages/mediation/gma_mediation_inmobi/example/android/gradle.properties new file mode 100644 index 000000000..598d13fee --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/example/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx4G +android.useAndroidX=true +android.enableJetifier=true diff --git a/packages/mediation/gma_mediation_inmobi/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/mediation/gma_mediation_inmobi/example/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 000000000..e1ca574ef --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/example/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip diff --git a/packages/mediation/gma_mediation_inmobi/example/android/settings.gradle b/packages/mediation/gma_mediation_inmobi/example/android/settings.gradle new file mode 100644 index 000000000..1d6d19b7f --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/example/android/settings.gradle @@ -0,0 +1,26 @@ +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + } + settings.ext.flutterSdkPath = flutterSdkPath() + + includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") + + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "7.3.0" apply false + id "org.jetbrains.kotlin.android" version "1.7.10" apply false +} + +include ":app" diff --git a/packages/mediation/gma_mediation_inmobi/example/ios/.gitignore b/packages/mediation/gma_mediation_inmobi/example/ios/.gitignore new file mode 100644 index 000000000..7a7f9873a --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/example/ios/.gitignore @@ -0,0 +1,34 @@ +**/dgph +*.mode1v3 +*.mode2v3 +*.moved-aside +*.pbxuser +*.perspectivev3 +**/*sync/ +.sconsign.dblite +.tags* +**/.vagrant/ +**/DerivedData/ +Icon? +**/Pods/ +**/.symlinks/ +profile +xcuserdata +**/.generated/ +Flutter/App.framework +Flutter/Flutter.framework +Flutter/Flutter.podspec +Flutter/Generated.xcconfig +Flutter/ephemeral/ +Flutter/app.flx +Flutter/app.zip +Flutter/flutter_assets/ +Flutter/flutter_export_environment.sh +ServiceDefinitions.json +Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!default.mode1v3 +!default.mode2v3 +!default.pbxuser +!default.perspectivev3 diff --git a/packages/mediation/gma_mediation_inmobi/example/ios/Flutter/AppFrameworkInfo.plist b/packages/mediation/gma_mediation_inmobi/example/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 000000000..7c5696400 --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/example/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 12.0 + + diff --git a/packages/mediation/gma_mediation_inmobi/example/ios/Flutter/Debug.xcconfig b/packages/mediation/gma_mediation_inmobi/example/ios/Flutter/Debug.xcconfig new file mode 100644 index 000000000..592ceee85 --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/example/ios/Flutter/Debug.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/packages/mediation/gma_mediation_inmobi/example/ios/Flutter/Release.xcconfig b/packages/mediation/gma_mediation_inmobi/example/ios/Flutter/Release.xcconfig new file mode 100644 index 000000000..592ceee85 --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/example/ios/Flutter/Release.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/samples/admob/banner_example/ios/Podfile b/packages/mediation/gma_mediation_inmobi/example/ios/Podfile similarity index 94% rename from samples/admob/banner_example/ios/Podfile rename to packages/mediation/gma_mediation_inmobi/example/ios/Podfile index 88359b225..d97f17e22 100644 --- a/samples/admob/banner_example/ios/Podfile +++ b/packages/mediation/gma_mediation_inmobi/example/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -# platform :ios, '11.0' +# platform :ios, '12.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' @@ -32,6 +32,9 @@ target 'Runner' do use_modular_headers! flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) + target 'RunnerTests' do + inherit! :search_paths + end end post_install do |installer| diff --git a/packages/mediation/gma_mediation_inmobi/example/ios/Runner.xcodeproj/project.pbxproj b/packages/mediation/gma_mediation_inmobi/example/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 000000000..8db20c7d6 --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/example/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,616 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 97C146E61CF9000F007C117D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 97C146ED1CF9000F007C117D; + remoteInfo = Runner; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 331C8082294A63A400263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C807B294A618700263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + 331C8082294A63A400263BE5 /* RunnerTests */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + 331C8081294A63A400263BE5 /* RunnerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C8080294A63A400263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 331C807D294A63A400263BE5 /* Sources */, + 331C807F294A63A400263BE5 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 331C8086294A63A400263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1510; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 331C8080294A63A400263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 97C146ED1CF9000F007C117D; + }; + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + 331C8080294A63A400263BE5 /* RunnerTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 331C807F294A63A400263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 331C807D294A63A400263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 331C8086294A63A400263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 97C146ED1CF9000F007C117D /* Runner */; + targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationInmobiExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 331C8088294A63A400263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationInmobiExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Debug; + }; + 331C8089294A63A400263BE5 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationInmobiExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Release; + }; + 331C808A294A63A400263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationInmobiExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationInmobiExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationInmobiExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C8088294A63A400263BE5 /* Debug */, + 331C8089294A63A400263BE5 /* Release */, + 331C808A294A63A400263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/packages/mediation/gma_mediation_inmobi/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/mediation/gma_mediation_inmobi/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..919434a62 --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/packages/mediation/gma_mediation_inmobi/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/packages/mediation/gma_mediation_inmobi/example/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..1d526a16e --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/example/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/packages/mediation/gma_mediation_inmobi/example/ios/Runner/AppDelegate.swift b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/AppDelegate.swift new file mode 100644 index 000000000..70693e4a8 --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import UIKit +import Flutter + +@UIApplicationMain +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..d36b1fab2 --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 000000000..dc9ada472 Binary files /dev/null and b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 000000000..7353c41ec Binary files /dev/null and b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 000000000..797d452e4 Binary files /dev/null and b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 000000000..6ed2d933e Binary files /dev/null and b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 000000000..4cd7b0099 Binary files /dev/null and b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 000000000..fe730945a Binary files /dev/null and b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 000000000..321773cd8 Binary files /dev/null and b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 000000000..797d452e4 Binary files /dev/null and b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 000000000..502f463a9 Binary files /dev/null and b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 000000000..0ec303439 Binary files /dev/null and b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 000000000..0ec303439 Binary files /dev/null and b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 000000000..e9f5fea27 Binary files /dev/null and b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 000000000..84ac32ae7 Binary files /dev/null and b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 000000000..8953cba09 Binary files /dev/null and b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 000000000..0467bf12a Binary files /dev/null and b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 000000000..0bedcf2fd --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchImage.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 000000000..89c2725b7 --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 000000000..f2e259c7c --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Base.lproj/Main.storyboard b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 000000000..f3c28516f --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Info.plist b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Info.plist new file mode 100644 index 000000000..07bedbbbe --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Info.plist @@ -0,0 +1,51 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Gma Mediation Inmobi + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + gma_mediation_inmobi_example + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + CADisableMinimumFrameDurationOnPhone + + UIApplicationSupportsIndirectInputEvents + + GADApplicationIdentifier + ca-app-pub-3940256099942544~1458002511 + + diff --git a/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Runner-Bridging-Header.h b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 000000000..308a2a560 --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/example/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/packages/mediation/gma_mediation_inmobi/example/ios/RunnerTests/RunnerTests.swift b/packages/mediation/gma_mediation_inmobi/example/ios/RunnerTests/RunnerTests.swift new file mode 100644 index 000000000..a5c1b3baa --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/example/ios/RunnerTests/RunnerTests.swift @@ -0,0 +1,26 @@ +import Flutter +import UIKit +import XCTest + +@testable import gma_mediation_inmobi + +// This demonstrates a simple unit test of the Swift portion of this plugin's implementation. +// +// See https://developer.apple.com/documentation/xctest for more information about using XCTest. + +class RunnerTests: XCTestCase { + + func testGetPlatformVersion() { + let plugin = GmaMediationInmobiPlugin() + + let call = FlutterMethodCall(methodName: "getPlatformVersion", arguments: []) + + let resultExpectation = expectation(description: "result block must be called.") + plugin.handle(call) { result in + XCTAssertEqual(result as! String, "iOS " + UIDevice.current.systemVersion) + resultExpectation.fulfill() + } + waitForExpectations(timeout: 1) + } + +} diff --git a/packages/mediation/gma_mediation_inmobi/example/lib/main.dart b/packages/mediation/gma_mediation_inmobi/example/lib/main.dart new file mode 100644 index 000000000..3c37a6d35 --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/example/lib/main.dart @@ -0,0 +1,33 @@ +import 'package:flutter/material.dart'; + +void main() { + runApp(const MyApp()); +} + +class MyApp extends StatefulWidget { + const MyApp({super.key}); + + @override + State createState() => _MyAppState(); +} + +class _MyAppState extends State { + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Scaffold( + appBar: AppBar( + title: const Text('Plugin example app'), + ), + body: const Center( + child: Text('Test App'), + ), + ), + ); + } +} diff --git a/packages/mediation/gma_mediation_inmobi/example/pubspec.yaml b/packages/mediation/gma_mediation_inmobi/example/pubspec.yaml new file mode 100644 index 000000000..1c779abf5 --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/example/pubspec.yaml @@ -0,0 +1,86 @@ +name: gma_mediation_inmobi_example +description: "Demonstrates how to use the gma_mediation_inmobi plugin." +# The following line prevents the package from being accidentally published to +# pub.dev using `flutter pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +environment: + sdk: '>=3.6.0 <4.0.0' + +# Dependencies specify other packages that your package needs in order to work. +# To automatically upgrade your package dependencies to the latest versions +# consider running `flutter pub upgrade --major-versions`. Alternatively, +# dependencies can be manually updated by changing the version numbers below to +# the latest version available on pub.dev. To see which dependencies have newer +# versions available, run `flutter pub outdated`. +dependencies: + flutter: + sdk: flutter + + google_mobile_ads: ^6.0.0 + gma_mediation_inmobi: + # When depending on this package from a real application you should use: + # gma_mediation_inmobi: ^x.y.z + # See https://dart.dev/tools/pub/dependencies#version-constraints + # The example app is bundled with the plugin so we use a path dependency on + # the parent directory to use the current plugin's version. + path: ../ + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^1.0.6 + +dev_dependencies: + integration_test: + sdk: flutter + flutter_test: + sdk: flutter + + # The "flutter_lints" package below contains a set of recommended lints to + # encourage good coding practices. The lint set provided by the package is + # activated in the `analysis_options.yaml` file located at the root of your + # package. See that file for information about deactivating specific lint + # rules and activating additional ones. + flutter_lints: ^3.0.0 + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter packages. +flutter: + + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + + # To add assets to your application, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/assets-and-images/#resolution-aware + + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/assets-and-images/#from-packages + + # To add custom fonts to your application, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts from package dependencies, + # see https://flutter.dev/custom-fonts/#from-packages diff --git a/packages/mediation/gma_mediation_inmobi/ios/.gitignore b/packages/mediation/gma_mediation_inmobi/ios/.gitignore new file mode 100644 index 000000000..0c885071e --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/ios/.gitignore @@ -0,0 +1,38 @@ +.idea/ +.vagrant/ +.sconsign.dblite +.svn/ + +.DS_Store +*.swp +profile + +DerivedData/ +build/ +GeneratedPluginRegistrant.h +GeneratedPluginRegistrant.m + +.generated/ + +*.pbxuser +*.mode1v3 +*.mode2v3 +*.perspectivev3 + +!default.pbxuser +!default.mode1v3 +!default.mode2v3 +!default.perspectivev3 + +xcuserdata + +*.moved-aside + +*.pyc +*sync/ +Icon? +.tags* + +/Flutter/Generated.xcconfig +/Flutter/ephemeral/ +/Flutter/flutter_export_environment.sh \ No newline at end of file diff --git a/packages/mediation/gma_mediation_inmobi/ios/Assets/.gitkeep b/packages/mediation/gma_mediation_inmobi/ios/Assets/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/packages/mediation/gma_mediation_inmobi/ios/Classes/GmaMediationInMobiPlugin.swift b/packages/mediation/gma_mediation_inmobi/ios/Classes/GmaMediationInMobiPlugin.swift new file mode 100644 index 000000000..0d838119f --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/ios/Classes/GmaMediationInMobiPlugin.swift @@ -0,0 +1,21 @@ +// 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 +// +// https://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 Flutter +import UIKit + +/// Class that serves as bridge to get the adapter iOS dependency and make it available to a Flutter app. +public class GmaMediationInMobiPlugin: NSObject, FlutterPlugin { + public static func register(with registrar: FlutterPluginRegistrar) {} +} diff --git a/packages/mediation/gma_mediation_inmobi/ios/Classes/InMobiFlutterMediationExtras.swift b/packages/mediation/gma_mediation_inmobi/ios/Classes/InMobiFlutterMediationExtras.swift new file mode 100644 index 000000000..bb860f9c6 --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/ios/Classes/InMobiFlutterMediationExtras.swift @@ -0,0 +1,106 @@ +// 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 +// +// https://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 Foundation +import InMobiAdapter + +@objc protocol FLTMediationExtras { + var extras: NSMutableDictionary { get } + func getMediationExtras() -> AdNetworkExtras +} + +@objc(InMobiFlutterMediationExtras) +class InMobiFlutterMediationExtras: NSObject, FLTMediationExtras { + var extras: NSMutableDictionary = [:] + + func getMediationExtras() -> AdNetworkExtras { + let inMobiExtras = GADInMobiExtras() + if let ageGroup = extras["ageGroup"] as? Int { + switch ageGroup { + case 0: + inMobiExtras.ageGroup = IMSDKAgeGroup.below18 + case 1: + inMobiExtras.ageGroup = IMSDKAgeGroup.between18And24 + case 2: + inMobiExtras.ageGroup = IMSDKAgeGroup.between25And29 + case 3: + inMobiExtras.ageGroup = IMSDKAgeGroup.between30And34 + case 4: + inMobiExtras.ageGroup = IMSDKAgeGroup.between35And44 + case 5: + inMobiExtras.ageGroup = IMSDKAgeGroup.between45And54 + case 6: + inMobiExtras.ageGroup = IMSDKAgeGroup.between55And65 + case 7: + inMobiExtras.ageGroup = IMSDKAgeGroup.above65 + default: + break + } + } + if let educationType = extras["educationType"] as? Int { + switch educationType { + case 0: + inMobiExtras.educationType = IMSDKEducation.highSchoolOrLess + case 1: + inMobiExtras.educationType = IMSDKEducation.collageOrGraduate + case 2: + inMobiExtras.educationType = IMSDKEducation.postGraduateOrAbove + default: + break + } + } + if let logLevel = extras["logLevel"] as? Int { + switch logLevel { + case 0: + inMobiExtras.logLevel = IMSDKLogLevel.none + case 1: + inMobiExtras.logLevel = IMSDKLogLevel.debug + case 2: + inMobiExtras.logLevel = IMSDKLogLevel.error + default: + break + } + + } + if let age = extras["age"] as? UInt { + inMobiExtras.age = age + } + if let yearOfBirth = extras["yearOfBirth"] as? Int { + inMobiExtras.yearOfBirth = yearOfBirth + } + if let postalCode = extras["postalCode"] as? String { + inMobiExtras.postalCode = postalCode + } + if let areaCode = extras["areaCode"] as? String { + inMobiExtras.areaCode = areaCode + } + if let language = extras["language"] as? String { + inMobiExtras.language = language + } + if let keywords = extras["keywords"] as? String { + inMobiExtras.keywords = keywords + } + if let interests = extras["interests"] as? String { + inMobiExtras.interests = interests + } + let city = extras["city"] as? String + let state = extras["state"] as? String + let country = extras["country"] as? String + if city != nil && state != nil && country != nil { + inMobiExtras.setLocationWithCity(city, state: state, country: country) + } + + return inMobiExtras + } +} diff --git a/packages/mediation/gma_mediation_inmobi/ios/gma_mediation_inmobi.podspec b/packages/mediation/gma_mediation_inmobi/ios/gma_mediation_inmobi.podspec new file mode 100644 index 000000000..cd37177c4 --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/ios/gma_mediation_inmobi.podspec @@ -0,0 +1,26 @@ +# +# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. +# Run `pod lib lint gma_mediation_inmobi.podspec` to validate before publishing. +# +Pod::Spec.new do |s| + s.name = 'gma_mediation_inmobi' + s.version = '2.0.0' + s.summary = 'Google Mobile Ads Mediation of InMobi.' + s.description = <<-DESC +Mediation Adapter for InMobi to use with Google Mobile Ads. + DESC + s.homepage = 'https://developers.google.com/admob/flutter/mediation/inmobi' + s.license = { :file => '../LICENSE' } + s.author = { 'Google LLC' => 'mediation-support@google.com' } + s.source = { :path => '.' } + s.source_files = 'Classes/**/*' + s.public_header_files = 'Classes/**/*.h' + s.dependency 'Flutter' + s.dependency 'GoogleMobileAdsMediationInMobi', '~> 11.1.0.0' + s.platform = :ios, '12.0' + s.static_framework = true + + # Flutter.framework does not contain a i386 slice. + s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' } + s.swift_version = '5.0' +end diff --git a/packages/mediation/gma_mediation_inmobi/lib/gma_mediation_inmobi.dart b/packages/mediation/gma_mediation_inmobi/lib/gma_mediation_inmobi.dart new file mode 100644 index 000000000..36f5e1355 --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/lib/gma_mediation_inmobi.dart @@ -0,0 +1,16 @@ +// 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 +// +// https://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. + +/// This empty class is needed to allow correct compatibility analysis with host platforms. +class GmaMediationInMobi {} diff --git a/packages/mediation/gma_mediation_inmobi/lib/inmobi_mediation_extras.dart b/packages/mediation/gma_mediation_inmobi/lib/inmobi_mediation_extras.dart new file mode 100644 index 000000000..a66108382 --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/lib/inmobi_mediation_extras.dart @@ -0,0 +1,110 @@ +// 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 +// +// https://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 'package:gma_mediation_inmobi/gma_mediation_inmobi.dart'; +import 'package:google_mobile_ads/google_mobile_ads.dart'; + +/// Class with additional parameters to attach to the [AdRequest] or [AdManagerAdRequest] when using the [GmaMediationInMobi] adapter. +class InMobiMediationExtras implements MediationExtras { + InMobiMediationExtras({ + this.ageGroup, + this.education, + this.age, + this.yearOfBirth, + this.postalCode, + this.areaCode, + this.language, + this.city, + this.state, + this.country, + this.keywords, + this.interests, + this.logLevel, + }); + + InMobiAgeGroups? ageGroup; + InMobiEducation? education; + int? age; + int? yearOfBirth; + String? postalCode; + String? areaCode; + String? language; + String? city; + String? state; + String? country; + String? interests; + String? keywords; + InMobiLogLevel? logLevel; + + @override + String getAndroidClassName() { + return "io.flutter.plugins.googlemobileads.mediation.gma_mediation_inmobi.InMobiFlutterMediationExtras"; + } + + @override + String getIOSClassName() { + return "InMobiFlutterMediationExtras"; + } + + @override + Map getExtras() { + return { + "ageGroup": ageGroup?.intValue, + "education": education?.intValue, + "age": age, + "yearOfBirth": yearOfBirth, + "postalCode": postalCode, + "areaCode": areaCode, + "language": language, + "city": city, + "state": state, + "country": country, + "keywords": keywords, + "interests": interests, + "logLevel": logLevel?.intValue, + }; + } +} + +/// Definition of the age groups. +enum InMobiAgeGroups { + below18, // index = 0 + between18And24, + between25And29, + between30And34, + between35And44, + between45And54, + between55And65, + above65; + + int get intValue => index; +} + +/// Definition of different level of education. +enum InMobiEducation { + highschoolOrLess, // index = 0 + collegeOrGraduate, + postgraduateOrAbove; + + int get intValue => index; +} + +/// Used in the InMobiSDK to set the log level. +enum InMobiLogLevel { + none, + debug, + error; + + int get intValue => index; +} diff --git a/packages/mediation/gma_mediation_inmobi/pubspec.yaml b/packages/mediation/gma_mediation_inmobi/pubspec.yaml new file mode 100644 index 000000000..a030ad91b --- /dev/null +++ b/packages/mediation/gma_mediation_inmobi/pubspec.yaml @@ -0,0 +1,29 @@ +name: gma_mediation_inmobi +description: "Mediation Adapter that enables sending ad requests to the InMobi ad network using the google_mobile_ads plugin." +version: 2.0.0 +repository: https://github.com/googleads/googleads-mobile-flutter/tree/main/packages/mediation/gma_mediation_inmobi + +environment: + sdk: '>=3.6.0 <4.0.0' + flutter: '>=3.27.0' + +dependencies: + flutter: + sdk: flutter + google_mobile_ads: ^6.0.0 + plugin_platform_interface: ^2.0.2 + +dev_dependencies: + flutter_lints: ^3.0.0 + flutter_test: + sdk: flutter + lint: ^2.3.0 + +flutter: + plugin: + platforms: + android: + package: io.flutter.plugins.googlemobileads.mediation.gma_mediation_inmobi + pluginClass: GmaMediationInMobiPlugin + ios: + pluginClass: GmaMediationInMobiPlugin diff --git a/packages/mediation/gma_mediation_ironsource/.gitignore b/packages/mediation/gma_mediation_ironsource/.gitignore new file mode 100644 index 000000000..ac5aa9893 --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/.gitignore @@ -0,0 +1,29 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. +/pubspec.lock +**/doc/api/ +.dart_tool/ +build/ diff --git a/packages/mediation/gma_mediation_ironsource/.metadata b/packages/mediation/gma_mediation_ironsource/.metadata new file mode 100644 index 000000000..a7455847d --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/.metadata @@ -0,0 +1,33 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "300451adae589accbece3490f4396f10bdf15e6e" + channel: "stable" + +project_type: plugin + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: 300451adae589accbece3490f4396f10bdf15e6e + base_revision: 300451adae589accbece3490f4396f10bdf15e6e + - platform: android + create_revision: 300451adae589accbece3490f4396f10bdf15e6e + base_revision: 300451adae589accbece3490f4396f10bdf15e6e + - platform: ios + create_revision: 300451adae589accbece3490f4396f10bdf15e6e + base_revision: 300451adae589accbece3490f4396f10bdf15e6e + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/packages/mediation/gma_mediation_ironsource/CHANGELOG.md b/packages/mediation/gma_mediation_ironsource/CHANGELOG.md new file mode 100644 index 000000000..a8e032251 --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/CHANGELOG.md @@ -0,0 +1,61 @@ +## ironSource Flutter Mediation Adapter Changelog + +#### Version 2.2.0 (In progress) + +#### Version 2.1.0 +- Supports [ironSource Android adapter version 9.1.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/ironsource/CHANGELOG.md#version-9100). +- Supports [ironSource iOS adapter version 9.1.0.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/IronSource/CHANGELOG.md#version-91000). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 2.0.1 +- Fixed iOS build with new API +- Supports [ironSource Android adapter version 9.0.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/ironsource/CHANGELOG.md#version-9000). +- Supports [ironSource iOS adapter version 9.0.0.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/IronSource/CHANGELOG.md#version-90000). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 2.0.0 +- Supports [ironSource Android adapter version 9.0.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/ironsource/CHANGELOG.md#version-9000). +- Supports [ironSource iOS adapter version 9.0.0.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/IronSource/CHANGELOG.md#version-90000). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.5.0 +- Supports [ironSource Android adapter version 8.10.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/ironsource/CHANGELOG.md#version-81000). +- Supports [ironSource iOS adapter version 8.10.0.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/IronSource/CHANGELOG.md#version-810000). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.4.1 +- Supports [ironSource Android adapter version 8.9.1.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/ironsource/CHANGELOG.md#version-8910). +- Supports [ironSource iOS adapter version 8.9.1.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/IronSource/CHANGELOG.md#version-89100). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.4.0 +- Supports [ironSource Android adapter version 8.9.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/ironsource/CHANGELOG.md#version-8900). +- Supports [ironSource iOS adapter version 8.9.1.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/IronSource/CHANGELOG.md#version-89100). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.3.1 +- Supports [ironSource Android adapter version 8.8.0.1](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/ironsource/CHANGELOG.md#version-8801). +- Supports [ironSource iOS adapter version 8.8.0.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/IronSource/CHANGELOG.md#version-88000). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.3.0 +- Supports [ironSource Android adapter version 8.8.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/ironsource/CHANGELOG.md#version-8800). +- Supports [ironSource iOS adapter version 8.8.0.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/IronSource/CHANGELOG.md#version-88000). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.2.0 +- Supports [ironSource Android adapter version 8.7.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/ironsource/CHANGELOG.md#version-8700). +- Supports [ironSource iOS adapter version 8.6.1.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/IronSource/CHANGELOG.md#version-86100). +- Built and tested with the Google Mobile Ads Flutter Plugin version 5.3.1. + +#### Version 1.1.0 +- iOS plugin is now a static framework. +- Supports [ironSource Android adapter version 8.6.1.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/ironsource/CHANGELOG.md#version-8610). +- Supports [ironSource iOS adapter version 8.6.0.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/IronSource/CHANGELOG.md#version-86000). +- Built and tested with the Google Mobile Ads Flutter Plugin version 5.3.1. + +#### Version 1.0.0 +- Initial release. +- Supports [ironSource Android adapter version 8.0.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/ironsource/CHANGELOG.md#version-8000). +- Supports [ironSource iOS adapter version 8.0.0.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/IronSource/CHANGELOG.md#version-80000). +- Built and tested with the Google Mobile Ads Flutter Plugin version 5.1.0. diff --git a/packages/mediation/gma_mediation_ironsource/LICENSE b/packages/mediation/gma_mediation_ironsource/LICENSE new file mode 100644 index 000000000..e58143fcc --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/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 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. diff --git a/packages/mediation/gma_mediation_ironsource/README.md b/packages/mediation/gma_mediation_ironsource/README.md new file mode 100644 index 000000000..6a1464825 --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/README.md @@ -0,0 +1,36 @@ +# Google Mobile Ads Mediation of ironSource for Flutter + +[![gma_mediation_ironsource](https://github.com/googleads/googleads-mobile-flutter/actions/workflows/google_mobile_ads.yaml/badge.svg)](https://github.com/googleads/googleads-mobile-flutter/actions/workflows/google_mobile_ads.yaml) + +This repository contains the source code for the Mediation ironSource Flutter +plugin to be used with the Google Mobile Ads plugin. It enables mediation of the +ironSource Ad Network through the Google Mobile Ads SDK. + +This plugin use the [Pigeon Flutter plugin](https://pub.dev/packages/pigeon) to +generate the classes that bridge the dart layer with each platform's code. +To add or modify the third party sdk, use the classes in the pigeons folder +following [this guide](https://github.com/flutter/packages/blob/main/packages/pigeon/example/README.md). + +## Documentation +For instructions on how to use with the google_mobile_ads plugin, refer to the +developer guide for [ironSource](https://developers.google.com/admob/flutter/mediation/ironsource). + +## Downloads + +See [pub.dev](https://pub.dev/packages/gma_mediation_ironsource/versions) for the +latest releases of the plugin. + +## Suggesting improvements + +To file bugs, make feature requests, or to suggest other improvements, please +use [github's issue tracker](https://github.com/googleads/googleads-mobile-flutter/issues). + + +## Other resources + +* [AdMob help center](https://support.google.com/admob/?hl=en#topic=7383088) +* [Ad Manager help center](https://support.google.com/admanager/?hl=en#topic=7505988) + +## License + +[Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0) \ No newline at end of file diff --git a/packages/mediation/gma_mediation_ironsource/analysis_options.yaml b/packages/mediation/gma_mediation_ironsource/analysis_options.yaml new file mode 100644 index 000000000..7ccbffbb3 --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/analysis_options.yaml @@ -0,0 +1,19 @@ +#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 +# +#https://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. + +include: package:lint/package.yaml + +analyzer: + exclude: + - '**.g.dart' diff --git a/packages/mediation/gma_mediation_ironsource/android/.gitignore b/packages/mediation/gma_mediation_ironsource/android/.gitignore new file mode 100644 index 000000000..161bdcdaf --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/android/.gitignore @@ -0,0 +1,9 @@ +*.iml +.gradle +/local.properties +/.idea/workspace.xml +/.idea/libraries +.DS_Store +/build +/captures +.cxx diff --git a/packages/mediation/gma_mediation_ironsource/android/build.gradle b/packages/mediation/gma_mediation_ironsource/android/build.gradle new file mode 100644 index 000000000..1ba536545 --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/android/build.gradle @@ -0,0 +1,86 @@ +group 'io.flutter.plugins.googlemobileads.mediation.gma_mediation_ironsource' +version = "2.2.0" + +buildscript { + ext.kotlin_version = '2.2.21' + repositories { + google() + mavenCentral() + } + + dependencies { + classpath 'com.android.tools.build:gradle:8.13.1' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + +allprojects { + repositories { + google() + mavenCentral() + maven { + url = uri("https://android-sdk.is.com/") + } + } +} + +apply plugin: 'com.android.library' +apply plugin: 'kotlin-android' + +ext { + stringVersion = "9.2.0.0" +} + +android { + if (project.android.hasProperty("namespace")) { + namespace 'io.flutter.plugins.googlemobileads.mediation.gma_mediation_ironsource' + } + + compileSdk 36 + + compileOptions { + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + test.java.srcDirs += 'src/test/kotlin' + } + + defaultConfig { + minSdkVersion 24 + } + + dependencies { + implementation "com.google.ads.mediation:ironsource:$stringVersion" + testImplementation 'junit:junit:4.13.2' + testImplementation 'androidx.test:core:1.5.0' + testImplementation 'androidx.test:core-ktx:1.5.0' + testImplementation 'androidx.test.ext:junit:1.1.5' + testImplementation 'org.jetbrains.kotlin:kotlin-stdlib:1.8.20' + testImplementation 'org.mockito:mockito-core:5.5.0' + testImplementation 'org.mockito.kotlin:mockito-kotlin:5.1.0' + testImplementation 'org.robolectric:robolectric:4.16' + } + + testOptions { + unitTests.all { + useJUnit() + + testLogging { + events "passed", "skipped", "failed", "standardOut", "standardError" + outputs.upToDateWhen {false} + showStandardStreams = true + } + } + unitTests { + includeAndroidResources = true + unitTests.returnDefaultValues = true + } + } +} diff --git a/packages/mediation/gma_mediation_ironsource/android/gradle.properties b/packages/mediation/gma_mediation_ironsource/android/gradle.properties new file mode 100644 index 000000000..2d8d1e4dd --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/android/gradle.properties @@ -0,0 +1 @@ +android.useAndroidX=true \ No newline at end of file diff --git a/packages/mediation/gma_mediation_ironsource/android/gradle/wrapper/gradle-wrapper.properties b/packages/mediation/gma_mediation_ironsource/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 000000000..cd4b7aa89 --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip +networkTimeout=10000 +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/packages/mediation/gma_mediation_ironsource/android/settings.gradle b/packages/mediation/gma_mediation_ironsource/android/settings.gradle new file mode 100644 index 000000000..b761951f7 --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/android/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'gma_mediation_ironsource' diff --git a/packages/mediation/gma_mediation_ironsource/android/src/main/AndroidManifest.xml b/packages/mediation/gma_mediation_ironsource/android/src/main/AndroidManifest.xml new file mode 100644 index 000000000..913c5d189 --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/android/src/main/AndroidManifest.xml @@ -0,0 +1,3 @@ + + diff --git a/packages/mediation/gma_mediation_ironsource/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_ironsource/GmaMediationIronsourcePlugin.kt b/packages/mediation/gma_mediation_ironsource/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_ironsource/GmaMediationIronsourcePlugin.kt new file mode 100644 index 000000000..edfd19b22 --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_ironsource/GmaMediationIronsourcePlugin.kt @@ -0,0 +1,44 @@ +// 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 +// +// https://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. + +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_ironsource + +import com.unity3d.mediation.LevelPlay +import io.flutter.embedding.engine.plugins.FlutterPlugin + +/** GmaMediationIronsourcePlugin manages IronSourcePrivacyApi and implements the needed methods. */ +class GmaMediationIronsourcePlugin : FlutterPlugin, IronSourcePrivacyApi { + + override fun onAttachedToEngine(flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) { + IronSourcePrivacyApi.setUp(flutterPluginBinding.binaryMessenger, this) + } + + override fun onDetachedFromEngine(binding: FlutterPlugin.FlutterPluginBinding) { + IronSourcePrivacyApi.setUp(binding.binaryMessenger, null) + } + + override fun setConsent(gdprConsent: Boolean) { + LevelPlay.setConsent(gdprConsent) + } + + override fun setDoNotSell(doNotSell: Boolean) { + LevelPlay.setMetaData(IRONSOURCE_DONOTSELL_KEY, if (doNotSell) TRUE else FALSE) + } + + companion object { + const val IRONSOURCE_DONOTSELL_KEY = "do_not_sell" + const val TRUE = "true" + const val FALSE = "false" + } +} diff --git a/packages/mediation/gma_mediation_ironsource/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_ironsource/IronSourcePrivacyApi.g.kt b/packages/mediation/gma_mediation_ironsource/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_ironsource/IronSourcePrivacyApi.g.kt new file mode 100644 index 000000000..cd60f4fe8 --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_ironsource/IronSourcePrivacyApi.g.kt @@ -0,0 +1,102 @@ +// Autogenerated from Pigeon (v17.3.0), do not edit directly. +// See also: https://pub.dev/packages/pigeon + +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_ironsource + +import android.util.Log +import io.flutter.plugin.common.BasicMessageChannel +import io.flutter.plugin.common.BinaryMessenger +import io.flutter.plugin.common.MessageCodec +import io.flutter.plugin.common.StandardMessageCodec +import java.io.ByteArrayOutputStream +import java.nio.ByteBuffer + +private fun wrapResult(result: Any?): List { + return listOf(result) +} + +private fun wrapError(exception: Throwable): List { + if (exception is IronSourcePrivacyError) { + return listOf( + exception.code, + exception.message, + exception.details + ) + } else { + return listOf( + exception.javaClass.simpleName, + exception.toString(), + "Cause: " + exception.cause + ", Stacktrace: " + Log.getStackTraceString(exception) + ) + } +} + +/** + * Error class for passing custom error details to Flutter via a thrown PlatformException. + * @property code The error code. + * @property message The error message. + * @property details The error details. Must be a datatype supported by the api codec. + */ +class IronSourcePrivacyError ( + val code: String, + override val message: String? = null, + val details: Any? = null +) : Throwable() +/** + * The generated classes set the channels to call the methods in the corresponding kotlin IronSourcePrivacyApi interface and swift IronSourcePrivacyApi protocol from the dart layer. + * + * Generated interface from Pigeon that represents a handler of messages from Flutter. + */ +interface IronSourcePrivacyApi { + fun setConsent(gdprConsent: Boolean) + fun setDoNotSell(doNotSell: Boolean) + + companion object { + /** The codec used by IronSourcePrivacyApi. */ + val codec: MessageCodec by lazy { + StandardMessageCodec() + } + /** Sets up an instance of `IronSourcePrivacyApi` to handle messages through the `binaryMessenger`. */ + @Suppress("UNCHECKED_CAST") + fun setUp(binaryMessenger: BinaryMessenger, api: IronSourcePrivacyApi?) { + run { + val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.gma_mediation_ironsource.IronSourcePrivacyApi.setConsent", codec) + if (api != null) { + channel.setMessageHandler { message, reply -> + val args = message as List + val gdprConsentArg = args[0] as Boolean + var wrapped: List + try { + api.setConsent(gdprConsentArg) + wrapped = listOf(null) + } catch (exception: Throwable) { + wrapped = wrapError(exception) + } + reply.reply(wrapped) + } + } else { + channel.setMessageHandler(null) + } + } + run { + val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.gma_mediation_ironsource.IronSourcePrivacyApi.setDoNotSell", codec) + if (api != null) { + channel.setMessageHandler { message, reply -> + val args = message as List + val doNotSellArg = args[0] as Boolean + var wrapped: List + try { + api.setDoNotSell(doNotSellArg) + wrapped = listOf(null) + } catch (exception: Throwable) { + wrapped = wrapError(exception) + } + reply.reply(wrapped) + } + } else { + channel.setMessageHandler(null) + } + } + } + } +} diff --git a/packages/mediation/gma_mediation_ironsource/android/src/test/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_ironsource/GmaMediationIronsourcePluginTest.kt b/packages/mediation/gma_mediation_ironsource/android/src/test/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_ironsource/GmaMediationIronsourcePluginTest.kt new file mode 100644 index 000000000..449f0a37d --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/android/src/test/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_ironsource/GmaMediationIronsourcePluginTest.kt @@ -0,0 +1,68 @@ +// 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 +// +// https://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. + +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_ironsource + +import androidx.test.ext.junit.runners.AndroidJUnit4 +import com.unity3d.mediation.LevelPlay +import io.flutter.plugins.googlemobileads.mediation.gma_mediation_ironsource.GmaMediationIronsourcePlugin.Companion.FALSE +import io.flutter.plugins.googlemobileads.mediation.gma_mediation_ironsource.GmaMediationIronsourcePlugin.Companion.IRONSOURCE_DONOTSELL_KEY +import io.flutter.plugins.googlemobileads.mediation.gma_mediation_ironsource.GmaMediationIronsourcePlugin.Companion.TRUE +import org.junit.Test +import org.junit.runner.RunWith +import org.mockito.Mockito.mockStatic +import org.mockito.kotlin.eq + +@RunWith(AndroidJUnit4::class) +internal class GmaMediationIronsourcePluginTest { + @Test + fun setConsent_withTrueValue_invokesIronSourceSetConsent() { + val plugin = GmaMediationIronsourcePlugin() + mockStatic(LevelPlay::class.java).use { mockedIronSource -> + plugin.setConsent(true) + + mockedIronSource.verify { LevelPlay.setConsent(eq(true)) } + } + } + + @Test + fun setConsent_withFalseValue_invokesIronSourceSetConsent() { + val plugin = GmaMediationIronsourcePlugin() + mockStatic(LevelPlay::class.java).use { mockedIronSource -> + plugin.setConsent(false) + + mockedIronSource.verify { LevelPlay.setConsent(eq(false)) } + } + } + + @Test + fun setDoNotSell_withTrueValue_invokesIronSourceMetaDataWithCorrectKeyAndValue() { + val plugin = GmaMediationIronsourcePlugin() + mockStatic(LevelPlay::class.java).use { mockedIronSource -> + plugin.setDoNotSell(true) + + mockedIronSource.verify { LevelPlay.setMetaData(eq(IRONSOURCE_DONOTSELL_KEY), eq(TRUE)) } + } + } + + @Test + fun setDoNotSell_withFalseValue_invokesIronSourceMetaDataWithCorrectKeyAndValue() { + val plugin = GmaMediationIronsourcePlugin() + mockStatic(LevelPlay::class.java).use { mockedIronSource -> + plugin.setDoNotSell(false) + + mockedIronSource.verify { LevelPlay.setMetaData(eq(IRONSOURCE_DONOTSELL_KEY), eq(FALSE)) } + } + } +} diff --git a/packages/mediation/gma_mediation_ironsource/example/.gitignore b/packages/mediation/gma_mediation_ironsource/example/.gitignore new file mode 100644 index 000000000..29a3a5017 --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/example/.gitignore @@ -0,0 +1,43 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.pub-cache/ +.pub/ +/build/ + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/packages/mediation/gma_mediation_ironsource/example/README.md b/packages/mediation/gma_mediation_ironsource/example/README.md new file mode 100644 index 000000000..7b9af7de2 --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/example/README.md @@ -0,0 +1,17 @@ +# gma_mediation_ironsource_example + +Learn how to integrate with your app that uses the [google_mobile_ads](https://pub.dev/packages/google_mobile_ads) plugin +by following the [development guide](https://developers.google.com/admob/flutter/mediation/ironsource). + +## Getting Started + +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) + +For help getting started with Flutter development, view the +[online documentation](https://docs.flutter.dev/), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/packages/mediation/gma_mediation_ironsource/example/analysis_options.yaml b/packages/mediation/gma_mediation_ironsource/example/analysis_options.yaml new file mode 100644 index 000000000..0d2902135 --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/example/analysis_options.yaml @@ -0,0 +1,28 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at https://dart.dev/lints. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/packages/mediation/gma_mediation_ironsource/example/android/.gitignore b/packages/mediation/gma_mediation_ironsource/example/android/.gitignore new file mode 100644 index 000000000..6f568019d --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/example/android/.gitignore @@ -0,0 +1,13 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +key.properties +**/*.keystore +**/*.jks diff --git a/packages/mediation/gma_mediation_ironsource/example/android/app/build.gradle b/packages/mediation/gma_mediation_ironsource/example/android/app/build.gradle new file mode 100644 index 000000000..f2f2911fe --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/example/android/app/build.gradle @@ -0,0 +1,67 @@ +plugins { + id "com.android.application" + id "kotlin-android" + id "dev.flutter.flutter-gradle-plugin" +} + +def localProperties = new Properties() +def localPropertiesFile = rootProject.file('local.properties') +if (localPropertiesFile.exists()) { + localPropertiesFile.withReader('UTF-8') { reader -> + localProperties.load(reader) + } +} + +def flutterVersionCode = localProperties.getProperty('flutter.versionCode') +if (flutterVersionCode == null) { + flutterVersionCode = '1' +} + +def flutterVersionName = localProperties.getProperty('flutter.versionName') +if (flutterVersionName == null) { + flutterVersionName = '1.0' +} + +android { + namespace "io.flutter.plugins.googlemobileads.mediation.gma_mediation_ironsource_example" + compileSdk flutter.compileSdkVersion + ndkVersion flutter.ndkVersion + + compileOptions { + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId "io.flutter.plugins.googlemobileads.mediation.gma_mediation_ironsource_example" + // You can update the following values to match your application needs. + // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. + minSdkVersion 23 + targetSdkVersion flutter.targetSdkVersion + versionCode flutterVersionCode.toInteger() + versionName flutterVersionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig signingConfigs.debug + } + } +} + +flutter { + source '../..' +} + +dependencies {} diff --git a/packages/mediation/gma_mediation_ironsource/example/android/app/src/debug/AndroidManifest.xml b/packages/mediation/gma_mediation_ironsource/example/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 000000000..399f6981d --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/example/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/packages/mediation/gma_mediation_ironsource/example/android/app/src/main/AndroidManifest.xml b/packages/mediation/gma_mediation_ironsource/example/android/app/src/main/AndroidManifest.xml new file mode 100644 index 000000000..27e6145e9 --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/example/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_ironsource/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_ironsource_example/MainActivity.kt b/packages/mediation/gma_mediation_ironsource/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_ironsource_example/MainActivity.kt new file mode 100644 index 000000000..4ee2e9dfd --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_ironsource_example/MainActivity.kt @@ -0,0 +1,5 @@ +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_ironsource_example + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() diff --git a/packages/mediation/gma_mediation_ironsource/example/android/app/src/main/res/drawable-v21/launch_background.xml b/packages/mediation/gma_mediation_ironsource/example/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 000000000..f74085f3f --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/example/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/mediation/gma_mediation_ironsource/example/android/app/src/main/res/drawable/launch_background.xml b/packages/mediation/gma_mediation_ironsource/example/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 000000000..304732f88 --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/example/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/mediation/gma_mediation_ironsource/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/mediation/gma_mediation_ironsource/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..db77bb4b7 Binary files /dev/null and b/packages/mediation/gma_mediation_ironsource/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_ironsource/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/mediation/gma_mediation_ironsource/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..17987b79b Binary files /dev/null and b/packages/mediation/gma_mediation_ironsource/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_ironsource/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/mediation/gma_mediation_ironsource/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..09d439148 Binary files /dev/null and b/packages/mediation/gma_mediation_ironsource/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_ironsource/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/mediation/gma_mediation_ironsource/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..d5f1c8d34 Binary files /dev/null and b/packages/mediation/gma_mediation_ironsource/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_ironsource/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/packages/mediation/gma_mediation_ironsource/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..4d6372eeb Binary files /dev/null and b/packages/mediation/gma_mediation_ironsource/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_ironsource/example/android/app/src/main/res/values-night/styles.xml b/packages/mediation/gma_mediation_ironsource/example/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 000000000..06952be74 --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/example/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/packages/mediation/gma_mediation_ironsource/example/android/app/src/main/res/values/styles.xml b/packages/mediation/gma_mediation_ironsource/example/android/app/src/main/res/values/styles.xml new file mode 100644 index 000000000..cb1ef8805 --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/example/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/packages/mediation/gma_mediation_ironsource/example/android/app/src/profile/AndroidManifest.xml b/packages/mediation/gma_mediation_ironsource/example/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 000000000..399f6981d --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/example/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/packages/mediation/gma_mediation_ironsource/example/android/build.gradle b/packages/mediation/gma_mediation_ironsource/example/android/build.gradle new file mode 100644 index 000000000..bc157bd1a --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/example/android/build.gradle @@ -0,0 +1,18 @@ +allprojects { + repositories { + google() + mavenCentral() + } +} + +rootProject.buildDir = '../build' +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(':app') +} + +tasks.register("clean", Delete) { + delete rootProject.buildDir +} diff --git a/packages/mediation/gma_mediation_ironsource/example/android/gradle.properties b/packages/mediation/gma_mediation_ironsource/example/android/gradle.properties new file mode 100644 index 000000000..598d13fee --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/example/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx4G +android.useAndroidX=true +android.enableJetifier=true diff --git a/packages/mediation/gma_mediation_ironsource/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/mediation/gma_mediation_ironsource/example/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 000000000..f004c34c0 --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/example/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip diff --git a/packages/mediation/gma_mediation_ironsource/example/android/settings.gradle b/packages/mediation/gma_mediation_ironsource/example/android/settings.gradle new file mode 100644 index 000000000..a512319b9 --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/example/android/settings.gradle @@ -0,0 +1,26 @@ +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + } + settings.ext.flutterSdkPath = flutterSdkPath() + + includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") + + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "8.13.1" apply false + id "org.jetbrains.kotlin.android" version "2.2.21" apply false +} + +include ":app" diff --git a/packages/mediation/gma_mediation_ironsource/example/ios/.gitignore b/packages/mediation/gma_mediation_ironsource/example/ios/.gitignore new file mode 100644 index 000000000..7a7f9873a --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/example/ios/.gitignore @@ -0,0 +1,34 @@ +**/dgph +*.mode1v3 +*.mode2v3 +*.moved-aside +*.pbxuser +*.perspectivev3 +**/*sync/ +.sconsign.dblite +.tags* +**/.vagrant/ +**/DerivedData/ +Icon? +**/Pods/ +**/.symlinks/ +profile +xcuserdata +**/.generated/ +Flutter/App.framework +Flutter/Flutter.framework +Flutter/Flutter.podspec +Flutter/Generated.xcconfig +Flutter/ephemeral/ +Flutter/app.flx +Flutter/app.zip +Flutter/flutter_assets/ +Flutter/flutter_export_environment.sh +ServiceDefinitions.json +Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!default.mode1v3 +!default.mode2v3 +!default.pbxuser +!default.perspectivev3 diff --git a/packages/mediation/gma_mediation_ironsource/example/ios/Flutter/AppFrameworkInfo.plist b/packages/mediation/gma_mediation_ironsource/example/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 000000000..1dc6cf765 --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/example/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 13.0 + + diff --git a/packages/mediation/gma_mediation_ironsource/example/ios/Flutter/Debug.xcconfig b/packages/mediation/gma_mediation_ironsource/example/ios/Flutter/Debug.xcconfig new file mode 100644 index 000000000..ec97fc6f3 --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/example/ios/Flutter/Debug.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" +#include "Generated.xcconfig" diff --git a/packages/mediation/gma_mediation_ironsource/example/ios/Flutter/Release.xcconfig b/packages/mediation/gma_mediation_ironsource/example/ios/Flutter/Release.xcconfig new file mode 100644 index 000000000..c4855bfe2 --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/example/ios/Flutter/Release.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" +#include "Generated.xcconfig" diff --git a/packages/mediation/gma_mediation_ironsource/example/ios/Podfile b/packages/mediation/gma_mediation_ironsource/example/ios/Podfile new file mode 100644 index 000000000..b2d735017 --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/example/ios/Podfile @@ -0,0 +1,42 @@ +platform :ios, '13.0' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_ios_podfile_setup + +target 'Runner' do + use_modular_headers! + + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) + target 'RunnerTests' do + inherit! :search_paths + end +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_ios_build_settings(target) + end +end diff --git a/packages/mediation/gma_mediation_ironsource/example/ios/Runner.xcodeproj/project.pbxproj b/packages/mediation/gma_mediation_ironsource/example/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 000000000..11e0fb54b --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/example/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,632 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 331C808B294A63AB00263BE5 /* GmaMediationIronsourcePluginTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* GmaMediationIronsourcePluginTests.swift */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 97C146E61CF9000F007C117D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 97C146ED1CF9000F007C117D; + remoteInfo = Runner; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 331C807B294A618700263BE5 /* GmaMediationIronsourcePluginTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GmaMediationIronsourcePluginTests.swift; sourceTree = ""; }; + 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 798BCFFB71FDC6614B5879F2 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 03203E237CA5B27E39E9F3D0 /* Pods */ = { + isa = PBXGroup; + children = ( + ); + path = Pods; + sourceTree = ""; + }; + 331C8082294A63A400263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C807B294A618700263BE5 /* GmaMediationIronsourcePluginTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + 331C8082294A63A400263BE5 /* RunnerTests */, + 03203E237CA5B27E39E9F3D0 /* Pods */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + 331C8081294A63A400263BE5 /* RunnerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C8080294A63A400263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 331C807D294A63A400263BE5 /* Sources */, + 331C807F294A63A400263BE5 /* Resources */, + 798BCFFB71FDC6614B5879F2 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 331C8086294A63A400263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1510; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 331C8080294A63A400263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 97C146ED1CF9000F007C117D; + }; + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + 331C8080294A63A400263BE5 /* RunnerTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 331C807F294A63A400263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 331C807D294A63A400263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C808B294A63AB00263BE5 /* GmaMediationIronsourcePluginTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 331C8086294A63A400263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 97C146ED1CF9000F007C117D /* Runner */; + targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationIronsourceExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 331C8088294A63A400263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationIronsourceExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Debug; + }; + 331C8089294A63A400263BE5 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationIronsourceExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Release; + }; + 331C808A294A63A400263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationIronsourceExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationIronsourceExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationIronsourceExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C8088294A63A400263BE5 /* Debug */, + 331C8089294A63A400263BE5 /* Release */, + 331C808A294A63A400263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/packages/mediation/gma_mediation_ironsource/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/mediation/gma_mediation_ironsource/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..919434a62 --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/packages/mediation/gma_mediation_ironsource/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/packages/mediation/gma_mediation_ironsource/example/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..21a3cc14c --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/example/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/packages/mediation/gma_mediation_ironsource/example/ios/Runner/AppDelegate.swift b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/AppDelegate.swift new file mode 100644 index 000000000..70693e4a8 --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import UIKit +import Flutter + +@UIApplicationMain +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..d36b1fab2 --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 000000000..dc9ada472 Binary files /dev/null and b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 000000000..7353c41ec Binary files /dev/null and b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 000000000..797d452e4 Binary files /dev/null and b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 000000000..6ed2d933e Binary files /dev/null and b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 000000000..4cd7b0099 Binary files /dev/null and b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 000000000..fe730945a Binary files /dev/null and b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 000000000..321773cd8 Binary files /dev/null and b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 000000000..797d452e4 Binary files /dev/null and b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 000000000..502f463a9 Binary files /dev/null and b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 000000000..0ec303439 Binary files /dev/null and b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 000000000..0ec303439 Binary files /dev/null and b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 000000000..e9f5fea27 Binary files /dev/null and b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 000000000..84ac32ae7 Binary files /dev/null and b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 000000000..8953cba09 Binary files /dev/null and b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 000000000..0467bf12a Binary files /dev/null and b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 000000000..0bedcf2fd --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchImage.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 000000000..89c2725b7 --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 000000000..f2e259c7c --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Base.lproj/Main.storyboard b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 000000000..f3c28516f --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Info.plist b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Info.plist new file mode 100644 index 000000000..e46e70d02 --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Info.plist @@ -0,0 +1,51 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Gma Mediation Ironsource + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + gma_mediation_ironsource_example + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + CADisableMinimumFrameDurationOnPhone + + UIApplicationSupportsIndirectInputEvents + + GADApplicationIdentifier + ca-app-pub-3940256099942544~1458002511 + + diff --git a/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Runner-Bridging-Header.h b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 000000000..308a2a560 --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/example/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/packages/mediation/gma_mediation_ironsource/example/ios/RunnerTests/GmaMediationIronsourcePluginTests.swift b/packages/mediation/gma_mediation_ironsource/example/ios/RunnerTests/GmaMediationIronsourcePluginTests.swift new file mode 100644 index 000000000..aa3aca8fa --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/example/ios/RunnerTests/GmaMediationIronsourcePluginTests.swift @@ -0,0 +1,83 @@ +// 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 +// +// https://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 UIKit +import XCTest + +@testable import gma_mediation_ironsource + +class GmaMediationIronsourcePluginTests: XCTestCase { + + func testSetHasUserConsent() { + let ironSourceSdkFake = IronSourceSdkFake() + let plugin = GmaMediationIronsourcePlugin.init(ironSourceSdk: ironSourceSdkFake) + + do { + try plugin.setConsent(gdprConsent: true) + } catch { + fatalError("testSetHasUserConsent FAILED: setConsent did not complete") + } + + XCTAssertEqual(ironSourceSdkFake.gdprConsent, true) + } + + func testSetDoNotSellWhenTrue() { + let ironSourceSdkFake = IronSourceSdkFake() + let plugin = GmaMediationIronsourcePlugin.init(ironSourceSdk: ironSourceSdkFake) + + do { + try plugin.setDoNotSell(doNotSell: true) + } catch { + fatalError("testSetHasUserConsent FAILED: setConsent did not complete") + } + + XCTAssertEqual(ironSourceSdkFake.doNotSellKey, "do_not_sell") + XCTAssertEqual(ironSourceSdkFake.doNotSellValue, "YES") + } + + func testSetDoNotSellWhenFalse() { + let ironSourceSdkFake = IronSourceSdkFake() + let plugin = GmaMediationIronsourcePlugin.init(ironSourceSdk: ironSourceSdkFake) + + do { + try plugin.setDoNotSell(doNotSell: false) + } catch { + fatalError("testSetHasUserConsent FAILED: setConsent did not complete") + } + + XCTAssertEqual(ironSourceSdkFake.doNotSellKey, "do_not_sell") + XCTAssertEqual(ironSourceSdkFake.doNotSellValue, "NO") + } +} + +class IronSourceSdkFake: IronSourceSdkProtocol { + var gdprConsent: Bool + var doNotSellKey: String + var doNotSellValue: String + + init() { + gdprConsent = false + doNotSellKey = "" + doNotSellValue = "" + } + + func setConsent(gdprConsent: Bool) { + self.gdprConsent = gdprConsent + } + + func setDoNotSell(onKey: String, withValue: String) { + self.doNotSellKey = onKey + self.doNotSellValue = withValue + } +} diff --git a/packages/mediation/gma_mediation_ironsource/example/ios/RunnerTests/RunnerTests.swift b/packages/mediation/gma_mediation_ironsource/example/ios/RunnerTests/RunnerTests.swift new file mode 100644 index 000000000..4509ee0b2 --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/example/ios/RunnerTests/RunnerTests.swift @@ -0,0 +1,26 @@ +import Flutter +import UIKit +import XCTest + +@testable import gma_mediation_ironsource + +// This demonstrates a simple unit test of the Swift portion of this plugin's implementation. +// +// See https://developer.apple.com/documentation/xctest for more information about using XCTest. + +class RunnerTests: XCTestCase { + + func testGetPlatformVersion() { + let plugin = GmaMediationIronsourcePlugin() + + let call = FlutterMethodCall(methodName: "getPlatformVersion", arguments: []) + + let resultExpectation = expectation(description: "result block must be called.") + plugin.handle(call) { result in + XCTAssertEqual(result as! String, "iOS " + UIDevice.current.systemVersion) + resultExpectation.fulfill() + } + waitForExpectations(timeout: 1) + } + +} diff --git a/packages/mediation/gma_mediation_ironsource/example/lib/main.dart b/packages/mediation/gma_mediation_ironsource/example/lib/main.dart new file mode 100644 index 000000000..39ecfe882 --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/example/lib/main.dart @@ -0,0 +1,33 @@ +import 'package:flutter/material.dart'; + +void main() { + runApp(const MyApp()); +} + +class MyApp extends StatefulWidget { + const MyApp({super.key}); + + @override + State createState() => _MyAppState(); +} + +class _MyAppState extends State { + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Scaffold( + appBar: AppBar( + title: const Text('Plugin example app'), + ), + body: const Center( + child: Text('Test app.'), + ), + ), + ); + } +} diff --git a/packages/mediation/gma_mediation_ironsource/example/pubspec.yaml b/packages/mediation/gma_mediation_ironsource/example/pubspec.yaml new file mode 100644 index 000000000..f97975851 --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/example/pubspec.yaml @@ -0,0 +1,86 @@ +name: gma_mediation_ironsource_example +description: "Demonstrates how to use the gma_mediation_ironsource plugin." +# The following line prevents the package from being accidentally published to +# pub.dev using `flutter pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +environment: + sdk: '>=3.9.0 <4.0.0' + +# Dependencies specify other packages that your package needs in order to work. +# To automatically upgrade your package dependencies to the latest versions +# consider running `flutter pub upgrade --major-versions`. Alternatively, +# dependencies can be manually updated by changing the version numbers below to +# the latest version available on pub.dev. To see which dependencies have newer +# versions available, run `flutter pub outdated`. +dependencies: + flutter: + sdk: flutter + + google_mobile_ads: ^7.0.0 + gma_mediation_ironsource: + # When depending on this package from a real application you should use: + # gma_mediation_ironsource: ^x.y.z + # See https://dart.dev/tools/pub/dependencies#version-constraints + # The example app is bundled with the plugin so we use a path dependency on + # the parent directory to use the current plugin's version. + path: ../ + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^1.0.6 + +dev_dependencies: + integration_test: + sdk: flutter + flutter_test: + sdk: flutter + + # The "flutter_lints" package below contains a set of recommended lints to + # encourage good coding practices. The lint set provided by the package is + # activated in the `analysis_options.yaml` file located at the root of your + # package. See that file for information about deactivating specific lint + # rules and activating additional ones. + flutter_lints: ^6.0.0 + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter packages. +flutter: + + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + + # To add assets to your application, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/assets-and-images/#resolution-aware + + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/assets-and-images/#from-packages + + # To add custom fonts to your application, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts from package dependencies, + # see https://flutter.dev/custom-fonts/#from-packages diff --git a/packages/mediation/gma_mediation_ironsource/ios/.gitignore b/packages/mediation/gma_mediation_ironsource/ios/.gitignore new file mode 100644 index 000000000..0c885071e --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/ios/.gitignore @@ -0,0 +1,38 @@ +.idea/ +.vagrant/ +.sconsign.dblite +.svn/ + +.DS_Store +*.swp +profile + +DerivedData/ +build/ +GeneratedPluginRegistrant.h +GeneratedPluginRegistrant.m + +.generated/ + +*.pbxuser +*.mode1v3 +*.mode2v3 +*.perspectivev3 + +!default.pbxuser +!default.mode1v3 +!default.mode2v3 +!default.perspectivev3 + +xcuserdata + +*.moved-aside + +*.pyc +*sync/ +Icon? +.tags* + +/Flutter/Generated.xcconfig +/Flutter/ephemeral/ +/Flutter/flutter_export_environment.sh \ No newline at end of file diff --git a/packages/mediation/gma_mediation_ironsource/ios/Assets/.gitkeep b/packages/mediation/gma_mediation_ironsource/ios/Assets/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/packages/mediation/gma_mediation_ironsource/ios/Classes/GmaMediationIronsourcePlugin.swift b/packages/mediation/gma_mediation_ironsource/ios/Classes/GmaMediationIronsourcePlugin.swift new file mode 100644 index 000000000..3c2b5140a --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/ios/Classes/GmaMediationIronsourcePlugin.swift @@ -0,0 +1,61 @@ +// 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 +// +// https://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 Flutter +import IronSource +import UIKit + +/// Manages IronSourcePrivacyApi and implements the needed methods. +public class GmaMediationIronsourcePlugin: NSObject, FlutterPlugin, IronSourcePrivacyApi { + let ironSourceSdk: IronSourceSdkProtocol + + init(ironSourceSdk: IronSourceSdkProtocol) { + self.ironSourceSdk = ironSourceSdk + } + + public static func register(with registrar: FlutterPluginRegistrar) { + let messenger: FlutterBinaryMessenger = registrar.messenger() + let api: IronSourcePrivacyApi & NSObjectProtocol = GmaMediationIronsourcePlugin.init( + ironSourceSdk: IronSourceSdkImpl()) + IronSourcePrivacyApiSetup.setUp(binaryMessenger: messenger, api: api) + } + public func detachFromEngine(for registrar: FlutterPluginRegistrar) { + let messenger: FlutterBinaryMessenger = registrar.messenger() + IronSourcePrivacyApiSetup.setUp(binaryMessenger: messenger, api: nil) + } + + func setConsent(gdprConsent: Bool) throws { + ironSourceSdk.setConsent(gdprConsent: gdprConsent) + } + + func setDoNotSell(doNotSell: Bool) throws { + ironSourceSdk.setDoNotSell(onKey: "do_not_sell", withValue: doNotSell ? "YES" : "NO") + } +} + +protocol IronSourceSdkProtocol { + func setConsent(gdprConsent: Bool) + + func setDoNotSell(onKey: String, withValue: String) +} + +class IronSourceSdkImpl: IronSourceSdkProtocol { + func setConsent(gdprConsent: Bool) { + LevelPlay.setConsent(gdprConsent) + } + + func setDoNotSell(onKey: String, withValue: String) { + LevelPlay.setMetaDataWithKey(onKey, value: withValue) + } +} diff --git a/packages/mediation/gma_mediation_ironsource/ios/Classes/IronSourcePrivacyApi.g.swift b/packages/mediation/gma_mediation_ironsource/ios/Classes/IronSourcePrivacyApi.g.swift new file mode 100644 index 000000000..6132c4866 --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/ios/Classes/IronSourcePrivacyApi.g.swift @@ -0,0 +1,85 @@ +// Autogenerated from Pigeon (v17.3.0), do not edit directly. +// See also: https://pub.dev/packages/pigeon + +import Foundation + +#if os(iOS) + import Flutter +#elseif os(macOS) + import FlutterMacOS +#else + #error("Unsupported platform.") +#endif + +private func wrapResult(_ result: Any?) -> [Any?] { + return [result] +} + +private func wrapError(_ error: Any) -> [Any?] { + if let flutterError = error as? FlutterError { + return [ + flutterError.code, + flutterError.message, + flutterError.details, + ] + } + return [ + "\(error)", + "\(type(of: error))", + "Stacktrace: \(Thread.callStackSymbols)", + ] +} + +private func isNullish(_ value: Any?) -> Bool { + return value is NSNull || value == nil +} + +private func nilOrValue(_ value: Any?) -> T? { + if value is NSNull { return nil } + return value as! T? +} +/// The generated classes set the channels to call the methods in the corresponding kotlin IronSourcePrivacyApi interface and swift IronSourcePrivacyApi protocol from the dart layer. +/// +/// Generated protocol from Pigeon that represents a handler of messages from Flutter. +protocol IronSourcePrivacyApi { + func setConsent(gdprConsent: Bool) throws + func setDoNotSell(doNotSell: Bool) throws +} + +/// Generated setup class from Pigeon to handle messages through the `binaryMessenger`. +class IronSourcePrivacyApiSetup { + /// The codec used by IronSourcePrivacyApi. + /// Sets up an instance of `IronSourcePrivacyApi` to handle messages through the `binaryMessenger`. + static func setUp(binaryMessenger: FlutterBinaryMessenger, api: IronSourcePrivacyApi?) { + let setConsentChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.gma_mediation_ironsource.IronSourcePrivacyApi.setConsent", binaryMessenger: binaryMessenger) + if let api = api { + setConsentChannel.setMessageHandler { message, reply in + let args = message as! [Any?] + let gdprConsentArg = args[0] as! Bool + do { + try api.setConsent(gdprConsent: gdprConsentArg) + reply(wrapResult(nil)) + } catch { + reply(wrapError(error)) + } + } + } else { + setConsentChannel.setMessageHandler(nil) + } + let setDoNotSellChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.gma_mediation_ironsource.IronSourcePrivacyApi.setDoNotSell", binaryMessenger: binaryMessenger) + if let api = api { + setDoNotSellChannel.setMessageHandler { message, reply in + let args = message as! [Any?] + let doNotSellArg = args[0] as! Bool + do { + try api.setDoNotSell(doNotSell: doNotSellArg) + reply(wrapResult(nil)) + } catch { + reply(wrapError(error)) + } + } + } else { + setDoNotSellChannel.setMessageHandler(nil) + } + } +} diff --git a/packages/mediation/gma_mediation_ironsource/ios/gma_mediation_ironsource.podspec b/packages/mediation/gma_mediation_ironsource/ios/gma_mediation_ironsource.podspec new file mode 100644 index 000000000..bd0aa04d2 --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/ios/gma_mediation_ironsource.podspec @@ -0,0 +1,26 @@ +# +# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. +# Run `pod lib lint gma_mediation_ironsource.podspec` to validate before publishing. +# +Pod::Spec.new do |s| + s.name = 'gma_mediation_ironsource' + s.version = '2.2.0' + s.summary = 'Google Mobile Ads Mediation of ironSource.' + s.description = <<-DESC +Mediation Adapter for ironSource to use with Google Mobile Ads. + DESC + s.homepage = 'https://developers.google.com/admob/flutter/mediation/ironsource' + s.license = { :file => '../LICENSE' } + s.author = { 'Google LLC' => 'mediation-support@google.com' } + s.source = { :path => '.' } + s.source_files = 'Classes/**/*' + s.public_header_files = 'Classes/**/*.h' + s.dependency 'Flutter' + s.dependency 'GoogleMobileAdsMediationIronSource', '~>9.2.0.0.0' + s.platform = :ios, '13.0' + s.static_framework = true + + # Flutter.framework does not contain a i386 slice. + s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' } + s.swift_version = '5.0' +end diff --git a/packages/mediation/gma_mediation_ironsource/lib/gma_mediation_ironsource.dart b/packages/mediation/gma_mediation_ironsource/lib/gma_mediation_ironsource.dart new file mode 100644 index 000000000..3e02b04d6 --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/lib/gma_mediation_ironsource.dart @@ -0,0 +1,26 @@ +// 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 +// +// https://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 'package:gma_mediation_ironsource/ironsource_privacy_api.g.dart'; + +/// This class has entrypoint to call IronSource's SDK APIs. +class GmaMediationIronsource { + Future setConsent(bool gdprConsent) async { + await IronSourcePrivacyApi().setConsent(gdprConsent); + } + + Future setDoNotSell(bool doNotSell) async { + await IronSourcePrivacyApi().setDoNotSell(doNotSell); + } +} diff --git a/packages/mediation/gma_mediation_ironsource/lib/ironsource_privacy_api.g.dart b/packages/mediation/gma_mediation_ironsource/lib/ironsource_privacy_api.g.dart new file mode 100644 index 000000000..b94a8be40 --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/lib/ironsource_privacy_api.g.dart @@ -0,0 +1,77 @@ +// Autogenerated from Pigeon (v17.3.0), do not edit directly. +// See also: https://pub.dev/packages/pigeon +// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers + +import 'dart:async'; +import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; + +import 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer; +import 'package:flutter/services.dart'; + +PlatformException _createConnectionError(String channelName) { + return PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel: "$channelName".', + ); +} + +/// The generated classes set the channels to call the methods in the corresponding kotlin IronSourcePrivacyApi interface and swift IronSourcePrivacyApi protocol from the dart layer. +class IronSourcePrivacyApi { + /// Constructor for [IronSourcePrivacyApi]. The [binaryMessenger] named argument is + /// available for dependency injection. If it is left null, the default + /// BinaryMessenger will be used which routes to the host platform. + IronSourcePrivacyApi({BinaryMessenger? binaryMessenger}) + : __pigeon_binaryMessenger = binaryMessenger; + final BinaryMessenger? __pigeon_binaryMessenger; + + static const MessageCodec pigeonChannelCodec = + StandardMessageCodec(); + + Future setConsent(bool gdprConsent) async { + const String __pigeon_channelName = + 'dev.flutter.pigeon.gma_mediation_ironsource.IronSourcePrivacyApi.setConsent'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( + __pigeon_channelName, + pigeonChannelCodec, + binaryMessenger: __pigeon_binaryMessenger, + ); + final List? __pigeon_replyList = + await __pigeon_channel.send([gdprConsent]) as List?; + if (__pigeon_replyList == null) { + throw _createConnectionError(__pigeon_channelName); + } else if (__pigeon_replyList.length > 1) { + throw PlatformException( + code: __pigeon_replyList[0]! as String, + message: __pigeon_replyList[1] as String?, + details: __pigeon_replyList[2], + ); + } else { + return; + } + } + + Future setDoNotSell(bool doNotSell) async { + const String __pigeon_channelName = + 'dev.flutter.pigeon.gma_mediation_ironsource.IronSourcePrivacyApi.setDoNotSell'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( + __pigeon_channelName, + pigeonChannelCodec, + binaryMessenger: __pigeon_binaryMessenger, + ); + final List? __pigeon_replyList = + await __pigeon_channel.send([doNotSell]) as List?; + if (__pigeon_replyList == null) { + throw _createConnectionError(__pigeon_channelName); + } else if (__pigeon_replyList.length > 1) { + throw PlatformException( + code: __pigeon_replyList[0]! as String, + message: __pigeon_replyList[1] as String?, + details: __pigeon_replyList[2], + ); + } else { + return; + } + } +} diff --git a/packages/mediation/gma_mediation_ironsource/pigeons/ironsource_privacy_api.dart b/packages/mediation/gma_mediation_ironsource/pigeons/ironsource_privacy_api.dart new file mode 100644 index 000000000..3f85d6f2d --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/pigeons/ironsource_privacy_api.dart @@ -0,0 +1,42 @@ +// 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 +// +// https://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 'package:pigeon/pigeon.dart'; + +@ConfigurePigeon( + PigeonOptions( + dartOut: 'lib/ironsource_privacy_api.g.dart', + dartOptions: DartOptions(), + kotlinOut: + 'android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_ironsource/IronSourcePrivacyApi.g.kt', + kotlinOptions: KotlinOptions( + package: + 'io.flutter.plugins.googlemobileads.mediation.gma_mediation_ironsource', + errorClassName: 'IronSourcePrivacyError', + ), + swiftOut: 'ios/Classes/IronSourcePrivacyApi.g.swift', + swiftOptions: SwiftOptions(), + dartPackageName: 'gma_mediation_ironsource', + ), +) +@HostApi() + +/// The generated classes set the channels to call the methods in the corresponding kotlin IronSourcePrivacyApi interface and swift IronSourcePrivacyApi protocol from the dart layer. +abstract class IronSourcePrivacyApi { + // Used to configure GDPR consent on the Android or iOS ironSource SDK + void setConsent(bool gdprConsent); + + // Used to opt out of the sale of personal information on the Android or iOS ironSource SDK + void setDoNotSell(bool doNotSell); +} diff --git a/packages/mediation/gma_mediation_ironsource/pubspec.yaml b/packages/mediation/gma_mediation_ironsource/pubspec.yaml new file mode 100644 index 000000000..fd28ccd85 --- /dev/null +++ b/packages/mediation/gma_mediation_ironsource/pubspec.yaml @@ -0,0 +1,30 @@ +name: gma_mediation_ironsource +description: "Mediation Adapter that enables sending ad requests to the ironSource ad network using the google_mobile_ads plugin." +version: 2.2.0 +repository: https://github.com/googleads/googleads-mobile-flutter/tree/main/packages/mediation/gma_mediation_ironsource + +environment: + sdk: '>=3.9.0 <4.0.0' + flutter: '>=3.35.1' + +dependencies: + flutter: + sdk: flutter + google_mobile_ads: ^7.0.0 + plugin_platform_interface: ^2.0.2 + +dev_dependencies: + flutter_lints: ^6.0.0 + flutter_test: + sdk: flutter + lint: ^2.3.0 + pigeon: ^17.0.0 + +flutter: + plugin: + platforms: + android: + package: io.flutter.plugins.googlemobileads.mediation.gma_mediation_ironsource + pluginClass: GmaMediationIronsourcePlugin + ios: + pluginClass: GmaMediationIronsourcePlugin diff --git a/packages/mediation/gma_mediation_liftoffmonetize/.gitignore b/packages/mediation/gma_mediation_liftoffmonetize/.gitignore new file mode 100644 index 000000000..ac5aa9893 --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/.gitignore @@ -0,0 +1,29 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. +/pubspec.lock +**/doc/api/ +.dart_tool/ +build/ diff --git a/packages/mediation/gma_mediation_liftoffmonetize/.metadata b/packages/mediation/gma_mediation_liftoffmonetize/.metadata new file mode 100644 index 000000000..5a15fe0d0 --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/.metadata @@ -0,0 +1,33 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "41456452f29d64e8deb623a3c927524bcf9f111b" + channel: "stable" + +project_type: plugin + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: 41456452f29d64e8deb623a3c927524bcf9f111b + base_revision: 41456452f29d64e8deb623a3c927524bcf9f111b + - platform: android + create_revision: 41456452f29d64e8deb623a3c927524bcf9f111b + base_revision: 41456452f29d64e8deb623a3c927524bcf9f111b + - platform: ios + create_revision: 41456452f29d64e8deb623a3c927524bcf9f111b + base_revision: 41456452f29d64e8deb623a3c927524bcf9f111b + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/packages/mediation/gma_mediation_liftoffmonetize/CHANGELOG.md b/packages/mediation/gma_mediation_liftoffmonetize/CHANGELOG.md new file mode 100644 index 000000000..c2e14725a --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/CHANGELOG.md @@ -0,0 +1,57 @@ +## Liftoff Monetize Flutter Mediation Adapter Changelog + +#### Version 1.4.2 (In progress) +- Updated minimum Flutter version to 3.35.1 +- Updated to support Google Mobile Ads Flutter Plugin version 7.0.0 + +#### Version 1.4.1 +* Supports [Liftoff Monetize Android adapter version 7.6.1.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/liftoffmonetize/CHANGELOG.md#version-7610). +* Supports [Liftoff Monetize iOS adapter version 7.6.2.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/LiftoffMonetize/CHANGELOG.md#version-7620). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.4.0 +* Supports [Liftoff Monetize Android adapter version 7.6.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/liftoffmonetize/CHANGELOG.md#version-7600). +* Supports [Liftoff Monetize iOS adapter version 7.6.1.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/LiftoffMonetize/CHANGELOG.md#version-7610). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.3.0 +* Supports [Liftoff Monetize Android adapter version 7.5.1.1](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/liftoffmonetize/CHANGELOG.md#version-7511). +* Supports [Liftoff Monetize iOS adapter version 7.6.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/LiftoffMonetize/CHANGELOG.md#version-7600). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.2.3 +* Supports [Liftoff Monetize Android adapter version 7.5.1.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/liftoffmonetize/CHANGELOG.md#version-7510). +* Supports [Liftoff Monetize iOS adapter version 7.5.3.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/LiftoffMonetize/CHANGELOG.md#version-7530). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.2.2 +* Supports [Liftoff Monetize Android adapter version 7.5.0.1](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/liftoffmonetize/CHANGELOG.md#version-7501). +* Supports [Liftoff Monetize iOS adapter version 7.5.2.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/LiftoffMonetize/CHANGELOG.md#version-7520). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.2.1 +* Supports [Liftoff Monetize Android adapter version 7.5.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/liftoffmonetize/CHANGELOG.md#version-7500). +* Supports [Liftoff Monetize iOS adapter version 7.5.1.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/LiftoffMonetize/CHANGELOG.md#version-7510). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.2.0 +* Supports [Liftoff Monetize Android adapter version 7.5.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/liftoffmonetize/CHANGELOG.md#version-7500). +* Supports [Liftoff Monetize iOS adapter version 7.5.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/LiftoffMonetize/CHANGELOG.md#version-7500). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.1.1 +* Supports [Liftoff Monetize Android adapter version 7.4.3.1](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/liftoffmonetize/CHANGELOG.md#version-7431). +* Supports [Liftoff Monetize iOS adapter version 7.4.5.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/LiftoffMonetize/CHANGELOG.md#version-7450). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.1.0 +* iOS plugin is now a static framework. +* Supports [Liftoff Monetize Android adapter version 7.4.3.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/liftoffmonetize/CHANGELOG.md#version-7430). +* Supports [Liftoff Monetize iOS adapter version 7.4.4.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/LiftoffMonetize/CHANGELOG.md#version-7440). +* Built and tested with the Google Mobile Ads Flutter Plugin version 5.3.1. + +#### Version 1.0.0 +* Initial release. +* Supports [Liftoff Monetize Android adapter version 7.3.1.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/liftoffmonetize/CHANGELOG.md#version-7310). +* Supports [Liftoff Monetize iOS adapter version 7.3.2.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/LiftoffMonetize/CHANGELOG.md#version-7320). +* Built and tested with the Google Mobile Ads Flutter Plugin version 5.1.0. diff --git a/packages/mediation/gma_mediation_liftoffmonetize/LICENSE b/packages/mediation/gma_mediation_liftoffmonetize/LICENSE new file mode 100644 index 000000000..7a4a3ea24 --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/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. \ No newline at end of file diff --git a/packages/mediation/gma_mediation_liftoffmonetize/README.md b/packages/mediation/gma_mediation_liftoffmonetize/README.md new file mode 100644 index 000000000..59b8a885e --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/README.md @@ -0,0 +1,31 @@ +# Google Mobile Ads Mediation of Liftoff Monetize for Flutter + +[![gma_mediation_liftoffmonetize](https://github.com/googleads/googleads-mobile-flutter/actions/workflows/google_mobile_ads.yaml/badge.svg)](https://github.com/googleads/googleads-mobile-flutter/actions/workflows/google_mobile_ads.yaml) + +This repository contains the source code for the Mediation Liftoff Monetize +Flutter plugin to be used with the Google Mobile Ads plugin. It enables +mediation of the Liftoff Monetize Ad Network through the Google Mobile Ads SDK. + +## Documentation +For instructions on how to use with the google_mobile_ads plugin, refer to the +developer guide for [](https://developers.google.com/admob/flutter/mediation/liftoff-monetize). + +## Downloads + +See [pub.dev](https://pub.dev/packages/gma_mediation_liftoffmonetize/versions) for the +latest releases of the plugin. + +## Suggesting improvements + +To file bugs, make feature requests, or to suggest other improvements, please +use [github's issue tracker](https://github.com/googleads/googleads-mobile-flutter/issues). + + +## Other resources + +* [AdMob help center](https://support.google.com/admob/?hl=en#topic=7383088) +* [Ad Manager help center](https://support.google.com/admanager/?hl=en#topic=7505988) + +## License + +[Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0) \ No newline at end of file diff --git a/packages/mediation/gma_mediation_liftoffmonetize/analysis_options.yaml b/packages/mediation/gma_mediation_liftoffmonetize/analysis_options.yaml new file mode 100644 index 000000000..7ccbffbb3 --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/analysis_options.yaml @@ -0,0 +1,19 @@ +#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 +# +#https://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. + +include: package:lint/package.yaml + +analyzer: + exclude: + - '**.g.dart' diff --git a/packages/mediation/gma_mediation_liftoffmonetize/android/.gitignore b/packages/mediation/gma_mediation_liftoffmonetize/android/.gitignore new file mode 100644 index 000000000..161bdcdaf --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/android/.gitignore @@ -0,0 +1,9 @@ +*.iml +.gradle +/local.properties +/.idea/workspace.xml +/.idea/libraries +.DS_Store +/build +/captures +.cxx diff --git a/packages/mediation/gma_mediation_liftoffmonetize/android/build.gradle b/packages/mediation/gma_mediation_liftoffmonetize/android/build.gradle new file mode 100644 index 000000000..c197cdfc1 --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/android/build.gradle @@ -0,0 +1,83 @@ +group 'io.flutter.plugins.googlemobileads.mediation.gma_mediation_liftoffmonetize' +version = "1.4.2" + +buildscript { + ext.kotlin_version = '2.2.21' + repositories { + google() + mavenCentral() + } + + dependencies { + classpath 'com.android.tools.build:gradle:8.13.1' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + +allprojects { + repositories { + google() + mavenCentral() + } +} + +apply plugin: 'com.android.library' +apply plugin: 'kotlin-android' + +ext { + stringVersion = "7.6.2.0" +} + +android { + if (project.android.hasProperty("namespace")) { + namespace 'io.flutter.plugins.googlemobileads.mediation.gma_mediation_liftoffmonetize' + } + + compileSdkVersion 36 + + compileOptions { + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + test.java.srcDirs += 'src/test/kotlin' + } + + defaultConfig { + minSdkVersion 24 + } + + dependencies { + implementation "com.google.ads.mediation:vungle:$stringVersion" + testImplementation 'junit:junit:4.13.2' + testImplementation 'androidx.test:core:1.5.0' + testImplementation 'androidx.test:core-ktx:1.5.0' + testImplementation 'androidx.test.ext:junit:1.1.5' + testImplementation 'org.jetbrains.kotlin:kotlin-stdlib:1.8.20' + testImplementation 'org.mockito:mockito-core:5.5.0' + testImplementation 'org.mockito.kotlin:mockito-kotlin:5.1.0' + testImplementation 'org.robolectric:robolectric:4.16' + } + + testOptions { + unitTests.all { + useJUnit() + + testLogging { + events "passed", "skipped", "failed", "standardOut", "standardError" + outputs.upToDateWhen {false} + showStandardStreams = true + } + } + unitTests { + includeAndroidResources = true + unitTests.returnDefaultValues = true + } + } +} diff --git a/packages/mediation/gma_mediation_liftoffmonetize/android/gradle/wrapper/gradle-wrapper.properties b/packages/mediation/gma_mediation_liftoffmonetize/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 000000000..23449a2b5 --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,7 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip +networkTimeout=10000 +validateDistributionUrl=true +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/packages/mediation/gma_mediation_liftoffmonetize/android/settings.gradle b/packages/mediation/gma_mediation_liftoffmonetize/android/settings.gradle new file mode 100644 index 000000000..292dbf092 --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/android/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'gma_mediation_liftoffmonetize' diff --git a/packages/mediation/gma_mediation_liftoffmonetize/android/src/main/AndroidManifest.xml b/packages/mediation/gma_mediation_liftoffmonetize/android/src/main/AndroidManifest.xml new file mode 100644 index 000000000..acc7f40d6 --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/android/src/main/AndroidManifest.xml @@ -0,0 +1,3 @@ + + diff --git a/packages/mediation/gma_mediation_liftoffmonetize/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_liftoffmonetize/GmaMediationLiftoffmonetizePlugin.kt b/packages/mediation/gma_mediation_liftoffmonetize/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_liftoffmonetize/GmaMediationLiftoffmonetizePlugin.kt new file mode 100644 index 000000000..1fffe9d85 --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_liftoffmonetize/GmaMediationLiftoffmonetizePlugin.kt @@ -0,0 +1,23 @@ +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_liftoffmonetize + +import com.vungle.ads.VunglePrivacySettings +import io.flutter.embedding.engine.plugins.FlutterPlugin + +/** Manages LiftoffPrivacyApi and implements the needed methods. */ +class GmaMediationLiftoffmonetizePlugin: FlutterPlugin, LiftoffPrivacyApi { + override fun onAttachedToEngine(flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) { + LiftoffPrivacyApi.setUp(flutterPluginBinding.binaryMessenger, this) + } + + override fun onDetachedFromEngine(binding: FlutterPlugin.FlutterPluginBinding) { + LiftoffPrivacyApi.setUp(binding.binaryMessenger, null) + } + + override fun setGDPRStatus(optedIn: Boolean, consentMessageVersion: String?) { + VunglePrivacySettings.setGDPRStatus(optedIn, consentMessageVersion) + } + + override fun setCCPAStatus(optedIn: Boolean) { + VunglePrivacySettings.setCCPAStatus(optedIn) + } +} diff --git a/packages/mediation/gma_mediation_liftoffmonetize/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_liftoffmonetize/LiftoffPrivacyApi.g.kt b/packages/mediation/gma_mediation_liftoffmonetize/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_liftoffmonetize/LiftoffPrivacyApi.g.kt new file mode 100644 index 000000000..059e209ce --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_liftoffmonetize/LiftoffPrivacyApi.g.kt @@ -0,0 +1,105 @@ +// Autogenerated from Pigeon (v17.0.0), do not edit directly. +// See also: https://pub.dev/packages/pigeon + +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_liftoffmonetize + +import android.util.Log +import io.flutter.plugin.common.BasicMessageChannel +import io.flutter.plugin.common.BinaryMessenger +import io.flutter.plugin.common.MessageCodec +import io.flutter.plugin.common.StandardMessageCodec +import java.io.ByteArrayOutputStream +import java.nio.ByteBuffer + +private fun wrapResult(result: Any?): List { + return listOf(result) +} + +private fun wrapError(exception: Throwable): List { + if (exception is FlutterError) { + return listOf( + exception.code, + exception.message, + exception.details + ) + } else { + return listOf( + exception.javaClass.simpleName, + exception.toString(), + "Cause: " + exception.cause + ", Stacktrace: " + Log.getStackTraceString(exception) + ) + } +} + +/** + * Error class for passing custom error details to Flutter via a thrown PlatformException. + * @property code The error code. + * @property message The error message. + * @property details The error details. Must be a datatype supported by the api codec. + */ +class FlutterError ( + val code: String, + override val message: String? = null, + val details: Any? = null +) : Throwable() +/** + * The generated classes set the channels to call the methods in the corresponding kotlin LiftoffPrivacyApi interface and swift LiftoffPrivacyApi protocol from the dart layer. + * + * Generated interface from Pigeon that represents a handler of messages from Flutter. + */ +interface LiftoffPrivacyApi { + /** Used to configure GDPR status on the Android or iOS Liftoff Monetize SDK */ + fun setGDPRStatus(optedIn: Boolean, consentMessageVersion: String?) + /** Used to configure CCPA consent on the Android or iOS Liftoff Monetize SDK */ + fun setCCPAStatus(optedIn: Boolean) + + companion object { + /** The codec used by LiftoffPrivacyApi. */ + val codec: MessageCodec by lazy { + StandardMessageCodec() + } + /** Sets up an instance of `LiftoffPrivacyApi` to handle messages through the `binaryMessenger`. */ + @Suppress("UNCHECKED_CAST") + fun setUp(binaryMessenger: BinaryMessenger, api: LiftoffPrivacyApi?) { + run { + val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.gma_mediation_liftoffmonetize.LiftoffPrivacyApi.setGDPRStatus", codec) + if (api != null) { + channel.setMessageHandler { message, reply -> + val args = message as List + val optedInArg = args[0] as Boolean + val consentMessageVersionArg = args[1] as String? + var wrapped: List + try { + api.setGDPRStatus(optedInArg, consentMessageVersionArg) + wrapped = listOf(null) + } catch (exception: Throwable) { + wrapped = wrapError(exception) + } + reply.reply(wrapped) + } + } else { + channel.setMessageHandler(null) + } + } + run { + val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.gma_mediation_liftoffmonetize.LiftoffPrivacyApi.setCCPAStatus", codec) + if (api != null) { + channel.setMessageHandler { message, reply -> + val args = message as List + val optedInArg = args[0] as Boolean + var wrapped: List + try { + api.setCCPAStatus(optedInArg) + wrapped = listOf(null) + } catch (exception: Throwable) { + wrapped = wrapError(exception) + } + reply.reply(wrapped) + } + } else { + channel.setMessageHandler(null) + } + } + } + } +} diff --git a/packages/mediation/gma_mediation_liftoffmonetize/android/src/test/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_liftoffmonetize/GmaMediationLiftoffmonetizePluginTest.kt b/packages/mediation/gma_mediation_liftoffmonetize/android/src/test/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_liftoffmonetize/GmaMediationLiftoffmonetizePluginTest.kt new file mode 100644 index 000000000..6fa39a59b --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/android/src/test/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_liftoffmonetize/GmaMediationLiftoffmonetizePluginTest.kt @@ -0,0 +1,54 @@ +// 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 +// +// https://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. + +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_liftoffmonetize + +import androidx.test.ext.junit.runners.AndroidJUnit4 +import com.vungle.ads.VunglePrivacySettings +import org.junit.Test +import org.junit.runner.RunWith +import org.mockito.Mockito.mockStatic + +@RunWith(AndroidJUnit4::class) +internal class GmaMediationLiftoffmonetizePluginTest { + @Test + fun setGDPRStatus_withTruValue_invokesLiftoffSetGDPRStatus() { + val plugin = GmaMediationLiftoffmonetizePlugin() + mockStatic(VunglePrivacySettings::class.java).use { mockVunglePrivacySettings -> + + plugin.setGDPRStatus(optedIn= true, consentMessageVersion= TEST_CONSENT_STRING) + + mockVunglePrivacySettings.verify { + VunglePrivacySettings.setGDPRStatus(true, TEST_CONSENT_STRING) + } + } + } + + @Test + fun setCCPAStatus_withTruValue_invokesLiftoffSetCCPAStatus() { + val plugin = GmaMediationLiftoffmonetizePlugin() + mockStatic(VunglePrivacySettings::class.java).use { mockVunglePrivacySettings -> + + plugin.setCCPAStatus(optedIn= true) + + mockVunglePrivacySettings.verify { + VunglePrivacySettings.setCCPAStatus(true) + } + } + } + + companion object { + private const val TEST_CONSENT_STRING = "testConsentString" + } +} diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/.gitignore b/packages/mediation/gma_mediation_liftoffmonetize/example/.gitignore new file mode 100644 index 000000000..29a3a5017 --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/example/.gitignore @@ -0,0 +1,43 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.pub-cache/ +.pub/ +/build/ + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/README.md b/packages/mediation/gma_mediation_liftoffmonetize/example/README.md new file mode 100644 index 000000000..49ebf5d83 --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/example/README.md @@ -0,0 +1,17 @@ +# gma_mediation_liftoffmonetize_example + +Learn how to integrate with your app that uses the [google_mobile_ads](https://pub.dev/packages/google_mobile_ads) plugin +by following the [development guide](https://developers.google.com/admob/flutter/mediation/liftoff-monetize). + +## Getting Started + +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) + +For help getting started with Flutter development, view the +[online documentation](https://docs.flutter.dev/), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/analysis_options.yaml b/packages/mediation/gma_mediation_liftoffmonetize/example/analysis_options.yaml new file mode 100644 index 000000000..0d2902135 --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/example/analysis_options.yaml @@ -0,0 +1,28 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at https://dart.dev/lints. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/android/.gitignore b/packages/mediation/gma_mediation_liftoffmonetize/example/android/.gitignore new file mode 100644 index 000000000..6f568019d --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/example/android/.gitignore @@ -0,0 +1,13 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +key.properties +**/*.keystore +**/*.jks diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/android/app/build.gradle b/packages/mediation/gma_mediation_liftoffmonetize/example/android/app/build.gradle new file mode 100644 index 000000000..236cc3b3c --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/example/android/app/build.gradle @@ -0,0 +1,67 @@ +plugins { + id "com.android.application" + id "kotlin-android" + id "dev.flutter.flutter-gradle-plugin" +} + +def localProperties = new Properties() +def localPropertiesFile = rootProject.file('local.properties') +if (localPropertiesFile.exists()) { + localPropertiesFile.withReader('UTF-8') { reader -> + localProperties.load(reader) + } +} + +def flutterVersionCode = localProperties.getProperty('flutter.versionCode') +if (flutterVersionCode == null) { + flutterVersionCode = '1' +} + +def flutterVersionName = localProperties.getProperty('flutter.versionName') +if (flutterVersionName == null) { + flutterVersionName = '1.0' +} + +android { + namespace "io.flutter.plugins.googlemobileads.mediation.gma_mediation_liftoffmonetize_example" + compileSdkVersion flutter.compileSdkVersion + ndkVersion flutter.ndkVersion + + compileOptions { + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId "io.flutter.plugins.googlemobileads.mediation.gma_mediation_liftoffmonetize_example" + // You can update the following values to match your application needs. + // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. + minSdkVersion 23 + targetSdkVersion flutter.targetSdkVersion + versionCode flutterVersionCode.toInteger() + versionName flutterVersionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig signingConfigs.debug + } + } +} + +flutter { + source '../..' +} + +dependencies {} diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/android/app/src/debug/AndroidManifest.xml b/packages/mediation/gma_mediation_liftoffmonetize/example/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 000000000..399f6981d --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/example/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/android/app/src/main/AndroidManifest.xml b/packages/mediation/gma_mediation_liftoffmonetize/example/android/app/src/main/AndroidManifest.xml new file mode 100644 index 000000000..b3bdccc21 --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/example/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_liftoffmonetize_example/MainActivity.kt b/packages/mediation/gma_mediation_liftoffmonetize/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_liftoffmonetize_example/MainActivity.kt new file mode 100644 index 000000000..ed84e1b1a --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_liftoffmonetize_example/MainActivity.kt @@ -0,0 +1,6 @@ +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_liftoffmonetize_example + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() { +} diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/android/app/src/main/res/drawable-v21/launch_background.xml b/packages/mediation/gma_mediation_liftoffmonetize/example/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 000000000..f74085f3f --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/example/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/android/app/src/main/res/drawable/launch_background.xml b/packages/mediation/gma_mediation_liftoffmonetize/example/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 000000000..304732f88 --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/example/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/mediation/gma_mediation_liftoffmonetize/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..db77bb4b7 Binary files /dev/null and b/packages/mediation/gma_mediation_liftoffmonetize/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/mediation/gma_mediation_liftoffmonetize/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..17987b79b Binary files /dev/null and b/packages/mediation/gma_mediation_liftoffmonetize/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/mediation/gma_mediation_liftoffmonetize/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..09d439148 Binary files /dev/null and b/packages/mediation/gma_mediation_liftoffmonetize/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/mediation/gma_mediation_liftoffmonetize/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..d5f1c8d34 Binary files /dev/null and b/packages/mediation/gma_mediation_liftoffmonetize/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/packages/mediation/gma_mediation_liftoffmonetize/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..4d6372eeb Binary files /dev/null and b/packages/mediation/gma_mediation_liftoffmonetize/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/android/app/src/main/res/values-night/styles.xml b/packages/mediation/gma_mediation_liftoffmonetize/example/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 000000000..06952be74 --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/example/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/android/app/src/main/res/values/styles.xml b/packages/mediation/gma_mediation_liftoffmonetize/example/android/app/src/main/res/values/styles.xml new file mode 100644 index 000000000..cb1ef8805 --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/example/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/android/app/src/profile/AndroidManifest.xml b/packages/mediation/gma_mediation_liftoffmonetize/example/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 000000000..399f6981d --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/example/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/samples/admob/rewarded_example/android/build.gradle b/packages/mediation/gma_mediation_liftoffmonetize/example/android/build.gradle similarity index 80% rename from samples/admob/rewarded_example/android/build.gradle rename to packages/mediation/gma_mediation_liftoffmonetize/example/android/build.gradle index 83ae22004..7bdfd2321 100644 --- a/samples/admob/rewarded_example/android/build.gradle +++ b/packages/mediation/gma_mediation_liftoffmonetize/example/android/build.gradle @@ -1,12 +1,11 @@ buildscript { - ext.kotlin_version = '1.6.10' + ext.kotlin_version = '2.2.21' repositories { google() mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:7.1.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } @@ -26,6 +25,6 @@ subprojects { project.evaluationDependsOn(':app') } -task clean(type: Delete) { +tasks.register("clean", Delete) { delete rootProject.buildDir } diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/android/gradle.properties b/packages/mediation/gma_mediation_liftoffmonetize/example/android/gradle.properties new file mode 100644 index 000000000..598d13fee --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/example/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx4G +android.useAndroidX=true +android.enableJetifier=true diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/mediation/gma_mediation_liftoffmonetize/example/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 000000000..f004c34c0 --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/example/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/android/settings.gradle b/packages/mediation/gma_mediation_liftoffmonetize/example/android/settings.gradle new file mode 100644 index 000000000..ca273881f --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/example/android/settings.gradle @@ -0,0 +1,30 @@ +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + } + settings.ext.flutterSdkPath = flutterSdkPath() + + includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") + + repositories { + google() + mavenCentral() + gradlePluginPortal() + } + + plugins { + id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false + } +} + +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "8.13.1" apply false + id 'org.jetbrains.kotlin.android' version '2.2.21' apply false +} + +include ":app" diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/ios/.gitignore b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/.gitignore new file mode 100644 index 000000000..7a7f9873a --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/.gitignore @@ -0,0 +1,34 @@ +**/dgph +*.mode1v3 +*.mode2v3 +*.moved-aside +*.pbxuser +*.perspectivev3 +**/*sync/ +.sconsign.dblite +.tags* +**/.vagrant/ +**/DerivedData/ +Icon? +**/Pods/ +**/.symlinks/ +profile +xcuserdata +**/.generated/ +Flutter/App.framework +Flutter/Flutter.framework +Flutter/Flutter.podspec +Flutter/Generated.xcconfig +Flutter/ephemeral/ +Flutter/app.flx +Flutter/app.zip +Flutter/flutter_assets/ +Flutter/flutter_export_environment.sh +ServiceDefinitions.json +Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!default.mode1v3 +!default.mode2v3 +!default.pbxuser +!default.perspectivev3 diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Flutter/AppFrameworkInfo.plist b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 000000000..7c5696400 --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 12.0 + + diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Flutter/Debug.xcconfig b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Flutter/Debug.xcconfig new file mode 100644 index 000000000..ec97fc6f3 --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Flutter/Debug.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" +#include "Generated.xcconfig" diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Flutter/Release.xcconfig b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Flutter/Release.xcconfig new file mode 100644 index 000000000..c4855bfe2 --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Flutter/Release.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" +#include "Generated.xcconfig" diff --git a/samples/admob/app_open_example/ios/Podfile b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Podfile similarity index 94% rename from samples/admob/app_open_example/ios/Podfile rename to packages/mediation/gma_mediation_liftoffmonetize/example/ios/Podfile index 88359b225..6a8ce2dd1 100644 --- a/samples/admob/app_open_example/ios/Podfile +++ b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -# platform :ios, '11.0' +platform :ios, '13.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' @@ -28,10 +28,12 @@ require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelpe flutter_ios_podfile_setup target 'Runner' do - use_frameworks! use_modular_headers! flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) + target 'RunnerTests' do + inherit! :search_paths + end end post_install do |installer| diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner.xcodeproj/project.pbxproj b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 000000000..b58ce918e --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,635 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 331C808B294A63AB00263BE5 /* GmaMediationLiftoffmonetizePluginTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* GmaMediationLiftoffmonetizePluginTests.swift */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 97C146E61CF9000F007C117D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 97C146ED1CF9000F007C117D; + remoteInfo = Runner; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 331C807B294A618700263BE5 /* GmaMediationLiftoffmonetizePluginTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GmaMediationLiftoffmonetizePluginTests.swift; sourceTree = ""; }; + 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 44BF27D82BA395A500DCC780 /* LiftoffMonetizeAdapter.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = LiftoffMonetizeAdapter.xcframework; path = "Pods/GoogleMobileAdsMediationVungle/LiftoffMonetizeAdapter-7.2.2.1/LiftoffMonetizeAdapter.xcframework"; sourceTree = ""; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + EB5C0E7342D59ED601DDEAC3 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 1323259DB5C5C8CDE677D749 /* Pods */ = { + isa = PBXGroup; + children = ( + ); + path = Pods; + sourceTree = ""; + }; + 331C8082294A63A400263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C807B294A618700263BE5 /* GmaMediationLiftoffmonetizePluginTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 562F18C8BAA18BEFC40C5F7C /* Frameworks */ = { + isa = PBXGroup; + children = ( + 44BF27D82BA395A500DCC780 /* LiftoffMonetizeAdapter.xcframework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + 331C8082294A63A400263BE5 /* RunnerTests */, + 1323259DB5C5C8CDE677D749 /* Pods */, + 562F18C8BAA18BEFC40C5F7C /* Frameworks */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + 331C8081294A63A400263BE5 /* RunnerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C8080294A63A400263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 331C807D294A63A400263BE5 /* Sources */, + 331C807F294A63A400263BE5 /* Resources */, + EB5C0E7342D59ED601DDEAC3 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 331C8086294A63A400263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1510; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 331C8080294A63A400263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 97C146ED1CF9000F007C117D; + }; + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + 331C8080294A63A400263BE5 /* RunnerTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 331C807F294A63A400263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 331C807D294A63A400263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C808B294A63AB00263BE5 /* GmaMediationLiftoffmonetizePluginTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 331C8086294A63A400263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 97C146ED1CF9000F007C117D /* Runner */; + targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationLiftoffmonetizeExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 331C8088294A63A400263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationLiftoffmonetizeExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Debug; + }; + 331C8089294A63A400263BE5 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationLiftoffmonetizeExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Release; + }; + 331C808A294A63A400263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationLiftoffmonetizeExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationLiftoffmonetizeExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationLiftoffmonetizeExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C8088294A63A400263BE5 /* Debug */, + 331C8089294A63A400263BE5 /* Release */, + 331C808A294A63A400263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..919434a62 --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..21a3cc14c --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/AppDelegate.swift b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/AppDelegate.swift new file mode 100644 index 000000000..70693e4a8 --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import UIKit +import Flutter + +@UIApplicationMain +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..d36b1fab2 --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 000000000..dc9ada472 Binary files /dev/null and b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 000000000..7353c41ec Binary files /dev/null and b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 000000000..797d452e4 Binary files /dev/null and b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 000000000..6ed2d933e Binary files /dev/null and b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 000000000..4cd7b0099 Binary files /dev/null and b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 000000000..fe730945a Binary files /dev/null and b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 000000000..321773cd8 Binary files /dev/null and b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 000000000..797d452e4 Binary files /dev/null and b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 000000000..502f463a9 Binary files /dev/null and b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 000000000..0ec303439 Binary files /dev/null and b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 000000000..0ec303439 Binary files /dev/null and b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 000000000..e9f5fea27 Binary files /dev/null and b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 000000000..84ac32ae7 Binary files /dev/null and b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 000000000..8953cba09 Binary files /dev/null and b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 000000000..0467bf12a Binary files /dev/null and b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 000000000..0bedcf2fd --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchImage.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 000000000..89c2725b7 --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 000000000..f2e259c7c --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Base.lproj/Main.storyboard b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 000000000..f3c28516f --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Info.plist b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Info.plist new file mode 100644 index 000000000..a19a70993 --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Info.plist @@ -0,0 +1,58 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Gma Mediation Liftoffmonetize + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + gma_mediation_liftoffmonetize_example + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + CADisableMinimumFrameDurationOnPhone + + UIApplicationSupportsIndirectInputEvents + + GADApplicationIdentifier + ca-app-pub-3940256099942544~1458002511 + SKAdNetworkItems + + + SKAdNetworkIdentifier + cstr6suwn9.skadnetwork + + + + diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Runner-Bridging-Header.h b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 000000000..308a2a560 --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/ios/RunnerTests/GmaMediationLiftoffmonetizePluginTests.swift b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/RunnerTests/GmaMediationLiftoffmonetizePluginTests.swift new file mode 100644 index 000000000..91635c977 --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/example/ios/RunnerTests/GmaMediationLiftoffmonetizePluginTests.swift @@ -0,0 +1,55 @@ +// 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 +// +// https://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 UIKit +import XCTest + +@testable import gma_mediation_liftoffmonetize + +class GmaMediationLiftoffmonetizePluginTests: XCTestCase { + func testSetGDPRStatus() { + let liftoffPrivacyFake = LiftoffPrivacyFake() + + GmaMediationLiftoffmonetizePlugin(liftoffPrivacy: liftoffPrivacyFake).setGDPRStatus(optedIn: true, consentMessageVersion: "testConsentVersion") + + XCTAssertEqual(liftoffPrivacyFake.gdprOptedIn, true) + XCTAssertEqual(liftoffPrivacyFake.gdprMessageVersion, "testConsentVersion") + } + + func testSetCCPAStatus() { + let liftoffPrivacyFake = LiftoffPrivacyFake() + + GmaMediationLiftoffmonetizePlugin(liftoffPrivacy: liftoffPrivacyFake).setCCPAStatus(optedIn: true) + + XCTAssertEqual(liftoffPrivacyFake.ccpaOptedIn, true) + } +} + +class LiftoffPrivacyFake : LiftoffPrivacyProtocol { + var gdprOptedIn: Bool = false + var gdprMessageVersion: String? = "" + var ccpaOptedIn: Bool = false + + func setGDPRStatus(optedIn: Bool) { + self.gdprOptedIn = optedIn + } + + func setGDPRMessageVersion(consentMessageVersion: String?) { + self.gdprMessageVersion = consentMessageVersion + } + + func setCCPAStatus(optedIn: Bool) { + self.ccpaOptedIn = optedIn + } +} diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/lib/main.dart b/packages/mediation/gma_mediation_liftoffmonetize/example/lib/main.dart new file mode 100644 index 000000000..665bfe31b --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/example/lib/main.dart @@ -0,0 +1,33 @@ +import 'package:flutter/material.dart'; + +void main() { + runApp(const MyApp()); +} + +class MyApp extends StatefulWidget { + const MyApp({super.key}); + + @override + State createState() => _MyAppState(); +} + +class _MyAppState extends State { + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Scaffold( + appBar: AppBar( + title: const Text('Plugin example app'), + ), + body: const Center( + child: Text('Test app'), + ), + ), + ); + } +} diff --git a/packages/mediation/gma_mediation_liftoffmonetize/example/pubspec.yaml b/packages/mediation/gma_mediation_liftoffmonetize/example/pubspec.yaml new file mode 100644 index 000000000..5124354c4 --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/example/pubspec.yaml @@ -0,0 +1,86 @@ +name: gma_mediation_liftoffmonetize_example +description: "Demonstrates how to use the gma_mediation_liftoffmonetize plugin." +# The following line prevents the package from being accidentally published to +# pub.dev using `flutter pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +environment: + sdk: '>=3.9.0 <4.0.0' + +# Dependencies specify other packages that your package needs in order to work. +# To automatically upgrade your package dependencies to the latest versions +# consider running `flutter pub upgrade --major-versions`. Alternatively, +# dependencies can be manually updated by changing the version numbers below to +# the latest version available on pub.dev. To see which dependencies have newer +# versions available, run `flutter pub outdated`. +dependencies: + flutter: + sdk: flutter + + google_mobile_ads: ^7.0.0 + gma_mediation_liftoffmonetize: + # When depending on this package from a real application you should use: + # gma_mediation_liftoffmonetize: ^x.y.z + # See https://dart.dev/tools/pub/dependencies#version-constraints + # The example app is bundled with the plugin so we use a path dependency on + # the parent directory to use the current plugin's version. + path: ../ + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^1.0.2 + +dev_dependencies: + integration_test: + sdk: flutter + flutter_test: + sdk: flutter + + # The "flutter_lints" package below contains a set of recommended lints to + # encourage good coding practices. The lint set provided by the package is + # activated in the `analysis_options.yaml` file located at the root of your + # package. See that file for information about deactivating specific lint + # rules and activating additional ones. + flutter_lints: ^6.0.0 + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter packages. +flutter: + + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + + # To add assets to your application, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/assets-and-images/#resolution-aware + + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/assets-and-images/#from-packages + + # To add custom fonts to your application, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts from package dependencies, + # see https://flutter.dev/custom-fonts/#from-packages diff --git a/packages/mediation/gma_mediation_liftoffmonetize/ios/.gitignore b/packages/mediation/gma_mediation_liftoffmonetize/ios/.gitignore new file mode 100644 index 000000000..0c885071e --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/ios/.gitignore @@ -0,0 +1,38 @@ +.idea/ +.vagrant/ +.sconsign.dblite +.svn/ + +.DS_Store +*.swp +profile + +DerivedData/ +build/ +GeneratedPluginRegistrant.h +GeneratedPluginRegistrant.m + +.generated/ + +*.pbxuser +*.mode1v3 +*.mode2v3 +*.perspectivev3 + +!default.pbxuser +!default.mode1v3 +!default.mode2v3 +!default.perspectivev3 + +xcuserdata + +*.moved-aside + +*.pyc +*sync/ +Icon? +.tags* + +/Flutter/Generated.xcconfig +/Flutter/ephemeral/ +/Flutter/flutter_export_environment.sh \ No newline at end of file diff --git a/packages/mediation/gma_mediation_liftoffmonetize/ios/Assets/.gitkeep b/packages/mediation/gma_mediation_liftoffmonetize/ios/Assets/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/packages/mediation/gma_mediation_liftoffmonetize/ios/Classes/GmaMediationLiftoffmonetizePlugin.swift b/packages/mediation/gma_mediation_liftoffmonetize/ios/Classes/GmaMediationLiftoffmonetizePlugin.swift new file mode 100644 index 000000000..68b783388 --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/ios/Classes/GmaMediationLiftoffmonetizePlugin.swift @@ -0,0 +1,68 @@ +// 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 +// +// https://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 Flutter +import UIKit +import VungleAdsSDK + +/// Manages LiftoffPrivacyApi and implements the needed methods. +public class GmaMediationLiftoffmonetizePlugin: NSObject, FlutterPlugin, LiftoffPrivacyApi { + let liftoffPrivacy: LiftoffPrivacyProtocol + + init (liftoffPrivacy: LiftoffPrivacyProtocol) { + self.liftoffPrivacy = liftoffPrivacy + } + + public static func register(with registrar: FlutterPluginRegistrar) { + let messenger : FlutterBinaryMessenger = registrar.messenger() + let api : LiftoffPrivacyApi& NSObjectProtocol = GmaMediationLiftoffmonetizePlugin.init(liftoffPrivacy: LiftoffPrivacyImpl()) + LiftoffPrivacyApiSetup.setUp(binaryMessenger: messenger, api: api) + } + + public func detachFromEngine(for registrar: FlutterPluginRegistrar) { + let messenger : FlutterBinaryMessenger = registrar.messenger() + LiftoffPrivacyApiSetup.setUp(binaryMessenger: messenger, api: nil) + } + + func setGDPRStatus(optedIn: Bool, consentMessageVersion: String?) { + liftoffPrivacy.setGDPRStatus(optedIn: optedIn) + liftoffPrivacy.setGDPRMessageVersion(consentMessageVersion: consentMessageVersion) + } + + func setCCPAStatus(optedIn: Bool) { + liftoffPrivacy.setCCPAStatus(optedIn: optedIn) + } +} + +protocol LiftoffPrivacyProtocol { + func setGDPRStatus(optedIn: Bool) + + func setGDPRMessageVersion(consentMessageVersion: String?) + + func setCCPAStatus(optedIn: Bool) +} + +class LiftoffPrivacyImpl : LiftoffPrivacyProtocol { + func setGDPRStatus(optedIn: Bool) { + VunglePrivacySettings.setGDPRStatus(optedIn) + } + + func setGDPRMessageVersion(consentMessageVersion: String?) { + VunglePrivacySettings.setGDPRMessageVersion(consentMessageVersion ?? "") + } + + func setCCPAStatus(optedIn: Bool) { + VunglePrivacySettings.setCCPAStatus(optedIn) + } +} diff --git a/packages/mediation/gma_mediation_liftoffmonetize/ios/Classes/LiftoffPrivacyApi.g.swift b/packages/mediation/gma_mediation_liftoffmonetize/ios/Classes/LiftoffPrivacyApi.g.swift new file mode 100644 index 000000000..9c84145d3 --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/ios/Classes/LiftoffPrivacyApi.g.swift @@ -0,0 +1,90 @@ +// Autogenerated from Pigeon (v17.0.0), do not edit directly. +// See also: https://pub.dev/packages/pigeon + +import Foundation + +#if os(iOS) + import Flutter +#elseif os(macOS) + import FlutterMacOS +#else + #error("Unsupported platform.") +#endif + +private func wrapResult(_ result: Any?) -> [Any?] { + return [result] +} + +private func wrapError(_ error: Any) -> [Any?] { + if let flutterError = error as? FlutterError { + return [ + flutterError.code, + flutterError.message, + flutterError.details, + ] + } + return [ + "\(error)", + "\(type(of: error))", + "Stacktrace: \(Thread.callStackSymbols)", + ] +} + +private func isNullish(_ value: Any?) -> Bool { + return value is NSNull || value == nil +} + +private func nilOrValue(_ value: Any?) -> T? { + if value is NSNull { return nil } + return value as! T? +} +/// The generated classes set the channels to call the methods in the corresponding kotlin LiftoffPrivacyApi interface and swift LiftoffPrivacyApi protocol from the dart layer. +/// +/// Generated protocol from Pigeon that represents a handler of messages from Flutter. +protocol LiftoffPrivacyApi { + /// Used to configure GDPR status on the Android or iOS Liftoff Monetize SDK + func setGDPRStatus(optedIn: Bool, consentMessageVersion: String?) throws + /// Used to configure CCPA consent on the Android or iOS Liftoff Monetize SDK + func setCCPAStatus(optedIn: Bool) throws +} + +/// Generated setup class from Pigeon to handle messages through the `binaryMessenger`. +class LiftoffPrivacyApiSetup { + /// The codec used by LiftoffPrivacyApi. + /// Sets up an instance of `LiftoffPrivacyApi` to handle messages through the `binaryMessenger`. + static func setUp(binaryMessenger: FlutterBinaryMessenger, api: LiftoffPrivacyApi?) { + /// Used to configure GDPR status on the Android or iOS Liftoff Monetize SDK + let setGDPRStatusChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.gma_mediation_liftoffmonetize.LiftoffPrivacyApi.setGDPRStatus", binaryMessenger: binaryMessenger) + if let api = api { + setGDPRStatusChannel.setMessageHandler { message, reply in + let args = message as! [Any?] + let optedInArg = args[0] as! Bool + let consentMessageVersionArg: String? = nilOrValue(args[1]) + do { + try api.setGDPRStatus(optedIn: optedInArg, consentMessageVersion: consentMessageVersionArg) + reply(wrapResult(nil)) + } catch { + reply(wrapError(error)) + } + } + } else { + setGDPRStatusChannel.setMessageHandler(nil) + } + /// Used to configure CCPA consent on the Android or iOS Liftoff Monetize SDK + let setCCPAStatusChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.gma_mediation_liftoffmonetize.LiftoffPrivacyApi.setCCPAStatus", binaryMessenger: binaryMessenger) + if let api = api { + setCCPAStatusChannel.setMessageHandler { message, reply in + let args = message as! [Any?] + let optedInArg = args[0] as! Bool + do { + try api.setCCPAStatus(optedIn: optedInArg) + reply(wrapResult(nil)) + } catch { + reply(wrapError(error)) + } + } + } else { + setCCPAStatusChannel.setMessageHandler(nil) + } + } +} diff --git a/packages/mediation/gma_mediation_liftoffmonetize/ios/gma_mediation_liftoffmonetize.podspec b/packages/mediation/gma_mediation_liftoffmonetize/ios/gma_mediation_liftoffmonetize.podspec new file mode 100644 index 000000000..792c3cfa9 --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/ios/gma_mediation_liftoffmonetize.podspec @@ -0,0 +1,26 @@ +# +# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. +# Run `pod lib lint gma_mediation_liftoffmonetize.podspec` to validate before publishing. +# +Pod::Spec.new do |s| + s.name = 'gma_mediation_liftoffmonetize' + s.version = '1.4.2' + s.summary = 'Google Mobile Ads Mediation of Liftoff Monetize.' + s.description = <<-DESC +Mediation Adapter for Liftoff Monetize to use with Google Mobile Ads. + DESC + s.homepage = 'https://developers.google.com/admob/flutter/mediation/liftoff-monetize' + s.license = { :file => '../LICENSE' } + s.author = { 'Google LLC' => 'mediation-support@google.com' } + s.source = { :path => '.' } + s.source_files = 'Classes/**/*' + s.public_header_files = 'Public/**/*.h' + s.dependency 'GoogleMobileAdsMediationVungle', '~>7.6.3.0' + s.dependency 'Flutter' + s.platform = :ios, '13.0' + s.static_framework = true + + # Flutter.framework does not contain a i386 slice. + s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' } + s.swift_version = '5.0' +end diff --git a/packages/mediation/gma_mediation_liftoffmonetize/lib/gma_mediation_liftoffmonetize.dart b/packages/mediation/gma_mediation_liftoffmonetize/lib/gma_mediation_liftoffmonetize.dart new file mode 100644 index 000000000..0988861b1 --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/lib/gma_mediation_liftoffmonetize.dart @@ -0,0 +1,29 @@ +// 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 +// +// https://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 'package:gma_mediation_liftoffmonetize/liftoff_privacy_api.g.dart'; + +/// This class has entrypoint to call Liftoff Monetize's SDK APIs. +class GmaMediationLiftoffmonetize { + Future setGDPRStatus( + bool optedIn, + String? consentMessageVersion, + ) async { + await LiftoffPrivacyApi().setGDPRStatus(optedIn, consentMessageVersion); + } + + Future setCCPAStatus(bool optedIn) async { + await LiftoffPrivacyApi().setCCPAStatus(optedIn); + } +} diff --git a/packages/mediation/gma_mediation_liftoffmonetize/lib/liftoff_privacy_api.g.dart b/packages/mediation/gma_mediation_liftoffmonetize/lib/liftoff_privacy_api.g.dart new file mode 100644 index 000000000..6803cb6eb --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/lib/liftoff_privacy_api.g.dart @@ -0,0 +1,80 @@ +// Autogenerated from Pigeon (v17.0.0), do not edit directly. +// See also: https://pub.dev/packages/pigeon +// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers + +import 'dart:async'; +import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; + +import 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer; +import 'package:flutter/services.dart'; + +PlatformException _createConnectionError(String channelName) { + return PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel: "$channelName".', + ); +} + +/// The generated classes set the channels to call the methods in the corresponding kotlin LiftoffPrivacyApi interface and swift LiftoffPrivacyApi protocol from the dart layer. +class LiftoffPrivacyApi { + /// Constructor for [LiftoffPrivacyApi]. The [binaryMessenger] named argument is + /// available for dependency injection. If it is left null, the default + /// BinaryMessenger will be used which routes to the host platform. + LiftoffPrivacyApi({BinaryMessenger? binaryMessenger}) + : __pigeon_binaryMessenger = binaryMessenger; + final BinaryMessenger? __pigeon_binaryMessenger; + + static const MessageCodec pigeonChannelCodec = + StandardMessageCodec(); + + /// Used to configure GDPR status on the Android or iOS Liftoff Monetize SDK + Future setGDPRStatus( + bool optedIn, String? consentMessageVersion) async { + const String __pigeon_channelName = + 'dev.flutter.pigeon.gma_mediation_liftoffmonetize.LiftoffPrivacyApi.setGDPRStatus'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( + __pigeon_channelName, + pigeonChannelCodec, + binaryMessenger: __pigeon_binaryMessenger, + ); + final List? __pigeon_replyList = await __pigeon_channel + .send([optedIn, consentMessageVersion]) as List?; + if (__pigeon_replyList == null) { + throw _createConnectionError(__pigeon_channelName); + } else if (__pigeon_replyList.length > 1) { + throw PlatformException( + code: __pigeon_replyList[0]! as String, + message: __pigeon_replyList[1] as String?, + details: __pigeon_replyList[2], + ); + } else { + return; + } + } + + /// Used to configure CCPA consent on the Android or iOS Liftoff Monetize SDK + Future setCCPAStatus(bool optedIn) async { + const String __pigeon_channelName = + 'dev.flutter.pigeon.gma_mediation_liftoffmonetize.LiftoffPrivacyApi.setCCPAStatus'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( + __pigeon_channelName, + pigeonChannelCodec, + binaryMessenger: __pigeon_binaryMessenger, + ); + final List? __pigeon_replyList = + await __pigeon_channel.send([optedIn]) as List?; + if (__pigeon_replyList == null) { + throw _createConnectionError(__pigeon_channelName); + } else if (__pigeon_replyList.length > 1) { + throw PlatformException( + code: __pigeon_replyList[0]! as String, + message: __pigeon_replyList[1] as String?, + details: __pigeon_replyList[2], + ); + } else { + return; + } + } +} diff --git a/packages/mediation/gma_mediation_liftoffmonetize/pigeons/liftoff_privacy_api.dart b/packages/mediation/gma_mediation_liftoffmonetize/pigeons/liftoff_privacy_api.dart new file mode 100644 index 000000000..5e69401fa --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/pigeons/liftoff_privacy_api.dart @@ -0,0 +1,41 @@ +// 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 +// +// https://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 'package:pigeon/pigeon.dart'; + +@ConfigurePigeon( + PigeonOptions( + dartOut: 'lib/liftoff_privacy_api.g.dart', + dartOptions: DartOptions(), + kotlinOut: + 'android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_liftoffmonetize/LiftoffPrivacyApi.g.kt', + kotlinOptions: KotlinOptions( + package: + 'io.flutter.plugins.googlemobileads.mediation.gma_mediation_liftoffmonetize', + ), + swiftOut: 'ios/Classes/LiftoffPrivacyApi.g.swift', + swiftOptions: SwiftOptions(), + dartPackageName: 'gma_mediation_liftoffmonetize', + ), +) +@HostApi() + +/// The generated classes set the channels to call the methods in the corresponding kotlin LiftoffPrivacyApi interface and swift LiftoffPrivacyApi protocol from the dart layer. +abstract class LiftoffPrivacyApi { + /// Used to configure GDPR status on the Android or iOS Liftoff Monetize SDK + void setGDPRStatus(bool optedIn, String? consentMessageVersion); + + /// Used to configure CCPA consent on the Android or iOS Liftoff Monetize SDK + void setCCPAStatus(bool optedIn); +} diff --git a/packages/mediation/gma_mediation_liftoffmonetize/pubspec.yaml b/packages/mediation/gma_mediation_liftoffmonetize/pubspec.yaml new file mode 100644 index 000000000..38359b429 --- /dev/null +++ b/packages/mediation/gma_mediation_liftoffmonetize/pubspec.yaml @@ -0,0 +1,30 @@ +name: gma_mediation_liftoffmonetize +description: "Mediation Adapter that enables sending ad requests to the LiftoffMonetize ad network using the google_mobile_ads plugin." +version: 1.4.2 +repository: https://github.com/googleads/googleads-mobile-flutter/tree/main/packages/mediation/gma_mediation_liftoffmonetize + +environment: + sdk: '>=3.9.0 <4.0.0' + flutter: '>=3.35.1' + +dependencies: + flutter: + sdk: flutter + google_mobile_ads: ^7.0.0 + plugin_platform_interface: ^2.0.2 + +dev_dependencies: + flutter_lints: ^6.0.0 + flutter_test: + sdk: flutter + lint: ^2.3.0 + pigeon: ^17.0.0 + +flutter: + plugin: + platforms: + android: + package: io.flutter.plugins.googlemobileads.mediation.gma_mediation_liftoffmonetize + pluginClass: GmaMediationLiftoffmonetizePlugin + ios: + pluginClass: GmaMediationLiftoffmonetizePlugin diff --git a/packages/mediation/gma_mediation_line/CHANGELOG.md b/packages/mediation/gma_mediation_line/CHANGELOG.md new file mode 100644 index 000000000..626ba1035 --- /dev/null +++ b/packages/mediation/gma_mediation_line/CHANGELOG.md @@ -0,0 +1,37 @@ +## Line Flutter Mediation Adapter Changelog + +#### Version 1.0.6 +- Supports [Line Android adapter version 2.9.20251028.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/line/CHANGELOG.md#version-29202510280). +- Supports [Line iOS adapter version 2.9.20251119.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Line/CHANGELOG.md#version-29202511190). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0 + +#### Version 1.0.5 +- Supports [Line Android adapter version 2.9.20250924.1](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/line/CHANGELOG.md#version-29202509241). +- Supports [Line iOS adapter version 2.9.20250930.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Line/CHANGELOG.md#version-29202509300). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0 + +#### Version 1.0.4 +- Supports [Line Android adapter version 2.9.20250718.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/line/CHANGELOG.md#version-29202507180). +- Supports [Line iOS adapter version 2.9.20250512.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Line/CHANGELOG.md#version-29202505120). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0 + +#### Version 1.0.3 +- Supports [Line Android adapter version 2.9.20250519.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/line/CHANGELOG.md#version-29202505190). +- Supports [Line iOS adapter version 2.9.20250512.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Line/CHANGELOG.md#version-29202505120). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0 + +#### Version 1.0.2 +- Supports [Line Android adapter version 2.9.20250317.1](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/line/CHANGELOG.md#version-29202503171). +- Supports [Line iOS adapter version 2.9.20241106.3](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Line/CHANGELOG.md#version-29202411063). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0 + +#### Version 1.0.1 +- Supports [Line Android adapter version 2.9.20250110.1](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/line/CHANGELOG.md#version-29202501101). +- Supports [Line iOS adapter version 2.9.20241106.2](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Line/CHANGELOG.md#version-29202411062). +- Built and tested with the Google Mobile Ads Flutter Plugin version 5.3.1. + +#### Version 1.0.0 +- Initial release. +- Supports [Line Android adapter version 2.9.20250110.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/line/CHANGELOG.md#version-29202501100). +- Supports [Line iOS adapter version 2.9.20241106.1](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Line/CHANGELOG.md#version-29202411061). +- Built and tested with the Google Mobile Ads Flutter Plugin version 5.3.1. \ No newline at end of file diff --git a/packages/mediation/gma_mediation_line/LICENSE b/packages/mediation/gma_mediation_line/LICENSE new file mode 100644 index 000000000..e58143fcc --- /dev/null +++ b/packages/mediation/gma_mediation_line/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 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. diff --git a/packages/mediation/gma_mediation_line/README.md b/packages/mediation/gma_mediation_line/README.md new file mode 100644 index 000000000..3d2e9f568 --- /dev/null +++ b/packages/mediation/gma_mediation_line/README.md @@ -0,0 +1,31 @@ +# Google Mobile Ads Mediation of Line for Flutter + +[![gma_mediation_line](https://github.com/googleads/googleads-mobile-flutter/actions/workflows/google_mobile_ads.yaml/badge.svg)](https://github.com/googleads/googleads-mobile-flutter/actions/workflows/google_mobile_ads.yaml) + +This repository contains the source code for the Mediation Line Flutter +plugin to be used with the Google Mobile Ads plugin. It enables mediation of the +Line Ad Network through the Google Mobile Ads SDK. + +## Documentation +For instructions on how to use with the google_mobile_ads plugin, refer to the +developer guide for [Line](https://developers.google.com/admob/flutter/mediation/line). + +## Downloads + +See [pub.dev](https://pub.dev/packages/gma_mediation_line/versions) for the +latest releases of the plugin. + +## Suggesting improvements + +To file bugs, make feature requests, or to suggest other improvements, please +use [github's issue tracker](https://github.com/googleads/googleads-mobile-flutter/issues). + + +## Other resources + +* [AdMob help center](https://support.google.com/admob/?hl=en#topic=7383088) +* [Ad Manager help center](https://support.google.com/admanager/?hl=en#topic=7505988) + +## License + +[Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0) \ No newline at end of file diff --git a/packages/mediation/gma_mediation_line/analysis_options.yaml b/packages/mediation/gma_mediation_line/analysis_options.yaml new file mode 100644 index 000000000..fac4bcd12 --- /dev/null +++ b/packages/mediation/gma_mediation_line/analysis_options.yaml @@ -0,0 +1,19 @@ +# 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 +# +# https://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. + +include: package:lint/package.yaml + +analyzer: + exclude: + - '**.g.dart' \ No newline at end of file diff --git a/packages/mediation/gma_mediation_line/android/build.gradle b/packages/mediation/gma_mediation_line/android/build.gradle new file mode 100644 index 000000000..c2db0d04b --- /dev/null +++ b/packages/mediation/gma_mediation_line/android/build.gradle @@ -0,0 +1,73 @@ +group = "io.flutter.plugins.googlemobileads.mediation.gma_mediation_line" +version = "1.0.6" + +buildscript { + ext.kotlin_version = "1.8.22" + repositories { + google() + mavenCentral() + } + + dependencies { + classpath("com.android.tools.build:gradle:8.1.0") + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version") + } +} + +allprojects { + repositories { + google() + mavenCentral() + } +} + +apply plugin: "com.android.library" +apply plugin: "kotlin-android" + +ext { + stringVersion = "2.9.20251028.0" +} + +android { + if (project.android.hasProperty("namespace")) { + namespace = "io.flutter.plugins.googlemobileads.mediation.gma_mediation_line" + } + + compileSdk = 34 + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11 + } + + sourceSets { + main.java.srcDirs += "src/main/kotlin" + test.java.srcDirs += "src/test/kotlin" + } + + defaultConfig { + minSdk = 23 + } + + dependencies { + implementation("com.google.ads.mediation:line:$stringVersion") + testImplementation("org.jetbrains.kotlin:kotlin-test") + testImplementation("org.mockito:mockito-core:5.0.0") + } + + testOptions { + unitTests.all { + useJUnitPlatform() + + testLogging { + events "passed", "skipped", "failed", "standardOut", "standardError" + outputs.upToDateWhen {false} + showStandardStreams = true + } + } + } +} diff --git a/packages/mediation/gma_mediation_line/android/gma_mediation_line_android.iml b/packages/mediation/gma_mediation_line/android/gma_mediation_line_android.iml new file mode 100644 index 000000000..e8b9110d5 --- /dev/null +++ b/packages/mediation/gma_mediation_line/android/gma_mediation_line_android.iml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_line/android/settings.gradle b/packages/mediation/gma_mediation_line/android/settings.gradle new file mode 100644 index 000000000..64f251ecd --- /dev/null +++ b/packages/mediation/gma_mediation_line/android/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'gma_mediation_line' diff --git a/packages/mediation/gma_mediation_line/android/src/main/AndroidManifest.xml b/packages/mediation/gma_mediation_line/android/src/main/AndroidManifest.xml new file mode 100644 index 000000000..351e7d53d --- /dev/null +++ b/packages/mediation/gma_mediation_line/android/src/main/AndroidManifest.xml @@ -0,0 +1,3 @@ + + diff --git a/packages/mediation/gma_mediation_line/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_line/GmaMediationLinePlugin.kt b/packages/mediation/gma_mediation_line/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_line/GmaMediationLinePlugin.kt new file mode 100644 index 000000000..af2be82b8 --- /dev/null +++ b/packages/mediation/gma_mediation_line/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_line/GmaMediationLinePlugin.kt @@ -0,0 +1,24 @@ +// 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 +// +// https://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. + +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_line + +import io.flutter.embedding.engine.plugins.FlutterPlugin + +/** Required to link the Android dependency of the Line Adapter. */ +class GmaMediationLinePlugin : FlutterPlugin { + override fun onAttachedToEngine(flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) {} + + override fun onDetachedFromEngine(binding: FlutterPlugin.FlutterPluginBinding) {} +} diff --git a/packages/mediation/gma_mediation_line/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_line/LineFlutterMediationExtras.kt b/packages/mediation/gma_mediation_line/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_line/LineFlutterMediationExtras.kt new file mode 100644 index 000000000..22d3d269f --- /dev/null +++ b/packages/mediation/gma_mediation_line/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_line/LineFlutterMediationExtras.kt @@ -0,0 +1,54 @@ +// 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 +// +// https://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. + +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_line + +import android.os.Bundle +import android.util.Pair +import androidx.core.os.bundleOf +import com.google.ads.mediation.line.LineExtras +import com.google.ads.mediation.line.LineMediationAdapter +import com.google.android.gms.ads.mediation.MediationExtrasReceiver +import io.flutter.plugins.googlemobileads.FlutterMediationExtras + +class LineFlutterMediationExtras : FlutterMediationExtras() { + private var flutterExtras: Map? = null + + override fun setMediationExtras(extras: MutableMap) { + flutterExtras = extras + } + + override fun getMediationExtras(): Pair, Bundle> { + val extrasMap = flutterExtras + if (extrasMap == null) { + return Pair, Bundle>( + LineMediationAdapter::class.java, + bundleOf(), + ) + } + var extrasBundle = bundleOf() + val isSoundEnabled = extrasMap[ENABLE_AD_SOUND] + if (isSoundEnabled is Boolean) { + extrasBundle = LineExtras(isSoundEnabled).build() + } + return Pair, Bundle>( + LineMediationAdapter::class.java, + extrasBundle, + ) + } + + private companion object { + const val ENABLE_AD_SOUND = "enableAdSound" + } +} diff --git a/packages/mediation/gma_mediation_line/example/README.md b/packages/mediation/gma_mediation_line/example/README.md new file mode 100644 index 000000000..d0382fd2f --- /dev/null +++ b/packages/mediation/gma_mediation_line/example/README.md @@ -0,0 +1,17 @@ +# gma_mediation_line_example + +Learn how to integrate with your app that uses the [google_mobile_ads](https://pub.dev/packages/google_mobile_ads) plugin +by following the [development guide](https://developers.google.com/admob/flutter/mediation/line). + +## Getting Started + +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) + +For help getting started with Flutter development, view the +[online documentation](https://docs.flutter.dev/), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/packages/mediation/gma_mediation_line/example/analysis_options.yaml b/packages/mediation/gma_mediation_line/example/analysis_options.yaml new file mode 100644 index 000000000..0d2902135 --- /dev/null +++ b/packages/mediation/gma_mediation_line/example/analysis_options.yaml @@ -0,0 +1,28 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at https://dart.dev/lints. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/packages/mediation/gma_mediation_line/example/android/app/build.gradle b/packages/mediation/gma_mediation_line/example/android/app/build.gradle new file mode 100644 index 000000000..5aacb8a60 --- /dev/null +++ b/packages/mediation/gma_mediation_line/example/android/app/build.gradle @@ -0,0 +1,44 @@ +plugins { + id "com.android.application" + id "kotlin-android" + // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. + id "dev.flutter.flutter-gradle-plugin" +} + +android { + namespace = "io.flutter.plugins.googlemobileads.mediation.gma_mediation_line_example" + compileSdk = flutter.compileSdkVersion + ndkVersion = flutter.ndkVersion + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11 + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId = "io.flutter.plugins.googlemobileads.mediation.gma_mediation_line_example" + // You can update the following values to match your application needs. + // For more information, see: https://flutter.dev/to/review-gradle-config. + minSdk = 23 + targetSdk = flutter.targetSdkVersion + versionCode = flutter.versionCode + versionName = flutter.versionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig = signingConfigs.debug + } + } +} + +flutter { + source = "../.." +} diff --git a/packages/mediation/gma_mediation_line/example/android/app/src/debug/AndroidManifest.xml b/packages/mediation/gma_mediation_line/example/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 000000000..399f6981d --- /dev/null +++ b/packages/mediation/gma_mediation_line/example/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/packages/mediation/gma_mediation_line/example/android/app/src/main/AndroidManifest.xml b/packages/mediation/gma_mediation_line/example/android/app/src/main/AndroidManifest.xml new file mode 100644 index 000000000..0067df05f --- /dev/null +++ b/packages/mediation/gma_mediation_line/example/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_line/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_line_example/MainActivity.kt b/packages/mediation/gma_mediation_line/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_line_example/MainActivity.kt new file mode 100644 index 000000000..11b9da886 --- /dev/null +++ b/packages/mediation/gma_mediation_line/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_line_example/MainActivity.kt @@ -0,0 +1,5 @@ +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_line_example + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity : FlutterActivity() diff --git a/packages/mediation/gma_mediation_line/example/android/app/src/main/res/drawable-v21/launch_background.xml b/packages/mediation/gma_mediation_line/example/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 000000000..f74085f3f --- /dev/null +++ b/packages/mediation/gma_mediation_line/example/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/mediation/gma_mediation_line/example/android/app/src/main/res/drawable/launch_background.xml b/packages/mediation/gma_mediation_line/example/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 000000000..304732f88 --- /dev/null +++ b/packages/mediation/gma_mediation_line/example/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/mediation/gma_mediation_line/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/mediation/gma_mediation_line/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..db77bb4b7 Binary files /dev/null and b/packages/mediation/gma_mediation_line/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_line/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/mediation/gma_mediation_line/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..17987b79b Binary files /dev/null and b/packages/mediation/gma_mediation_line/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_line/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/mediation/gma_mediation_line/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..09d439148 Binary files /dev/null and b/packages/mediation/gma_mediation_line/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_line/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/mediation/gma_mediation_line/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..d5f1c8d34 Binary files /dev/null and b/packages/mediation/gma_mediation_line/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_line/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/packages/mediation/gma_mediation_line/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..4d6372eeb Binary files /dev/null and b/packages/mediation/gma_mediation_line/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_line/example/android/app/src/main/res/values-night/styles.xml b/packages/mediation/gma_mediation_line/example/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 000000000..06952be74 --- /dev/null +++ b/packages/mediation/gma_mediation_line/example/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/packages/mediation/gma_mediation_line/example/android/app/src/main/res/values/styles.xml b/packages/mediation/gma_mediation_line/example/android/app/src/main/res/values/styles.xml new file mode 100644 index 000000000..cb1ef8805 --- /dev/null +++ b/packages/mediation/gma_mediation_line/example/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/packages/mediation/gma_mediation_line/example/android/app/src/profile/AndroidManifest.xml b/packages/mediation/gma_mediation_line/example/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 000000000..399f6981d --- /dev/null +++ b/packages/mediation/gma_mediation_line/example/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/packages/mediation/gma_mediation_line/example/android/build.gradle b/packages/mediation/gma_mediation_line/example/android/build.gradle new file mode 100644 index 000000000..d2ffbffa4 --- /dev/null +++ b/packages/mediation/gma_mediation_line/example/android/build.gradle @@ -0,0 +1,18 @@ +allprojects { + repositories { + google() + mavenCentral() + } +} + +rootProject.buildDir = "../build" +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(":app") +} + +tasks.register("clean", Delete) { + delete rootProject.buildDir +} diff --git a/packages/mediation/gma_mediation_line/example/android/gma_mediation_line_example_android.iml b/packages/mediation/gma_mediation_line/example/android/gma_mediation_line_example_android.iml new file mode 100644 index 000000000..18999696a --- /dev/null +++ b/packages/mediation/gma_mediation_line/example/android/gma_mediation_line_example_android.iml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_line/example/android/gradle.properties b/packages/mediation/gma_mediation_line/example/android/gradle.properties new file mode 100644 index 000000000..259717082 --- /dev/null +++ b/packages/mediation/gma_mediation_line/example/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError +android.useAndroidX=true +android.enableJetifier=true diff --git a/packages/mediation/gma_mediation_line/example/android/settings.gradle b/packages/mediation/gma_mediation_line/example/android/settings.gradle new file mode 100644 index 000000000..b9e43bd37 --- /dev/null +++ b/packages/mediation/gma_mediation_line/example/android/settings.gradle @@ -0,0 +1,25 @@ +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + }() + + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") + + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "8.1.0" apply false + id "org.jetbrains.kotlin.android" version "1.8.22" apply false +} + +include ":app" diff --git a/packages/mediation/gma_mediation_line/example/gma_mediation_line_example.iml b/packages/mediation/gma_mediation_line/example/gma_mediation_line_example.iml new file mode 100644 index 000000000..f66303d53 --- /dev/null +++ b/packages/mediation/gma_mediation_line/example/gma_mediation_line_example.iml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_line/example/ios/Flutter/AppFrameworkInfo.plist b/packages/mediation/gma_mediation_line/example/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 000000000..7c5696400 --- /dev/null +++ b/packages/mediation/gma_mediation_line/example/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 12.0 + + diff --git a/packages/mediation/gma_mediation_line/example/ios/Flutter/Debug.xcconfig b/packages/mediation/gma_mediation_line/example/ios/Flutter/Debug.xcconfig new file mode 100644 index 000000000..592ceee85 --- /dev/null +++ b/packages/mediation/gma_mediation_line/example/ios/Flutter/Debug.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/packages/mediation/gma_mediation_line/example/ios/Flutter/Release.xcconfig b/packages/mediation/gma_mediation_line/example/ios/Flutter/Release.xcconfig new file mode 100644 index 000000000..592ceee85 --- /dev/null +++ b/packages/mediation/gma_mediation_line/example/ios/Flutter/Release.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/packages/mediation/gma_mediation_line/example/ios/Runner.xcodeproj/project.pbxproj b/packages/mediation/gma_mediation_line/example/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 000000000..26c02e461 --- /dev/null +++ b/packages/mediation/gma_mediation_line/example/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,616 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 97C146E61CF9000F007C117D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 97C146ED1CF9000F007C117D; + remoteInfo = Runner; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 331C8082294A63A400263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C807B294A618700263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + 331C8082294A63A400263BE5 /* RunnerTests */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + 331C8081294A63A400263BE5 /* RunnerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C8080294A63A400263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 331C807D294A63A400263BE5 /* Sources */, + 331C807F294A63A400263BE5 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 331C8086294A63A400263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1510; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 331C8080294A63A400263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 97C146ED1CF9000F007C117D; + }; + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + 331C8080294A63A400263BE5 /* RunnerTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 331C807F294A63A400263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 331C807D294A63A400263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 331C8086294A63A400263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 97C146ED1CF9000F007C117D /* Runner */; + targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationLineExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 331C8088294A63A400263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationLineExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Debug; + }; + 331C8089294A63A400263BE5 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationLineExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Release; + }; + 331C808A294A63A400263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationLineExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationLineExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationLineExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C8088294A63A400263BE5 /* Debug */, + 331C8089294A63A400263BE5 /* Release */, + 331C808A294A63A400263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/packages/mediation/gma_mediation_line/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/mediation/gma_mediation_line/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..919434a62 --- /dev/null +++ b/packages/mediation/gma_mediation_line/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/packages/mediation/gma_mediation_line/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/mediation/gma_mediation_line/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000..18d981003 --- /dev/null +++ b/packages/mediation/gma_mediation_line/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/packages/mediation/gma_mediation_line/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/mediation/gma_mediation_line/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 000000000..f9b0d7c5e --- /dev/null +++ b/packages/mediation/gma_mediation_line/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/packages/mediation/gma_mediation_line/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/mediation/gma_mediation_line/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 000000000..8e3ca5dfe --- /dev/null +++ b/packages/mediation/gma_mediation_line/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_line/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/packages/mediation/gma_mediation_line/example/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..1d526a16e --- /dev/null +++ b/packages/mediation/gma_mediation_line/example/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/packages/mediation/gma_mediation_line/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/mediation/gma_mediation_line/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000..18d981003 --- /dev/null +++ b/packages/mediation/gma_mediation_line/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/packages/mediation/gma_mediation_line/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/mediation/gma_mediation_line/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 000000000..f9b0d7c5e --- /dev/null +++ b/packages/mediation/gma_mediation_line/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/packages/mediation/gma_mediation_line/example/ios/Runner/AppDelegate.swift b/packages/mediation/gma_mediation_line/example/ios/Runner/AppDelegate.swift new file mode 100644 index 000000000..626664468 --- /dev/null +++ b/packages/mediation/gma_mediation_line/example/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import Flutter +import UIKit + +@main +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..d36b1fab2 --- /dev/null +++ b/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 000000000..dc9ada472 Binary files /dev/null and b/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 000000000..7353c41ec Binary files /dev/null and b/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 000000000..797d452e4 Binary files /dev/null and b/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 000000000..6ed2d933e Binary files /dev/null and b/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 000000000..4cd7b0099 Binary files /dev/null and b/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 000000000..fe730945a Binary files /dev/null and b/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 000000000..321773cd8 Binary files /dev/null and b/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 000000000..797d452e4 Binary files /dev/null and b/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 000000000..502f463a9 Binary files /dev/null and b/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 000000000..0ec303439 Binary files /dev/null and b/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 000000000..0ec303439 Binary files /dev/null and b/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 000000000..e9f5fea27 Binary files /dev/null and b/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 000000000..84ac32ae7 Binary files /dev/null and b/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 000000000..8953cba09 Binary files /dev/null and b/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 000000000..0467bf12a Binary files /dev/null and b/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 000000000..0bedcf2fd --- /dev/null +++ b/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchImage.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 000000000..89c2725b7 --- /dev/null +++ b/packages/mediation/gma_mediation_line/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/packages/mediation/gma_mediation_line/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/packages/mediation/gma_mediation_line/example/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 000000000..f2e259c7c --- /dev/null +++ b/packages/mediation/gma_mediation_line/example/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_line/example/ios/Runner/Base.lproj/Main.storyboard b/packages/mediation/gma_mediation_line/example/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 000000000..f3c28516f --- /dev/null +++ b/packages/mediation/gma_mediation_line/example/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_line/example/ios/Runner/Info.plist b/packages/mediation/gma_mediation_line/example/ios/Runner/Info.plist new file mode 100644 index 000000000..183ffb7ae --- /dev/null +++ b/packages/mediation/gma_mediation_line/example/ios/Runner/Info.plist @@ -0,0 +1,49 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Gma Mediation Line + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + gma_mediation_line_example + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + CADisableMinimumFrameDurationOnPhone + + UIApplicationSupportsIndirectInputEvents + + + diff --git a/packages/mediation/gma_mediation_line/example/ios/Runner/Runner-Bridging-Header.h b/packages/mediation/gma_mediation_line/example/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 000000000..308a2a560 --- /dev/null +++ b/packages/mediation/gma_mediation_line/example/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/packages/mediation/gma_mediation_line/example/lib/main.dart b/packages/mediation/gma_mediation_line/example/lib/main.dart new file mode 100644 index 000000000..ea02decb7 --- /dev/null +++ b/packages/mediation/gma_mediation_line/example/lib/main.dart @@ -0,0 +1,29 @@ +import 'package:flutter/material.dart'; + +void main() { + runApp(const MyApp()); +} + +class MyApp extends StatefulWidget { + const MyApp({super.key}); + + @override + State createState() => _MyAppState(); +} + +class _MyAppState extends State { + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Scaffold( + appBar: AppBar(title: const Text('Plugin example app')), + body: const Center(child: Text('Test app')), + ), + ); + } +} diff --git a/packages/mediation/gma_mediation_line/example/pubspec.lock b/packages/mediation/gma_mediation_line/example/pubspec.lock new file mode 100644 index 000000000..f6195694b --- /dev/null +++ b/packages/mediation/gma_mediation_line/example/pubspec.lock @@ -0,0 +1,323 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + async: + dependency: transitive + description: + name: async + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" + source: hosted + version: "2.11.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + characters: + dependency: transitive + description: + name: characters + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" + source: hosted + version: "1.3.0" + clock: + dependency: transitive + description: + name: clock + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" + source: hosted + version: "1.1.1" + collection: + dependency: transitive + description: + name: collection + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + url: "https://pub.dev" + source: hosted + version: "1.18.0" + cupertino_icons: + dependency: "direct main" + description: + name: cupertino_icons + sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 + url: "https://pub.dev" + source: hosted + version: "1.0.8" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" + source: hosted + version: "1.3.1" + file: + dependency: transitive + description: + name: file + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" + url: "https://pub.dev" + source: hosted + version: "7.0.0" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_driver: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" + url: "https://pub.dev" + source: hosted + version: "4.0.0" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + fuchsia_remote_debug_protocol: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + gma_mediation_line: + dependency: "direct main" + description: + path: ".." + relative: true + source: path + version: "1.0.0" + google_mobile_ads: + dependency: transitive + description: + name: google_mobile_ads + sha256: "4775006383a27a5d86d46f8fb452bfcb17794fc0a46c732979e49a8eb1c8963f" + url: "https://pub.dev" + source: hosted + version: "5.2.0" + integration_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" + url: "https://pub.dev" + source: hosted + version: "10.0.5" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" + url: "https://pub.dev" + source: hosted + version: "3.0.5" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + lints: + dependency: transitive + description: + name: lints + sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" + url: "https://pub.dev" + source: hosted + version: "4.0.0" + matcher: + dependency: transitive + description: + name: matcher + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + url: "https://pub.dev" + source: hosted + version: "0.12.16+1" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + url: "https://pub.dev" + source: hosted + version: "0.11.1" + meta: + dependency: transitive + description: + name: meta + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 + url: "https://pub.dev" + source: hosted + version: "1.15.0" + path: + dependency: transitive + description: + name: path + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + url: "https://pub.dev" + source: hosted + version: "1.9.0" + platform: + dependency: transitive + description: + name: platform + sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" + url: "https://pub.dev" + source: hosted + version: "3.1.5" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" + process: + dependency: transitive + description: + name: process + sha256: "21e54fd2faf1b5bdd5102afd25012184a6793927648ea81eea80552ac9405b32" + url: "https://pub.dev" + source: hosted + version: "5.0.2" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + source_span: + dependency: transitive + description: + name: source_span + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" + source: hosted + version: "1.10.0" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + url: "https://pub.dev" + source: hosted + version: "1.11.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" + source: hosted + version: "2.1.2" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + sync_http: + dependency: transitive + description: + name: sync_http + sha256: "7f0cd72eca000d2e026bcd6f990b81d0ca06022ef4e32fb257b30d3d1014a961" + url: "https://pub.dev" + source: hosted + version: "0.3.1" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + test_api: + dependency: transitive + description: + name: test_api + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" + url: "https://pub.dev" + source: hosted + version: "0.7.2" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" + url: "https://pub.dev" + source: hosted + version: "14.2.5" + webdriver: + dependency: transitive + description: + name: webdriver + sha256: "003d7da9519e1e5f329422b36c4dcdf18d7d2978d1ba099ea4e45ba490ed845e" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + webview_flutter: + dependency: transitive + description: + name: webview_flutter + sha256: ec81f57aa1611f8ebecf1d2259da4ef052281cb5ad624131c93546c79ccc7736 + url: "https://pub.dev" + source: hosted + version: "4.9.0" + webview_flutter_android: + dependency: transitive + description: + name: webview_flutter_android + sha256: "47a8da40d02befda5b151a26dba71f47df471cddd91dfdb7802d0a87c5442558" + url: "https://pub.dev" + source: hosted + version: "3.16.9" + webview_flutter_platform_interface: + dependency: transitive + description: + name: webview_flutter_platform_interface + sha256: d937581d6e558908d7ae3dc1989c4f87b786891ab47bb9df7de548a151779d8d + url: "https://pub.dev" + source: hosted + version: "2.10.0" + webview_flutter_wkwebview: + dependency: transitive + description: + name: webview_flutter_wkwebview + sha256: b7e92f129482460951d96ef9a46b49db34bd2e1621685de26e9eaafd9674e7eb + url: "https://pub.dev" + source: hosted + version: "3.16.3" +sdks: + dart: ">=3.5.4 <4.0.0" + flutter: ">=3.24.0" diff --git a/packages/mediation/gma_mediation_line/example/pubspec.yaml b/packages/mediation/gma_mediation_line/example/pubspec.yaml new file mode 100644 index 000000000..75e5d659d --- /dev/null +++ b/packages/mediation/gma_mediation_line/example/pubspec.yaml @@ -0,0 +1,86 @@ +name: gma_mediation_line_example +description: "Demonstrates how to use the gma_mediation_line plugin." +# The following line prevents the package from being accidentally published to +# pub.dev using `flutter pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +environment: + sdk: ^3.6.0 + +# Dependencies specify other packages that your package needs in order to work. +# To automatically upgrade your package dependencies to the latest versions +# consider running `flutter pub upgrade --major-versions`. Alternatively, +# dependencies can be manually updated by changing the version numbers below to +# the latest version available on pub.dev. To see which dependencies have newer +# versions available, run `flutter pub outdated`. +dependencies: + flutter: + sdk: flutter + + google_mobile_ads: ^6.0.0 + gma_mediation_line: + # When depending on this package from a real application you should use: + # gma_mediation_line: ^x.y.z + # See https://dart.dev/tools/pub/dependencies#version-constraints + # The example app is bundled with the plugin so we use a path dependency on + # the parent directory to use the current plugin's version. + path: ../ + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^1.0.8 + +dev_dependencies: + integration_test: + sdk: flutter + flutter_test: + sdk: flutter + + # The "flutter_lints" package below contains a set of recommended lints to + # encourage good coding practices. The lint set provided by the package is + # activated in the `analysis_options.yaml` file located at the root of your + # package. See that file for information about deactivating specific lint + # rules and activating additional ones. + flutter_lints: ^4.0.0 + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter packages. +flutter: + + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + + # To add assets to your application, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/to/resolution-aware-images + + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/to/asset-from-package + + # To add custom fonts to your application, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts from package dependencies, + # see https://flutter.dev/to/font-from-package diff --git a/packages/mediation/gma_mediation_line/gma_mediation_line.iml b/packages/mediation/gma_mediation_line/gma_mediation_line.iml new file mode 100644 index 000000000..27686dd4b --- /dev/null +++ b/packages/mediation/gma_mediation_line/gma_mediation_line.iml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_line/ios/Classes/GmaMediationLinePlugin.swift b/packages/mediation/gma_mediation_line/ios/Classes/GmaMediationLinePlugin.swift new file mode 100644 index 000000000..095a51536 --- /dev/null +++ b/packages/mediation/gma_mediation_line/ios/Classes/GmaMediationLinePlugin.swift @@ -0,0 +1,23 @@ +// 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 +// +// https://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 Flutter +import UIKit + +/// Required to link the iOS dependency of the Line Adapter. +public class GmaMediationLinePlugin: NSObject, FlutterPlugin { + public static func register(with registrar: FlutterPluginRegistrar) {} + + public func detachFromEngine(for registrar: FlutterPluginRegistrar) {} +} diff --git a/packages/mediation/gma_mediation_line/ios/Classes/LineFlutterMediationExtras.swift b/packages/mediation/gma_mediation_line/ios/Classes/LineFlutterMediationExtras.swift new file mode 100644 index 000000000..195c536e2 --- /dev/null +++ b/packages/mediation/gma_mediation_line/ios/Classes/LineFlutterMediationExtras.swift @@ -0,0 +1,36 @@ +// 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 +// +// https://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 Foundation +import LineAdapter + +@objc protocol FLTMediationExtras { + var extras: NSMutableDictionary { get } + func getMediationExtras() -> AdNetworkExtras +} + +@objc(GADFLineFlutterMediationExtras) +class LineFlutterMediationExtras: NSObject, FLTMediationExtras { + var extras: NSMutableDictionary = [:] + + func getMediationExtras() -> AdNetworkExtras { + let lineExtras = GADMediationAdapterLineExtras() + if let enableAdSound = extras["enableAdSound"] as? Bool { + lineExtras.adAudio = + enableAdSound + ? GADMediationAdapterLineAdAudio.unmuted : GADMediationAdapterLineAdAudio.muted + } + return lineExtras + } +} diff --git a/packages/mediation/gma_mediation_line/ios/Resources/PrivacyInfo.xcprivacy b/packages/mediation/gma_mediation_line/ios/Resources/PrivacyInfo.xcprivacy new file mode 100644 index 000000000..a34b7e2e6 --- /dev/null +++ b/packages/mediation/gma_mediation_line/ios/Resources/PrivacyInfo.xcprivacy @@ -0,0 +1,14 @@ + + + + + NSPrivacyTrackingDomains + + NSPrivacyAccessedAPITypes + + NSPrivacyCollectedDataTypes + + NSPrivacyTracking + + + diff --git a/packages/mediation/gma_mediation_line/ios/gma_mediation_line.podspec b/packages/mediation/gma_mediation_line/ios/gma_mediation_line.podspec new file mode 100644 index 000000000..31de55bf8 --- /dev/null +++ b/packages/mediation/gma_mediation_line/ios/gma_mediation_line.podspec @@ -0,0 +1,21 @@ +Pod::Spec.new do |s| + s.name = 'gma_mediation_line' + s.version = '1.0.6' + s.summary = 'Google Mobile Ads Mediation of Line.' + s.description = <<-DESC + Mediation Adapter for Line to use with Google Mobile Ads. + DESC + s.homepage = 'https://developers.google.com/admob/flutter/mediation/line' + s.license = { :file => '../LICENSE' } + s.author = { 'Google LLC' => 'mediation-support@google.com' } + s.source = { :path => '.' } + s.source_files = 'Classes/**/*' + s.dependency 'Flutter' + s.dependency 'GoogleMobileAdsMediationLine', '~>2.9.20251119.0' + s.platform = :ios, '12.0' + s.static_framework = true + + s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' } + s.swift_version = '5.0' + +end diff --git a/packages/mediation/gma_mediation_line/lib/gma_mediation_line.dart b/packages/mediation/gma_mediation_line/lib/gma_mediation_line.dart new file mode 100644 index 000000000..d69e09cac --- /dev/null +++ b/packages/mediation/gma_mediation_line/lib/gma_mediation_line.dart @@ -0,0 +1,16 @@ +// 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 +// +// https://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. + +/// This empty class is needed to allow correct compatibility analysis with host platforms. +class GmaMediationLine {} diff --git a/packages/mediation/gma_mediation_line/lib/line_mediation_extras.dart b/packages/mediation/gma_mediation_line/lib/line_mediation_extras.dart new file mode 100644 index 000000000..f736478d1 --- /dev/null +++ b/packages/mediation/gma_mediation_line/lib/line_mediation_extras.dart @@ -0,0 +1,38 @@ +// 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 +// +// https://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 'package:google_mobile_ads/google_mobile_ads.dart'; + +/// Extra information sent to the Line adapter through an [AdRequest] or an [AdManagerAdRequest]. +class LineMediationExtras implements MediationExtras { + /// Default constructor with required extras value. + const LineMediationExtras({required this.enableAdSound}); + + final bool enableAdSound; + + @override + String getAndroidClassName() { + return 'io.flutter.plugins.googlemobileads.mediation.gma_mediation_line.LineFlutterMediationExtras'; + } + + @override + String getIOSClassName() { + return 'LineFlutterMediationExtras'; + } + + @override + Map getExtras() { + return {'enableAdSound': enableAdSound}; + } +} diff --git a/packages/mediation/gma_mediation_line/pubspec.lock b/packages/mediation/gma_mediation_line/pubspec.lock new file mode 100644 index 000000000..e2bf2f601 --- /dev/null +++ b/packages/mediation/gma_mediation_line/pubspec.lock @@ -0,0 +1,261 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + async: + dependency: transitive + description: + name: async + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" + source: hosted + version: "2.11.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + characters: + dependency: transitive + description: + name: characters + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" + source: hosted + version: "1.3.0" + clock: + dependency: transitive + description: + name: clock + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" + source: hosted + version: "1.1.1" + collection: + dependency: transitive + description: + name: collection + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + url: "https://pub.dev" + source: hosted + version: "1.18.0" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" + source: hosted + version: "1.3.1" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" + url: "https://pub.dev" + source: hosted + version: "4.0.0" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + google_mobile_ads: + dependency: "direct main" + description: + name: google_mobile_ads + sha256: "4775006383a27a5d86d46f8fb452bfcb17794fc0a46c732979e49a8eb1c8963f" + url: "https://pub.dev" + source: hosted + version: "5.2.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" + url: "https://pub.dev" + source: hosted + version: "10.0.5" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" + url: "https://pub.dev" + source: hosted + version: "3.0.5" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + lint: + dependency: "direct dev" + description: + name: lint + sha256: d758a5211fce7fd3f5e316f804daefecdc34c7e53559716125e6da7388ae8565 + url: "https://pub.dev" + source: hosted + version: "2.3.0" + lints: + dependency: transitive + description: + name: lints + sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" + url: "https://pub.dev" + source: hosted + version: "4.0.0" + matcher: + dependency: transitive + description: + name: matcher + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + url: "https://pub.dev" + source: hosted + version: "0.12.16+1" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + url: "https://pub.dev" + source: hosted + version: "0.11.1" + meta: + dependency: transitive + description: + name: meta + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 + url: "https://pub.dev" + source: hosted + version: "1.15.0" + path: + dependency: transitive + description: + name: path + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + url: "https://pub.dev" + source: hosted + version: "1.9.0" + plugin_platform_interface: + dependency: "direct main" + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + source_span: + dependency: transitive + description: + name: source_span + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" + source: hosted + version: "1.10.0" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + url: "https://pub.dev" + source: hosted + version: "1.11.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" + source: hosted + version: "2.1.2" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + test_api: + dependency: transitive + description: + name: test_api + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" + url: "https://pub.dev" + source: hosted + version: "0.7.2" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" + url: "https://pub.dev" + source: hosted + version: "14.2.5" + webview_flutter: + dependency: transitive + description: + name: webview_flutter + sha256: ec81f57aa1611f8ebecf1d2259da4ef052281cb5ad624131c93546c79ccc7736 + url: "https://pub.dev" + source: hosted + version: "4.9.0" + webview_flutter_android: + dependency: transitive + description: + name: webview_flutter_android + sha256: "47a8da40d02befda5b151a26dba71f47df471cddd91dfdb7802d0a87c5442558" + url: "https://pub.dev" + source: hosted + version: "3.16.9" + webview_flutter_platform_interface: + dependency: transitive + description: + name: webview_flutter_platform_interface + sha256: d937581d6e558908d7ae3dc1989c4f87b786891ab47bb9df7de548a151779d8d + url: "https://pub.dev" + source: hosted + version: "2.10.0" + webview_flutter_wkwebview: + dependency: transitive + description: + name: webview_flutter_wkwebview + sha256: b7e92f129482460951d96ef9a46b49db34bd2e1621685de26e9eaafd9674e7eb + url: "https://pub.dev" + source: hosted + version: "3.16.3" +sdks: + dart: ">=3.5.4 <4.0.0" + flutter: ">=3.24.0" diff --git a/packages/mediation/gma_mediation_line/pubspec.yaml b/packages/mediation/gma_mediation_line/pubspec.yaml new file mode 100644 index 000000000..f97e4ef5d --- /dev/null +++ b/packages/mediation/gma_mediation_line/pubspec.yaml @@ -0,0 +1,26 @@ +name: gma_mediation_line +description: 'Mediation Adapter that enables sending ad requests to the Line + ad network using the google_mobile_ads plugin.' +version: 1.0.6 +environment: + sdk: '>=3.6.0 <4.0.0' + flutter: '>=3.27.0' +dependencies: + flutter: + sdk: flutter + google_mobile_ads: ^6.0.0 + plugin_platform_interface: ^2.0.2 +dev_dependencies: + flutter_test: + sdk: flutter + flutter_lints: ^4.0.0 + lint: ^2.3.0 +flutter: + plugin: + platforms: + android: + package: io.flutter.plugins.googlemobileads.mediation.gma_mediation_line + pluginClass: GmaMediationLinePlugin + ios: + pluginClass: GmaMediationLinePlugin +repository: https://github.com/googleads/googleads-mobile-flutter/tree/main/packages/mediation/gma_mediation_line diff --git a/packages/mediation/gma_mediation_maio/CHANGELOG.md b/packages/mediation/gma_mediation_maio/CHANGELOG.md new file mode 100644 index 000000000..64235bcfc --- /dev/null +++ b/packages/mediation/gma_mediation_maio/CHANGELOG.md @@ -0,0 +1,36 @@ +## maio Flutter Mediation Adapter Changelog + +#### Version 1.1.2 (In progress) +- Updated minimum Flutter version to 3.35.1 +- Updated to support Google Mobile Ads Flutter Plugin version 7.0.0 + +#### Version 1.1.1 +- Supports [maio Android adapter version 2.0.7.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/maio/CHANGELOG.md#version-2070). +- Supports [maio iOS adapter version 2.2.0.1](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Maio/CHANGELOG.md#version-2201). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.1.0 +- Supports [maio Android adapter version 2.0.6.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/maio/CHANGELOG.md#version-2060). +- Supports [maio iOS adapter version 2.2.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Maio/CHANGELOG.md#version-2200). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.0.3 +- Supports [maio Android adapter version 2.0.5.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/maio/CHANGELOG.md#version-2050). +- Supports [maio iOS adapter version 2.1.6.1](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Maio/CHANGELOG.md#version-2161). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.0.2 +- Supports [maio Android adapter version 2.0.4.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/maio/CHANGELOG.md#version-2040). +- Supports [maio iOS adapter version 2.1.6.1](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Maio/CHANGELOG.md#version-2161). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.0.1 +- Supports [maio Android adapter version 2.0.3.1](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/maio/CHANGELOG.md#version-2031). +- Supports [maio iOS adapter version 2.1.6.1](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Maio/CHANGELOG.md#version-2161). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.0.0 +- Initial release. +- Supports [maio Android adapter version 2.0.3.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/maio/CHANGELOG.md#version-2030). +- Supports [maio iOS adapter version 2.1.6.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Maio/CHANGELOG.md#version-2160). +- Built and tested with the Google Mobile Ads Flutter Plugin version 5.3.1. diff --git a/packages/mediation/gma_mediation_maio/LICENSE b/packages/mediation/gma_mediation_maio/LICENSE new file mode 100644 index 000000000..e58143fcc --- /dev/null +++ b/packages/mediation/gma_mediation_maio/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 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. diff --git a/packages/mediation/gma_mediation_maio/README.md b/packages/mediation/gma_mediation_maio/README.md new file mode 100644 index 000000000..2bc0b1503 --- /dev/null +++ b/packages/mediation/gma_mediation_maio/README.md @@ -0,0 +1,31 @@ +# Google Mobile Ads Mediation of maio for Flutter + +[![gma_mediation_maio](https://github.com/googleads/googleads-mobile-flutter/actions/workflows/google_mobile_ads.yaml/badge.svg)](https://github.com/googleads/googleads-mobile-flutter/actions/workflows/google_mobile_ads.yaml) + +This repository contains the source code for the Mediation maio Flutter +plugin to be used with the Google Mobile Ads plugin. It enables mediation of the +maio Ad Network through the Google Mobile Ads SDK. + +## Documentation +For instructions on how to use with the google_mobile_ads plugin, refer to the +developer guide for [maio](https://developers.google.com/admob/flutter/mediation/maio). + +## Downloads + +See [pub.dev](https://pub.dev/packages/gma_mediation_maio/versions) for the +latest releases of the plugin. + +## Suggesting improvements + +To file bugs, make feature requests, or to suggest other improvements, please +use [github's issue tracker](https://github.com/googleads/googleads-mobile-flutter/issues). + + +## Other resources + +* [AdMob help center](https://support.google.com/admob/?hl=en#topic=7383088) +* [Ad Manager help center](https://support.google.com/admanager/?hl=en#topic=7505988) + +## License + +[Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0) \ No newline at end of file diff --git a/packages/mediation/gma_mediation_maio/analysis_options.yaml b/packages/mediation/gma_mediation_maio/analysis_options.yaml new file mode 100644 index 000000000..632d08c98 --- /dev/null +++ b/packages/mediation/gma_mediation_maio/analysis_options.yaml @@ -0,0 +1,19 @@ +# Copyright 2025 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 +# +# https://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. + +include: package:lint/package.yaml + +analyzer: + exclude: + - '**.g.dart' \ No newline at end of file diff --git a/packages/mediation/gma_mediation_maio/android/build.gradle b/packages/mediation/gma_mediation_maio/android/build.gradle new file mode 100644 index 000000000..60b73a019 --- /dev/null +++ b/packages/mediation/gma_mediation_maio/android/build.gradle @@ -0,0 +1,71 @@ +group = "io.flutter.plugins.googlemobileads.mediation.gma_mediation_maio" +version = "1.1.2" + +buildscript { + ext.kotlin_version = "2.2.21" + repositories { + google() + mavenCentral() + } + + dependencies { + classpath("com.android.tools.build:gradle:8.13.1") + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version") + } +} + +allprojects { + repositories { + google() + mavenCentral() + } +} + +apply plugin: "com.android.library" +apply plugin: "kotlin-android" + +ext { + stringVersion = "2.0.8.0" +} + +android { + namespace = "io.flutter.plugins.googlemobileads.mediation.gma_mediation_maio" + + compileSdk = 36 + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11 + } + + sourceSets { + main.java.srcDirs += "src/main/kotlin" + test.java.srcDirs += "src/test/kotlin" + } + + defaultConfig { + minSdk = 24 + } + + dependencies { + implementation("com.google.ads.mediation:maio:$stringVersion") + testImplementation("org.jetbrains.kotlin:kotlin-test") + testImplementation("org.mockito:mockito-core:5.5.0") + } + + testOptions { + unitTests.all { + useJUnitPlatform() + + testLogging { + events "passed", "skipped", "failed", "standardOut", "standardError" + outputs.upToDateWhen {false} + showStandardStreams = true + } + } + } +} diff --git a/packages/mediation/gma_mediation_maio/android/gma_mediation_maio_android.iml b/packages/mediation/gma_mediation_maio/android/gma_mediation_maio_android.iml new file mode 100644 index 000000000..e8b9110d5 --- /dev/null +++ b/packages/mediation/gma_mediation_maio/android/gma_mediation_maio_android.iml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_maio/android/settings.gradle b/packages/mediation/gma_mediation_maio/android/settings.gradle new file mode 100644 index 000000000..79d154e90 --- /dev/null +++ b/packages/mediation/gma_mediation_maio/android/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'gma_mediation_maio' diff --git a/packages/mediation/gma_mediation_maio/android/src/main/AndroidManifest.xml b/packages/mediation/gma_mediation_maio/android/src/main/AndroidManifest.xml new file mode 100644 index 000000000..8a79eb1fb --- /dev/null +++ b/packages/mediation/gma_mediation_maio/android/src/main/AndroidManifest.xml @@ -0,0 +1,3 @@ + + diff --git a/packages/mediation/gma_mediation_maio/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_maio/GmaMediationmaioPlugin.kt b/packages/mediation/gma_mediation_maio/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_maio/GmaMediationmaioPlugin.kt new file mode 100644 index 000000000..1c7b2c087 --- /dev/null +++ b/packages/mediation/gma_mediation_maio/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_maio/GmaMediationmaioPlugin.kt @@ -0,0 +1,24 @@ +// Copyright 2025 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 +// +// https://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. + +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_maio + +import io.flutter.embedding.engine.plugins.FlutterPlugin + +/** Required to link the Android dependency of the maio Adapter. */ +class GmaMediationmaioPlugin : FlutterPlugin { + override fun onAttachedToEngine(flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) {} + + override fun onDetachedFromEngine(binding: FlutterPlugin.FlutterPluginBinding) {} +} diff --git a/packages/mediation/gma_mediation_maio/example/README.md b/packages/mediation/gma_mediation_maio/example/README.md new file mode 100644 index 000000000..be0aadd37 --- /dev/null +++ b/packages/mediation/gma_mediation_maio/example/README.md @@ -0,0 +1,17 @@ +# gma_mediation_maio_example + +Learn how to integrate with your app that uses the [google_mobile_ads](https://pub.dev/packages/google_mobile_ads) plugin +by following the [development guide](https://developers.google.com/admob/flutter/mediation/maio). + +## Getting Started + +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) + +For help getting started with Flutter development, view the +[online documentation](https://docs.flutter.dev/), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/packages/mediation/gma_mediation_maio/example/analysis_options.yaml b/packages/mediation/gma_mediation_maio/example/analysis_options.yaml new file mode 100644 index 000000000..0d2902135 --- /dev/null +++ b/packages/mediation/gma_mediation_maio/example/analysis_options.yaml @@ -0,0 +1,28 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at https://dart.dev/lints. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/packages/mediation/gma_mediation_maio/example/android/app/build.gradle.kts b/packages/mediation/gma_mediation_maio/example/android/app/build.gradle.kts new file mode 100644 index 000000000..6c545eb71 --- /dev/null +++ b/packages/mediation/gma_mediation_maio/example/android/app/build.gradle.kts @@ -0,0 +1,41 @@ +plugins { + id("com.android.application") + id("kotlin-android") + // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. + id("dev.flutter.flutter-gradle-plugin") +} + +android { + namespace = "io.flutter.plugins.googlemobileads.mediation.gma_mediation_maio_example" + compileSdk = flutter.compileSdkVersion + ndkVersion = flutter.ndkVersion + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlinOptions { jvmTarget = JavaVersion.VERSION_11.toString() } + + defaultConfig { + // TODO: Specify your own unique Application ID + // (https://developer.android.com/studio/build/application-id.html). + applicationId = "io.flutter.plugins.googlemobileads.mediation.gma_mediation_maio_example" + // You can update the following values to match your application needs. + // For more information, see: https://flutter.dev/to/review-gradle-config. + minSdk = 23 + targetSdk = flutter.targetSdkVersion + versionCode = flutter.versionCode + versionName = flutter.versionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig = signingConfigs.getByName("debug") + } + } +} + +flutter { source = "../.." } diff --git a/packages/mediation/gma_mediation_maio/example/android/app/src/debug/AndroidManifest.xml b/packages/mediation/gma_mediation_maio/example/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 000000000..399f6981d --- /dev/null +++ b/packages/mediation/gma_mediation_maio/example/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/packages/mediation/gma_mediation_maio/example/android/app/src/main/AndroidManifest.xml b/packages/mediation/gma_mediation_maio/example/android/app/src/main/AndroidManifest.xml new file mode 100644 index 000000000..ac35f6e2b --- /dev/null +++ b/packages/mediation/gma_mediation_maio/example/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_maio/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_maio_example/MainActivity.kt b/packages/mediation/gma_mediation_maio/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_maio_example/MainActivity.kt new file mode 100644 index 000000000..590c3012b --- /dev/null +++ b/packages/mediation/gma_mediation_maio/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_maio_example/MainActivity.kt @@ -0,0 +1,5 @@ +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_maio_example + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity : FlutterActivity() diff --git a/packages/mediation/gma_mediation_maio/example/android/app/src/main/res/drawable-v21/launch_background.xml b/packages/mediation/gma_mediation_maio/example/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 000000000..f74085f3f --- /dev/null +++ b/packages/mediation/gma_mediation_maio/example/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/mediation/gma_mediation_maio/example/android/app/src/main/res/drawable/launch_background.xml b/packages/mediation/gma_mediation_maio/example/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 000000000..304732f88 --- /dev/null +++ b/packages/mediation/gma_mediation_maio/example/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/mediation/gma_mediation_maio/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/mediation/gma_mediation_maio/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..db77bb4b7 Binary files /dev/null and b/packages/mediation/gma_mediation_maio/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_maio/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/mediation/gma_mediation_maio/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..17987b79b Binary files /dev/null and b/packages/mediation/gma_mediation_maio/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_maio/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/mediation/gma_mediation_maio/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..09d439148 Binary files /dev/null and b/packages/mediation/gma_mediation_maio/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_maio/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/mediation/gma_mediation_maio/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..d5f1c8d34 Binary files /dev/null and b/packages/mediation/gma_mediation_maio/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_maio/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/packages/mediation/gma_mediation_maio/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..4d6372eeb Binary files /dev/null and b/packages/mediation/gma_mediation_maio/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_maio/example/android/app/src/main/res/values-night/styles.xml b/packages/mediation/gma_mediation_maio/example/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 000000000..06952be74 --- /dev/null +++ b/packages/mediation/gma_mediation_maio/example/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/packages/mediation/gma_mediation_maio/example/android/app/src/main/res/values/styles.xml b/packages/mediation/gma_mediation_maio/example/android/app/src/main/res/values/styles.xml new file mode 100644 index 000000000..cb1ef8805 --- /dev/null +++ b/packages/mediation/gma_mediation_maio/example/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/packages/mediation/gma_mediation_maio/example/android/app/src/profile/AndroidManifest.xml b/packages/mediation/gma_mediation_maio/example/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 000000000..399f6981d --- /dev/null +++ b/packages/mediation/gma_mediation_maio/example/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/packages/mediation/gma_mediation_maio/example/android/build.gradle.kts b/packages/mediation/gma_mediation_maio/example/android/build.gradle.kts new file mode 100644 index 000000000..893d07262 --- /dev/null +++ b/packages/mediation/gma_mediation_maio/example/android/build.gradle.kts @@ -0,0 +1,20 @@ +allprojects { + repositories { + google() + mavenCentral() + maven { url = uri("https://imobile-maio.github.io/maven") } + } +} + +val newBuildDir: Directory = rootProject.layout.buildDirectory.dir("../../build").get() + +rootProject.layout.buildDirectory.value(newBuildDir) + +subprojects { + val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name) + project.layout.buildDirectory.value(newSubprojectBuildDir) +} + +subprojects { project.evaluationDependsOn(":app") } + +tasks.register("clean") { delete(rootProject.layout.buildDirectory) } diff --git a/packages/mediation/gma_mediation_maio/example/android/gma_mediation_maio_example_android.iml b/packages/mediation/gma_mediation_maio/example/android/gma_mediation_maio_example_android.iml new file mode 100644 index 000000000..18999696a --- /dev/null +++ b/packages/mediation/gma_mediation_maio/example/android/gma_mediation_maio_example_android.iml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_maio/example/android/gradle.properties b/packages/mediation/gma_mediation_maio/example/android/gradle.properties new file mode 100644 index 000000000..f018a6181 --- /dev/null +++ b/packages/mediation/gma_mediation_maio/example/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError +android.useAndroidX=true +android.enableJetifier=true diff --git a/packages/mediation/gma_mediation_maio/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/mediation/gma_mediation_maio/example/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 000000000..f004c34c0 --- /dev/null +++ b/packages/mediation/gma_mediation_maio/example/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip diff --git a/packages/mediation/gma_mediation_maio/example/android/gradlew b/packages/mediation/gma_mediation_maio/example/android/gradlew new file mode 100755 index 000000000..9d82f7891 --- /dev/null +++ b/packages/mediation/gma_mediation_maio/example/android/gradlew @@ -0,0 +1,160 @@ +#!/usr/bin/env bash + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn ( ) { + echo "$*" +} + +die ( ) { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; +esac + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules +function splitJvmOpts() { + JVM_OPTS=("$@") +} +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS +JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" + +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/packages/mediation/gma_mediation_maio/example/android/gradlew.bat b/packages/mediation/gma_mediation_maio/example/android/gradlew.bat new file mode 100644 index 000000000..aec99730b --- /dev/null +++ b/packages/mediation/gma_mediation_maio/example/android/gradlew.bat @@ -0,0 +1,90 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windowz variants + +if not "%OS%" == "Windows_NT" goto win9xME_args +if "%@eval[2+2]" == "4" goto 4NT_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* +goto execute + +:4NT_args +@rem Get arguments from the 4NT Shell from JP Software +set CMD_LINE_ARGS=%$ + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/packages/mediation/gma_mediation_maio/example/android/settings.gradle.kts b/packages/mediation/gma_mediation_maio/example/android/settings.gradle.kts new file mode 100644 index 000000000..4eac8be0d --- /dev/null +++ b/packages/mediation/gma_mediation_maio/example/android/settings.gradle.kts @@ -0,0 +1,25 @@ +pluginManagement { + val flutterSdkPath = run { + val properties = java.util.Properties() + file("local.properties").inputStream().use { properties.load(it) } + val flutterSdkPath = properties.getProperty("flutter.sdk") + require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" } + flutterSdkPath + } + + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") + + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +plugins { + id("dev.flutter.flutter-plugin-loader") version "1.0.0" + id("com.android.application") version "8.13.1" apply false + id("org.jetbrains.kotlin.android") version "2.2.21" apply false +} + +include(":app") diff --git a/packages/mediation/gma_mediation_maio/example/gma_mediation_maio_example.iml b/packages/mediation/gma_mediation_maio/example/gma_mediation_maio_example.iml new file mode 100644 index 000000000..f66303d53 --- /dev/null +++ b/packages/mediation/gma_mediation_maio/example/gma_mediation_maio_example.iml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_maio/example/ios/Flutter/AppFrameworkInfo.plist b/packages/mediation/gma_mediation_maio/example/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 000000000..7c5696400 --- /dev/null +++ b/packages/mediation/gma_mediation_maio/example/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 12.0 + + diff --git a/packages/mediation/gma_mediation_maio/example/ios/Flutter/Debug.xcconfig b/packages/mediation/gma_mediation_maio/example/ios/Flutter/Debug.xcconfig new file mode 100644 index 000000000..592ceee85 --- /dev/null +++ b/packages/mediation/gma_mediation_maio/example/ios/Flutter/Debug.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/packages/mediation/gma_mediation_maio/example/ios/Flutter/Release.xcconfig b/packages/mediation/gma_mediation_maio/example/ios/Flutter/Release.xcconfig new file mode 100644 index 000000000..592ceee85 --- /dev/null +++ b/packages/mediation/gma_mediation_maio/example/ios/Flutter/Release.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/packages/mediation/gma_mediation_maio/example/ios/Runner.xcodeproj/project.pbxproj b/packages/mediation/gma_mediation_maio/example/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 000000000..6ddbb5610 --- /dev/null +++ b/packages/mediation/gma_mediation_maio/example/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,616 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 97C146E61CF9000F007C117D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 97C146ED1CF9000F007C117D; + remoteInfo = Runner; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 331C8082294A63A400263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C807B294A618700263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + 331C8082294A63A400263BE5 /* RunnerTests */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + 331C8081294A63A400263BE5 /* RunnerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C8080294A63A400263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 331C807D294A63A400263BE5 /* Sources */, + 331C807F294A63A400263BE5 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 331C8086294A63A400263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1510; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 331C8080294A63A400263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 97C146ED1CF9000F007C117D; + }; + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + 331C8080294A63A400263BE5 /* RunnerTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 331C807F294A63A400263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 331C807D294A63A400263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 331C8086294A63A400263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 97C146ED1CF9000F007C117D /* Runner */; + targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationMaioExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 331C8088294A63A400263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationMaioExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Debug; + }; + 331C8089294A63A400263BE5 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationMaioExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Release; + }; + 331C808A294A63A400263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationMaioExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationMaioExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationMaioExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C8088294A63A400263BE5 /* Debug */, + 331C8089294A63A400263BE5 /* Release */, + 331C808A294A63A400263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/packages/mediation/gma_mediation_maio/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/mediation/gma_mediation_maio/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..919434a62 --- /dev/null +++ b/packages/mediation/gma_mediation_maio/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/packages/mediation/gma_mediation_maio/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/mediation/gma_mediation_maio/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000..18d981003 --- /dev/null +++ b/packages/mediation/gma_mediation_maio/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/packages/mediation/gma_mediation_maio/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/mediation/gma_mediation_maio/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 000000000..f9b0d7c5e --- /dev/null +++ b/packages/mediation/gma_mediation_maio/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/packages/mediation/gma_mediation_maio/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/mediation/gma_mediation_maio/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 000000000..15cada483 --- /dev/null +++ b/packages/mediation/gma_mediation_maio/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_maio/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/packages/mediation/gma_mediation_maio/example/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..1d526a16e --- /dev/null +++ b/packages/mediation/gma_mediation_maio/example/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/packages/mediation/gma_mediation_maio/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/mediation/gma_mediation_maio/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000..18d981003 --- /dev/null +++ b/packages/mediation/gma_mediation_maio/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/packages/mediation/gma_mediation_maio/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/mediation/gma_mediation_maio/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 000000000..f9b0d7c5e --- /dev/null +++ b/packages/mediation/gma_mediation_maio/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/packages/mediation/gma_mediation_maio/example/ios/Runner/AppDelegate.swift b/packages/mediation/gma_mediation_maio/example/ios/Runner/AppDelegate.swift new file mode 100644 index 000000000..626664468 --- /dev/null +++ b/packages/mediation/gma_mediation_maio/example/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import Flutter +import UIKit + +@main +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..d36b1fab2 --- /dev/null +++ b/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 000000000..dc9ada472 Binary files /dev/null and b/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 000000000..7353c41ec Binary files /dev/null and b/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 000000000..797d452e4 Binary files /dev/null and b/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 000000000..6ed2d933e Binary files /dev/null and b/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 000000000..4cd7b0099 Binary files /dev/null and b/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 000000000..fe730945a Binary files /dev/null and b/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 000000000..321773cd8 Binary files /dev/null and b/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 000000000..797d452e4 Binary files /dev/null and b/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 000000000..502f463a9 Binary files /dev/null and b/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 000000000..0ec303439 Binary files /dev/null and b/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 000000000..0ec303439 Binary files /dev/null and b/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 000000000..e9f5fea27 Binary files /dev/null and b/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 000000000..84ac32ae7 Binary files /dev/null and b/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 000000000..8953cba09 Binary files /dev/null and b/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 000000000..0467bf12a Binary files /dev/null and b/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 000000000..0bedcf2fd --- /dev/null +++ b/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchImage.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 000000000..89c2725b7 --- /dev/null +++ b/packages/mediation/gma_mediation_maio/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/packages/mediation/gma_mediation_maio/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/packages/mediation/gma_mediation_maio/example/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 000000000..f2e259c7c --- /dev/null +++ b/packages/mediation/gma_mediation_maio/example/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_maio/example/ios/Runner/Base.lproj/Main.storyboard b/packages/mediation/gma_mediation_maio/example/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 000000000..f3c28516f --- /dev/null +++ b/packages/mediation/gma_mediation_maio/example/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_maio/example/ios/Runner/Info.plist b/packages/mediation/gma_mediation_maio/example/ios/Runner/Info.plist new file mode 100644 index 000000000..8a69f473a --- /dev/null +++ b/packages/mediation/gma_mediation_maio/example/ios/Runner/Info.plist @@ -0,0 +1,49 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Gma Mediation Maio + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + gma_mediation_maio_example + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + CADisableMinimumFrameDurationOnPhone + + UIApplicationSupportsIndirectInputEvents + + + diff --git a/packages/mediation/gma_mediation_maio/example/ios/Runner/Runner-Bridging-Header.h b/packages/mediation/gma_mediation_maio/example/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 000000000..308a2a560 --- /dev/null +++ b/packages/mediation/gma_mediation_maio/example/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/packages/mediation/gma_mediation_maio/example/lib/main.dart b/packages/mediation/gma_mediation_maio/example/lib/main.dart new file mode 100644 index 000000000..ea02decb7 --- /dev/null +++ b/packages/mediation/gma_mediation_maio/example/lib/main.dart @@ -0,0 +1,29 @@ +import 'package:flutter/material.dart'; + +void main() { + runApp(const MyApp()); +} + +class MyApp extends StatefulWidget { + const MyApp({super.key}); + + @override + State createState() => _MyAppState(); +} + +class _MyAppState extends State { + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Scaffold( + appBar: AppBar(title: const Text('Plugin example app')), + body: const Center(child: Text('Test app')), + ), + ); + } +} diff --git a/packages/mediation/gma_mediation_maio/example/pubspec.lock b/packages/mediation/gma_mediation_maio/example/pubspec.lock new file mode 100644 index 000000000..4c929ea20 --- /dev/null +++ b/packages/mediation/gma_mediation_maio/example/pubspec.lock @@ -0,0 +1,323 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + async: + dependency: transitive + description: + name: async + sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63 + url: "https://pub.dev" + source: hosted + version: "2.12.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + characters: + dependency: transitive + description: + name: characters + sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 + url: "https://pub.dev" + source: hosted + version: "1.4.0" + clock: + dependency: transitive + description: + name: clock + sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b + url: "https://pub.dev" + source: hosted + version: "1.1.2" + collection: + dependency: transitive + description: + name: collection + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" + url: "https://pub.dev" + source: hosted + version: "1.19.1" + cupertino_icons: + dependency: "direct main" + description: + name: cupertino_icons + sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 + url: "https://pub.dev" + source: hosted + version: "1.0.8" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc" + url: "https://pub.dev" + source: hosted + version: "1.3.2" + file: + dependency: transitive + description: + name: file + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 + url: "https://pub.dev" + source: hosted + version: "7.0.1" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_driver: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" + url: "https://pub.dev" + source: hosted + version: "5.0.0" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + fuchsia_remote_debug_protocol: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + gma_mediation_maio: + dependency: "direct main" + description: + path: ".." + relative: true + source: path + version: "1.0.0" + google_mobile_ads: + dependency: transitive + description: + name: google_mobile_ads + sha256: "0d4a3744b5e8ed1b8be6a1b452d309f811688855a497c6113fc4400f922db603" + url: "https://pub.dev" + source: hosted + version: "5.3.1" + integration_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec + url: "https://pub.dev" + source: hosted + version: "10.0.8" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 + url: "https://pub.dev" + source: hosted + version: "3.0.9" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + lints: + dependency: transitive + description: + name: lints + sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7 + url: "https://pub.dev" + source: hosted + version: "5.1.1" + matcher: + dependency: transitive + description: + name: matcher + sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 + url: "https://pub.dev" + source: hosted + version: "0.12.17" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + url: "https://pub.dev" + source: hosted + version: "0.11.1" + meta: + dependency: transitive + description: + name: meta + sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c + url: "https://pub.dev" + source: hosted + version: "1.16.0" + path: + dependency: transitive + description: + name: path + sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" + url: "https://pub.dev" + source: hosted + version: "1.9.1" + platform: + dependency: transitive + description: + name: platform + sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" + url: "https://pub.dev" + source: hosted + version: "3.1.6" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" + process: + dependency: transitive + description: + name: process + sha256: "107d8be718f120bbba9dcd1e95e3bd325b1b4a4f07db64154635ba03f2567a0d" + url: "https://pub.dev" + source: hosted + version: "5.0.3" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + source_span: + dependency: transitive + description: + name: source_span + sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" + url: "https://pub.dev" + source: hosted + version: "1.10.1" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" + url: "https://pub.dev" + source: hosted + version: "1.12.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" + url: "https://pub.dev" + source: hosted + version: "1.4.1" + sync_http: + dependency: transitive + description: + name: sync_http + sha256: "7f0cd72eca000d2e026bcd6f990b81d0ca06022ef4e32fb257b30d3d1014a961" + url: "https://pub.dev" + source: hosted + version: "0.3.1" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" + url: "https://pub.dev" + source: hosted + version: "1.2.2" + test_api: + dependency: transitive + description: + name: test_api + sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd + url: "https://pub.dev" + source: hosted + version: "0.7.4" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14" + url: "https://pub.dev" + source: hosted + version: "14.3.1" + webdriver: + dependency: transitive + description: + name: webdriver + sha256: "3d773670966f02a646319410766d3b5e1037efb7f07cc68f844d5e06cd4d61c8" + url: "https://pub.dev" + source: hosted + version: "3.0.4" + webview_flutter: + dependency: transitive + description: + name: webview_flutter + sha256: "889a0a678e7c793c308c68739996227c9661590605e70b1f6cf6b9a6634f7aec" + url: "https://pub.dev" + source: hosted + version: "4.10.0" + webview_flutter_android: + dependency: transitive + description: + name: webview_flutter_android + sha256: "512c26ccc5b8a571fd5d13ec994b7509f142ff6faf85835e243dde3538fdc713" + url: "https://pub.dev" + source: hosted + version: "4.3.2" + webview_flutter_platform_interface: + dependency: transitive + description: + name: webview_flutter_platform_interface + sha256: d937581d6e558908d7ae3dc1989c4f87b786891ab47bb9df7de548a151779d8d + url: "https://pub.dev" + source: hosted + version: "2.10.0" + webview_flutter_wkwebview: + dependency: transitive + description: + name: webview_flutter_wkwebview + sha256: d7403ef4f042714c9ee2b26eaac4cadae7394cb0d4e608b1dd850c3ff96bd893 + url: "https://pub.dev" + source: hosted + version: "3.18.2" +sdks: + dart: ">=3.7.0 <4.0.0" + flutter: ">=3.24.0" diff --git a/packages/mediation/gma_mediation_maio/example/pubspec.yaml b/packages/mediation/gma_mediation_maio/example/pubspec.yaml new file mode 100644 index 000000000..b98ecb352 --- /dev/null +++ b/packages/mediation/gma_mediation_maio/example/pubspec.yaml @@ -0,0 +1,86 @@ +name: gma_mediation_maio_example +description: "Demonstrates how to use the gma_mediation_maio plugin." +# The following line prevents the package from being accidentally published to +# pub.dev using `flutter pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +environment: + sdk: ^3.9.0 + +# Dependencies specify other packages that your package needs in order to work. +# To automatically upgrade your package dependencies to the latest versions +# consider running `flutter pub upgrade --major-versions`. Alternatively, +# dependencies can be manually updated by changing the version numbers below to +# the latest version available on pub.dev. To see which dependencies have newer +# versions available, run `flutter pub outdated`. +dependencies: + flutter: + sdk: flutter + + google_mobile_ads: ^7.0.0 + gma_mediation_maio: + # When depending on this package from a real application you should use: + # gma_mediation_maio: ^x.y.z + # See https://dart.dev/tools/pub/dependencies#version-constraints + # The example app is bundled with the plugin so we use a path dependency on + # the parent directory to use the current plugin's version. + path: ../ + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^1.0.8 + +dev_dependencies: + integration_test: + sdk: flutter + flutter_test: + sdk: flutter + + # The "flutter_lints" package below contains a set of recommended lints to + # encourage good coding practices. The lint set provided by the package is + # activated in the `analysis_options.yaml` file located at the root of your + # package. See that file for information about deactivating specific lint + # rules and activating additional ones. + flutter_lints: ^6.0.0 + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter packages. +flutter: + + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + + # To add assets to your application, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/to/resolution-aware-images + + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/to/asset-from-package + + # To add custom fonts to your application, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts from package dependencies, + # see https://flutter.dev/to/font-from-package diff --git a/packages/mediation/gma_mediation_maio/gma_mediation_maio.iml b/packages/mediation/gma_mediation_maio/gma_mediation_maio.iml new file mode 100644 index 000000000..27686dd4b --- /dev/null +++ b/packages/mediation/gma_mediation_maio/gma_mediation_maio.iml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_maio/ios/Classes/GmaMediationmaioPlugin.swift b/packages/mediation/gma_mediation_maio/ios/Classes/GmaMediationmaioPlugin.swift new file mode 100644 index 000000000..e4a9a2480 --- /dev/null +++ b/packages/mediation/gma_mediation_maio/ios/Classes/GmaMediationmaioPlugin.swift @@ -0,0 +1,23 @@ +// Copyright 2025 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 +// +// https://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 Flutter +import UIKit + +/// Required to link the iOS dependency of the maio Adapter. +public class GmaMediationmaioPlugin: NSObject, FlutterPlugin { + public static func register(with registrar: FlutterPluginRegistrar) {} + + public func detachFromEngine(for registrar: FlutterPluginRegistrar) {} +} diff --git a/packages/mediation/gma_mediation_maio/ios/Resources/PrivacyInfo.xcprivacy b/packages/mediation/gma_mediation_maio/ios/Resources/PrivacyInfo.xcprivacy new file mode 100644 index 000000000..a34b7e2e6 --- /dev/null +++ b/packages/mediation/gma_mediation_maio/ios/Resources/PrivacyInfo.xcprivacy @@ -0,0 +1,14 @@ + + + + + NSPrivacyTrackingDomains + + NSPrivacyAccessedAPITypes + + NSPrivacyCollectedDataTypes + + NSPrivacyTracking + + + diff --git a/packages/mediation/gma_mediation_maio/ios/gma_mediation_maio.podspec b/packages/mediation/gma_mediation_maio/ios/gma_mediation_maio.podspec new file mode 100644 index 000000000..37109114a --- /dev/null +++ b/packages/mediation/gma_mediation_maio/ios/gma_mediation_maio.podspec @@ -0,0 +1,21 @@ +Pod::Spec.new do |s| + s.name = 'gma_mediation_maio' + s.version = '1.1.2' + s.summary = 'Google Mobile Ads Mediation of maio.' + s.description = <<-DESC + Mediation Adapter for maio to use with Google Mobile Ads. + DESC + s.homepage = 'https://developers.google.com/admob/flutter/mediation/maio' + s.license = { :file => '../LICENSE' } + s.author = { 'Google LLC' => 'mediation-support@google.com' } + s.source = { :path => '.' } + s.source_files = 'Classes/**/*' + s.dependency 'Flutter' + s.dependency 'GoogleMobileAdsMediationMaio', '~>2.2.0.1' + s.platform = :ios, '13.0' + s.static_framework = true + + s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' } + s.swift_version = '5.0' + +end diff --git a/packages/mediation/gma_mediation_maio/lib/gma_mediation_maio.dart b/packages/mediation/gma_mediation_maio/lib/gma_mediation_maio.dart new file mode 100644 index 000000000..91f9c8a6f --- /dev/null +++ b/packages/mediation/gma_mediation_maio/lib/gma_mediation_maio.dart @@ -0,0 +1,16 @@ +// Copyright 2025 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 +// +// https://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. + +/// This empty class is needed to allow correct compatibility analysis with host platforms. +class GmaMediationmaio {} diff --git a/packages/mediation/gma_mediation_maio/pubspec.lock b/packages/mediation/gma_mediation_maio/pubspec.lock new file mode 100644 index 000000000..e72b0d763 --- /dev/null +++ b/packages/mediation/gma_mediation_maio/pubspec.lock @@ -0,0 +1,261 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + async: + dependency: transitive + description: + name: async + sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63 + url: "https://pub.dev" + source: hosted + version: "2.12.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + characters: + dependency: transitive + description: + name: characters + sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 + url: "https://pub.dev" + source: hosted + version: "1.4.0" + clock: + dependency: transitive + description: + name: clock + sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b + url: "https://pub.dev" + source: hosted + version: "1.1.2" + collection: + dependency: transitive + description: + name: collection + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" + url: "https://pub.dev" + source: hosted + version: "1.19.1" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc" + url: "https://pub.dev" + source: hosted + version: "1.3.2" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" + url: "https://pub.dev" + source: hosted + version: "5.0.0" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + google_mobile_ads: + dependency: "direct main" + description: + name: google_mobile_ads + sha256: "0d4a3744b5e8ed1b8be6a1b452d309f811688855a497c6113fc4400f922db603" + url: "https://pub.dev" + source: hosted + version: "5.3.1" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec + url: "https://pub.dev" + source: hosted + version: "10.0.8" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 + url: "https://pub.dev" + source: hosted + version: "3.0.9" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + lint: + dependency: "direct dev" + description: + name: lint + sha256: "68d71111816dc7c1de358281e506efe574bb5072eae4a19f8a57484bf96825f5" + url: "https://pub.dev" + source: hosted + version: "2.6.1" + lints: + dependency: transitive + description: + name: lints + sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7 + url: "https://pub.dev" + source: hosted + version: "5.1.1" + matcher: + dependency: transitive + description: + name: matcher + sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 + url: "https://pub.dev" + source: hosted + version: "0.12.17" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + url: "https://pub.dev" + source: hosted + version: "0.11.1" + meta: + dependency: transitive + description: + name: meta + sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c + url: "https://pub.dev" + source: hosted + version: "1.16.0" + path: + dependency: transitive + description: + name: path + sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" + url: "https://pub.dev" + source: hosted + version: "1.9.1" + plugin_platform_interface: + dependency: "direct main" + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + source_span: + dependency: transitive + description: + name: source_span + sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" + url: "https://pub.dev" + source: hosted + version: "1.10.1" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" + url: "https://pub.dev" + source: hosted + version: "1.12.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" + url: "https://pub.dev" + source: hosted + version: "1.4.1" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" + url: "https://pub.dev" + source: hosted + version: "1.2.2" + test_api: + dependency: transitive + description: + name: test_api + sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd + url: "https://pub.dev" + source: hosted + version: "0.7.4" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14" + url: "https://pub.dev" + source: hosted + version: "14.3.1" + webview_flutter: + dependency: transitive + description: + name: webview_flutter + sha256: "889a0a678e7c793c308c68739996227c9661590605e70b1f6cf6b9a6634f7aec" + url: "https://pub.dev" + source: hosted + version: "4.10.0" + webview_flutter_android: + dependency: transitive + description: + name: webview_flutter_android + sha256: "512c26ccc5b8a571fd5d13ec994b7509f142ff6faf85835e243dde3538fdc713" + url: "https://pub.dev" + source: hosted + version: "4.3.2" + webview_flutter_platform_interface: + dependency: transitive + description: + name: webview_flutter_platform_interface + sha256: d937581d6e558908d7ae3dc1989c4f87b786891ab47bb9df7de548a151779d8d + url: "https://pub.dev" + source: hosted + version: "2.10.0" + webview_flutter_wkwebview: + dependency: transitive + description: + name: webview_flutter_wkwebview + sha256: d7403ef4f042714c9ee2b26eaac4cadae7394cb0d4e608b1dd850c3ff96bd893 + url: "https://pub.dev" + source: hosted + version: "3.18.2" +sdks: + dart: ">=3.7.0 <4.0.0" + flutter: ">=3.24.0" diff --git a/packages/mediation/gma_mediation_maio/pubspec.yaml b/packages/mediation/gma_mediation_maio/pubspec.yaml new file mode 100644 index 000000000..31e473be6 --- /dev/null +++ b/packages/mediation/gma_mediation_maio/pubspec.yaml @@ -0,0 +1,26 @@ +name: gma_mediation_maio +description: 'Mediation Adapter that enables sending ad requests to the maio + ad network using the google_mobile_ads plugin.' +version: 1.1.2 +environment: + sdk: '>=3.9.0 <4.0.0' + flutter: '>=3.35.1' +dependencies: + flutter: + sdk: flutter + google_mobile_ads: ^7.0.0 + plugin_platform_interface: ^2.0.2 +dev_dependencies: + flutter_test: + sdk: flutter + flutter_lints: ^6.0.0 + lint: ^2.6.1 +flutter: + plugin: + platforms: + android: + package: io.flutter.plugins.googlemobileads.mediation.gma_mediation_maio + pluginClass: GmaMediationmaioPlugin + ios: + pluginClass: GmaMediationmaioPlugin +repository: https://github.com/googleads/googleads-mobile-flutter/tree/main/packages/mediation/gma_mediation_maio diff --git a/packages/mediation/gma_mediation_meta/.gitignore b/packages/mediation/gma_mediation_meta/.gitignore new file mode 100644 index 000000000..ac5aa9893 --- /dev/null +++ b/packages/mediation/gma_mediation_meta/.gitignore @@ -0,0 +1,29 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. +/pubspec.lock +**/doc/api/ +.dart_tool/ +build/ diff --git a/packages/mediation/gma_mediation_meta/.metadata b/packages/mediation/gma_mediation_meta/.metadata new file mode 100644 index 000000000..ca8861855 --- /dev/null +++ b/packages/mediation/gma_mediation_meta/.metadata @@ -0,0 +1,33 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "67457e669f79e9f8d13d7a68fe09775fefbb79f4" + channel: "stable" + +project_type: plugin + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: 67457e669f79e9f8d13d7a68fe09775fefbb79f4 + base_revision: 67457e669f79e9f8d13d7a68fe09775fefbb79f4 + - platform: android + create_revision: 67457e669f79e9f8d13d7a68fe09775fefbb79f4 + base_revision: 67457e669f79e9f8d13d7a68fe09775fefbb79f4 + - platform: ios + create_revision: 67457e669f79e9f8d13d7a68fe09775fefbb79f4 + base_revision: 67457e669f79e9f8d13d7a68fe09775fefbb79f4 + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/packages/mediation/gma_mediation_meta/CHANGELOG.md b/packages/mediation/gma_mediation_meta/CHANGELOG.md new file mode 100644 index 000000000..e07ff8727 --- /dev/null +++ b/packages/mediation/gma_mediation_meta/CHANGELOG.md @@ -0,0 +1,54 @@ +## Meta Audience Network Flutter Mediation Adapter Changelog + +#### Version 1.5.0 +* Supports [Meta Audience Network Android adapter version 6.21.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/meta/CHANGELOG.md#version-62100). +* Supports [Meta Audience Network iOS adapter version 6.21.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Meta/CHANGELOG.md#version-62100). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.4.3 +* Supports [Meta Audience Network Android adapter version 6.20.0.2](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/meta/CHANGELOG.md#version-62002). +* Supports [Meta Audience Network iOS adapter version 6.20.1.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Meta/CHANGELOG.md#version-62010). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.4.2 +* Supports [Meta Audience Network Android adapter version 6.20.0.1](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/meta/CHANGELOG.md#version-62001). +* Supports [Meta Audience Network iOS adapter version 6.20.1.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Meta/CHANGELOG.md#version-62010). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.4.1 +* Supports [Meta Audience Network Android adapter version 6.20.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/meta/CHANGELOG.md#version-62000). +* Supports [Meta Audience Network iOS adapter version 6.20.1.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Meta/CHANGELOG.md#version-62010). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.4.0 +* Supports [Meta Audience Network Android adapter version 6.20.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/meta/CHANGELOG.md#version-62000). +* Supports [Meta Audience Network iOS adapter version 6.20.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Meta/CHANGELOG.md#version-62000). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.3.0 +* Supports [Meta Audience Network Android adapter version 6.20.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/meta/CHANGELOG.md#version-62000). +* Supports [Meta Audience Network iOS adapter version 6.17.1.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Meta/CHANGELOG.md#version-61710). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.2.0 +* Supports [Meta Audience Network Android adapter version 6.19.0.1](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/meta/CHANGELOG.md#version-61901). +* Supports [Meta Audience Network iOS adapter version 6.17.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Meta/CHANGELOG.md#version-61700). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.1.0 +* iOS plugin is now a static framework. +* Supports [Meta Audience Network Android adapter version 6.18.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/meta/CHANGELOG.md#version-61800). +* Supports [Meta Audience Network iOS adapter version 6.16.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Meta/CHANGELOG.md#version-61600). +* Built and tested with the Google Mobile Ads Flutter Plugin version 5.3.1. + +#### Version 1.0.1 +* Added dart class to allow correct compatibility analysis with host platforms +- Supports [Meta Audience Network Android adapter version 6.17.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/meta/CHANGELOG.md#version-61700). +- Supports [Meta Audience Network iOS adapter version 6.15.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Meta/CHANGELOG.md#version-61500). +* Built and tested with the Google Mobile Ads Flutter Plugin version 5.1.0. + +#### Version 1.0.0 +* Initial release. +- Supports [Meta Audience Network Android adapter version 6.17.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/meta/CHANGELOG.md#version-61700). +- Supports [Meta Audience Network iOS adapter version 6.15.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Meta/CHANGELOG.md#version-61500). +* Built and tested with the Google Mobile Ads Flutter Plugin version 5.0.0. diff --git a/packages/mediation/gma_mediation_meta/LICENSE b/packages/mediation/gma_mediation_meta/LICENSE new file mode 100644 index 000000000..e58143fcc --- /dev/null +++ b/packages/mediation/gma_mediation_meta/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 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. diff --git a/packages/mediation/gma_mediation_meta/README.md b/packages/mediation/gma_mediation_meta/README.md new file mode 100644 index 000000000..49d095dff --- /dev/null +++ b/packages/mediation/gma_mediation_meta/README.md @@ -0,0 +1,31 @@ +# Google Mobile Ads Mediation of Meta Audience Network for Flutter + +[![gma_mediation_meta](https://github.com/googleads/googleads-mobile-flutter/actions/workflows/google_mobile_ads.yaml/badge.svg)](https://github.com/googleads/googleads-mobile-flutter/actions/workflows/google_mobile_ads.yaml) + +This repository contains the source code for the Mediation Meta Audience Network +Flutter plugin to be used with the Google Mobile Ads plugin. It enables +mediation of the Meta Ad Network through the Google Mobile Ads SDK. + +## Documentation +For instructions on how to use with the google_mobile_ads plugin, refer to the +developer guide for [Meta Audience Network](https://developers.google.com/admob/flutter/mediation/meta). + +## Downloads + +See [pub.dev](https://pub.dev/packages/gma_mediation_meta/versions) for the +latest releases of the plugin. + +## Suggesting improvements + +To file bugs, make feature requests, or to suggest other improvements, please +use [github's issue tracker](https://github.com/googleads/googleads-mobile-flutter/issues). + + +## Other resources + +* [AdMob help center](https://support.google.com/admob/?hl=en#topic=7383088) +* [Ad Manager help center](https://support.google.com/admanager/?hl=en#topic=7505988) + +## License + +[Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0) diff --git a/packages/mediation/gma_mediation_meta/analysis_options.yaml b/packages/mediation/gma_mediation_meta/analysis_options.yaml new file mode 100644 index 000000000..fac4bcd12 --- /dev/null +++ b/packages/mediation/gma_mediation_meta/analysis_options.yaml @@ -0,0 +1,19 @@ +# 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 +# +# https://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. + +include: package:lint/package.yaml + +analyzer: + exclude: + - '**.g.dart' \ No newline at end of file diff --git a/packages/mediation/gma_mediation_meta/android/.gitignore b/packages/mediation/gma_mediation_meta/android/.gitignore new file mode 100644 index 000000000..161bdcdaf --- /dev/null +++ b/packages/mediation/gma_mediation_meta/android/.gitignore @@ -0,0 +1,9 @@ +*.iml +.gradle +/local.properties +/.idea/workspace.xml +/.idea/libraries +.DS_Store +/build +/captures +.cxx diff --git a/packages/mediation/gma_mediation_meta/android/build.gradle b/packages/mediation/gma_mediation_meta/android/build.gradle new file mode 100644 index 000000000..fb7d49a50 --- /dev/null +++ b/packages/mediation/gma_mediation_meta/android/build.gradle @@ -0,0 +1,73 @@ +group 'io.flutter.plugins.googlemobileads.mediation.gma_mediation_meta' +version = "1.5.0" + +buildscript { + ext.kotlin_version = '2.0.21' + repositories { + google() + mavenCentral() + } + + dependencies { + classpath 'com.android.tools.build:gradle:7.3.0' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + +allprojects { + repositories { + google() + mavenCentral() + } +} + +apply plugin: 'com.android.library' +apply plugin: 'kotlin-android' + +ext { + stringVersion = "6.21.0.0" +} + +android { + if (project.android.hasProperty("namespace")) { + namespace 'io.flutter.plugins.googlemobileads.mediation.gma_mediation_meta' + } + + compileSdkVersion 33 + + compileOptions { + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + test.java.srcDirs += 'src/test/kotlin' + } + + defaultConfig { + minSdkVersion 23 + } + + dependencies { + implementation "com.google.ads.mediation:facebook:$stringVersion" + testImplementation 'org.jetbrains.kotlin:kotlin-test' + testImplementation 'org.mockito:mockito-core:5.0.0' + } + + testOptions { + unitTests.all { + useJUnitPlatform() + + testLogging { + events "passed", "skipped", "failed", "standardOut", "standardError" + outputs.upToDateWhen {false} + showStandardStreams = true + } + } + } +} diff --git a/packages/mediation/gma_mediation_meta/android/settings.gradle b/packages/mediation/gma_mediation_meta/android/settings.gradle new file mode 100644 index 000000000..861716447 --- /dev/null +++ b/packages/mediation/gma_mediation_meta/android/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'gma_mediation_meta' diff --git a/packages/mediation/gma_mediation_meta/android/src/main/AndroidManifest.xml b/packages/mediation/gma_mediation_meta/android/src/main/AndroidManifest.xml new file mode 100644 index 000000000..cde84e5e7 --- /dev/null +++ b/packages/mediation/gma_mediation_meta/android/src/main/AndroidManifest.xml @@ -0,0 +1,3 @@ + + diff --git a/packages/mediation/gma_mediation_meta/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_meta/GmaMediationMetaPlugin.kt b/packages/mediation/gma_mediation_meta/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_meta/GmaMediationMetaPlugin.kt new file mode 100644 index 000000000..8ffed8890 --- /dev/null +++ b/packages/mediation/gma_mediation_meta/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_meta/GmaMediationMetaPlugin.kt @@ -0,0 +1,24 @@ +// 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 +// +// https://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. + +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_meta + +import io.flutter.embedding.engine.plugins.FlutterPlugin + +/** Required to link the Android dependency of the Meta Audience Network Adapter. */ +class GmaMediationMetaPlugin: FlutterPlugin { + override fun onAttachedToEngine(flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) { } + + override fun onDetachedFromEngine(binding: FlutterPlugin.FlutterPluginBinding) { } +} diff --git a/packages/mediation/gma_mediation_meta/example/.gitignore b/packages/mediation/gma_mediation_meta/example/.gitignore new file mode 100644 index 000000000..29a3a5017 --- /dev/null +++ b/packages/mediation/gma_mediation_meta/example/.gitignore @@ -0,0 +1,43 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.pub-cache/ +.pub/ +/build/ + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/packages/mediation/gma_mediation_meta/example/README.md b/packages/mediation/gma_mediation_meta/example/README.md new file mode 100644 index 000000000..672d76f86 --- /dev/null +++ b/packages/mediation/gma_mediation_meta/example/README.md @@ -0,0 +1,17 @@ +# gma_mediation_meta_example + +Learn how to integrate with your app that uses the [google_mobile_ads](https://pub.dev/packages/google_mobile_ads) plugin +by following the [development guide](https://developers.google.com/admob/flutter/mediation/meta). + +## Getting Started + +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) + +For help getting started with Flutter development, view the +[online documentation](https://docs.flutter.dev/), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/packages/mediation/gma_mediation_meta/example/analysis_options.yaml b/packages/mediation/gma_mediation_meta/example/analysis_options.yaml new file mode 100644 index 000000000..0d2902135 --- /dev/null +++ b/packages/mediation/gma_mediation_meta/example/analysis_options.yaml @@ -0,0 +1,28 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at https://dart.dev/lints. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/packages/mediation/gma_mediation_meta/example/android/.gitignore b/packages/mediation/gma_mediation_meta/example/android/.gitignore new file mode 100644 index 000000000..6f568019d --- /dev/null +++ b/packages/mediation/gma_mediation_meta/example/android/.gitignore @@ -0,0 +1,13 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +key.properties +**/*.keystore +**/*.jks diff --git a/samples/admob/adaptive_banner_example/android/app/build.gradle b/packages/mediation/gma_mediation_meta/example/android/app/build.gradle similarity index 66% rename from samples/admob/adaptive_banner_example/android/app/build.gradle rename to packages/mediation/gma_mediation_meta/example/android/app/build.gradle index e07c987b9..d8251030c 100644 --- a/samples/admob/adaptive_banner_example/android/app/build.gradle +++ b/packages/mediation/gma_mediation_meta/example/android/app/build.gradle @@ -1,3 +1,9 @@ +plugins { + id "com.android.application" + id "kotlin-android" + id "dev.flutter.flutter-gradle-plugin" +} + def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { @@ -6,11 +12,6 @@ if (localPropertiesFile.exists()) { } } -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - def flutterVersionCode = localProperties.getProperty('flutter.versionCode') if (flutterVersionCode == null) { flutterVersionCode = '1' @@ -21,21 +22,18 @@ if (flutterVersionName == null) { flutterVersionName = '1.0' } -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - android { + namespace "io.flutter.plugins.googlemobileads.mediation.gma_mediation_meta_example" compileSdkVersion flutter.compileSdkVersion ndkVersion flutter.ndkVersion compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } kotlinOptions { - jvmTarget = '1.8' + jvmTarget = JavaVersion.VERSION_11.toString() } sourceSets { @@ -44,14 +42,14 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.adaptive_banner_example" + applicationId "io.flutter.plugins.googlemobileads.mediation.gma_mediation_meta_example" // You can update the following values to match your application needs. - // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. - minSdkVersion 19 - multiDexEnabled true - targetSdkVersion 32 + // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. + minSdkVersion 23 + targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName + multiDexEnabled true } buildTypes { @@ -67,6 +65,4 @@ flutter { source '../..' } -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" -} +dependencies {} diff --git a/packages/mediation/gma_mediation_meta/example/android/app/src/debug/AndroidManifest.xml b/packages/mediation/gma_mediation_meta/example/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 000000000..399f6981d --- /dev/null +++ b/packages/mediation/gma_mediation_meta/example/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/packages/mediation/gma_mediation_meta/example/android/app/src/main/AndroidManifest.xml b/packages/mediation/gma_mediation_meta/example/android/app/src/main/AndroidManifest.xml new file mode 100644 index 000000000..69f030b58 --- /dev/null +++ b/packages/mediation/gma_mediation_meta/example/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_meta/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_meta_example/MainActivity.kt b/packages/mediation/gma_mediation_meta/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_meta_example/MainActivity.kt new file mode 100644 index 000000000..9c063b7c9 --- /dev/null +++ b/packages/mediation/gma_mediation_meta/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_meta_example/MainActivity.kt @@ -0,0 +1,5 @@ +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_meta_example + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() diff --git a/packages/mediation/gma_mediation_meta/example/android/app/src/main/res/drawable-v21/launch_background.xml b/packages/mediation/gma_mediation_meta/example/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 000000000..f74085f3f --- /dev/null +++ b/packages/mediation/gma_mediation_meta/example/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/mediation/gma_mediation_meta/example/android/app/src/main/res/drawable/launch_background.xml b/packages/mediation/gma_mediation_meta/example/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 000000000..304732f88 --- /dev/null +++ b/packages/mediation/gma_mediation_meta/example/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/mediation/gma_mediation_meta/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/mediation/gma_mediation_meta/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..db77bb4b7 Binary files /dev/null and b/packages/mediation/gma_mediation_meta/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_meta/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/mediation/gma_mediation_meta/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..17987b79b Binary files /dev/null and b/packages/mediation/gma_mediation_meta/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_meta/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/mediation/gma_mediation_meta/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..09d439148 Binary files /dev/null and b/packages/mediation/gma_mediation_meta/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_meta/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/mediation/gma_mediation_meta/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..d5f1c8d34 Binary files /dev/null and b/packages/mediation/gma_mediation_meta/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_meta/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/packages/mediation/gma_mediation_meta/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..4d6372eeb Binary files /dev/null and b/packages/mediation/gma_mediation_meta/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_meta/example/android/app/src/main/res/values-night/styles.xml b/packages/mediation/gma_mediation_meta/example/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 000000000..06952be74 --- /dev/null +++ b/packages/mediation/gma_mediation_meta/example/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/packages/mediation/gma_mediation_meta/example/android/app/src/main/res/values/styles.xml b/packages/mediation/gma_mediation_meta/example/android/app/src/main/res/values/styles.xml new file mode 100644 index 000000000..cb1ef8805 --- /dev/null +++ b/packages/mediation/gma_mediation_meta/example/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/packages/mediation/gma_mediation_meta/example/android/app/src/profile/AndroidManifest.xml b/packages/mediation/gma_mediation_meta/example/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 000000000..399f6981d --- /dev/null +++ b/packages/mediation/gma_mediation_meta/example/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/packages/mediation/gma_mediation_meta/example/android/build.gradle b/packages/mediation/gma_mediation_meta/example/android/build.gradle new file mode 100644 index 000000000..cff218755 --- /dev/null +++ b/packages/mediation/gma_mediation_meta/example/android/build.gradle @@ -0,0 +1,30 @@ +buildscript { + ext.kotlin_version = '2.0.21' + repositories { + google() + mavenCentral() + } + + dependencies { + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + +allprojects { + repositories { + google() + mavenCentral() + } +} + +rootProject.buildDir = '../build' +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(':app') +} + +tasks.register("clean", Delete) { + delete rootProject.buildDir +} diff --git a/packages/mediation/gma_mediation_meta/example/android/gradle.properties b/packages/mediation/gma_mediation_meta/example/android/gradle.properties new file mode 100644 index 000000000..598d13fee --- /dev/null +++ b/packages/mediation/gma_mediation_meta/example/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx4G +android.useAndroidX=true +android.enableJetifier=true diff --git a/packages/mediation/gma_mediation_meta/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/mediation/gma_mediation_meta/example/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 000000000..3c472b99c --- /dev/null +++ b/packages/mediation/gma_mediation_meta/example/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip diff --git a/packages/mediation/gma_mediation_meta/example/android/settings.gradle b/packages/mediation/gma_mediation_meta/example/android/settings.gradle new file mode 100644 index 000000000..7cd712855 --- /dev/null +++ b/packages/mediation/gma_mediation_meta/example/android/settings.gradle @@ -0,0 +1,29 @@ +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + } + settings.ext.flutterSdkPath = flutterSdkPath() + + includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") + + repositories { + google() + mavenCentral() + gradlePluginPortal() + } + + plugins { + id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false + } +} + +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "7.3.0" apply false +} + +include ":app" diff --git a/packages/mediation/gma_mediation_meta/example/ios/.gitignore b/packages/mediation/gma_mediation_meta/example/ios/.gitignore new file mode 100644 index 000000000..7a7f9873a --- /dev/null +++ b/packages/mediation/gma_mediation_meta/example/ios/.gitignore @@ -0,0 +1,34 @@ +**/dgph +*.mode1v3 +*.mode2v3 +*.moved-aside +*.pbxuser +*.perspectivev3 +**/*sync/ +.sconsign.dblite +.tags* +**/.vagrant/ +**/DerivedData/ +Icon? +**/Pods/ +**/.symlinks/ +profile +xcuserdata +**/.generated/ +Flutter/App.framework +Flutter/Flutter.framework +Flutter/Flutter.podspec +Flutter/Generated.xcconfig +Flutter/ephemeral/ +Flutter/app.flx +Flutter/app.zip +Flutter/flutter_assets/ +Flutter/flutter_export_environment.sh +ServiceDefinitions.json +Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!default.mode1v3 +!default.mode2v3 +!default.pbxuser +!default.perspectivev3 diff --git a/packages/mediation/gma_mediation_meta/example/ios/Flutter/AppFrameworkInfo.plist b/packages/mediation/gma_mediation_meta/example/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 000000000..7c5696400 --- /dev/null +++ b/packages/mediation/gma_mediation_meta/example/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 12.0 + + diff --git a/packages/mediation/gma_mediation_meta/example/ios/Flutter/Debug.xcconfig b/packages/mediation/gma_mediation_meta/example/ios/Flutter/Debug.xcconfig new file mode 100644 index 000000000..ec97fc6f3 --- /dev/null +++ b/packages/mediation/gma_mediation_meta/example/ios/Flutter/Debug.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" +#include "Generated.xcconfig" diff --git a/packages/mediation/gma_mediation_meta/example/ios/Flutter/Release.xcconfig b/packages/mediation/gma_mediation_meta/example/ios/Flutter/Release.xcconfig new file mode 100644 index 000000000..c4855bfe2 --- /dev/null +++ b/packages/mediation/gma_mediation_meta/example/ios/Flutter/Release.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" +#include "Generated.xcconfig" diff --git a/packages/mediation/gma_mediation_meta/example/ios/Podfile b/packages/mediation/gma_mediation_meta/example/ios/Podfile new file mode 100644 index 000000000..38b28ff0d --- /dev/null +++ b/packages/mediation/gma_mediation_meta/example/ios/Podfile @@ -0,0 +1,43 @@ +# Uncomment this line to define a global platform for your project +# platform :ios, '12.0' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_ios_podfile_setup + +target 'Runner' do + use_modular_headers! + + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) + target 'RunnerTests' do + inherit! :search_paths + end +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_ios_build_settings(target) + end +end diff --git a/packages/mediation/gma_mediation_meta/example/ios/Runner.xcodeproj/project.pbxproj b/packages/mediation/gma_mediation_meta/example/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 000000000..60d0f88c3 --- /dev/null +++ b/packages/mediation/gma_mediation_meta/example/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,626 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 331C808B294A63AB00263BE5 /* GmaMediationApplovinPluginTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* GmaMediationApplovinPluginTests.swift */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 97C146E61CF9000F007C117D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 97C146ED1CF9000F007C117D; + remoteInfo = Runner; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 331C807B294A618700263BE5 /* GmaMediationApplovinPluginTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GmaMediationApplovinPluginTests.swift; sourceTree = ""; }; + 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + C818F7E0BFF1AD2CA8B2D2D5 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 2C81ED067DB2D30DCAC62ED5 /* Pods */ = { + isa = PBXGroup; + children = ( + ); + path = Pods; + sourceTree = ""; + }; + 331C8082294A63A400263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C807B294A618700263BE5 /* GmaMediationApplovinPluginTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + 331C8082294A63A400263BE5 /* RunnerTests */, + 2C81ED067DB2D30DCAC62ED5 /* Pods */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + 331C8081294A63A400263BE5 /* RunnerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C8080294A63A400263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 331C807D294A63A400263BE5 /* Sources */, + 331C807F294A63A400263BE5 /* Resources */, + C818F7E0BFF1AD2CA8B2D2D5 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 331C8086294A63A400263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1430; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 331C8080294A63A400263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 97C146ED1CF9000F007C117D; + }; + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + 331C8080294A63A400263BE5 /* RunnerTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 331C807F294A63A400263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 331C807D294A63A400263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C808B294A63AB00263BE5 /* GmaMediationApplovinPluginTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 331C8086294A63A400263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 97C146ED1CF9000F007C117D /* Runner */; + targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationApplovinExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 331C8088294A63A400263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationApplovinExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Debug; + }; + 331C8089294A63A400263BE5 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationApplovinExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Release; + }; + 331C808A294A63A400263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationApplovinExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationApplovinExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationApplovinExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C8088294A63A400263BE5 /* Debug */, + 331C8089294A63A400263BE5 /* Release */, + 331C808A294A63A400263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/packages/mediation/gma_mediation_meta/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/mediation/gma_mediation_meta/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..919434a62 --- /dev/null +++ b/packages/mediation/gma_mediation_meta/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/packages/mediation/gma_mediation_meta/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/packages/mediation/gma_mediation_meta/example/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..21a3cc14c --- /dev/null +++ b/packages/mediation/gma_mediation_meta/example/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/packages/mediation/gma_mediation_meta/example/ios/Runner/AppDelegate.swift b/packages/mediation/gma_mediation_meta/example/ios/Runner/AppDelegate.swift new file mode 100644 index 000000000..70693e4a8 --- /dev/null +++ b/packages/mediation/gma_mediation_meta/example/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import UIKit +import Flutter + +@UIApplicationMain +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..d36b1fab2 --- /dev/null +++ b/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 000000000..dc9ada472 Binary files /dev/null and b/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 000000000..7353c41ec Binary files /dev/null and b/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 000000000..797d452e4 Binary files /dev/null and b/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 000000000..6ed2d933e Binary files /dev/null and b/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 000000000..4cd7b0099 Binary files /dev/null and b/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 000000000..fe730945a Binary files /dev/null and b/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 000000000..321773cd8 Binary files /dev/null and b/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 000000000..797d452e4 Binary files /dev/null and b/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 000000000..502f463a9 Binary files /dev/null and b/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 000000000..0ec303439 Binary files /dev/null and b/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 000000000..0ec303439 Binary files /dev/null and b/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 000000000..e9f5fea27 Binary files /dev/null and b/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 000000000..84ac32ae7 Binary files /dev/null and b/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 000000000..8953cba09 Binary files /dev/null and b/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 000000000..0467bf12a Binary files /dev/null and b/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 000000000..0bedcf2fd --- /dev/null +++ b/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchImage.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 000000000..89c2725b7 --- /dev/null +++ b/packages/mediation/gma_mediation_meta/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/packages/mediation/gma_mediation_meta/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/packages/mediation/gma_mediation_meta/example/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 000000000..f2e259c7c --- /dev/null +++ b/packages/mediation/gma_mediation_meta/example/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_meta/example/ios/Runner/Base.lproj/Main.storyboard b/packages/mediation/gma_mediation_meta/example/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 000000000..f3c28516f --- /dev/null +++ b/packages/mediation/gma_mediation_meta/example/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_meta/example/ios/Runner/Info.plist b/packages/mediation/gma_mediation_meta/example/ios/Runner/Info.plist new file mode 100644 index 000000000..36233d545 --- /dev/null +++ b/packages/mediation/gma_mediation_meta/example/ios/Runner/Info.plist @@ -0,0 +1,58 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Gma Mediation Meta + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + gma_mediation_meta_example + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + CADisableMinimumFrameDurationOnPhone + + UIApplicationSupportsIndirectInputEvents + + GADApplicationIdentifier + ca-app-pub-3940256099942544~1458002511 + SKAdNetworkItems + + + SKAdNetworkIdentifier + cstr6suwn9.skadnetwork + + + + diff --git a/packages/mediation/gma_mediation_meta/example/ios/Runner/Runner-Bridging-Header.h b/packages/mediation/gma_mediation_meta/example/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 000000000..308a2a560 --- /dev/null +++ b/packages/mediation/gma_mediation_meta/example/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/packages/mediation/gma_mediation_meta/example/lib/main.dart b/packages/mediation/gma_mediation_meta/example/lib/main.dart new file mode 100644 index 000000000..665bfe31b --- /dev/null +++ b/packages/mediation/gma_mediation_meta/example/lib/main.dart @@ -0,0 +1,33 @@ +import 'package:flutter/material.dart'; + +void main() { + runApp(const MyApp()); +} + +class MyApp extends StatefulWidget { + const MyApp({super.key}); + + @override + State createState() => _MyAppState(); +} + +class _MyAppState extends State { + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Scaffold( + appBar: AppBar( + title: const Text('Plugin example app'), + ), + body: const Center( + child: Text('Test app'), + ), + ), + ); + } +} diff --git a/packages/mediation/gma_mediation_meta/example/pubspec.yaml b/packages/mediation/gma_mediation_meta/example/pubspec.yaml new file mode 100644 index 000000000..e1b4e495a --- /dev/null +++ b/packages/mediation/gma_mediation_meta/example/pubspec.yaml @@ -0,0 +1,86 @@ +name: gma_mediation_meta_example +description: "Demonstrates how to use the gma_mediation_meta plugin." +# The following line prevents the package from being accidentally published to +# pub.dev using `flutter pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +environment: + sdk: '>=3.6.0 <4.0.0' + +# Dependencies specify other packages that your package needs in order to work. +# To automatically upgrade your package dependencies to the latest versions +# consider running `flutter pub upgrade --major-versions`. Alternatively, +# dependencies can be manually updated by changing the version numbers below to +# the latest version available on pub.dev. To see which dependencies have newer +# versions available, run `flutter pub outdated`. +dependencies: + flutter: + sdk: flutter + + google_mobile_ads: ^6.0.0 + gma_mediation_meta: + # When depending on this package from a real application you should use: + # gma_mediation_meta: ^x.y.z + # See https://dart.dev/tools/pub/dependencies#version-constraints + # The example app is bundled with the plugin so we use a path dependency on + # the parent directory to use the current plugin's version. + path: ../ + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^1.0.2 + +dev_dependencies: + integration_test: + sdk: flutter + flutter_test: + sdk: flutter + + # The "flutter_lints" package below contains a set of recommended lints to + # encourage good coding practices. The lint set provided by the package is + # activated in the `analysis_options.yaml` file located at the root of your + # package. See that file for information about deactivating specific lint + # rules and activating additional ones. + flutter_lints: ^2.0.0 + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter packages. +flutter: + + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + + # To add assets to your application, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/assets-and-images/#resolution-aware + + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/assets-and-images/#from-packages + + # To add custom fonts to your application, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts from package dependencies, + # see https://flutter.dev/custom-fonts/#from-packages diff --git a/packages/mediation/gma_mediation_meta/ios/.gitignore b/packages/mediation/gma_mediation_meta/ios/.gitignore new file mode 100644 index 000000000..0c885071e --- /dev/null +++ b/packages/mediation/gma_mediation_meta/ios/.gitignore @@ -0,0 +1,38 @@ +.idea/ +.vagrant/ +.sconsign.dblite +.svn/ + +.DS_Store +*.swp +profile + +DerivedData/ +build/ +GeneratedPluginRegistrant.h +GeneratedPluginRegistrant.m + +.generated/ + +*.pbxuser +*.mode1v3 +*.mode2v3 +*.perspectivev3 + +!default.pbxuser +!default.mode1v3 +!default.mode2v3 +!default.perspectivev3 + +xcuserdata + +*.moved-aside + +*.pyc +*sync/ +Icon? +.tags* + +/Flutter/Generated.xcconfig +/Flutter/ephemeral/ +/Flutter/flutter_export_environment.sh \ No newline at end of file diff --git a/packages/mediation/gma_mediation_meta/ios/Assets/.gitkeep b/packages/mediation/gma_mediation_meta/ios/Assets/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/packages/mediation/gma_mediation_meta/ios/Classes/GmaMediationMetaPlugin.swift b/packages/mediation/gma_mediation_meta/ios/Classes/GmaMediationMetaPlugin.swift new file mode 100644 index 000000000..be6728b07 --- /dev/null +++ b/packages/mediation/gma_mediation_meta/ios/Classes/GmaMediationMetaPlugin.swift @@ -0,0 +1,21 @@ +// 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 +// +// https://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 Flutter +import UIKit + +/** Required to link the iOS dependency of the Meta Audience Network Adapter. */ +public class GmaMediationMetaPlugin: NSObject, FlutterPlugin { + public static func register(with registrar: FlutterPluginRegistrar) { } +} diff --git a/packages/mediation/gma_mediation_meta/ios/gma_mediation_meta.podspec b/packages/mediation/gma_mediation_meta/ios/gma_mediation_meta.podspec new file mode 100644 index 000000000..8f5ac0c70 --- /dev/null +++ b/packages/mediation/gma_mediation_meta/ios/gma_mediation_meta.podspec @@ -0,0 +1,26 @@ +# +# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. +# Run `pod lib lint gma_mediation_meta.podspec` to validate before publishing. +# +Pod::Spec.new do |s| + s.name = 'gma_mediation_meta' + s.version = '1.5.0' + s.summary = 'Google Mobile Ads Mediation of Meta Audience Network.' + s.description = <<-DESC +Mediation Adapter for Meta Audience Network to use with Google Mobile Ads. + DESC + s.homepage = 'https://developers.google.com/admob/flutter/mediation/meta' + s.license = { :file => '../LICENSE' } + s.author = { 'Google LLC' => 'mediation-support@google.com' } + s.source = { :path => '.' } + s.source_files = 'Classes/**/*' + s.public_header_files = 'Classes/**/*.h' + s.dependency 'Flutter' + s.dependency 'GoogleMobileAdsMediationFacebook', '~> 6.21.0.0' + s.platform = :ios, '12.0' + s.static_framework = true + + # Flutter.framework does not contain a i386 slice. + s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' } + s.swift_version = '5.0' +end diff --git a/packages/mediation/gma_mediation_meta/lib/gma_mediation_meta.dart b/packages/mediation/gma_mediation_meta/lib/gma_mediation_meta.dart new file mode 100644 index 000000000..42184b66e --- /dev/null +++ b/packages/mediation/gma_mediation_meta/lib/gma_mediation_meta.dart @@ -0,0 +1,16 @@ +// 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 +// +// https://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. + +/// This empty class is needed to allow correct compatibility analysis with host platforms. +class GmaMediationMeta {} diff --git a/packages/mediation/gma_mediation_meta/pubspec.yaml b/packages/mediation/gma_mediation_meta/pubspec.yaml new file mode 100644 index 000000000..90b07b92d --- /dev/null +++ b/packages/mediation/gma_mediation_meta/pubspec.yaml @@ -0,0 +1,28 @@ +name: gma_mediation_meta +description: "Mediation Adapter that enables sending ad requests to the Meta Audience Network ad network using the google_mobile_ads plugin." +version: 1.5.0 +repository: https://github.com/googleads/googleads-mobile-flutter/tree/main/packages/mediation/gma_mediation_meta + +environment: + sdk: '>=3.6.0 <4.0.0' + flutter: '>=3.27.0' + +dependencies: + flutter: + sdk: flutter + google_mobile_ads: ^6.0.0 + plugin_platform_interface: ^2.0.2 + +dev_dependencies: + flutter_test: + sdk: flutter + lint: ^2.0.3 + +flutter: + plugin: + platforms: + android: + package: io.flutter.plugins.googlemobileads.mediation.gma_mediation_meta + pluginClass: GmaMediationMetaPlugin + ios: + pluginClass: GmaMediationMetaPlugin diff --git a/packages/mediation/gma_mediation_mintegral/.gitignore b/packages/mediation/gma_mediation_mintegral/.gitignore new file mode 100644 index 000000000..ac5aa9893 --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/.gitignore @@ -0,0 +1,29 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. +/pubspec.lock +**/doc/api/ +.dart_tool/ +build/ diff --git a/packages/mediation/gma_mediation_mintegral/.metadata b/packages/mediation/gma_mediation_mintegral/.metadata new file mode 100644 index 000000000..a7455847d --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/.metadata @@ -0,0 +1,33 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "300451adae589accbece3490f4396f10bdf15e6e" + channel: "stable" + +project_type: plugin + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: 300451adae589accbece3490f4396f10bdf15e6e + base_revision: 300451adae589accbece3490f4396f10bdf15e6e + - platform: android + create_revision: 300451adae589accbece3490f4396f10bdf15e6e + base_revision: 300451adae589accbece3490f4396f10bdf15e6e + - platform: ios + create_revision: 300451adae589accbece3490f4396f10bdf15e6e + base_revision: 300451adae589accbece3490f4396f10bdf15e6e + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/packages/mediation/gma_mediation_mintegral/CHANGELOG.md b/packages/mediation/gma_mediation_mintegral/CHANGELOG.md new file mode 100644 index 000000000..48024dbc0 --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/CHANGELOG.md @@ -0,0 +1,66 @@ +## Mintegral Flutter Mediation Adapter Changelog + +#### Version 2.0.2 +- Updated minimum Flutter version to 3.35.1 +- Updated to support Google Mobile Ads Flutter Plugin version 7.0.0 +- Supports [Mintegral Android adapter version 17.0.41.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/mintegral/CHANGELOG.md#version-170410). +- Supports [Mintegral iOS adapter version 8.0.4.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Mintegral/CHANGELOG.md#version-8040). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 2.0.1 +- Supports [Mintegral Android adapter version 17.0.31.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/mintegral/CHANGELOG.md#version-170310). +- Supports [Mintegral iOS adapter version 8.0.3.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Mintegral/CHANGELOG.md#version-8030). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 2.0.0 +- Supports [Mintegral Android adapter version 17.0.21.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/mintegral/CHANGELOG.md#version-170210). +- Supports [Mintegral iOS adapter version 8.0.2.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Mintegral/CHANGELOG.md#version-8020). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.2.6 +- Supports [Mintegral Android adapter version 16.9.91.1](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/mintegral/CHANGELOG.md#version-169911). +- Supports [Mintegral iOS adapter version 7.7.9.1](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Mintegral/CHANGELOG.md#version-7791). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.2.5 +- Supports [Mintegral Android adapter version 16.9.91.1](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/mintegral/CHANGELOG.md#version-169911). +- Supports [Mintegral iOS adapter version 7.7.9.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Mintegral/CHANGELOG.md#version-7790). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.2.4 +- Supports [Mintegral Android adapter version 16.9.91.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/mintegral/CHANGELOG.md#version-169910). +- Supports [Mintegral iOS adapter version 7.7.9.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Mintegral/CHANGELOG.md#version-7790). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.2.3 +- Supports [Mintegral Android adapter version 16.9.71.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/mintegral/CHANGELOG.md#version-169710). +- Supports [Mintegral iOS adapter version 7.7.8.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Mintegral/CHANGELOG.md#version-7780). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.2.2 +- Supports [Mintegral Android adapter version 16.9.71.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/mintegral/CHANGELOG.md#version-169710). +- Supports [Mintegral iOS adapter version 7.7.7.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Mintegral/CHANGELOG.md#version-7770). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.2.1 +- Supports [Mintegral Android adapter version 16.9.61.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/mintegral/CHANGELOG.md#version-169610). +- Supports [Mintegral iOS adapter version 7.7.7.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Mintegral/CHANGELOG.md#version-7770). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.2.0 +- Supports [Mintegral Android adapter version 16.9.41.1](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/mintegral/CHANGELOG.md#version-169411). +- Supports [Mintegral iOS adapter version 7.7.7.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Mintegral/CHANGELOG.md#version-7770). +- Built and tested with the Google Mobile Ads Flutter Plugin version 5.3.1. + +#### Version 1.1.0 +- iOS plugin is now a static framework. +- Supports [Mintegral Android adapter version 16.8.61.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/mintegral/CHANGELOG.md#version-168610). +- Supports [Mintegral iOS adapter version 7.7.5.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Mintegral/CHANGELOG.md#version-7750). +- Built and tested with the Google Mobile Ads Flutter Plugin version 5.3.1. + +#### Version 1.0.0 + +- Initial release. +- Supports [Mintegral Android adapter version 16.7.21.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/mintegral/CHANGELOG.md#version-167210). +- Supports [Mintegral iOS adapter version 7.6.3.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Mintegral/CHANGELOG.md#version-7630). +- Built and tested with the Google Mobile Ads Flutter Plugin version 5.1.0. diff --git a/packages/mediation/gma_mediation_mintegral/LICENSE b/packages/mediation/gma_mediation_mintegral/LICENSE new file mode 100644 index 000000000..e58143fcc --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/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 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. diff --git a/packages/mediation/gma_mediation_mintegral/README.md b/packages/mediation/gma_mediation_mintegral/README.md new file mode 100644 index 000000000..b91dc9771 --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/README.md @@ -0,0 +1,36 @@ +# Google Mobile Ads Mediation of Mintegral for Flutter + +[![gma_mediation_mintegral](https://github.com/googleads/googleads-mobile-flutter/actions/workflows/google_mobile_ads.yaml/badge.svg)](https://github.com/googleads/googleads-mobile-flutter/actions/workflows/google_mobile_ads.yaml) + +This repository contains the source code for the Mediation Mintegral Flutter +plugin to be used with the Google Mobile Ads plugin. It enables mediation of the +Mintegral Ad Network through the Google Mobile Ads SDK. + +This plugin use the [Pigeon Flutter plugin](https://pub.dev/packages/pigeon) to +generate the classes that bridge the dart layer with each platform's code. +To add or modify the third party sdk, use the classes in the pigeons folder +following [this guide](https://github.com/flutter/packages/blob/main/packages/pigeon/example/README.md). + +## Documentation +For instructions on how to use with the google_mobile_ads plugin, refer to the +developer guide for [Mintegral](https://developers.google.com/admob/flutter/mediation/mintegral). + +## Downloads + +See [pub.dev](https://pub.dev/packages/gma_mediation_mintegral/versions) for the +latest releases of the plugin. + +## Suggesting improvements + +To file bugs, make feature requests, or to suggest other improvements, please +use [github's issue tracker](https://github.com/googleads/googleads-mobile-flutter/issues). + + +## Other resources + +* [AdMob help center](https://support.google.com/admob/?hl=en#topic=7383088) +* [Ad Manager help center](https://support.google.com/admanager/?hl=en#topic=7505988) + +## License + +[Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0) \ No newline at end of file diff --git a/packages/mediation/gma_mediation_mintegral/analysis_options.yaml b/packages/mediation/gma_mediation_mintegral/analysis_options.yaml new file mode 100644 index 000000000..08808f3fb --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/analysis_options.yaml @@ -0,0 +1,19 @@ +# Copyright 2021 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 +# +# https://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. + +include: package:lint/package.yaml + +analyzer: + exclude: + - '**.g.dart' diff --git a/packages/mediation/gma_mediation_mintegral/android/.gitignore b/packages/mediation/gma_mediation_mintegral/android/.gitignore new file mode 100644 index 000000000..161bdcdaf --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/android/.gitignore @@ -0,0 +1,9 @@ +*.iml +.gradle +/local.properties +/.idea/workspace.xml +/.idea/libraries +.DS_Store +/build +/captures +.cxx diff --git a/packages/mediation/gma_mediation_mintegral/android/build.gradle b/packages/mediation/gma_mediation_mintegral/android/build.gradle new file mode 100644 index 000000000..473a0feb1 --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/android/build.gradle @@ -0,0 +1,73 @@ +group 'io.flutter.plugins.googlemobileads.mediation.gma_mediation_mintegral' +version = "2.0.2" + +buildscript { + ext.kotlin_version = '2.2.21' + repositories { + google() + mavenCentral() + } + + dependencies { + classpath 'com.android.tools.build:gradle:8.13.1' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + +allprojects { + repositories { + google() + mavenCentral() + } +} + +apply plugin: 'com.android.library' +apply plugin: 'kotlin-android' + +ext { + stringVersion = "17.0.41.0" +} + +android { + if (project.android.hasProperty("namespace")) { + namespace 'io.flutter.plugins.googlemobileads.mediation.gma_mediation_mintegral' + } + + compileSdk 36 + + compileOptions { + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + test.java.srcDirs += 'src/test/kotlin' + } + + defaultConfig { + minSdkVersion 24 + } + + dependencies { + implementation "com.google.ads.mediation:mintegral:$stringVersion" + testImplementation 'org.jetbrains.kotlin:kotlin-test' + testImplementation 'org.mockito:mockito-core:5.5.0' + } + + testOptions { + unitTests.all { + useJUnitPlatform() + + testLogging { + events "passed", "skipped", "failed", "standardOut", "standardError" + outputs.upToDateWhen {false} + showStandardStreams = true + } + } + } +} diff --git a/packages/mediation/gma_mediation_mintegral/android/gradle/wrapper/gradle-wrapper.properties b/packages/mediation/gma_mediation_mintegral/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 000000000..23449a2b5 --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,7 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip +networkTimeout=10000 +validateDistributionUrl=true +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/packages/mediation/gma_mediation_mintegral/android/settings.gradle b/packages/mediation/gma_mediation_mintegral/android/settings.gradle new file mode 100644 index 000000000..2506c438f --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/android/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'gma_mediation_mintegral' diff --git a/packages/mediation/gma_mediation_mintegral/android/src/main/AndroidManifest.xml b/packages/mediation/gma_mediation_mintegral/android/src/main/AndroidManifest.xml new file mode 100644 index 000000000..81318e8ea --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/android/src/main/AndroidManifest.xml @@ -0,0 +1,3 @@ + + diff --git a/packages/mediation/gma_mediation_mintegral/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_mintegral/GmaMediationMintegralPlugin.kt b/packages/mediation/gma_mediation_mintegral/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_mintegral/GmaMediationMintegralPlugin.kt new file mode 100644 index 000000000..3942d1435 --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_mintegral/GmaMediationMintegralPlugin.kt @@ -0,0 +1,24 @@ +// 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 +// +// https://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. + +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_mintegral + +import io.flutter.embedding.engine.plugins.FlutterPlugin + +/** Class that serves as bridge to get the adapter android dependency and make it available to a Flutter app. */ +class GmaMediationMintegralPlugin: FlutterPlugin { + override fun onAttachedToEngine(flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) {} + + override fun onDetachedFromEngine(binding: FlutterPlugin.FlutterPluginBinding) {} +} diff --git a/packages/mediation/gma_mediation_mintegral/example/.gitignore b/packages/mediation/gma_mediation_mintegral/example/.gitignore new file mode 100644 index 000000000..29a3a5017 --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/example/.gitignore @@ -0,0 +1,43 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.pub-cache/ +.pub/ +/build/ + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/packages/mediation/gma_mediation_mintegral/example/README.md b/packages/mediation/gma_mediation_mintegral/example/README.md new file mode 100644 index 000000000..c5a923a34 --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/example/README.md @@ -0,0 +1,17 @@ +# gma_mediation_mintegral_example + +Learn how to integrate with your app that uses the [google_mobile_ads](https://pub.dev/packages/google_mobile_ads) plugin +by following the [development guide](https://developers.google.com/admob/flutter/mediation/mintegral). + +## Getting Started + +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) + +For help getting started with Flutter development, view the +[online documentation](https://docs.flutter.dev/), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/packages/mediation/gma_mediation_mintegral/example/analysis_options.yaml b/packages/mediation/gma_mediation_mintegral/example/analysis_options.yaml new file mode 100644 index 000000000..0d2902135 --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/example/analysis_options.yaml @@ -0,0 +1,28 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at https://dart.dev/lints. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/packages/mediation/gma_mediation_mintegral/example/android/.gitignore b/packages/mediation/gma_mediation_mintegral/example/android/.gitignore new file mode 100644 index 000000000..6f568019d --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/example/android/.gitignore @@ -0,0 +1,13 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +key.properties +**/*.keystore +**/*.jks diff --git a/packages/mediation/gma_mediation_mintegral/example/android/app/build.gradle b/packages/mediation/gma_mediation_mintegral/example/android/app/build.gradle new file mode 100644 index 000000000..f9168aec6 --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/example/android/app/build.gradle @@ -0,0 +1,67 @@ +plugins { + id "com.android.application" + id "kotlin-android" + id "dev.flutter.flutter-gradle-plugin" +} + +def localProperties = new Properties() +def localPropertiesFile = rootProject.file('local.properties') +if (localPropertiesFile.exists()) { + localPropertiesFile.withReader('UTF-8') { reader -> + localProperties.load(reader) + } +} + +def flutterVersionCode = localProperties.getProperty('flutter.versionCode') +if (flutterVersionCode == null) { + flutterVersionCode = '1' +} + +def flutterVersionName = localProperties.getProperty('flutter.versionName') +if (flutterVersionName == null) { + flutterVersionName = '1.0' +} + +android { + namespace "io.flutter.plugins.googlemobileads.mediation.gma_mediation_mintegral_example" + compileSdk flutter.compileSdkVersion + ndkVersion flutter.ndkVersion + + compileOptions { + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId "io.flutter.plugins.googlemobileads.mediation.gma_mediation_mintegral_example" + // You can update the following values to match your application needs. + // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. + minSdkVersion 24 + targetSdkVersion flutter.targetSdkVersion + versionCode flutterVersionCode.toInteger() + versionName flutterVersionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig signingConfigs.debug + } + } +} + +flutter { + source '../..' +} + +dependencies {} diff --git a/packages/mediation/gma_mediation_mintegral/example/android/app/src/debug/AndroidManifest.xml b/packages/mediation/gma_mediation_mintegral/example/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 000000000..399f6981d --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/example/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/packages/mediation/gma_mediation_mintegral/example/android/app/src/main/AndroidManifest.xml b/packages/mediation/gma_mediation_mintegral/example/android/app/src/main/AndroidManifest.xml new file mode 100644 index 000000000..6ff82a89a --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/example/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_mintegral/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_mintegral_example/MainActivity.kt b/packages/mediation/gma_mediation_mintegral/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_mintegral_example/MainActivity.kt new file mode 100644 index 000000000..fe2a264cc --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_mintegral_example/MainActivity.kt @@ -0,0 +1,5 @@ +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_mintegral_example + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() diff --git a/packages/mediation/gma_mediation_mintegral/example/android/app/src/main/res/drawable-v21/launch_background.xml b/packages/mediation/gma_mediation_mintegral/example/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 000000000..f74085f3f --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/example/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/mediation/gma_mediation_mintegral/example/android/app/src/main/res/drawable/launch_background.xml b/packages/mediation/gma_mediation_mintegral/example/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 000000000..304732f88 --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/example/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/mediation/gma_mediation_mintegral/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/mediation/gma_mediation_mintegral/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..db77bb4b7 Binary files /dev/null and b/packages/mediation/gma_mediation_mintegral/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_mintegral/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/mediation/gma_mediation_mintegral/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..17987b79b Binary files /dev/null and b/packages/mediation/gma_mediation_mintegral/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_mintegral/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/mediation/gma_mediation_mintegral/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..09d439148 Binary files /dev/null and b/packages/mediation/gma_mediation_mintegral/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_mintegral/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/mediation/gma_mediation_mintegral/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..d5f1c8d34 Binary files /dev/null and b/packages/mediation/gma_mediation_mintegral/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_mintegral/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/packages/mediation/gma_mediation_mintegral/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..4d6372eeb Binary files /dev/null and b/packages/mediation/gma_mediation_mintegral/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_mintegral/example/android/app/src/main/res/values-night/styles.xml b/packages/mediation/gma_mediation_mintegral/example/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 000000000..06952be74 --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/example/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/packages/mediation/gma_mediation_mintegral/example/android/app/src/main/res/values/styles.xml b/packages/mediation/gma_mediation_mintegral/example/android/app/src/main/res/values/styles.xml new file mode 100644 index 000000000..cb1ef8805 --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/example/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/packages/mediation/gma_mediation_mintegral/example/android/app/src/profile/AndroidManifest.xml b/packages/mediation/gma_mediation_mintegral/example/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 000000000..399f6981d --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/example/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/packages/mediation/gma_mediation_mintegral/example/android/build.gradle b/packages/mediation/gma_mediation_mintegral/example/android/build.gradle new file mode 100644 index 000000000..bc157bd1a --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/example/android/build.gradle @@ -0,0 +1,18 @@ +allprojects { + repositories { + google() + mavenCentral() + } +} + +rootProject.buildDir = '../build' +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(':app') +} + +tasks.register("clean", Delete) { + delete rootProject.buildDir +} diff --git a/packages/mediation/gma_mediation_mintegral/example/android/gradle.properties b/packages/mediation/gma_mediation_mintegral/example/android/gradle.properties new file mode 100644 index 000000000..598d13fee --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/example/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx4G +android.useAndroidX=true +android.enableJetifier=true diff --git a/packages/mediation/gma_mediation_mintegral/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/mediation/gma_mediation_mintegral/example/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 000000000..f004c34c0 --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/example/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip diff --git a/packages/mediation/gma_mediation_mintegral/example/android/settings.gradle b/packages/mediation/gma_mediation_mintegral/example/android/settings.gradle new file mode 100644 index 000000000..a512319b9 --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/example/android/settings.gradle @@ -0,0 +1,26 @@ +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + } + settings.ext.flutterSdkPath = flutterSdkPath() + + includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") + + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "8.13.1" apply false + id "org.jetbrains.kotlin.android" version "2.2.21" apply false +} + +include ":app" diff --git a/packages/mediation/gma_mediation_mintegral/example/ios/.gitignore b/packages/mediation/gma_mediation_mintegral/example/ios/.gitignore new file mode 100644 index 000000000..7a7f9873a --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/example/ios/.gitignore @@ -0,0 +1,34 @@ +**/dgph +*.mode1v3 +*.mode2v3 +*.moved-aside +*.pbxuser +*.perspectivev3 +**/*sync/ +.sconsign.dblite +.tags* +**/.vagrant/ +**/DerivedData/ +Icon? +**/Pods/ +**/.symlinks/ +profile +xcuserdata +**/.generated/ +Flutter/App.framework +Flutter/Flutter.framework +Flutter/Flutter.podspec +Flutter/Generated.xcconfig +Flutter/ephemeral/ +Flutter/app.flx +Flutter/app.zip +Flutter/flutter_assets/ +Flutter/flutter_export_environment.sh +ServiceDefinitions.json +Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!default.mode1v3 +!default.mode2v3 +!default.pbxuser +!default.perspectivev3 diff --git a/packages/mediation/gma_mediation_mintegral/example/ios/Flutter/AppFrameworkInfo.plist b/packages/mediation/gma_mediation_mintegral/example/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 000000000..7c5696400 --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/example/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 12.0 + + diff --git a/packages/mediation/gma_mediation_mintegral/example/ios/Flutter/Debug.xcconfig b/packages/mediation/gma_mediation_mintegral/example/ios/Flutter/Debug.xcconfig new file mode 100644 index 000000000..ec97fc6f3 --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/example/ios/Flutter/Debug.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" +#include "Generated.xcconfig" diff --git a/packages/mediation/gma_mediation_mintegral/example/ios/Flutter/Release.xcconfig b/packages/mediation/gma_mediation_mintegral/example/ios/Flutter/Release.xcconfig new file mode 100644 index 000000000..c4855bfe2 --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/example/ios/Flutter/Release.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" +#include "Generated.xcconfig" diff --git a/packages/mediation/gma_mediation_mintegral/example/ios/Podfile b/packages/mediation/gma_mediation_mintegral/example/ios/Podfile new file mode 100644 index 000000000..b2d735017 --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/example/ios/Podfile @@ -0,0 +1,42 @@ +platform :ios, '13.0' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_ios_podfile_setup + +target 'Runner' do + use_modular_headers! + + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) + target 'RunnerTests' do + inherit! :search_paths + end +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_ios_build_settings(target) + end +end diff --git a/packages/mediation/gma_mediation_mintegral/example/ios/Runner.xcodeproj/project.pbxproj b/packages/mediation/gma_mediation_mintegral/example/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 000000000..2395b8902 --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/example/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,627 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 97C146E61CF9000F007C117D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 97C146ED1CF9000F007C117D; + remoteInfo = Runner; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 7A44235209E3F3F0A75F0C6A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 331C8082294A63A400263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C807B294A618700263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + 331C8082294A63A400263BE5 /* RunnerTests */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + 331C8081294A63A400263BE5 /* RunnerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C8080294A63A400263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 331C807D294A63A400263BE5 /* Sources */, + 331C807F294A63A400263BE5 /* Resources */, + 7A44235209E3F3F0A75F0C6A /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 331C8086294A63A400263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1510; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 331C8080294A63A400263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 97C146ED1CF9000F007C117D; + }; + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + 331C8080294A63A400263BE5 /* RunnerTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 331C807F294A63A400263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 331C807D294A63A400263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 331C8086294A63A400263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 97C146ED1CF9000F007C117D /* Runner */; + targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = CSTR6SUWN9; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationMintegralExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 331C8088294A63A400263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationMintegralExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Debug; + }; + 331C8089294A63A400263BE5 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationMintegralExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Release; + }; + 331C808A294A63A400263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationMintegralExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = CSTR6SUWN9; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationMintegralExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = CSTR6SUWN9; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationMintegralExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C8088294A63A400263BE5 /* Debug */, + 331C8089294A63A400263BE5 /* Release */, + 331C808A294A63A400263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/packages/mediation/gma_mediation_mintegral/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/mediation/gma_mediation_mintegral/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..919434a62 --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/packages/mediation/gma_mediation_mintegral/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/packages/mediation/gma_mediation_mintegral/example/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..21a3cc14c --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/example/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/packages/mediation/gma_mediation_mintegral/example/ios/Runner/AppDelegate.swift b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/AppDelegate.swift new file mode 100644 index 000000000..70693e4a8 --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import UIKit +import Flutter + +@UIApplicationMain +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..d36b1fab2 --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 000000000..dc9ada472 Binary files /dev/null and b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 000000000..7353c41ec Binary files /dev/null and b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 000000000..797d452e4 Binary files /dev/null and b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 000000000..6ed2d933e Binary files /dev/null and b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 000000000..4cd7b0099 Binary files /dev/null and b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 000000000..fe730945a Binary files /dev/null and b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 000000000..321773cd8 Binary files /dev/null and b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 000000000..797d452e4 Binary files /dev/null and b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 000000000..502f463a9 Binary files /dev/null and b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 000000000..0ec303439 Binary files /dev/null and b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 000000000..0ec303439 Binary files /dev/null and b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 000000000..e9f5fea27 Binary files /dev/null and b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 000000000..84ac32ae7 Binary files /dev/null and b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 000000000..8953cba09 Binary files /dev/null and b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 000000000..0467bf12a Binary files /dev/null and b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 000000000..0bedcf2fd --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchImage.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 000000000..89c2725b7 --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 000000000..f2e259c7c --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Base.lproj/Main.storyboard b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 000000000..f3c28516f --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Info.plist b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Info.plist new file mode 100644 index 000000000..e70f37d3a --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Info.plist @@ -0,0 +1,51 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Gma Mediation Mintegral + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + gma_mediation_mintegral_example + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + CADisableMinimumFrameDurationOnPhone + + UIApplicationSupportsIndirectInputEvents + + GADApplicationIdentifier + ca-app-pub-3940256099942544~1458002511 + + diff --git a/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Runner-Bridging-Header.h b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 000000000..308a2a560 --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/example/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/packages/mediation/gma_mediation_mintegral/example/ios/RunnerTests/RunnerTests.swift b/packages/mediation/gma_mediation_mintegral/example/ios/RunnerTests/RunnerTests.swift new file mode 100644 index 000000000..13eefdb42 --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/example/ios/RunnerTests/RunnerTests.swift @@ -0,0 +1,5 @@ +import XCTest + +@testable import gma_mediation_mintegral + +class RunnerTests: XCTestCase {} diff --git a/packages/mediation/gma_mediation_mintegral/example/lib/main.dart b/packages/mediation/gma_mediation_mintegral/example/lib/main.dart new file mode 100644 index 000000000..665bfe31b --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/example/lib/main.dart @@ -0,0 +1,33 @@ +import 'package:flutter/material.dart'; + +void main() { + runApp(const MyApp()); +} + +class MyApp extends StatefulWidget { + const MyApp({super.key}); + + @override + State createState() => _MyAppState(); +} + +class _MyAppState extends State { + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Scaffold( + appBar: AppBar( + title: const Text('Plugin example app'), + ), + body: const Center( + child: Text('Test app'), + ), + ), + ); + } +} diff --git a/packages/mediation/gma_mediation_mintegral/example/pubspec.yaml b/packages/mediation/gma_mediation_mintegral/example/pubspec.yaml new file mode 100644 index 000000000..fa2dfb7fc --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/example/pubspec.yaml @@ -0,0 +1,86 @@ +name: gma_mediation_mintegral_example +description: "Demonstrates how to use the gma_mediation_mintegral plugin." +# The following line prevents the package from being accidentally published to +# pub.dev using `flutter pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +environment: + sdk: '>=3.9.0 <4.0.0' + +# Dependencies specify other packages that your package needs in order to work. +# To automatically upgrade your package dependencies to the latest versions +# consider running `flutter pub upgrade --major-versions`. Alternatively, +# dependencies can be manually updated by changing the version numbers below to +# the latest version available on pub.dev. To see which dependencies have newer +# versions available, run `flutter pub outdated`. +dependencies: + flutter: + sdk: flutter + + google_mobile_ads: ^7.0.0 + gma_mediation_mintegral: + # When depending on this package from a real application you should use: + # gma_mediation_mintegral: ^x.y.z + # See https://dart.dev/tools/pub/dependencies#version-constraints + # The example app is bundled with the plugin so we use a path dependency on + # the parent directory to use the current plugin's version. + path: ../ + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^1.0.6 + +dev_dependencies: + integration_test: + sdk: flutter + flutter_test: + sdk: flutter + + # The "flutter_lints" package below contains a set of recommended lints to + # encourage good coding practices. The lint set provided by the package is + # activated in the `analysis_options.yaml` file located at the root of your + # package. See that file for information about deactivating specific lint + # rules and activating additional ones. + flutter_lints: ^6.0.0 + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter packages. +flutter: + + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + + # To add assets to your application, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/assets-and-images/#resolution-aware + + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/assets-and-images/#from-packages + + # To add custom fonts to your application, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts from package dependencies, + # see https://flutter.dev/custom-fonts/#from-packages diff --git a/packages/mediation/gma_mediation_mintegral/ios/.gitignore b/packages/mediation/gma_mediation_mintegral/ios/.gitignore new file mode 100644 index 000000000..0c885071e --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/ios/.gitignore @@ -0,0 +1,38 @@ +.idea/ +.vagrant/ +.sconsign.dblite +.svn/ + +.DS_Store +*.swp +profile + +DerivedData/ +build/ +GeneratedPluginRegistrant.h +GeneratedPluginRegistrant.m + +.generated/ + +*.pbxuser +*.mode1v3 +*.mode2v3 +*.perspectivev3 + +!default.pbxuser +!default.mode1v3 +!default.mode2v3 +!default.perspectivev3 + +xcuserdata + +*.moved-aside + +*.pyc +*sync/ +Icon? +.tags* + +/Flutter/Generated.xcconfig +/Flutter/ephemeral/ +/Flutter/flutter_export_environment.sh \ No newline at end of file diff --git a/packages/mediation/gma_mediation_mintegral/ios/Assets/.gitkeep b/packages/mediation/gma_mediation_mintegral/ios/Assets/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/packages/mediation/gma_mediation_mintegral/ios/Classes/GmaMediationMintegralPlugin.swift b/packages/mediation/gma_mediation_mintegral/ios/Classes/GmaMediationMintegralPlugin.swift new file mode 100644 index 000000000..7c33aea29 --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/ios/Classes/GmaMediationMintegralPlugin.swift @@ -0,0 +1,20 @@ +// 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 +// +// https://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 Flutter + +/// Class that serves as bridge to get the adapter iOS dependency and make it available to a Flutter app. +public class GmaMediationMintegralPlugin: NSObject, FlutterPlugin { + public static func register(with registrar: FlutterPluginRegistrar) {} +} diff --git a/packages/mediation/gma_mediation_mintegral/ios/gma_mediation_mintegral.podspec b/packages/mediation/gma_mediation_mintegral/ios/gma_mediation_mintegral.podspec new file mode 100644 index 000000000..c12c1e426 --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/ios/gma_mediation_mintegral.podspec @@ -0,0 +1,26 @@ +# +# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. +# Run `pod lib lint gma_mediation_mintegral.podspec` to validate before publishing. +# +Pod::Spec.new do |s| + s.name = 'gma_mediation_mintegral' + s.version = '2.0.2' + s.summary = 'Google Mobile Ads Mediation of Mintegral.' + s.description = <<-DESC +Mediation Adapter for Mintegral to use with Google Mobile Ads. + DESC + s.homepage = 'https://developers.google.com/admob/flutter/mediation/mintegral' + s.license = { :file => '../LICENSE' } + s.author = { 'Google LLC' => 'mediation-support@google.com' } + s.source = { :path => '.' } + s.source_files = 'Classes/**/*' + s.public_header_files = 'Classes/**/*.h' + s.dependency 'Flutter' + s.dependency 'GoogleMobileAdsMediationMintegral', '~>8.0.4.0' + s.platform = :ios, '13.0' + s.static_framework = true + + # Flutter.framework does not contain a i386 slice. + s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' } + s.swift_version = '5.0' +end diff --git a/packages/mediation/gma_mediation_mintegral/lib/gma_mediation_mintegral.dart b/packages/mediation/gma_mediation_mintegral/lib/gma_mediation_mintegral.dart new file mode 100644 index 000000000..149410acd --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/lib/gma_mediation_mintegral.dart @@ -0,0 +1,16 @@ +// 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 +// +// https://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. + +/// This empty class is needed to allow correct compatibility analysis with host platforms. +class GmaMediationMintegral {} diff --git a/packages/mediation/gma_mediation_mintegral/pubspec.yaml b/packages/mediation/gma_mediation_mintegral/pubspec.yaml new file mode 100644 index 000000000..516e3b028 --- /dev/null +++ b/packages/mediation/gma_mediation_mintegral/pubspec.yaml @@ -0,0 +1,29 @@ +name: gma_mediation_mintegral +description: "Mediation Adapter that enables sending ad requests to the Mintegral ad network using the google_mobile_ads plugin." +version: 2.0.2 +repository: https://github.com/googleads/googleads-mobile-flutter/tree/main/packages/mediation/gma_mediation_mintegral + +environment: + sdk: '>=3.9.0 <4.0.0' + flutter: '>=3.35.1' + +dependencies: + flutter: + sdk: flutter + google_mobile_ads: ^7.0.0 + plugin_platform_interface: ^2.0.2 + +dev_dependencies: + flutter_lints: ^6.0.0 + flutter_test: + sdk: flutter + lint: ^2.3.0 + +flutter: + plugin: + platforms: + android: + package: io.flutter.plugins.googlemobileads.mediation.gma_mediation_mintegral + pluginClass: GmaMediationMintegralPlugin + ios: + pluginClass: GmaMediationMintegralPlugin diff --git a/packages/mediation/gma_mediation_moloco/CHANGELOG.md b/packages/mediation/gma_mediation_moloco/CHANGELOG.md new file mode 100644 index 000000000..a0a91ff54 --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/CHANGELOG.md @@ -0,0 +1,63 @@ +## Moloco Flutter Mediation Adapter Changelog + +#### Version 3.1.0 +- Updated minimum Flutter version to 3.35.1 +- Supports [Moloco Android adapter version 4.4.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/moloco/CHANGELOG.md#version-4400). +- Supports [Moloco iOS adapter version 4.1.2.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Moloco/CHANGELOG.md#version-4120). +- Built and tested with the Google Mobile Ads Flutter Plugin version 7.0.0. + +#### Version 3.0.0 +- Supports [Moloco Android adapter version 4.3.1.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/moloco/CHANGELOG.md#version-4310). +- Supports [Moloco iOS adapter version 4.1.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Moloco/CHANGELOG.md#version-4100). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 2.1.0 +- Supports [Moloco Android adapter version 4.2.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/moloco/CHANGELOG.md#version-4200). +- Supports [Moloco iOS adapter version 3.13.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Moloco/CHANGELOG.md#version-31300). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 2.0.0 +- Supports [Moloco Android adapter version 4.0.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/moloco/CHANGELOG.md#version-4000). +- Supports [Moloco iOS adapter version 3.13.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Moloco/CHANGELOG.md#version-31300). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.6.0 +- Supports [Moloco Android adapter version 3.12.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/moloco/CHANGELOG.md#version-31200). +- Supports [Moloco iOS adapter version 3.12.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Moloco/CHANGELOG.md#version-31200). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.5.0 +- Supports [Moloco Android adapter version 3.11.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/moloco/CHANGELOG.md#version-31100). +- Supports [Moloco iOS adapter version 3.11.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Moloco/CHANGELOG.md#version-31100). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.4.0 +- Supports [Moloco Android adapter version 3.10.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/moloco/CHANGELOG.md#version-31000). +- Supports [Moloco iOS adapter version 3.10.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Moloco/CHANGELOG.md#version-31000). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.3.1 +- Supports [Moloco Android adapter version 3.9.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/moloco/CHANGELOG.md#version-3900). +- Supports [Moloco iOS adapter version 3.9.1.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Moloco/CHANGELOG.md#version-3910). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.3.0 +- Supports [Moloco Android adapter version 3.9.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/moloco/CHANGELOG.md#version-3900). +- Supports [Moloco iOS adapter version 3.9.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Moloco/CHANGELOG.md#version-3900). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.2.0 +- Supports [Moloco Android adapter version 3.8.0.1](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/moloco/CHANGELOG.md#version-3801). +- Supports [Moloco iOS adapter version 3.8.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Moloco/CHANGELOG.md#version-3800). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.1.0 +- Supports [Moloco Android adapter version 3.7.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/moloco/CHANGELOG.md#version-3700). +- Supports [Moloco iOS adapter version 3.6.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Moloco/CHANGELOG.md#version-3600). +- Built and tested with the Google Mobile Ads Flutter Plugin version 5.3.1. + +#### Version 1.0.0 +- Initial release. +- Supports [Moloco Android adapter version 3.6.1.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/moloco/CHANGELOG.md#version-3610). +- Supports [Moloco iOS adapter version 3.6.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Moloco/CHANGELOG.md#version-3600). +- Built and tested with the Google Mobile Ads Flutter Plugin version 5.3.1. \ No newline at end of file diff --git a/packages/mediation/gma_mediation_moloco/LICENSE b/packages/mediation/gma_mediation_moloco/LICENSE new file mode 100644 index 000000000..e58143fcc --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/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 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. diff --git a/packages/mediation/gma_mediation_moloco/README.md b/packages/mediation/gma_mediation_moloco/README.md new file mode 100644 index 000000000..1390131f4 --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/README.md @@ -0,0 +1,36 @@ +# Google Mobile Ads Mediation of Moloco for Flutter + +[![gma_mediation_moloco](https://github.com/googleads/googleads-mobile-flutter/actions/workflows/google_mobile_ads.yaml/badge.svg)](https://github.com/googleads/googleads-mobile-flutter/actions/workflows/google_mobile_ads.yaml) + +This repository contains the source code for the Mediation Moloco Flutter +plugin to be used with the Google Mobile Ads plugin. It enables mediation of the +Moloco Ad Network through the Google Mobile Ads SDK. + +This plugin use the [Pigeon Flutter plugin](https://pub.dev/packages/pigeon) to +generate the classes that bridge the dart layer with each platform's code. +To add or modify the third party sdk, use the classes in the pigeons folder +following [this guide](https://github.com/flutter/packages/blob/main/packages/pigeon/example/README.md). + +## Documentation +For instructions on how to use with the google_mobile_ads plugin, refer to the +developer guide for [Moloco](https://developers.google.com/admob/flutter/mediation/moloco). + +## Downloads + +See [pub.dev](https://pub.dev/packages/gma_mediation_moloco/versions) for the +latest releases of the plugin. + +## Suggesting improvements + +To file bugs, make feature requests, or to suggest other improvements, please +use [github's issue tracker](https://github.com/googleads/googleads-mobile-flutter/issues). + + +## Other resources + +* [AdMob help center](https://support.google.com/admob/?hl=en#topic=7383088) +* [Ad Manager help center](https://support.google.com/admanager/?hl=en#topic=7505988) + +## License + +[Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0) \ No newline at end of file diff --git a/packages/mediation/gma_mediation_moloco/analysis_options.yaml b/packages/mediation/gma_mediation_moloco/analysis_options.yaml new file mode 100644 index 000000000..632d08c98 --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/analysis_options.yaml @@ -0,0 +1,19 @@ +# Copyright 2025 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 +# +# https://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. + +include: package:lint/package.yaml + +analyzer: + exclude: + - '**.g.dart' \ No newline at end of file diff --git a/packages/mediation/gma_mediation_moloco/android/build.gradle b/packages/mediation/gma_mediation_moloco/android/build.gradle new file mode 100644 index 000000000..1af5f3b9b --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/android/build.gradle @@ -0,0 +1,81 @@ +group = "io.flutter.plugins.googlemobileads.mediation.gma_mediation_moloco" +version = "3.1.0" + +buildscript { + ext.kotlin_version = "2.2.21" + repositories { + google() + mavenCentral() + } + + dependencies { + classpath("com.android.tools.build:gradle:8.13.1") + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version") + } +} + +allprojects { + repositories { + google() + mavenCentral() + } +} + +apply plugin: "com.android.library" +apply plugin: "kotlin-android" + +ext { + stringVersion = "4.4.0.0" +} + +android { + namespace = "io.flutter.plugins.googlemobileads.mediation.gma_mediation_moloco" + + compileSdk = 36 + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11 + } + + sourceSets { + main.java.srcDirs += "src/main/kotlin" + test.java.srcDirs += "src/test/kotlin" + } + + defaultConfig { + minSdk = 24 + } + + dependencies { + implementation("com.google.ads.mediation:moloco:$stringVersion") + testImplementation 'junit:junit:4.13.2' + testImplementation 'androidx.test:core:1.6.1' + testImplementation 'androidx.test:core-ktx:1.6.1' + testImplementation 'androidx.test.ext:junit:1.2.1' + testImplementation 'org.jetbrains.kotlin:kotlin-stdlib:2.0.21' + testImplementation 'org.mockito:mockito-core:5.5.0' + testImplementation 'org.mockito.kotlin:mockito-kotlin:5.20.0' + testImplementation 'org.robolectric:robolectric:4.16' + } + + testOptions { + unitTests.all { + useJUnit() + + testLogging { + events "passed", "skipped", "failed", "standardOut", "standardError" + outputs.upToDateWhen {false} + showStandardStreams = true + } + } + unitTests { + includeAndroidResources = true + unitTests.returnDefaultValues = true + } + } +} diff --git a/packages/mediation/gma_mediation_moloco/android/gma_mediation_moloco_android.iml b/packages/mediation/gma_mediation_moloco/android/gma_mediation_moloco_android.iml new file mode 100644 index 000000000..e8b9110d5 --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/android/gma_mediation_moloco_android.iml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_moloco/android/settings.gradle b/packages/mediation/gma_mediation_moloco/android/settings.gradle new file mode 100644 index 000000000..ce3ca0c56 --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/android/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'gma_mediation_moloco' diff --git a/packages/mediation/gma_mediation_moloco/android/src/main/AndroidManifest.xml b/packages/mediation/gma_mediation_moloco/android/src/main/AndroidManifest.xml new file mode 100644 index 000000000..bef83c901 --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/android/src/main/AndroidManifest.xml @@ -0,0 +1,3 @@ + + diff --git a/packages/mediation/gma_mediation_moloco/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_moloco/GmaMediationMolocoPlugin.kt b/packages/mediation/gma_mediation_moloco/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_moloco/GmaMediationMolocoPlugin.kt new file mode 100644 index 000000000..be9e46d3a --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_moloco/GmaMediationMolocoPlugin.kt @@ -0,0 +1,24 @@ +// Copyright 2025 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 +// +// https://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. + +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_moloco + +import io.flutter.embedding.engine.plugins.FlutterPlugin + +/** Required to link the Android dependency of the Moloco Adapter. */ +class GmaMediationMolocoPlugin : FlutterPlugin { + override fun onAttachedToEngine(flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) {} + + override fun onDetachedFromEngine(binding: FlutterPlugin.FlutterPluginBinding) {} +} diff --git a/packages/mediation/gma_mediation_moloco/android/src/test/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_moloco/GmaMediationMolocoPluginTest.kt b/packages/mediation/gma_mediation_moloco/android/src/test/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_moloco/GmaMediationMolocoPluginTest.kt new file mode 100644 index 000000000..1d32bce26 --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/android/src/test/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_moloco/GmaMediationMolocoPluginTest.kt @@ -0,0 +1,17 @@ +// Copyright 2025 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 +// +// https://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. + +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_moloco + +internal class GmaMediationMolocoPluginTest {} diff --git a/packages/mediation/gma_mediation_moloco/example/README.md b/packages/mediation/gma_mediation_moloco/example/README.md new file mode 100644 index 000000000..5c705f456 --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/example/README.md @@ -0,0 +1,17 @@ +# gma_mediation_moloco_example + +Learn how to integrate with your app that uses the [google_mobile_ads](https://pub.dev/packages/google_mobile_ads) plugin +by following the [development guide](https://developers.google.com/admob/flutter/mediation/moloco). + +## Getting Started + +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) + +For help getting started with Flutter development, view the +[online documentation](https://docs.flutter.dev/), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/packages/mediation/gma_mediation_moloco/example/analysis_options.yaml b/packages/mediation/gma_mediation_moloco/example/analysis_options.yaml new file mode 100644 index 000000000..0d2902135 --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/example/analysis_options.yaml @@ -0,0 +1,28 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at https://dart.dev/lints. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/packages/mediation/gma_mediation_moloco/example/android/app/build.gradle b/packages/mediation/gma_mediation_moloco/example/android/app/build.gradle new file mode 100644 index 000000000..4042aaef9 --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/example/android/app/build.gradle @@ -0,0 +1,44 @@ +plugins { + id "com.android.application" + id "kotlin-android" + // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. + id "dev.flutter.flutter-gradle-plugin" +} + +android { + namespace = "io.flutter.plugins.googlemobileads.mediation.gma_mediation_moloco_example" + compileSdk = flutter.compileSdkVersion + ndkVersion = flutter.ndkVersion + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11 + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId = "io.flutter.plugins.googlemobileads.mediation.gma_mediation_moloco_example" + // You can update the following values to match your application needs. + // For more information, see: https://flutter.dev/to/review-gradle-config. + minSdk = 23 + targetSdk = flutter.targetSdkVersion + versionCode = flutter.versionCode + versionName = flutter.versionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig = signingConfigs.debug + } + } +} + +flutter { + source = "../.." +} diff --git a/packages/mediation/gma_mediation_moloco/example/android/app/src/debug/AndroidManifest.xml b/packages/mediation/gma_mediation_moloco/example/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 000000000..399f6981d --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/example/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/packages/mediation/gma_mediation_moloco/example/android/app/src/main/AndroidManifest.xml b/packages/mediation/gma_mediation_moloco/example/android/app/src/main/AndroidManifest.xml new file mode 100644 index 000000000..161a45c48 --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/example/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_moloco/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_moloco_example/MainActivity.kt b/packages/mediation/gma_mediation_moloco/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_moloco_example/MainActivity.kt new file mode 100644 index 000000000..c1d0253b3 --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_moloco_example/MainActivity.kt @@ -0,0 +1,5 @@ +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_moloco_example + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity : FlutterActivity() diff --git a/packages/mediation/gma_mediation_moloco/example/android/app/src/main/res/drawable-v21/launch_background.xml b/packages/mediation/gma_mediation_moloco/example/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 000000000..f74085f3f --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/example/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/mediation/gma_mediation_moloco/example/android/app/src/main/res/drawable/launch_background.xml b/packages/mediation/gma_mediation_moloco/example/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 000000000..304732f88 --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/example/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/mediation/gma_mediation_moloco/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/mediation/gma_mediation_moloco/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..db77bb4b7 Binary files /dev/null and b/packages/mediation/gma_mediation_moloco/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_moloco/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/mediation/gma_mediation_moloco/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..17987b79b Binary files /dev/null and b/packages/mediation/gma_mediation_moloco/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_moloco/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/mediation/gma_mediation_moloco/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..09d439148 Binary files /dev/null and b/packages/mediation/gma_mediation_moloco/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_moloco/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/mediation/gma_mediation_moloco/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..d5f1c8d34 Binary files /dev/null and b/packages/mediation/gma_mediation_moloco/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_moloco/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/packages/mediation/gma_mediation_moloco/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..4d6372eeb Binary files /dev/null and b/packages/mediation/gma_mediation_moloco/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_moloco/example/android/app/src/main/res/values-night/styles.xml b/packages/mediation/gma_mediation_moloco/example/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 000000000..06952be74 --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/example/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/packages/mediation/gma_mediation_moloco/example/android/app/src/main/res/values/styles.xml b/packages/mediation/gma_mediation_moloco/example/android/app/src/main/res/values/styles.xml new file mode 100644 index 000000000..cb1ef8805 --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/example/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/packages/mediation/gma_mediation_moloco/example/android/app/src/profile/AndroidManifest.xml b/packages/mediation/gma_mediation_moloco/example/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 000000000..399f6981d --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/example/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/packages/mediation/gma_mediation_moloco/example/android/build.gradle b/packages/mediation/gma_mediation_moloco/example/android/build.gradle new file mode 100644 index 000000000..d2ffbffa4 --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/example/android/build.gradle @@ -0,0 +1,18 @@ +allprojects { + repositories { + google() + mavenCentral() + } +} + +rootProject.buildDir = "../build" +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(":app") +} + +tasks.register("clean", Delete) { + delete rootProject.buildDir +} diff --git a/packages/mediation/gma_mediation_moloco/example/android/gma_mediation_moloco_example_android.iml b/packages/mediation/gma_mediation_moloco/example/android/gma_mediation_moloco_example_android.iml new file mode 100644 index 000000000..18999696a --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/example/android/gma_mediation_moloco_example_android.iml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_moloco/example/android/gradle.properties b/packages/mediation/gma_mediation_moloco/example/android/gradle.properties new file mode 100644 index 000000000..259717082 --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/example/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError +android.useAndroidX=true +android.enableJetifier=true diff --git a/packages/mediation/gma_mediation_moloco/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/mediation/gma_mediation_moloco/example/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 000000000..f004c34c0 --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/example/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip diff --git a/packages/mediation/gma_mediation_moloco/example/android/gradlew b/packages/mediation/gma_mediation_moloco/example/android/gradlew new file mode 100755 index 000000000..9d82f7891 --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/example/android/gradlew @@ -0,0 +1,160 @@ +#!/usr/bin/env bash + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn ( ) { + echo "$*" +} + +die ( ) { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; +esac + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules +function splitJvmOpts() { + JVM_OPTS=("$@") +} +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS +JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" + +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/packages/mediation/gma_mediation_moloco/example/android/gradlew.bat b/packages/mediation/gma_mediation_moloco/example/android/gradlew.bat new file mode 100644 index 000000000..aec99730b --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/example/android/gradlew.bat @@ -0,0 +1,90 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windowz variants + +if not "%OS%" == "Windows_NT" goto win9xME_args +if "%@eval[2+2]" == "4" goto 4NT_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* +goto execute + +:4NT_args +@rem Get arguments from the 4NT Shell from JP Software +set CMD_LINE_ARGS=%$ + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/packages/mediation/gma_mediation_moloco/example/android/settings.gradle b/packages/mediation/gma_mediation_moloco/example/android/settings.gradle new file mode 100644 index 000000000..d7f1a0449 --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/example/android/settings.gradle @@ -0,0 +1,25 @@ +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + }() + + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") + + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "8.13.1" apply false + id "org.jetbrains.kotlin.android" version "2.2.21" apply false +} + +include ":app" diff --git a/packages/mediation/gma_mediation_moloco/example/gma_mediation_moloco_example.iml b/packages/mediation/gma_mediation_moloco/example/gma_mediation_moloco_example.iml new file mode 100644 index 000000000..f66303d53 --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/example/gma_mediation_moloco_example.iml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_moloco/example/ios/Flutter/AppFrameworkInfo.plist b/packages/mediation/gma_mediation_moloco/example/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 000000000..7c5696400 --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/example/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 12.0 + + diff --git a/packages/mediation/gma_mediation_moloco/example/ios/Flutter/Debug.xcconfig b/packages/mediation/gma_mediation_moloco/example/ios/Flutter/Debug.xcconfig new file mode 100644 index 000000000..592ceee85 --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/example/ios/Flutter/Debug.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/packages/mediation/gma_mediation_moloco/example/ios/Flutter/Release.xcconfig b/packages/mediation/gma_mediation_moloco/example/ios/Flutter/Release.xcconfig new file mode 100644 index 000000000..592ceee85 --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/example/ios/Flutter/Release.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/packages/mediation/gma_mediation_moloco/example/ios/Runner.xcodeproj/project.pbxproj b/packages/mediation/gma_mediation_moloco/example/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 000000000..012bf6621 --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/example/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,616 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 97C146E61CF9000F007C117D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 97C146ED1CF9000F007C117D; + remoteInfo = Runner; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 331C8082294A63A400263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C807B294A618700263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + 331C8082294A63A400263BE5 /* RunnerTests */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + 331C8081294A63A400263BE5 /* RunnerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C8080294A63A400263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 331C807D294A63A400263BE5 /* Sources */, + 331C807F294A63A400263BE5 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 331C8086294A63A400263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1510; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 331C8080294A63A400263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 97C146ED1CF9000F007C117D; + }; + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + 331C8080294A63A400263BE5 /* RunnerTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 331C807F294A63A400263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 331C807D294A63A400263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 331C8086294A63A400263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 97C146ED1CF9000F007C117D /* Runner */; + targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationMolocoExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 331C8088294A63A400263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationMolocoExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Debug; + }; + 331C8089294A63A400263BE5 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationMolocoExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Release; + }; + 331C808A294A63A400263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationMolocoExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationMolocoExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationMolocoExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C8088294A63A400263BE5 /* Debug */, + 331C8089294A63A400263BE5 /* Release */, + 331C808A294A63A400263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/packages/mediation/gma_mediation_moloco/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/mediation/gma_mediation_moloco/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..919434a62 --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/packages/mediation/gma_mediation_moloco/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/mediation/gma_mediation_moloco/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000..18d981003 --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/packages/mediation/gma_mediation_moloco/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/mediation/gma_mediation_moloco/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 000000000..f9b0d7c5e --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/packages/mediation/gma_mediation_moloco/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/mediation/gma_mediation_moloco/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 000000000..8e3ca5dfe --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_moloco/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/packages/mediation/gma_mediation_moloco/example/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..1d526a16e --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/example/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/packages/mediation/gma_mediation_moloco/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/mediation/gma_mediation_moloco/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000..18d981003 --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/packages/mediation/gma_mediation_moloco/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/mediation/gma_mediation_moloco/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 000000000..f9b0d7c5e --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/packages/mediation/gma_mediation_moloco/example/ios/Runner/AppDelegate.swift b/packages/mediation/gma_mediation_moloco/example/ios/Runner/AppDelegate.swift new file mode 100644 index 000000000..626664468 --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/example/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import Flutter +import UIKit + +@main +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..d36b1fab2 --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 000000000..dc9ada472 Binary files /dev/null and b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 000000000..7353c41ec Binary files /dev/null and b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 000000000..797d452e4 Binary files /dev/null and b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 000000000..6ed2d933e Binary files /dev/null and b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 000000000..4cd7b0099 Binary files /dev/null and b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 000000000..fe730945a Binary files /dev/null and b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 000000000..321773cd8 Binary files /dev/null and b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 000000000..797d452e4 Binary files /dev/null and b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 000000000..502f463a9 Binary files /dev/null and b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 000000000..0ec303439 Binary files /dev/null and b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 000000000..0ec303439 Binary files /dev/null and b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 000000000..e9f5fea27 Binary files /dev/null and b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 000000000..84ac32ae7 Binary files /dev/null and b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 000000000..8953cba09 Binary files /dev/null and b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 000000000..0467bf12a Binary files /dev/null and b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 000000000..0bedcf2fd --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchImage.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 000000000..89c2725b7 --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/packages/mediation/gma_mediation_moloco/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 000000000..f2e259c7c --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_moloco/example/ios/Runner/Base.lproj/Main.storyboard b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 000000000..f3c28516f --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_moloco/example/ios/Runner/Info.plist b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Info.plist new file mode 100644 index 000000000..71f133ff8 --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Info.plist @@ -0,0 +1,49 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Gma Mediation Moloco + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + gma_mediation_moloco_example + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + CADisableMinimumFrameDurationOnPhone + + UIApplicationSupportsIndirectInputEvents + + + diff --git a/packages/mediation/gma_mediation_moloco/example/ios/Runner/Runner-Bridging-Header.h b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 000000000..308a2a560 --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/example/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/packages/mediation/gma_mediation_moloco/example/ios/RunnerTests/GmaMediationMolocoPluginTests.swift b/packages/mediation/gma_mediation_moloco/example/ios/RunnerTests/GmaMediationMolocoPluginTests.swift new file mode 100644 index 000000000..a326f9a54 --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/example/ios/RunnerTests/GmaMediationMolocoPluginTests.swift @@ -0,0 +1,20 @@ +// Copyright 2025 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 +// +// https://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 UIKit +import XCTest + +@testable import gma_mediation_moloco + +class GmaMediationMolocoPluginTests: XCTestCase {} diff --git a/packages/mediation/gma_mediation_moloco/example/lib/main.dart b/packages/mediation/gma_mediation_moloco/example/lib/main.dart new file mode 100644 index 000000000..ea02decb7 --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/example/lib/main.dart @@ -0,0 +1,29 @@ +import 'package:flutter/material.dart'; + +void main() { + runApp(const MyApp()); +} + +class MyApp extends StatefulWidget { + const MyApp({super.key}); + + @override + State createState() => _MyAppState(); +} + +class _MyAppState extends State { + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Scaffold( + appBar: AppBar(title: const Text('Plugin example app')), + body: const Center(child: Text('Test app')), + ), + ); + } +} diff --git a/packages/mediation/gma_mediation_moloco/example/pubspec.lock b/packages/mediation/gma_mediation_moloco/example/pubspec.lock new file mode 100644 index 000000000..1e9ac9bef --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/example/pubspec.lock @@ -0,0 +1,323 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + async: + dependency: transitive + description: + name: async + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" + source: hosted + version: "2.11.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + characters: + dependency: transitive + description: + name: characters + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" + source: hosted + version: "1.3.0" + clock: + dependency: transitive + description: + name: clock + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" + source: hosted + version: "1.1.1" + collection: + dependency: transitive + description: + name: collection + sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf + url: "https://pub.dev" + source: hosted + version: "1.19.0" + cupertino_icons: + dependency: "direct main" + description: + name: cupertino_icons + sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 + url: "https://pub.dev" + source: hosted + version: "1.0.8" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" + source: hosted + version: "1.3.1" + file: + dependency: transitive + description: + name: file + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" + url: "https://pub.dev" + source: hosted + version: "7.0.0" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_driver: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" + url: "https://pub.dev" + source: hosted + version: "5.0.0" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + fuchsia_remote_debug_protocol: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + gma_mediation_moloco: + dependency: "direct main" + description: + path: ".." + relative: true + source: path + version: "1.0.0" + google_mobile_ads: + dependency: transitive + description: + name: google_mobile_ads + sha256: "0d4a3744b5e8ed1b8be6a1b452d309f811688855a497c6113fc4400f922db603" + url: "https://pub.dev" + source: hosted + version: "5.3.1" + integration_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06" + url: "https://pub.dev" + source: hosted + version: "10.0.7" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379" + url: "https://pub.dev" + source: hosted + version: "3.0.8" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + lints: + dependency: transitive + description: + name: lints + sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7 + url: "https://pub.dev" + source: hosted + version: "5.1.1" + matcher: + dependency: transitive + description: + name: matcher + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + url: "https://pub.dev" + source: hosted + version: "0.12.16+1" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + url: "https://pub.dev" + source: hosted + version: "0.11.1" + meta: + dependency: transitive + description: + name: meta + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 + url: "https://pub.dev" + source: hosted + version: "1.15.0" + path: + dependency: transitive + description: + name: path + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + url: "https://pub.dev" + source: hosted + version: "1.9.0" + platform: + dependency: transitive + description: + name: platform + sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" + url: "https://pub.dev" + source: hosted + version: "3.1.5" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" + process: + dependency: transitive + description: + name: process + sha256: "21e54fd2faf1b5bdd5102afd25012184a6793927648ea81eea80552ac9405b32" + url: "https://pub.dev" + source: hosted + version: "5.0.2" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + source_span: + dependency: transitive + description: + name: source_span + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" + source: hosted + version: "1.10.0" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377" + url: "https://pub.dev" + source: hosted + version: "1.12.0" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" + source: hosted + version: "2.1.2" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3" + url: "https://pub.dev" + source: hosted + version: "1.3.0" + sync_http: + dependency: transitive + description: + name: sync_http + sha256: "7f0cd72eca000d2e026bcd6f990b81d0ca06022ef4e32fb257b30d3d1014a961" + url: "https://pub.dev" + source: hosted + version: "0.3.1" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + test_api: + dependency: transitive + description: + name: test_api + sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c" + url: "https://pub.dev" + source: hosted + version: "0.7.3" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b + url: "https://pub.dev" + source: hosted + version: "14.3.0" + webdriver: + dependency: transitive + description: + name: webdriver + sha256: "3d773670966f02a646319410766d3b5e1037efb7f07cc68f844d5e06cd4d61c8" + url: "https://pub.dev" + source: hosted + version: "3.0.4" + webview_flutter: + dependency: transitive + description: + name: webview_flutter + sha256: "889a0a678e7c793c308c68739996227c9661590605e70b1f6cf6b9a6634f7aec" + url: "https://pub.dev" + source: hosted + version: "4.10.0" + webview_flutter_android: + dependency: transitive + description: + name: webview_flutter_android + sha256: "512c26ccc5b8a571fd5d13ec994b7509f142ff6faf85835e243dde3538fdc713" + url: "https://pub.dev" + source: hosted + version: "4.3.2" + webview_flutter_platform_interface: + dependency: transitive + description: + name: webview_flutter_platform_interface + sha256: d937581d6e558908d7ae3dc1989c4f87b786891ab47bb9df7de548a151779d8d + url: "https://pub.dev" + source: hosted + version: "2.10.0" + webview_flutter_wkwebview: + dependency: transitive + description: + name: webview_flutter_wkwebview + sha256: "7310de7efa4e6df8b3d2ff14aef3f290bc00b43363f2d0028845e6de46507fc9" + url: "https://pub.dev" + source: hosted + version: "3.18.1" +sdks: + dart: ">=3.6.2 <4.0.0" + flutter: ">=3.24.0" diff --git a/packages/mediation/gma_mediation_moloco/example/pubspec.yaml b/packages/mediation/gma_mediation_moloco/example/pubspec.yaml new file mode 100644 index 000000000..e9434ca32 --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/example/pubspec.yaml @@ -0,0 +1,86 @@ +name: gma_mediation_moloco_example +description: "Demonstrates how to use the gma_mediation_moloco plugin." +# The following line prevents the package from being accidentally published to +# pub.dev using `flutter pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +environment: + sdk: ^3.9.0 + +# Dependencies specify other packages that your package needs in order to work. +# To automatically upgrade your package dependencies to the latest versions +# consider running `flutter pub upgrade --major-versions`. Alternatively, +# dependencies can be manually updated by changing the version numbers below to +# the latest version available on pub.dev. To see which dependencies have newer +# versions available, run `flutter pub outdated`. +dependencies: + flutter: + sdk: flutter + + google_mobile_ads: ^7.0.0 + gma_mediation_moloco: + # When depending on this package from a real application you should use: + # gma_mediation_moloco: ^x.y.z + # See https://dart.dev/tools/pub/dependencies#version-constraints + # The example app is bundled with the plugin so we use a path dependency on + # the parent directory to use the current plugin's version. + path: ../ + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^1.0.8 + +dev_dependencies: + integration_test: + sdk: flutter + flutter_test: + sdk: flutter + + # The "flutter_lints" package below contains a set of recommended lints to + # encourage good coding practices. The lint set provided by the package is + # activated in the `analysis_options.yaml` file located at the root of your + # package. See that file for information about deactivating specific lint + # rules and activating additional ones. + flutter_lints: ^6.0.0 + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter packages. +flutter: + + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + + # To add assets to your application, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/to/resolution-aware-images + + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/to/asset-from-package + + # To add custom fonts to your application, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts from package dependencies, + # see https://flutter.dev/to/font-from-package diff --git a/packages/mediation/gma_mediation_moloco/gma_mediation_moloco.iml b/packages/mediation/gma_mediation_moloco/gma_mediation_moloco.iml new file mode 100644 index 000000000..27686dd4b --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/gma_mediation_moloco.iml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_moloco/ios/Classes/GmaMediationMolocoPlugin.swift b/packages/mediation/gma_mediation_moloco/ios/Classes/GmaMediationMolocoPlugin.swift new file mode 100644 index 000000000..cfea52906 --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/ios/Classes/GmaMediationMolocoPlugin.swift @@ -0,0 +1,23 @@ +// Copyright 2025 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 +// +// https://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 Flutter +import UIKit + +/// Required to link the iOS dependency of the Moloco Adapter. +public class GmaMediationMolocoPlugin: NSObject, FlutterPlugin { + public static func register(with registrar: FlutterPluginRegistrar) {} + + public func detachFromEngine(for registrar: FlutterPluginRegistrar) {} +} diff --git a/packages/mediation/gma_mediation_moloco/ios/Resources/PrivacyInfo.xcprivacy b/packages/mediation/gma_mediation_moloco/ios/Resources/PrivacyInfo.xcprivacy new file mode 100644 index 000000000..a34b7e2e6 --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/ios/Resources/PrivacyInfo.xcprivacy @@ -0,0 +1,14 @@ + + + + + NSPrivacyTrackingDomains + + NSPrivacyAccessedAPITypes + + NSPrivacyCollectedDataTypes + + NSPrivacyTracking + + + diff --git a/packages/mediation/gma_mediation_moloco/ios/gma_mediation_moloco.podspec b/packages/mediation/gma_mediation_moloco/ios/gma_mediation_moloco.podspec new file mode 100644 index 000000000..34c3d29c8 --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/ios/gma_mediation_moloco.podspec @@ -0,0 +1,21 @@ +Pod::Spec.new do |s| + s.name = 'gma_mediation_moloco' + s.version = '3.1.0' + s.summary = 'Google Mobile Ads Mediation of Moloco.' + s.description = <<-DESC + Mediation Adapter for Moloco to use with Google Mobile Ads. + DESC + s.homepage = 'https://developers.google.com/admob/flutter/mediation/moloco' + s.license = { :file => '../LICENSE' } + s.author = { 'Google LLC' => 'mediation-support@google.com' } + s.source = { :path => '.' } + s.source_files = 'Classes/**/*' + s.dependency 'Flutter' + s.dependency 'GoogleMobileAdsMediationMoloco', '~> 4.1.2.0' + s.platform = :ios, '13.0' + s.static_framework = true + + s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' } + s.swift_version = '5.0' + +end diff --git a/packages/mediation/gma_mediation_moloco/lib/gma_mediation_moloco.dart b/packages/mediation/gma_mediation_moloco/lib/gma_mediation_moloco.dart new file mode 100644 index 000000000..6670bbc6c --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/lib/gma_mediation_moloco.dart @@ -0,0 +1,16 @@ +// Copyright 2025 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 +// +// https://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. + +/// This empty class is needed to allow correct compatibility analysis with host platforms. +class GmaMediationMoloco {} diff --git a/packages/mediation/gma_mediation_moloco/pigeons/moloco_sdk_api.dart b/packages/mediation/gma_mediation_moloco/pigeons/moloco_sdk_api.dart new file mode 100644 index 000000000..eebcaf1b0 --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/pigeons/moloco_sdk_api.dart @@ -0,0 +1,36 @@ +// Copyright 2025 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 +// +// https://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 'package:pigeon/pigeon.dart'; + +@ConfigurePigeon( + PigeonOptions( + dartOut: 'lib/moloco_sdk_api.g.dart', + dartOptions: DartOptions(), + kotlinOut: + 'android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_moloco/MolocoSDKApi.g.kt', + kotlinOptions: KotlinOptions( + package: + "io.flutter.plugins.googlemobileads.mediation.gma_mediation_moloco", + ), + swiftOut: 'ios/Classes/MolocoSDKApi.g.swift', + swiftOptions: SwiftOptions(), + dartPackageName: 'gma_mediation_moloco', + ), +) +@HostApi() +/// The generated classes set the channels to call the methods in the corresponding kotlin MolocoSDKApi interface and swift MolocoSDKApi protocol from the dart layer. +abstract class MolocoSDKApi { + // TODO: Add SDK methods here. +} diff --git a/packages/mediation/gma_mediation_moloco/pubspec.lock b/packages/mediation/gma_mediation_moloco/pubspec.lock new file mode 100644 index 000000000..b98eff2a1 --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/pubspec.lock @@ -0,0 +1,413 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + sha256: dc27559385e905ad30838356c5f5d574014ba39872d732111cd07ac0beff4c57 + url: "https://pub.dev" + source: hosted + version: "80.0.0" + analyzer: + dependency: transitive + description: + name: analyzer + sha256: "192d1c5b944e7e53b24b5586db760db934b177d4147c42fbca8c8c5f1eb8d11e" + url: "https://pub.dev" + source: hosted + version: "7.3.0" + args: + dependency: transitive + description: + name: args + sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6 + url: "https://pub.dev" + source: hosted + version: "2.6.0" + async: + dependency: transitive + description: + name: async + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" + source: hosted + version: "2.11.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + built_collection: + dependency: transitive + description: + name: built_collection + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" + url: "https://pub.dev" + source: hosted + version: "5.1.1" + built_value: + dependency: transitive + description: + name: built_value + sha256: "28a712df2576b63c6c005c465989a348604960c0958d28be5303ba9baa841ac2" + url: "https://pub.dev" + source: hosted + version: "8.9.3" + characters: + dependency: transitive + description: + name: characters + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" + source: hosted + version: "1.3.0" + clock: + dependency: transitive + description: + name: clock + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" + source: hosted + version: "1.1.1" + code_builder: + dependency: transitive + description: + name: code_builder + sha256: "0ec10bf4a89e4c613960bf1e8b42c64127021740fb21640c29c909826a5eea3e" + url: "https://pub.dev" + source: hosted + version: "4.10.1" + collection: + dependency: transitive + description: + name: collection + sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf + url: "https://pub.dev" + source: hosted + version: "1.19.0" + convert: + dependency: transitive + description: + name: convert + sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 + url: "https://pub.dev" + source: hosted + version: "3.1.2" + crypto: + dependency: transitive + description: + name: crypto + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" + url: "https://pub.dev" + source: hosted + version: "3.0.6" + dart_style: + dependency: transitive + description: + name: dart_style + sha256: "27eb0ae77836989a3bc541ce55595e8ceee0992807f14511552a898ddd0d88ac" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" + source: hosted + version: "1.3.1" + file: + dependency: transitive + description: + name: file + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 + url: "https://pub.dev" + source: hosted + version: "7.0.1" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be + url: "https://pub.dev" + source: hosted + version: "1.1.1" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" + url: "https://pub.dev" + source: hosted + version: "5.0.0" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + glob: + dependency: transitive + description: + name: glob + sha256: c3f1ee72c96f8f78935e18aa8cecced9ab132419e8625dc187e1c2408efc20de + url: "https://pub.dev" + source: hosted + version: "2.1.3" + google_mobile_ads: + dependency: "direct main" + description: + name: google_mobile_ads + sha256: "0d4a3744b5e8ed1b8be6a1b452d309f811688855a497c6113fc4400f922db603" + url: "https://pub.dev" + source: hosted + version: "5.3.1" + graphs: + dependency: transitive + description: + name: graphs + sha256: "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06" + url: "https://pub.dev" + source: hosted + version: "10.0.7" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379" + url: "https://pub.dev" + source: hosted + version: "3.0.8" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + lint: + dependency: "direct dev" + description: + name: lint + sha256: "9d4a1bc7196b9eb8bcbb1fd9cbb7df28b926948bb4d36a183c207bf7502e0a87" + url: "https://pub.dev" + source: hosted + version: "2.4.0" + lints: + dependency: transitive + description: + name: lints + sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7 + url: "https://pub.dev" + source: hosted + version: "5.1.1" + matcher: + dependency: transitive + description: + name: matcher + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + url: "https://pub.dev" + source: hosted + version: "0.12.16+1" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + url: "https://pub.dev" + source: hosted + version: "0.11.1" + meta: + dependency: transitive + description: + name: meta + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 + url: "https://pub.dev" + source: hosted + version: "1.15.0" + package_config: + dependency: transitive + description: + name: package_config + sha256: "92d4488434b520a62570293fbd33bb556c7d49230791c1b4bbd973baf6d2dc67" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + path: + dependency: transitive + description: + name: path + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + url: "https://pub.dev" + source: hosted + version: "1.9.0" + pigeon: + dependency: "direct dev" + description: + name: pigeon + sha256: "70aabf0a7afc2665d17f7da9914e1aa461ce991c3bf20dc15ec68b3b96e32238" + url: "https://pub.dev" + source: hosted + version: "24.1.1" + plugin_platform_interface: + dependency: "direct main" + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "7b3cfbf654f3edd0c6298ecd5be782ce997ddf0e00531b9464b55245185bbbbd" + url: "https://pub.dev" + source: hosted + version: "2.1.5" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + source_span: + dependency: transitive + description: + name: source_span + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" + source: hosted + version: "1.10.0" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377" + url: "https://pub.dev" + source: hosted + version: "1.12.0" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" + source: hosted + version: "2.1.2" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3" + url: "https://pub.dev" + source: hosted + version: "1.3.0" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + test_api: + dependency: transitive + description: + name: test_api + sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c" + url: "https://pub.dev" + source: hosted + version: "0.7.3" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 + url: "https://pub.dev" + source: hosted + version: "1.4.0" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b + url: "https://pub.dev" + source: hosted + version: "14.3.0" + watcher: + dependency: transitive + description: + name: watcher + sha256: "69da27e49efa56a15f8afe8f4438c4ec02eff0a117df1b22ea4aad194fe1c104" + url: "https://pub.dev" + source: hosted + version: "1.1.1" + webview_flutter: + dependency: transitive + description: + name: webview_flutter + sha256: "889a0a678e7c793c308c68739996227c9661590605e70b1f6cf6b9a6634f7aec" + url: "https://pub.dev" + source: hosted + version: "4.10.0" + webview_flutter_android: + dependency: transitive + description: + name: webview_flutter_android + sha256: "512c26ccc5b8a571fd5d13ec994b7509f142ff6faf85835e243dde3538fdc713" + url: "https://pub.dev" + source: hosted + version: "4.3.2" + webview_flutter_platform_interface: + dependency: transitive + description: + name: webview_flutter_platform_interface + sha256: d937581d6e558908d7ae3dc1989c4f87b786891ab47bb9df7de548a151779d8d + url: "https://pub.dev" + source: hosted + version: "2.10.0" + webview_flutter_wkwebview: + dependency: transitive + description: + name: webview_flutter_wkwebview + sha256: "7310de7efa4e6df8b3d2ff14aef3f290bc00b43363f2d0028845e6de46507fc9" + url: "https://pub.dev" + source: hosted + version: "3.18.1" + yaml: + dependency: transitive + description: + name: yaml + sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce + url: "https://pub.dev" + source: hosted + version: "3.1.3" +sdks: + dart: ">=3.6.2 <4.0.0" + flutter: ">=3.24.0" diff --git a/packages/mediation/gma_mediation_moloco/pubspec.yaml b/packages/mediation/gma_mediation_moloco/pubspec.yaml new file mode 100644 index 000000000..0c8ddc151 --- /dev/null +++ b/packages/mediation/gma_mediation_moloco/pubspec.yaml @@ -0,0 +1,27 @@ +name: gma_mediation_moloco +description: 'Mediation Adapter that enables sending ad requests to the Moloco + ad network using the google_mobile_ads plugin.' +version: 3.1.0 +environment: + sdk: '>=3.9.0 <4.0.0' + flutter: '>=3.35.1' +dependencies: + flutter: + sdk: flutter + google_mobile_ads: ^7.0.0 + plugin_platform_interface: ^2.0.2 +dev_dependencies: + flutter_test: + sdk: flutter + flutter_lints: ^6.0.0 + lint: ^2.4.0 + pigeon: ^24.1.1 +flutter: + plugin: + platforms: + android: + package: io.flutter.plugins.googlemobileads.mediation.gma_mediation_moloco + pluginClass: GmaMediationMolocoPlugin + ios: + pluginClass: GmaMediationMolocoPlugin +repository: https://github.com/googleads/googleads-mobile-flutter/tree/main/packages/mediation/gma_mediation_moloco diff --git a/packages/mediation/gma_mediation_mytarget/CHANGELOG.md b/packages/mediation/gma_mediation_mytarget/CHANGELOG.md new file mode 100644 index 000000000..d00724a41 --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/CHANGELOG.md @@ -0,0 +1,42 @@ +## myTarget Flutter Mediation Adapter Changelog + +#### Version 1.7.0 +* Supports [myTarget Android adapter version 5.27.4.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/mytarget/CHANGELOG.md#version-52740). +* Supports [myTarget iOS adapter version 5.38.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/MyTarget/CHANGELOG.md#version-53800). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.6.0 +* Supports [myTarget Android adapter version 5.27.4.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/mytarget/CHANGELOG.md#version-52740). +* Supports [myTarget iOS adapter version 5.37.1.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/MyTarget/CHANGELOG.md#version-53710). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.5.0 +* Supports [myTarget Android adapter version 5.27.3.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/mytarget/CHANGELOG.md#version-52730). +* Supports [myTarget iOS adapter version 5.36.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/MyTarget/CHANGELOG.md#version-53600). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.4.0 +* Supports [myTarget Android adapter version 5.27.2.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/mytarget/CHANGELOG.md#version-52720). +* Supports [myTarget iOS adapter version 5.33.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/MyTarget/CHANGELOG.md#version-53300). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.3.0 +* Supports [myTarget Android adapter version 5.27.1.1](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/mytarget/CHANGELOG.md#version-52711). +* Supports [myTarget iOS adapter version 5.31.1.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/MyTarget/CHANGELOG.md#version-53110). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.2.0 +* Supports [myTarget Android adapter version 5.27.1.1](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/mytarget/CHANGELOG.md#version-52711). +* Supports [myTarget iOS adapter version 5.29.1.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/MyTarget/CHANGELOG.md#version-52910). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.1.0 +* Supports [myTarget Android adapter version 5.27.1.1](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/mytarget/CHANGELOG.md#version-52711). +* Supports [myTarget iOS adapter version 5.28.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/MyTarget/CHANGELOG.md#version-52800). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.0.0 +* Initial release. +* Supports [myTarget Android adapter version 5.27.1.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/mytarget/CHANGELOG.md#version-52710). +* Supports [myTarget iOS adapter version 5.24.1.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/MyTarget/CHANGELOG.md#version-52410). +* Built and tested with the Google Mobile Ads Flutter Plugin version 5.3.1. diff --git a/packages/mediation/gma_mediation_mytarget/LICENSE b/packages/mediation/gma_mediation_mytarget/LICENSE new file mode 100644 index 000000000..e58143fcc --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/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 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. diff --git a/packages/mediation/gma_mediation_mytarget/README.md b/packages/mediation/gma_mediation_mytarget/README.md new file mode 100644 index 000000000..c8ad289de --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/README.md @@ -0,0 +1,36 @@ +# Google Mobile Ads Mediation of mytarget for Flutter + +[![gma_mediation_mytarget](https://github.com/googleads/googleads-mobile-flutter/actions/workflows/google_mobile_ads.yaml/badge.svg)](https://github.com/googleads/googleads-mobile-flutter/actions/workflows/google_mobile_ads.yaml) + +This repository contains the source code for the Mediation mytarget Flutter +plugin to be used with the Google Mobile Ads plugin. It enables mediation of the +mytarget Ad Network through the Google Mobile Ads SDK. + +This plugin use the [Pigeon Flutter plugin](https://pub.dev/packages/pigeon) to +generate the classes that bridge the dart layer with each platform's code. +To add or modify the third party sdk, use the classes in the pigeons folder +following [this guide](https://github.com/flutter/packages/blob/main/packages/pigeon/example/README.md). + +## Documentation +For instructions on how to use with the google_mobile_ads plugin, refer to the +developer guide for [mytarget](https://developers.google.com/admob/flutter/mediation/mytarget). + +## Downloads + +See [pub.dev](https://pub.dev/packages/gma_mediation_mytarget/versions) for the +latest releases of the plugin. + +## Suggesting improvements + +To file bugs, make feature requests, or to suggest other improvements, please +use [github's issue tracker](https://github.com/googleads/googleads-mobile-flutter/issues). + + +## Other resources + +* [AdMob help center](https://support.google.com/admob/?hl=en#topic=7383088) +* [Ad Manager help center](https://support.google.com/admanager/?hl=en#topic=7505988) + +## License + +[Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0) \ No newline at end of file diff --git a/packages/mediation/gma_mediation_mytarget/analysis_options.yaml b/packages/mediation/gma_mediation_mytarget/analysis_options.yaml new file mode 100644 index 000000000..632d08c98 --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/analysis_options.yaml @@ -0,0 +1,19 @@ +# Copyright 2025 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 +# +# https://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. + +include: package:lint/package.yaml + +analyzer: + exclude: + - '**.g.dart' \ No newline at end of file diff --git a/packages/mediation/gma_mediation_mytarget/android/build.gradle b/packages/mediation/gma_mediation_mytarget/android/build.gradle new file mode 100644 index 000000000..618ec456e --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/android/build.gradle @@ -0,0 +1,71 @@ +group = "io.flutter.plugins.googlemobileads.mediation.gma_mediation_mytarget" +version = "1.7.0" + +buildscript { + ext.kotlin_version = "1.8.22" + repositories { + google() + mavenCentral() + } + + dependencies { + classpath("com.android.tools.build:gradle:8.7.0") + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version") + } +} + +allprojects { + repositories { + google() + mavenCentral() + } +} + +apply plugin: "com.android.library" +apply plugin: "kotlin-android" + +ext { + stringVersion = "5.27.4.0" +} + +android { + namespace = "io.flutter.plugins.googlemobileads.mediation.gma_mediation_mytarget" + + compileSdk = 35 + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11 + } + + sourceSets { + main.java.srcDirs += "src/main/kotlin" + test.java.srcDirs += "src/test/kotlin" + } + + defaultConfig { + minSdk = 23 + } + + dependencies { + implementation("com.google.ads.mediation:mytarget:$stringVersion") + testImplementation("org.jetbrains.kotlin:kotlin-test") + testImplementation("org.mockito:mockito-core:5.0.0") + } + + testOptions { + unitTests.all { + useJUnitPlatform() + + testLogging { + events "passed", "skipped", "failed", "standardOut", "standardError" + outputs.upToDateWhen {false} + showStandardStreams = true + } + } + } +} diff --git a/packages/mediation/gma_mediation_mytarget/android/gma_mediation_mytarget_android.iml b/packages/mediation/gma_mediation_mytarget/android/gma_mediation_mytarget_android.iml new file mode 100644 index 000000000..e8b9110d5 --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/android/gma_mediation_mytarget_android.iml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_mytarget/android/settings.gradle b/packages/mediation/gma_mediation_mytarget/android/settings.gradle new file mode 100644 index 000000000..34241917e --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/android/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'gma_mediation_mytarget' diff --git a/packages/mediation/gma_mediation_mytarget/android/src/main/AndroidManifest.xml b/packages/mediation/gma_mediation_mytarget/android/src/main/AndroidManifest.xml new file mode 100644 index 000000000..5a0ebc5d7 --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/android/src/main/AndroidManifest.xml @@ -0,0 +1,3 @@ + + diff --git a/packages/mediation/gma_mediation_mytarget/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_mytarget/GmaMediationmytargetPlugin.kt b/packages/mediation/gma_mediation_mytarget/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_mytarget/GmaMediationmytargetPlugin.kt new file mode 100644 index 000000000..57506ee22 --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_mytarget/GmaMediationmytargetPlugin.kt @@ -0,0 +1,24 @@ +// Copyright 2025 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 +// +// https://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. + +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_mytarget + +import io.flutter.embedding.engine.plugins.FlutterPlugin + +/** Required to link the Android dependency of the mytarget Adapter. */ +class GmaMediationmytargetPlugin : FlutterPlugin { + override fun onAttachedToEngine(flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) {} + + override fun onDetachedFromEngine(binding: FlutterPlugin.FlutterPluginBinding) {} +} diff --git a/packages/mediation/gma_mediation_mytarget/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_mytarget/MytargetFlutterMediationExtras.kt b/packages/mediation/gma_mediation_mytarget/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_mytarget/MytargetFlutterMediationExtras.kt new file mode 100644 index 000000000..96cc20718 --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_mytarget/MytargetFlutterMediationExtras.kt @@ -0,0 +1,35 @@ +// Copyright 2025 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 +// +// https://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. + +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_mytarget + +import android.os.Bundle +import android.util.Pair +import androidx.core.os.bundleOf +import com.google.android.gms.ads.mediation.Adapter +import com.google.android.gms.ads.mediation.MediationExtrasReceiver +import io.flutter.plugins.googlemobileads.FlutterMediationExtras + +class MytargetFlutterMediationExtras : FlutterMediationExtras() { + private var flutterExtras: Map? = null + + override fun setMediationExtras(extras: MutableMap) { + flutterExtras = extras + } + + override fun getMediationExtras(): Pair, Bundle> { + // MyTarget does not support any extras for Android adapter. + return Pair, Bundle>(Adapter::class.java, bundleOf()) + } +} diff --git a/packages/mediation/gma_mediation_mytarget/android/src/test/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_mytarget/GmaMediationmytargetPluginTest.kt b/packages/mediation/gma_mediation_mytarget/android/src/test/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_mytarget/GmaMediationmytargetPluginTest.kt new file mode 100644 index 000000000..98a1fa6d1 --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/android/src/test/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_mytarget/GmaMediationmytargetPluginTest.kt @@ -0,0 +1,17 @@ +// Copyright 2025 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 +// +// https://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. + +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_mytarget + +internal class GmaMediationmytargetPluginTest {} diff --git a/packages/mediation/gma_mediation_mytarget/example/README.md b/packages/mediation/gma_mediation_mytarget/example/README.md new file mode 100644 index 000000000..7b76fcf9f --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/example/README.md @@ -0,0 +1,17 @@ +# gma_mediation_mytarget_example + +Learn how to integrate with your app that uses the [google_mobile_ads](https://pub.dev/packages/google_mobile_ads) plugin +by following the [development guide](https://developers.google.com/admob/flutter/mediation/mytarget). + +## Getting Started + +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) + +For help getting started with Flutter development, view the +[online documentation](https://docs.flutter.dev/), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/packages/mediation/gma_mediation_mytarget/example/analysis_options.yaml b/packages/mediation/gma_mediation_mytarget/example/analysis_options.yaml new file mode 100644 index 000000000..0d2902135 --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/example/analysis_options.yaml @@ -0,0 +1,28 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at https://dart.dev/lints. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/packages/mediation/gma_mediation_mytarget/example/android/app/build.gradle.kts b/packages/mediation/gma_mediation_mytarget/example/android/app/build.gradle.kts new file mode 100644 index 000000000..0ac321175 --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/example/android/app/build.gradle.kts @@ -0,0 +1,41 @@ +plugins { + id("com.android.application") + id("kotlin-android") + // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. + id("dev.flutter.flutter-gradle-plugin") +} + +android { + namespace = "io.flutter.plugins.googlemobileads.mediation.gma_mediation_mytarget_example" + compileSdk = flutter.compileSdkVersion + ndkVersion = flutter.ndkVersion + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlinOptions { jvmTarget = JavaVersion.VERSION_11.toString() } + + defaultConfig { + // TODO: Specify your own unique Application ID + // (https://developer.android.com/studio/build/application-id.html). + applicationId = "io.flutter.plugins.googlemobileads.mediation.gma_mediation_mytarget_example" + // You can update the following values to match your application needs. + // For more information, see: https://flutter.dev/to/review-gradle-config. + minSdk = 23 + targetSdk = flutter.targetSdkVersion + versionCode = flutter.versionCode + versionName = flutter.versionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig = signingConfigs.getByName("debug") + } + } +} + +flutter { source = "../.." } diff --git a/packages/mediation/gma_mediation_mytarget/example/android/app/src/debug/AndroidManifest.xml b/packages/mediation/gma_mediation_mytarget/example/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 000000000..399f6981d --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/example/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/packages/mediation/gma_mediation_mytarget/example/android/app/src/main/AndroidManifest.xml b/packages/mediation/gma_mediation_mytarget/example/android/app/src/main/AndroidManifest.xml new file mode 100644 index 000000000..f0564d728 --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/example/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_mytarget/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_mytarget_example/MainActivity.kt b/packages/mediation/gma_mediation_mytarget/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_mytarget_example/MainActivity.kt new file mode 100644 index 000000000..e06793ea5 --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_mytarget_example/MainActivity.kt @@ -0,0 +1,5 @@ +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_mytarget_example + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity : FlutterActivity() diff --git a/packages/mediation/gma_mediation_mytarget/example/android/app/src/main/res/drawable-v21/launch_background.xml b/packages/mediation/gma_mediation_mytarget/example/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 000000000..f74085f3f --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/example/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/mediation/gma_mediation_mytarget/example/android/app/src/main/res/drawable/launch_background.xml b/packages/mediation/gma_mediation_mytarget/example/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 000000000..304732f88 --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/example/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/mediation/gma_mediation_mytarget/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/mediation/gma_mediation_mytarget/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..db77bb4b7 Binary files /dev/null and b/packages/mediation/gma_mediation_mytarget/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_mytarget/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/mediation/gma_mediation_mytarget/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..17987b79b Binary files /dev/null and b/packages/mediation/gma_mediation_mytarget/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_mytarget/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/mediation/gma_mediation_mytarget/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..09d439148 Binary files /dev/null and b/packages/mediation/gma_mediation_mytarget/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_mytarget/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/mediation/gma_mediation_mytarget/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..d5f1c8d34 Binary files /dev/null and b/packages/mediation/gma_mediation_mytarget/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_mytarget/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/packages/mediation/gma_mediation_mytarget/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..4d6372eeb Binary files /dev/null and b/packages/mediation/gma_mediation_mytarget/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_mytarget/example/android/app/src/main/res/values-night/styles.xml b/packages/mediation/gma_mediation_mytarget/example/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 000000000..06952be74 --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/example/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/packages/mediation/gma_mediation_mytarget/example/android/app/src/main/res/values/styles.xml b/packages/mediation/gma_mediation_mytarget/example/android/app/src/main/res/values/styles.xml new file mode 100644 index 000000000..cb1ef8805 --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/example/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/packages/mediation/gma_mediation_mytarget/example/android/app/src/profile/AndroidManifest.xml b/packages/mediation/gma_mediation_mytarget/example/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 000000000..399f6981d --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/example/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/packages/mediation/gma_mediation_mytarget/example/android/build.gradle.kts b/packages/mediation/gma_mediation_mytarget/example/android/build.gradle.kts new file mode 100644 index 000000000..97eed2dd6 --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/example/android/build.gradle.kts @@ -0,0 +1,19 @@ +allprojects { + repositories { + google() + mavenCentral() + } +} + +val newBuildDir: Directory = rootProject.layout.buildDirectory.dir("../../build").get() + +rootProject.layout.buildDirectory.value(newBuildDir) + +subprojects { + val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name) + project.layout.buildDirectory.value(newSubprojectBuildDir) +} + +subprojects { project.evaluationDependsOn(":app") } + +tasks.register("clean") { delete(rootProject.layout.buildDirectory) } diff --git a/packages/mediation/gma_mediation_mytarget/example/android/gma_mediation_mytarget_example_android.iml b/packages/mediation/gma_mediation_mytarget/example/android/gma_mediation_mytarget_example_android.iml new file mode 100644 index 000000000..18999696a --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/example/android/gma_mediation_mytarget_example_android.iml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_mytarget/example/android/gradle.properties b/packages/mediation/gma_mediation_mytarget/example/android/gradle.properties new file mode 100644 index 000000000..f018a6181 --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/example/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError +android.useAndroidX=true +android.enableJetifier=true diff --git a/packages/mediation/gma_mediation_mytarget/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/mediation/gma_mediation_mytarget/example/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 000000000..afa1e8eb0 --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/example/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip diff --git a/packages/mediation/gma_mediation_mytarget/example/android/gradlew b/packages/mediation/gma_mediation_mytarget/example/android/gradlew new file mode 100755 index 000000000..9d82f7891 --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/example/android/gradlew @@ -0,0 +1,160 @@ +#!/usr/bin/env bash + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn ( ) { + echo "$*" +} + +die ( ) { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; +esac + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules +function splitJvmOpts() { + JVM_OPTS=("$@") +} +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS +JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" + +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/packages/mediation/gma_mediation_mytarget/example/android/gradlew.bat b/packages/mediation/gma_mediation_mytarget/example/android/gradlew.bat new file mode 100644 index 000000000..aec99730b --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/example/android/gradlew.bat @@ -0,0 +1,90 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windowz variants + +if not "%OS%" == "Windows_NT" goto win9xME_args +if "%@eval[2+2]" == "4" goto 4NT_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* +goto execute + +:4NT_args +@rem Get arguments from the 4NT Shell from JP Software +set CMD_LINE_ARGS=%$ + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/packages/mediation/gma_mediation_mytarget/example/android/settings.gradle.kts b/packages/mediation/gma_mediation_mytarget/example/android/settings.gradle.kts new file mode 100644 index 000000000..b58f94546 --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/example/android/settings.gradle.kts @@ -0,0 +1,25 @@ +pluginManagement { + val flutterSdkPath = run { + val properties = java.util.Properties() + file("local.properties").inputStream().use { properties.load(it) } + val flutterSdkPath = properties.getProperty("flutter.sdk") + require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" } + flutterSdkPath + } + + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") + + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +plugins { + id("dev.flutter.flutter-plugin-loader") version "1.0.0" + id("com.android.application") version "8.7.0" apply false + id("org.jetbrains.kotlin.android") version "1.8.22" apply false +} + +include(":app") diff --git a/packages/mediation/gma_mediation_mytarget/example/gma_mediation_mytarget_example.iml b/packages/mediation/gma_mediation_mytarget/example/gma_mediation_mytarget_example.iml new file mode 100644 index 000000000..f66303d53 --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/example/gma_mediation_mytarget_example.iml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_mytarget/example/ios/Flutter/AppFrameworkInfo.plist b/packages/mediation/gma_mediation_mytarget/example/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 000000000..7c5696400 --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/example/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 12.0 + + diff --git a/packages/mediation/gma_mediation_mytarget/example/ios/Flutter/Debug.xcconfig b/packages/mediation/gma_mediation_mytarget/example/ios/Flutter/Debug.xcconfig new file mode 100644 index 000000000..592ceee85 --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/example/ios/Flutter/Debug.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/packages/mediation/gma_mediation_mytarget/example/ios/Flutter/Release.xcconfig b/packages/mediation/gma_mediation_mytarget/example/ios/Flutter/Release.xcconfig new file mode 100644 index 000000000..592ceee85 --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/example/ios/Flutter/Release.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/packages/mediation/gma_mediation_mytarget/example/ios/Runner.xcodeproj/project.pbxproj b/packages/mediation/gma_mediation_mytarget/example/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 000000000..6ab4a521a --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/example/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,616 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 97C146E61CF9000F007C117D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 97C146ED1CF9000F007C117D; + remoteInfo = Runner; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 331C8082294A63A400263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C807B294A618700263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + 331C8082294A63A400263BE5 /* RunnerTests */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + 331C8081294A63A400263BE5 /* RunnerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C8080294A63A400263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 331C807D294A63A400263BE5 /* Sources */, + 331C807F294A63A400263BE5 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 331C8086294A63A400263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1510; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 331C8080294A63A400263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 97C146ED1CF9000F007C117D; + }; + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + 331C8080294A63A400263BE5 /* RunnerTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 331C807F294A63A400263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 331C807D294A63A400263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 331C8086294A63A400263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 97C146ED1CF9000F007C117D /* Runner */; + targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationMytargetExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 331C8088294A63A400263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationMytargetExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Debug; + }; + 331C8089294A63A400263BE5 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationMytargetExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Release; + }; + 331C808A294A63A400263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationMytargetExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationMytargetExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationMytargetExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C8088294A63A400263BE5 /* Debug */, + 331C8089294A63A400263BE5 /* Release */, + 331C808A294A63A400263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/packages/mediation/gma_mediation_mytarget/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/mediation/gma_mediation_mytarget/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..919434a62 --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/packages/mediation/gma_mediation_mytarget/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/mediation/gma_mediation_mytarget/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000..18d981003 --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/packages/mediation/gma_mediation_mytarget/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/mediation/gma_mediation_mytarget/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 000000000..f9b0d7c5e --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/packages/mediation/gma_mediation_mytarget/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/mediation/gma_mediation_mytarget/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 000000000..15cada483 --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_mytarget/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/packages/mediation/gma_mediation_mytarget/example/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..1d526a16e --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/example/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/packages/mediation/gma_mediation_mytarget/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/mediation/gma_mediation_mytarget/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000..18d981003 --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/packages/mediation/gma_mediation_mytarget/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/mediation/gma_mediation_mytarget/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 000000000..f9b0d7c5e --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/packages/mediation/gma_mediation_mytarget/example/ios/Runner/AppDelegate.swift b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/AppDelegate.swift new file mode 100644 index 000000000..626664468 --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import Flutter +import UIKit + +@main +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..d36b1fab2 --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 000000000..dc9ada472 Binary files /dev/null and b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 000000000..7353c41ec Binary files /dev/null and b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 000000000..797d452e4 Binary files /dev/null and b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 000000000..6ed2d933e Binary files /dev/null and b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 000000000..4cd7b0099 Binary files /dev/null and b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 000000000..fe730945a Binary files /dev/null and b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 000000000..321773cd8 Binary files /dev/null and b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 000000000..797d452e4 Binary files /dev/null and b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 000000000..502f463a9 Binary files /dev/null and b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 000000000..0ec303439 Binary files /dev/null and b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 000000000..0ec303439 Binary files /dev/null and b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 000000000..e9f5fea27 Binary files /dev/null and b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 000000000..84ac32ae7 Binary files /dev/null and b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 000000000..8953cba09 Binary files /dev/null and b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 000000000..0467bf12a Binary files /dev/null and b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 000000000..0bedcf2fd --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchImage.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 000000000..89c2725b7 --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 000000000..f2e259c7c --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Base.lproj/Main.storyboard b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 000000000..f3c28516f --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Info.plist b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Info.plist new file mode 100644 index 000000000..decee1627 --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Info.plist @@ -0,0 +1,49 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Gma Mediation Mytarget + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + gma_mediation_mytarget_example + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + CADisableMinimumFrameDurationOnPhone + + UIApplicationSupportsIndirectInputEvents + + + diff --git a/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Runner-Bridging-Header.h b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 000000000..308a2a560 --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/example/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/packages/mediation/gma_mediation_mytarget/example/ios/RunnerTests/GmaMediationmytargetPluginTests.swift b/packages/mediation/gma_mediation_mytarget/example/ios/RunnerTests/GmaMediationmytargetPluginTests.swift new file mode 100644 index 000000000..f8d21dc1a --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/example/ios/RunnerTests/GmaMediationmytargetPluginTests.swift @@ -0,0 +1,20 @@ +// Copyright 2025 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 +// +// https://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 UIKit +import XCTest + +@testable import gma_mediation_mytarget + +class GmaMediationmytargetPluginTests: XCTestCase {} diff --git a/packages/mediation/gma_mediation_mytarget/example/lib/main.dart b/packages/mediation/gma_mediation_mytarget/example/lib/main.dart new file mode 100644 index 000000000..ea02decb7 --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/example/lib/main.dart @@ -0,0 +1,29 @@ +import 'package:flutter/material.dart'; + +void main() { + runApp(const MyApp()); +} + +class MyApp extends StatefulWidget { + const MyApp({super.key}); + + @override + State createState() => _MyAppState(); +} + +class _MyAppState extends State { + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Scaffold( + appBar: AppBar(title: const Text('Plugin example app')), + body: const Center(child: Text('Test app')), + ), + ); + } +} diff --git a/packages/mediation/gma_mediation_mytarget/example/pubspec.lock b/packages/mediation/gma_mediation_mytarget/example/pubspec.lock new file mode 100644 index 000000000..7417a0b17 --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/example/pubspec.lock @@ -0,0 +1,323 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + async: + dependency: transitive + description: + name: async + sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63 + url: "https://pub.dev" + source: hosted + version: "2.12.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + characters: + dependency: transitive + description: + name: characters + sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 + url: "https://pub.dev" + source: hosted + version: "1.4.0" + clock: + dependency: transitive + description: + name: clock + sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b + url: "https://pub.dev" + source: hosted + version: "1.1.2" + collection: + dependency: transitive + description: + name: collection + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" + url: "https://pub.dev" + source: hosted + version: "1.19.1" + cupertino_icons: + dependency: "direct main" + description: + name: cupertino_icons + sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 + url: "https://pub.dev" + source: hosted + version: "1.0.8" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc" + url: "https://pub.dev" + source: hosted + version: "1.3.2" + file: + dependency: transitive + description: + name: file + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 + url: "https://pub.dev" + source: hosted + version: "7.0.1" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_driver: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" + url: "https://pub.dev" + source: hosted + version: "5.0.0" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + fuchsia_remote_debug_protocol: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + gma_mediation_mytarget: + dependency: "direct main" + description: + path: ".." + relative: true + source: path + version: "1.0.0" + google_mobile_ads: + dependency: transitive + description: + name: google_mobile_ads + sha256: "0d4a3744b5e8ed1b8be6a1b452d309f811688855a497c6113fc4400f922db603" + url: "https://pub.dev" + source: hosted + version: "5.3.1" + integration_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec + url: "https://pub.dev" + source: hosted + version: "10.0.8" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 + url: "https://pub.dev" + source: hosted + version: "3.0.9" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + lints: + dependency: transitive + description: + name: lints + sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7 + url: "https://pub.dev" + source: hosted + version: "5.1.1" + matcher: + dependency: transitive + description: + name: matcher + sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 + url: "https://pub.dev" + source: hosted + version: "0.12.17" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + url: "https://pub.dev" + source: hosted + version: "0.11.1" + meta: + dependency: transitive + description: + name: meta + sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c + url: "https://pub.dev" + source: hosted + version: "1.16.0" + path: + dependency: transitive + description: + name: path + sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" + url: "https://pub.dev" + source: hosted + version: "1.9.1" + platform: + dependency: transitive + description: + name: platform + sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" + url: "https://pub.dev" + source: hosted + version: "3.1.6" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" + process: + dependency: transitive + description: + name: process + sha256: "107d8be718f120bbba9dcd1e95e3bd325b1b4a4f07db64154635ba03f2567a0d" + url: "https://pub.dev" + source: hosted + version: "5.0.3" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + source_span: + dependency: transitive + description: + name: source_span + sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" + url: "https://pub.dev" + source: hosted + version: "1.10.1" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" + url: "https://pub.dev" + source: hosted + version: "1.12.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" + url: "https://pub.dev" + source: hosted + version: "1.4.1" + sync_http: + dependency: transitive + description: + name: sync_http + sha256: "7f0cd72eca000d2e026bcd6f990b81d0ca06022ef4e32fb257b30d3d1014a961" + url: "https://pub.dev" + source: hosted + version: "0.3.1" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" + url: "https://pub.dev" + source: hosted + version: "1.2.2" + test_api: + dependency: transitive + description: + name: test_api + sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd + url: "https://pub.dev" + source: hosted + version: "0.7.4" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14" + url: "https://pub.dev" + source: hosted + version: "14.3.1" + webdriver: + dependency: transitive + description: + name: webdriver + sha256: "3d773670966f02a646319410766d3b5e1037efb7f07cc68f844d5e06cd4d61c8" + url: "https://pub.dev" + source: hosted + version: "3.0.4" + webview_flutter: + dependency: transitive + description: + name: webview_flutter + sha256: "889a0a678e7c793c308c68739996227c9661590605e70b1f6cf6b9a6634f7aec" + url: "https://pub.dev" + source: hosted + version: "4.10.0" + webview_flutter_android: + dependency: transitive + description: + name: webview_flutter_android + sha256: "512c26ccc5b8a571fd5d13ec994b7509f142ff6faf85835e243dde3538fdc713" + url: "https://pub.dev" + source: hosted + version: "4.3.2" + webview_flutter_platform_interface: + dependency: transitive + description: + name: webview_flutter_platform_interface + sha256: d937581d6e558908d7ae3dc1989c4f87b786891ab47bb9df7de548a151779d8d + url: "https://pub.dev" + source: hosted + version: "2.10.0" + webview_flutter_wkwebview: + dependency: transitive + description: + name: webview_flutter_wkwebview + sha256: d7403ef4f042714c9ee2b26eaac4cadae7394cb0d4e608b1dd850c3ff96bd893 + url: "https://pub.dev" + source: hosted + version: "3.18.2" +sdks: + dart: ">=3.7.0 <4.0.0" + flutter: ">=3.24.0" diff --git a/packages/mediation/gma_mediation_mytarget/example/pubspec.yaml b/packages/mediation/gma_mediation_mytarget/example/pubspec.yaml new file mode 100644 index 000000000..ee37b0329 --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/example/pubspec.yaml @@ -0,0 +1,86 @@ +name: gma_mediation_mytarget_example +description: "Demonstrates how to use the gma_mediation_mytarget plugin." +# The following line prevents the package from being accidentally published to +# pub.dev using `flutter pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +environment: + sdk: ^3.7.0 + +# Dependencies specify other packages that your package needs in order to work. +# To automatically upgrade your package dependencies to the latest versions +# consider running `flutter pub upgrade --major-versions`. Alternatively, +# dependencies can be manually updated by changing the version numbers below to +# the latest version available on pub.dev. To see which dependencies have newer +# versions available, run `flutter pub outdated`. +dependencies: + flutter: + sdk: flutter + + google_mobile_ads: ^6.0.0 + gma_mediation_mytarget: + # When depending on this package from a real application you should use: + # gma_mediation_mytarget: ^x.y.z + # See https://dart.dev/tools/pub/dependencies#version-constraints + # The example app is bundled with the plugin so we use a path dependency on + # the parent directory to use the current plugin's version. + path: ../ + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^1.0.8 + +dev_dependencies: + integration_test: + sdk: flutter + flutter_test: + sdk: flutter + + # The "flutter_lints" package below contains a set of recommended lints to + # encourage good coding practices. The lint set provided by the package is + # activated in the `analysis_options.yaml` file located at the root of your + # package. See that file for information about deactivating specific lint + # rules and activating additional ones. + flutter_lints: ^5.0.0 + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter packages. +flutter: + + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + + # To add assets to your application, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/to/resolution-aware-images + + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/to/asset-from-package + + # To add custom fonts to your application, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts from package dependencies, + # see https://flutter.dev/to/font-from-package diff --git a/packages/mediation/gma_mediation_mytarget/gma_mediation_mytarget.iml b/packages/mediation/gma_mediation_mytarget/gma_mediation_mytarget.iml new file mode 100644 index 000000000..27686dd4b --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/gma_mediation_mytarget.iml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_mytarget/ios/Classes/GmaMediationmytargetPlugin.swift b/packages/mediation/gma_mediation_mytarget/ios/Classes/GmaMediationmytargetPlugin.swift new file mode 100644 index 000000000..35b8bbb6c --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/ios/Classes/GmaMediationmytargetPlugin.swift @@ -0,0 +1,23 @@ +// Copyright 2025 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 +// +// https://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 Flutter +import UIKit + +/// Required to link the iOS dependency of the mytarget Adapter. +public class GmaMediationmytargetPlugin: NSObject, FlutterPlugin { + public static func register(with registrar: FlutterPluginRegistrar) {} + + public func detachFromEngine(for registrar: FlutterPluginRegistrar) {} +} diff --git a/packages/mediation/gma_mediation_mytarget/ios/Classes/MytargetFlutterMediationExtras.swift b/packages/mediation/gma_mediation_mytarget/ios/Classes/MytargetFlutterMediationExtras.swift new file mode 100644 index 000000000..46459c4b4 --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/ios/Classes/MytargetFlutterMediationExtras.swift @@ -0,0 +1,34 @@ +// Copyright 2025 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 +// +// https://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 Foundation +import MyTargetAdapter + +@objc protocol FLTMediationExtras { + var extras: NSMutableDictionary { get } + func getMediationExtras() -> AdNetworkExtras +} + +@objc(MytargetFlutterMediationExtras) +class MytargetFlutterMediationExtras: NSObject, FLTMediationExtras { + var extras: NSMutableDictionary = [:] + + func getMediationExtras() -> AdNetworkExtras { + let mytargetExtras = GADMAdapterMyTargetExtras() + if let isIOSDebugMode = extras["isIOSDebugMode"] as? Bool { + mytargetExtras.isDebugMode = isIOSDebugMode + } + return mytargetExtras + } +} diff --git a/packages/mediation/gma_mediation_mytarget/ios/Resources/PrivacyInfo.xcprivacy b/packages/mediation/gma_mediation_mytarget/ios/Resources/PrivacyInfo.xcprivacy new file mode 100644 index 000000000..a34b7e2e6 --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/ios/Resources/PrivacyInfo.xcprivacy @@ -0,0 +1,14 @@ + + + + + NSPrivacyTrackingDomains + + NSPrivacyAccessedAPITypes + + NSPrivacyCollectedDataTypes + + NSPrivacyTracking + + + diff --git a/packages/mediation/gma_mediation_mytarget/ios/gma_mediation_mytarget.podspec b/packages/mediation/gma_mediation_mytarget/ios/gma_mediation_mytarget.podspec new file mode 100644 index 000000000..c82ef0a04 --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/ios/gma_mediation_mytarget.podspec @@ -0,0 +1,21 @@ +Pod::Spec.new do |s| + s.name = 'gma_mediation_mytarget' + s.version = '1.7.0' + s.summary = 'Google Mobile Ads Mediation of mytarget.' + s.description = <<-DESC + Mediation Adapter for mytarget to use with Google Mobile Ads. + DESC + s.homepage = 'https://developers.google.com/admob/flutter/mediation/mytarget' + s.license = { :file => '../LICENSE' } + s.author = { 'Google LLC' => 'mediation-support@google.com' } + s.source = { :path => '.' } + s.source_files = 'Classes/**/*' + s.dependency 'Flutter' + s.dependency 'GoogleMobileAdsMediationMyTarget', '~>5.38.0.0' + s.platform = :ios, '12.4' + s.static_framework = true + + s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' } + s.swift_version = '5.0' + +end diff --git a/packages/mediation/gma_mediation_mytarget/lib/gma_mediation_mytarget.dart b/packages/mediation/gma_mediation_mytarget/lib/gma_mediation_mytarget.dart new file mode 100644 index 000000000..175cd45dc --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/lib/gma_mediation_mytarget.dart @@ -0,0 +1,16 @@ +// Copyright 2025 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 +// +// https://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. + +/// This empty class is needed to allow correct compatibility analysis with host platforms. +class GmaMediationmytarget {} diff --git a/packages/mediation/gma_mediation_mytarget/lib/mytarget_mediation_extras.dart b/packages/mediation/gma_mediation_mytarget/lib/mytarget_mediation_extras.dart new file mode 100644 index 000000000..3f0c7a44b --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/lib/mytarget_mediation_extras.dart @@ -0,0 +1,39 @@ +// Copyright 2025 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 +// +// https://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 'package:google_mobile_ads/google_mobile_ads.dart'; + +/// Extra information sent to the mytarget adapter through an [AdRequest] or an [AdManagerAdRequest]. +class MytargetMediationExtras implements MediationExtras { + /// Default constructor with required extras value. + const MytargetMediationExtras({required this.isIOSDebugMode}); + + /// Specifies whether to enable logging for iOS. + final bool isIOSDebugMode; + + @override + String getAndroidClassName() { + return 'io.flutter.plugins.googlemobileads.mediation.gma_mediation_mytarget.MytargetFlutterMediationExtras'; + } + + @override + String getIOSClassName() { + return 'MytargetFlutterMediationExtras'; + } + + @override + Map getExtras() { + return {'isIOSDebugMode': isIOSDebugMode}; + } +} diff --git a/packages/mediation/gma_mediation_mytarget/pigeons/mytarget_sdk_api.dart b/packages/mediation/gma_mediation_mytarget/pigeons/mytarget_sdk_api.dart new file mode 100644 index 000000000..65823f3b8 --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/pigeons/mytarget_sdk_api.dart @@ -0,0 +1,36 @@ +// Copyright 2025 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 +// +// https://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 'package:pigeon/pigeon.dart'; + +@ConfigurePigeon( + PigeonOptions( + dartOut: 'lib/mytarget_sdk_api.g.dart', + dartOptions: DartOptions(), + kotlinOut: + 'android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_mytarget/mytargetSDKApi.g.kt', + kotlinOptions: KotlinOptions( + package: + "io.flutter.plugins.googlemobileads.mediation.gma_mediation_mytarget", + ), + swiftOut: 'ios/Classes/mytargetSDKApi.g.swift', + swiftOptions: SwiftOptions(), + dartPackageName: 'gma_mediation_mytarget', + ), +) +@HostApi() +/// The generated classes set the channels to call the methods in the corresponding kotlin mytargetSDKApi interface and swift mytargetSDKApi protocol from the dart layer. +abstract class mytargetSDKApi { + // TODO: Add SDK methods here. +} diff --git a/packages/mediation/gma_mediation_mytarget/pubspec.lock b/packages/mediation/gma_mediation_mytarget/pubspec.lock new file mode 100644 index 000000000..32c7205b0 --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/pubspec.lock @@ -0,0 +1,413 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + sha256: dc27559385e905ad30838356c5f5d574014ba39872d732111cd07ac0beff4c57 + url: "https://pub.dev" + source: hosted + version: "80.0.0" + analyzer: + dependency: transitive + description: + name: analyzer + sha256: "192d1c5b944e7e53b24b5586db760db934b177d4147c42fbca8c8c5f1eb8d11e" + url: "https://pub.dev" + source: hosted + version: "7.3.0" + args: + dependency: transitive + description: + name: args + sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6 + url: "https://pub.dev" + source: hosted + version: "2.6.0" + async: + dependency: transitive + description: + name: async + sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63 + url: "https://pub.dev" + source: hosted + version: "2.12.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + built_collection: + dependency: transitive + description: + name: built_collection + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" + url: "https://pub.dev" + source: hosted + version: "5.1.1" + built_value: + dependency: transitive + description: + name: built_value + sha256: "28a712df2576b63c6c005c465989a348604960c0958d28be5303ba9baa841ac2" + url: "https://pub.dev" + source: hosted + version: "8.9.3" + characters: + dependency: transitive + description: + name: characters + sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 + url: "https://pub.dev" + source: hosted + version: "1.4.0" + clock: + dependency: transitive + description: + name: clock + sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b + url: "https://pub.dev" + source: hosted + version: "1.1.2" + code_builder: + dependency: transitive + description: + name: code_builder + sha256: "0ec10bf4a89e4c613960bf1e8b42c64127021740fb21640c29c909826a5eea3e" + url: "https://pub.dev" + source: hosted + version: "4.10.1" + collection: + dependency: transitive + description: + name: collection + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" + url: "https://pub.dev" + source: hosted + version: "1.19.1" + convert: + dependency: transitive + description: + name: convert + sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 + url: "https://pub.dev" + source: hosted + version: "3.1.2" + crypto: + dependency: transitive + description: + name: crypto + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" + url: "https://pub.dev" + source: hosted + version: "3.0.6" + dart_style: + dependency: transitive + description: + name: dart_style + sha256: "27eb0ae77836989a3bc541ce55595e8ceee0992807f14511552a898ddd0d88ac" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc" + url: "https://pub.dev" + source: hosted + version: "1.3.2" + file: + dependency: transitive + description: + name: file + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 + url: "https://pub.dev" + source: hosted + version: "7.0.1" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be + url: "https://pub.dev" + source: hosted + version: "1.1.1" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" + url: "https://pub.dev" + source: hosted + version: "5.0.0" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + glob: + dependency: transitive + description: + name: glob + sha256: c3f1ee72c96f8f78935e18aa8cecced9ab132419e8625dc187e1c2408efc20de + url: "https://pub.dev" + source: hosted + version: "2.1.3" + google_mobile_ads: + dependency: "direct main" + description: + name: google_mobile_ads + sha256: "0d4a3744b5e8ed1b8be6a1b452d309f811688855a497c6113fc4400f922db603" + url: "https://pub.dev" + source: hosted + version: "5.3.1" + graphs: + dependency: transitive + description: + name: graphs + sha256: "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec + url: "https://pub.dev" + source: hosted + version: "10.0.8" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 + url: "https://pub.dev" + source: hosted + version: "3.0.9" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + lint: + dependency: "direct dev" + description: + name: lint + sha256: "68d71111816dc7c1de358281e506efe574bb5072eae4a19f8a57484bf96825f5" + url: "https://pub.dev" + source: hosted + version: "2.6.1" + lints: + dependency: transitive + description: + name: lints + sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7 + url: "https://pub.dev" + source: hosted + version: "5.1.1" + matcher: + dependency: transitive + description: + name: matcher + sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 + url: "https://pub.dev" + source: hosted + version: "0.12.17" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + url: "https://pub.dev" + source: hosted + version: "0.11.1" + meta: + dependency: transitive + description: + name: meta + sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c + url: "https://pub.dev" + source: hosted + version: "1.16.0" + package_config: + dependency: transitive + description: + name: package_config + sha256: "92d4488434b520a62570293fbd33bb556c7d49230791c1b4bbd973baf6d2dc67" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + path: + dependency: transitive + description: + name: path + sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" + url: "https://pub.dev" + source: hosted + version: "1.9.1" + pigeon: + dependency: "direct dev" + description: + name: pigeon + sha256: "1bab69b62617e5f31cf84dcab82c62aa21b7883055f0ca7ff93e76651eef8575" + url: "https://pub.dev" + source: hosted + version: "24.2.1" + plugin_platform_interface: + dependency: "direct main" + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "7b3cfbf654f3edd0c6298ecd5be782ce997ddf0e00531b9464b55245185bbbbd" + url: "https://pub.dev" + source: hosted + version: "2.1.5" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + source_span: + dependency: transitive + description: + name: source_span + sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" + url: "https://pub.dev" + source: hosted + version: "1.10.1" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" + url: "https://pub.dev" + source: hosted + version: "1.12.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" + url: "https://pub.dev" + source: hosted + version: "1.4.1" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" + url: "https://pub.dev" + source: hosted + version: "1.2.2" + test_api: + dependency: transitive + description: + name: test_api + sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd + url: "https://pub.dev" + source: hosted + version: "0.7.4" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 + url: "https://pub.dev" + source: hosted + version: "1.4.0" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14" + url: "https://pub.dev" + source: hosted + version: "14.3.1" + watcher: + dependency: transitive + description: + name: watcher + sha256: "69da27e49efa56a15f8afe8f4438c4ec02eff0a117df1b22ea4aad194fe1c104" + url: "https://pub.dev" + source: hosted + version: "1.1.1" + webview_flutter: + dependency: transitive + description: + name: webview_flutter + sha256: "889a0a678e7c793c308c68739996227c9661590605e70b1f6cf6b9a6634f7aec" + url: "https://pub.dev" + source: hosted + version: "4.10.0" + webview_flutter_android: + dependency: transitive + description: + name: webview_flutter_android + sha256: "512c26ccc5b8a571fd5d13ec994b7509f142ff6faf85835e243dde3538fdc713" + url: "https://pub.dev" + source: hosted + version: "4.3.2" + webview_flutter_platform_interface: + dependency: transitive + description: + name: webview_flutter_platform_interface + sha256: d937581d6e558908d7ae3dc1989c4f87b786891ab47bb9df7de548a151779d8d + url: "https://pub.dev" + source: hosted + version: "2.10.0" + webview_flutter_wkwebview: + dependency: transitive + description: + name: webview_flutter_wkwebview + sha256: d7403ef4f042714c9ee2b26eaac4cadae7394cb0d4e608b1dd850c3ff96bd893 + url: "https://pub.dev" + source: hosted + version: "3.18.2" + yaml: + dependency: transitive + description: + name: yaml + sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce + url: "https://pub.dev" + source: hosted + version: "3.1.3" +sdks: + dart: ">=3.7.0 <4.0.0" + flutter: ">=3.24.0" diff --git a/packages/mediation/gma_mediation_mytarget/pubspec.yaml b/packages/mediation/gma_mediation_mytarget/pubspec.yaml new file mode 100644 index 000000000..4fc3d0bd4 --- /dev/null +++ b/packages/mediation/gma_mediation_mytarget/pubspec.yaml @@ -0,0 +1,27 @@ +name: gma_mediation_mytarget +description: 'Mediation Adapter that enables sending ad requests to the mytarget + ad network using the google_mobile_ads plugin.' +version: 1.7.0 +environment: + sdk: ^3.6.0 + flutter: '>=3.27.0' +dependencies: + flutter: + sdk: flutter + google_mobile_ads: ^6.0.0 + plugin_platform_interface: ^2.0.2 +dev_dependencies: + flutter_test: + sdk: flutter + flutter_lints: ^5.0.0 + lint: ^2.6.1 + pigeon: ^24.2.1 +flutter: + plugin: + platforms: + android: + package: io.flutter.plugins.googlemobileads.mediation.gma_mediation_mytarget + pluginClass: GmaMediationmytargetPlugin + ios: + pluginClass: GmaMediationmytargetPlugin +repository: https://github.com/googleads/googleads-mobile-flutter/tree/main/packages/mediation/gma_mediation_mytarget diff --git a/packages/mediation/gma_mediation_pangle/.gitignore b/packages/mediation/gma_mediation_pangle/.gitignore new file mode 100644 index 000000000..ac5aa9893 --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/.gitignore @@ -0,0 +1,29 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. +/pubspec.lock +**/doc/api/ +.dart_tool/ +build/ diff --git a/packages/mediation/gma_mediation_pangle/.metadata b/packages/mediation/gma_mediation_pangle/.metadata new file mode 100644 index 000000000..5d2f8b8e8 --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/.metadata @@ -0,0 +1,33 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "ba393198430278b6595976de84fe170f553cc728" + channel: "stable" + +project_type: plugin + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: ba393198430278b6595976de84fe170f553cc728 + base_revision: ba393198430278b6595976de84fe170f553cc728 + - platform: android + create_revision: ba393198430278b6595976de84fe170f553cc728 + base_revision: ba393198430278b6595976de84fe170f553cc728 + - platform: ios + create_revision: ba393198430278b6595976de84fe170f553cc728 + base_revision: ba393198430278b6595976de84fe170f553cc728 + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/packages/mediation/gma_mediation_pangle/CHANGELOG.md b/packages/mediation/gma_mediation_pangle/CHANGELOG.md new file mode 100644 index 000000000..518f4c6ed --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/CHANGELOG.md @@ -0,0 +1,79 @@ +## Pangle Flutter Mediation Adapter Changelog + +#### Version 3.5.2 +- Updated minimum Flutter version to 3.35.1 +- Updated to support Google Mobile Ads Flutter Plugin version 7.0.0 +- Supports [Pangle Android adapter version 7.8.0.8.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/pangle/CHANGELOG.md#version-78080). +- Supports [Pangle iOS adapter version 7.8.0.6.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Pangle/CHANGELOG.md#version-78060). +- Built and tested with the Google Mobile Ads Flutter Plugin version 7.0.0. + +#### Version 3.5.1 +- Supports [Pangle Android adapter version 7.8.0.8.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/pangle/CHANGELOG.md#version-78080). +- Supports [Pangle iOS adapter version 7.8.0.5.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Pangle/CHANGELOG.md#version-78050). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 3.5.0 +- Supports [Pangle Android adapter version 7.8.0.7.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/pangle/CHANGELOG.md#version-78070). +- Supports [Pangle iOS adapter version 7.8.0.3.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Pangle/CHANGELOG.md#version-78030). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 3.4.0 +- Supports [Pangle Android adapter version 7.7.0.2.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/pangle/CHANGELOG.md#version-77020). +- Supports [Pangle iOS adapter version 7.7.0.5.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Pangle/CHANGELOG.md#version-77050). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 3.3.0 +- Supports [Pangle Android adapter version 7.6.0.4.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/pangle/CHANGELOG.md#version-76040). +- Supports [Pangle iOS adapter version 7.6.0.5.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Pangle/CHANGELOG.md#version-76050). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 3.2.1 +- Supports [Pangle Android adapter version 7.3.0.5.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/pangle/CHANGELOG.md#version-73050). +- Supports [Pangle iOS adapter version 7.4.1.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Pangle/CHANGELOG.md#version-74100). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 3.2.0 +- Supports [Pangle Android adapter version 7.3.0.4.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/pangle/CHANGELOG.md#version-73040). +- Supports [Pangle iOS adapter version 7.4.0.9.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Pangle/CHANGELOG.md#version-74090). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 3.1.1 +- Supports [Pangle Android adapter version 7.2.0.6.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/pangle/CHANGELOG.md#version-72060). +- Supports [Pangle iOS adapter version 7.2.0.5.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Pangle/CHANGELOG.md#version-72050). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 3.1.0 +- Supports [Pangle Android adapter version 7.2.0.4.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/pangle/CHANGELOG.md#version-72040). +- Supports [Pangle iOS adapter version 7.2.0.4.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Pangle/CHANGELOG.md#version-72040). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 3.0.0 +- Supports [Pangle Android adapter version 7.1.0.8.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/pangle/CHANGELOG.md#version-71080). +- Supports [Pangle iOS adapter version 7.1.1.1.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Pangle/CHANGELOG.md#version-71110). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 2.2.0 +- Supports [Pangle Android adapter version 6.5.0.8.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/pangle/CHANGELOG.md#version-65080). +- Supports [Pangle iOS adapter version 6.5.0.9.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Pangle/CHANGELOG.md#version-65090). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 2.1.0 +- Supports [Pangle Android adapter version 6.5.0.4.1](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/pangle/CHANGELOG.md#version-65041). +- Supports [Pangle iOS adapter version 6.5.0.8.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Pangle/CHANGELOG.md#version-65080). +- Built and tested with the Google Mobile Ads Flutter Plugin version 5.3.1. + +#### Version 2.0.0 +- Supports [Pangle Android adapter version 6.4.0.6.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/pangle/CHANGELOG.md#version-64060). +- Supports [Pangle iOS adapter version 6.4.1.1.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Pangle/CHANGELOG.md#version-64110). +- Built and tested with the Google Mobile Ads Flutter Plugin version 5.3.0. + +#### Version 1.1.0 +- Supports [Pangle Android adapter version 5.9.0.4.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/pangle/CHANGELOG.md#version-59040). +- Supports [Pangle iOS adapter version 5.9.0.7.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Pangle/CHANGELOG.md#version-59070). +- Built and tested with the Google Mobile Ads Flutter Plugin version 5.1.0. + +#### Version 1.0.0 +- Initial release. +- Supports [Pangle Android adapter version 5.8.0.9.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/pangle/CHANGELOG.md#version-58090). +- Supports [Pangle iOS adapter version 5.8.0.8.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Pangle/CHANGELOG.md#version-58080). +- Built and tested with the Google Mobile Ads Flutter Plugin version 5.0.1. \ No newline at end of file diff --git a/packages/mediation/gma_mediation_pangle/LICENSE b/packages/mediation/gma_mediation_pangle/LICENSE new file mode 100644 index 000000000..d64569567 --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/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/packages/mediation/gma_mediation_pangle/README.md b/packages/mediation/gma_mediation_pangle/README.md new file mode 100644 index 000000000..3d114f2a4 --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/README.md @@ -0,0 +1,31 @@ +# Google Mobile Ads Mediation of Pangle for Flutter + +[![gma_mediation_pangle](https://github.com/googleads/googleads-mobile-flutter/actions/workflows/google_mobile_ads.yaml/badge.svg)](https://github.com/googleads/googleads-mobile-flutter/actions/workflows/google_mobile_ads.yaml) + +This repository contains the source code for the Mediation Pangle Flutter plugin +to be used with the Google Mobile Ads plugin. It enables mediation of the Pangle +Ad Network through the Google Mobile Ads SDK. + +## Documentation +For instructions on how to use with the google_mobile_ads plugin, refer to the +developer guide for [Pangle](https://developers.google.com/admob/flutter/mediation/pangle). + +## Downloads + +See [pub.dev](https://pub.dev/packages/gma_mediation_pangle/versions) for the +latest releases of the plugin. + +## Suggesting improvements + +To file bugs, make feature requests, or to suggest other improvements, please +use [github's issue tracker](https://github.com/googleads/googleads-mobile-flutter/issues). + + +## Other resources + +* [AdMob help center](https://support.google.com/admob/?hl=en#topic=7383088) +* [Ad Manager help center](https://support.google.com/admanager/?hl=en#topic=7505988) + +## License + +[Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0) \ No newline at end of file diff --git a/packages/mediation/gma_mediation_pangle/analysis_options.yaml b/packages/mediation/gma_mediation_pangle/analysis_options.yaml new file mode 100644 index 000000000..b52daef95 --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/analysis_options.yaml @@ -0,0 +1,19 @@ +# 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 +# +# https://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. + +include: package:lint/package.yaml + +analyzer: + exclude: + - '**.g.dart' diff --git a/packages/mediation/gma_mediation_pangle/android/.gitignore b/packages/mediation/gma_mediation_pangle/android/.gitignore new file mode 100644 index 000000000..161bdcdaf --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/android/.gitignore @@ -0,0 +1,9 @@ +*.iml +.gradle +/local.properties +/.idea/workspace.xml +/.idea/libraries +.DS_Store +/build +/captures +.cxx diff --git a/packages/mediation/gma_mediation_pangle/android/build.gradle b/packages/mediation/gma_mediation_pangle/android/build.gradle new file mode 100644 index 000000000..ccf29c2c0 --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/android/build.gradle @@ -0,0 +1,76 @@ +group 'io.flutter.plugins.googlemobileads.mediation.gma_mediation_pangle' +version = "3.5.2" + +buildscript { + ext.kotlin_version = '2.2.21' + repositories { + google() + mavenCentral() + } + + dependencies { + classpath 'com.android.tools.build:gradle:8.13.1' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + +allprojects { + repositories { + google() + mavenCentral() + maven { + url = uri("https://artifact.bytedance.com/repository/pangle/") + } + } +} + +apply plugin: 'com.android.library' +apply plugin: 'kotlin-android' + +ext { + stringVersion = "7.8.0.8.0" +} + +android { + if (project.android.hasProperty("namespace")) { + namespace 'io.flutter.plugins.googlemobileads.mediation.gma_mediation_pangle' + } + + compileSdk 36 + + compileOptions { + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + test.java.srcDirs += 'src/test/kotlin' + } + + defaultConfig { + minSdk 24 + } + + dependencies { + implementation "com.google.ads.mediation:pangle:$stringVersion" + testImplementation 'org.jetbrains.kotlin:kotlin-test' + testImplementation 'org.mockito:mockito-core:5.20.0' + } + + testOptions { + unitTests.all { + useJUnitPlatform() + + testLogging { + events "passed", "skipped", "failed", "standardOut", "standardError" + outputs.upToDateWhen {false} + showStandardStreams = true + } + } + } +} diff --git a/packages/mediation/gma_mediation_pangle/android/gradle.properties b/packages/mediation/gma_mediation_pangle/android/gradle.properties new file mode 100644 index 000000000..3114faab3 --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/android/gradle.properties @@ -0,0 +1,15 @@ +## For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html +# +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +# Default value: -Xmx1024m -XX:MaxPermSize=256m +# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 +# +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true +#Mon Mar 25 14:38:21 PDT 2024 +android.enableJetifier=true +android.useAndroidX=true diff --git a/packages/mediation/gma_mediation_pangle/android/gradle/wrapper/gradle-wrapper.properties b/packages/mediation/gma_mediation_pangle/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 000000000..cd4b7aa89 --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip +networkTimeout=10000 +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/packages/mediation/gma_mediation_pangle/android/settings.gradle b/packages/mediation/gma_mediation_pangle/android/settings.gradle new file mode 100644 index 000000000..246528bca --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/android/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'gma_mediation_pangle' diff --git a/packages/mediation/gma_mediation_pangle/android/src/main/AndroidManifest.xml b/packages/mediation/gma_mediation_pangle/android/src/main/AndroidManifest.xml new file mode 100644 index 000000000..1cb157c85 --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/android/src/main/AndroidManifest.xml @@ -0,0 +1,3 @@ + + diff --git a/packages/mediation/gma_mediation_pangle/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_pangle/GmaMediationPanglePlugin.kt b/packages/mediation/gma_mediation_pangle/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_pangle/GmaMediationPanglePlugin.kt new file mode 100644 index 000000000..3200cf07a --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_pangle/GmaMediationPanglePlugin.kt @@ -0,0 +1,24 @@ +// 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 +// +// https://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. + +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_pangle + +import io.flutter.embedding.engine.plugins.FlutterPlugin + +/** Required to link the Android dependency of the Pangle Adapter. */ +class GmaMediationPanglePlugin: FlutterPlugin{ + override fun onAttachedToEngine(flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) { } + + override fun onDetachedFromEngine(binding: FlutterPlugin.FlutterPluginBinding) { } +} diff --git a/packages/mediation/gma_mediation_pangle/example/.gitignore b/packages/mediation/gma_mediation_pangle/example/.gitignore new file mode 100644 index 000000000..29a3a5017 --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/example/.gitignore @@ -0,0 +1,43 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.pub-cache/ +.pub/ +/build/ + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/packages/mediation/gma_mediation_pangle/example/README.md b/packages/mediation/gma_mediation_pangle/example/README.md new file mode 100644 index 000000000..f7aca8e74 --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/example/README.md @@ -0,0 +1,17 @@ +# gma_mediation_pangle_example + +Learn how to integrate with your app that uses the [google_mobile_ads](https://pub.dev/packages/google_mobile_ads) plugin +by following the [development guide](https://developers.google.com/admob/flutter/mediation/pangle). + +## Getting Started + +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) + +For help getting started with Flutter development, view the +[online documentation](https://docs.flutter.dev/), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/packages/mediation/gma_mediation_pangle/example/analysis_options.yaml b/packages/mediation/gma_mediation_pangle/example/analysis_options.yaml new file mode 100644 index 000000000..0d2902135 --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/example/analysis_options.yaml @@ -0,0 +1,28 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at https://dart.dev/lints. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/packages/mediation/gma_mediation_pangle/example/android/.gitignore b/packages/mediation/gma_mediation_pangle/example/android/.gitignore new file mode 100644 index 000000000..6f568019d --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/example/android/.gitignore @@ -0,0 +1,13 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +key.properties +**/*.keystore +**/*.jks diff --git a/packages/mediation/gma_mediation_pangle/example/android/app/build.gradle b/packages/mediation/gma_mediation_pangle/example/android/app/build.gradle new file mode 100644 index 000000000..3a7497caa --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/example/android/app/build.gradle @@ -0,0 +1,68 @@ +plugins { + id "com.android.application" + id "kotlin-android" + id "dev.flutter.flutter-gradle-plugin" +} + +def localProperties = new Properties() +def localPropertiesFile = rootProject.file('local.properties') +if (localPropertiesFile.exists()) { + localPropertiesFile.withReader('UTF-8') { reader -> + localProperties.load(reader) + } +} + +def flutterVersionCode = localProperties.getProperty('flutter.versionCode') +if (flutterVersionCode == null) { + flutterVersionCode = '1' +} + +def flutterVersionName = localProperties.getProperty('flutter.versionName') +if (flutterVersionName == null) { + flutterVersionName = '1.0' +} + +android { + namespace "io.flutter.plugins.googlemobileads.mediation.gma_mediation_pangle_example" + compileSdkVersion flutter.compileSdkVersion + ndkVersion flutter.ndkVersion + + compileOptions { + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId "io.flutter.plugins.googlemobileads.mediation.gma_mediation_pangle_example" + // You can update the following values to match your application needs. + // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. + minSdkVersion 23 + targetSdkVersion flutter.targetSdkVersion + versionCode flutterVersionCode.toInteger() + versionName flutterVersionName + multiDexEnabled true + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig signingConfigs.debug + } + } +} + +flutter { + source '../..' +} + +dependencies {} diff --git a/packages/mediation/gma_mediation_pangle/example/android/app/src/debug/AndroidManifest.xml b/packages/mediation/gma_mediation_pangle/example/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 000000000..399f6981d --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/example/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/packages/mediation/gma_mediation_pangle/example/android/app/src/main/AndroidManifest.xml b/packages/mediation/gma_mediation_pangle/example/android/app/src/main/AndroidManifest.xml new file mode 100644 index 000000000..26d0dce63 --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/example/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_pangle/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_applovin_example/MainActivity.kt b/packages/mediation/gma_mediation_pangle/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_applovin_example/MainActivity.kt new file mode 100644 index 000000000..b3edbb25f --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_applovin_example/MainActivity.kt @@ -0,0 +1,5 @@ +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_pangle_example + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() diff --git a/packages/mediation/gma_mediation_pangle/example/android/app/src/main/res/drawable-v21/launch_background.xml b/packages/mediation/gma_mediation_pangle/example/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 000000000..f74085f3f --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/example/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/mediation/gma_mediation_pangle/example/android/app/src/main/res/drawable/launch_background.xml b/packages/mediation/gma_mediation_pangle/example/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 000000000..304732f88 --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/example/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/mediation/gma_mediation_pangle/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/mediation/gma_mediation_pangle/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..db77bb4b7 Binary files /dev/null and b/packages/mediation/gma_mediation_pangle/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_pangle/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/mediation/gma_mediation_pangle/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..17987b79b Binary files /dev/null and b/packages/mediation/gma_mediation_pangle/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_pangle/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/mediation/gma_mediation_pangle/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..09d439148 Binary files /dev/null and b/packages/mediation/gma_mediation_pangle/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_pangle/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/mediation/gma_mediation_pangle/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..d5f1c8d34 Binary files /dev/null and b/packages/mediation/gma_mediation_pangle/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_pangle/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/packages/mediation/gma_mediation_pangle/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..4d6372eeb Binary files /dev/null and b/packages/mediation/gma_mediation_pangle/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_pangle/example/android/app/src/main/res/values-night/styles.xml b/packages/mediation/gma_mediation_pangle/example/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 000000000..06952be74 --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/example/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/packages/mediation/gma_mediation_pangle/example/android/app/src/main/res/values/styles.xml b/packages/mediation/gma_mediation_pangle/example/android/app/src/main/res/values/styles.xml new file mode 100644 index 000000000..cb1ef8805 --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/example/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/packages/mediation/gma_mediation_pangle/example/android/app/src/profile/AndroidManifest.xml b/packages/mediation/gma_mediation_pangle/example/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 000000000..399f6981d --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/example/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/packages/mediation/gma_mediation_pangle/example/android/build.gradle b/packages/mediation/gma_mediation_pangle/example/android/build.gradle new file mode 100644 index 000000000..b7339833b --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/example/android/build.gradle @@ -0,0 +1,33 @@ +buildscript { + ext.kotlin_version = '2.2.21' + repositories { + google() + mavenCentral() + } + + dependencies { + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + +allprojects { + repositories { + google() + mavenCentral() + maven { + url = uri("https://artifact.bytedance.com/repository/pangle/") + } + } +} + +rootProject.buildDir = '../build' +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(':app') +} + +tasks.register("clean", Delete) { + delete rootProject.buildDir +} diff --git a/packages/mediation/gma_mediation_pangle/example/android/gradle.properties b/packages/mediation/gma_mediation_pangle/example/android/gradle.properties new file mode 100644 index 000000000..598d13fee --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/example/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx4G +android.useAndroidX=true +android.enableJetifier=true diff --git a/packages/mediation/gma_mediation_pangle/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/mediation/gma_mediation_pangle/example/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 000000000..f004c34c0 --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/example/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip diff --git a/packages/mediation/gma_mediation_pangle/example/android/settings.gradle b/packages/mediation/gma_mediation_pangle/example/android/settings.gradle new file mode 100644 index 000000000..23a851931 --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/example/android/settings.gradle @@ -0,0 +1,29 @@ +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + } + settings.ext.flutterSdkPath = flutterSdkPath() + + includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") + + repositories { + google() + mavenCentral() + gradlePluginPortal() + } + + plugins { + id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false + } +} + +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "8.13.1" apply false +} + +include ":app" diff --git a/packages/mediation/gma_mediation_pangle/example/ios/.gitignore b/packages/mediation/gma_mediation_pangle/example/ios/.gitignore new file mode 100644 index 000000000..7a7f9873a --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/example/ios/.gitignore @@ -0,0 +1,34 @@ +**/dgph +*.mode1v3 +*.mode2v3 +*.moved-aside +*.pbxuser +*.perspectivev3 +**/*sync/ +.sconsign.dblite +.tags* +**/.vagrant/ +**/DerivedData/ +Icon? +**/Pods/ +**/.symlinks/ +profile +xcuserdata +**/.generated/ +Flutter/App.framework +Flutter/Flutter.framework +Flutter/Flutter.podspec +Flutter/Generated.xcconfig +Flutter/ephemeral/ +Flutter/app.flx +Flutter/app.zip +Flutter/flutter_assets/ +Flutter/flutter_export_environment.sh +ServiceDefinitions.json +Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!default.mode1v3 +!default.mode2v3 +!default.pbxuser +!default.perspectivev3 diff --git a/packages/mediation/gma_mediation_pangle/example/ios/Flutter/AppFrameworkInfo.plist b/packages/mediation/gma_mediation_pangle/example/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 000000000..7c5696400 --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/example/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 12.0 + + diff --git a/packages/mediation/gma_mediation_pangle/example/ios/Flutter/Debug.xcconfig b/packages/mediation/gma_mediation_pangle/example/ios/Flutter/Debug.xcconfig new file mode 100644 index 000000000..ec97fc6f3 --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/example/ios/Flutter/Debug.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" +#include "Generated.xcconfig" diff --git a/packages/mediation/gma_mediation_pangle/example/ios/Flutter/Release.xcconfig b/packages/mediation/gma_mediation_pangle/example/ios/Flutter/Release.xcconfig new file mode 100644 index 000000000..c4855bfe2 --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/example/ios/Flutter/Release.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" +#include "Generated.xcconfig" diff --git a/samples/admob/adaptive_banner_example/ios/Podfile b/packages/mediation/gma_mediation_pangle/example/ios/Podfile similarity index 94% rename from samples/admob/adaptive_banner_example/ios/Podfile rename to packages/mediation/gma_mediation_pangle/example/ios/Podfile index 88359b225..6a8ce2dd1 100644 --- a/samples/admob/adaptive_banner_example/ios/Podfile +++ b/packages/mediation/gma_mediation_pangle/example/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -# platform :ios, '11.0' +platform :ios, '13.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' @@ -28,10 +28,12 @@ require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelpe flutter_ios_podfile_setup target 'Runner' do - use_frameworks! use_modular_headers! flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) + target 'RunnerTests' do + inherit! :search_paths + end end post_install do |installer| diff --git a/samples/admob/adaptive_banner_example/ios/Runner.xcodeproj/project.pbxproj b/packages/mediation/gma_mediation_pangle/example/ios/Runner.xcodeproj/project.pbxproj similarity index 78% rename from samples/admob/adaptive_banner_example/ios/Runner.xcodeproj/project.pbxproj rename to packages/mediation/gma_mediation_pangle/example/ios/Runner.xcodeproj/project.pbxproj index 0db112b60..432b34b05 100644 --- a/samples/admob/adaptive_banner_example/ios/Runner.xcodeproj/project.pbxproj +++ b/packages/mediation/gma_mediation_pangle/example/ios/Runner.xcodeproj/project.pbxproj @@ -3,11 +3,10 @@ archiveVersion = 1; classes = { }; - objectVersion = 50; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ - 115914BB630C86D80320BF5B /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5145B748D239BEB6D772C55A /* Pods_Runner.framework */; }; 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; @@ -16,6 +15,16 @@ 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; /* End PBXBuildFile section */ +/* Begin PBXContainerItemProxy section */ + 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 97C146E61CF9000F007C117D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 97C146ED1CF9000F007C117D; + remoteInfo = Runner; + }; +/* End PBXContainerItemProxy section */ + /* Begin PBXCopyFilesBuildPhase section */ 9705A1C41CF9048500538489 /* Embed Frameworks */ = { isa = PBXCopyFilesBuildPhase; @@ -32,9 +41,8 @@ /* Begin PBXFileReference section */ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 49E4657F8F69EA696DE4D0BD /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; - 5145B748D239BEB6D772C55A /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; @@ -45,8 +53,6 @@ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - BE671A2BBEFE2395BC5FF804 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; - CA8422FA05A56BE2282C1D61 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -54,30 +60,31 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 115914BB630C86D80320BF5B /* Pods_Runner.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + C818F7E0BFF1AD2CA8B2D2D5 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 1C18D9CE2C6C7EC989716262 /* Frameworks */ = { + 2C81ED067DB2D30DCAC62ED5 /* Pods */ = { isa = PBXGroup; children = ( - 5145B748D239BEB6D772C55A /* Pods_Runner.framework */, ); - name = Frameworks; + path = Pods; sourceTree = ""; }; - 3C7580C19929721126A6CFE4 /* Pods */ = { + 331C8082294A63A400263BE5 /* RunnerTests */ = { isa = PBXGroup; children = ( - CA8422FA05A56BE2282C1D61 /* Pods-Runner.debug.xcconfig */, - 49E4657F8F69EA696DE4D0BD /* Pods-Runner.release.xcconfig */, - BE671A2BBEFE2395BC5FF804 /* Pods-Runner.profile.xcconfig */, ); - name = Pods; - path = Pods; + path = RunnerTests; sourceTree = ""; }; 9740EEB11CF90186004384FC /* Flutter */ = { @@ -97,8 +104,8 @@ 9740EEB11CF90186004384FC /* Flutter */, 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, - 3C7580C19929721126A6CFE4 /* Pods */, - 1C18D9CE2C6C7EC989716262 /* Frameworks */, + 331C8082294A63A400263BE5 /* RunnerTests */, + 2C81ED067DB2D30DCAC62ED5 /* Pods */, ); sourceTree = ""; }; @@ -106,6 +113,7 @@ isa = PBXGroup; children = ( 97C146EE1CF9000F007C117D /* Runner.app */, + 331C8081294A63A400263BE5 /* RunnerTests.xctest */, ); name = Products; sourceTree = ""; @@ -128,18 +136,34 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ + 331C8080294A63A400263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 331C807D294A63A400263BE5 /* Sources */, + 331C807F294A63A400263BE5 /* Resources */, + C818F7E0BFF1AD2CA8B2D2D5 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 331C8086294A63A400263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; 97C146ED1CF9000F007C117D /* Runner */ = { isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( - CA43A54518AE5E812FFDC478 /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - 480C78909A4ECBE9D0709350 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -156,9 +180,14 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1300; + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1430; ORGANIZATIONNAME = ""; TargetAttributes = { + 331C8080294A63A400263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 97C146ED1CF9000F007C117D; + }; 97C146ED1CF9000F007C117D = { CreatedOnToolsVersion = 7.3.1; LastSwiftMigration = 1100; @@ -179,11 +208,19 @@ projectRoot = ""; targets = ( 97C146ED1CF9000F007C117D /* Runner */, + 331C8080294A63A400263BE5 /* RunnerTests */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ + 331C807F294A63A400263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; 97C146EC1CF9000F007C117D /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -200,10 +237,12 @@ /* Begin PBXShellScriptBuildPhase section */ 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", ); name = "Thin Binary"; outputPaths = ( @@ -212,25 +251,9 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; - 480C78909A4ECBE9D0709350 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -243,31 +266,16 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; }; - CA43A54518AE5E812FFDC478 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 331C807D294A63A400263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", - ); runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ 97C146EA1CF9000F007C117D /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -279,6 +287,14 @@ }; /* End PBXSourcesBuildPhase section */ +/* Begin PBXTargetDependency section */ + 331C8086294A63A400263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 97C146ED1CF9000F007C117D /* Runner */; + targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + /* Begin PBXVariantGroup section */ 97C146FA1CF9000F007C117D /* Main.storyboard */ = { isa = PBXVariantGroup; @@ -340,7 +356,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -356,14 +372,13 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = EQHXZ8M8AV; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.adaptiveBannerExample; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationPangleExample; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; @@ -371,6 +386,53 @@ }; name = Profile; }; + 331C8088294A63A400263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationPangleExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Debug; + }; + 331C8089294A63A400263BE5 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationPangleExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Release; + }; + 331C808A294A63A400263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationPangleExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Profile; + }; 97C147031CF9000F007C117D /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -418,7 +480,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -467,7 +529,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -485,14 +547,13 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = EQHXZ8M8AV; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.adaptiveBannerExample; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationPangleExample; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -508,14 +569,13 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = EQHXZ8M8AV; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.adaptiveBannerExample; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationPangleExample; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; @@ -526,6 +586,16 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C8088294A63A400263BE5 /* Debug */, + 331C8089294A63A400263BE5 /* Release */, + 331C808A294A63A400263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/packages/mediation/gma_mediation_pangle/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/mediation/gma_mediation_pangle/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..919434a62 --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/packages/mediation/gma_mediation_pangle/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/packages/mediation/gma_mediation_pangle/example/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..21a3cc14c --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/example/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/packages/mediation/gma_mediation_pangle/example/ios/Runner/AppDelegate.swift b/packages/mediation/gma_mediation_pangle/example/ios/Runner/AppDelegate.swift new file mode 100644 index 000000000..70693e4a8 --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/example/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import UIKit +import Flutter + +@UIApplicationMain +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..d36b1fab2 --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 000000000..dc9ada472 Binary files /dev/null and b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 000000000..7353c41ec Binary files /dev/null and b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 000000000..797d452e4 Binary files /dev/null and b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 000000000..6ed2d933e Binary files /dev/null and b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 000000000..4cd7b0099 Binary files /dev/null and b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 000000000..fe730945a Binary files /dev/null and b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 000000000..321773cd8 Binary files /dev/null and b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 000000000..797d452e4 Binary files /dev/null and b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 000000000..502f463a9 Binary files /dev/null and b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 000000000..0ec303439 Binary files /dev/null and b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 000000000..0ec303439 Binary files /dev/null and b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 000000000..e9f5fea27 Binary files /dev/null and b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 000000000..84ac32ae7 Binary files /dev/null and b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 000000000..8953cba09 Binary files /dev/null and b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 000000000..0467bf12a Binary files /dev/null and b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 000000000..0bedcf2fd --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchImage.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 000000000..89c2725b7 --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/packages/mediation/gma_mediation_pangle/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 000000000..f2e259c7c --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_pangle/example/ios/Runner/Base.lproj/Main.storyboard b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 000000000..f3c28516f --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_pangle/example/ios/Runner/Info.plist b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Info.plist new file mode 100644 index 000000000..442b94de9 --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Info.plist @@ -0,0 +1,51 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Gma Mediation Pangle + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + gma_mediation_pangle_example + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + CADisableMinimumFrameDurationOnPhone + + UIApplicationSupportsIndirectInputEvents + + GADApplicationIdentifier + ca-app-pub-3940256099942544~1458002511 + + diff --git a/packages/mediation/gma_mediation_pangle/example/ios/Runner/Runner-Bridging-Header.h b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 000000000..308a2a560 --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/example/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/packages/mediation/gma_mediation_pangle/example/ios/RunnerTests/.gitkeep b/packages/mediation/gma_mediation_pangle/example/ios/RunnerTests/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/packages/mediation/gma_mediation_pangle/example/lib/main.dart b/packages/mediation/gma_mediation_pangle/example/lib/main.dart new file mode 100644 index 000000000..665bfe31b --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/example/lib/main.dart @@ -0,0 +1,33 @@ +import 'package:flutter/material.dart'; + +void main() { + runApp(const MyApp()); +} + +class MyApp extends StatefulWidget { + const MyApp({super.key}); + + @override + State createState() => _MyAppState(); +} + +class _MyAppState extends State { + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Scaffold( + appBar: AppBar( + title: const Text('Plugin example app'), + ), + body: const Center( + child: Text('Test app'), + ), + ), + ); + } +} diff --git a/packages/mediation/gma_mediation_pangle/example/pubspec.yaml b/packages/mediation/gma_mediation_pangle/example/pubspec.yaml new file mode 100644 index 000000000..e85b0b699 --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/example/pubspec.yaml @@ -0,0 +1,86 @@ +name: gma_mediation_pangle_example +description: "Demonstrates how to use the gma_mediation_pangle plugin." +# The following line prevents the package from being accidentally published to +# pub.dev using `flutter pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +environment: + sdk: '>=3.9.0 <4.0.0' + +# Dependencies specify other packages that your package needs in order to work. +# To automatically upgrade your package dependencies to the latest versions +# consider running `flutter pub upgrade --major-versions`. Alternatively, +# dependencies can be manually updated by changing the version numbers below to +# the latest version available on pub.dev. To see which dependencies have newer +# versions available, run `flutter pub outdated`. +dependencies: + flutter: + sdk: flutter + + google_mobile_ads: ^7.0.0 + gma_mediation_pangle: + # When depending on this package from a real application you should use: + # gma_mediation_pangle: ^x.y.z + # See https://dart.dev/tools/pub/dependencies#version-constraints + # The example app is bundled with the plugin so we use a path dependency on + # the parent directory to use the current plugin's version. + path: ../ + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^1.0.2 + +dev_dependencies: + integration_test: + sdk: flutter + flutter_test: + sdk: flutter + + # The "flutter_lints" package below contains a set of recommended lints to + # encourage good coding practices. The lint set provided by the package is + # activated in the `analysis_options.yaml` file located at the root of your + # package. See that file for information about deactivating specific lint + # rules and activating additional ones. + flutter_lints: ^6.0.0 + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter packages. +flutter: + + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + + # To add assets to your application, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/assets-and-images/#resolution-aware + + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/assets-and-images/#from-packages + + # To add custom fonts to your application, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts from package dependencies, + # see https://flutter.dev/custom-fonts/#from-packages diff --git a/packages/mediation/gma_mediation_pangle/ios/.gitignore b/packages/mediation/gma_mediation_pangle/ios/.gitignore new file mode 100644 index 000000000..0c885071e --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/ios/.gitignore @@ -0,0 +1,38 @@ +.idea/ +.vagrant/ +.sconsign.dblite +.svn/ + +.DS_Store +*.swp +profile + +DerivedData/ +build/ +GeneratedPluginRegistrant.h +GeneratedPluginRegistrant.m + +.generated/ + +*.pbxuser +*.mode1v3 +*.mode2v3 +*.perspectivev3 + +!default.pbxuser +!default.mode1v3 +!default.mode2v3 +!default.perspectivev3 + +xcuserdata + +*.moved-aside + +*.pyc +*sync/ +Icon? +.tags* + +/Flutter/Generated.xcconfig +/Flutter/ephemeral/ +/Flutter/flutter_export_environment.sh \ No newline at end of file diff --git a/packages/mediation/gma_mediation_pangle/ios/Assets/.gitkeep b/packages/mediation/gma_mediation_pangle/ios/Assets/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/packages/mediation/gma_mediation_pangle/ios/Classes/GmaMediationPanglePlugin.swift b/packages/mediation/gma_mediation_pangle/ios/Classes/GmaMediationPanglePlugin.swift new file mode 100644 index 000000000..95a8645c9 --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/ios/Classes/GmaMediationPanglePlugin.swift @@ -0,0 +1,21 @@ +// 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 +// +// https://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 Flutter +import UIKit + +/** Required to link the iOS dependency of the Pangle Adapter. */ +public class GmaMediationPanglePlugin: NSObject, FlutterPlugin { + public static func register(with registrar: FlutterPluginRegistrar) { } +} diff --git a/packages/mediation/gma_mediation_pangle/ios/gma_mediation_pangle.podspec b/packages/mediation/gma_mediation_pangle/ios/gma_mediation_pangle.podspec new file mode 100644 index 000000000..0810c45a5 --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/ios/gma_mediation_pangle.podspec @@ -0,0 +1,26 @@ +# +# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. +# Run `pod lib lint gma_mediation_pangle.podspec` to validate before publishing. +# +Pod::Spec.new do |s| + s.name = 'gma_mediation_pangle' + s.version = '3.5.2' + s.summary = 'Google Mobile Ads Mediation of Pangle.' + s.description = <<-DESC + Mediation Adapter for Pangle to use with Google Mobile Ads. + DESC + s.homepage = 'https://developers.google.com/admob/flutter/mediation/pangle' + s.license = { :file => '../LICENSE' } + s.author = { 'Google LLC' => 'mediation-support@google.com' } + s.source = { :path => '.' } + s.source_files = 'Classes/**/*' + s.public_header_files = 'Classes/**/*.h' + s.dependency 'Flutter' + s.dependency 'GoogleMobileAdsMediationPangle', '~> 7.8.0.6.0' + s.platform = :ios, '13.0' + s.static_framework = true + + # Flutter.framework does not contain a i386 slice. + s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' } + s.swift_version = '5.0' +end diff --git a/packages/mediation/gma_mediation_pangle/lib/gma_mediation_pangle.dart b/packages/mediation/gma_mediation_pangle/lib/gma_mediation_pangle.dart new file mode 100644 index 000000000..b774da66a --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/lib/gma_mediation_pangle.dart @@ -0,0 +1,16 @@ +// 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 +// +// https://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. + +/// This empty class is needed to allow correct compatibility analysis with host platforms. +class GmaMediationPangle {} diff --git a/packages/mediation/gma_mediation_pangle/pubspec.yaml b/packages/mediation/gma_mediation_pangle/pubspec.yaml new file mode 100644 index 000000000..76806b30e --- /dev/null +++ b/packages/mediation/gma_mediation_pangle/pubspec.yaml @@ -0,0 +1,29 @@ +name: gma_mediation_pangle +description: "Mediation Adapter that enables sending ad requests to the Pangle ad network using the google_mobile_ads plugin." +version: 3.5.2 +repository: https://github.com/googleads/googleads-mobile-flutter/tree/main/packages/mediation/gma_mediation_pangle + +environment: + sdk: '>=3.9.0 <4.0.0' + flutter: '>=3.35.1' + +dependencies: + flutter: + sdk: flutter + google_mobile_ads: ^7.0.0 + plugin_platform_interface: ^2.0.2 + +dev_dependencies: + flutter_lints: ^6.0.0 + flutter_test: + sdk: flutter + lint: ^2.3.0 + +flutter: + plugin: + platforms: + android: + package: io.flutter.plugins.googlemobileads.mediation.gma_mediation_pangle + pluginClass: GmaMediationPanglePlugin + ios: + pluginClass: GmaMediationPanglePlugin diff --git a/packages/mediation/gma_mediation_pubmatic/CHANGELOG.md b/packages/mediation/gma_mediation_pubmatic/CHANGELOG.md new file mode 100644 index 000000000..9c9fb5ebb --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/CHANGELOG.md @@ -0,0 +1,32 @@ +## Pubmatic Flutter Mediation Adapter Changelog + +#### Version 1.4.1 +- Supports [PubMatic Android adapter version 4.10.0.1](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/pubmatic/CHANGELOG.md#version-41001). +- Supports [PubMatic iOS adapter version 4.10.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/PubMatic/CHANGELOG.md#version-41000). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.4.0 +- Supports [PubMatic Android adapter version 4.10.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/pubmatic/CHANGELOG.md#version-41000). +- Supports [PubMatic iOS adapter version 4.10.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/PubMatic/CHANGELOG.md#version-41000). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.3.0 +- Supports [PubMatic Android adapter version 4.9.1.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/pubmatic/CHANGELOG.md#version-4910). +- Supports [PubMatic iOS adapter version 4.9.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/PubMatic/CHANGELOG.md#version-4900). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.2.0 +- Supports [PubMatic Android adapter version 4.9.1.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/pubmatic/CHANGELOG.md#version-4910). +- Supports [PubMatic iOS adapter version 4.8.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/PubMatic/CHANGELOG.md#version-4800). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.1.0 +- Supports [PubMatic Android adapter version 4.8.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/pubmatic/CHANGELOG.md#version-4800). +- Supports [PubMatic iOS adapter version 4.8.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/PubMatic/CHANGELOG.md#version-4800). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.0.0 +- Initial release. +- Supports [PubMatic Android adapter version 4.7.1.1](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/pubmatic/CHANGELOG.md#version-4711). +- Supports [PubMatic iOS adapter version 4.7.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/PubMatic/CHANGELOG.md#version-4700). +- Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. diff --git a/packages/mediation/gma_mediation_pubmatic/LICENSE b/packages/mediation/gma_mediation_pubmatic/LICENSE new file mode 100644 index 000000000..e58143fcc --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/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 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. diff --git a/packages/mediation/gma_mediation_pubmatic/README.md b/packages/mediation/gma_mediation_pubmatic/README.md new file mode 100644 index 000000000..21edcc754 --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/README.md @@ -0,0 +1,31 @@ +# Google Mobile Ads Mediation of Pubmatic for Flutter + +[![gma_mediation_pubmatic](https://github.com/googleads/googleads-mobile-flutter/actions/workflows/google_mobile_ads.yaml/badge.svg)](https://github.com/googleads/googleads-mobile-flutter/actions/workflows/google_mobile_ads.yaml) + +This repository contains the source code for the Mediation Pubmatic Flutter +plugin to be used with the Google Mobile Ads plugin. It enables mediation of the +Pubmatic Ad Network through the Google Mobile Ads SDK. + +## Documentation +For instructions on how to use with the google_mobile_ads plugin, refer to the +developer guide for [Pubmatic](https://developers.google.com/admob/flutter/mediation/pubmatic). + +## Downloads + +See [pub.dev](https://pub.dev/packages/gma_mediation_pubmatic/versions) for the +latest releases of the plugin. + +## Suggesting improvements + +To file bugs, make feature requests, or to suggest other improvements, please +use [github's issue tracker](https://github.com/googleads/googleads-mobile-flutter/issues). + + +## Other resources + +* [AdMob help center](https://support.google.com/admob/?hl=en#topic=7383088) +* [Ad Manager help center](https://support.google.com/admanager/?hl=en#topic=7505988) + +## License + +[Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0) \ No newline at end of file diff --git a/packages/mediation/gma_mediation_pubmatic/analysis_options.yaml b/packages/mediation/gma_mediation_pubmatic/analysis_options.yaml new file mode 100644 index 000000000..632d08c98 --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/analysis_options.yaml @@ -0,0 +1,19 @@ +# Copyright 2025 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 +# +# https://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. + +include: package:lint/package.yaml + +analyzer: + exclude: + - '**.g.dart' \ No newline at end of file diff --git a/packages/mediation/gma_mediation_pubmatic/android/build.gradle b/packages/mediation/gma_mediation_pubmatic/android/build.gradle new file mode 100644 index 000000000..446452ca0 --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/android/build.gradle @@ -0,0 +1,72 @@ +group = "io.flutter.plugins.googlemobileads.mediation.gma_mediation_pubmatic" +version = "1.4.1" + +buildscript { + ext.kotlin_version = "2.1.0" + repositories { + google() + mavenCentral() + } + + dependencies { + classpath("com.android.tools.build:gradle:8.7.3") + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version") + } +} + +allprojects { + repositories { + google() + mavenCentral() + } +} + +apply plugin: "com.android.library" +apply plugin: "kotlin-android" + +ext { + stringVersion = "4.10.0.1" +} + +android { + namespace = "io.flutter.plugins.googlemobileads.mediation.gma_mediation_pubmatic" + + compileSdk = 35 + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11 + } + + sourceSets { + main.java.srcDirs += "src/main/kotlin" + test.java.srcDirs += "src/test/kotlin" + } + + defaultConfig { + minSdk = 23 + } + + dependencies { + implementation "com.google.ads.mediation:pubmatic:$stringVersion" + implementation 'com.google.android.gms:play-services-ads:24.4.0' + testImplementation("org.jetbrains.kotlin:kotlin-test") + testImplementation("org.mockito:mockito-core:5.5.0") + } + + testOptions { + unitTests.all { + useJUnitPlatform() + + testLogging { + events "passed", "skipped", "failed", "standardOut", "standardError" + outputs.upToDateWhen {false} + showStandardStreams = true + } + } + } +} diff --git a/packages/mediation/gma_mediation_pubmatic/android/gma_mediation_pubmatic_android.iml b/packages/mediation/gma_mediation_pubmatic/android/gma_mediation_pubmatic_android.iml new file mode 100644 index 000000000..e8b9110d5 --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/android/gma_mediation_pubmatic_android.iml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_pubmatic/android/settings.gradle b/packages/mediation/gma_mediation_pubmatic/android/settings.gradle new file mode 100644 index 000000000..d6adc78a2 --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/android/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'gma_mediation_pubmatic' diff --git a/packages/mediation/gma_mediation_pubmatic/android/src/main/AndroidManifest.xml b/packages/mediation/gma_mediation_pubmatic/android/src/main/AndroidManifest.xml new file mode 100644 index 000000000..b13dfda8c --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/android/src/main/AndroidManifest.xml @@ -0,0 +1,3 @@ + + diff --git a/packages/mediation/gma_mediation_pubmatic/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_pubmatic/GmaMediationPubmaticPlugin.kt b/packages/mediation/gma_mediation_pubmatic/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_pubmatic/GmaMediationPubmaticPlugin.kt new file mode 100644 index 000000000..c37248661 --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_pubmatic/GmaMediationPubmaticPlugin.kt @@ -0,0 +1,24 @@ +// Copyright 2025 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 +// +// https://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. + +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_pubmatic + +import io.flutter.embedding.engine.plugins.FlutterPlugin + +/** Required to link the Android dependency of the Pubmatic Adapter. */ +class GmaMediationPubmaticPlugin : FlutterPlugin { + override fun onAttachedToEngine(flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) {} + + override fun onDetachedFromEngine(binding: FlutterPlugin.FlutterPluginBinding) {} +} diff --git a/packages/mediation/gma_mediation_pubmatic/example/README.md b/packages/mediation/gma_mediation_pubmatic/example/README.md new file mode 100644 index 000000000..b31fafb1f --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/example/README.md @@ -0,0 +1,17 @@ +# gma_mediation_pubmatic_example + +Learn how to integrate with your app that uses the [google_mobile_ads](https://pub.dev/packages/google_mobile_ads) plugin +by following the [development guide](https://developers.google.com/admob/flutter/mediation/pubmatic). + +## Getting Started + +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) + +For help getting started with Flutter development, view the +[online documentation](https://docs.flutter.dev/), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/packages/mediation/gma_mediation_pubmatic/example/analysis_options.yaml b/packages/mediation/gma_mediation_pubmatic/example/analysis_options.yaml new file mode 100644 index 000000000..0d2902135 --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/example/analysis_options.yaml @@ -0,0 +1,28 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at https://dart.dev/lints. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/packages/mediation/gma_mediation_pubmatic/example/android/app/build.gradle.kts b/packages/mediation/gma_mediation_pubmatic/example/android/app/build.gradle.kts new file mode 100644 index 000000000..594eefff3 --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/example/android/app/build.gradle.kts @@ -0,0 +1,41 @@ +plugins { + id("com.android.application") + id("kotlin-android") + // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. + id("dev.flutter.flutter-gradle-plugin") +} + +android { + namespace = "io.flutter.plugins.googlemobileads.mediation.gma_mediation_pubmatic_example" + compileSdk = flutter.compileSdkVersion + ndkVersion = flutter.ndkVersion + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlinOptions { jvmTarget = JavaVersion.VERSION_11.toString() } + + defaultConfig { + // TODO: Specify your own unique Application ID + // (https://developer.android.com/studio/build/application-id.html). + applicationId = "io.flutter.plugins.googlemobileads.mediation.gma_mediation_pubmatic_example" + // You can update the following values to match your application needs. + // For more information, see: https://flutter.dev/to/review-gradle-config. + minSdk = flutter.minSdkVersion + targetSdk = flutter.targetSdkVersion + versionCode = flutter.versionCode + versionName = flutter.versionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig = signingConfigs.getByName("debug") + } + } +} + +flutter { source = "../.." } diff --git a/packages/mediation/gma_mediation_pubmatic/example/android/app/src/debug/AndroidManifest.xml b/packages/mediation/gma_mediation_pubmatic/example/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 000000000..399f6981d --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/example/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/packages/mediation/gma_mediation_pubmatic/example/android/app/src/main/AndroidManifest.xml b/packages/mediation/gma_mediation_pubmatic/example/android/app/src/main/AndroidManifest.xml new file mode 100644 index 000000000..8b8309e4d --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/example/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_pubmatic/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_pubmatic_example/MainActivity.kt b/packages/mediation/gma_mediation_pubmatic/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_pubmatic_example/MainActivity.kt new file mode 100644 index 000000000..62fb2d86c --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_pubmatic_example/MainActivity.kt @@ -0,0 +1,5 @@ +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_pubmatic_example + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity : FlutterActivity() diff --git a/packages/mediation/gma_mediation_pubmatic/example/android/app/src/main/res/drawable-v21/launch_background.xml b/packages/mediation/gma_mediation_pubmatic/example/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 000000000..f74085f3f --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/example/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/mediation/gma_mediation_pubmatic/example/android/app/src/main/res/drawable/launch_background.xml b/packages/mediation/gma_mediation_pubmatic/example/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 000000000..304732f88 --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/example/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/mediation/gma_mediation_pubmatic/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/mediation/gma_mediation_pubmatic/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..db77bb4b7 Binary files /dev/null and b/packages/mediation/gma_mediation_pubmatic/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_pubmatic/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/mediation/gma_mediation_pubmatic/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..17987b79b Binary files /dev/null and b/packages/mediation/gma_mediation_pubmatic/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_pubmatic/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/mediation/gma_mediation_pubmatic/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..09d439148 Binary files /dev/null and b/packages/mediation/gma_mediation_pubmatic/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_pubmatic/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/mediation/gma_mediation_pubmatic/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..d5f1c8d34 Binary files /dev/null and b/packages/mediation/gma_mediation_pubmatic/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_pubmatic/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/packages/mediation/gma_mediation_pubmatic/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..4d6372eeb Binary files /dev/null and b/packages/mediation/gma_mediation_pubmatic/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_pubmatic/example/android/app/src/main/res/values-night/styles.xml b/packages/mediation/gma_mediation_pubmatic/example/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 000000000..06952be74 --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/example/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/packages/mediation/gma_mediation_pubmatic/example/android/app/src/main/res/values/styles.xml b/packages/mediation/gma_mediation_pubmatic/example/android/app/src/main/res/values/styles.xml new file mode 100644 index 000000000..cb1ef8805 --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/example/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/packages/mediation/gma_mediation_pubmatic/example/android/app/src/profile/AndroidManifest.xml b/packages/mediation/gma_mediation_pubmatic/example/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 000000000..399f6981d --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/example/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/packages/mediation/gma_mediation_pubmatic/example/android/build.gradle.kts b/packages/mediation/gma_mediation_pubmatic/example/android/build.gradle.kts new file mode 100644 index 000000000..97eed2dd6 --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/example/android/build.gradle.kts @@ -0,0 +1,19 @@ +allprojects { + repositories { + google() + mavenCentral() + } +} + +val newBuildDir: Directory = rootProject.layout.buildDirectory.dir("../../build").get() + +rootProject.layout.buildDirectory.value(newBuildDir) + +subprojects { + val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name) + project.layout.buildDirectory.value(newSubprojectBuildDir) +} + +subprojects { project.evaluationDependsOn(":app") } + +tasks.register("clean") { delete(rootProject.layout.buildDirectory) } diff --git a/packages/mediation/gma_mediation_pubmatic/example/android/gma_mediation_pubmatic_example_android.iml b/packages/mediation/gma_mediation_pubmatic/example/android/gma_mediation_pubmatic_example_android.iml new file mode 100644 index 000000000..18999696a --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/example/android/gma_mediation_pubmatic_example_android.iml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_pubmatic/example/android/gradle.properties b/packages/mediation/gma_mediation_pubmatic/example/android/gradle.properties new file mode 100644 index 000000000..f018a6181 --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/example/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError +android.useAndroidX=true +android.enableJetifier=true diff --git a/packages/mediation/gma_mediation_pubmatic/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/mediation/gma_mediation_pubmatic/example/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 000000000..ac3b47926 --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/example/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-all.zip diff --git a/packages/mediation/gma_mediation_pubmatic/example/android/gradlew b/packages/mediation/gma_mediation_pubmatic/example/android/gradlew new file mode 100755 index 000000000..9d82f7891 --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/example/android/gradlew @@ -0,0 +1,160 @@ +#!/usr/bin/env bash + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn ( ) { + echo "$*" +} + +die ( ) { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; +esac + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules +function splitJvmOpts() { + JVM_OPTS=("$@") +} +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS +JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" + +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/packages/mediation/gma_mediation_pubmatic/example/android/gradlew.bat b/packages/mediation/gma_mediation_pubmatic/example/android/gradlew.bat new file mode 100644 index 000000000..aec99730b --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/example/android/gradlew.bat @@ -0,0 +1,90 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windowz variants + +if not "%OS%" == "Windows_NT" goto win9xME_args +if "%@eval[2+2]" == "4" goto 4NT_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* +goto execute + +:4NT_args +@rem Get arguments from the 4NT Shell from JP Software +set CMD_LINE_ARGS=%$ + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/packages/mediation/gma_mediation_pubmatic/example/android/settings.gradle.kts b/packages/mediation/gma_mediation_pubmatic/example/android/settings.gradle.kts new file mode 100644 index 000000000..1a6884017 --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/example/android/settings.gradle.kts @@ -0,0 +1,25 @@ +pluginManagement { + val flutterSdkPath = run { + val properties = java.util.Properties() + file("local.properties").inputStream().use { properties.load(it) } + val flutterSdkPath = properties.getProperty("flutter.sdk") + require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" } + flutterSdkPath + } + + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") + + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +plugins { + id("dev.flutter.flutter-plugin-loader") version "1.0.0" + id("com.android.application") version "8.7.3" apply false + id("org.jetbrains.kotlin.android") version "2.1.0" apply false +} + +include(":app") diff --git a/packages/mediation/gma_mediation_pubmatic/example/gma_mediation_pubmatic_example.iml b/packages/mediation/gma_mediation_pubmatic/example/gma_mediation_pubmatic_example.iml new file mode 100644 index 000000000..f66303d53 --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/example/gma_mediation_pubmatic_example.iml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_pubmatic/example/ios/Flutter/AppFrameworkInfo.plist b/packages/mediation/gma_mediation_pubmatic/example/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 000000000..7c5696400 --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/example/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 12.0 + + diff --git a/packages/mediation/gma_mediation_pubmatic/example/ios/Flutter/Debug.xcconfig b/packages/mediation/gma_mediation_pubmatic/example/ios/Flutter/Debug.xcconfig new file mode 100644 index 000000000..592ceee85 --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/example/ios/Flutter/Debug.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/packages/mediation/gma_mediation_pubmatic/example/ios/Flutter/Release.xcconfig b/packages/mediation/gma_mediation_pubmatic/example/ios/Flutter/Release.xcconfig new file mode 100644 index 000000000..592ceee85 --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/example/ios/Flutter/Release.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/packages/mediation/gma_mediation_pubmatic/example/ios/Runner.xcodeproj/project.pbxproj b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 000000000..b561cd38a --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,616 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 97C146E61CF9000F007C117D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 97C146ED1CF9000F007C117D; + remoteInfo = Runner; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 331C8082294A63A400263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C807B294A618700263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + 331C8082294A63A400263BE5 /* RunnerTests */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + 331C8081294A63A400263BE5 /* RunnerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C8080294A63A400263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 331C807D294A63A400263BE5 /* Sources */, + 331C807F294A63A400263BE5 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 331C8086294A63A400263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1510; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 331C8080294A63A400263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 97C146ED1CF9000F007C117D; + }; + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + 331C8080294A63A400263BE5 /* RunnerTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 331C807F294A63A400263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 331C807D294A63A400263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 331C8086294A63A400263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 97C146ED1CF9000F007C117D /* Runner */; + targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationPubmaticExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 331C8088294A63A400263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationPubmaticExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Debug; + }; + 331C8089294A63A400263BE5 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationPubmaticExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Release; + }; + 331C808A294A63A400263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationPubmaticExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationPubmaticExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationPubmaticExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C8088294A63A400263BE5 /* Debug */, + 331C8089294A63A400263BE5 /* Release */, + 331C808A294A63A400263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/packages/mediation/gma_mediation_pubmatic/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..919434a62 --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/packages/mediation/gma_mediation_pubmatic/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000..18d981003 --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/packages/mediation/gma_mediation_pubmatic/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 000000000..f9b0d7c5e --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/packages/mediation/gma_mediation_pubmatic/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 000000000..e3773d42e --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_pubmatic/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..1d526a16e --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/packages/mediation/gma_mediation_pubmatic/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000..18d981003 --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/packages/mediation/gma_mediation_pubmatic/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 000000000..f9b0d7c5e --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/AppDelegate.swift b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/AppDelegate.swift new file mode 100644 index 000000000..626664468 --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import Flutter +import UIKit + +@main +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..d36b1fab2 --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 000000000..dc9ada472 Binary files /dev/null and b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 000000000..7353c41ec Binary files /dev/null and b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 000000000..797d452e4 Binary files /dev/null and b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 000000000..6ed2d933e Binary files /dev/null and b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 000000000..4cd7b0099 Binary files /dev/null and b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 000000000..fe730945a Binary files /dev/null and b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 000000000..321773cd8 Binary files /dev/null and b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 000000000..797d452e4 Binary files /dev/null and b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 000000000..502f463a9 Binary files /dev/null and b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 000000000..0ec303439 Binary files /dev/null and b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 000000000..0ec303439 Binary files /dev/null and b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 000000000..e9f5fea27 Binary files /dev/null and b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 000000000..84ac32ae7 Binary files /dev/null and b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 000000000..8953cba09 Binary files /dev/null and b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 000000000..0467bf12a Binary files /dev/null and b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 000000000..0bedcf2fd --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchImage.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 000000000..89c2725b7 --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 000000000..f2e259c7c --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Base.lproj/Main.storyboard b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 000000000..f3c28516f --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Info.plist b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Info.plist new file mode 100644 index 000000000..3e5b8e73b --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Info.plist @@ -0,0 +1,49 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Gma Mediation Pubmatic + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + gma_mediation_pubmatic_example + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + CADisableMinimumFrameDurationOnPhone + + UIApplicationSupportsIndirectInputEvents + + + diff --git a/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Runner-Bridging-Header.h b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 000000000..308a2a560 --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/example/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/packages/mediation/gma_mediation_pubmatic/example/lib/main.dart b/packages/mediation/gma_mediation_pubmatic/example/lib/main.dart new file mode 100644 index 000000000..ea02decb7 --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/example/lib/main.dart @@ -0,0 +1,29 @@ +import 'package:flutter/material.dart'; + +void main() { + runApp(const MyApp()); +} + +class MyApp extends StatefulWidget { + const MyApp({super.key}); + + @override + State createState() => _MyAppState(); +} + +class _MyAppState extends State { + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Scaffold( + appBar: AppBar(title: const Text('Plugin example app')), + body: const Center(child: Text('Test app')), + ), + ); + } +} diff --git a/packages/mediation/gma_mediation_pubmatic/example/pubspec.lock b/packages/mediation/gma_mediation_pubmatic/example/pubspec.lock new file mode 100644 index 000000000..a295e4230 --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/example/pubspec.lock @@ -0,0 +1,323 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + async: + dependency: transitive + description: + name: async + sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb" + url: "https://pub.dev" + source: hosted + version: "2.13.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + characters: + dependency: transitive + description: + name: characters + sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 + url: "https://pub.dev" + source: hosted + version: "1.4.0" + clock: + dependency: transitive + description: + name: clock + sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b + url: "https://pub.dev" + source: hosted + version: "1.1.2" + collection: + dependency: transitive + description: + name: collection + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" + url: "https://pub.dev" + source: hosted + version: "1.19.1" + cupertino_icons: + dependency: "direct main" + description: + name: cupertino_icons + sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 + url: "https://pub.dev" + source: hosted + version: "1.0.8" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44" + url: "https://pub.dev" + source: hosted + version: "1.3.3" + file: + dependency: transitive + description: + name: file + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 + url: "https://pub.dev" + source: hosted + version: "7.0.1" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_driver: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" + url: "https://pub.dev" + source: hosted + version: "5.0.0" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + fuchsia_remote_debug_protocol: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + gma_mediation_pubmatic: + dependency: "direct main" + description: + path: ".." + relative: true + source: path + version: "1.0.0" + google_mobile_ads: + dependency: transitive + description: + name: google_mobile_ads + sha256: a4f59019f2c32769fb6c60ed8aa321e9c21a36297e2c4f23452b3e779a3e7a26 + url: "https://pub.dev" + source: hosted + version: "6.0.0" + integration_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0" + url: "https://pub.dev" + source: hosted + version: "10.0.9" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 + url: "https://pub.dev" + source: hosted + version: "3.0.9" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + lints: + dependency: transitive + description: + name: lints + sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7 + url: "https://pub.dev" + source: hosted + version: "5.1.1" + matcher: + dependency: transitive + description: + name: matcher + sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 + url: "https://pub.dev" + source: hosted + version: "0.12.17" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + url: "https://pub.dev" + source: hosted + version: "0.11.1" + meta: + dependency: transitive + description: + name: meta + sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c + url: "https://pub.dev" + source: hosted + version: "1.16.0" + path: + dependency: transitive + description: + name: path + sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" + url: "https://pub.dev" + source: hosted + version: "1.9.1" + platform: + dependency: transitive + description: + name: platform + sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" + url: "https://pub.dev" + source: hosted + version: "3.1.6" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" + process: + dependency: transitive + description: + name: process + sha256: "107d8be718f120bbba9dcd1e95e3bd325b1b4a4f07db64154635ba03f2567a0d" + url: "https://pub.dev" + source: hosted + version: "5.0.3" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + source_span: + dependency: transitive + description: + name: source_span + sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" + url: "https://pub.dev" + source: hosted + version: "1.10.1" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" + url: "https://pub.dev" + source: hosted + version: "1.12.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" + url: "https://pub.dev" + source: hosted + version: "1.4.1" + sync_http: + dependency: transitive + description: + name: sync_http + sha256: "7f0cd72eca000d2e026bcd6f990b81d0ca06022ef4e32fb257b30d3d1014a961" + url: "https://pub.dev" + source: hosted + version: "0.3.1" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" + url: "https://pub.dev" + source: hosted + version: "1.2.2" + test_api: + dependency: transitive + description: + name: test_api + sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd + url: "https://pub.dev" + source: hosted + version: "0.7.4" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02 + url: "https://pub.dev" + source: hosted + version: "15.0.0" + webdriver: + dependency: transitive + description: + name: webdriver + sha256: "2f3a14ca026957870cfd9c635b83507e0e51d8091568e90129fbf805aba7cade" + url: "https://pub.dev" + source: hosted + version: "3.1.0" + webview_flutter: + dependency: transitive + description: + name: webview_flutter + sha256: c3e4fe614b1c814950ad07186007eff2f2e5dd2935eba7b9a9a1af8e5885f1ba + url: "https://pub.dev" + source: hosted + version: "4.13.0" + webview_flutter_android: + dependency: transitive + description: + name: webview_flutter_android + sha256: f6e6afef6e234801da77170f7a1847ded8450778caf2fe13979d140484be3678 + url: "https://pub.dev" + source: hosted + version: "4.7.0" + webview_flutter_platform_interface: + dependency: transitive + description: + name: webview_flutter_platform_interface + sha256: f0dc2dc3a2b1e3a6abdd6801b9355ebfeb3b8f6cde6b9dc7c9235909c4a1f147 + url: "https://pub.dev" + source: hosted + version: "2.13.1" + webview_flutter_wkwebview: + dependency: transitive + description: + name: webview_flutter_wkwebview + sha256: a3d461fe3467014e05f3ac4962e5fdde2a4bf44c561cb53e9ae5c586600fdbc3 + url: "https://pub.dev" + source: hosted + version: "3.22.0" +sdks: + dart: ">=3.8.1 <4.0.0" + flutter: ">=3.27.0" diff --git a/packages/mediation/gma_mediation_pubmatic/example/pubspec.yaml b/packages/mediation/gma_mediation_pubmatic/example/pubspec.yaml new file mode 100644 index 000000000..082d9636d --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/example/pubspec.yaml @@ -0,0 +1,85 @@ +name: gma_mediation_pubmatic_example +description: "Demonstrates how to use the gma_mediation_pubmatic plugin." +# The following line prevents the package from being accidentally published to +# pub.dev using `flutter pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +environment: + sdk: ^3.8.1 + +# Dependencies specify other packages that your package needs in order to work. +# To automatically upgrade your package dependencies to the latest versions +# consider running `flutter pub upgrade --major-versions`. Alternatively, +# dependencies can be manually updated by changing the version numbers below to +# the latest version available on pub.dev. To see which dependencies have newer +# versions available, run `flutter pub outdated`. +dependencies: + flutter: + sdk: flutter + + gma_mediation_pubmatic: + # When depending on this package from a real application you should use: + # gma_mediation_pubmatic: ^x.y.z + # See https://dart.dev/tools/pub/dependencies#version-constraints + # The example app is bundled with the plugin so we use a path dependency on + # the parent directory to use the current plugin's version. + path: ../ + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^1.0.8 + +dev_dependencies: + integration_test: + sdk: flutter + flutter_test: + sdk: flutter + + # The "flutter_lints" package below contains a set of recommended lints to + # encourage good coding practices. The lint set provided by the package is + # activated in the `analysis_options.yaml` file located at the root of your + # package. See that file for information about deactivating specific lint + # rules and activating additional ones. + flutter_lints: ^5.0.0 + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter packages. +flutter: + + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + + # To add assets to your application, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/to/resolution-aware-images + + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/to/asset-from-package + + # To add custom fonts to your application, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts from package dependencies, + # see https://flutter.dev/to/font-from-package diff --git a/packages/mediation/gma_mediation_pubmatic/gma_mediation_pubmatic.iml b/packages/mediation/gma_mediation_pubmatic/gma_mediation_pubmatic.iml new file mode 100644 index 000000000..27686dd4b --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/gma_mediation_pubmatic.iml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_pubmatic/ios/Classes/GmaMediationPubmaticPlugin.swift b/packages/mediation/gma_mediation_pubmatic/ios/Classes/GmaMediationPubmaticPlugin.swift new file mode 100644 index 000000000..14f3bf933 --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/ios/Classes/GmaMediationPubmaticPlugin.swift @@ -0,0 +1,23 @@ +// Copyright 2025 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 +// +// https://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 Flutter +import UIKit + +/// Required to link the iOS dependency of the Pubmatic Adapter. +public class GmaMediationPubmaticPlugin: NSObject, FlutterPlugin { + public static func register(with registrar: FlutterPluginRegistrar) {} + + public func detachFromEngine(for registrar: FlutterPluginRegistrar) {} +} diff --git a/packages/mediation/gma_mediation_pubmatic/ios/Resources/PrivacyInfo.xcprivacy b/packages/mediation/gma_mediation_pubmatic/ios/Resources/PrivacyInfo.xcprivacy new file mode 100644 index 000000000..a34b7e2e6 --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/ios/Resources/PrivacyInfo.xcprivacy @@ -0,0 +1,14 @@ + + + + + NSPrivacyTrackingDomains + + NSPrivacyAccessedAPITypes + + NSPrivacyCollectedDataTypes + + NSPrivacyTracking + + + diff --git a/packages/mediation/gma_mediation_pubmatic/ios/gma_mediation_pubmatic.podspec b/packages/mediation/gma_mediation_pubmatic/ios/gma_mediation_pubmatic.podspec new file mode 100644 index 000000000..0b57a1d12 --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/ios/gma_mediation_pubmatic.podspec @@ -0,0 +1,21 @@ +Pod::Spec.new do |s| + s.name = 'gma_mediation_pubmatic' + s.version = '1.4.1' + s.summary = 'Google Mobile Ads Mediation of Pubmatic.' + s.description = <<-DESC + Mediation Adapter for Pubmatic to use with Google Mobile Ads. + DESC + s.homepage = 'https://developers.google.com/admob/flutter/mediation/pubmatic' + s.license = { :file => '../LICENSE' } + s.author = { 'Google LLC' => 'mediation-support@google.com' } + s.source = { :path => '.' } + s.source_files = 'Classes/**/*' + s.dependency 'Flutter' + s.dependency 'GoogleMobileAdsMediationPubMatic', '~> 4.10.0.0' + s.platform = :ios, '12.0' + s.static_framework = true + + s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' } + s.swift_version = '5.0' + +end diff --git a/packages/mediation/gma_mediation_pubmatic/lib/gma_mediation_pubmatic.dart b/packages/mediation/gma_mediation_pubmatic/lib/gma_mediation_pubmatic.dart new file mode 100644 index 000000000..d4c835600 --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/lib/gma_mediation_pubmatic.dart @@ -0,0 +1,16 @@ +// Copyright 2025 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 +// +// https://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. + +/// This empty class is needed to allow correct compatibility analysis with host platforms. +class GmaMediationPubmatic {} diff --git a/packages/mediation/gma_mediation_pubmatic/pubspec.lock b/packages/mediation/gma_mediation_pubmatic/pubspec.lock new file mode 100644 index 000000000..39ea3dfa2 --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/pubspec.lock @@ -0,0 +1,261 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + async: + dependency: transitive + description: + name: async + sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb" + url: "https://pub.dev" + source: hosted + version: "2.13.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + characters: + dependency: transitive + description: + name: characters + sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 + url: "https://pub.dev" + source: hosted + version: "1.4.0" + clock: + dependency: transitive + description: + name: clock + sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b + url: "https://pub.dev" + source: hosted + version: "1.1.2" + collection: + dependency: transitive + description: + name: collection + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" + url: "https://pub.dev" + source: hosted + version: "1.19.1" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44" + url: "https://pub.dev" + source: hosted + version: "1.3.3" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" + url: "https://pub.dev" + source: hosted + version: "5.0.0" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + google_mobile_ads: + dependency: "direct main" + description: + name: google_mobile_ads + sha256: a4f59019f2c32769fb6c60ed8aa321e9c21a36297e2c4f23452b3e779a3e7a26 + url: "https://pub.dev" + source: hosted + version: "6.0.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0" + url: "https://pub.dev" + source: hosted + version: "10.0.9" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 + url: "https://pub.dev" + source: hosted + version: "3.0.9" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + lint: + dependency: "direct dev" + description: + name: lint + sha256: "3cd03646de313481336500ba02eb34d07c590535525f154aae7fda7362aa07a9" + url: "https://pub.dev" + source: hosted + version: "2.8.0" + lints: + dependency: transitive + description: + name: lints + sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7 + url: "https://pub.dev" + source: hosted + version: "5.1.1" + matcher: + dependency: transitive + description: + name: matcher + sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 + url: "https://pub.dev" + source: hosted + version: "0.12.17" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + url: "https://pub.dev" + source: hosted + version: "0.11.1" + meta: + dependency: transitive + description: + name: meta + sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c + url: "https://pub.dev" + source: hosted + version: "1.16.0" + path: + dependency: transitive + description: + name: path + sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" + url: "https://pub.dev" + source: hosted + version: "1.9.1" + plugin_platform_interface: + dependency: "direct main" + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + source_span: + dependency: transitive + description: + name: source_span + sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" + url: "https://pub.dev" + source: hosted + version: "1.10.1" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" + url: "https://pub.dev" + source: hosted + version: "1.12.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" + url: "https://pub.dev" + source: hosted + version: "1.4.1" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" + url: "https://pub.dev" + source: hosted + version: "1.2.2" + test_api: + dependency: transitive + description: + name: test_api + sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd + url: "https://pub.dev" + source: hosted + version: "0.7.4" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02 + url: "https://pub.dev" + source: hosted + version: "15.0.0" + webview_flutter: + dependency: transitive + description: + name: webview_flutter + sha256: c3e4fe614b1c814950ad07186007eff2f2e5dd2935eba7b9a9a1af8e5885f1ba + url: "https://pub.dev" + source: hosted + version: "4.13.0" + webview_flutter_android: + dependency: transitive + description: + name: webview_flutter_android + sha256: f6e6afef6e234801da77170f7a1847ded8450778caf2fe13979d140484be3678 + url: "https://pub.dev" + source: hosted + version: "4.7.0" + webview_flutter_platform_interface: + dependency: transitive + description: + name: webview_flutter_platform_interface + sha256: f0dc2dc3a2b1e3a6abdd6801b9355ebfeb3b8f6cde6b9dc7c9235909c4a1f147 + url: "https://pub.dev" + source: hosted + version: "2.13.1" + webview_flutter_wkwebview: + dependency: transitive + description: + name: webview_flutter_wkwebview + sha256: a3d461fe3467014e05f3ac4962e5fdde2a4bf44c561cb53e9ae5c586600fdbc3 + url: "https://pub.dev" + source: hosted + version: "3.22.0" +sdks: + dart: ">=3.8.1 <4.0.0" + flutter: ">=3.27.0" diff --git a/packages/mediation/gma_mediation_pubmatic/pubspec.yaml b/packages/mediation/gma_mediation_pubmatic/pubspec.yaml new file mode 100644 index 000000000..d26db6319 --- /dev/null +++ b/packages/mediation/gma_mediation_pubmatic/pubspec.yaml @@ -0,0 +1,26 @@ +name: gma_mediation_pubmatic +description: 'Mediation Adapter that enables sending ad requests to the Pubmatic + ad network using the google_mobile_ads plugin.' +version: 1.4.1 +environment: + sdk: '>=3.6.0 <4.0.0' + flutter: '>=3.27.0' +dependencies: + flutter: + sdk: flutter + google_mobile_ads: ^6.0.0 + plugin_platform_interface: ^2.0.2 +dev_dependencies: + flutter_test: + sdk: flutter + flutter_lints: ^5.0.0 + lint: ^2.4.0 +flutter: + plugin: + platforms: + android: + package: io.flutter.plugins.googlemobileads.mediation.gma_mediation_pubmatic + pluginClass: GmaMediationPubmaticPlugin + ios: + pluginClass: GmaMediationPubmaticPlugin +repository: https://github.com/googleads/googleads-mobile-flutter/tree/main/packages/mediation/gma_mediation_pubmatic diff --git a/packages/mediation/gma_mediation_unity/.gitignore b/packages/mediation/gma_mediation_unity/.gitignore new file mode 100644 index 000000000..ac5aa9893 --- /dev/null +++ b/packages/mediation/gma_mediation_unity/.gitignore @@ -0,0 +1,29 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. +/pubspec.lock +**/doc/api/ +.dart_tool/ +build/ diff --git a/packages/mediation/gma_mediation_unity/.metadata b/packages/mediation/gma_mediation_unity/.metadata new file mode 100644 index 000000000..5a15fe0d0 --- /dev/null +++ b/packages/mediation/gma_mediation_unity/.metadata @@ -0,0 +1,33 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "41456452f29d64e8deb623a3c927524bcf9f111b" + channel: "stable" + +project_type: plugin + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: 41456452f29d64e8deb623a3c927524bcf9f111b + base_revision: 41456452f29d64e8deb623a3c927524bcf9f111b + - platform: android + create_revision: 41456452f29d64e8deb623a3c927524bcf9f111b + base_revision: 41456452f29d64e8deb623a3c927524bcf9f111b + - platform: ios + create_revision: 41456452f29d64e8deb623a3c927524bcf9f111b + base_revision: 41456452f29d64e8deb623a3c927524bcf9f111b + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/packages/mediation/gma_mediation_unity/CHANGELOG.md b/packages/mediation/gma_mediation_unity/CHANGELOG.md new file mode 100644 index 000000000..9ad71977e --- /dev/null +++ b/packages/mediation/gma_mediation_unity/CHANGELOG.md @@ -0,0 +1,67 @@ +## Unity Ads Flutter Mediation Adapter Changelog + +#### Version 1.6.4 (In progress) +- Updated minimum Flutter version to 3.35.1 +- Updated to support Google Mobile Ads Flutter Plugin version 7.0.0 + +#### Version 1.6.3 +- Supports [Unity Android adapter version 4.16.3.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/unity/CHANGELOG.md#version-41630). +- Supports [Unity iOS adapter version 4.16.3.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Unity/CHANGELOG.md#version-41630). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.6.2 +- Supports [Unity Android adapter version 4.16.3.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/unity/CHANGELOG.md#version-41630). +- Supports [Unity iOS adapter version 4.16.2.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Unity/CHANGELOG.md#version-41620). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.6.1 +- Supports [Unity Android adapter version 4.16.1.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/unity/CHANGELOG.md#version-41610). +- Supports [Unity iOS adapter version 4.16.1.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Unity/CHANGELOG.md#version-41610). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.6.0 +- Now requires minimum iOS version 13.0. +- Supports [Unity Android adapter version 4.16.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/unity/CHANGELOG.md#version-41600). +- Supports [Unity iOS adapter version 4.16.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Unity/CHANGELOG.md#version-41600). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.5.1 +- Supports [Unity Android adapter version 4.15.1.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/unity/CHANGELOG.md#version-41510). +- Supports [Unity iOS adapter version 4.15.1.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Unity/CHANGELOG.md#version-41510). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.5.0 +- Supports [Unity Android adapter version 4.15.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/unity/CHANGELOG.md#version-41500). +- Supports [Unity iOS adapter version 4.15.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Unity/CHANGELOG.md#version-41500). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.4.1 +- Supports [Unity Android adapter version 4.14.2.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/unity/CHANGELOG.md#version-41420). +- Supports [Unity iOS adapter version 4.14.2.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Unity/CHANGELOG.md#version-41420). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.4.0 +- Supports [Unity Android adapter version 4.14.1.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/unity/CHANGELOG.md#version-41410). +- Supports [Unity iOS adapter version 4.14.1.1](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Unity/CHANGELOG.md#version-41411). +* Built and tested with the Google Mobile Ads Flutter Plugin version 6.0.0. + +#### Version 1.3.0 +- Supports [Unity Android adapter version 4.13.1.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/unity/CHANGELOG.md#version-41310). +- Supports [Unity iOS adapter version 4.13.1.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Unity/CHANGELOG.md#version-41310). +* Built and tested with the Google Mobile Ads Flutter Plugin version 5.3.1. + +#### Version 1.2.0 +- Supports [Unity Android adapter version 4.13.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/unity/CHANGELOG.md#version-41300). +- Supports [Unity iOS adapter version 4.12.5.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Unity/CHANGELOG.md#version-41250). +* Built and tested with the Google Mobile Ads Flutter Plugin version 5.3.1. + +#### Version 1.1.0 +- Supports [Unity Android adapter version 4.12.3.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/unity/CHANGELOG.md#version-41230). +- Supports [Unity iOS adapter version 4.12.3.1](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Unity/CHANGELOG.md#version-41231). +* Built and tested with the Google Mobile Ads Flutter Plugin version 5.2.0. + +#### Version 1.0.0 +- Initial release. +- Supports [Unity Android adapter version 4.10.0.0](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/unity/CHANGELOG.md#version-41000). +- Supports [Unity iOS adapter version 4.10.0.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Unity/CHANGELOG.md#version-41000). +* Built and tested with the Google Mobile Ads Flutter Plugin version 5.0.0. diff --git a/packages/mediation/gma_mediation_unity/LICENSE b/packages/mediation/gma_mediation_unity/LICENSE new file mode 100644 index 000000000..d64569567 --- /dev/null +++ b/packages/mediation/gma_mediation_unity/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/packages/mediation/gma_mediation_unity/README.md b/packages/mediation/gma_mediation_unity/README.md new file mode 100644 index 000000000..d77c3eeb0 --- /dev/null +++ b/packages/mediation/gma_mediation_unity/README.md @@ -0,0 +1,36 @@ +# Google Mobile Ads Mediation of Unity Ads for Flutter + +[![gma_mediation_unity](https://github.com/googleads/googleads-mobile-flutter/actions/workflows/google_mobile_ads.yaml/badge.svg)](https://github.com/googleads/googleads-mobile-flutter/actions/workflows/google_mobile_ads.yaml) + +This repository contains the source code for the Mediation Unity Ads Flutter +plugin to be used with the Google Mobile Ads plugin. It enables mediation of the +Unity Ad Network through the Google Mobile Ads SDK. + +This plugin use the [Pigeon Flutter plugin](https://pub.dev/packages/pigeon) to +generate the classes that bridge the dart layer with each platform's code. +To add or modify the third party sdk, use the classes in the pigeons folder +following [this guide](https://github.com/flutter/packages/blob/main/packages/pigeon/example/README.md). + +## Documentation +For instructions on how to use with the google_mobile_ads plugin, refer to the +developer guide for [Unity Ads](https://developers.google.com/admob/flutter/mediation/unity). + +## Downloads + +See [pub.dev](https://pub.dev/packages/gma_mediation_unity/versions) for the +latest releases of the plugin. + +## Suggesting improvements + +To file bugs, make feature requests, or to suggest other improvements, please +use [github's issue tracker](https://github.com/googleads/googleads-mobile-flutter/issues). + + +## Other resources + +* [AdMob help center](https://support.google.com/admob/?hl=en#topic=7383088) +* [Ad Manager help center](https://support.google.com/admanager/?hl=en#topic=7505988) + +## License + +[Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0) \ No newline at end of file diff --git a/packages/mediation/gma_mediation_unity/analysis_options.yaml b/packages/mediation/gma_mediation_unity/analysis_options.yaml new file mode 100644 index 000000000..0567a049c --- /dev/null +++ b/packages/mediation/gma_mediation_unity/analysis_options.yaml @@ -0,0 +1,19 @@ +#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 +# +#https://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. + +include: package:lint/package.yaml + +analyzer: + exclude: + - '**.g.dart' \ No newline at end of file diff --git a/packages/mediation/gma_mediation_unity/android/.gitignore b/packages/mediation/gma_mediation_unity/android/.gitignore new file mode 100644 index 000000000..161bdcdaf --- /dev/null +++ b/packages/mediation/gma_mediation_unity/android/.gitignore @@ -0,0 +1,9 @@ +*.iml +.gradle +/local.properties +/.idea/workspace.xml +/.idea/libraries +.DS_Store +/build +/captures +.cxx diff --git a/packages/mediation/gma_mediation_unity/android/build.gradle b/packages/mediation/gma_mediation_unity/android/build.gradle new file mode 100644 index 000000000..b6f4e72d9 --- /dev/null +++ b/packages/mediation/gma_mediation_unity/android/build.gradle @@ -0,0 +1,85 @@ +group 'io.flutter.plugins.googlemobileads.mediation.gma_mediation_unity' +version = "1.6.4" + +buildscript { + ext.kotlin_version = '2.2.21' + repositories { + google() + mavenCentral() + } + + dependencies { + classpath 'com.android.tools.build:gradle:8.13.1' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + +allprojects { + repositories { + google() + mavenCentral() + } +} + +apply plugin: 'com.android.library' +apply plugin: 'kotlin-android' + +ext { + stringVersion = "4.16.5.0" +} + +android { + if (project.android.hasProperty("namespace")) { + namespace 'io.flutter.plugins.googlemobileads.mediation.gma_mediation_unity' + } + + compileSdkVersion 36 + + compileOptions { + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + test.java.srcDirs += 'src/test/kotlin' + } + + defaultConfig { + minSdkVersion 24 + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + dependencies { + implementation 'com.unity3d.ads:unity-ads:4.16.3' + implementation "com.google.ads.mediation:unity:$stringVersion" + testImplementation 'junit:junit:4.13.2' + testImplementation 'androidx.test:core:1.5.0' + testImplementation 'androidx.test:core-ktx:1.5.0' + testImplementation 'androidx.test.ext:junit:1.1.5' + testImplementation 'org.jetbrains.kotlin:kotlin-stdlib:1.8.20' + testImplementation 'org.mockito:mockito-core:5.5.0' + testImplementation 'org.mockito.kotlin:mockito-kotlin:5.1.0' + testImplementation 'org.robolectric:robolectric:4.16' + } + + testOptions { + unitTests.all { + useJUnit() + + testLogging { + events "passed", "skipped", "failed", "standardOut", "standardError" + outputs.upToDateWhen {false} + showStandardStreams = true + } + } + unitTests { + includeAndroidResources = true + unitTests.returnDefaultValues = true + } + } +} diff --git a/packages/mediation/gma_mediation_unity/android/gradle.properties b/packages/mediation/gma_mediation_unity/android/gradle.properties new file mode 100644 index 000000000..94e8c9d9a --- /dev/null +++ b/packages/mediation/gma_mediation_unity/android/gradle.properties @@ -0,0 +1,15 @@ +## For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html +# +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +# Default value: -Xmx1024m -XX:MaxPermSize=256m +# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 +# +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true +#Fri Aug 06 00:15:03 EDT 2021 +android.useAndroidX=true +android.enableJetifier=true diff --git a/packages/mediation/gma_mediation_unity/android/gradle/wrapper/gradle-wrapper.properties b/packages/mediation/gma_mediation_unity/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 000000000..cd4b7aa89 --- /dev/null +++ b/packages/mediation/gma_mediation_unity/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip +networkTimeout=10000 +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/packages/mediation/gma_mediation_unity/android/settings.gradle b/packages/mediation/gma_mediation_unity/android/settings.gradle new file mode 100644 index 000000000..287d994f2 --- /dev/null +++ b/packages/mediation/gma_mediation_unity/android/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'gma_mediation_unity' diff --git a/packages/mediation/gma_mediation_unity/android/src/main/AndroidManifest.xml b/packages/mediation/gma_mediation_unity/android/src/main/AndroidManifest.xml new file mode 100644 index 000000000..52392445f --- /dev/null +++ b/packages/mediation/gma_mediation_unity/android/src/main/AndroidManifest.xml @@ -0,0 +1,3 @@ + + diff --git a/packages/mediation/gma_mediation_unity/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_unity/GmaMediationUnityPlugin.kt b/packages/mediation/gma_mediation_unity/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_unity/GmaMediationUnityPlugin.kt new file mode 100644 index 000000000..7b463e165 --- /dev/null +++ b/packages/mediation/gma_mediation_unity/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_unity/GmaMediationUnityPlugin.kt @@ -0,0 +1,61 @@ +// 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 +// +// https://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. + +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_unity + +import android.content.Context +import com.unity3d.ads.metadata.MetaData +import io.flutter.embedding.engine.plugins.FlutterPlugin +import io.flutter.embedding.engine.plugins.activity.ActivityAware +import io.flutter.embedding.engine.plugins.activity.ActivityPluginBinding + +/** GmaMediationUnityPlugin manages UnityPrivacyApi and implements the needed methods. */ +class GmaMediationUnityPlugin: FlutterPlugin, ActivityAware, UnityPrivacyApi { + private lateinit var context: Context + + override fun onAttachedToEngine(flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) { + context = flutterPluginBinding.applicationContext + UnityPrivacyApi.setUp(flutterPluginBinding.binaryMessenger, this) + } + + override fun onDetachedFromEngine(binding: FlutterPlugin.FlutterPluginBinding) { + UnityPrivacyApi.setUp(binding.binaryMessenger, null) + } + + override fun onDetachedFromActivity() {} + + override fun onReattachedToActivityForConfigChanges(binding: ActivityPluginBinding) {} + + override fun onAttachedToActivity(binding: ActivityPluginBinding) {} + + override fun onDetachedFromActivityForConfigChanges() {} + + override fun setGDPRConsent(gdprConsent: Boolean) { + val gdprMetaData = UnityApiWrapper.createMetaData(context) + gdprMetaData.set("gdpr.consent", gdprConsent) + gdprMetaData.commit() + } + + override fun setCCPAConsent(ccpaConsent: Boolean) { + val ccpaMetaData = UnityApiWrapper.createMetaData(context) + ccpaMetaData.set("privacy.consent", ccpaConsent) + ccpaMetaData.commit() + } +} + +/** Wrapper singleton to enable mocking of [MetaData] class for unit testing. */ +object UnityApiWrapper { + @JvmStatic + fun createMetaData(context: Context) = MetaData(context) +} diff --git a/packages/mediation/gma_mediation_unity/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_unity/UnityPrivacyApi.g.kt b/packages/mediation/gma_mediation_unity/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_unity/UnityPrivacyApi.g.kt new file mode 100644 index 000000000..67743bf89 --- /dev/null +++ b/packages/mediation/gma_mediation_unity/android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_unity/UnityPrivacyApi.g.kt @@ -0,0 +1,105 @@ +// Autogenerated from Pigeon (v18.0.0), do not edit directly. +// See also: https://pub.dev/packages/pigeon + +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_unity + +import android.util.Log +import io.flutter.plugin.common.BasicMessageChannel +import io.flutter.plugin.common.BinaryMessenger +import io.flutter.plugin.common.MessageCodec +import io.flutter.plugin.common.StandardMessageCodec +import java.io.ByteArrayOutputStream +import java.nio.ByteBuffer + +private fun wrapResult(result: Any?): List { + return listOf(result) +} + +private fun wrapError(exception: Throwable): List { + if (exception is FlutterError) { + return listOf( + exception.code, + exception.message, + exception.details + ) + } else { + return listOf( + exception.javaClass.simpleName, + exception.toString(), + "Cause: " + exception.cause + ", Stacktrace: " + Log.getStackTraceString(exception) + ) + } +} + +/** + * Error class for passing custom error details to Flutter via a thrown PlatformException. + * @property code The error code. + * @property message The error message. + * @property details The error details. Must be a datatype supported by the api codec. + */ +class FlutterError ( + val code: String, + override val message: String? = null, + val details: Any? = null +) : Throwable() +/** + * The generated classes set the channels to call the methods in the corresponding kotlin UnityPrivacyApi interface and swift UnityPrivacyApi protocol from the dart layer. + * + * Generated interface from Pigeon that represents a handler of messages from Flutter. + */ +interface UnityPrivacyApi { + /** Used to configure GDPR consent on the Android or iOS Unity SDK */ + fun setGDPRConsent(gdprConsent: Boolean) + /** Used to configure CCPA consent on the Android or iOS Unity SDK */ + fun setCCPAConsent(ccpaConsent: Boolean) + + companion object { + /** The codec used by UnityPrivacyApi. */ + val codec: MessageCodec by lazy { + StandardMessageCodec() + } + /** Sets up an instance of `UnityPrivacyApi` to handle messages through the `binaryMessenger`. */ + @Suppress("UNCHECKED_CAST") + fun setUp(binaryMessenger: BinaryMessenger, api: UnityPrivacyApi?, messageChannelSuffix: String = "") { + val separatedMessageChannelSuffix = if (messageChannelSuffix.isNotEmpty()) ".$messageChannelSuffix" else "" + run { + val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.gma_mediation_unity.UnityPrivacyApi.setGDPRConsent$separatedMessageChannelSuffix", codec) + if (api != null) { + channel.setMessageHandler { message, reply -> + val args = message as List + val gdprConsentArg = args[0] as Boolean + var wrapped: List + try { + api.setGDPRConsent(gdprConsentArg) + wrapped = listOf(null) + } catch (exception: Throwable) { + wrapped = wrapError(exception) + } + reply.reply(wrapped) + } + } else { + channel.setMessageHandler(null) + } + } + run { + val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.gma_mediation_unity.UnityPrivacyApi.setCCPAConsent$separatedMessageChannelSuffix", codec) + if (api != null) { + channel.setMessageHandler { message, reply -> + val args = message as List + val ccpaConsentArg = args[0] as Boolean + var wrapped: List + try { + api.setCCPAConsent(ccpaConsentArg) + wrapped = listOf(null) + } catch (exception: Throwable) { + wrapped = wrapError(exception) + } + reply.reply(wrapped) + } + } else { + channel.setMessageHandler(null) + } + } + } + } +} diff --git a/packages/mediation/gma_mediation_unity/android/src/test/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_unity/GmaMediationUnityPluginTest.kt b/packages/mediation/gma_mediation_unity/android/src/test/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_unity/GmaMediationUnityPluginTest.kt new file mode 100644 index 000000000..ad7fc4285 --- /dev/null +++ b/packages/mediation/gma_mediation_unity/android/src/test/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_unity/GmaMediationUnityPluginTest.kt @@ -0,0 +1,97 @@ +// 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 +// +// https://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. + +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_unity + +import android.content.Context +import androidx.test.core.app.ApplicationProvider +import androidx.test.ext.junit.runners.AndroidJUnit4 +import com.unity3d.ads.metadata.MetaData +import io.flutter.embedding.engine.plugins.FlutterPlugin +import io.flutter.plugin.common.BinaryMessenger +import io.flutter.plugins.googlemobileads.mediation.gma_mediation_unity.UnityApiWrapper.createMetaData +import org.junit.Test +import org.junit.runner.RunWith +import org.mockito.Mockito.mockStatic +import org.mockito.kotlin.doReturn +import org.mockito.kotlin.eq +import org.mockito.kotlin.mock +import org.mockito.kotlin.verify +import org.mockito.kotlin.whenever + +@RunWith(AndroidJUnit4::class) +internal class GmaMediationUnityPluginTest { + private val context = ApplicationProvider.getApplicationContext() + private val mockMetaData = mock() + private val mockBinaryMessenger = mock() + private val mockFlutterPluginBinding = mock { + on { applicationContext } doReturn context + on { binaryMessenger } doReturn mockBinaryMessenger + } + @Test + fun setGDPRConsent_withTrueValue_setsGDPRAndCommitsIt() { + val plugin = GmaMediationUnityPlugin() + mockStatic(UnityApiWrapper::class.java).use { + whenever(createMetaData(context)) doReturn mockMetaData + plugin.onAttachedToEngine(mockFlutterPluginBinding) + + plugin.setGDPRConsent(true) + + verify(mockMetaData).set(eq("gdpr.consent"), eq(true)) + verify(mockMetaData).commit() + } + } + + @Test + fun setGDPRConsent_withFalseValue_setsGDPRAndCommitsIt() { + val plugin = GmaMediationUnityPlugin() + mockStatic(UnityApiWrapper::class.java).use { + whenever(createMetaData(context)) doReturn mockMetaData + plugin.onAttachedToEngine(mockFlutterPluginBinding) + + plugin.setGDPRConsent(false) + + verify(mockMetaData).set(eq("gdpr.consent"), eq(false)) + verify(mockMetaData).commit() + } + } + + @Test + fun setCCPAConsent_withTrueValue_setsCCPAAndCommitsIt() { + val plugin = GmaMediationUnityPlugin() + mockStatic(UnityApiWrapper::class.java).use { + whenever(createMetaData(context)) doReturn mockMetaData + plugin.onAttachedToEngine(mockFlutterPluginBinding) + + plugin.setCCPAConsent(true) + + verify(mockMetaData).set(eq("privacy.consent"), eq(true)) + verify(mockMetaData).commit() + } + } + + @Test + fun setCCPAConsent_withFalseValue_setsCCPAAndCommitsIt() { + val plugin = GmaMediationUnityPlugin() + mockStatic(UnityApiWrapper::class.java).use { + whenever(createMetaData(context)) doReturn mockMetaData + plugin.onAttachedToEngine(mockFlutterPluginBinding) + + plugin.setCCPAConsent(false) + + verify(mockMetaData).set(eq("privacy.consent"), eq(false)) + verify(mockMetaData).commit() + } + } +} diff --git a/packages/mediation/gma_mediation_unity/example/.gitignore b/packages/mediation/gma_mediation_unity/example/.gitignore new file mode 100644 index 000000000..29a3a5017 --- /dev/null +++ b/packages/mediation/gma_mediation_unity/example/.gitignore @@ -0,0 +1,43 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.pub-cache/ +.pub/ +/build/ + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/packages/mediation/gma_mediation_unity/example/README.md b/packages/mediation/gma_mediation_unity/example/README.md new file mode 100644 index 000000000..b615ab635 --- /dev/null +++ b/packages/mediation/gma_mediation_unity/example/README.md @@ -0,0 +1,17 @@ +# gma_mediation_unity_example + +Learn how to integrate with your app that uses the [google_mobile_ads](https://pub.dev/packages/google_mobile_ads) plugin +by following the [development guide](https://developers.google.com/admob/flutter/mediation/unity). + +## Getting Started + +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) + +For help getting started with Flutter development, view the +[online documentation](https://docs.flutter.dev/), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/packages/mediation/gma_mediation_unity/example/analysis_options.yaml b/packages/mediation/gma_mediation_unity/example/analysis_options.yaml new file mode 100644 index 000000000..0d2902135 --- /dev/null +++ b/packages/mediation/gma_mediation_unity/example/analysis_options.yaml @@ -0,0 +1,28 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at https://dart.dev/lints. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/packages/mediation/gma_mediation_unity/example/android/.gitignore b/packages/mediation/gma_mediation_unity/example/android/.gitignore new file mode 100644 index 000000000..6f568019d --- /dev/null +++ b/packages/mediation/gma_mediation_unity/example/android/.gitignore @@ -0,0 +1,13 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +key.properties +**/*.keystore +**/*.jks diff --git a/packages/mediation/gma_mediation_unity/example/android/app/build.gradle b/packages/mediation/gma_mediation_unity/example/android/app/build.gradle new file mode 100644 index 000000000..994f31fd9 --- /dev/null +++ b/packages/mediation/gma_mediation_unity/example/android/app/build.gradle @@ -0,0 +1,67 @@ +plugins { + id "com.android.application" + id "kotlin-android" + id "dev.flutter.flutter-gradle-plugin" +} + +def localProperties = new Properties() +def localPropertiesFile = rootProject.file('local.properties') +if (localPropertiesFile.exists()) { + localPropertiesFile.withReader('UTF-8') { reader -> + localProperties.load(reader) + } +} + +def flutterVersionCode = localProperties.getProperty('flutter.versionCode') +if (flutterVersionCode == null) { + flutterVersionCode = '1' +} + +def flutterVersionName = localProperties.getProperty('flutter.versionName') +if (flutterVersionName == null) { + flutterVersionName = '1.0' +} + +android { + namespace "io.flutter.plugins.googlemobileads.mediation.gma_mediation_unity_example" + compileSdkVersion flutter.compileSdkVersion + ndkVersion flutter.ndkVersion + + compileOptions { + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId "io.flutter.plugins.googlemobileads.mediation.gma_mediation_unity_example" + // You can update the following values to match your application needs. + // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. + minSdkVersion 23 + targetSdkVersion flutter.targetSdkVersion + versionCode flutterVersionCode.toInteger() + versionName flutterVersionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig signingConfigs.debug + } + } +} + +flutter { + source '../..' +} + +dependencies {} diff --git a/packages/mediation/gma_mediation_unity/example/android/app/src/debug/AndroidManifest.xml b/packages/mediation/gma_mediation_unity/example/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 000000000..399f6981d --- /dev/null +++ b/packages/mediation/gma_mediation_unity/example/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/packages/mediation/gma_mediation_unity/example/android/app/src/main/AndroidManifest.xml b/packages/mediation/gma_mediation_unity/example/android/app/src/main/AndroidManifest.xml new file mode 100644 index 000000000..2f4998325 --- /dev/null +++ b/packages/mediation/gma_mediation_unity/example/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + diff --git a/samples/admob/adaptive_banner_example/android/app/src/main/kotlin/com/example/banner_example/MainActivity.kt b/packages/mediation/gma_mediation_unity/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_unity_example/MainActivity.kt similarity index 54% rename from samples/admob/adaptive_banner_example/android/app/src/main/kotlin/com/example/banner_example/MainActivity.kt rename to packages/mediation/gma_mediation_unity/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_unity_example/MainActivity.kt index 9125953d1..e9b4af123 100644 --- a/samples/admob/adaptive_banner_example/android/app/src/main/kotlin/com/example/banner_example/MainActivity.kt +++ b/packages/mediation/gma_mediation_unity/example/android/app/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_unity_example/MainActivity.kt @@ -1,4 +1,4 @@ -package com.example.adaptive_banner_example +package io.flutter.plugins.googlemobileads.mediation.gma_mediation_unity_example import io.flutter.embedding.android.FlutterActivity diff --git a/packages/mediation/gma_mediation_unity/example/android/app/src/main/res/drawable-v21/launch_background.xml b/packages/mediation/gma_mediation_unity/example/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 000000000..f74085f3f --- /dev/null +++ b/packages/mediation/gma_mediation_unity/example/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/mediation/gma_mediation_unity/example/android/app/src/main/res/drawable/launch_background.xml b/packages/mediation/gma_mediation_unity/example/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 000000000..304732f88 --- /dev/null +++ b/packages/mediation/gma_mediation_unity/example/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/mediation/gma_mediation_unity/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/mediation/gma_mediation_unity/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..db77bb4b7 Binary files /dev/null and b/packages/mediation/gma_mediation_unity/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_unity/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/mediation/gma_mediation_unity/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..17987b79b Binary files /dev/null and b/packages/mediation/gma_mediation_unity/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_unity/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/mediation/gma_mediation_unity/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..09d439148 Binary files /dev/null and b/packages/mediation/gma_mediation_unity/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_unity/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/mediation/gma_mediation_unity/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..d5f1c8d34 Binary files /dev/null and b/packages/mediation/gma_mediation_unity/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_unity/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/packages/mediation/gma_mediation_unity/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..4d6372eeb Binary files /dev/null and b/packages/mediation/gma_mediation_unity/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/packages/mediation/gma_mediation_unity/example/android/app/src/main/res/values-night/styles.xml b/packages/mediation/gma_mediation_unity/example/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 000000000..06952be74 --- /dev/null +++ b/packages/mediation/gma_mediation_unity/example/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/packages/mediation/gma_mediation_unity/example/android/app/src/main/res/values/styles.xml b/packages/mediation/gma_mediation_unity/example/android/app/src/main/res/values/styles.xml new file mode 100644 index 000000000..cb1ef8805 --- /dev/null +++ b/packages/mediation/gma_mediation_unity/example/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/packages/mediation/gma_mediation_unity/example/android/app/src/profile/AndroidManifest.xml b/packages/mediation/gma_mediation_unity/example/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 000000000..399f6981d --- /dev/null +++ b/packages/mediation/gma_mediation_unity/example/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/packages/mediation/gma_mediation_unity/example/android/build.gradle b/packages/mediation/gma_mediation_unity/example/android/build.gradle new file mode 100644 index 000000000..7bdfd2321 --- /dev/null +++ b/packages/mediation/gma_mediation_unity/example/android/build.gradle @@ -0,0 +1,30 @@ +buildscript { + ext.kotlin_version = '2.2.21' + repositories { + google() + mavenCentral() + } + + dependencies { + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + +allprojects { + repositories { + google() + mavenCentral() + } +} + +rootProject.buildDir = '../build' +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(':app') +} + +tasks.register("clean", Delete) { + delete rootProject.buildDir +} diff --git a/packages/mediation/gma_mediation_unity/example/android/gradle.properties b/packages/mediation/gma_mediation_unity/example/android/gradle.properties new file mode 100644 index 000000000..598d13fee --- /dev/null +++ b/packages/mediation/gma_mediation_unity/example/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx4G +android.useAndroidX=true +android.enableJetifier=true diff --git a/packages/mediation/gma_mediation_unity/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/mediation/gma_mediation_unity/example/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 000000000..f004c34c0 --- /dev/null +++ b/packages/mediation/gma_mediation_unity/example/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip diff --git a/packages/mediation/gma_mediation_unity/example/android/settings.gradle b/packages/mediation/gma_mediation_unity/example/android/settings.gradle new file mode 100644 index 000000000..ca273881f --- /dev/null +++ b/packages/mediation/gma_mediation_unity/example/android/settings.gradle @@ -0,0 +1,30 @@ +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + } + settings.ext.flutterSdkPath = flutterSdkPath() + + includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") + + repositories { + google() + mavenCentral() + gradlePluginPortal() + } + + plugins { + id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false + } +} + +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "8.13.1" apply false + id 'org.jetbrains.kotlin.android' version '2.2.21' apply false +} + +include ":app" diff --git a/packages/mediation/gma_mediation_unity/example/ios/.gitignore b/packages/mediation/gma_mediation_unity/example/ios/.gitignore new file mode 100644 index 000000000..7a7f9873a --- /dev/null +++ b/packages/mediation/gma_mediation_unity/example/ios/.gitignore @@ -0,0 +1,34 @@ +**/dgph +*.mode1v3 +*.mode2v3 +*.moved-aside +*.pbxuser +*.perspectivev3 +**/*sync/ +.sconsign.dblite +.tags* +**/.vagrant/ +**/DerivedData/ +Icon? +**/Pods/ +**/.symlinks/ +profile +xcuserdata +**/.generated/ +Flutter/App.framework +Flutter/Flutter.framework +Flutter/Flutter.podspec +Flutter/Generated.xcconfig +Flutter/ephemeral/ +Flutter/app.flx +Flutter/app.zip +Flutter/flutter_assets/ +Flutter/flutter_export_environment.sh +ServiceDefinitions.json +Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!default.mode1v3 +!default.mode2v3 +!default.pbxuser +!default.perspectivev3 diff --git a/packages/mediation/gma_mediation_unity/example/ios/Flutter/AppFrameworkInfo.plist b/packages/mediation/gma_mediation_unity/example/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 000000000..7c5696400 --- /dev/null +++ b/packages/mediation/gma_mediation_unity/example/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 12.0 + + diff --git a/packages/mediation/gma_mediation_unity/example/ios/Flutter/Debug.xcconfig b/packages/mediation/gma_mediation_unity/example/ios/Flutter/Debug.xcconfig new file mode 100644 index 000000000..ec97fc6f3 --- /dev/null +++ b/packages/mediation/gma_mediation_unity/example/ios/Flutter/Debug.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" +#include "Generated.xcconfig" diff --git a/packages/mediation/gma_mediation_unity/example/ios/Flutter/Release.xcconfig b/packages/mediation/gma_mediation_unity/example/ios/Flutter/Release.xcconfig new file mode 100644 index 000000000..c4855bfe2 --- /dev/null +++ b/packages/mediation/gma_mediation_unity/example/ios/Flutter/Release.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" +#include "Generated.xcconfig" diff --git a/packages/mediation/gma_mediation_unity/example/ios/Podfile b/packages/mediation/gma_mediation_unity/example/ios/Podfile new file mode 100644 index 000000000..b2d735017 --- /dev/null +++ b/packages/mediation/gma_mediation_unity/example/ios/Podfile @@ -0,0 +1,42 @@ +platform :ios, '13.0' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_ios_podfile_setup + +target 'Runner' do + use_modular_headers! + + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) + target 'RunnerTests' do + inherit! :search_paths + end +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_ios_build_settings(target) + end +end diff --git a/packages/mediation/gma_mediation_unity/example/ios/Runner.xcodeproj/project.pbxproj b/packages/mediation/gma_mediation_unity/example/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 000000000..3bfc1952a --- /dev/null +++ b/packages/mediation/gma_mediation_unity/example/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,690 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 331C808B294A63AB00263BE5 /* GmaMediationUnityPluginTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* GmaMediationUnityPluginTests.swift */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 97C146E61CF9000F007C117D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 97C146ED1CF9000F007C117D; + remoteInfo = Runner; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 331C807B294A618700263BE5 /* GmaMediationUnityPluginTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GmaMediationUnityPluginTests.swift; sourceTree = ""; }; + 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 44A3A7E52B87F52500EBF1AF /* libswiftWebKit.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libswiftWebKit.tbd; path = usr/lib/swift/libswiftWebKit.tbd; sourceTree = SDKROOT; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F342EFA471C28ECE455CCD43 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 331C8082294A63A400263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C807B294A618700263BE5 /* GmaMediationUnityPluginTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 44A3A7E42B87F52500EBF1AF /* Frameworks */ = { + isa = PBXGroup; + children = ( + 44A3A7E52B87F52500EBF1AF /* libswiftWebKit.tbd */, + ); + name = Frameworks; + sourceTree = ""; + }; + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + 331C8082294A63A400263BE5 /* RunnerTests */, + DFB3F99572FC6F1315730A4B /* Pods */, + 44A3A7E42B87F52500EBF1AF /* Frameworks */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + 331C8081294A63A400263BE5 /* RunnerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; + DFB3F99572FC6F1315730A4B /* Pods */ = { + isa = PBXGroup; + children = ( + ); + path = Pods; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C8080294A63A400263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 331C807D294A63A400263BE5 /* Sources */, + 331C807F294A63A400263BE5 /* Resources */, + F342EFA471C28ECE455CCD43 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 331C8086294A63A400263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1510; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 331C8080294A63A400263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 97C146ED1CF9000F007C117D; + }; + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + 331C8080294A63A400263BE5 /* RunnerTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 331C807F294A63A400263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 331C807D294A63A400263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C808B294A63AB00263BE5 /* GmaMediationUnityPluginTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 331C8086294A63A400263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 97C146ED1CF9000F007C117D /* Runner */; + targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = ""; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + /usr/lib/swift, + ); + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)", + "$(SDKROOT)/usr/lib/swift", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationUnityExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 331C8088294A63A400263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "$(LD_RUNPATH_SEARCH_PATHS_SHALLOW_BUNDLE_$(SHALLOW_BUNDLE))", + /usr/lib/swift, + ); + LIBRARY_SEARCH_PATHS = ( + "$(SDKROOT)/usr/lib/swift", + "$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)", + ); + MACH_O_TYPE = mh_bundle; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationUnityExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Debug; + }; + 331C8089294A63A400263BE5 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "$(LD_RUNPATH_SEARCH_PATHS_SHALLOW_BUNDLE_$(SHALLOW_BUNDLE))", + /usr/lib/swift, + ); + LIBRARY_SEARCH_PATHS = ( + "$(SDKROOT)/usr/lib/swift", + "$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)", + ); + MACH_O_TYPE = mh_bundle; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationUnityExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Release; + }; + 331C808A294A63A400263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "$(LD_RUNPATH_SEARCH_PATHS_SHALLOW_BUNDLE_$(SHALLOW_BUNDLE))", + /usr/lib/swift, + ); + LIBRARY_SEARCH_PATHS = ( + "$(SDKROOT)/usr/lib/swift", + "$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)", + ); + MACH_O_TYPE = mh_bundle; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationUnityExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = ""; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + /usr/lib/swift, + ); + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)", + "$(SDKROOT)/usr/lib/swift", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationUnityExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = ""; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + /usr/lib/swift, + ); + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)", + "$(SDKROOT)/usr/lib/swift", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.flutter.plugins.googlemobileads.mediation.gmaMediationUnityExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C8088294A63A400263BE5 /* Debug */, + 331C8089294A63A400263BE5 /* Release */, + 331C808A294A63A400263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/packages/mediation/gma_mediation_unity/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/mediation/gma_mediation_unity/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..919434a62 --- /dev/null +++ b/packages/mediation/gma_mediation_unity/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/packages/mediation/gma_mediation_unity/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/packages/mediation/gma_mediation_unity/example/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..21a3cc14c --- /dev/null +++ b/packages/mediation/gma_mediation_unity/example/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/packages/mediation/gma_mediation_unity/example/ios/Runner/AppDelegate.swift b/packages/mediation/gma_mediation_unity/example/ios/Runner/AppDelegate.swift new file mode 100644 index 000000000..70693e4a8 --- /dev/null +++ b/packages/mediation/gma_mediation_unity/example/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import UIKit +import Flutter + +@UIApplicationMain +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..d36b1fab2 --- /dev/null +++ b/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 000000000..dc9ada472 Binary files /dev/null and b/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 000000000..7353c41ec Binary files /dev/null and b/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 000000000..797d452e4 Binary files /dev/null and b/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 000000000..6ed2d933e Binary files /dev/null and b/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 000000000..4cd7b0099 Binary files /dev/null and b/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 000000000..fe730945a Binary files /dev/null and b/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 000000000..321773cd8 Binary files /dev/null and b/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 000000000..797d452e4 Binary files /dev/null and b/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 000000000..502f463a9 Binary files /dev/null and b/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 000000000..0ec303439 Binary files /dev/null and b/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 000000000..0ec303439 Binary files /dev/null and b/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 000000000..e9f5fea27 Binary files /dev/null and b/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 000000000..84ac32ae7 Binary files /dev/null and b/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 000000000..8953cba09 Binary files /dev/null and b/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 000000000..0467bf12a Binary files /dev/null and b/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 000000000..0bedcf2fd --- /dev/null +++ b/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchImage.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 000000000..89c2725b7 --- /dev/null +++ b/packages/mediation/gma_mediation_unity/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/packages/mediation/gma_mediation_unity/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/packages/mediation/gma_mediation_unity/example/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 000000000..f2e259c7c --- /dev/null +++ b/packages/mediation/gma_mediation_unity/example/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_unity/example/ios/Runner/Base.lproj/Main.storyboard b/packages/mediation/gma_mediation_unity/example/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 000000000..f3c28516f --- /dev/null +++ b/packages/mediation/gma_mediation_unity/example/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/mediation/gma_mediation_unity/example/ios/Runner/Info.plist b/packages/mediation/gma_mediation_unity/example/ios/Runner/Info.plist new file mode 100644 index 000000000..cb37746c0 --- /dev/null +++ b/packages/mediation/gma_mediation_unity/example/ios/Runner/Info.plist @@ -0,0 +1,58 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Gma Mediation Unity + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + gma_mediation_unity_example + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + CADisableMinimumFrameDurationOnPhone + + UIApplicationSupportsIndirectInputEvents + + GADApplicationIdentifier + ca-app-pub-3940256099942544~1458002511 + SKAdNetworkItems + + + SKAdNetworkIdentifier + cstr6suwn9.skadnetwork + + + + diff --git a/packages/mediation/gma_mediation_unity/example/ios/Runner/Runner-Bridging-Header.h b/packages/mediation/gma_mediation_unity/example/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 000000000..308a2a560 --- /dev/null +++ b/packages/mediation/gma_mediation_unity/example/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/packages/mediation/gma_mediation_unity/example/ios/RunnerTests/GmaMediationUnityPluginTests.swift b/packages/mediation/gma_mediation_unity/example/ios/RunnerTests/GmaMediationUnityPluginTests.swift new file mode 100644 index 000000000..6d8599fbf --- /dev/null +++ b/packages/mediation/gma_mediation_unity/example/ios/RunnerTests/GmaMediationUnityPluginTests.swift @@ -0,0 +1,59 @@ +// 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 +// +// https://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 UIKit +import XCTest + +@testable import gma_mediation_unity + +class GmaMediationUnityPluginTests: XCTestCase { + + func testSetGDPRConsent() { + let metadata = UnityMetaDataFake() + + GmaMediationUnityPlugin(unityMetaData:metadata).setGDPRConsent(gdprConsent: true) + + XCTAssertEqual(metadata.setPair?.0, "gdpr.consent") + XCTAssertEqual(metadata.setPair?.1 as! Bool, true) + XCTAssertEqual(metadata.commitCalls, 1) + } + + func testSetCCPAConsent() { + let metadata = UnityMetaDataFake() + + GmaMediationUnityPlugin(unityMetaData:metadata).setCCPAConsent(ccpaConsent: true) + + XCTAssertEqual(metadata.setPair?.0, "privacy.consent") + XCTAssertEqual(metadata.setPair?.1 as! Bool, true) + XCTAssertEqual(metadata.commitCalls, 1) + } +} + +class UnityMetaDataFake: UnityMetaDataProtocol { + var setPair: (String, Any)? + var commitCalls: Int + + init() { + setPair = nil + commitCalls = 0 + } + + func set(key: String, value: Any) { + setPair = (key, value) + } + + func commit() { + commitCalls += 1 + } +} diff --git a/packages/mediation/gma_mediation_unity/example/lib/main.dart b/packages/mediation/gma_mediation_unity/example/lib/main.dart new file mode 100644 index 000000000..665bfe31b --- /dev/null +++ b/packages/mediation/gma_mediation_unity/example/lib/main.dart @@ -0,0 +1,33 @@ +import 'package:flutter/material.dart'; + +void main() { + runApp(const MyApp()); +} + +class MyApp extends StatefulWidget { + const MyApp({super.key}); + + @override + State createState() => _MyAppState(); +} + +class _MyAppState extends State { + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Scaffold( + appBar: AppBar( + title: const Text('Plugin example app'), + ), + body: const Center( + child: Text('Test app'), + ), + ), + ); + } +} diff --git a/packages/mediation/gma_mediation_unity/example/pubspec.yaml b/packages/mediation/gma_mediation_unity/example/pubspec.yaml new file mode 100644 index 000000000..46b1141d5 --- /dev/null +++ b/packages/mediation/gma_mediation_unity/example/pubspec.yaml @@ -0,0 +1,28 @@ +name: gma_mediation_unity_example +description: "Demonstrates how to use the gma_mediation_unity plugin." +# The following line prevents the package from being accidentally published to +# pub.dev using `flutter pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +environment: + sdk: '>=3.9.0 <4.0.0' + +dependencies: + flutter: + sdk: flutter + + google_mobile_ads: ^7.0.0 + gma_mediation_unity: + path: ../ + + cupertino_icons: ^1.0.2 + +dev_dependencies: + integration_test: + sdk: flutter + flutter_test: + sdk: flutter + flutter_lints: ^6.0.0 + +flutter: + uses-material-design: true \ No newline at end of file diff --git a/packages/mediation/gma_mediation_unity/example/test/widget_test.dart b/packages/mediation/gma_mediation_unity/example/test/widget_test.dart new file mode 100644 index 000000000..eece8be95 --- /dev/null +++ b/packages/mediation/gma_mediation_unity/example/test/widget_test.dart @@ -0,0 +1,27 @@ +// This is a basic Flutter widget test. +// +// To perform an interaction with a widget in your test, use the WidgetTester +// utility in the flutter_test package. For example, you can send tap and scroll +// gestures. You can also use WidgetTester to find child widgets in the widget +// tree, read text, and verify that the values of widget properties are correct. + +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; + +import 'package:gma_mediation_unity_example/main.dart'; + +void main() { + testWidgets('Verify Platform version', (WidgetTester tester) async { + // Build our app and trigger a frame. + await tester.pumpWidget(const MyApp()); + + // Verify that platform version is retrieved. + expect( + find.byWidgetPredicate( + (Widget widget) => + widget is Text && widget.data!.startsWith('Running on:'), + ), + findsOneWidget, + ); + }); +} diff --git a/packages/mediation/gma_mediation_unity/ios/.gitignore b/packages/mediation/gma_mediation_unity/ios/.gitignore new file mode 100644 index 000000000..0c885071e --- /dev/null +++ b/packages/mediation/gma_mediation_unity/ios/.gitignore @@ -0,0 +1,38 @@ +.idea/ +.vagrant/ +.sconsign.dblite +.svn/ + +.DS_Store +*.swp +profile + +DerivedData/ +build/ +GeneratedPluginRegistrant.h +GeneratedPluginRegistrant.m + +.generated/ + +*.pbxuser +*.mode1v3 +*.mode2v3 +*.perspectivev3 + +!default.pbxuser +!default.mode1v3 +!default.mode2v3 +!default.perspectivev3 + +xcuserdata + +*.moved-aside + +*.pyc +*sync/ +Icon? +.tags* + +/Flutter/Generated.xcconfig +/Flutter/ephemeral/ +/Flutter/flutter_export_environment.sh \ No newline at end of file diff --git a/packages/mediation/gma_mediation_unity/ios/Assets/.gitkeep b/packages/mediation/gma_mediation_unity/ios/Assets/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/packages/mediation/gma_mediation_unity/ios/Classes/GmaMediationUnityPlugin.swift b/packages/mediation/gma_mediation_unity/ios/Classes/GmaMediationUnityPlugin.swift new file mode 100644 index 000000000..e1c79646f --- /dev/null +++ b/packages/mediation/gma_mediation_unity/ios/Classes/GmaMediationUnityPlugin.swift @@ -0,0 +1,64 @@ +// 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 +// +// https://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 Flutter +import UIKit +import UnityAds + +/// Manages UnityPrivacyApi and implements the needed methods. +public class GmaMediationUnityPlugin: NSObject, FlutterPlugin, UnityPrivacyApi { + let uadsMedatada: UnityMetaDataProtocol + + init (unityMetaData: UnityMetaDataProtocol) { + self.uadsMedatada = unityMetaData + } + + public static func register(with registrar: FlutterPluginRegistrar) { + let messenger : FlutterBinaryMessenger = registrar.messenger() + let api : UnityPrivacyApi & NSObjectProtocol = GmaMediationUnityPlugin.init(unityMetaData: UnityMetaDataImpl()) + UnityPrivacyApiSetup.setUp(binaryMessenger: messenger, api: api) + } + public func detachFromEngine(for registrar: FlutterPluginRegistrar) { + let messenger : FlutterBinaryMessenger = registrar.messenger() + UnityPrivacyApiSetup.setUp(binaryMessenger: messenger, api: nil) + } + func setGDPRConsent(gdprConsent: Bool) { + uadsMedatada.set(key: "gdpr.consent", value: gdprConsent) + uadsMedatada.commit() + print("GDPR Test") + } + func setCCPAConsent(ccpaConsent: Bool) { + uadsMedatada.set(key: "privacy.consent", value: ccpaConsent) + uadsMedatada.commit() + } +} + +protocol UnityMetaDataProtocol { + func set(key: String, value: Any) + + func commit() +} + +class UnityMetaDataImpl : UnityMetaDataProtocol { + let instance: UADSMetaData + init() { + self.instance = UADSMetaData() + } + func set(key: String, value: Any) { + instance.set(key, value: value) + } + func commit() { + instance.commit() + } +} diff --git a/packages/mediation/gma_mediation_unity/ios/Classes/UnityPrivacyApi.g.swift b/packages/mediation/gma_mediation_unity/ios/Classes/UnityPrivacyApi.g.swift new file mode 100644 index 000000000..ebce44e88 --- /dev/null +++ b/packages/mediation/gma_mediation_unity/ios/Classes/UnityPrivacyApi.g.swift @@ -0,0 +1,90 @@ +// Autogenerated from Pigeon (v18.0.0), do not edit directly. +// See also: https://pub.dev/packages/pigeon + +import Foundation + +#if os(iOS) + import Flutter +#elseif os(macOS) + import FlutterMacOS +#else + #error("Unsupported platform.") +#endif + +private func wrapResult(_ result: Any?) -> [Any?] { + return [result] +} + +private func wrapError(_ error: Any) -> [Any?] { + if let flutterError = error as? FlutterError { + return [ + flutterError.code, + flutterError.message, + flutterError.details, + ] + } + return [ + "\(error)", + "\(type(of: error))", + "Stacktrace: \(Thread.callStackSymbols)", + ] +} + +private func isNullish(_ value: Any?) -> Bool { + return value is NSNull || value == nil +} + +private func nilOrValue(_ value: Any?) -> T? { + if value is NSNull { return nil } + return value as! T? +} +/// The generated classes set the channels to call the methods in the corresponding kotlin UnityPrivacyApi interface and swift UnityPrivacyApi protocol from the dart layer. +/// +/// Generated protocol from Pigeon that represents a handler of messages from Flutter. +protocol UnityPrivacyApi { + /// Used to configure GDPR consent on the Android or iOS Unity SDK + func setGDPRConsent(gdprConsent: Bool) throws + /// Used to configure CCPA consent on the Android or iOS Unity SDK + func setCCPAConsent(ccpaConsent: Bool) throws +} + +/// Generated setup class from Pigeon to handle messages through the `binaryMessenger`. +class UnityPrivacyApiSetup { + /// The codec used by UnityPrivacyApi. + /// Sets up an instance of `UnityPrivacyApi` to handle messages through the `binaryMessenger`. + static func setUp(binaryMessenger: FlutterBinaryMessenger, api: UnityPrivacyApi?, messageChannelSuffix: String = "") { + let channelSuffix = messageChannelSuffix.count > 0 ? ".\(messageChannelSuffix)" : "" + /// Used to configure GDPR consent on the Android or iOS Unity SDK + let setGDPRConsentChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.gma_mediation_unity.UnityPrivacyApi.setGDPRConsent\(channelSuffix)", binaryMessenger: binaryMessenger) + if let api = api { + setGDPRConsentChannel.setMessageHandler { message, reply in + let args = message as! [Any?] + let gdprConsentArg = args[0] as! Bool + do { + try api.setGDPRConsent(gdprConsent: gdprConsentArg) + reply(wrapResult(nil)) + } catch { + reply(wrapError(error)) + } + } + } else { + setGDPRConsentChannel.setMessageHandler(nil) + } + /// Used to configure CCPA consent on the Android or iOS Unity SDK + let setCCPAConsentChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.gma_mediation_unity.UnityPrivacyApi.setCCPAConsent\(channelSuffix)", binaryMessenger: binaryMessenger) + if let api = api { + setCCPAConsentChannel.setMessageHandler { message, reply in + let args = message as! [Any?] + let ccpaConsentArg = args[0] as! Bool + do { + try api.setCCPAConsent(ccpaConsent: ccpaConsentArg) + reply(wrapResult(nil)) + } catch { + reply(wrapError(error)) + } + } + } else { + setCCPAConsentChannel.setMessageHandler(nil) + } + } +} diff --git a/packages/mediation/gma_mediation_unity/ios/gma_mediation_unity.podspec b/packages/mediation/gma_mediation_unity/ios/gma_mediation_unity.podspec new file mode 100644 index 000000000..9390a2750 --- /dev/null +++ b/packages/mediation/gma_mediation_unity/ios/gma_mediation_unity.podspec @@ -0,0 +1,27 @@ +# +# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. +# Run `pod lib lint gma_mediation_unity.podspec` to validate before publishing. +# +Pod::Spec.new do |s| + s.name = 'gma_mediation_unity' + s.version = '1.6.4' + s.summary = 'Google Mobile Ads Mediation of Unity Ads.' + s.description = <<-DESC +Mediation Adapter for Unity Ads to use with Google Mobile Ads. + DESC + s.homepage = 'https://developers.google.com/admob/flutter/mediation/unity' + s.license = { :file => '../LICENSE' } + s.author = { 'Google LLC' => 'mediation-support@google.com' } + s.source = { :path => '.' } + s.source_files = 'Classes/**/*' + s.public_header_files = 'Classes/**/*.h' + s.dependency 'Flutter' + s.dependency 'GoogleMobileAdsMediationUnity', '~>4.16.5.0' + s.platform = :ios, '13.0' + s.static_framework = true + + # Flutter.framework does not contain a i386 slice. + s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' } + s.swift_version = '5.0' + +end diff --git a/packages/mediation/gma_mediation_unity/lib/gma_mediation_unity.dart b/packages/mediation/gma_mediation_unity/lib/gma_mediation_unity.dart new file mode 100644 index 000000000..dff883419 --- /dev/null +++ b/packages/mediation/gma_mediation_unity/lib/gma_mediation_unity.dart @@ -0,0 +1,26 @@ +// 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 +// +// https://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 'package:gma_mediation_unity/unity_privacy_api.g.dart'; + +/// This class has entrypoint to call Unity's SDK APIs. +class GmaMediationUnity { + Future setGDPRConsent(bool gdprConsent) async { + UnityPrivacyApi().setGDPRConsent(gdprConsent); + } + + Future setCCPAConsent(bool ccpaConsent) async { + UnityPrivacyApi().setCCPAConsent(ccpaConsent); + } +} diff --git a/packages/mediation/gma_mediation_unity/lib/unity_privacy_api.g.dart b/packages/mediation/gma_mediation_unity/lib/unity_privacy_api.g.dart new file mode 100644 index 000000000..776272d66 --- /dev/null +++ b/packages/mediation/gma_mediation_unity/lib/unity_privacy_api.g.dart @@ -0,0 +1,84 @@ +// Autogenerated from Pigeon (v18.0.0), do not edit directly. +// See also: https://pub.dev/packages/pigeon +// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers + +import 'dart:async'; +import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; + +import 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer; +import 'package:flutter/services.dart'; + +PlatformException _createConnectionError(String channelName) { + return PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel: "$channelName".', + ); +} + +/// The generated classes set the channels to call the methods in the corresponding kotlin UnityPrivacyApi interface and swift UnityPrivacyApi protocol from the dart layer. +class UnityPrivacyApi { + /// Constructor for [UnityPrivacyApi]. The [binaryMessenger] named argument is + /// available for dependency injection. If it is left null, the default + /// BinaryMessenger will be used which routes to the host platform. + UnityPrivacyApi( + {BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) + : __pigeon_binaryMessenger = binaryMessenger, + __pigeon_messageChannelSuffix = + messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + final BinaryMessenger? __pigeon_binaryMessenger; + + static const MessageCodec pigeonChannelCodec = + StandardMessageCodec(); + + final String __pigeon_messageChannelSuffix; + + /// Used to configure GDPR consent on the Android or iOS Unity SDK + Future setGDPRConsent(bool gdprConsent) async { + final String __pigeon_channelName = + 'dev.flutter.pigeon.gma_mediation_unity.UnityPrivacyApi.setGDPRConsent$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( + __pigeon_channelName, + pigeonChannelCodec, + binaryMessenger: __pigeon_binaryMessenger, + ); + final List? __pigeon_replyList = + await __pigeon_channel.send([gdprConsent]) as List?; + if (__pigeon_replyList == null) { + throw _createConnectionError(__pigeon_channelName); + } else if (__pigeon_replyList.length > 1) { + throw PlatformException( + code: __pigeon_replyList[0]! as String, + message: __pigeon_replyList[1] as String?, + details: __pigeon_replyList[2], + ); + } else { + return; + } + } + + /// Used to configure CCPA consent on the Android or iOS Unity SDK + Future setCCPAConsent(bool ccpaConsent) async { + final String __pigeon_channelName = + 'dev.flutter.pigeon.gma_mediation_unity.UnityPrivacyApi.setCCPAConsent$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( + __pigeon_channelName, + pigeonChannelCodec, + binaryMessenger: __pigeon_binaryMessenger, + ); + final List? __pigeon_replyList = + await __pigeon_channel.send([ccpaConsent]) as List?; + if (__pigeon_replyList == null) { + throw _createConnectionError(__pigeon_channelName); + } else if (__pigeon_replyList.length > 1) { + throw PlatformException( + code: __pigeon_replyList[0]! as String, + message: __pigeon_replyList[1] as String?, + details: __pigeon_replyList[2], + ); + } else { + return; + } + } +} diff --git a/packages/mediation/gma_mediation_unity/pigeons/unity_privacy_api.dart b/packages/mediation/gma_mediation_unity/pigeons/unity_privacy_api.dart new file mode 100644 index 000000000..8bfa84978 --- /dev/null +++ b/packages/mediation/gma_mediation_unity/pigeons/unity_privacy_api.dart @@ -0,0 +1,41 @@ +// 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 +// +// https://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 'package:pigeon/pigeon.dart'; + +@ConfigurePigeon( + PigeonOptions( + dartOut: 'lib/unity_privacy_api.g.dart', + dartOptions: DartOptions(), + kotlinOut: + 'android/src/main/kotlin/io/flutter/plugins/googlemobileads/mediation/gma_mediation_unity/UnityPrivacyApi.g.kt', + kotlinOptions: KotlinOptions( + package: + "io.flutter.plugins.googlemobileads.mediation.gma_mediation_unity", + ), + swiftOut: 'ios/Classes/UnityPrivacyApi.g.swift', + swiftOptions: SwiftOptions(), + dartPackageName: 'gma_mediation_unity', + ), +) +@HostApi() + +/// The generated classes set the channels to call the methods in the corresponding kotlin UnityPrivacyApi interface and swift UnityPrivacyApi protocol from the dart layer. +abstract class UnityPrivacyApi { + /// Used to configure GDPR consent on the Android or iOS Unity SDK + void setGDPRConsent(bool gdprConsent); + + /// Used to configure CCPA consent on the Android or iOS Unity SDK + void setCCPAConsent(bool ccpaConsent); +} diff --git a/packages/mediation/gma_mediation_unity/pubspec.yaml b/packages/mediation/gma_mediation_unity/pubspec.yaml new file mode 100644 index 000000000..fbd84bda9 --- /dev/null +++ b/packages/mediation/gma_mediation_unity/pubspec.yaml @@ -0,0 +1,30 @@ +name: gma_mediation_unity +description: "Mediation Adapter that enables sending ad requests to the Unity ad network using the google_mobile_ads plugin." +version: 1.6.4 +repository: https://github.com/googleads/googleads-mobile-flutter/tree/main/packages/mediation/gma_mediation_unity + +environment: + sdk: '>=3.9.0 <4.0.0' + flutter: '>=3.27.0' + +dependencies: + flutter: + sdk: flutter + google_mobile_ads: ^7.0.0 + plugin_platform_interface: ^2.0.2 + +dev_dependencies: + flutter_lints: ^6.0.0 + flutter_test: + sdk: flutter + lint: ^2.3.0 + pigeon: ^18.0.0 + +flutter: + plugin: + platforms: + android: + package: io.flutter.plugins.googlemobileads.mediation.gma_mediation_unity + pluginClass: GmaMediationUnityPlugin + ios: + pluginClass: GmaMediationUnityPlugin diff --git a/samples/admob/adaptive_banner_example/.metadata b/samples/admob/adaptive_banner_example/.metadata deleted file mode 100644 index 3c0cd78dd..000000000 --- a/samples/admob/adaptive_banner_example/.metadata +++ /dev/null @@ -1,45 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled. - -version: - revision: eb6d86ee27deecba4a83536aa20f366a6044895c - channel: stable - -project_type: app - -# Tracks metadata for the flutter migrate command -migration: - platforms: - - platform: root - create_revision: eb6d86ee27deecba4a83536aa20f366a6044895c - base_revision: eb6d86ee27deecba4a83536aa20f366a6044895c - - platform: android - create_revision: eb6d86ee27deecba4a83536aa20f366a6044895c - base_revision: eb6d86ee27deecba4a83536aa20f366a6044895c - - platform: ios - create_revision: eb6d86ee27deecba4a83536aa20f366a6044895c - base_revision: eb6d86ee27deecba4a83536aa20f366a6044895c - - platform: linux - create_revision: eb6d86ee27deecba4a83536aa20f366a6044895c - base_revision: eb6d86ee27deecba4a83536aa20f366a6044895c - - platform: macos - create_revision: eb6d86ee27deecba4a83536aa20f366a6044895c - base_revision: eb6d86ee27deecba4a83536aa20f366a6044895c - - platform: web - create_revision: eb6d86ee27deecba4a83536aa20f366a6044895c - base_revision: eb6d86ee27deecba4a83536aa20f366a6044895c - - platform: windows - create_revision: eb6d86ee27deecba4a83536aa20f366a6044895c - base_revision: eb6d86ee27deecba4a83536aa20f366a6044895c - - # User provided section - - # List of Local paths (relative to this file) that should be - # ignored by the migrate tool. - # - # Files that are not part of the templates will be ignored by default. - unmanaged_files: - - 'lib/main.dart' - - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/samples/admob/adaptive_banner_example/README.md b/samples/admob/adaptive_banner_example/README.md deleted file mode 100644 index 91c27d589..000000000 --- a/samples/admob/adaptive_banner_example/README.md +++ /dev/null @@ -1,74 +0,0 @@ -# adaptive_banner_example - -An example project that demonstrates loading and showing adaptive banner ads. - -## Always test with test ads - -When building and testing your apps, make sure you use test ads rather than -live, production ads. Failure to do so can lead to suspension of your account. - -## Implementation - -The main steps to integrate banner ads are: - -1. Determine the ad width -2. Load an ad -3. Display an ad - -### Determine the ad width -If you use a hardcoded width, you're done. To use our preferred [Adaptive Banner](https://developers.google.com/admob/flutter/banner/anchored-adaptive) format, the sample shows how to get the size of the window containing your app to determine the ad width. - -``` -final size = await AdSize. - getCurrentOrientationAnchoredAdaptiveBannerAdSize( - MediaQuery.of(context).size.width.truncate()); -``` - - -### Load an ad -The sample shows how to load an adaptive banner ad. - -``` -BannerAd( - adUnitId: _adUnitId, - request: const AdRequest(), - size: size, - listener: BannerAdListener( - // Called when an ad is successfully received. - onAdLoaded: (ad) { - setState(() { - _bannerAd = ad as BannerAd; - _isLoaded = true; - }); - }, - ... - ), - ).load(); - ``` - - ### Display an ad - The sample shows how to display a banner ad. - - ``` -Widget build(BuildContext context) { - return MaterialApp( - ... - body: Stack( - children: [ - if (_bannerAd != null && _isLoaded) - Align( - alignment: Alignment.bottomCenter, - child: SafeArea( - child: SizedBox( - width: _bannerAd!.size.width.toDouble(), - height: _bannerAd!.size.height.toDouble(), - child: AdWidget(ad: _bannerAd!), - ), - ), - ) - ], - ) - ), - ); -} - ``` diff --git a/samples/admob/adaptive_banner_example/android/settings.gradle b/samples/admob/adaptive_banner_example/android/settings.gradle deleted file mode 100644 index 44e62bcf0..000000000 --- a/samples/admob/adaptive_banner_example/android/settings.gradle +++ /dev/null @@ -1,11 +0,0 @@ -include ':app' - -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() - -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } - -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/samples/admob/adaptive_banner_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/samples/admob/adaptive_banner_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 28c6bf030..000000000 Binary files a/samples/admob/adaptive_banner_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/samples/admob/adaptive_banner_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/samples/admob/adaptive_banner_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/samples/admob/adaptive_banner_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/samples/admob/adaptive_banner_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/samples/admob/adaptive_banner_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index f091b6b0b..000000000 Binary files a/samples/admob/adaptive_banner_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/samples/admob/adaptive_banner_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/samples/admob/adaptive_banner_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index 4cde12118..000000000 Binary files a/samples/admob/adaptive_banner_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/samples/admob/adaptive_banner_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/samples/admob/adaptive_banner_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index d0ef06e7e..000000000 Binary files a/samples/admob/adaptive_banner_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/samples/admob/adaptive_banner_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/samples/admob/adaptive_banner_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index dcdc2306c..000000000 Binary files a/samples/admob/adaptive_banner_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/samples/admob/adaptive_banner_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/samples/admob/adaptive_banner_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/samples/admob/adaptive_banner_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/samples/admob/adaptive_banner_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/samples/admob/adaptive_banner_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index c8f9ed8f5..000000000 Binary files a/samples/admob/adaptive_banner_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/samples/admob/adaptive_banner_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/samples/admob/adaptive_banner_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/samples/admob/adaptive_banner_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/samples/admob/adaptive_banner_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/samples/admob/adaptive_banner_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/samples/admob/adaptive_banner_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/samples/admob/adaptive_banner_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/samples/admob/adaptive_banner_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index 75b2d164a..000000000 Binary files a/samples/admob/adaptive_banner_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/samples/admob/adaptive_banner_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/samples/admob/adaptive_banner_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index c4df70d39..000000000 Binary files a/samples/admob/adaptive_banner_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/samples/admob/adaptive_banner_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/samples/admob/adaptive_banner_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 6a84f41e1..000000000 Binary files a/samples/admob/adaptive_banner_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/samples/admob/adaptive_banner_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/samples/admob/adaptive_banner_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index d0e1f5853..000000000 Binary files a/samples/admob/adaptive_banner_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/samples/admob/adaptive_banner_example/ios/Runner/Info.plist b/samples/admob/adaptive_banner_example/ios/Runner/Info.plist deleted file mode 100644 index 451b87aa5..000000000 --- a/samples/admob/adaptive_banner_example/ios/Runner/Info.plist +++ /dev/null @@ -1,256 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleDisplayName - Adaptive Banner Example - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - adaptive_banner_example - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - CADisableMinimumFrameDurationOnPhone - - UIApplicationSupportsIndirectInputEvents - - GADApplicationIdentifier - ca-app-pub-3940256099942544~3347511713 - SKAdNetworkItems - - - SKAdNetworkIdentifier - cstr6suwn9.skadnetwork - - - SKAdNetworkIdentifier - 4fzdc2evr5.skadnetwork - - - SKAdNetworkIdentifier - 4pfyvq9l8r.skadnetwork - - - SKAdNetworkIdentifier - 2fnua5tdw4.skadnetwork - - - SKAdNetworkIdentifier - ydx93a7ass.skadnetwork - - - SKAdNetworkIdentifier - 5a6flpkh64.skadnetwork - - - SKAdNetworkIdentifier - p78axxw29g.skadnetwork - - - SKAdNetworkIdentifier - v72qych5uu.skadnetwork - - - SKAdNetworkIdentifier - ludvb6z3bs.skadnetwork - - - SKAdNetworkIdentifier - cp8zw746q7.skadnetwork - - - SKAdNetworkIdentifier - c6k4g5qg8m.skadnetwork - - - SKAdNetworkIdentifier - s39g8k73mm.skadnetwork - - - SKAdNetworkIdentifier - 3qy4746246.skadnetwork - - - SKAdNetworkIdentifier - 3sh42y64q3.skadnetwork - - - SKAdNetworkIdentifier - f38h382jlk.skadnetwork - - - SKAdNetworkIdentifier - hs6bdukanm.skadnetwork - - - SKAdNetworkIdentifier - prcb7njmu6.skadnetwork - - - SKAdNetworkIdentifier - v4nxqhlyqp.skadnetwork - - - SKAdNetworkIdentifier - wzmmz9fp6w.skadnetwork - - - SKAdNetworkIdentifier - yclnxrl5pm.skadnetwork - - - SKAdNetworkIdentifier - t38b2kh725.skadnetwork - - - SKAdNetworkIdentifier - 7ug5zh24hu.skadnetwork - - - SKAdNetworkIdentifier - 9rd848q2bz.skadnetwork - - - SKAdNetworkIdentifier - y5ghdn5j9k.skadnetwork - - - SKAdNetworkIdentifier - n6fk4nfna4.skadnetwork - - - SKAdNetworkIdentifier - v9wttpbfk9.skadnetwork - - - SKAdNetworkIdentifier - n38lu8286q.skadnetwork - - - SKAdNetworkIdentifier - 47vhws6wlr.skadnetwork - - - SKAdNetworkIdentifier - kbd757ywx3.skadnetwork - - - SKAdNetworkIdentifier - 9t245vhmpl.skadnetwork - - - SKAdNetworkIdentifier - a2p9lx4jpn.skadnetwork - - - SKAdNetworkIdentifier - 22mmun2rn5.skadnetwork - - - SKAdNetworkIdentifier - 4468km3ulz.skadnetwork - - - SKAdNetworkIdentifier - 2u9pt9hc89.skadnetwork - - - SKAdNetworkIdentifier - 8s468mfl3y.skadnetwork - - - SKAdNetworkIdentifier - av6w8kgt66.skadnetwork - - - SKAdNetworkIdentifier - klf5c3l5u5.skadnetwork - - - SKAdNetworkIdentifier - ppxm28t8ap.skadnetwork - - - SKAdNetworkIdentifier - 424m5254lk.skadnetwork - - - SKAdNetworkIdentifier - ecpz2srf59.skadnetwork - - - SKAdNetworkIdentifier - uw77j35x4d.skadnetwork - - - SKAdNetworkIdentifier - mlmmfzh3r3.skadnetwork - - - SKAdNetworkIdentifier - 578prtvx9j.skadnetwork - - - SKAdNetworkIdentifier - 4dzt52r2t5.skadnetwork - - - SKAdNetworkIdentifier - gta9lk7p23.skadnetwork - - - SKAdNetworkIdentifier - e5fvkxwrpn.skadnetwork - - - SKAdNetworkIdentifier - 8c4e2ghe7u.skadnetwork - - - SKAdNetworkIdentifier - zq492l623r.skadnetwork - - - SKAdNetworkIdentifier - 3rd42ekr43.skadnetwork - - - SKAdNetworkIdentifier - 3qcr597p9d.skadnetwork - - - - diff --git a/samples/admob/adaptive_banner_example/lib/main.dart b/samples/admob/adaptive_banner_example/lib/main.dart deleted file mode 100644 index f8956c6e8..000000000 --- a/samples/admob/adaptive_banner_example/lib/main.dart +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright 2022 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 -// -// https://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. - -// ignore_for_file: public_member_api_docs - -import 'dart:io'; - -import 'package:flutter/material.dart'; -import 'package:google_mobile_ads/google_mobile_ads.dart'; - -void main() { - WidgetsFlutterBinding.ensureInitialized(); - MobileAds.instance.initialize(); - runApp(const MaterialApp( - home: AdaptiveBannerExample(), - )); -} - -/// A simple app that loads an adaptive banner ad. -class AdaptiveBannerExample extends StatefulWidget { - const AdaptiveBannerExample({super.key}); - - @override - AdaptiveBannerExampleState createState() => AdaptiveBannerExampleState(); -} - -class AdaptiveBannerExampleState extends State { - BannerAd? _bannerAd; - bool _isLoaded = false; - - final String _adUnitId = Platform.isAndroid - ? 'ca-app-pub-3940256099942544/6300978111' - : 'ca-app-pub-3940256099942544/2934735716'; - - @override - void didChangeDependencies() { - super.didChangeDependencies(); - - _isLoaded = false; - _loadAd(); - } - - @override - Widget build(BuildContext context) { - return MaterialApp( - title: 'Adaptive Banner Example', - home: Scaffold( - appBar: AppBar( - title: const Text('Adaptive Banner Example'), - ), - body: Stack( - children: [ - if (_bannerAd != null && _isLoaded) - Align( - alignment: Alignment.bottomCenter, - child: SafeArea( - child: SizedBox( - width: _bannerAd!.size.width.toDouble(), - height: _bannerAd!.size.height.toDouble(), - child: AdWidget(ad: _bannerAd!), - ), - ), - ) - ], - )), - ); - } - - /// Loads and shows a banner ad. - /// - /// Dimensions of the ad are determined by the width of the screen. - void _loadAd() async { - // Get an AnchoredAdaptiveBannerAdSize before loading the ad. - final size = await AdSize.getCurrentOrientationAnchoredAdaptiveBannerAdSize( - MediaQuery.sizeOf(context).width.truncate()); - - if (size == null) { - // Unable to get width of anchored banner. - return; - } - - BannerAd( - adUnitId: _adUnitId, - request: const AdRequest(), - size: size, - listener: BannerAdListener( - // Called when an ad is successfully received. - onAdLoaded: (ad) { - setState(() { - _bannerAd = ad as BannerAd; - _isLoaded = true; - }); - }, - // Called when an ad request failed. - onAdFailedToLoad: (ad, err) { - ad.dispose(); - }, - // Called when an ad opens an overlay that covers the screen. - onAdOpened: (Ad ad) {}, - // Called when an ad removes an overlay that covers the screen. - onAdClosed: (Ad ad) {}, - // Called when an impression occurs on the ad. - onAdImpression: (Ad ad) {}, - ), - ).load(); - } - - @override - void dispose() { - _bannerAd?.dispose(); - super.dispose(); - } -} diff --git a/samples/admob/app_open_example/.gitignore b/samples/admob/app_open_example/.gitignore index 0fa6b675c..79c113f9b 100644 --- a/samples/admob/app_open_example/.gitignore +++ b/samples/admob/app_open_example/.gitignore @@ -5,9 +5,12 @@ *.swp .DS_Store .atom/ +.build/ .buildlog/ .history .svn/ +.swiftpm/ +migrate_working_dir/ # IntelliJ related *.iml @@ -26,14 +29,10 @@ .dart_tool/ .flutter-plugins .flutter-plugins-dependencies -.packages .pub-cache/ .pub/ /build/ -# Web related -lib/generated_plugin_registrant.dart - # Symbolication related app.*.symbols diff --git a/samples/admob/app_open_example/.metadata b/samples/admob/app_open_example/.metadata index 56bfc2c4d..6c1bf2fff 100644 --- a/samples/admob/app_open_example/.metadata +++ b/samples/admob/app_open_example/.metadata @@ -4,7 +4,30 @@ # This file should be version controlled and should not be manually edited. version: - revision: f4abaa0735eba4dfd8f33f73363911d63931fe03 - channel: stable + revision: "db7ef5bf9f59442b0e200a90587e8fa5e0c6336a" + channel: "stable" project_type: app + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a + base_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a + - platform: android + create_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a + base_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a + - platform: ios + create_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a + base_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/samples/admob/app_open_example/README.md b/samples/admob/app_open_example/README.md index 43f683117..d22df77f2 100644 --- a/samples/admob/app_open_example/README.md +++ b/samples/admob/app_open_example/README.md @@ -74,7 +74,7 @@ public class AppOpenAdManager { _appOpenAd = ad; }, onAdFailedToLoad: (error) { - print('AppOpenAd failed to load: $error'); + debugPrint('AppOpenAd failed to load: $error'); // Handle the error. }, ), @@ -94,28 +94,28 @@ public class AppOpenAdManager { public void showAdIfAvailable() { if (!isAdAvailable) { - print('Tried to show ad before available.'); + debugPrint('Tried to show ad before available.'); loadAd(); return; } if (_isShowingAd) { - print('Tried to show ad while already showing an ad.'); + debugPrint('Tried to show ad while already showing an ad.'); return; } // Set the fullScreenContentCallback and show the ad. _appOpenAd!.fullScreenContentCallback = FullScreenContentCallback( onAdShowedFullScreenContent: (ad) { _isShowingAd = true; - print('$ad onAdShowedFullScreenContent'); + debugPrint('$ad onAdShowedFullScreenContent'); }, onAdFailedToShowFullScreenContent: (ad, error) { - print('$ad onAdFailedToShowFullScreenContent: $error'); + debugPrint('$ad onAdFailedToShowFullScreenContent: $error'); _isShowingAd = false; ad.dispose(); _appOpenAd = null; }, onAdDismissedFullScreenContent: (ad) { - print('$ad onAdDismissedFullScreenContent'); + debugPrint('$ad onAdDismissedFullScreenContent'); _isShowingAd = false; ad.dispose(); _appOpenAd = null; @@ -246,12 +246,12 @@ class AppOpenAdManager { request: AdRequest(), adLoadCallback: AppOpenAdLoadCallback( onAdLoaded: (ad) { - print('$ad loaded'); + debugPrint('$ad loaded'); {{''}}_appOpenLoadTime = DateTime.now();{{''}} _appOpenAd = ad; }, onAdFailedToLoad: (error) { - print('AppOpenAd failed to load: $error'); + debugPrint('AppOpenAd failed to load: $error'); }, ), ); @@ -263,16 +263,16 @@ class AppOpenAdManager { /// new ad. void showAdIfAvailable() { if (!isAdAvailable) { - print('Tried to show ad before available.'); + debugPrint('Tried to show ad before available.'); loadAd(); return; } if (_isShowingAd) { - print('Tried to show ad while already showing an ad.'); + debugPrint('Tried to show ad while already showing an ad.'); return; } {{''}}if (DateTime.now().subtract(maxCacheDuration).isAfter(_appOpenLoadTime!)) { - print('Maximum cache duration exceeded. Loading another ad.'); + debugPrint('Maximum cache duration exceeded. Loading another ad.'); _appOpenAd!.dispose(); _appOpenAd = null; loadAd(); diff --git a/samples/admob/app_open_example/analysis_options.yaml b/samples/admob/app_open_example/analysis_options.yaml new file mode 100644 index 000000000..f9b303465 --- /dev/null +++ b/samples/admob/app_open_example/analysis_options.yaml @@ -0,0 +1 @@ +include: package:flutter_lints/flutter.yaml diff --git a/samples/admob/app_open_example/android/.gitignore b/samples/admob/app_open_example/android/.gitignore index 0a741cb43..6f568019d 100644 --- a/samples/admob/app_open_example/android/.gitignore +++ b/samples/admob/app_open_example/android/.gitignore @@ -9,3 +9,5 @@ GeneratedPluginRegistrant.java # Remember to never publicly share your keystore. # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app key.properties +**/*.keystore +**/*.jks diff --git a/samples/admob/app_open_example/android/app/build.gradle b/samples/admob/app_open_example/android/app/build.gradle index 3f88b2233..75b9f97c9 100644 --- a/samples/admob/app_open_example/android/app/build.gradle +++ b/samples/admob/app_open_example/android/app/build.gradle @@ -1,3 +1,9 @@ +plugins { + id "com.android.application" + id "kotlin-android" + id "dev.flutter.flutter-gradle-plugin" +} + def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { @@ -6,11 +12,6 @@ if (localPropertiesFile.exists()) { } } -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - def flutterVersionCode = localProperties.getProperty('flutter.versionCode') if (flutterVersionCode == null) { flutterVersionCode = '1' @@ -21,20 +22,30 @@ if (flutterVersionName == null) { flutterVersionName = '1.0' } -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - android { + namespace "com.example.app_open_example" compileSdkVersion flutter.compileSdkVersion + ndkVersion = flutter.ndkVersion + + compileOptions { + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 + } + + kotlinOptions { + jvmTarget = '17' + } sourceSets { main.java.srcDirs += 'src/main/kotlin' } defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "com.example.app_open_example" - minSdkVersion 21 + // You can update the following values to match your application needs. + // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. + minSdkVersion flutter.minSdkVersion targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName @@ -42,6 +53,8 @@ android { buildTypes { release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. signingConfig signingConfigs.debug } } @@ -52,7 +65,7 @@ flutter { } dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation 'androidx.multidex:multidex:2.0.1' // If you do not want to target android 12, then explicitly override the // WorkManager dependency. implementation('androidx.work:work-runtime') { diff --git a/samples/admob/app_open_example/android/app/src/debug/AndroidManifest.xml b/samples/admob/app_open_example/android/app/src/debug/AndroidManifest.xml index 5a1cb4a3d..399f6981d 100644 --- a/samples/admob/app_open_example/android/app/src/debug/AndroidManifest.xml +++ b/samples/admob/app_open_example/android/app/src/debug/AndroidManifest.xml @@ -1,6 +1,6 @@ - - diff --git a/samples/admob/app_open_example/android/app/src/main/AndroidManifest.xml b/samples/admob/app_open_example/android/app/src/main/AndroidManifest.xml index 0da2e19d0..916e30236 100644 --- a/samples/admob/app_open_example/android/app/src/main/AndroidManifest.xml +++ b/samples/admob/app_open_example/android/app/src/main/AndroidManifest.xml @@ -1,11 +1,8 @@ - - + - + android:name="io.flutter.embedding.android.NormalTheme" + android:resource="@style/NormalTheme" + /> + + + + - - - - + android:name="io.flutter.embedding.android.SplashScreenDrawable" + android:resource="@drawable/launch_background" + /> + - + \ No newline at end of file diff --git a/samples/admob/app_open_example/android/app/src/main/res/values-night/styles.xml b/samples/admob/app_open_example/android/app/src/main/res/values-night/styles.xml index 449a9f930..06952be74 100644 --- a/samples/admob/app_open_example/android/app/src/main/res/values-night/styles.xml +++ b/samples/admob/app_open_example/android/app/src/main/res/values-night/styles.xml @@ -3,14 +3,14 @@