

The only picture with Retina support is the 512 2x (1024). 32 and 16 are all simply empty (present but invisible).I used App WRaper Mini to get a fuller list, in particular to see if Retina support was there. I dragged the picture to the finder, it is an empty picture, an invisible background. Also, there is only one of each no distinction between 32 and 8 bit. When open in Preview (see Preview.png), the 32 and 16 icons are there, but they are just grey.

For 32 and 16, I made the 8 bit icon in red.Īfter building, I extracted the icon created by Xojo (attached as App.icns). In the project I attached, I placed a picture in each slot of the app icon, with the size of it. Steps: There is a big issue going on with icons in Mac builds. Status: Needs Review Rank: Not Ranked Product: Xojo Category: N/A With parts based on and and of course macoslib.Ĥ0209 - All sizes 48 and under missing in icns
WIHHC APPICON TO AD TO EACH SLOT SWIFT CODE
Define the NSRect struct (x, y, w, h as Single), put the code below in a Canvas Paint event and add your “targetFilePath”:ĭim targetImageSize as Integer = min(g.width, g.height)Ĭonst targetFilePath = “/SAMPLE/PATH/SAMPLE_FILE”ĭeclare function NSClassFromString lib “Cocoa” (aClassName as CFStringRef) as Ptrĭeclare function iconForFile lib “Cocoa” selector “iconForFile:” (obj_id as Ptr, fullPath as CFStringRef) as Ptrĭeclare function sharedWorkspace lib “Cocoa” selector “sharedWorkspace” (class_id as Ptr) as Ptrĭeclare sub CGContextDrawImage lib “Cocoa” (context as Ptr, rect as NSRect, image as Ptr)ĭeclare function CGImageForProposedRect lib “Cocoa” selector “CGImageForProposedRect:context:hints:” (obj_id as Ptr, byref proposedDestRect as NSRect, referenceContext as Ptr, hints as Ptr) as Ptrĭim imageRef as MemoryBlock = iconForFile(sharedWorkspace(NSClassFromString(“NSWorkspace”)), targetFilePath)ĭim p as new picture(targetImageSize,targetImageSize)ĭim cntx as Ptr =ptr(p.Graphics.Handle(Graphics.HandleTypeCGContextRef))ĭim cgPtr as Ptr = CGImageForProposedRect( imageRef, rect, nil, nil)
