Hello, I'm intaek cho.
I thought SPM can include sample app and build it.
But I realized that it seems not working.
Here is my local directory.
MyPackage
- MyPackage
- MyPackageTests
- MyPackageSample
- MyPackageSample
- ...
- AppDelegate(or main for objc)
- MyPackageSample
And here is my Package.swift
.
// swift-tools-version:5.7
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "MyPackage",
defaultLocalization: "en",
platforms: [.iOS(.v15)],
products: [
.library(
name: "MyPackage",
targets: ["MyPackage"]),
],
targets: [
.target(
name: "MyPackage",
path: "MyPackage",
.testTarget(
name: "MyPackageTests",
dependencies: ["MyPackage"],
path: "MyPackageTests",
.executableTarget(
name: "MyPackageSample",
dependencies: [
"MyPackage"
],
path: "MyPackageSample/MyPackageSample"
)
]
)
And I added a scheme for MyPackageSample and built it.
But I got a crash like below.
com.apple.uikit.eventfetch-thread (8): EXC_BREAKPOINT (code=1, subcode=0x189e021c0)
Is it not possible to build sample project in SPM?
Do I have to always close the SPM and reopen the sample app project(xcodeproj
)?
Thanks.