Skip to content

GMA Merge to Main #1001

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 124 commits into from
Jun 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
e365f4f
Initial Admob 2021 pinned to 20.1.0 (#622)
DellaBitta Sep 21, 2021
80f50ff
Feature/admob 2021 Set|Get RequestConfiguration (#665)
DellaBitta Sep 22, 2021
a00b2da
Admob - AdSize and AdRequest updates (#679)
DellaBitta Oct 1, 2021
44e75a0
LoadAd operations return LoadAdResults (#682)
DellaBitta Nov 1, 2021
bd8110e
Feature/admob 2021 adview, fullscreen listeners (#713)
DellaBitta Nov 8, 2021
efda224
Remove LoadAdResult from new Admob. (#723)
DellaBitta Nov 8, 2021
f122ff8
Return AdapterInitializationStatus from Initialize (#742)
jonsimantov Nov 10, 2021
2e4d2c8
Merge branch 'main' into feature/admob_2021
jonsimantov Nov 10, 2021
d852f3c
RewardedAds for Android (#741)
DellaBitta Nov 16, 2021
8bbaf8b
Merge pull request #743 from firebase/feature/admob_2021_merge_from_main
DellaBitta Nov 17, 2021
27203e2
guard against invoking deleted callbacks (#744)
DellaBitta Nov 18, 2021
b9ebfb4
rename LeaderBoard to Leaderboard
DellaBitta Nov 22, 2021
b57f5a7
Merge pull request #754 from firebase/feature/admob_2021_leaderboard
DellaBitta Nov 24, 2021
dc996e0
AdMob Rewarded Ads on iOS (#752)
DellaBitta Nov 29, 2021
b495952
Feature/admob 2021 stability in future usage (#762)
DellaBitta Nov 29, 2021
849a14f
neighboring content urls
DellaBitta Nov 30, 2021
b9c8edf
cleanup
DellaBitta Nov 30, 2021
311bed9
merge and format
DellaBitta Nov 30, 2021
4b914d2
Merge main into the AdMob Feature Branch (#771)
DellaBitta Dec 1, 2021
81416e0
Merge branch 'feature/admob_2021' into feature/admob_2021_neighboring…
DellaBitta Dec 1, 2021
e9744d2
format for linter
DellaBitta Dec 1, 2021
4f4cd32
manual format fix
DellaBitta Dec 1, 2021
a46cd3a
fake urls
DellaBitta Dec 2, 2021
3a627c8
invalid test urls just in case
DellaBitta Dec 2, 2021
353548b
Merge branch 'main' into feature/admob_2021
jonsimantov Dec 3, 2021
8d5e863
Format code.
jonsimantov Dec 4, 2021
f11ef67
Feature/admob 2021 merge from main 2 (#787)
jonsimantov Dec 4, 2021
0080b28
Merge branch 'feature/admob_2021' into feature/admob_2021_neighboring…
DellaBitta Dec 4, 2021
dc62717
Merge pull request #769 from firebase/feature/admob_2021_neighboring_…
DellaBitta Dec 4, 2021
f655518
Functions to Disable AdMob Automatic Services on iOS (#772)
DellaBitta Dec 16, 2021
e0ab338
AdMob 2021 return FullScreenContent errors (#791)
DellaBitta Dec 17, 2021
bb2a944
moved directory
DellaBitta Dec 17, 2021
f9d750f
android builds, ios fails
DellaBitta Dec 20, 2021
6c2f2d4
Remove old admob headers
jonsimantov Dec 20, 2021
66f3cc0
remove admob secrets, for now
DellaBitta Dec 20, 2021
310ef51
fix game_engine.h header guard for format
DellaBitta Dec 20, 2021
6547a95
File format
DellaBitta Dec 20, 2021
65e57aa
remote firebase_admob from build_ios_tvos
DellaBitta Dec 21, 2021
8846b11
remove firebase_admob from release_build_files/CMakeLists.txt
DellaBitta Dec 21, 2021
dc37366
todos to add firebase_admob back in
DellaBitta Dec 21, 2021
dac0fa1
removed firebase_admob from build_scripts/ios/build.sh
DellaBitta Dec 21, 2021
3928fe3
app cmakelist todo
DellaBitta Dec 21, 2021
f88e157
Merge pull request #797 from firebase/feature/admob_gma
DellaBitta Dec 21, 2021
533cd33
Added legacy AdMob SDK back into GMA feature branch. (#801)
DellaBitta Jan 3, 2022
6507480
stubs
DellaBitta Jan 3, 2022
f4d6a2a
job pools
DellaBitta Jan 3, 2022
7af9bef
ctest flags
DellaBitta Jan 3, 2022
c45b3d9
revert compile/link pool
DellaBitta Jan 4, 2022
701396f
Android impl of OpenAdInspector
DellaBitta Jan 5, 2022
3e4c2e3
removed openDebugMenu
DellaBitta Jan 5, 2022
64ee25b
AdInspectorHelper.java
DellaBitta Jan 5, 2022
c2727ec
Added AdParent to Android.
DellaBitta Jan 5, 2022
1650cc1
ios and android standardized ad inspector behavior
DellaBitta Jan 6, 2022
d5e102f
desktop stub of GetWindowController
DellaBitta Jan 6, 2022
52acc71
jlong lint fix
DellaBitta Jan 6, 2022
9118c7d
comment updates
DellaBitta Jan 6, 2022
1b05dc2
test ad inspector error message
DellaBitta Jan 7, 2022
c1dd91e
initial rename
DellaBitta Jan 10, 2022
f044dac
removed JNI call in C++ destructor
DellaBitta Jan 10, 2022
96345a4
update comment for Destroy
DellaBitta Jan 10, 2022
4991c23
Log a warning of destroy was not invoked
DellaBitta Jan 10, 2022
71ee949
log if destroy wasn't called
DellaBitta Jan 10, 2022
e369e48
all platforms build
DellaBitta Jan 12, 2022
59409e8
New BannerView destroy flow in Android c++ wrapper destructor
DellaBitta Jan 12, 2022
2d643bc
Merge pull request #808 from firebase/feature/admob_2021_debug_windows
DellaBitta Jan 12, 2022
d6465a9
Merge pull request #811 from firebase/feature/admob_2021_android_stab…
DellaBitta Jan 14, 2022
6b77787
merged feature branch
DellaBitta Jan 17, 2022
5f26077
FADAdView fix
DellaBitta Jan 18, 2022
6e65e23
formats
DellaBitta Jan 18, 2022
655e878
linter
DellaBitta Jan 18, 2022
ee80d40
iniital rename and format
DellaBitta Jan 19, 2022
d842e7b
comment update regarding ad sizes
DellaBitta Jan 19, 2022
452f9c2
Merge branch 'main' into merge_admob_2021
DellaBitta Jan 20, 2022
9144e9b
mutex header include path
DellaBitta Jan 20, 2022
7313bb9
Merge branch 'main' into merge_admob_2021
DellaBitta Jan 21, 2022
fc18d67
Merge main into GMA feature branch (#816)
DellaBitta Jan 21, 2022
15c52ae
merged-in feature/admob_2021
DellaBitta Jan 21, 2022
2c32bdb
Merge branch 'feature/admob_2021_rename_bannerview' into feature/admo…
DellaBitta Jan 21, 2022
426e696
header path merge failure
DellaBitta Jan 21, 2022
3815029
Merge branch 'feature/admob_2021_rename_bannerview' into feature/admo…
DellaBitta Jan 24, 2022
1d3344e
Merge pull request #814 from firebase/feature/admob_2021_rename_banne…
DellaBitta Jan 24, 2022
24788e3
Merge branch 'feature/admob_2021' into feature/admob_2021_rename_errors
DellaBitta Jan 24, 2022
92ded1e
added firebase::gma::SetIsSameAppKeyEnabled global function
DellaBitta Jan 25, 2022
0bac820
Merge pull request #819 from firebase/feature/admob_2021_rename_errors
DellaBitta Jan 25, 2022
7d95619
Merge branch 'feature/admob_2021' into feature/gma_set_app_key
DellaBitta Jan 25, 2022
b264a98
Merge pull request #825 from firebase/feature/gma_set_app_key
DellaBitta Jan 26, 2022
b01bf7f
Refactor AdResult to contain AdError objects. (#828)
DellaBitta Jan 31, 2022
6cc689b
Add missing :gma:gma_resources. (#839)
jonsimantov Feb 4, 2022
2ed4eaf
GMA AdView::ad_size() (#837)
DellaBitta Feb 4, 2022
4ce8d36
GMA Inline Adaptive AdSizes (#848)
DellaBitta Feb 15, 2022
089b27f
Update GMA to latest 2021 releases (#849)
DellaBitta Feb 17, 2022
81d8a51
Fixed a comment in AdSize which refered to kGADAdSizeBanner
DellaBitta Mar 14, 2022
c25103f
Feature/merge main into admob (#875)
DellaBitta Mar 30, 2022
068b711
fixed AdView::LoadAd Android future enum
DellaBitta Apr 4, 2022
5671f18
Generate reference docs for new GMA library (#877)
jonsimantov Apr 4, 2022
dfaedd5
Remove precision type tests
DellaBitta Apr 5, 2022
1a17df7
Standalone iOS UI Testapp that enable admob UI Test Automation (#882)
sunmou99 Apr 8, 2022
6d320c9
Standalone Android UI Tester app that enable admob UI Test Automation…
sunmou99 Apr 8, 2022
43c88e6
Python script that run UI Test automatically (Assuming GMA UI Testapp…
sunmou99 Apr 13, 2022
0dff942
Update GMA feature branch with latest GMA dependencies. (#887)
DellaBitta Apr 21, 2022
6f42852
GMA Reference Doc fixes based on DevRel feedback. (#900)
DellaBitta Apr 27, 2022
8ee66ac
Modify Test Framework to make it able to trigger only UI tests in tes…
sunmou99 Apr 28, 2022
0dfe424
doxygen fixes
DellaBitta May 3, 2022
e7c46ce
GMA - Add ResponseInfo to AdResult (#921)
DellaBitta May 4, 2022
9aa9895
GMA - rename AdResult error/success future-completion methods (#929)
DellaBitta May 5, 2022
3dd1603
GMA UI Tests Workflow (#916)
sunmou99 May 6, 2022
d227f16
Update GMA Feature Branch with 9.0.0 release (#952)
DellaBitta May 19, 2022
7ab65a2
doxygen fixes
DellaBitta May 19, 2022
75beb87
fixed extra_key doxygen comment
DellaBitta May 19, 2022
e3ea539
Merge Main into GMA Feature Branch 5/24 (#965)
DellaBitta May 25, 2022
c54b6ef
Record UI test failures & Add UI test results to report (#928)
sunmou99 May 27, 2022
6971159
ios AdView destructor changes
DellaBitta May 27, 2022
8207063
Merge 9.1.0 release into GMA (#987)
DellaBitta Jun 10, 2022
1af8e4b
Add SkipTestsOnSimulator to GMA integration test (#985)
DellaBitta Jun 12, 2022
b3893e0
updated Android gma version to 21.0.0 (#990)
DellaBitta Jun 15, 2022
30f37a0
Update GMA feature branch with Android BOM changes (#993)
DellaBitta Jun 16, 2022
e3f8de3
merged main
DellaBitta Jun 19, 2022
8af4122
formatting
DellaBitta Jun 20, 2022
5fa6d9c
Feature/gma firesite refdocs (#988)
DellaBitta Jun 20, 2022
058430f
formatting fixes
DellaBitta Jun 22, 2022
da8aec2
GMA updates to release notes (#1002)
DellaBitta Jun 23, 2022
cc4161c
Merge branch 'main' into feature/admob_2021
DellaBitta Jun 23, 2022
2d495c6
Update GMA feature branch with main (#1004)
DellaBitta Jun 23, 2022
65172c8
Merge branch 'main' into feature/admob_2021
DellaBitta Jun 23, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 47 additions & 17 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:
required: true
apis:
description: 'CSV of apis to build and test'
default: 'admob,analytics,auth,database,dynamic_links,firestore,functions,installations,messaging,remote_config,storage'
default: 'admob,analytics,auth,database,dynamic_links,firestore,functions,gma,installations,messaging,remote_config,storage'
required: true
operating_systems:
description: 'CSV of VMs to run on'
Expand Down Expand Up @@ -1092,7 +1092,7 @@ jobs:


test_android:
name: test-android-${{ matrix.build_os }}-${{ matrix.android_device }}
name: test-android-${{ matrix.build_os }}-${{ matrix.android_device }}-${{ matrix.test_type }}
needs: [check_and_prepare, build_android]
runs-on: macos-12
if: contains(needs.check_and_prepare.outputs.matrix_platform, 'Android') && needs.check_and_prepare.outputs.apis != '' && !cancelled()
Expand All @@ -1101,6 +1101,12 @@ jobs:
matrix:
build_os: ${{ fromJson(needs.check_and_prepare.outputs.matrix_os) }}
android_device: ${{ fromJson(needs.check_and_prepare.outputs.android_device) }}
test_type: ["gameloop"]
exclude:
- android_device: "android_target"
test_type: "uitest"
- android_device: "android_latest"
test_type: "uitest"
steps:
- name: setup Xcode version (macos)
if: runner.os == 'macOS'
Expand Down Expand Up @@ -1151,8 +1157,9 @@ jobs:
if: steps.get-device-type.outputs.device_type == 'virtual'
run: |
python scripts/gha/test_simulator.py --testapp_dir testapps \
--test_type "${{ matrix.test_type }}" \
--android_device "${{ matrix.android_device }}" \
--logfile_name "android-${{ matrix.build_os }}-${{ matrix.android_device }}" \
--logfile_name "android-${{ matrix.build_os }}-${{ matrix.android_device }}-${{ matrix.test_type }}" \
--ci
- name: Install Cloud SDK
if: steps.get-device-type.outputs.device_type == 'real'
Expand All @@ -1163,24 +1170,31 @@ jobs:
run: |
python scripts/gha/test_lab.py --testapp_dir testapps \
--android_device "${{ matrix.android_device }}" \
--logfile_name "android-${{ matrix.build_os }}-${{ matrix.android_device }}" \
--logfile_name "android-${{ matrix.build_os }}-${{ matrix.android_device }}-${{ matrix.test_type }}" \
--code_platform cpp \
--key_file_encrypted scripts/gha-encrypted/gcs_key_file.json.gpg \
--key_file_passphrase "${{ secrets.TEST_SECRET }}"
- name: Prepare results summary artifact
if: ${{ !cancelled() }}
shell: bash
run: |
# If testapps do not exist, then it's a build error not test error.
if [ -d "testapps/testapps-android-${{ matrix.build_os }}" && ! -f "testapps/test-results-android-${{ matrix.build_os }}-${{ matrix.android_device }}.log.json" ]; then
mkdir -p testapps && echo "__SUMMARY_MISSING__" > "testapps/test-results-android-${{ matrix.build_os }}-${{ matrix.android_device }}.log.json"
# If testapps do not exist, then it's a build error not test error.
if [ -d "testapps/testapps-android-${{ matrix.build_os }}" && ! -f "testapps/test-results-android-${{ matrix.build_os }}-${{ matrix.android_device }}-${{ matrix.test_type }}.log.json" ]; then
mkdir -p testapps && echo "__SUMMARY_MISSING__" > "testapps/test-results-android-${{ matrix.build_os }}-${{ matrix.android_device }}-${{ matrix.test_type }}.log.json"
fi
- name: Upload Android test results artifact
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v3
with:
name: log-artifact
path: testapps/test-results-android-${{ matrix.build_os }}-${{ matrix.android_device }}*
path: testapps/test-results-android-${{ matrix.build_os }}-${{ matrix.android_device }}-${{ matrix.test_type }}*
retention-days: ${{ env.artifactRetentionDays }}
- name: Upload Android test video artifact
if: ${{ steps.get-device-type.outputs.device_type == 'virtual' && !cancelled() }}
uses: actions/upload-artifact@v3
with:
name: mobile-simulator-test-video-artifact
path: testapps/video-*-android-${{ matrix.build_os }}-${{ matrix.android_device }}-${{ matrix.test_type }}.mp4
retention-days: ${{ env.artifactRetentionDays }}
- name: Download log artifacts
if: ${{ needs.check_and_prepare.outputs.pr_number && failure() && !cancelled() }}
Expand All @@ -1202,20 +1216,28 @@ jobs:
if: ${{ !cancelled() }}
shell: bash
run: |
cat "testapps/test-results-android-${{ matrix.build_os }}-${{ matrix.android_device }}.log"
cat "testapps/test-results-android-${{ matrix.build_os }}-${{ matrix.android_device }}-${{ matrix.test_type }}.log"
if [[ "${{ job.status }}" != "success" ]]; then
exit 1
fi

test_ios:
name: test-ios-${{ matrix.build_os }}-${{ matrix.ios_device }}
name: test-ios-${{ matrix.build_os }}-${{ matrix.ios_device }}-${{ matrix.test_type }}
needs: [check_and_prepare, build_ios]
runs-on: macos-12
if: contains(needs.check_and_prepare.outputs.matrix_platform, 'iOS') && needs.check_and_prepare.outputs.apis != '' && !cancelled()
strategy:
fail-fast: false
matrix:
ios_device: ${{ fromJson(needs.check_and_prepare.outputs.ios_device) }}
test_type: ["gameloop"]
exclude:
- ios_device: "ios_min"
test_type: "uitest"
- ios_device: "ios_target"
test_type: "uitest"
- ios_device: "ios_latest"
test_type: "uitest"
build_os: [macos-12]
steps:
- name: setup Xcode version (macos)
Expand Down Expand Up @@ -1261,8 +1283,9 @@ jobs:
if: steps.get-device-type.outputs.device_type == 'virtual'
run: |
python scripts/gha/test_simulator.py --testapp_dir testapps \
--test_type "${{ matrix.test_type }}" \
--ios_device "${{ matrix.ios_device }}" \
--logfile_name "ios-${{ matrix.build_os }}-${{ matrix.ios_device }}" \
--logfile_name "ios-${{ matrix.build_os }}-${{ matrix.ios_device }}-${{ matrix.test_type }}" \
--ci
- name: Install Cloud SDK
if: steps.get-device-type.outputs.device_type == 'real'
Expand All @@ -1274,24 +1297,31 @@ jobs:
run: |
python scripts/gha/test_lab.py --testapp_dir testapps \
--ios_device "${{ matrix.ios_device }}" \
--logfile_name "ios-${{ matrix.build_os }}-${{ matrix.ios_device }}" \
--logfile_name "ios-${{ matrix.build_os }}-${{ matrix.ios_device }}-${{ matrix.test_type }}" \
--code_platform cpp \
--key_file_encrypted scripts/gha-encrypted/gcs_key_file.json.gpg \
--key_file_passphrase "${{ secrets.TEST_SECRET }}"
- name: Prepare results summary artifact
if: ${{ !cancelled() }}
shell: bash
run: |
# If testapps do not exist, then it's a build error not test error.
if [ -d "testapps/testapps-ios-${{ matrix.build_os }}" && ! -f "testapps/test-results-ios-${{ matrix.build_os }}-${{ matrix.ios_device }}.log.json" ]; then
mkdir -p testapps && echo "__SUMMARY_MISSING__" > "testapps/test-results-ios-${{ matrix.build_os }}-${{ matrix.ios_device }}.log.json"
# If testapps do not exist, then it's a build error not test error.
if [ -d "testapps/testapps-ios-${{ matrix.build_os }}" && ! -f "testapps/test-results-ios-${{ matrix.build_os }}-${{ matrix.ios_device }}-${{ matrix.test_type }}.log.json" ]; then
mkdir -p testapps && echo "__SUMMARY_MISSING__" > "testapps/test-results-ios-${{ matrix.build_os }}-${{ matrix.ios_device }}-${{ matrix.test_type }}.log.json"
fi
- name: Upload iOS test results artifact
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v3
with:
name: log-artifact
path: testapps/test-results-ios-${{ matrix.build_os }}-${{ matrix.ios_device }}*
path: testapps/test-results-ios-${{ matrix.build_os }}-${{ matrix.ios_device }}-${{ matrix.test_type }}*
retention-days: ${{ env.artifactRetentionDays }}
- name: Upload iOS test video artifact
if: ${{ steps.get-device-type.outputs.device_type == 'virtual' && !cancelled() }}
uses: actions/upload-artifact@v3
with:
name: mobile-simulator-test-video-artifact
path: testapps/video-*-ios-${{ matrix.build_os }}-${{ matrix.ios_device }}-${{ matrix.test_type }}.mp4
retention-days: ${{ env.artifactRetentionDays }}
- name: Download log artifacts
if: ${{ needs.check_and_prepare.outputs.pr_number && failure() && !cancelled() }}
Expand All @@ -1313,7 +1343,7 @@ jobs:
if: ${{ !cancelled() }}
shell: bash
run: |
cat "testapps/test-results-ios-${{ matrix.build_os }}-${{ matrix.ios_device }}.log"
cat "testapps/test-results-ios-${{ matrix.build_os }}-${{ matrix.ios_device }}-${{ matrix.test_type }}.log"
if [[ "${{ job.status }}" != "success" ]]; then
exit 1
fi
Expand Down
5 changes: 5 additions & 0 deletions Android/firebase_dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def firebaseDependenciesMap = [
'dynamic_links' : ['com.google.firebase:firebase-dynamic-links'],
'firestore' : ['com.google.firebase:firebase-firestore'],
'functions' : ['com.google.firebase:firebase-functions'],
'gma' : ['com.google.android.gms:play-services-ads:21.0.0'],
'installations' : ['com.google.firebase:firebase-installations'],
'invites' : ['com.google.firebase:firebase-invites'],
// Messaging has an additional local dependency to include.
Expand All @@ -48,6 +49,7 @@ def firebaseResourceDependenciesMap = [
'auth' : [':auth:auth_resources'],
'database' : [':database:database_resources'],
'firestore' : [':firestore:firestore_resources'],
'gma' : [':gma:gma_resources'],
'storage' : [':storage:storage_resources']
]

Expand Down Expand Up @@ -87,6 +89,9 @@ class Dependencies {
def getFirestore() {
libSet.add('firestore')
}
def getGma() {
libSet.add('gma')
}
def getFunctions() {
libSet.add('functions')
}
Expand Down
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ option(FIREBASE_INCLUDE_FIRESTORE
option(FIREBASE_INCLUDE_FUNCTIONS
"Include the Cloud Functions for Firebase library."
${FIREBASE_INCLUDE_LIBRARY_DEFAULT})
option(FIREBASE_INCLUDE_GMA "Include the GMA library."
${FIREBASE_INCLUDE_LIBRARY_DEFAULT})
option(FIREBASE_INCLUDE_INSTALLATIONS
"Include the Firebase Installations library."
${FIREBASE_INCLUDE_LIBRARY_DEFAULT})
Expand Down Expand Up @@ -116,9 +118,10 @@ if(FIREBASE_CPP_BUILD_TESTS OR FIREBASE_CPP_BUILD_STUB_TESTS)
endif()

if (PLATFORM STREQUAL TVOS OR PLATFORM STREQUAL SIMULATOR_TVOS)
# AdMob and FDL are not supported on tvOS.
# AdMob, GMA and FDL are not supported on tvOS.
set(FIREBASE_INCLUDE_ADMOB OFF)
set(FIREBASE_INCLUDE_DYNAMIC_LINKS OFF)
set(FIREBASE_INCLUDE_GMA OFF)
endif()

# Occasionally ANDROID is not being set correctly when invoked by gradle, so
Expand Down Expand Up @@ -599,6 +602,9 @@ endif()
if (FIREBASE_INCLUDE_FUNCTIONS)
add_subdirectory(functions)
endif()
if (FIREBASE_INCLUDE_GMA)
add_subdirectory(gma)
endif()
if (FIREBASE_INCLUDE_INSTALLATIONS)
add_subdirectory(installations)
endif()
Expand Down
18 changes: 8 additions & 10 deletions admob/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,14 @@ target_include_directories(firebase_admob
PRIVATE
${FIREBASE_CPP_SDK_ROOT_DIR}
)

if(IOS)
target_include_directories(firebase_admob
PRIVATE
${CMAKE_CURRENT_LIST_DIR}/admob_resources/ios_headers
)
endif()

target_compile_definitions(firebase_admob
PRIVATE
-DINTERNAL_EXPERIMENTAL=1
Expand All @@ -110,16 +118,6 @@ elseif(IOS)
target_link_libraries(firebase_admob
PUBLIC "-fembed-bitcode")

setup_pod_headers(
firebase_admob
POD_NAMES
Google-Mobile-Ads-SDK
)

# AdMob expects the header files to be in a subfolder, so set up a symlink to
# accomplish that.
symlink_pod_headers(firebase_admob Google-Mobile-Ads-SDK GoogleMobileAds)

if (FIREBASE_XCODE_TARGET_FORMAT STREQUAL "frameworks")
set_target_properties(firebase_admob PROPERTIES
FRAMEWORK TRUE
Expand Down
20 changes: 20 additions & 0 deletions admob/admob_resources/ios_headers/CPPLINT.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# 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
#
# 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.

# Don't inherit configurations from CPPLINT.cfg in parent directories.
set noparent

# Don't attempt to lint headers that came straight of the original pod file
exclude_files=GoogleMobileAds

92 changes: 92 additions & 0 deletions admob/admob_resources/ios_headers/GoogleMobileAds/DFPBannerView.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
//
// DFPBannerView.h
// Google Mobile Ads SDK
//
// Copyright 2012 Google LLC. All rights reserved.
//

#import <GoogleMobileAds/GADAdLoader.h>
#import <GoogleMobileAds/GADAdLoaderDelegate.h>
#import <GoogleMobileAds/GADAppEventDelegate.h>
#import <GoogleMobileAds/GADBannerView.h>
#import <GoogleMobileAds/GADVideoController.h>

@class DFPBannerView;

/// The delegate of a GADAdLoader object must conform to this protocol to receive DFPBannerViews.
@protocol DFPBannerAdLoaderDelegate <GADAdLoaderDelegate>

/// Asks the delegate which banner ad sizes should be requested.
- (nonnull NSArray<NSValue *> *)validBannerSizesForAdLoader:(nonnull GADAdLoader *)adLoader;

/// Tells the delegate that a Google Ad Manager banner ad was received.
- (void)adLoader:(nonnull GADAdLoader *)adLoader
didReceiveDFPBannerView:(nonnull DFPBannerView *)bannerView;

@end

/// The view that displays Ad Manager banner ads.
///
/// To request this ad type using GADAdLoader, you need to pass kGADAdLoaderAdTypeDFPBanner (see
/// GADAdLoaderAdTypes.h) to the |adTypes| parameter in GADAdLoader's initializer method. If you
/// request this ad type, your delegate must conform to the DFPBannerAdLoaderDelegate protocol.
@interface DFPBannerView : GADBannerView

/// Required value created on the Ad Manager website. Create a new ad unit for every unique
/// placement of an ad in your application. Set this to the ID assigned for this placement. Ad units
/// are important for targeting and statistics.
///
/// Example Ad Manager ad unit ID: @"/6499/example/banner"
@property(nonatomic, copy, nullable) NSString *adUnitID;

/// Optional delegate that is notified when creatives send app events.
@property(nonatomic, weak, nullable) IBOutlet id<GADAppEventDelegate> appEventDelegate;

/// Optional delegate that is notified when creatives cause the banner to change size.
@property(nonatomic, weak, nullable) IBOutlet id<GADAdSizeDelegate> adSizeDelegate;

/// Optional array of NSValue encoded GADAdSize structs, specifying all valid sizes that are
/// appropriate for this slot. Never create your own GADAdSize directly. Use one of the predefined
/// standard ad sizes (such as kGADAdSizeBanner), or create one using the GADAdSizeFromCGSize
/// method.
///
/// Example:
///
/// \code
/// NSArray *validSizes = @[
/// NSValueFromGADAdSize(kGADAdSizeBanner),
/// NSValueFromGADAdSize(kGADAdSizeLargeBanner)
/// ];
///
/// bannerView.validAdSizes = validSizes;
/// \endcode
@property(nonatomic, copy, nullable) NSArray<NSValue *> *validAdSizes;

/// Indicates that the publisher will record impressions manually when the ad becomes visible to the
/// user.
@property(nonatomic) BOOL enableManualImpressions;

/// Video controller for controlling video rendered by this ad view.
@property(nonatomic, readonly, nonnull) GADVideoController *videoController;

/// If you've set enableManualImpressions to YES, call this method when the ad is visible.
- (void)recordImpression;

/// Use this function to resize the banner view without launching a new ad request.
- (void)resize:(GADAdSize)size;

/// Sets options that configure ad loading.
///
/// @param adOptions An array of GADAdLoaderOptions objects. The array is deep copied and option
/// objects cannot be modified after calling this method.
- (void)setAdOptions:(nonnull NSArray<GADAdLoaderOptions *> *)adOptions;

#pragma mark Deprecated

/// Deprecated. Use the validAdSizes property.
/// Sets the receiver's valid ad sizes to the values pointed to by the provided NULL terminated list
/// of GADAdSize pointers.
- (void)setValidAdSizesWithSizes:(nullable GADAdSize *)firstSize, ... NS_REQUIRES_NIL_TERMINATION
GAD_DEPRECATED_MSG_ATTRIBUTE("Use validAdSizes property.");

@end
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//
// DFPBannerViewOptions.h
// Google Mobile Ads SDK
//
// Copyright 2016 Google LLC. All rights reserved.
//

#import <GoogleMobileAds/GADAdLoader.h>
#import <GoogleMobileAds/GADAdSize.h>
#import <GoogleMobileAds/GADAdSizeDelegate.h>
#import <GoogleMobileAds/GADAppEventDelegate.h>

/// Ad loader options for banner ads.
@interface DFPBannerViewOptions : GADAdLoaderOptions

/// Optional delegate that is notified if the loaded banner sends app events.
@property(nonatomic, weak, nullable) id<GADAppEventDelegate> appEventDelegate;

/// Optional delegate that is notified if the loaded banner changes size.
@property(nonatomic, weak, nullable) id<GADAdSizeDelegate> adSizeDelegate;

/// Whether the publisher will record impressions manually when the ad becomes visible to the user.
@property(nonatomic, assign) BOOL enableManualImpressions;

@end
Loading