support in Android Studio • Necessity to rebuild the framework every time you change the interface • Complicated relation between declaration in Kotlin and usage in Swift Problems of an iOS-developer
Attributes • Relations with other symbols • … 18 Internal representation of the declaration of anything in the code. Symbol tables - the IDE's knowledge of classes, functions, variables, etc.
"Doe" let age = 42 // Very important function func greet() { print("Hi \(name)!") } } class Person let name: String let surname: String let age: Int func greet() -> Void Symbol table 19 What is a symbol
val helloString = "Hello!" Create property print(a.helloString) Use in Swift @property (readonly) NSString *helloString; MyFramework.h Build SourceKit Getting annotations from SourceKit Problem
After each Kotlin code change ~/Library/Caches/…/DerivedData/MyApp-byxnfgfeahmhpthjejgycztlpstg/SourceKitFrameworkStubs/MyFramework.framework Getting annotations from SourceKit Solution
Swift fi le • Ignore changes in comments and function bodies / / This is very important fun doImportantThings(): Int { val a = 1 val b = 2 return a + b } Getting annotations from SourceKit
• Current problems of the iOS world • Kotlin/Native plugin for AppCode • How Kotlin-Swift cross-resolve works • SourceKit problem and how it’s solved • Conclusions @appcode @aydarmukh