Post

Replies

Boosts

Views

Activity

Reply to Unable to Verify "iOS 17.0.simruntime" after iOS 17.0.1 Attempted Download
After force quitting Xcode, restarting my iMac, opening Xcode, it never opens, and watching it on Activity Monitor, it shows up, but then turns red as not responding x2. Sounds like my Xcode app is hosed or it is still trying to verify the simulator runtime??? I'm not sure how to completely delete and reinstall Xcode and get rid of whatever is causing it keep verifying the runtime.
Nov ’23
Reply to 'kUTTypeJPEG' is deprecated: first deprecated in macOS 12.0 - Use UTTypeJPEG
Yes, thank you ZackJarret. I had that ".identifier" in one permutation but not with (__bridge CFStringRef) (because I got another warning saying it could not bridge or something earlier - again I'm clueless). And in the dictionary code, adding ".identifier" as a simple NSString was enough to make it all work. FWIW, I did try chatGPT with three goarounds and finally it came up comments below. I'm glad you're human. In recent macOS SDKs, UTTypeJPEG is deprecated, and you should use kUTTypeJPEG instead. If you're seeing a warning, it's generally safe to ignore it in this case because kUTTypeJPEG is the correct constant to use on macOS. #pragma clang diagnostic ignored "-Wdeprecated-declarations" CGImageDestinationRef destinationRef = CGImageDestinationCreateWithURL((__bridge CFURLRef)theURL, kUTTypeJPEG, 1, NULL); #pragma clang diagnostic pop
Oct ’23
Reply to Is there a SetFile Date limitation workaround
I have a MacOS app in the store that tries to address the issues related by starkadhr, and some potential customer (probably some Unix guy) asked whether the app could change the creation date/year of, again, scanned photos before 1/1/1970. No. With Eskimo's reservations about changing creation dates noted, I changed the creation date my old-fashioned way in ObjC (I don't do Swift - I'm passed my prime since I had one of the first 500 apps in the app store). NSDictionary *fileDict = [NSDictionary dictionaryWithObjectsAndKeys:createDate, NSFileCreationDate, modDate, NSFileModificationDate, nil]; [[NSFileManager defaultManager] setAttributes:fileDict ofItemAtPath:[self.urlForCurrentImage path] error:nil]; I'm wondering if this ObjC code below will work with earlier dates than 1970 or is this still using setFile/old Unix code somehow? - (BOOL)setUnixSafeFileCreationDate:(NSDate *)date fileURL:(NSURL *)url { NSError *error = nil; BOOL success = [url setResourceValue:date forKey: NSURLCreationDateKey error:&error]; if (!success) { NSLog(@"NSURLCreationDateKey error: %@", error); return false; } else { return true; } }
Sep ’23
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)
Jun ’22
Reply to WatchOS Complications for App Launch Only
The documentation still says to select checkboxes for each family of complications BUT that is outdated for Xcode 12.3. I think I found only one line in thousands from WatchOS that, now, you need to add a key to Info.plist for the extension named ClockKit Complication - Supported Families and add Modular, Circular, etc. to that key. No extra coding just template/glyphs in the right sizes for each sub-family.
Dec ’20