查找私有API调用_terminateWithStatus [英] Finding Private API Call _terminateWithStatus
问题描述
我刚刚收到来自Apple的电子邮件,说明我的应用程式因_terminateWithStatus的呼叫而被拒绝。我有一些框架在应用程序,并相信可能是罪魁祸首。
I just received an email from Apple stating my app has been rejected for the call of _terminateWithStatus. I have a few frameworks in the app and believe that could be the culprit.
我已经运行otool这里是我的输出
I have ran otool here is my output
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)
/System/Library/Frameworks/Foundation.framework/Foundation (compatibility version 300.0.0, current version 751.49.0)
/System/Library/Frameworks/UIKit.framework/UIKit (compatibility version 1.0.0, current version 1400.0.0)
/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics (compatibility version 64.0.0, current version 600.0.0)
/System/Library/Frameworks/CoreData.framework/CoreData (compatibility version 1.0.0, current version 320.15.0)
/System/Library/Frameworks/MapKit.framework/MapKit (compatibility version 1.0.0, current version 14.0.0)
/System/Library/Frameworks/CFNetwork.framework/CFNetwork (compatibility version 1.0.0, current version 485.12.7)
/System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration (compatibility version 1.0.0, current version 379.0.0)
/System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices (compatibility version 1.0.0, current version 20.0.0)
/System/Library/Frameworks/CoreLocation.framework/CoreLocation (compatibility version 1.0.0, current version 370.3.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 150.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.4.0)
/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 227.0.0)
/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation (compatibility version 150.0.0, current version 550.52.0)
我还通过应用扫描仪运行应用程序< a> but terminateWithStatus不会显示在输出中。
I have also run the app through App Scanner but terminateWithStatus is not shown in the output.
任何人都可以指出正确的方向找到这个?我也看到一些谈论使用nm和grep找到呼叫。提前感谢。
Can anyone point me in the right direction on finding this? I have also seen some talk about using nm and grep to find the call. Thanks ahead of time.
解决:
:
AppName/build/AppName.build/Release-iphoneos/AppName.build/Objects-normal/armv6/
我跑了:
strings AppName | grep 'terminateWithStatus'
并返回一个结果。经过一些挖掘,我发现GHUnit,测试框架,正在打电话。我删除框架,重建,并再次运行string命令没有任何结果。
and returned one result. After some digging, I found GHUnit, testing framework, was making the call. I removed the framework, rebuilt, and ran the string command again without any results.
我希望这可以帮助任何人搜索私人API调用,它不是一个有趣的冒险。
I hope this helps anyone else searching for a Private API call, it has not been a fun adventure.
推荐答案
您必须对可执行文件而不是应用程序包装运行otool。
You have to run otool on the executable, not on the app wrapper.
例如(对于格式化奇怪的遗憾):
For example (sorry for the formatting weirdness):
$ otool -L WriteRoom.app/Contents/MacOS/WriteRoom
WriteRoom.app/Contents/MacOS/WriteRoom (architecture ppc):
@executable_path/../Frameworks/Blocks.framework/Versions/A/Blocks (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 11.0.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.3.3)
WriteRoom.app/Contents/MacOS/WriteRoom (architecture i386):
@executable_path/../Frameworks/Blocks.framework/Versions/A/Blocks (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 11.0.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.3.3)
这篇关于查找私有API调用_terminateWithStatus的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!