NSData
is actually a class cluster which just provides the interface, and there are multiple special implementations for it around. It appears that OS_dispatch_data
is such a special implementations made to pass data objects around blocks, especially since your UIImage
creation doesn't crash (as it would if you would pass it a non NSData
object, or just garbage memory). Instead, it looks like UIImage
simply doesn't recognize the format the image is in!
By the way, Apple has a great guide about the concept of class clusters, which can be found here.