Singular-SKAdNetwork-App icon indicating copy to clipboard operation
Singular-SKAdNetwork-App copied to clipboard

Signature paramenters logic for choosing V1\V2 is NOT according to spec

Open oded-regev opened this issue 4 years ago • 2 comments

from SingularPublisherSampleApp/ViewController.m

    // The Ad Network needs to generate different signature according to the SKAdNetwork version.
    // For OS version below 14.0 we should pass '1.0', and for 14.0 and above we need to pass '2.0'.
    float osVersion = [[[UIDevice currentDevice] systemVersion] floatValue];
    NSURLQueryItem *skAdNetworkVersion = [NSURLQueryItem
                                          queryItemWithName:REQUEST_SKADNETWORK_VERSION_KEY
                                          value:osVersion < 14 ? REQUEST_SKADNETWORK_V1 : REQUEST_SKADNETWORK_V2];

According to Apple - Choose Parameters Based on Signature Version

Version 2.0 is available for apps that are compiled with the iOS 14 SDK and signed by the App Store. 
Version 1.0 is available starting in iOS 11.3.

oded-regev avatar Aug 11 '20 06:08 oded-regev

Hey @oded-regev, doing some SKAdnetwork learning right now, so forgive me if I’m missing something obvious, but could you elaborate? I’m not seeing immediately what’s wrong with the info you sent in this issue.

For the record, there’s the update that apps running on iOS 14.5 should use v2.2. And apps on iOS 14.0 thru 14.5 should use v2.1.

NateFuller avatar Feb 11 '21 04:02 NateFuller

Hi, this code may be OK after all, it wasn't clear from Apple docs initially so I raised the issue here.

Please note that Apple refers to the iOS SDK the app was compiled with (i.e. for CNN the Xcode version the CNN developer used to build the app) and in the code you check the device OS version which is different (app built with SDK 14 may run on iOS 12 device).

I'm not sure which is correct, it does feel like the device OS is what really matter.

oded-regev avatar Feb 11 '21 11:02 oded-regev