简体   繁体   English

Apple App Store提交的内容,除了Apple对非公共API的使用进行自动测试外,还有其他人吗?

[英]Apple App Store submission, anyone other than Apple automated testing for use of Non-Public APIs?

Apple clearly has this automated in some way, I would like to have access to a version of the system they're using. 苹果显然以某种方式实现了这种自动化,我希望能够访问他们正在使用的系统版本。

Barring that, I'm interested in knowing if anyone out there has implemented a this on their own. 除此以外,我有兴趣知道是否有人自己实现了此功能。 I sometimes work in a team where the lesser experienced developers may unknowingly use a non-public API or I may be asked to use a third-party library that unbeknownst to me is using an API that is non-public. 有时,我在一个团队中工作,在这些团队中,经验较少的开发人员可能在不知不觉中使用非公开API的情况, 或者可能会要求我使用我不知道的第三方库使用非公开API。

I know that the app executable can be scanned for the method names. 我知道可以扫描应用程序可执行文件的方法名称。 I'd like to run those against a database of either the known non-public methods or against the public ones. 我想针对已知的非公共方法的数据库或针对公共方法的数据库运行这些方法。 In Objective-C/SQL part of the process might be like: 在Objective-C / SQL中,该过程的一部分可能类似于:

for (NSString *selector in methodsArray) {
   NSArray *array = [DataSource arrayWithQueryString:[NSString stringWithFormat:(SELECT `selectors` FROM `publicAPI` WHERE `selector` = '%@'),selector]]; 
   BOOL public = ([array count] > 0);
   if (!public) 
      return NO;
}

My guess is most of the work would be in how to isolate the method names and store them in the database in a way that checking against them would be most efficient. 我的猜测是,大多数工作将集中在如何隔离方法名称并将其存储在数据库中的方式上,以使其最有效。

I could create a version of this myself but if there's someone who's already done it, I'm interested in knowing about it, and I don't care what language it's achieved in. 我可以自己创建一个版本,但是如果有人已经做过,我会对了解它感兴趣,并且我不在乎它用什么语言实现。

就是这个了,App Scanner http://www.chimpstudios.com/appscanner/

If you're calling an API that isn't in one of Apple's public headers, you'll get compiler warnings like "selector not recognized". 如果调用的API不在Apple的公共标头之一中,则会收到诸如“选择器无法识别”之类的编译器警告。 It should be quite rare that you would accidentally use private APIs. 偶然使用私有API的情况应该很少见。

Now, it's possible to suppress the compiler warnings if you take specific steps to do so— creating your own interface to an object containing declarations of the private API methods, for example. 现在,如果采取特定步骤可以抑制编译器警告,例如,为包含私有API方法声明的对象创建自己的接口。 If you've got a rogue developer on your team, or you're inheriting code, something like that might catch you by surprise. 如果您的团队中有一个流氓开发人员,或者您正在继承代码,那么类似的事情可能会让您大吃一惊。

You also have to be careful if you're using a testing framework like the GTM iPhone test kit, which uses private API calls. 如果使用的测试框架(例如GTM iPhone测试套件)使用私有API调用,则还必须小心。 If it accidentally gets compiled into your submitted binary, you'll get dinged. 如果不小心将其编译到您提交的二进制文件中,您将流连忘返。 Xcode 4 helps mitigate this risk because testing in the new IDE is a whole separate action, not just a separate target. Xcode 4有助于减轻这种风险,因为在新IDE中进行测试是一个完全独立的动作,而不仅仅是一个单独的目标。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 苹果因非公开API跳板而拒绝了我的应用 - Apple rejected my app because of non-public APIs springboard Apple拒绝了我在非公共API上使用的app:create,但我没有找到名为“create”的API - Apple rejected my app that for use on non-public APIs: create , but I didn't found the API named “create” 问题Apple Store:非公共API“setMaximumLength,MaximumLength - Issue Apple Store: non-public API "setMaximumLength, MaximumLength 苹果会允许这种非公开方法吗? - Would apple allow this this non-public method? 如何在不使用非公共API和Apple拒绝的情况下禁用UITextView上的共享? - How to disable sharing on UITextView without using non-public APIs and Rejected by apple? 与Apple App Store提交一起使用的许可 - License to use with Apple App Store Submission iOS应用程序被拒绝:非公共API - iOS App Rejected : non-public APIs 如何在 Apple App Loader 中调试“应用程序引用非公共选择器”错误? - How to debug "The app references non-public selectors" error in Apple App Loader? 由于animationDidStop,Apple拒绝了应用程序:完成:context:是一个非公开API - Apple rejected app because of animationDidStop:finished:context: is a non-public api iOS应用程序被拒绝:应用程序使用或引用非公共API - iOS App Rejected: app uses or references non-public APIs
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM