1

I'm working on a jailbreak tweak where I need to detect an incoming call. I can successfully get the CTCall object however, when I call callState to get the current state it throws up this error and crashes:

Feb 23 12:56:07 iPhone-5 SpringBoard[23247] : CTCall: {status = 3, type = 0x1, uuid = 0x211bf240 [68952DF3-B9CF-4BAD-A538-B802B7B49CC8], address = 0x21164bb0, externalID = -1, start = 2.22507e-308, session start = 3.83317e+08, end = 2.22507e-308}

Feb 23 12:56:07 iPhone-5 SpringBoard[23247] : -[__NSCFType callState]: unrecognized selector sent to instance 0x211c8c10

Feb 23 12:56:07 iPhone-5 SpringBoard[23247] : * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFType callState]: unrecognized selector sent to instance 0x211c8c10'

The first log line is just checking that there is indeed a CTCall object that I'm trying to call callState on. Clearly, there is a CTCall object so I don't understand why this is failing to work?

The exact code that is producing the above output:

 NSLog(@"CTCall: %@", call);

 NSLog(@"*** Value of CTCall state: %@", call.callState);

If anyone could help out it would be greatly appreciated. Thanks!

cud_programmer
  • 1,244
  • 1
  • 20
  • 37
  • Not sure if this question still needs answering, but here's a reference to our other [question where we discuss a workaround](http://stackoverflow.com/a/14765396/119114). – Nate Feb 27 '13 at 11:05

0 Answers0