When i work with swift code in kotlin, the names a...
# multiplatform
r
When i work with swift code in kotlin, the names are usually different (sometimes very different) classes, constructor, functions, enums… how can I easily know what the exact corresponding function in kotlin that represent the swift function? example: in swift:
Copy code
Bundle.main.path(forResource: "", ofType: "")
in kotlin its:
Copy code
NSBundle.mainBundle.pathForResource("","")
but some times its harder to figure, any ideas here?
e
look at the names in Objective C
☝️ 1
r
ah great advice, thanks!
j
In my head NS stands for Not Swift 😉
😂 3
d
You’ve probably already seen this, but for everyone else: one simple way for translating between Swift and Objective-C APIs is to use the dropdown in the top right of the docs.
🙌 1
r
Cool, thanks for the info! I used chat gpt and it also worked 😆
🙈 1
😅 3