Skip to content
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

Merge release/5.11.10.0.1 into release/5.11.10.0.0 #87

Open
wants to merge 1 commit into
base: release/5.11.10.0.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Note the first digit of every adapter version corresponds to the major version of the Chartboost Mediation SDK compatible with that adapter.
Adapters are compatible with any Chartboost Mediation SDK version within that major version.

### 5.11.10.0.1
- Updated to use v2 of the SCAR API
- This version of the adapter has been certified with Google-Mobile-Ads-SDK 11.10.0.

### 5.11.10.0.0
- This version of the adapter has been certified with Google-Mobile-Ads-SDK 11.10.0.

Expand Down
2 changes: 1 addition & 1 deletion ChartboostMediationAdapterGoogleBidding.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |spec|
spec.name = 'ChartboostMediationAdapterGoogleBidding'
spec.version = '5.11.10.0.0'
spec.version = '5.11.10.0.1'
spec.license = { :type => 'MIT', :file => 'LICENSE.md' }
spec.homepage = 'https://github.com/ChartBoost/chartboost-mediation-ios-adapter-google-bidding'
spec.authors = { 'Chartboost' => 'https://www.chartboost.com/' }
Expand Down
29 changes: 22 additions & 7 deletions Source/GoogleBiddingAdapter.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2024 Chartboost, Inc.
// Copyright 2022-2025 Chartboost, Inc.
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file.
Expand Down Expand Up @@ -84,10 +84,6 @@ final class GoogleBiddingAdapter: PartnerAdapter {
func fetchBidderInformation(request: PartnerAdPreBidRequest, completion: @escaping (Result<[String: String], Error>) -> Void) {
log(.fetchBidderInfoStarted(request))

let gbRequest = GADRequest()
gbRequest.requestAgent = "Chartboost"
gbRequest.register(sharedExtras)

// Convert from our internal AdFormat type to Google's ad format type
guard let gbAdFormat = googleAdFormat(from: request.format) else {
let error = error(.prebidFailureUnsupportedAdFormat, description: "Failed to map ad format \(request.format) to GADAdFormat")
Expand All @@ -96,13 +92,32 @@ final class GoogleBiddingAdapter: PartnerAdapter {
return
}

GADQueryInfo.createQueryInfo(with: gbRequest, adFormat: gbAdFormat) { queryInfo, error in
let gbRequest: GADSignalRequest
switch gbAdFormat {
case .banner:
gbRequest = GADBannerSignalRequest(signalType: GoogleStrings.queryType)
case .interstitial:
gbRequest = GADInterstitialSignalRequest(signalType: GoogleStrings.queryType)
case .rewarded:
gbRequest = GADRewardedSignalRequest(signalType: GoogleStrings.queryType)
case .rewardedInterstitial:
gbRequest = GADRewardedInterstitialSignalRequest(signalType: GoogleStrings.queryType)
default:
let error = error(.prebidFailureUnknown, description: "Unsupported google ad format \(gbAdFormat)")
log(.fetchBidderInfoFailed(request, error: error))
completion(.failure(error))
return
}
gbRequest.requestAgent = "Chartboost"
gbRequest.register(sharedExtras)

GADMobileAds.generateSignal(gbRequest) { signal, error in
if let error {
self.log(.fetchBidderInfoFailed(request, error: error))
completion(.failure(error))
} else {
self.log(.fetchBidderInfoSucceeded(request))
let token = queryInfo?.query
let token = signal?.signalString
completion(.success(token.map { ["token": $0] } ?? [:]))
}
}
Expand Down
2 changes: 1 addition & 1 deletion Source/GoogleBiddingAdapterAd.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2024 Chartboost, Inc.
// Copyright 2022-2025 Chartboost, Inc.
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion Source/GoogleBiddingAdapterBannerAd.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2024 Chartboost, Inc.
// Copyright 2022-2025 Chartboost, Inc.
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file.
Expand Down
4 changes: 2 additions & 2 deletions Source/GoogleBiddingAdapterConfiguration.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2024 Chartboost, Inc.
// Copyright 2022-2025 Chartboost, Inc.
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file.
Expand All @@ -20,7 +20,7 @@ import GoogleMobileAds
/// last digit is the adapter's build version, and intermediate digits are the partner SDK's version.
/// Format: `<Chartboost Mediation major version>.<Partner major version>.<Partner minor version>.<Partner patch version>.
/// <Partner build version>.<Adapter build version>` where `.<Partner build version>` is optional.
@objc public static let adapterVersion = "5.11.10.0.0"
@objc public static let adapterVersion = "5.11.10.0.1"

/// The partner's unique identifier.
@objc public static let partnerID = "google_googlebidding"
Expand Down
2 changes: 1 addition & 1 deletion Source/GoogleBiddingAdapterInterstitialAd.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2024 Chartboost, Inc.
// Copyright 2022-2025 Chartboost, Inc.
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion Source/GoogleBiddingAdapterRewardedAd.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2024 Chartboost, Inc.
// Copyright 2022-2025 Chartboost, Inc.
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion Source/GoogleBiddingAdapterRewardedInterstitialAd.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2024 Chartboost, Inc.
// Copyright 2022-2025 Chartboost, Inc.
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file.
Expand Down