13

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.

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)

I have also run the app through App Scanner but terminateWithStatus is not shown in the output.

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.

SOLVED:

After diving into the build directory:

AppName/build/AppName.build/Release-iphoneos/AppName.build/Objects-normal/armv6/ 

I ran:

strings AppName | grep 'terminateWithStatus'

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.

I hope this helps anyone else searching for a Private API call, it has not been a fun adventure.

iOSDevSF
  • 1,169
  • 1
  • 13
  • 24
  • I got the same problem and i fixed it the same way you are using. Thanks – Mashhadi Mar 14 '14 at 11:28
  • 3
    Hi, Thanks for the information. I got the same issue. I am able to display result using strings AppName | grep 'setUploadFileUrl:' but unable to find which framework uses this method. Can you suggest how to proceed ? – user2931321 Apr 23 '16 at 09:09

1 Answers1

9

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)
Baby Groot
  • 4,637
  • 39
  • 52
  • 71
Chris Cleeland
  • 4,760
  • 3
  • 26
  • 28
  • Thanks Chris, turns out the executable was buried way in the build folder. Added the output above. Still looking for the call though. – iOSDevSF Aug 12 '11 at 00:38
  • I don't know that you'll find it with strings. Maybe nm output? Or maybe try asking Apple to give you a stack trace where it's being called? – Chris Cleeland Aug 16 '11 at 21:04
  • i am not getting the folder contents in my .app file – Mashhadi Mar 14 '14 at 11:04
  • otool is a standard development tool, or at least it used to be. "man otool" is your friend. The comment "i am not getting the folder contents in my .app file" makes no sense to me. – Chris Cleeland Mar 14 '14 at 16:27
  • ChrisCleeland thanks for the info. I think @Mashhadi does not find the path you mention. He just needs to examine the contents of the app package and locate the executable. For iOS apps is as simple of just otool -L WriteRoom.app/WriteRoom – Julio Bailon Nov 16 '14 at 02:25