SRGSSR / srganalytics-apple

Covers analytics needs for SRG SSR products.
MIT License
0 stars 1 forks source link

The library is linked to AdSupport #51

Closed pyby closed 3 years ago

pyby commented 3 years ago

Issue type

Incorrect behavior

Description of the problem

@defagos reported that the current SRGAnalytics version is linked to AdSupport, which is not what we expect. ASIdentifierManager class and advertisingIdentifier method can be found.

Environment information

Reproducibility

Always reproducible

Steps to reproduce

  1. Run an application.
  2. Use a breakpoint.
  3. po NSClassFromString(@"ASIdentifierManager") has to return nil. (currently, it returns ASIdentifierManager.

An other check with the command line:

  1. Go the the project folder.
  2. grep -r advertisingIdentifier ..

No binary and code files has to be returned. (currently, TCCore binaries are returned).

pyby commented 3 years ago

We found the AdSupport framework linked in the TCCore library.

History

We used a custom build since December 2019. https://github.com/SRGSSR/tagcommander-apple/releases First, we just pick "no IDFA" binary versions, but next we built a custom version. The last "fat binary" version is built without IDFA. https://github.com/SRGSSR/tagcommander-apple/releases/tag/4.5.4_4.4.1_srg3

The next XCFramework custom build for SPM has the "IDFA" flag, and the link to AdSupport. https://github.com/SRGSSR/TCCore-xcframework-apple/releases/tag/4.5.4-srg3 Last version has the "IDFA" flag, and the link to AdSupport. https://github.com/SRGSSR/TCCore-xcframework-apple/releases/tag/4.5.4-srg4

Fix proposal

I found a @defagos's commit from 2019 in the source repository to build a custom version with no IDFA, so no link to AdSupport.

I applied and build a new version of TC libraries:

Now, po NSClassFromString(@"ASIdentifierManager") returns nil. grep -r advertisingIdentifier . can only found its in some dSYMs files, same as we found it in the old "fat binary" versions.

The update is on feature/no-ad-support.

defagos commented 3 years ago

Released in 7.0.1, thanks for the fix!