Skip to content

AdMob AdRequest Neighboring Content URLS #769

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

Conversation

DellaBitta
Copy link
Contributor

@DellaBitta DellaBitta commented Nov 30, 2021

Description

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

Adds the ability to configure Neighboring Content URL strings to the AdRequest object.
Additionally renamed the parameter in the AdRequest::add_extra method from add_extra(const char* ad_network, …) to add_extra(const char* adapter_class_name, … ) to match nomenclature in the iOS and Android SDKs.


Testing

Describe how you've tested these changes. Link any manually triggered Integration tests or CPP binary SDK Packaging Github Action workflows, if applicable.

Integration Tests CI


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 Nov 30, 2021
@firebase firebase deleted a comment from github-actions bot Dec 1, 2021
@firebase firebase deleted a comment from github-actions bot Dec 1, 2021
@@ -193,10 +194,14 @@ void ForEachAppDelegateClass(void (^block)(Class));
NSMutableArray *StringVectorToNSMutableArray(
const std::vector<std::string> &vector);

// Convert a unordered_set of strings into an NSMutableArray.
NSMutableArray *StringUnorderedSetToNSMutableArray(
const std::unordered_set<std::string> &set);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

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

void NSArrayOfNSStringToVectorOfString(NSArray* array,
std::vector<std::string>* string_vector);
void NSArrayOfNSStringToVectorOfString(
NSArray *array, std::vector<std::string> *string_vector);
Copy link
Contributor Author

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 the file.

@DellaBitta DellaBitta marked this pull request as ready for review December 1, 2021 14:03
@DellaBitta DellaBitta changed the title AdRequestion Neighboring Content URLS AdMob AdRequest Neighboring Content URLS Dec 1, 2021
@@ -120,6 +120,11 @@ static const char* kAdNetworkExtrasInvalidClassName = "abc123321cba";

static const char* kContentUrl = "http://www.firebase.com";

static const std::vector<std::string> kNeighboringContentURLs = {
"https://firebase.google.com/products-build",
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these real URLs? should we use fake ones?

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

@jonsimantov jonsimantov left a comment

Choose a reason for hiding this comment

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

SGTM, as long as the underlying SDK doesn't mess up if it expects URLs and gets these instead. :)

@@ -193,10 +194,14 @@ void ForEachAppDelegateClass(void (^block)(Class));
NSMutableArray *StringVectorToNSMutableArray(
const std::vector<std::string> &vector);

// Convert a unordered_set of strings into an NSMutableArray.
NSMutableArray *StringUnorderedSetToNSMutableArray(
const std::unordered_set<std::string> &set);
Copy link

Choose a reason for hiding this comment

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

⚠️ Lint warning: Add #include <unordered_set> for unordered_set<>

void NSArrayOfNSStringToVectorOfString(NSArray *array,
std::vector<std::string> *string_vector);
void NSArrayOfNSStringToVectorOfString(
NSArray *array, std::vector<std::string> *string_vector);
Copy link

Choose a reason for hiding this comment

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

⚠️ Lint warning: Add #include <vector> for vector<>

@@ -24,6 +24,7 @@

#include <map>
#include <string>
#include <unordered_set>
#include <vector>

#include "app/src/include/firebase/variant.h"
Copy link
Contributor

@jonsimantov jonsimantov Dec 4, 2021

Choose a reason for hiding this comment

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

I think you can fix the lint error if you move the system #includes above the #ifdef __OBJC__.

@DellaBitta DellaBitta merged commit dc62717 into feature/admob_2021 Dec 4, 2021
@DellaBitta DellaBitta deleted the feature/admob_2021_neighboring_content branch December 4, 2021 23:29
@github-actions github-actions bot added the tests: in-progress This PR's integration tests are in progress. label Dec 4, 2021
@github-actions
Copy link

github-actions bot commented Dec 4, 2021

❌  Integration test FAILED

Requested by @DellaBitta on commit dc62717
Last updated: Sat Dec 4 17:56 PST 2021
View integration test log & download artifacts

Failures Configs
analytics [TEST] [ERROR] [iOS] [macos] [ios_target]
database [TEST] [FLAKINESS] [Android] [macos] [android_target]
(1 failed tests)  FirebaseDatabaseTest.TestInfoConnected
firestore [TEST] [ERROR] [Android] [macos] [emulator_target]

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 5, 2021
@firebase-workflow-trigger firebase-workflow-trigger bot removed the tests: in-progress This PR's integration tests are in progress. label Dec 5, 2021
@firebase firebase locked and limited conversation to collaborators Jan 4, 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.

2 participants