开发者

Undocumented Methods: Use them or not?

I want to know what the risks are of using undocumented methods in the iPhone SDK.

I haven't had any issues thus far, but I am worried that doing som开发者_如何学Pythonething like this might screw up the app.

Any opinions/suggestions are greatly appreciated.


Apple has recently begun running apps through a static analyzer that will catch use of undocumented (i.e., private) method calls and automatically reject them (unless Steve Jobs takes pity on you; I wouldn't count on it, though).

That said, there's nothing stopping you from using them for private apps, although you should be careful with OS updates since private methods are not guaranteed to function the same (even if you get the same results, the implementation might have different side effects).


The risks of calling an undocumented method are the same in any application; since the method is not publicly known, it is more likely to change without warning in a future version of the library than in a public API.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜