Method Swizzling in iOS 5?

后端 未结 3 751
我寻月下人不归
我寻月下人不归 2020-11-30 04:28

Has Apple blocked Method Swizzling in iOS 5?

I was doing a little playing around and discovered that an app with Method Swizzling works on iOS 4 but not on iOS 5.

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-30 04:43

    Apple sent an email a while ago to some devs that were found to be using method swizzling in App Store apps:

    Your application, xxx, currently posted to the App Store is using method_exchangeImplementations to exchange the implementation of Apple provided APIs with your own implementations. Because of upcoming changes, this behavior in your application may cause a crash or cause user data loss on iPhone OS 4.0.

    xxx uses method_exchangeImplementations to exchange the implementation of dealloc with your method ttdealloc. It also exchanges the implementation of the method popViewControllerAnimated: with your method popViewControllerAnimated2:.

    Please resolve this issue immediately and upload your new binary to iTunes Connect. We may remove your application if we believe that doing so is prudent or necessary.

    Looks like they wanted to get rid of it, so I'd say chances are pretty high that they've now blocked it completely.

提交回复
热议问题