Post

Replies

Boosts

Views

Activity

Reply to valid replacement for kUTTypeJPEG which is deprecated
So, I had a similar circular warning for this same method where I wanted to identify a JPG or a PNG image and create an image with the appropriate extension. Although a good example of how to use it was not clear to me and here's what worked for me (Objective C). Import the newer identifiers: @import UniformTypeIdentifiers; Create a property to hold the identifiers: @property (strong) NSString *imageType; Assign one of the identifiers to the property: if ([theImageExtension isEqualToString:@"png"]) {         _imageType = (NSString *)UTTypePNG.identifier;     } else {         _imageType = (NSString *)UTTypeJPEG.identifier;     } Use it: CGImageDestinationRef destinationRef = CGImageDestinationCreateWithURL((__bridge CFURLRef)theURL, (CFStringRef)_imageType, 1, NULL); And that worked! (after many permutations)
Topic: Media Technologies SubTopic: Audio Tags:
Jun ’22
Reply to valid replacement for kUTTypeJPEG which is deprecated
So, I had a similar circular warning for this same method where I wanted to identify a JPG or a PNG image and create an image with the appropriate extension. Although a good example of how to use it was not clear to me and here's what worked for me (Objective C). Import the newer identifiers: @import UniformTypeIdentifiers; Create a property to hold the identifiers: @property (strong) NSString *imageType; Assign one of the identifiers to the property: if ([theImageExtension isEqualToString:@"png"]) {         _imageType = (NSString *)UTTypePNG.identifier;     } else {         _imageType = (NSString *)UTTypeJPEG.identifier;     } Use it: CGImageDestinationRef destinationRef = CGImageDestinationCreateWithURL((__bridge CFURLRef)theURL, (CFStringRef)_imageType, 1, NULL); And that worked! (after many permutations)
Topic: Media Technologies SubTopic: Audio Tags:
Replies
Boosts
Views
Activity
Jun ’22
Reply to Automator Action Testing Fails with Could Not Attach to PID
BTW, I also took a completely empty (no additional code, nothing added to blank xib) Automator Action template (found in MacOS) in Xcode 13.2.1 and followed the Technical Q&A QA1885 exactly and still get this error.
Replies
Boosts
Views
Activity
Feb ’22