privacy-tech-lab / gpc-android

Code and dynamic analysis scripts for GPC on Android
https://privacytechlab.org/
MIT License
5 stars 1 forks source link

Detect third parties included in apps to opt out from their sale of data #2

Closed SebastianZimmeck closed 4 years ago

SebastianZimmeck commented 5 years ago

In our SDK, which is integrated in an app, we would like to detect the third parties that are included in the app. Here is the strategy:

Pick a public class and check if that is available or not.

Following is an example for Google Analytics. Google Analytics has a public class called GAI (API Reference). If GAI class is available we can assume app is using Google Analytics SDK.

if NSClassFromString("GAI") != nil {
    print("App is using Google Analytics SDK")
}

This strategy works well. I have tested it.

SebastianZimmeck commented 4 years ago

At this point we are going in a different direction.