I am not sure if you have to explicitly link against certain frameworks/dylibs though, someone with more knowledge feel free to correct me
I've always wondered why Apple doesn't run all apps against a "debug" build of iOS that asserts that the caller of private APIs is itself internal/private to Apple, but instead relies on something akin to grepping the output of strings(1)
[1] https://developer.apple.com/library/ios/documentation/Genera...
There's even a paper on intentionally inserting security flaws into your code and then exploiting them from your own server to change execution patterns:
https://www.usenix.org/conference/usenixsecurity13/technical...
Ultimately, you need to enforce access control instead of just trying to detect problems a priori. Apple's sandbox is a great start to that, and I expect they'll keep improving it to block apps like these.
We scan code on both iOS and Android, identifying libraries and patterns of behavior. OpenSSL, for example, is the same code, regardless of platform, but the versions of it may vary depending on packaging and porting. We found one guy who had compiled OpenSSL for Android and was distributing binaries from github. Not the safest way to get your software.
As a third-party, you can move quickly and correlate info across app stores. But I also think we've developed a pretty unique code analysis engine that neither Apple nor Google has. :-)