Extension scheme when contains application target #1523
Open
Description
When an extension scheme contains application target.
wasCreatedForAppExtension
becomes false
.
In SchemeGenerator
.
if let targetName = scheme.run?.executable {
schemeTarget = project.getTarget(targetName)
} else {
guard let firstTarget = scheme.build.targets.first else {
throw SchemeGenerationError.missingBuildTargets(scheme.name)
}
let name = scheme.build.targets.first { $0.buildTypes.contains(.running) }?.target.name ?? firstTarget.target.name
schemeTarget = target ?? project.getTarget(name)
}
If enables askForAppToLaunch
, the scheme.run?.executable
is Ask on Launch
So schemeTarget
is nil
-> wasCreatedForAppExtension
is false
.
Disable askForAppToLaunch
to run else
block still not working in this case.
In Project.init(spec:)
spec.resolvedDictionary()
sorts targets so the first target is sample
not sampleShare
.
schemeTarget
is sample
-> wasCreatedForAppExtension
is false
.
any suggestions?
Metadata
Assignees
Labels
No labels