4

I followed this article for objective-c method swizzling. I'm successfully able to swizzle methods objective -c class methods. I also want to swizzle core foundation methods like CFHostCreateWithName(). Is it possible to swizzle core foundation methods?

1 Answers1

4

Swizzling does not exist for C function, but there is an equivalent called patching. Unfortunately, it will not work on iOS.

In OS X, A code injection system like mach_override can be used to patch functions. It's not available for iOS. Even if you could get it to work, Apple would never approve it for the App Store.

Jeffery Thomas
  • 42,202
  • 8
  • 92
  • 117