Код: Выделить всё
@objc public class Wallet: NSObject {
@objc public func getPrivateKey() -> String {
return ""
}
}
Код: Выделить всё
#ifndef iosApp_Bridging_Header_h
#define iosApp_Bridging_Header_h
#import "iosApp-Swift.h"
#endif /* iosApp_Bridging_Header_h */
В многоплатформенном проекте Kotlin я определил класс ожидания в общем модуле проекта следующим образом :
Код: Выделить всё
expect class WalletMP() {
fun getPrivateKey() : String
}
Код: Выделить всё
actual class WalletMP actual constructor() {
actual fun getPrivateKey(): String {
return ""
}
}
Код: Выделить всё
val wallet = Wallet()
Код: Выделить всё
#ifndef iosApp_Bridging_Header_h
#define iosApp_Bridging_Header_h
#import
@interface Wallet: NSObject
-(NSString*)getPrivateKey;
@end
#endif /* iosApp_Bridging_Header_h */
Подробнее здесь: https://stackoverflow.com/questions/775 ... tiplatform
Мобильная версия