Post

Replies

Boosts

Views

Activity

Reply to Application performance declined in Big Sur and is worse in Monterey
The way you are doing this is VERY complicated and probably in-efficient. Apple recommends that developers migrate away from threads to Grand Central Dispatch. This provides a very robust, efficient system to manage multi-threading. I does the work for you by optimizing the use of the cores in your machine without you having to do things like trying to figure out how many cores are available, in fact they advise you not to do this: https://developer.apple.com/library/archive/documentation/General/Conceptual/ConcurrencyProgrammingGuide/ConcurrencyandApplicationDesign/ConcurrencyandApplicationDesign.html OpenMP probably isn't up to date and or doesn't take advantage of this technology very well. GCD has the advantage of being available on any processor or OS version. You should be able to run each of these processes in its own serial or more likely concurrent dispatch queue and let GCD execute them efficiently. Running each of these with its own copy of the app is probably much slower than it would be to launch each process with GCD due to overhead like context switching. You could write one source code file to launch these and be notified when they are done and it would be much easier for you than doing this with the terminal. You should at least read the Concurrency Programming Guide and see if it would make your life easier and speed up your app.
Topic: App & System Services SubTopic: Core OS Tags:
Nov ’21
Reply to How to Create a Searchable Help Book with Help Indexer?
There is nothing wrong with my help book. When I have problems like this one I tend to think it's my fault and re-read the documentation. My Help Book is configured correctly. The problem is that XCode 13, or more likely macOS Monterey 12.0.1 will only display the Help Book if the application bundle is in the Applications folder. So problem solved, sort of, you can't display the Help Book while debugging your Mac App in XCode. You have to archive it and export it to the Applications folder to see the Help Book. I can't update my application at the App Store anyway because of the infamous exit(173) bug in macOS Monterey. Also the hiutil (Help Indexer app) does nothing in Monterey anyway so don't bother creating a help Index.
Topic: App & System Services SubTopic: Core OS Tags:
Nov ’21
Reply to XCode 13 - No Help Book
To update my application I'll have to create a separate volume on my hard drive and install earlier versions of macOS and XCode. This page:https://developer.apple.com/download/ says that I can do it. It links to another page, https://support.apple.com/en-us/HT208891, that tells how to create a volume and install the earlier OS but there's no link to a description of where to get XCode 12. Does anyone know how to get this?
Topic: App & System Services SubTopic: Core OS Tags:
Nov ’21
Reply to XCode 13 - No Help Book
Cleaning and rebuilding the project doesn't help. Restarting XCode or my Computer doesn't help. The project doesn't log any errors but there is one error in the Console: error 18:29:15.933543-0600 HelpViewer volume does not support data protection, stripping SQLITE_OPEN_FILEPROTECTION_* flags An older version of the program shows the Help Book. Is this a new bug in XCode?
Topic: App & System Services SubTopic: Core OS Tags:
Nov ’21
Reply to How to Create a Searchable Help Book with Help Indexer?
I created an html help book in a .help bundle in my application and use Help Viewer as I always did years ago. Apple still uses help books in its own applications. The help menu item in the menu bar is linked to firstResponder: showHelp which shows the help book if the Help Book directory Name and Help Book Identifier in the application .plist are the name of the helpbook.help bundle. The MainMenu.xib's file owner is an NSApplication. This provides the showHelp IBAction.
Topic: App & System Services SubTopic: Core OS Tags:
Apr ’21
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 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 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?
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