Will fork() in iOS app likely be rejected by Apple's vetting process?

夙愿已清 提交于 2019-11-26 21:21:20

问题


I'm writing a mechanism (in an iOS app) to detect whether a device is jailbroken by checking for App sandbox's integrity by doing a fork();. Does anyone know if attempting this call would violate App Store guidelines?


回答1:


fork() (and other) will not get you rejected; operations that are denied by the vanilla os cannot be reproduced while in submission. I have applications on the appstore that use fork() and system() calls to check for jailbreak environment and none of them got rejected for this :)




回答2:


You can't create new process in an iOS application on a non jailbroken device (you would get an error such as "Operation not permitted"), but you can create new thread using pthread library.

Edit : But if you're trying to detect whether a device is jailbroken, I don't think that would violate the store guidelines just to 'try' to do a fork, but it's more a legal question than a technical question.

I found nothing in the app store guidelines that forbid the use of calling some low-level API. Which is logical, since jailbreak doesn't exist, what would they forbid you to do something that you're not able to do ?

The closest things I found are :

  • Apps that read or write data outside its designated container area will be rejected
  • Apps that download code in any way or form will be rejected
  • Apps that install or launch other executable code will be rejected



回答3:


fork(2) may get you rejected. If your purpose is to check if the device is jailbroken, you can check the existence of APT.

From my experience, an app that tries to check if a folder exists at /private/{etc,var}/apt (APT's configure and cache directory, required by Cydia to work but does not exist on vanilla iOS devices) exists using NSFileManager does not get rejected.



来源:https://stackoverflow.com/questions/15893849/will-fork-in-ios-app-likely-be-rejected-by-apples-vetting-process

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!