kUTTypeImage is defined in MobileCoreServices.framework
This gets me every time I try to create a sharing extension for iOS. I follow along with the WWDC session ”Creating Extensions for iOS and OS X, Part 1” from 2014 and when I encounter this line, I get an error:
1 2 |
if ( [ itemProvider hasItemConformingToTypeIdentifier:( __bridge NSString *) kUTTypeImage ] ) { |
The problem is that kUTTypeImage
is unknown to Xcode. The solution is to import MobileCoreServices.framework
.
(For more on this, check out this StackOverflow thread.