Post

Replies

Boosts

Views

Activity

Reply to On macOS, what is the appropriate way to disable the sidebar material in a NavigationSplitView?
If your sidebar has a list, you can use the .listStyle modifier to give the list a diffferent style than the sidebar style, which is the default for a navigation split view on Mac. The following modifier creates a plain list style: .listStyle(.plain) If your sidebar doesn't have a list, show the code for it so people can provide an alternative to the .background modifier you used in your example.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
1w
Reply to Document Based Apps - Support all possible UTTypes
The imported type identifier needs to conform to one of the base types. Apple has a list of system-defined UTTypes at the following link: https://developer.apple.com/documentation/uniformtypeidentifiers/system-declared-uniform-type-identifiers I'm not sure what UTType would open any file but you could test the following: public.item public.content public.data public.text
2w
Reply to GIT incorrectly monitoring changes to system files
First, open your repo in another git app, such as SourceTree, and see if the other app shows the numerous changes. That will let you know whether your problem is an Xcode problem or a git problem. You can remove the git repository and see if that fixes the problem. In the Finder, press Cmd-Shift-Dot to show hidden folders. The git repository is in a .git folder inside the playground folder. You will have to create a new git repository for the playground after removing the old git repo. You should also add a .gitignore file to your git repository to ignore system files. An easy way to create a git ignore file is to go to the following URL: https://www.toptal.com/developers/gitignore/ Enter Xcode in the search field and click the Create button to create a git ignore file. Create a plain text file for the git ignore file and paste the contents of the git ignore file that you generated into the text file.
Jun ’25
Reply to Attribute Inspector
Do you have a storyboard or xib file open in your project? The attributes inspector works with storyboard and xib files. You have to open a storyboard or xib file to have access to the attributes inspector. If you select a source code file in the project, the attributes inspector won't be available. You can access the inspectors by choosing View > Inspectors.
Jun ’25
Reply to How to install codes from Playground on iPhone
I'm not sure if you are asking about running a playground on an iPhone or if you are asking about running an app you wrote with the Mac version of Swift Playgrounds on an iPhone. But the answer is the same either way. No, you won't be able to run your code on an iPhone. Swift Playgrounds is available for iPad and Mac, not iPhone. You are not going to be able to run playground code that is not an app on an iPhone. You could run the code on an iPad if you install the iPad version of Swift Playgrounds. The Mac version of Swift Playgrounds makes Mac Catalyst apps, a Mac version of an iPad app. You are not going to be able to run an app you make with the Mac version of Swift Playgrounds on an iPhone. My suggestion is to continue learning to code using Swift Playgrounds on Mac. When you are ready to make an iPhone app, create an iOS app project in Xcode.
Apr ’25
Reply to My first Xcode build ever But EXC_BAD_ACCESS (code=2, address=0x16e837f30) keeps happening
Your app is crashing. Unfortunately there's nothing in the code you showed that would cause a crash. You have /*@START_MENU_TOKEN@*/ and /*@END_MENU_TOKEN@*/ tokens in the code listing, but my guess is that's a copy paste error. Your project wouldn't build if those tokens were in your actual code. Add an exception breakpoint in Xcode. When your app crashes, Xcode will pause your project, showing you the code where the app crashed. In Xcode choose Debug > Breakpoints > Create Exception Breakpoint to add an exception breakpoint.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’25
Reply to Need iOS 18.3.2 Device Support Files for Xcode 14.3.1 on macOS Ventura 13.7.4
Apple stopped providing device support files, starting with iOS 17. There are no iOS 18 support files to add to your Xcode 14 install. According to the following article: https://hybridcattt.com/blog/debugging-on-latest-ios-with-older-xcode You can tell Xcode to not start debugging your project when it launches and attach to the debugger after the app launches. I have not tested this technique so I can't guarantee it will work. But it's the only alternative i know of to debug your project if you can't update to Xcode 16 and don't have an iOS 16 device to use with Xcode 14.
Mar ’25
Reply to how do I enable Save As in File menu in SwiftUI?
I don't know how to have the Save As menu appear all the time in a SwiftUI app. The Save panel appears only the first time you save a document when choosing File > Save. After that there's no need for a Save panel when you choose File > Save because the OS knows the name and location of the document.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Mar ’25
Reply to how do I enable Save As in File menu in SwiftUI?
On Mac you have to hold down the Option key to make the Save As menu item appear in the File menu. The Save As menu item is meant for saving the current document with a different file name. The menu item doesn't have anything to do with multiple content types. If you have multiple writable content types, the Save panel has a menu to choose the file type to use to save the document when you choose File > Save. You don't need the Save As menu item to specify a file type for a saved document.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Mar ’25