Is there any example out there using iOS/macOS `NS...
# kotlin-native
l
Is there any example out there using iOS/macOS
NSNotificationCenter
with Kotlin/Native?
☝️ 1
l
Thank you! That's very helpful. BTW, I'm working on a competing library 😅 The main difference is that I am replicating Android's
SharedPreferences
interface, and using it to back property delegates based API.
r
Not sure I understand the difference. MPS does include property delegates, though maybe they look different than you’re thinking of. Happy to work together if you think there’s missing functionality or APIs that are worth adding.
l
I made a property delegate API for Android SharedPreferences a long time ago, and recently, as I wanted to try macOS & iOS development, I started to consider adding these platforms to several modules of Splitties. Preferences came naturally, and I tried the challenge of not breaking the Android API (successful so far). You can see the not updated yet doc here, and the iOS/macOS implementation and common implemention is inside: https://github.com/LouisCAD/Splitties/tree/c4b3b1857f2bfe99617bdcf060bfef480356d68f/modules/preferences
r
ah ok so it’s about maintaining binary compatibility with your existing android usage?
l
This, and having
var
delegates so I define the key only once
And trying Kotlin/Native overall 🙂
r
Yeah this use-case is a really nice way to get started in Multiplatform/Native since the APIs are relatively simple and similar between Android and iOS
l
I also added iOS ARM32 support (which required handling
NSInteger
changing from
Long
to
Int
), but I don't have such a device yet. Looking for Apple to release one this Fall I may get an old iPad or old iPod touch for fun and to ensure it works. I'm happy from what I learned so far
s
The last phone Apple made that was 32 bit was the 5/5c. You can probably pick one up cheap if you can find one.
s
Btw newer phones also support 32-bit applications on old iOS versions.
s
As long as it isn't running anything newer than iOS 10. In iOS 11 Apple dropped support for 32-bit apps.
👌 1
287 Views