https://kotlinlang.org logo
c

Christian Sousa

09/04/2020, 9:17 AM
Hello everyone, hope this one is easy to answer, I’m trying to create a 
UITableView
 class, extending both `UITableViewDataSourceProtocol`and 
UITableViewDelegateProtocol
 , and when overriding methods, I get the following error when running (compiling does not produce any error):
Copy code
/Users/teamcity1/teamcity_work/4d622a065c544371/runtime/src/main/cpp/ObjCInterop.cpp:137: runtime assert: Unable to add method to Objective-C class
I’m not really sure what’s causing the error, I only needed to extend the Delegate for the following method:
Copy code
@Suppress("CONFLICTING_OVERLOADS")    
override fun tableView(tableView: UITableView, viewForHeaderInSection: NSInteger): UIView? {
    return UIView()
}
Does anyone knows what I could do? EDIT: Even if I remove the override, the compiler will tell me that: must override public open external fun debugDescription(): String? But when I override it, I get the same error.. (edited) (already tried asking on native channel but got no answer)
a

Artyom Degtyarev [JB]

09/04/2020, 12:10 PM
Hello! Can you please provide a reproducer? It would help to understand the problem.
3 Views