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
Arkadii Ivanov
08/09/2023, 7:59 PM
expect/actual annotations are possible. Are there any issues?
gratitude thank you 1
s
Shervin
08/09/2023, 8:00 PM
hm
They also work for 'annotations' ?
👌 1
e
ephemient
08/09/2023, 8:13 PM
there's even
@OptionalExpectation
to allow an annotation to have no actual implementation on some platforms
a
Arkadii Ivanov
08/09/2023, 8:23 PM
Please keep in mind the
@OptionalExpectation
may lead to weird compile errors if only
android
and
jvm
targets are supported.
s
Shervin
08/10/2023, 7:25 AM
Thanks Daniel
didn't know about that!
I'm going to try that tonight
Shervin
08/10/2023, 7:26 AM
Thanks Arkadi, I think in my case will be alright since I'm targeting iOS and Android