Skip to content

Common warnings and errors and their solutions

Nat! edited this page Apr 26, 2017 · 1 revision

Missing Classes or "NSThread" waiting for class "NSObject"

You linked statically and forgot to tell the linker to --all_load. So your classes were optimized away by the linker.

Warnings about missing functions in your root class

If your root class conforms to the NSObject protocol you may receive some warning about implementations missing. That is because the compiler is not smart enough to figure out, if there is a protocol class providing the necessary implementation or not.

Add this to your header:

@interface MyRootClass (NSObjectProtocolProvided)

+ (id) new;
+ (id) instantiate;

- (id) init;
- (NSUInteger) hash;
- (id) immutableInstance;
- (id) _becomeRootObject;
- (id) _pushToParentAutoreleasePool;

@end