|
|
|
|
|
by ChrisMarshallNY
2131 days ago
|
|
> Mintegral SDK uses a technique called method swizzling to replace implementations of the UIApplication openURL and SKStoreProductViewController loadProductWithParameters methods at runtime, as well it registers a custom NSURLProtocol class. That's really clever. It looks like it uses ObjC dynamic linking to swap out calls[0]. When I read stuff like this, I'm glad that I'm a "dependency curmudgeon." I'm not sure I would have figured this out, if I had vetted the dependency (Actually, I'm pretty sure I would have missed it). I'm wondering if Apple would be able to detect this behavior, in their review process. There are certainly legitimate uses for it, but I like to avoid these types of hacks, in my shipping apps. [0] https://nshipster.com/method-swizzling/ |
|
It reminds of something I'd done to get past the App store review a long time ago. This was when the iPad had just come out and UISplitViewController was super buggy. I found that the only way to get the universal app I was building to work satisfactorily on both the iPad and the iPhone was to use one of their undocumented methods. We submitted the app for review and as I'd half expected, it was rejected for using an undocumented API. The work around was to rot-13 the selector for the undocumented method and to decode it at runtime, dynamically call the method with performSelector. That made it pass the review. And that's when I learnt that the reviewers were probably just running strings (the unix program) and grep to find apps using undocumented APIs. That was a long time ago, I hope things have gotten better by now. :)