Initiate install validation by displaying an ad with signed parameters.
The process of install validation informs an ad network when users install and launch a product purchased after viewing an ad. Ad networks initiate validation by providing signed information, including a campaign ID, when displaying the ad. Later, if the ad results in a conversion, Apple notifies the ad network with a postback that includes the same campaign ID.
The method you call to display an advertised product and initiate a validation,
load, requires a signature key that you generate. To generate the signature (
SKStore), you combine the required values from Ad Network Install Validation Keys and sign the resulting string.
Combine the Parameters
In the first step of generating the signature, use the following values of Ad Network Install Validation Keys:
Product Parameter Ad Network Identifier
The ad network identifier you registered with Apple.
Product Parameter Ad Network Campaign Identifier
A campaign number you provide.
Product Parameter ITunes Item Identifier
The item identifier of the product to advertise.
Product Parameter Ad Network Nonce
UUIDvalue that you provide for each ad impression. The string representation of this nonce used in the signature must be in lowercase.
Product Parameter Ad Network Timestamp
A timestamp you generate near the time of the ad impression.
Combine the values into a UTF-8 string with an invisible separator (
'\u2063') between them, in the order exactly as shown:
Sign the Combined String
Sign the combined UTF-8 string with the following key and algorithm:
Your PKCS#8 private key, downloaded from App Store Connect.
The Elliptic Curve Digital Signature Algorithm (ECDSA) with a SHA-256 hash.
The result should be a Digital Encoding Rules (DER)-formatted binary value, which is the signature.
Encode the Signature
Encode the binary signature you generated into a Base64 string. The result is your ad network attribution signature,
SKStore. The signature string will look similar to:
Use the Generated Signature String
If the user installs and launches the advertised product, you will receive an install validation postback. See Verifying an Install Validation Postback.