multiplatform-paging icon indicating copy to clipboard operation
multiplatform-paging copied to clipboard

Interference with DEBUG macro on iOS

Open schmidt9 opened this issue 4 months ago • 0 comments

Building PagingLogger produces following code for me, if my Xcode project contains macro DEBUG=1 in GCC_PREPROCESSOR_DEFINITIONS

__attribute__((objc_subclassing_restricted))
__attribute__((swift_name("PagingLoggerKt")))
@interface MKMLPagingLoggerKt : MKMLBase

/**
 * @param level annotations androidx.annotation.IntRange(from=2.toLong(), to=3.toLong())
*/
+ (void)logLevel:(int32_t)level tr:(MKMLKotlinThrowable * _Nullable)tr block:(NSString *(^)(void))block __attribute__((swift_name("log(level:tr:block:)")));
@property (class, readonly) int32_t DEBUG __attribute__((swift_name("DEBUG")));
@property (class, readonly) NSString *LOG_TAG __attribute__((swift_name("LOG_TAG")));
@property (class, readonly) int32_t VERBOSE __attribute__((swift_name("VERBOSE")));
@end

Line @property (class, readonly) int32_t DEBUG __attribute__((swift_name("DEBUG"))); produces errors in Xcode:

Expected ';' at end of declaration list Expected member name or ';' after declaration specifiers ... expanded from macro 'DEBUG'

Image

schmidt9 avatar Aug 22 '25 18:08 schmidt9