You were so close! Just have to call the identifier method on UTTypeJPEG.
CGImageDestinationRef destinationRef = CGImageDestinationCreateWithURL((__bridge CFURLRef)theURL, (__bridge CFStringRef)UTTypeJPEG.identifier , 1, NULL);
Topic:
App & System Services
SubTopic:
General
Tags: