Updating to MacOS 12, in Objective C, I get the above warning regarding changing kUTTypeJPEG to UTTypeJPEG in two places The old code still works but even after the @import UniformTypeIdentifiers changing kUTTypeJPEG to UTTypeJPEG with various types, e.g. CFString, CFStringRef, and that UTTYPE doesn't bridge???, etc. (I am obviously clueless about this) I get the compiler warnings to go away but then the program crashes.
How do I fix these? Something to do with ARC or bridging???
CGImageDestinationRef destinationRef = CGImageDestinationCreateWithURL((__bridge CFURLRef)theURL, (NSString *)kUTTypeJPEG, 1, NULL);
NSDictionary *imageSourceCreationOptions = [NSDictionary dictionaryWithObjectsAndKeys:
kUTTypeJPEG,(NSString *)kCGImageSourceTypeIdentifierHint,
(NSNumber *)kCFBooleanTrue, (NSString *)kCGImageSourceShouldCache,
(NSNumber *)kCFBooleanTrue, (NSString *)kCGImageSourceShouldAllowFloat,
nil];