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

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

Open
oded-regev opened this issue Aug 11, 2020 · 2 comments

Comments

@oded-regev
Copy link

oded-regev commented Aug 11, 2020

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.
@NateFuller
Copy link

NateFuller commented Feb 11, 2021

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.

@oded-regev
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants