Post

Replies

Boosts

Views

Activity

Reply to Issue with founding any File.swift in the scope after update to Xcode 14.3.1
If the project built with no errors previously, clean the build folder and try building again. Choose Product > Clean Build Folder in Xcode to clean the build folder. If you still get a build error, show the code for Controller. What is Controller? What is the following code supposed to do? .onAppear { Controller() } When showing code, paste it as text and put it in a code block. The code block button is the fourth button from the left in the group of formatting buttons at the bottom of the post editor. You can also use Markdown syntax for a code block by putting three backticks on the line above and below the code in the block. https://www.markdownguide.org/extended-syntax/#fenced-code-blocks Code is easier to read in a text block than in a screenshot. Plus, people can copy and paste the text from a code block.
Jun ’23
Reply to Error setting up git hub
Are you trying to put your Xcode project on GitHub? Or do you have an existing project on GitHub that you want to import in Xcode? To put your Xcode project on GitHub, open the source control navigator in Xcode by pressing Cmd-2 and create a remote branch. To work on a GitHub project in Xcode, clone the project by choosing Source Control > Clone in Xcode. Is there an article on how to setup github with xcode? The following article may help: https://www.swiftdevjournal.com/putting-your-xcode-project-on-github-bitbucket-or-gitlab/
Jun ’23
Reply to Apple Mac install XCODE getting error when trying to install update - won't run without it
What version of Xcode is installed on your Mac? Gone to open, wants to install update. But errors when tries so can no longer use. What specifically happens when you try to launch Xcode and it asks to install and update? List each step you take and be specific. The people on this forum aren't sitting next to you in front of your Mac. They can't read your mind. They can only go by what you write here. And you didn't write enough for people to help you.
Jun ’23
Reply to Crash: Thread 2: "-[NSTaggedPointerString count]: unrecognized selector sent to instance 0xaa672ff3b4678003"
There is nothing obvious in your code that causes the crash, making this a tough error to fix. Start by adding an exception breakpoint to your project. When your app crashes Xcode will pause and show you the line of code where the crash. You can also set a breakpoint at the start of the updateLocalizedTexts function, which is the function that gets called when the app finishes launching. Then you can step through the code line by line to figure out what is causing the crash. The following article should help if you have never used Xcode's debugger before: https://www.swiftdevjournal.com/an-introduction-to-xcodes-debugger/
Topic: Programming Languages SubTopic: Swift Tags:
Jun ’23
Reply to Xcode bug
Your app most likely has crashed. To see where the app is crashing, create an exception breakpoint in Xcode by choosing Debug > Breakpoints > Create Exception Breakpoint. If the app crashes Xcode will pause the app where the crash occurs. The following article may help: https://www.swiftdevjournal.com/fixing-and-avoiding-crashes-in-swift-code/
May ’23
Reply to Bug in SwiftUI List view
I can reproduce the behavior. The following Stack Overflow question has a workaround: https://stackoverflow.com/questions/56561064/swiftui-multiple-buttons-in-a-list-row You can file a bug report with Apple on this by choosing Help > Report an Issue in Xcode.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
May ’23
Reply to ld: symbol(s) not found for architecture x86_64
Please list the steps in detail on what you did to create the code and compile it. The information you provided isn't enough for people to answer your question. Providing more details on what you did to create the code and compile it will give people here a chance to give you a helpful answer. You tagged your question as Xcode, but your screenshot looks like Visual Studio Code. Did you create a project in Xcode or create a C++ file in Visual Studio Code? Does you MacBook have an Intel processor or an Apple Silicon (M1 or M2 chip)? The linker error says it can't find a main function for the Intel architecture.
May ’23
Reply to SwiftUI
The usual cause of the "Closure containing a declaration cannot be used with result builder ViewBuilde" error is doing something besides showing views inside the body of a SwiftUI view. If you do something like declare a function or make a network call inside the body of a SwiftUI view, you will get this error. If you want a fix for the error, show the code for the SwiftUI view where you get this error. Without that code, no one can tell you the mistake you made that caused the error or tell you what you need to do to fix the error.
Topic: Programming Languages SubTopic: Swift Tags:
May ’23
Reply to NavigationSplitView & CoreData Generating an error when adding first entity
Show the code where you add the entity. If you want to see whether the issue is with the split view, create a list that just shows the items and add a way to add new items. If you still have problems, you know the split view isn't causing the problems. Also see the following Stack Overflow question: https://stackoverflow.com/questions/73028881/swiftui-list-crashes-when-adding-items-on-macos
Topic: UI Frameworks SubTopic: SwiftUI Tags:
May ’23
Reply to How do I edit default C++ file templates for Xcode?
Apple's C++ templates are at the following path: /Applications/Xcode.app/Contents/Developer/Library/Xcode/Templates/File Templates/MultiPlatform/Source You should create a custom file template instead of editing the templates in the Xcode app bundle. Copy the C++ file template from Xcode to the path for custom templates. ~/Library/Developer/Xcode/Templates/File Templates You'll probably want to create another folder to hold your custom templates. The following article shows you how to create a custom file template for Xcode: http://www.popcornomnom.com/create-custom-xcode-file-template-for-ios-and-macos-swift-5/ If that article is too complicated, do a search for creating custom Xcode file templates in a search engine. That will give you multiple articles on creating file templates.
Topic: App & System Services SubTopic: Core OS Tags:
May ’23
Reply to NSUnknownKeyException when connecting property IB
Is there a reason you are using a xib file and an IBOutlet to show a single label? It would be easier to create the label in code inside the makeUIView function. If you have a more complex view that requires a xib file or storyboard, use UIViewControllerRepresentable to create a view controller instead of using UIViewRepresentable for a single UI view.
Topic: UI Frameworks SubTopic: UIKit Tags:
May ’23
Reply to Cannot convert value of type in extension
Xcode's compiler should provide a fix for you if you click the button for the error in the source code editor and click the Fix button. The fix is to create a Double value from the precisionNumber constant to use for multiplying and dividing. value *= Double(precisionNumber) value /= Double(precisionNumber)
Topic: App & System Services SubTopic: General Tags:
May ’23
Reply to XCode 14.2 add MacOS 12. How?
You don't need to install the macOS 12 SDK to use the package. The package will work with the macOS 13 SDK that ships with Xcode 14. The macOS(.v12) listing you showed means the package requires macOS 12 or higher. The package won't run on macOS 11, but it will run on macOS 13.
May ’23
Reply to Files not showing up in Documents
Years ago I had a similar issue when I saved documents on a device where I hadn't ever saved a document on that device. The workaround was to create and save a document in one of Apple's iWork apps: Pages or Numbers. After doing that the documents I saved in the app I was developing appeared in the document list.
Topic: App & System Services SubTopic: Core OS Tags:
Apr ’23