Post

Replies

Boosts

Views

Activity

Reply to Xcode has stopped working
Provide more details on what you mean when you say the following: When I checked out my account I am told that my session has timed out and I need to login.  What do you mean by "checked out my account"? What is the exact message you get telling you that you need to login? What happens if you login with your Mac user account's password instead of your Apple ID and password?
Jul ’22
Reply to Message "Expected '}' at end of brace statement"
You have four left braces in your code and only three right braces. Each left brace needs a matching right brace. Add a right brace after the second return statement. func responseTo(question: String) -> String {     if question.hasPrefix("hello") {         if lowerQuestion2.hasPrefix("hello") {             return "Hello there"         } else {             return "That really depends" } // Add the brace here to close the else block.     } // End the outer if block } // End of func
Topic: Programming Languages SubTopic: Swift Tags:
Jul ’22
Reply to Submit an macOS app and Xcode version
You can publish Mac apps outside the App Store so you wouldn't have to use Xcode 13. If the app is free, you can host the app on your own site and provide a Download button. A paid app requires more work. You have to find a way to deal with licensing and process payments. Companies like Gumroad, Paddle, and FastSpring will help with this. The following book shows you how to sell software outside the Mac App Store: https://christiantietze.de/books/make-money-outside-mac-app-store-fastspring/
Jul ’22
Reply to How can I update my app to make it compatible with older ios versions?
Set the deployment target for the app's target to the earliest iOS version you want to support. Select the project file from the project navigator on the left side of the project window to access the deployment target. If you need more detailed instructions on setting the deployment target, read the following article: https://www.swiftdevjournal.com/supporting-older-versions-of-ios-and-macos/
Topic: Safari & Web SubTopic: General Tags:
Jul ’22
Reply to Fatal Error: UIViewControllerRepresentables must be value types: ViewControllerResolver
Does your app use UIViewControllerRepresentable? If so, is your data structure that uses UIViewControllerRepresentable a struct or a class? The error message is saying you have a class that conforms to UIViewControllerRepresentable, and that you have to use a struct instead of a class. Setting an exception breakpoint in Xcode and running the app can help you find where the app is crashing. Choose Debug > Breakpoints > Create Exception Breakpoint to set an exception breakpoint.
Jun ’22
Reply to Unable to pass down returned value from one view to another
What is the specific problem you are having? What are you expecting to happen when you tap the Add button and what happens when you tap the Add button? I looked at your code for the navigation bar items. The navigation link for the Add button passes an empty note to the note view with an empty ID before you have a chance to call addNote and get the new note's ID. You may have to create a new view for adding notes and show that when someone taps the Add button. Add the note when someone taps an Add button in the Add Note view. Your DataManager class refers to a Note struct or class. Why do you have separate @State properties for the note contents and ID in the NoteView struct instead of a Note instance? Your addNote function could return the note instead of the ID. I think it would be easier to deal with notes than to deal with their individual pieces separately.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’22
Reply to Could not load NIB in bundle
Are you getting this error when running your app in Xcode? If so, you're getting the error because you're running a newer version of tvOS than Xcode 13.1 supports. Xcode 13.1 does not support any versions of tvOS newer than 15.2. You have two options: update Xcode to Xcode 13.3 or 13.4 or downgrade to tvOS 15.2. I'm not sure if it's possible to downgrade to an older version of tvOS. If you are still getting the error after updating Xcode, you will have to show your code to load the storyboard from the app bundle and show the layout of your app bundle for anyone to help you. Are you sure the storyboard is in the app bundle? Is the storyboard in the app bundle location where the storyboard loading code is expecting it?
Topic: App & System Services SubTopic: Core OS Tags:
May ’22
Reply to About page
Is this for iOS or Mac? For Mac I can answer. In Xcode choose File > New > File and add a RTF file to your project. Name the file Credits.rtf. Edit the files with what you want to appear in the About box. You can find additional information in the following article: https://www.swiftdevjournal.com/customizing-the-about-box-in-your-mac-app/
Topic: UI Frameworks SubTopic: SwiftUI Tags:
May ’22
Reply to Do I have to be a paid developer to develop MacOS programs for personal use?
You do not need a paid developer account to develop Mac apps for personal use. You need a paid account to do the following: Submit an app to the Mac App Store Use Apple capabilities like iCloud and Game Center Sign and notarize your app with a developer ID to work with Apple's Gatekeeper feature Gatekeeper makes it painful to open apps that aren't notarized. Without a paid developer account you won't be able to notarize your apps. Your options are to rebuild the apps periodically or bypass Gatekeeper. The following article shows how to bypass Gatekeeper for a single app: https://disable-gatekeeper.github.io
Topic: Code Signing SubTopic: General Tags:
May ’22
Reply to SwiftUI NSOpenPanel runs but then crashes Mac app
The fileOpenDialog function returns an array of optional URLs. What does that function return when you call it? The following line is going to crash if the array is empty: var csvURLString = fileOpenDialog()[0]?.path SwiftUI has a fileImporter modifier that shows an Open panel so you can avoid using NSOpenPanel. Searching for swiftui fileimporter in a search engine brings up several articles on using the file importer. If you still want to use NSOpenPanel with SwiftUI, the following article may help you: https://serialcoder.dev/text-tutorials/macos-tutorials/save-and-open-panels-in-swiftui-based-macos-apps/
Topic: UI Frameworks SubTopic: SwiftUI Tags:
May ’22