Hey people where is the best place to either figur...
# compose-ios
m
Hey people where is the best place to either figure out if this is a bug or log it. I migrated my android/desktop app to also use iOS. I used this template, it’s the official jetbrains one. If I add this code to the shared module then iOS stops building
Copy code
const val SIZE_MAX = 80
The error messages is something like this:
Copy code
#import "Headers/shared.h"
        ^
/.../urban-parakeet/shared/build/cocoapods/framework/shared.framework/Headers/shared.h:155:37: error: expected member name or ';' after declaration specifiers
@property (class, readonly) int32_t SIZE_MAX __attribute__((swift_name("SIZE_MAX")));
                                    ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/usr/include/stdint.h:173:27: note: expanded from macro 'SIZE_MAX'
#define SIZE_MAX          UINTPTR_MAX
                          ^
Here is a minimal repo that has this behaviour. If I rename SIZE_MAX to say PLUGH then it works, some macro weirdnesses or fights between a pre-existing SIZE_MAX methinks.
👀 1
👍 1
😆 I had a long debate about this with my husband, he says I should have known not to use such a generic name in my code and why am I using a global constant. Coming from a Kotlin world however, I expected the package to namespace the variable. I guess we may never know what
#define
are set in the Objective C world.
d
Thank! This Issue not related to Compose and already created on Kotlin Native You can follow it on YouTrack: https://youtrack.jetbrains.com/issue/KT-33092/Kotlin-Native-doesnt-mangle-names-clashing-with-standard-macros-when-generating-Objective-C-headers
m
Great thanks for the link