Post

Replies

Boosts

Views

Activity

Reply to Xcode 9 - Can't Update Help Book
I found out that after you delete any other copies of the application and clear the help caches with hiutil -P ~/Library/Caches/com.apple.helpd the help book still won't appear in your app when running it in your development environment with Xcode. BUT if you archive your application and then distribute it, for example as a copy to your applications folder it will.
Nov ’23
Reply to WKWebView is Blank
It looks like it could be a timing problem. When execution returns after the windowDidLoad method the window is drawn to the screen and the content is rendered. It's taking more than a second to launch the WebContent process and load the content. It looks like the Window is drawn and movedToFront before this is complete so it won't draw the html because it isn't yet created. Does this sound possible? I don't see any way to sleep or delay this until the web content is loaded. Is this possible?
Nov ’23
Reply to Xcode 9 - Can't Update Help Book
After going over everything over and over I was able to get it to work. The only difference between this and other attempts was that I deleted the old version of the application with Launchpad, not by dragging it to the trash. This may make a difference as far as deleting the caches goes. Apple Help is a really useful feature. It goes with your application so it's there even if your user is in a remote location with no internet. BUT the implementation is pretty flakey. I'm going to replace it with an NSDocument to make it easier to program and maintain.
Oct ’23
Reply to Xcode 9 - Can't Update Help Book
It's pretty weird that my Help Book has worked for a long time now but suddenly stopped after I upgraded to XCode 15.0.1. The .plists are all correct and not changed. The Help Book is correctly registered. You have to wonder why this would suddenly fail. Help Viewer is not currently being supported by Apple and the documentation is TEN YEARS OLD. At this point it would be easier to write my own help viewer. My help files are just html files anyway. Perhaps there is some documentation describing how to display them in an NSWindow with an NSScrollingTextView. It has to be easier than dealing with the agonizing nightmare of AHRegistered help books.
Oct ’23
Reply to Xcode 9 - Can't Update Help Book
I worked on my Application. I did NOTHING to change the Help Book except change one small bit of text. I did everything listed in this thread: I deleted the existing version in the Applications folder. I cleared the Help data bases with hiutil -P ~/Library/Caches/com.apple.help.d. I have done this many times before but now with MacOS Sonoma 14.0 I get errors: Received termination response from helpd HPDHelpDataIsTerminating: Shutdown request successfully sent to helpd Unable to clear caches at path: /Users/myname/Library/Containers/com.apple.helpviewer Error: Error Domain=NSCocoaErrorDomain Code=513 "“Help Viewer” couldn’t be removed because you don’t have permission to access it." UserInfo={NSUserStringVariant=(Remove), NSFilePath=/Users/myName/Library/Containers/com.apple.helpviewer, NSUnderlyingError=0x600000d90d80 {Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"}} Caches not cleared: There was a problem clearing Help Viewer and helpd cache files, see logs for details There is nothing relevant in the logs. The Help Book is properly registered in the .plist as it has been for years. When my Application calls showHelp the help window appears with no content but if I search for terms in the Help Book they appear in the Show all Help Topics with the name of the section they are in but clicking on them leads to a page with the warning "The Selected Content is not Available". Is this some new bug for help editing? Also trying to force the Application to load the Help Book with stuff like [[NSHelpManager sharedHelpManager] registerBooksInBundle: [NSBundle mainBundle]]; does nothing. XCode isn't logging Entering AHSRegistered Help Book as it should either.
Oct ’23
Reply to Store Kit Libraries and Headers
Apple is bringing out new technologies like Store Kit as Swift only. This is the beginning of the gradual deprecation of C/Objective C and Interface builder. UGH. I am responsible for a big project for the Mac that's written in the above. Moving it all to Swift and Swift UI would be a monumental project that will probably never happen. Is there a way to mix Objective C and Swift? This would be a way to incrementally move the project to Swift/Swift UI. (Programming joke: What's the opposite of an increment?) If so how about documentation?
Sep ’23
Reply to Project Won't Build with .h File
When my program starts up it calls some code to validate its App Store receipt. Now this logs the same error three times: 2023-07-14 11:35:23.905145-0600 appname[2702:35564] [Security] delegate_identifier:Performance Diagnostics__:::__message:This method should not be called on the main thread as it may lead to UI unresponsiveness. Yes, I can guess what it wants me to do but this is an example of an unhelpful message.
Jul ’23
Reply to Project Won't Build with .h File
Problem solved: When XCode crashed I wound up with a single '*' way down in one of my header files. When I looked at it I wouldn't see it. This is weird because I wasn't doing anything with that file. I probably did it myself but I don't know how. Then the preprocessor would add the header file to the source code file and when it built it would report an error but not in a way that told me what was wrong. Another strange thing is that it reported this error in all of my .c and .m files so when I followed johnSOS' very excellent advice to preprocesses some files and look at the output, I didn't happen to look at ones with the messed up header file. So, XCode was very unhelpful in letting me find the problem. Also strange, DTS can't build my sample project without #import <Cocoa/Cocoa.h> in one of my .h files so the .m file knows about Cocoa. This looks like a bug because the project includes an appname_Prefix.pch file with: #ifdef OBJC #import <Cocoa/Cocoa.h> #endif This is supposed to be a prefix file for all source files in the target so they know about Cocoa. This is weird. Finally one of my source files wouldn't compile for DTS without <Foundation/Foundation.h> in its header. This is also strange because it did for years for me. Maybe I should #import this in the .pch file as well just to be safe. Finally DTS suggests that I use DIF to file errors. I've never had to do this before but I will. Thanks to everyone for helping me with this issue.
Jul ’23
Reply to Project Won't Build with .h File
I keep all of my source code files and header files together in groups in the project folder. I can delete them from the project and then drag them back into the project. They will appear in the project navigator but they won't build. Spurious error: Expected identifier or '(' in the headers and the analyzer thinks that the header file is not a member of any targets in the current scheme that build for analyzing. I tried to add some headers individually and check the target box to force XCode to include them in my project but as you say, you can't and shouldn't do this. I didn't change the inclusion of any .h .c or .m files. These are in the project folder. Adding them using the several options won't fix this. On June 15th I moved an NSTextField in a .xib a few pixels. When I built the project it and all of my projects stopped working on three versions of XCode and two Macs - Intel and Apple Silicon. XCBBuildService - a component of XCode crashed at this time. On the new M1 iMac this is not happening. To verify that it isn't the project files, I created a new project (several times) and started adding files, carefully following the directions in the XCode documentation. Of course the documentation is inaccurate, for example I couldn't add some illustrations to the project without putting it in a workspace. They won't build. I'll study your post and see if I've missed anything.
Jul ’23