It's an OSX project with an .xib. Which trash is it? You mean that there is more than one? No, I can't delete it with the edit menu, or the dlete key. I was able to do what I wanted with great difficulty by changing the types of objects in the custom object type field.
Post
Replies
Boosts
Views
Activity
When I get info on my XCode folder it says:17,388,866,273 bytes (10.07 GB on disk)so you probably don't have enough disk space. A development environment for two opertaing systems, documentaktion, etc. is big.
In order to supress this message I created a test image. According to the documentation the image will be scaled to 512 x 512. Even if I create an image that has a size of 512 x 512 the runtime will still report an error when it sets the file's icon. Also true for 1024 x1024. The runtime will correctly set the file's icon to an NSImage, scaling it into the icon. So it looks like this spurious error will be reported for any NSImage regardless of its size.
I wrote too soon. If you use a 256 x 256 image no error will be reported. This doesn't help you create the photorealistic file icons that Apple wants for mac OS.
XCode 11.5 fixed this bug.
XCode 11.5 fixes the bugs like this that I had.
After I cleaned and rebuilt my application it did this again so no, Apple didn't fix this.
After I cleaned and rebuilt my application these spurious errors reappeared, so no, Apple didn't fix this.
The keys in the .plists are displayed differently in XCode than they actually are in the file. For example when you open the application’s .plist in Xcode it shows the CFBundleHelpBookName as Help Book Name. This is not helpful. In the Apple Help Programming Guide these are given as their actual names in the <key> fields so I advise you to open and edit them with an external editor like BBEdit.
The CFBundleHelpBookFolder should be appname.help (name of the help bundle).
The CFBundleHelpBookName should be the title of the Help Book as it is in the Apple Title meta tag in the home page of the Help Book as it is in the illustration, NOT com.mycompany.appname.help as it says in the text.
Because Help Books are cached you will have to clear the cache every time you edit the Help Book with the terminal command rm -rf ~/Library/Caches/com.apple.help*
The Apple Help Programming Guide is poor and out of date. An example of how to add a Help book to your application can be found on GitHub:
https://github.com/Red-Menace/RubyMotionRonin/tree/master/Help%20Book%20Sample.
The Help Indexer application you can download from Xcode Additional Tools is terrible: It can’t open files in a bundle so you have to create your Help Book as a folder and rename it as a .help when you’re done, before adding it to your .xcodeproj.
I can follow the instructions to give my application a Help Book but I want it to be searchable. After many hours of trying I find that it’s impossible to do it. The guide says to put the .helpindex in the localized .lproj folder and include its name in the Help Book’s info.plist in the HPDBookIndexPath key. This doesn’t work.
Adding a Help Book to a Mac application has been a real PITA for years. This is something that Apple should improve.
Update: Apple is still telling developers to include a Help Book in its User interface guidelines, BUT:
Apple help viewer is buggy - some things don't even work. The documentation is terrible and hasn't been updated since a minor change - IN 2013! The Help indexer application is terrible and is from 2015. It is no longer available from Apple.
If Apple wants to get rid of Help Books it should just tell us. This is a terrible way to do it and this is a terrible way to treat developers.
Based on posts I found, with newer versions of the OS you have to create
an index using the hiutil command in the terminal. The type of index
file created by the indexer application won't work. Of course this is
completely undocumented. hiutil can create two types if index files.
Supposedly you have to create the type that's used by Spotlight. The
documentation mentions hiutil and hiutil(1). Although I have been
programming the Mac since 1988 I have absolutely no idea of how to use
terminal commands so when I type man hiutil into the terminal it's just
complete ishcabibble to me. Computers with GUIs were invented so you
wouldn't have to deal with very complex command line programming. It
seems ironic that I would have to learn ANOTHER very complex technology
just to create one file in my application. If anyone has any guidance
about what terminal command to enter I'll try it, otherwise I won't
bother.
In order to do less typing I set the working directory to the Resources directory in the help bundle, using the chdir pathname command.
I use the command: hiutil -Cf Resources/English.lproj/help.helpindex English.lproj
This creates a help.helpindex file in the English.lproj folder. As per the documentation the other html files are in a sub directory.
To be sure that I'm not looking at a cached version of the application's help I use the terminal command:
rm -rf ~/Library/Caches/com.apple.help*
The name of the help.helpindex file is in the help bundle's info.plist file in the HPDBookIndexPath dictionary.
My application's help is still not searchable. Only the main help page is searchable. When I open the index file with BBEdit I see lots of keywords from the other html files but the Help application won't find them. Using the parameter -Caf doesn't help. it's likely that I need some other file specifier but I can't see what it would be.
After reading a lot of comments on internet forums about this and trying to make it work with XCode I have concluded that Apple broke the Help Book authoring tools, documentation and API's with OS 10.14 and didn't bother to tell developers. Thanks, Apple.
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.
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.