Skip to content

Commit 47826b4

Browse files
committed
example: iOS: Remove XCFramework
1 parent fa01736 commit 47826b4

File tree

4 files changed

+7
-19
lines changed

4 files changed

+7
-19
lines changed

example/build.gradle.kts

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import com.android.build.gradle.internal.api.BaseVariantOutputImpl
44
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
55
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
6-
import org.jetbrains.kotlin.gradle.plugin.mpp.apple.XCFramework
76
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
87
import java.util.Properties
98

@@ -18,7 +17,6 @@ val appName = "Miuix"
1817
val pkgName = "top.yukonga.miuix.uitest"
1918
val verName = "1.0.3"
2019
val verCode = getVersionCode()
21-
val xcf = XCFramework(appName + "Framework")
2220

2321
java {
2422
toolchain.languageVersion = JavaLanguageVersion.of(21)
@@ -35,15 +33,13 @@ kotlin {
3533
iosSimulatorArm64()
3634
).forEach {
3735
it.binaries.framework {
38-
baseName = appName + "Framework"
36+
baseName = "shared"
3937
isStatic = true
4038
freeCompilerArgs += listOf(
41-
"-Xbinary=bundleId=$pkgName.framework",
4239
"-linker-option", "-framework", "-linker-option", "Metal",
4340
"-linker-option", "-framework", "-linker-option", "CoreText",
4441
"-linker-option", "-framework", "-linker-option", "CoreGraphics"
4542
)
46-
xcf.add(this)
4743
}
4844
}
4945

@@ -52,7 +48,6 @@ kotlin {
5248
macosArm64()
5349
).forEach { macosTarget ->
5450
macosTarget.binaries.executable {
55-
baseName = appName
5651
entryPoint = "main"
5752
freeCompilerArgs += listOf(
5853
"-linker-option", "-framework", "-linker-option", "Metal"
@@ -184,18 +179,10 @@ compose.desktop {
184179
}
185180
}
186181
nativeApplication {
187-
targets(kotlin.targets.getByName("macosArm64"))
182+
targets(kotlin.targets.getByName("macosArm64"), kotlin.targets.getByName("macosX64"))
188183
distributions {
189184
targetFormats(TargetFormat.Dmg)
190-
packageName = "$appName-MacosArm64-Native"
191-
packageVersion = verName
192-
}
193-
}
194-
nativeApplication {
195-
targets(kotlin.targets.getByName("macosX64"))
196-
distributions {
197-
targetFormats(TargetFormat.Dmg)
198-
packageName = "$appName-MacosX64-Native"
185+
packageName = appName
199186
packageVersion = verName
200187
}
201188
}

iosApp/iosApp.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@
297297
OTHER_LDFLAGS = (
298298
"$(inherited)",
299299
"-framework",
300-
MiuixFramework,
300+
"shared",
301301
);
302302
PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_ID}${TEAM_ID}";
303303
PRODUCT_NAME = "${APP_NAME}";
@@ -326,7 +326,7 @@
326326
OTHER_LDFLAGS = (
327327
"$(inherited)",
328328
"-framework",
329-
MiuixFramework,
329+
"shared",
330330
);
331331
PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_ID}${TEAM_ID}";
332332
PRODUCT_NAME = "${APP_NAME}";

iosApp/iosApp.xcodeproj/xcshareddata/xcschemes/iosApp.xcscheme

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
debugDocumentVersioning = "NO"
4343
debugXPCServices = "NO"
4444
debugServiceExtension = "internal"
45+
enableGPUFrameCaptureMode = "1"
4546
enableGPUValidationMode = "1"
4647
allowLocationSimulation = "NO"
4748
viewDebuggingEnabled = "No"

iosApp/iosApp/ContentView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import UIKit
22
import SwiftUI
3-
import MiuixFramework
3+
import shared
44

55
struct ComposeView: UIViewControllerRepresentable {
66
func makeUIViewController(context: Context) -> UIViewController {

0 commit comments

Comments
 (0)