Sam Schilling
10/17/2019, 4:00 PMA has a dependency B that is another Kotlin library that it brings in through gradle via a maven repo. In B I have a class that is structured like this:
open class Fail(val code: IFailCode = CODE.ERROR_404) {
enum class CODE(override val description: String, override val code: Int) : IFailCode {
ERROR_404("Resource could not be found", 404),
…
}
interface IFailCode {
val code: Int
val description: String
}
}
The weird thing is that when I use the generated framework from A in a Swift app, I can access Fail and IFailCode, but not the enum class CODE. Also of note, they are named BFail and BFailIFailCode. Following this pattern I would expect CODE to be accessible as BFailCODE but it is not.
Why wouldn’t I be able to access CODE from Swift when I can access Fail and IFailCode? The only difference I see is that one is an enum while the other two are a class and an interface. Do these behave differently when converted to objc framework?Kris Wong
10/17/2019, 4:11 PMSam Schilling
10/17/2019, 4:12 PMCODE or any renaming of it isn’t in thereKris Wong
10/17/2019, 4:15 PMKris Wong
10/17/2019, 4:15 PMKris Wong
10/17/2019, 4:15 PMSam Schilling
10/17/2019, 4:16 PMKris Wong
10/17/2019, 4:16 PMSam Schilling
10/17/2019, 4:16 PMenum doesn’t show up in those docs because it is covered under class?Kris Wong
10/17/2019, 4:17 PMapi dependency, and are you exporting it?Sam Schilling
10/17/2019, 4:18 PMapi dependency?Kris Wong
10/17/2019, 4:18 PMimplementationSam Schilling
10/17/2019, 4:18 PMSam Schilling
10/17/2019, 4:18 PMSam Schilling
10/17/2019, 4:18 PMimplementationSam Schilling
10/17/2019, 4:19 PMKris Wong
10/17/2019, 4:20 PMKris Wong
10/17/2019, 4:20 PMSam Schilling
10/17/2019, 4:22 PMSam Schilling
10/17/2019, 4:22 PMKris Wong
10/17/2019, 4:22 PMSam Schilling
10/17/2019, 4:22 PMKris Wong
10/17/2019, 4:23 PMSam Schilling
10/17/2019, 4:23 PMA depends on B where Fail and IFailCode are definedSam Schilling
10/17/2019, 4:23 PMSam Schilling
10/17/2019, 4:23 PMSam Schilling
10/17/2019, 4:24 PMFail in the function signature of some of my public methods of A