Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

moonman239

Cancelled
Original poster
Mar 27, 2009
1,541
32
I have a header file that has a series of preprocessor directives that determine which of two files is to be imported, and which of two classes is to be used. The problem is, it seems that no matter what I do, my QueuePlayerClass instance ends up being of AVQueuePlayer type.

Here are the directives:
Code:
#ifdef DEBUG

#import "DebugClass.h"

#define QueuePlayerClass DebugClass

#else

#import <AVFoundation/AVFoundation.h>

#define QueuePlayerClass AVQueuePlayer

#endif

Xcode version is 7.2.1.

Oops, the solution's come to mind. I need to use
Code:
[[QueuePlayerClass alloc] init]
to create the player. And it works, now.
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.