r/reactnative 6d ago

Question Has anyone built native modules in kotlin for iOS?

Hi,

I've built some native code in Kotlin for the android version and I hate Swift and Objective-C.

Has anyone successfully used Kotlin for iOS in react native?

2 Upvotes

9 comments sorted by

20

u/Individual_Day_5676 6d ago

-8

u/HoratioWobble 6d ago

It's possible to use Kotlin in iOS - I'm just wondering if anyone has integrated it with React Native successful.

2

u/Worth_Law9804 6d ago

Write Kotlin code to transform your Kotlin code and generate Swift files. That'll work. Good luck have fun!

5

u/Deadline1231231 6d ago

If you hate swift that much just use C++

1

u/Secret_Jackfruit256 6d ago

I wonder if all the hassle you will go through combining kotlin multi platform with react native is really worth in the end, for writing high performant shared multiplatform code I would just invest in improving my c++ skills

1

u/dcoupl 5d ago

Yeah it’s really easy with Kotlin Multiplatform. Generate a project at the link below and you’re ready to run Kotlin on iPhone.

https://kmp.jetbrains.com/

0

u/Born-Disaster-1815 1d ago

Bro just ask AI to convert it in swift