Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The fact that you call out that at least one thing that ends up missing is a category method for NSString makes me think you're running into a lovely issue that seems to be a possible bug in the linker.</p> <p>Firstly, see <a href="https://stackoverflow.com/questions/2906147/what-does-the-all-load-linker-flag-does/2906210#2906210">this answer elsewhere</a> and ensure that the project including your library is using the -all_load linker flag.</p> <p>Second, in some dealings I've had with using the Three20 library for the iPhone it became necessary to also use this weird "hack" that applies if, for example, your NSString category is the only thing in the .m file where it's implemented.</p> <pre><code>//CategoryBugHack.h #define FIX_CATEGORY_BUG(name) @interface FIX_CATEGORY_BUG##name @end @implementation FIX_CATEGORY_BUG##name @end </code></pre> <p>Then the category .h/.m ...</p> <pre><code>//NSStringCategory.h @interface NSString (MyAdditions) // etc, etc @end //NSStringCategory.m #import "CategoryBugHack.h" FIX_CATEGORY_BUG(NSString_MyAdditions) @implementation NSString (MyAdditions) // etc, etc @end </code></pre> <p>Basically there seems to be an additional issue related to static libraries where an implementation file that contains ONLY implementations of category methods. The FIX_CATEGORY_BUG macro basically just expands to define an interface and implementation of that interface with no methods, just to force something into the .m file that isn't a category.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload