XC 12.4 content preview issue


tridiak
 

Created a new SwiftUI template in XC 12.4 and tried to use the content preview of the 'hello world' template.
Content preview blabs this error : "Cannot preview in the file - AppDelegate.swift is not found in any targets".
Besides dropping iPad from the deployment options I have made no changes whatsoever.
Running mac OS 10.15.7 (Catalina).

Anyone have any idea?

TIA Mark

Diagnostics gives this large wall of text

CouldNotFindInputNodeInBuiltGraphError<XcodeGraphSource, PreviewTranslationUnit>: AppDelegate.swift not found in any targets

AppDelegate.swift must belong to at least one target in the current scheme in order to use previews

Element: PreviewTranslationUnit(moduleNamePrefix: "AppDelegate", sourceIdentifier: file:///Users/tridiak/Programming/Active_Projects/DandD/SpellList2/SpellList/SpellList/AppDelegate.swift -> AppDelegate.swift, parseTree: UVModel.ParseTree(modelPath: , dataSource: UVModel.ImmutableTextDataSource(implementation: SourceEditorDataSource: Contents Length: 560, Lines: 36, Locked: false), version: 5610, statements: [UVModel.DeclarationStatement(declaration: UVModel.ImportDeclaration(modelPath: [0], attributes: [], entityFlavor: nil, module: Cocoa, fullName: "Cocoa", location: UVModel.SyntaxLocation(triviaStart: UVModel.SourceLocation.Bound(line: 0, column: 0), start: UVModel.SourceLocation.Bound(line: 7, column: 0), end: UVModel.SourceLocation.Bound(line: 7, column: 12), triviaEnd: UVModel.SourceLocation.Bound(line: 7, column: 12)))), UVModel.DeclarationStatement(declaration: UVModel.ClassDeclaration(modelPath: [1], typePath: UVModel.TypePath(components: PreviewFoundation.Inhabited<Swift.Array<UVModel.TypePath.Component>>(predicated: PreviewFoundation.Predicated<PreviewFoundation.HasHead<Swift.Array<UVModel.TypePath.Component>>>(value: [UVModel.TypePath.Component(genre: UVModel.TypeNameGenre.class, name: "AppDelegate")], proof: UVModel.TypePath.Component(genre: UVModel.TypeNameGenre.class, name: "AppDelegate")))), accessLevel: nil, attributes: ["@main"], inheritedTypes: [NSObject, NSApplicationDelegate], members: [UVModel.ConcreteTypeDeclarationMember.declaration(UVModel.VariableDeclaration(modelPath: [1].[0], name: "window", type: Optional(NSWindow!), isStatic: false, mutability: UVModel.VariableDeclaration.Mutability.mutable, value: nil, property: nil, rewriter: UVModel.SwiftSyntaxVariableDeclarationRewriter(version: 5610, nameLocation: UVModel.SyntaxLocation(triviaStart: UVModel.SourceLocation.Bound(line: 12, column: 15), start: UVModel.SourceLocation.Bound(line: 12, column: 15), end: UVModel.SourceLocation.Bound(line: 12, column: 21), triviaEnd: UVModel.SourceLocation.Bound(line: 12, column: 21)), equalLocation: nil, value: nil, declLocation: UVModel.SyntaxLocation(triviaStart: UVModel.SourceLocation.Bound(line: 10, column: 52), start: UVModel.SourceLocation.Bound(line: 12, column: 1), end: UVModel.SourceLocation.Bound(line: 12, column: 32), triviaEnd: UVModel.SourceLocation.Bound(line: 12, column: 32))))), UVModel.ConcreteTypeDeclarationMember.declaration(UVModel.FunctionDeclaration(modelPath: [1].[1], name: "applicationDidFinishLaunching", fullName: "applicationDidFinishLaunching(_:)", postnameDeclarationCode: "(_ aNotification: Notification)", declarationLevel: UVModel.MemberDeclarationLevel.instance, isOperator: false, isInlined: false, isMutating: false, isStatic: false, attributes: [], parameters: [UVModel.FunctionDeclaration.Parameter(externalName: UVModel.ParameterExternalName.none, name: "aNotification", type: Notification)], returnType: nil, body: UVModel.CodeBlock(modelPath: [1].[1], name: UVModel.ModelPath.Component.CollectionName.anonymous, statements: [UVModel.ExpressionStatement(expression: UVModel.InstantiationExpression(modelPath: [1].[1].[0], type: LoadSpellSlotsFile, callee: UVModel.SyntaxLocation(triviaStart: UVModel.SourceLocation.Bound(line: 15, column: 68), start: UVModel.SourceLocation.Bound(line: 18, column: 2), end: UVModel.SourceLocation.Bound(line: 18, column: 20), triviaEnd: UVModel.SourceLocation.Bound(line: 18, column: 20)), arguments: [UVModel.Argument(modelPath: [1].[1].[0].arg[0], name: Optional("force"), value: UVModel.BooleanLiteralExpression(modelPath: [1].[1].[0].arg[0].value, value: true, modifiers: [], rewriter: UVModel.BasicExpressionRewriter(locationWithoutModifiers: UVModel.SyntaxLocation(triviaStart: UVModel.SourceLocation.Bound(line: 18, column: 28), start: UVModel.SourceLocation.Bound(line: 18, column: 28), end: UVModel.SourceLocation.Bound(line: 18, column: 32), triviaEnd: UVModel.SourceLocation.Bound(line: 18, column: 32)), modifierLocations: [], version: 5610)), location: UVModel.SyntaxLocation(triviaStart: UVModel.SourceLocation.Bound(line: 18, column: 21), start: UVModel.SourceLocation.Bound(line: 18, column: 21), end: UVModel.SourceLocation.Bound(line: 18, column: 32), triviaEnd: UVModel.SourceLocation.Bound(line: 18, column: 32)), version: 5610)], subscriptArguments: [], modifiers: [], argumentRewriter: UVModel.SwiftSyntaxFunctionCallArgumentRewriter(nodeBeforeArgumentListLocation: UVModel.SyntaxLocation(triviaStart: UVModel.SourceLocation.Bound(line: 15, column: 68), start: UVModel.SourceLocation.Bound(line: 18, column: 2), end: UVModel.SourceLocation.Bound(line: 18, column: 20), triviaEnd: UVModel.SourceLocation.Bound(line: 18, column: 20)), leftDelimiterLocation: Optional(UVModel.SyntaxLocation(triviaStart: UVModel.SourceLocation.Bound(line: 18, column: 20), start: UVModel.SourceLocation.Bound(line: 18, column: 20), end: UVModel.SourceLocation.Bound(line: 18, column: 21), triviaEnd: UVModel.SourceLocation.Bound(line: 18, column: 21))), argumentLocations: [(argument: UVModel.SyntaxLocation(triviaStart: UVModel.SourceLocation.Bound(line: 18, column: 21), start: UVModel.SourceLocation.Bound(line: 18, column: 21), end: UVModel.SourceLocation.Bound(line: 18, column: 32), triviaEnd: UVModel.SourceLocation.Bound(line: 18, column: 32)), expression: UVModel.SyntaxLocation(triviaStart: UVModel.SourceLocation.Bound(line: 18, column: 28), start: UVModel.SourceLocation.Bound(line: 18, column: 28), end: UVModel.SourceLocation.Bound(line: 18, column: 32), triviaEnd: UVModel.SourceLocation.Bound(line: 18, column: 32)), trailingComma: nil)], rightDelimiterLocation: Optional(UVModel.SyntaxLocation(triviaStart: UVModel.SourceLocation.Bound(line: 18, column: 32), start: UVModel.SourceLocation.Bound(line: 18, column: 32), end: UVModel.SourceLocation.Bound(line: 18, column: 33), triviaEnd: UVModel.SourceLocation.Bound(line: 18, column: 33))), trailingClosureLocation: nil, version: 5610), rewriter: UVModel.InstantiationExpressionRewriter(calleeLocation: UVModel.SyntaxLocation(triviaStart: UVModel.SourceLocation.Bound(line: 15, column: 68), start: UVModel.SourceLocation.Bound(line: 18, column: 2), end: UVModel.SourceLocation.Bound(line: 18, column: 20), triviaEnd: UVModel.SourceLocation.Bound(line: 18, column: 20)), calleeAndArgumentListLocation: UVModel.SyntaxLocation(triviaStart: UVModel.SourceLocation.Bound(line: 15, column: 68), start: UVModel.SourceLocation.Bound(line: 18, column: 2), end: UVModel.SourceLocation.Bound(line: 18, column: 33), triviaEnd: UVModel.SourceLocation.Bound(line: 18, column: 33)), modifierLocations: [], subscriptRewriter: UVModel.SwiftSyntaxSubscriptArgumentRewriter(nodeBeforeArgumentListLocation: UVModel.SyntaxLocation(triviaStart: UVModel.SourceLocation.Bound(line: 15, column: 68), start: UVModel.SourceLocation.Bound(line: 18, column: 2), end: UVModel.SourceLocation.Bound(line: 18, column: 33), triviaEnd: UVModel.SourceLocation.Bound(line: 18, column: 33)), leftDelimiterLocation: nil, argumentLocations: [], rightDelimiterLocation: nil, version: 5610), version: 5610))), UVModel.UnsupportedStatement(modelPath: [1].[1].[1], name: nil, type: Optional(""))]), rewriter: UVModel.SwiftSyntaxMemberProcedureDeclarationRewriter(version: 5610, leftBraceLocation: UVModel.SyntaxLocation(triviaStart: UVModel.SourceLocation.Bound(line: 15, column: 67), start: UVModel.SourceLocation.Bound(line: 15, column: 67), end: UVModel.SourceLocation.Bound(line: 15, column: 68), triviaEnd: UVModel.SourceLocation.Bound(line: 15, column: 68)), statementLocations: [UVModel.SyntaxLocation(triviaStart: UVModel.SourceLocation.Bound(line: 15, column: 68), start: UVModel.SourceLocation.Bound(line: 18, column: 2), end: UVModel.SourceLocation.Bound(line: 18, column: 33), triviaEnd: UVModel.SourceLocation.Bound(line: 18, column: 33)), UVModel.SyntaxLocation(triviaStart: UVModel.SourceLocation.Bound(line: 18, column: 33), start: UVModel.SourceLocation.Bound(line: 21, column: 2), end: UVModel.SourceLocation.Bound(line: 26, column: 3), triviaEnd: UVModel.SourceLocation.Bound(line: 26, column: 3))], rightBraceLocation: UVModel.SyntaxLocation(triviaStart: UVModel.SourceLocation.Bound(line: 26, column: 3), start: UVModel.SourceLocation.Bound(line: 27, column: 1), end: UVModel.SourceLocation.Bound(line: 27, column: 2), triviaEnd: UVModel.SourceLocation.Bound(line: 27, column: 2))), flavor: UVModel.ProceduralDeclarationFlavor.function)), UVModel.ConcreteTypeDeclarationMember.declaration(UVModel.FunctionDeclaration(modelPath: [1].[2], name: "applicationWillTerminate", fullName: "applicationWillTerminate(_:)", postnameDeclarationCode: "(_ aNotification: Notification)", declarationLevel: UVModel.MemberDeclarationLevel.instance, isOperator: false, isInlined: false, isMutating: false, isStatic: false, attributes: [], parameters: [UVModel.FunctionDeclaration.Parameter(externalName: UVModel.ParameterExternalName.none, name: "aNotification", type: Notification)], returnType: nil, body: UVModel.CodeBlock(modelPath: [1].[2], name: UVModel.ModelPath.Component.CollectionName.anonymous, statements: []), rewriter: UVModel.SwiftSyntaxMemberProcedureDeclarationRewriter(version: 5610, leftBraceLocation: UVModel.SyntaxLocation(triviaStart: UVModel.SourceLocation.Bound(line: 29, column: 62), start: UVModel.SourceLocation.Bound(line: 29, column: 62), end: UVModel.SourceLocation.Bound(line: 29, column: 63), triviaEnd: UVModel.SourceLocation.Bound(line: 29, column: 63)), statementLocations: [], rightBraceLocation: UVModel.SyntaxLocation(triviaStart: UVModel.SourceLocation.Bound(line: 29, column: 63), start: UVModel.SourceLocation.Bound(line: 31, column: 1), end: UVModel.SourceLocation.Bound(line: 31, column: 2), triviaEnd: UVModel.SourceLocation.Bound(line: 31, column: 2))), flavor: UVModel.ProceduralDeclarationFlavor.function))], identifierLocation: UVModel.SyntaxLocation(triviaStart: UVModel.SourceLocation.Bound(line: 10, column: 6), start: UVModel.SourceLocation.Bound(line: 10, column: 6), end: UVModel.SourceLocation.Bound(line: 10, column: 17), triviaEnd: UVModel.SourceLocation.Bound(line: 10, column: 17)), location: UVModel.SyntaxLocation(triviaStart: UVModel.SourceLocation.Bound(line: 7, column: 12), start: UVModel.SourceLocation.Bound(line: 9, column: 0), end: UVModel.SourceLocation.Bound(line: 34, column: 1), triviaEnd: UVModel.SourceLocation.Bound(line: 34, column: 1))))], location: UVModel.SyntaxLocation(triviaStart: UVModel.SourceLocation.Bound(line: 0, column: 0), start: UVModel.SourceLocation.Bound(line: 7, column: 0), end: UVModel.SourceLocation.Bound(line: 35, column: 0), triviaEnd: UVModel.SourceLocation.Bound(line: 35, column: 0)), previewProviderPaths: []))

Join xcode@apple-dev.groups.io to automatically receive all group messages.