Unverified Commit dda594ad authored by dima.avdeev's avatar dima.avdeev Committed by GitHub

iOS Remove workaround with ObjectiveC protocol. Simplify SkikoUIView. (#752)

Workaround was added in this PR: https://github.com/JetBrains/skiko/pull/682
parent 74aac3fb
...@@ -442,15 +442,6 @@ fun configureNativeTarget(os: OS, arch: Arch, target: KotlinNativeTarget) { ...@@ -442,15 +442,6 @@ fun configureNativeTarget(os: OS, arch: Arch, target: KotlinNativeTarget) {
val bridgesLibrary = "$buildDir/nativeBridges/static/$targetString/skiko-native-bridges-$targetString.a" val bridgesLibrary = "$buildDir/nativeBridges/static/$targetString/skiko-native-bridges-$targetString.a"
val allLibraries = skiaStaticLibraries(skiaDir, targetString) + bridgesLibrary val allLibraries = skiaStaticLibraries(skiaDir, targetString) + bridgesLibrary
if (os == OS.IOS) {
target.compilations.getByName("main") {
val uikit by cinterops.creating {
defFile("src/iosMain/objc/ios.def")
packageName("org.jetbrains.skiko.objc")
}
}
}
val skiaBinDir = "$skiaDir/out/${buildType.id}-$targetString" val skiaBinDir = "$skiaDir/out/${buildType.id}-$targetString"
val linkerFlags = when (os) { val linkerFlags = when (os) {
OS.MacOS -> mutableListOf("-linker-option", "-framework", "-linker-option", "Metal", OS.MacOS -> mutableListOf("-linker-option", "-framework", "-linker-option", "Metal",
......
...@@ -20,6 +20,3 @@ dependencies.skia.android-arm64=m110-ad42464-1 ...@@ -20,6 +20,3 @@ dependencies.skia.android-arm64=m110-ad42464-1
org.gradle.jvmargs=-Xmx3G -XX:MaxMetaspaceSize=512m org.gradle.jvmargs=-Xmx3G -XX:MaxMetaspaceSize=512m
kotlin.native.cacheKind.macosX64=none kotlin.native.cacheKind.macosX64=none
kotlin.native.cacheKind.iosX64=none kotlin.native.cacheKind.iosX64=none
# This line needs for maven publication with ObjC defFile. Should be removed after Kotlin 1.8.20
kotlin.mpp.enableCInteropCommonization=true
...@@ -11,14 +11,9 @@ import platform.darwin.NSInteger ...@@ -11,14 +11,9 @@ import platform.darwin.NSInteger
import kotlin.math.max import kotlin.math.max
import kotlin.math.min import kotlin.math.min
/*
TODO: remove org.jetbrains.skiko.objc.UIViewExtensionProtocol after Kotlin 1.8.20
https://youtrack.jetbrains.com/issue/KT-40426
*/
@Suppress("CONFLICTING_OVERLOADS") @Suppress("CONFLICTING_OVERLOADS")
@ExportObjCClass @ExportObjCClass
class SkikoUIView : UIView, UIKeyInputProtocol, UITextInputProtocol, class SkikoUIView : UIView, UIKeyInputProtocol, UITextInputProtocol {
org.jetbrains.skiko.objc.UIViewExtensionProtocol {
@OverrideInit @OverrideInit
constructor(frame: CValue<CGRect>) : super(frame) constructor(frame: CValue<CGRect>) : super(frame)
......
package = org.jetbrains.skiko.objc
language = Objective-C
---
#import <Foundation/Foundation.h>
#import <UIKit/UIView.h>
// This protocol helps to override ObjC UIView extensions in Kotlin
@protocol UIViewExtension
- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event;
@end
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment