Posts

Post marked as solved
4 Replies
187 Views
How to change Bundle ID in "Certificates, Identifiers & Profiles" (Edit your App ID Configuration) ? Which certificate is needed for a free Mac application (.app) ? The application need only save\restore disk data (no extension, no wifi, no In-App Purchase, etc). A very simple basic 3 windows application (type math Calculator). Do I need set some "Capabilities" (App Services) ?
Posted
by Alain_B.
Last updated
.
Post not yet marked as solved
1 Replies
633 Views
DADiskCopyDescription() give basic information for disk and partition but not how these info elements are linked together. By example how to get the volume parent container ? How to decode de CFSTR given by DADiskCopyDescription() ? When does DAMediaContent hold "GUID_partition_scheme" or "FDisk_partition_scheme" ? For volume DAMediaContent is something like "C12A7328-F81F-11D2-BA4B-00A0C93EC93B" (with volume name in DAMediaName). But DAMediaContent with such numeric value is not always volume (DAMediaName and DAVolumeKind are then empty). And sometime DAMediaContent is empty. Where can I found documentation about DADiskCopyDescription() and the way to get APFS volume\container childs and parent
Posted
by Alain_B.
Last updated
.
Post not yet marked as solved
0 Replies
398 Views
When porting an old Mac project to Silicon (universal) I got an issue with IB to open MainMenu.xib: Trust opening older file format? “MainMenu.xib” uses an older format that is potentially insecure when decoded. If you trust the content of this file, open and save it to upgrade to the modern format. The "open and Upgrade" button make the MainMenu.xib not editable: it seem that every submenus has disappeared. How can I fix it ? Any suggestion will be greatly appreciate.
Posted
by Alain_B.
Last updated
.
Post not yet marked as solved
0 Replies
500 Views
In the "mouseDown" (or MouseDreagged) code below Enclosure is a NSView subclass. xcode report 2 warnings: pb_item setDataProvider:self forTypes:[NSArray arrayWithObjects:NSPasteboardTypeTIFF, NSPasteboardTypePDF, @"LN_PboardType", nil]]; Sending 'Enclosure *' to parameter of incompatible type 'id _Nonnull' NSDraggingSession *draggingSession = [self beginDraggingSessionWithItems:[NSArray arrayWithObject:drag_item] event:drag_event source:self]; Sending 'Enclosure *' to parameter of incompatible type 'id _Nonnull' The application fail at: drag_item = [[NSDraggingItem alloc] initWithPasteboardWriter:pb_item]; Pasteboard item data provider <Enclosure: 0x7f849ec74e70> must conform to NSPasteboardItemDataProviderProtocol [General] There are 0 items on the pasteboard, but 1 drag images. There must be 1 draggingItem per pasteboardItem. However if in the line of code above "pb_item" is replaced by "drag_image" drag work fine (but without drop). The z_drag image follow the mouse correctly and "endedAtPoint" is called when the mouse button is released. Where is the error ? Any suggestion will be appreciate... BigSur, xcode 12.4 - (void)mouseDown:(NSEvent *)drag_event /* or mouseDragged:(NSEvent *)drag_event */ { NSImage *drag_image; NSPoint drag_position; NSDraggingItem *drag_item; NSPasteboardItem *pb_item; pb_item = [[NSPasteboardItem alloc] init]; [pb_item setDataProvider:self forTypes:[NSArray arrayWithObjects:NSPasteboardTypeTIFF, NSPasteboardTypePDF, @"LN_PboardType", nil]]; drag_image = [NSImage imageNamed:@"z_drag.jpg"]; drag_item = [[NSDraggingItem alloc] initWithPasteboardWriter:pb_item]; drag_position = [self convertPoint:[drag_event locationInWindow] fromView:nil]; drag_position.x -= [drag_image size].width/2; drag_position.y -= [drag_image size].height/2; [drag_item setDraggingFrame:NSMakeRect(drag_position.x, drag_position.y, drag_image.size.width, drag_image.size.height) contents:drag_image]; NSDraggingSession *draggingSession = [self beginDraggingSessionWithItems:[NSArray arrayWithObject:drag_item] event:drag_event source:self]; [draggingSession setAnimatesToStartingPositionsOnCancelOrFail:YES]; [draggingSession setDraggingFormation:NSDraggingFormationNone]; } - (NSDragOperation)draggingSession:(NSDraggingSession *)session sourceOperationMaskForDraggingContext:(NSDraggingContext)context { switch (context) { case NSDraggingContextWithinApplication: return NSDragOperationCopy; case NSDraggingContextOutsideApplication: return NSDragOperationMove; } return NSDragOperationNone; } - (void)draggingSession:(NSDraggingSession *)session endedAtPoint:(NSPoint)screenPoint operation:(NSDragOperation)operation { NSPoint mouse_point; mouse_point = [session draggingLocation]; switch (operation) { case NSDragOperationDelete: break; default: break; } }
Posted
by Alain_B.
Last updated
.