I assumed Apple plugged this hole by now :/
No.
Too few devs are really careful about their dependencies and do good due diligence when evaluating them for suitability. Everyone else is just “Hey our problem is solved by this one. YOLO! Link it and ship it LOL!” I’ve seen projects that link and ship binary dependencies without even being able to inspect the source. This is, to me, totally insane. But standard practice in a lot of places!
> ...we included just because...
Bob from marketing is the one who asked for the integration.
> We should talk to Bob from marketing to make sure...
Bob has no clue about this stuff.
We're not asking Bob what the SDK is doing, we're telling him. And any other decision makers in the vicinity.
Then we see whether the decision about the SDK changes. If not, we have to make our own personal ethical decision about what to work on.
For example, if the clipboard contained “FPS” when started, an FPS counter would be shown in game.
Note: this was a long time ago, there are better methods now.
Obviously this sort of thing needs super-explicit user opt-in and needs to be secured sufficiently that it can't leak private data, and it's possible/likely that a lot of SDKs aren't great about this.
Instead, it may very well be be some analytics/marketing SDK that has been included in the app because of a business request. These have no privilege separation: they run their code in the same context as the code that the app developers wrote. (Consider the example of games with no text UI; unless they're truly spying on their users, what would they get from doing this?)
I've said before, this SDK privacy hole is something we need to be very aware of as engineers and push our product/marketing folks to recognize as well. I would love to see Apple address it too. (On the other I have no idea how they would.)