Is there a way to add platform specific annotation...
# multiplatform
s
Is there a way to add platform specific annotations? may sth like expect/actual but for annotation level? What I'm trying to achieve is to annotate a field that I have in commonMain with @Published in iosMain. any idea?
a
expect/actual annotations are possible. Are there any issues?
gratitude thank you 1
s
hm They also work for 'annotations' ?
👌 1
e
there's even
@OptionalExpectation
to allow an annotation to have no actual implementation on some platforms
a
Please keep in mind the
@OptionalExpectation
may lead to weird compile errors if only
android
and
jvm
targets are supported.
s
Thanks Daniel didn't know about that! I'm going to try that tonight
Thanks Arkadi, I think in my case will be alright since I'm targeting iOS and Android