Skip to content

Commit

Permalink
iOS Remove workaround with ObjectiveC protocol. Simplify SkikoUIView. (
Browse files Browse the repository at this point in the history
…#752)

Workaround was added in this PR: #682
  • Loading branch information
dima-avdeev-jb authored Jul 6, 2023
1 parent 74aac3f commit dda594a
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 29 deletions.
9 changes: 0 additions & 9 deletions skiko/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -442,15 +442,6 @@ fun configureNativeTarget(os: OS, arch: Arch, target: KotlinNativeTarget) {
val bridgesLibrary = "$buildDir/nativeBridges/static/$targetString/skiko-native-bridges-$targetString.a"
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 linkerFlags = when (os) {
OS.MacOS -> mutableListOf("-linker-option", "-framework", "-linker-option", "Metal",
Expand Down
3 changes: 0 additions & 3 deletions skiko/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,3 @@ dependencies.skia.android-arm64=m110-ad42464-1
org.gradle.jvmargs=-Xmx3G -XX:MaxMetaspaceSize=512m
kotlin.native.cacheKind.macosX64=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
7 changes: 1 addition & 6 deletions skiko/src/iosMain/kotlin/org/jetbrains/skiko/SkikoUIView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,9 @@ import platform.darwin.NSInteger
import kotlin.math.max
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")
@ExportObjCClass
class SkikoUIView : UIView, UIKeyInputProtocol, UITextInputProtocol,
org.jetbrains.skiko.objc.UIViewExtensionProtocol {
class SkikoUIView : UIView, UIKeyInputProtocol, UITextInputProtocol {
@OverrideInit
constructor(frame: CValue<CGRect>) : super(frame)

Expand Down
11 changes: 0 additions & 11 deletions skiko/src/iosMain/objc/ios.def

This file was deleted.

0 comments on commit dda594a

Please sign in to comment.