Skip to content

Functions to Disable AdMob Automatic Services on iOS #772

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 9 commits into from
Dec 16, 2021

Conversation

DellaBitta
Copy link
Contributor

@DellaBitta DellaBitta commented Dec 1, 2021

Description

Provide details of the change, and generalize the change in the PR title above.

Add iOS-specific functions to disable some automatic services:

  • DisableSDKCrashReporting()
  • DisableMediationInitialization()

These functions have no behavior on Android.
Fulfills b/206022469


Testing

Integration Test CI #1
And again after merging feature branch to this one.
And again after adding pre-init testing.


Type of Change

Place an x the applicable box:

  • Bug fix. Add the issue # below if applicable.
  • New feature. A non-breaking change which adds functionality.
  • Other, such as a build process or documentation change.

@google-cla google-cla bot added the cla: yes label Dec 1, 2021
@DellaBitta DellaBitta changed the title impl Functions to Disable AdMob Automatic Services on iOS Dec 1, 2021
@DellaBitta DellaBitta marked this pull request as ready for review December 1, 2021 16:20
void NSArrayOfNSStringToVectorOfString(NSArray* array,
std::vector<std::string>* string_vector);
void NSArrayOfNSStringToVectorOfString(NSArray *array,
std::vector<std::string> *string_vector);
Copy link
Contributor Author

@DellaBitta DellaBitta Dec 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#include <vector> is indeed at the top of this file.

... fixed.

@DellaBitta DellaBitta removed the request for review from jonsimantov December 8, 2021 16:33
}

TEST_F(FirebaseAdMobTest, TestDisableMediationInitialization) {
firebase::admob::DisableMediationInitialization();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like these tests aren't really testing the functionality, since it needs to be called before initialization. I think a comment regarding what this is actually testing (that calling the function won't have issues, and not necessarily the functionality) would be good.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could also implement a second test fixture class that doesn't automatically initialize AdMob to test what happens when you call these before initialization.

@DellaBitta DellaBitta requested a review from a-maurice December 13, 2021 16:09
}

TEST_F(FirebaseAdMobTest, TestDisableMediationInitialization) {
firebase::admob::DisableMediationInitialization();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could also implement a second test fixture class that doesn't automatically initialize AdMob to test what happens when you call these before initialization.

@DellaBitta DellaBitta merged commit f655518 into feature/admob_2021 Dec 16, 2021
@DellaBitta DellaBitta deleted the feature/admob_2021_disable_services branch December 16, 2021 19:19
@github-actions github-actions bot added the tests: in-progress This PR's integration tests are in progress. label Dec 16, 2021
@github-actions
Copy link

github-actions bot commented Dec 16, 2021

❌  Integration test FAILED

Requested by @DellaBitta on commit f655518
Last updated: Thu Dec 16 13:42 PST 2021
View integration test log & download artifacts

Failures Configs
analytics [TEST] [ERROR] [iOS] [macos] [ios_target]
firestore [TEST] [ERROR] [Android] [ubuntu] [emulator_target]
[TEST] [FLAKINESS] [Android] [ubuntu] [android_target]
(1 failed tests)  ServerTimestampTest.TestServerTimestampsUsesPreviousValueFromLocalMutation

Add flaky tests to go/fpl-cpp-flake-tracker

@github-actions github-actions bot added the tests: failed This PR's integration tests failed. label Dec 16, 2021
@firebase-workflow-trigger firebase-workflow-trigger bot removed the tests: in-progress This PR's integration tests are in progress. label Dec 16, 2021
@firebase firebase locked and limited conversation to collaborators Jan 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes tests: failed This PR's integration tests failed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants