2

I recently found out about a tool called cycript that apparently does runtime analysis of binaries written with Objective-C. I have a Mac OS X binary that is compiled as x86_64 and is intended to run on Intel Macs. I know cycript is intended to for iOS applications but I wouldn't mind using it on this binary to poke around and see what is going on inside the binary. Most instructions I see for cycript state to start off with UIApp, and then investigating further objects from there.

My problem is when I try to investigate UIApp with cycript I get the following error message,

ReferenceError: hasProperty callback returned true for a property that doesn't exist.

I am assuming I am getting this error message because the binary does not have a UIApp class / method in it because it is a Mac OS X binary and not an iOS.

Where would be a good starting point for using cycript with a Mac OS X binary?

ipatch
  • 331
  • 2
  • 15

1 Answers1

3

UIApp is a shorthand for [UIApplication sharedApplication].

As this is not an iOS app, but an OS X app you need to use [NSApplication sharedApplication] instead.

Tyilo
  • 350
  • 1
  • 7
  • Similarly to UIApp, You can also use NSApp as shorthand for [NSApplication sharedApplication] https://developer.apple.com/documentation/appkit/nsapplication/nsapp – Charlton Provatas Mar 02 '18 at 20:01