Date   

Dynamic Type text style

Carl Hoefs
 

Xcode 12.5, macOS 11.4

Xcode is issuing a warning for every NSTextField in my GUI that has "Automatically Adjusts Font" enabled:
  Automatically Adjusts Font requires using a Dynamic Type text style

I need this enabled on those text fields, so I've tried using System, Body, and even Helvetica, but it still warns of needing a Dynamic Type text style. 

What is a Dynamic Type text style, and how do I specify it?
-Carl


Re: Xcode 12.5 crash

Alex Zavatone
 

Ohh, I see it now.

It’s an error with NSRange.  It’s expecting a multibyte character and it’s not getting one so the range is -1 what it’s expecting.

Use Ben’s suggestion.  Nice bug though.  

Alex Zavatone

On Jun 23, 2021, at 5:04 PM, Carl Hoefs <newslists@...> wrote:

Xcode 12.5, macOS 11.4

If I insert a copyright character (©) from the "Emoji & Symbols" character viewer palette into a NSTextField on the storyboard, Xcode crashes reliably with:

UNCAUGHT EXCEPTION (NSRangeException): *** -[NSBigMutableString _getBlockStart:end:contentsEnd:forRange:stopAtLineSeparators:]: Range {0, 14} out of bounds; string length 13

Note: It crashes when I insert the character into the Attributes Inspector field (see attached).

Can anyone else verify, or is my Xcode installation hosed?
-Carl

<Screen Shot 2021-06-23 at 2.58.28 PM.png>


Re: Xcode 12.5 crash

Alex Zavatone
 

I don’t see any linked image.

Can you send it to me offlist?

And +1 on option G, option 2, option R.

Alex Zavatone

On Jun 23, 2021, at 6:00 PM, Ben Kennedy <ben-groups@zygoat.ca> wrote:


On 23 Jun 2021, at 3:04 pm, Carl Hoefs <newslists@autonomy.caltech.edu> wrote:

Note: It crashes when I insert the character into the Attributes Inspector field (see attached).

Can anyone else verify, or is my Xcode installation hosed?
Works for me™ (presuming I'm executing the same steps you are).

FWIW, for the copyright symbol it's probably a whole lot easier to just type option-G.

b






Re: Dynamic Type text style

Alex Zavatone
 

Funny you should ask, I’m dealing with that right now.  

Apple uses Dynamic Type as a way to scale up text when someone selects the Accessibility option of Larger Type and then uses the slider to get larger type.

There are certain reserved styles that will scale using this and you can make your own.

Some of the better articles on it are on UseYourLoaf.



Cheers,
Alex Zavatone


On Jun 23, 2021, at 6:11 PM, Carl Hoefs <newslists@...> wrote:

Xcode 12.5, macOS 11.4

Xcode is issuing a warning for every NSTextField in my GUI that has "Automatically Adjusts Font" enabled:
  Automatically Adjusts Font requires using a Dynamic Type text style

I need this enabled on those text fields, so I've tried using System, Body, and even Helvetica, but it still warns of needing a Dynamic Type text style. 

What is a Dynamic Type text style, and how do I specify it?
-Carl




Dynamic Type text style

Carl Hoefs
 

Xcode 12.5, macOS 11.4

Xcode is issuing a warning for every NSTextField in my GUI that has "Automatically Adjusts Font" enabled:
  Automatically Adjusts Font requires using a Dynamic Type text style

I need this enabled on those text fields, so I've tried using System, Body, and even Helvetica, but it still warns of needing a Dynamic Type text style. 

What is a Dynamic Type text style, and how do I specify it?
-Carl



Re: Xcode 12.5 crash

Ben Kennedy
 

On 23 Jun 2021, at 3:04 pm, Carl Hoefs <newslists@autonomy.caltech.edu> wrote:

Note: It crashes when I insert the character into the Attributes Inspector field (see attached).

Can anyone else verify, or is my Xcode installation hosed?
Works for me™ (presuming I'm executing the same steps you are).

FWIW, for the copyright symbol it's probably a whole lot easier to just type option-G.

b


Xcode 12.5 crash

Carl Hoefs
 

Xcode 12.5, macOS 11.4

If I insert a copyright character (©) from the "Emoji & Symbols" character viewer palette into a NSTextField on the storyboard, Xcode crashes reliably with:

UNCAUGHT EXCEPTION (NSRangeException): *** -[NSBigMutableString _getBlockStart:end:contentsEnd:forRange:stopAtLineSeparators:]: Range {0, 14} out of bounds; string length 13

Note: It crashes when I insert the character into the Attributes Inspector field (see attached).

Can anyone else verify, or is my Xcode installation hosed?
-Carl


Re: Xcode 12.4 and GIt.

Gary L. Wade
 

Whenever you have Xcode git issues, compare what you see with what you get from the command line using raw git. Also, Xcode 13 beta is out (also 12.5); you might try the SCM part of it with your repository even if you don’t adopt any new features.
--
Gary L. Wade
http://www.garywade.com/


Re: Xcode 12.4 and GIt.

Alex Zavatone
 

On Jun 11, 2021, at 12:35 PM, Ben Kennedy <ben-groups@zygoat.ca> wrote:

On 11 Jun 2021, at 8:14 am, Alex Zavatone via groups.io <zav=mac.com@groups.io> wrote:

We just noticed that in Xcode 12.4 that once we do a fresh pull from GitHub, that when we view the git log in Xcode it frequently shows much less than the log in GitHub.
I don't use Xcode's built-in SCM so I'm not the best person to be responding, but I'm curious.

Can you be more specific about what's absent? Are commits missing?
In the log, yeah. Commits are missing when we selected ALL when compared to the commit log in GitHub.

Just now, we did a merge from our main branch. I pulled that main branch and merged into my branch. Loads of oddness and errors started happening.

So, I took the main branch and verified that a build (iOS) would run. It did.

Then I just made a new branch from main. The build scheme that I had just run was gone. Gone. Earlier, after making a new branch, one build scheme for our app turned into a suitcase.

I haven’t lost much, but other team members have been talking about “Xcode git hell” in 12.4 and 12.5.

The hell I’ve seen is that we push and pull and merge and files disappear or the log is off.

I’ll test it again but it’s spooky.


IIRC it used to be the case that Xcode couldn't properly follow the history of files that were moved or renamed (`git log --follow`), though I'm not sure whether that's been fixed.

-ben






Re: Xcode 12.4 and GIt.

Ben Kennedy
 

On 11 Jun 2021, at 8:14 am, Alex Zavatone via groups.io <zav=mac.com@groups.io> wrote:

We just noticed that in Xcode 12.4 that once we do a fresh pull from GitHub, that when we view the git log in Xcode it frequently shows much less than the log in GitHub.
I don't use Xcode's built-in SCM so I'm not the best person to be responding, but I'm curious.

Can you be more specific about what's absent? Are commits missing?

IIRC it used to be the case that Xcode couldn't properly follow the history of files that were moved or renamed (`git log --follow`), though I'm not sure whether that's been fixed.

-ben


Xcode 12.4 and GIt.

Alex Zavatone
 

We just noticed that in Xcode 12.4 that once we do a fresh pull from GitHub, that when we view the git log in Xcode it frequently shows much less than the log in GitHub.

Has anyone else seen this? Is there some setting that we’re missing?

Thanks in advance.
Alex Zavatone


Re: If anyone likes to use option to copy a range of text, don't do it in Xcode and hit undo.

Rick Mann
 

BTW if you "paste and preserve formatting" it'll insert the block at the insertion point, rather than inserting each line a the corresponding point in the line below the current insertion point.

On Jun 10, 2021, at 13:36 , Alex Zavatone via groups.io <zav=mac.com@groups.io> wrote:

You’ll get as many text insertion points as you have lines pasted.

It can screw up your code fast if you like to press things like keys on your keyboard, including Return or Enter.

Simply clicking outside your undo block can reset your 47 text insertion points.

Caveat emptor and away!

Cheers,
Alex Zavatone



--
Rick Mann
rmann@latencyzero.com


Re: If anyone likes to use option to copy a range of text, don't do it in Xcode and hit undo.

Alex Zavatone
 

Sorry, I meant an undo after a paste. There’s nothing stranger than getting stuck with 47 insertion points after you pasted in the wrong place, then did an undo and are left with 47 insertion points.

On Jun 10, 2021, at 5:06 PM, Ben Kennedy <ben-groups@zygoat.ca> wrote:


On 10 Jun 2021, at 2:58 pm, Alex Zavatone via groups.io <zav=mac.com@groups.io> wrote:

Even if you undo it? Why does it keep the multiple insertion points after you hit undo?
I don't think copying or undoing has anything to do with this (certainly the notion of copy followed by undo doesn't make sense).

If you option-drag to select a multi-line range, and then immediately press a cursor (arrow) key, you'll have the plural cursors. An easy way to summon them when wanted.

-b






Re: If anyone likes to use option to copy a range of text, don't do it in Xcode and hit undo.

Ben Kennedy
 

On 10 Jun 2021, at 2:58 pm, Alex Zavatone via groups.io <zav=mac.com@groups.io> wrote:

Even if you undo it? Why does it keep the multiple insertion points after you hit undo?
I don't think copying or undoing has anything to do with this (certainly the notion of copy followed by undo doesn't make sense).

If you option-drag to select a multi-line range, and then immediately press a cursor (arrow) key, you'll have the plural cursors. An easy way to summon them when wanted.

-b


Re: If anyone likes to use option to copy a range of text, don't do it in Xcode and hit undo.

Alex Zavatone
 

Even if you undo it? Why does it keep the multiple insertion points after you hit undo?

On Jun 10, 2021, at 4:56 PM, Ben Kennedy <ben-groups@zygoat.ca> wrote:


On 10 Jun 2021, at 1:36 pm, Alex Zavatone via groups.io <zav=mac.com@groups.io> wrote:

You’ll get as many text insertion points as you have lines pasted.

It can screw up your code fast if you like to press things like keys on your keyboard, including Return or Enter.

Simply clicking outside your undo block can reset your 47 text insertion points.
Pressing Escape works too.

This is a feature. It makes multi-line editing a breeze. I've taken advantage of it on several occasions.

-ben






Re: If anyone likes to use option to copy a range of text, don't do it in Xcode and hit undo.

Ben Kennedy
 

On 10 Jun 2021, at 1:36 pm, Alex Zavatone via groups.io <zav=mac.com@groups.io> wrote:

You’ll get as many text insertion points as you have lines pasted.

It can screw up your code fast if you like to press things like keys on your keyboard, including Return or Enter.

Simply clicking outside your undo block can reset your 47 text insertion points.
Pressing Escape works too.

This is a feature. It makes multi-line editing a breeze. I've taken advantage of it on several occasions.

-ben


If anyone likes to use option to copy a range of text, don't do it in Xcode and hit undo.

Alex Zavatone
 

You’ll get as many text insertion points as you have lines pasted.

It can screw up your code fast if you like to press things like keys on your keyboard, including Return or Enter.

Simply clicking outside your undo block can reset your 47 text insertion points.

Caveat emptor and away!

Cheers,
Alex Zavatone


Re: XC 12.4 content preview issue

tridiak
 

First thing I checked. It is.

On 6/06/2021, at 4:33 AM, Alex Zavatone via groups.io <zav@...> wrote:

Open the File Inspector.

Is AppDelegate.swift part of any targets?  If not, add it to your target.

Cheers,
Alex Zavatone

On Jun 4, 2021, at 5:10 PM, tridiak <tridiaknz@...> wrote:

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: []))



Re: XC 12.4 content preview issue

Rick Mann
 

I get this problem a lot with Xcode 12.5, and it seems like a bug. Sometimes cleaning the project and quitting Xcode helps.

On Jun 4, 2021, at 15:10 , tridiak <tridiaknz@gmail.com> wrote:

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: []))
--
Rick Mann
rmann@latencyzero.com


Re: Storyboard Library closing all the time

James Walker
 

On Jun 5, 2021, at 11:29 AM, Alex Zavatone via groups.io <zav=mac.com@groups.io> wrote:

Does anyone know if there is a way when working in the storyboard to prevent the library from closing after you drag an item from it? It’s pretty infuriating to have to open it again after EVERY time you place an item.

Fingers crossed.
Option-click the + button to open the library window, and it will stay open.

21 - 40 of 1424