From a967e261e5af10f9f8b7e381bc87be32b296f19e Mon Sep 17 00:00:00 2001 From: PJ Date: Sun, 26 Apr 2026 19:42:12 +0700 Subject: [PATCH] chore(folio): nest iosApp under app/ for KotlinConf parity Match KotlinConf-app's filesystem layout where every entry point (android, ios, web, shared, ui-components) lives under app/. iosApp is still an Xcode project, not a Gradle module, so settings.gradle.kts is unchanged. --- examples/folio/.gitignore | 6 +++--- examples/folio/README.md | 2 +- examples/folio/{ => app}/iosApp/iosApp/Info.plist | 0 examples/folio/{ => app}/iosApp/iosApp/iOSApp.swift | 0 examples/folio/{ => app}/iosApp/project.yml | 8 ++++---- examples/folio/justfile | 10 +++++----- 6 files changed, 13 insertions(+), 13 deletions(-) rename examples/folio/{ => app}/iosApp/iosApp/Info.plist (100%) rename examples/folio/{ => app}/iosApp/iosApp/iOSApp.swift (100%) rename examples/folio/{ => app}/iosApp/project.yml (75%) diff --git a/examples/folio/.gitignore b/examples/folio/.gitignore index 827413a..9ac256b 100644 --- a/examples/folio/.gitignore +++ b/examples/folio/.gitignore @@ -2,9 +2,9 @@ build/ .kotlin/ local.properties -iosApp/build/ -iosApp/iosApp.xcodeproj/ -iosApp/iosApp.xcodeproj/** +app/iosApp/build/ +app/iosApp/iosApp.xcodeproj/ +app/iosApp/iosApp.xcodeproj/** .DS_Store sanderling/node_modules/ sanderling/runs/ diff --git a/examples/folio/README.md b/examples/folio/README.md index f6f7305..c82204b 100644 --- a/examples/folio/README.md +++ b/examples/folio/README.md @@ -35,7 +35,7 @@ just ios # default device: iPhone 17 Pro IOS_DEVICE="iPhone 15" just ios # pick a different simulator ``` -`just ios` regenerates `iosApp/iosApp.xcodeproj` from `iosApp/project.yml`, +`just ios` regenerates `app/iosApp/iosApp.xcodeproj` from `app/iosApp/project.yml`, builds the KMP framework (`Shared.framework` from `:app:shared`), links it into the SwiftUI host, installs, and launches. diff --git a/examples/folio/iosApp/iosApp/Info.plist b/examples/folio/app/iosApp/iosApp/Info.plist similarity index 100% rename from examples/folio/iosApp/iosApp/Info.plist rename to examples/folio/app/iosApp/iosApp/Info.plist diff --git a/examples/folio/iosApp/iosApp/iOSApp.swift b/examples/folio/app/iosApp/iosApp/iOSApp.swift similarity index 100% rename from examples/folio/iosApp/iosApp/iOSApp.swift rename to examples/folio/app/iosApp/iosApp/iOSApp.swift diff --git a/examples/folio/iosApp/project.yml b/examples/folio/app/iosApp/project.yml similarity index 75% rename from examples/folio/iosApp/project.yml rename to examples/folio/app/iosApp/project.yml index a01b85f..10a632d 100644 --- a/examples/folio/iosApp/project.yml +++ b/examples/folio/app/iosApp/project.yml @@ -19,7 +19,7 @@ targets: sources: - iosApp dependencies: - - framework: ../app/shared/build/bin/iosSimulatorArm64/debugFramework/Shared.framework + - framework: ../shared/build/bin/iosSimulatorArm64/debugFramework/Shared.framework embed: false - sdk: libsqlite3.tbd settings: @@ -28,16 +28,16 @@ targets: PRODUCT_NAME: iosApp INFOPLIST_FILE: iosApp/Info.plist FRAMEWORK_SEARCH_PATHS: - - $(SRCROOT)/../app/shared/build/bin/$(KOTLIN_FRAMEWORK_DIR)/debugFramework + - $(SRCROOT)/../shared/build/bin/$(KOTLIN_FRAMEWORK_DIR)/debugFramework OTHER_LDFLAGS: - -ObjC KOTLIN_FRAMEWORK_DIR: iosSimulatorArm64 preBuildScripts: - name: Build Kotlin framework script: | - cd "$SRCROOT/.." + cd "$SRCROOT/../.." ANDROID_HOME="${ANDROID_HOME:-$HOME/Library/Android/sdk}" \ ./gradlew :app:shared:linkDebugFrameworkIosSimulatorArm64 outputFiles: - - $(SRCROOT)/../app/shared/build/bin/iosSimulatorArm64/debugFramework/Shared.framework/Shared + - $(SRCROOT)/../shared/build/bin/iosSimulatorArm64/debugFramework/Shared.framework/Shared basedOnDependencyAnalysis: false diff --git a/examples/folio/justfile b/examples/folio/justfile index 98bf8e2..98f8321 100644 --- a/examples/folio/justfile +++ b/examples/folio/justfile @@ -55,13 +55,13 @@ clean: set -euo pipefail export ANDROID_HOME="$(just _android-home)" ./gradlew clean - rm -rf iosApp/build + rm -rf app/iosApp/build # Regenerate iosApp.xcodeproj from project.yml. ios-gen: #!/usr/bin/env bash set -euo pipefail - cd iosApp && xcodegen generate + cd app/iosApp && xcodegen generate # Build + install + launch on a booted iOS simulator (boots IOS_DEVICE if none). ios: @@ -74,11 +74,11 @@ ios: sleep 3 fi just ios-gen - xcodebuild -project iosApp/iosApp.xcodeproj -scheme iosApp \ + xcodebuild -project app/iosApp/iosApp.xcodeproj -scheme iosApp \ -destination 'platform=iOS Simulator,name={{ios_device}}' \ - -derivedDataPath iosApp/build \ + -derivedDataPath app/iosApp/build \ build | tail -5 - xcrun simctl install booted iosApp/build/Build/Products/Debug-iphonesimulator/iosApp.app + xcrun simctl install booted app/iosApp/build/Build/Products/Debug-iphonesimulator/iosApp.app xcrun simctl launch booted app.folio # Run 'sanderling test' against the folio app. Uses a connected device if one is