Release code being run in debug mode

Discussion in 'Mac Programming' started by moonman239, Mar 28, 2016.

  1. moonman239, Mar 28, 2016
    Last edited: Mar 28, 2016

    moonman239 macrumors 68000

    Mar 27, 2009
    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:
    #ifdef DEBUG
    #import "DebugClass.h"
    #define QueuePlayerClass DebugClass
    #import <AVFoundation/AVFoundation.h>
    #define QueuePlayerClass AVQueuePlayer
    Xcode version is 7.2.1.

    Oops, the solution's come to mind. I need to use
    [[QueuePlayerClass alloc] init]
    to create the player. And it works, now.

Share This Page