Has anyone got AlamoFire working on iOS with Kotlin?
s
Sam
03/07/2018, 4:39 PM
AlamoFire is a Swift framework that have some bits that do not port over to ObjC. You could write some wrappers that would make it callable from ObjC and thus Kotlin.
👍 1
h
hellotimmutton
03/07/2018, 10:38 PM
how does one go about that? trying to write a multiplatform app that shares code between android and ios, but my ios knowledge is virtually non-existant
s
Sam
03/08/2018, 12:48 PM
If you have a choice you could go with AFNetworking which is an objc library. Otherwise you’ll have to write wrappers in swift that conform to objc standards like only using objects that inherit from nsobject. There is an article out on Medium that explains it with code on GitHub.
h
hellotimmutton
03/12/2018, 10:12 PM
ive done a search and come up empty. seems like google only wants to give me results for wrapping an obj-c lib with swift. if its not too muich trouble, could you please point me to the article?