由于一次私有(private) API 函数调用,我的 iOS 应用程序(使用 Boehm 垃圾收集器)在 AppStore 中被拒绝。这里是文件 os_dep.c
中的违规函数:
/* These are not defined in any header, although they are documented */
extern boolean_t
exc_server(mach_msg_header_t *, mach_msg_header_t *);
这里是文件的链接:os_dep.c on github
我尝试注释掉函数定义和调用,应用程序看起来运行良好,但这是一个非常糟糕的黑客行为。
我的问题:这个函数调用重要吗? iOS 中真的需要它吗?
最佳答案
该函数仅在通过 GC_enable_incremental() 调用启用的增量 GC 模式下需要。我怀疑您没有调用它,因此应用程序中不会调用 exc_server() 和 friend 。
我建议您传递“-D GC_DISABLE_INCRMENTAL”,而不是注释掉 exc_server(),这会从收集器二进制文件中删除增量模式支持。
关于ios - iOS 中不允许私有(private) API 调用(函数 "exc_server"),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58429255/