Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.
This repository was archived by the owner on Sep 3, 2025. It is now read-only.

Interference with DEBUG macro on iOS #435

@schmidt9

Description

@schmidt9

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions