I am writing a class library for Mac OS X and iOS that will be released as Cocoa Framework for OS X and a static library for iOS. To simplify things, I intend to use several goals in Xcode. However, classes on Mac OS X refer to Cocoa.h, while on iOS they refer to Foundation.h.
My questions are basically these:
- Can Mac OS X framework replace Background.framework? The classes used in the framework are NSString, NSMutableString, and NSMutableArray.
Or I could use preprocessor directives in header files to control the inclusion of a structure, for example.
#ifdef MacOSX #import <Cocoa/Cocoa.h> #else #import <Foundation/Foundation.h> #endif
c-preprocessor objective-c
Bwhazel
source share