Apple and private APIs

后端 未结 7 883
你的背包
你的背包 2021-01-02 11:13

Now that it\'s public knowledge that App Store submissions are being tested for use of private APIs, I need to ask the question... what exactly is a private API so that I ma

7条回答
  •  情话喂你
    2021-01-02 11:52

    It's not just private APIs that can cause your application to get rejected. Using undocumented members of a public API can cause your application to get rejected. For example, the three20 library (since fixed) accessed _phase and other members of UITouch within a category.

    They can also detect calls to private members via performSelector, as the following also flagged a rejection:

    UIWindow* window = [UIApplication sharedApplication].keyWindow]
    return !![window performSelector:@selector(firstResponder)];
    

    More disturbing, if you make your application work under 3.1 and 3.0 and at runtime in 3.0 you don't use any of 3.1 stuff your application can still get rejected. An example might be the cameraOverlayView of UIImagePickerController (see here). This is kind of puzzling.

提交回复
热议问题