Develop a secure signal adapterStay organized with collectionsSave and categorize content based on your preferences.
If you have a signal provider SDK that generates real-time bidding (RTB)
signals, you can develop a secure signal adapter to letGoogle Mobile Ads SDKcollect
signals from your SDK.
Google Mobile Ads SDKcalls thesetUpWithConfiguration:completionHandler:method
whenGoogle Mobile Ads SDKinstantiates your secure signal adapter. Use this method to
initialize your SDK.
When your SDK initializes fully and is ready forGoogle Mobile Ads SDKto collect
signals, call theGADMediationAdapterSetUpCompletionBlockcompletion block.
If your secure signals adapter doesn't call back,Google Mobile Ads SDKdoesn't collect
signals from your secure signal adapter.
The following example calls the completion
handler
to informGoogle Mobile Ads SDKthat your SDK has initialized successfully:
Objective-C
+(void)setUpWithConfiguration:(GADMediationServerConfiguration*)configurationcompletionHandler:(GADMediationAdapterSetUpCompletionBlock)completionHandler{// Add your SDK initialization logic here.// Invoke the completionHandler once initialization completes. Pass a nil// error to indicate initialization succeeded.completionHandler(nil);}
Your secure signal adapter must report both your adapter version and your SDK
version.Google Mobile Ads SDKuses these versions for reporting and troubleshooting.
If your SDK implements this adapter in the same binary, you can return the same
version for both the adapter and SDK versions.
The following example returns the version of your secure signal adapter:
Objective-C
+(GADVersionNumber)adapterVersion{// If your secure signals SDK implements this adapter in the same binary// return the same version as your SDK.// return [self adSDKVersion];// If you built a separate binary for this secure signals adapter, return// the adapter's version here.GADVersionNumberversion={};version.majorVersion=4;version.minorVersion=5;version.patchVersion=6;returnversion;}
The following example returns the version of your SDK that your secure signal
adapter interacts with:
Objective-C
+(GADVersionNumber)adSDKVersion{// Return your SDK's version string here.NSString*versionString=kSDKVersionString;NSArray<NSString*>*components=[versionStringcomponentsSeparatedByString:@"."];GADVersionNumberversion={};if(components.count==3){version.majorVersion=components[0].integerValue;version.minorVersion=components[1].integerValue;version.patchVersion=components[2].integerValue;}else{NSLog(@"Unexpected version string: %@. Returning 0.0.0 for adSDKVersion.",versionString);}returnversion;}
ReplacekSDKVersionStringwith your SDK version
string.
Collect signals
On every ad request,Google Mobile Ads SDKcollects signals simultaneously from all
adapters on a background thread.
The following example collects and returns signals toGoogle Mobile Ads SDKby calling theGADRTBSignalCompletionHandlercompletion handler:
Objective-C
-(void)collectSignalsForRequestParameters:(GADRTBRequestParameters*)paramscompletionHandler:(GADRTBSignalCompletionHandler)handler{// Add your signal collection logic here.NSString*signals=kSampleSignalPlaceholder;// Return the signals as a string to the Google Mobile Ads SDK.handler(signals,nil);}
ReplacekSampleSignalPlaceholderwith your
secure signal string.
Signal collection must complete within one second. If signal collection takes
longer than one second, consider caching signals in your secure signal adapter
or your SDK when youinitialize the adapter.
If your secure signal adapter fails to collect signals,
call the completion handler withnilsignals and anNSErrorobject.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-04-29 UTC."],[],[]]