Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
testDemo
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jiangyh
testDemo
Commits
d84d12ae
Commit
d84d12ae
authored
Dec 25, 2025
by
jiangyh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lib-airth支持ios端
parent
e4ab1ed9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
4 deletions
+16
-4
build.gradle.kts
composeApp/build.gradle.kts
+3
-0
App_ios.kt
...oseApp/src/iosMain/kotlin/com/example/testdemo/App_ios.kt
+9
-0
project.pbxproj
iosApp/iosApp.xcodeproj/project.pbxproj
+2
-2
ContentView.swift
iosApp/iosApp/ContentView.swift
+2
-2
No files found.
composeApp/build.gradle.kts
View file @
d84d12ae
...
...
@@ -34,6 +34,9 @@ kotlin {
val
commonMain
by
getting
val
iosMain
by
creating
{
dependsOn
(
commonMain
)
dependencies
{
implementation
(
project
(
":lib-arith"
))
}
}
val
iosSimulatorArm64Main
by
getting
{
...
...
composeApp/src/iosMain/kotlin/com/example/testdemo/App_ios.kt
View file @
d84d12ae
package
com.example.testdemo
import
com.example.arith.Arith
fun
iosUiText
():
String
{
val
base
=
appInfo
()
val
add
=
Arith
.
add
(
7
,
3
)
val
sub
=
Arith
.
sub
(
7
,
3
)
return
"$base\nAdd is $add, Sub is $sub"
}
fun
appInfoForIos
():
String
=
appInfo
()
iosApp/iosApp.xcodeproj/project.pbxproj
View file @
d84d12ae
...
...
@@ -35,7 +35,7 @@
/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */
/* Begin PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet section */
C3
BDEF052EFD07FA009E7973
/* Exceptions for "iosApp" folder in "Embed Frameworks" phase from "iosApp" target */
=
{
C3
89BBDB2EFD167A007581B7
/* Exceptions for "iosApp" folder in "Embed Frameworks" phase from "iosApp" target */
=
{
isa
=
PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet
;
attributesByRelativePath
=
{
ComposeApp.framework
=
(
CodeSignOnCopy
,
RemoveHeadersOnCopy
,
);
...
...
@@ -57,7 +57,7 @@
isa
=
PBXFileSystemSynchronizedRootGroup
;
exceptions
=
(
BDD43DEBB46AE8B613E12CE8
/* Exceptions for "iosApp" folder in "iosApp" target */
,
C3
BDEF052EFD07FA009E7973
/* Exceptions for "iosApp" folder in "Embed Frameworks" phase from "iosApp" target */
,
C3
89BBDB2EFD167A007581B7
/* Exceptions for "iosApp" folder in "Embed Frameworks" phase from "iosApp" target */
,
);
path
=
iosApp
;
sourceTree
=
"<group>"
;
...
...
iosApp/iosApp/ContentView.swift
View file @
d84d12ae
...
...
@@ -4,8 +4,8 @@ import ComposeApp // 对应 KMP 导出的 Framework 名
struct
ContentView
:
View
{
var
body
:
some
View
{
VStack
{
// 调用你刚修改的 appInfo
()
Text
(
AppKt
.
appInfo
()
)
let
text
=
App_iosKt
.
iosUiText
()
Text
(
text
)
.
multilineTextAlignment
(
.
center
)
.
padding
()
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment