0

I just got some work for the old project. There is compile-time error with IMP instance:

enter image description here

While searching for the cause and solution I came across the links:

https://developer.apple.com/forums/thread/666701

But those didn't helped me understand the solution. What should be done to get rid of the error?

iAkshay
  • 1,143
  • 1
  • 13
  • 35

1 Answers1

0

The solution given at https://developer.apple.com/forums/thread/666988 worked for me. There is some warning, but at least build is successful.

id (*grannyImp)(Class, SEL) = (id(*)(Class,SEL))class_getMethodImplementation(granny, _cmd);
//IMP grannyImp = class_getMethodImplementation(granny, _cmd);
grannyImp(self, _cmd); 
iAkshay
  • 1,143
  • 1
  • 13
  • 35