Post

Replies

Boosts

Views

Activity

Reply to setNameFieldStringValue in ModalDialog
Eventually with some difficulty I solved this problem. To make sure that the accessory panel is loaded from the .xib I do this: IBOutlet NSView* accessoryView; if(!accessoryView){ //not loaded yet         NSArray *_Nullable* topLevelObjects = nil; //allocated as nil but doing it explicitly supresses a compiler warning         if([[NSBundle mainBundle] loadNibNamed: @"accessoryView" owner: self topLevelObjects: topLevelObjects] == NO){             myCustomAlert(@"INTERNAL ERROR!", @"Unable to load accessory popup menu xib in Save as dialog.");             return;         }     } I encountered a strange error. If I provide the NSSavePanel with a list of fileTypes like this: NSArray * fileTypes = [NSArray arrayWithObjects: @".tiff", @".pdf", @".jpg", @".png", @".jp2", @".bmp", @".insc", nil]; [savePanel setAllowedFileTypes: fileTypes]; The savePanel will encounter an error when I run it with [NSSavePanel runModal]; When the user selects a different file type from the accessoryView popup menu in the NSSavePanel the method that is executed just does this: [savePanel setAllowedFileTypes: [NSArray arrayWithObject: [[[sender selectedItem] title] lowercaseString]]]; This changes the file extension when the panel is running modal.
Topic: UI Frameworks SubTopic: AppKit Tags:
Apr ’21
Reply to Code 173 no longer triggers receipt generation
I have the same problem, also the code: NSBundle *mainBundle = [NSBundle mainBundle]; NSURL *receiptURL = [mainBundle URLForResource: @"receipt" withExtension: @""]; receiptData = [NSData dataWithContentsOfURL: receiptURL options: NSDataReadingMappedAlways error: &theError]; crashes without logging any errors in the console pane in XCode or the console when I use the dataWithContentsOfURL method and then I start to get all of the application is damaged alerts. How can you test your receipt validation code with this bug? You should file a bug report. Also there are other threads about this.
Topic: App & System Services SubTopic: Core OS Tags:
Mar ’21
Reply to XCode not creating _MASReceipt/reciept in App Bundle?
It started to work again. The debug app isn't crashing when I call the method: URL *receiptURL = [mainBundle URLForResource: @"receipt" withExtension: @""]; anymore and when the receipt validation code calls exit(173), XCode relaunches the app with a dialog for me to enter my test user ID and password, and adds a valid receipt. This MIGHT be because I added a build phase to the target: Copy Files Destination - Wrapper Subpath - @"Contents/_MASReceipt/receipt" If you get the same errors that I did, try the above. Maybe it will solve this problem.
Mar ’21
Reply to XCode not creating _MASReceipt/reciept in App Bundle?
Looking at other posts about this problem and my earlier post several years ago, it seems that I created a build phase that created the _MASReceipt folder in the target. This is now gone. I didn't do this so it looks like a bug in XCode. How can I recreate it? This is not likely to solve the problem because the dataWithContentsOfURL crashing the App is certainly a bug. The other thread about this is six months old and there is no solution to this problem.
Mar ’21