cd ../
./gradlew appioscombined:assembleXCFramework
open DroidKaigi2022/DroidKaigi2022.xcodeproj
- Xcode 13.4.1
Warning If you cloned for the first time, you need to try some workaround. Please check it. Workaround needed for build
- Xcode 14.0 or Later (Recommended)
Feature based module definition.
Development tools are introduced by Swift Package Manager Plugin.
In this project, these packages are local plugin (Local defined plugin) and the why of using local plugin is performance issue of Xcode. When using remote package plugin, Xcode CPU usage becomes so high (over 100%).
import PackagePlugin
@main
struct SwiftLintPlugins: BuildToolPlugin {
func createBuildCommands(context: PluginContext, target: Target) async throws -> [Command] {
return [
.buildCommand(
displayName: "Linting \(target.name)",
executable: try context.tool(named: "swiftlint").path,
arguments: [
"lint",
"--in-process-sourcekit", // alternative to the environment variable
target.directory.string // only lint the files in the target directory
],
environment: [:]
)
]
}
}
For building this App with Xcode 13.4.1, we need to run following before build whole app. Some targets that depends on SwiftGenPlugin needs to build individualy.
For example, a target "Theme" depends on "SwiftGenPlugin", it needs to build individualy.
Before preview resume, specifying "Target" that a preview target view is belonged is needed.
For example, when preview "AboutView", specify "AboutFeature".