Is there a way of getting a Mac’s icon given its model number?

Mac App Store safe Manually map model identifier to icon name and then use e.g [[NSWorkspace sharedWorkspace] iconForFileType:@”com.apple.macbookair”]; or [NSImage imageNamed:NSImageNameComputer] If you need higher resolution than imageNamed provides use OSType code = UTGetOSTypeFromString((CFStringRef)CFSTR(“root”)); NSImage *computer = [[NSWorkspace sharedWorkspace] iconForFileType:NSFileTypeForHFSTypeCode(code)]; where “root” string is from IconsCore.h header file (kComputer). Copy this plist to get the … Read more

Why does my MCSession peer disconnect randomly?

This is a bug, which I just reported to Apple. The docs claim the didReceiveCertificate callback is optional, but it’s not. Add this method to your MCSessionDelegate: – (void) session:(MCSession *)session didReceiveCertificate:(NSArray *)certificate fromPeer:(MCPeerID *)peerID certificateHandler:(void (^)(BOOL accept))certificateHandler { certificateHandler(YES); } The random disconnects should cease.