Just one more idea to detect:
DebugMode.h
#import <Foundation/Foundation.h>
@interface DebugMode: NSObject
+(BOOL) isDebug;
@end
DebugMode.m
#import "DebugMode.h"
@implementation DebugMode
+(BOOL) isDebug {
#ifdef DEBUG
return true;
#else
return false;
#endif
}
@end
add into header bridge file:
#include "DebugMode.h"
usage:
DebugMode.isDebug()
It is not needed to write something inside project properties swift flags.