Post

Replies

Boosts

Views

Activity

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
Reply to Can't run Swift App on Mojave
What architectures did you build for? What is the value of the Build Active Architecture setting? Judging by the problems you're having, it looks like you built for the active architecture only. If you click the Run button in Xcode's toolbar, Xcode is set to build a Debug build, which builds only for the active architecture. On an M1 Mac, building for the active architecture builds an app that won't run on Intel Macs. Any Mac running 10.14 isn't going to be able to run an M1 app. If you want your app to run on both M1 and Intel Macs, take the following steps: Choose Product > Archive to build and archive this project. This will create a universal binary that runs on both M1 and Intel Macs. Open the Organizer by choosing Window > Organizer. Select your archive from the list in the Organizer. Click the Distribute App button on the right side of the Organizer. Choose Copy App as the method of distribution. Click the Next button. Choose a location to store the exported app. Click the Export button. Now you should be able to copy the app to the older Mac and run it. You might have to bypass macOS's Gatekeeper security to launch the app because of choosing Copy App instead of Developer ID as the method of distribution. If the app still doesn't run on the older Mac, make sure you set the deployment target for both the project and the app target. If that doesn't work, I have nothing else to suggest.
Topic: Programming Languages SubTopic: Swift Tags:
Apr ’22
Reply to Can't run Swift App on Mojave
What type of Xcode project did you create? Xcode defaults to using SwiftUI for Mac App and Document App projects. SwiftUI projects will not run on macOS 10.14. When you choose App or Document App on a Mac project and click the Next button, make sure you choose either Storyboard or Xib from the Interface menu. Choosing Storyboard or Xib will create an AppKit project. With an AppKit project you can set the deployment target to macOS 10.14 and have the app run on macOS 10.14.
Topic: Programming Languages SubTopic: Swift Tags:
Apr ’22
Reply to Failed to prepare device for deployment
Is this error occurring because I am using Xcode 13.1 with iOS 15.4.1 and need to upgrage to Xcode 13.3 instead? Yes. The following article provides more details and workarounds if you're unable to update to Xcode 13.3: https://www.swiftdevjournal.com/dealing-with-failed-to-prepare-device-for-development-error-message-in-xcode/
Apr ’22
Reply to Standalone OS-X App
You can create and distribute Mac apps without using the Mac App Store. Start by archiving the project by choosing Product > Archive. You can find the archive in the Organizer window by choosing Window > Organizer. Click the Distribute App button in the Organizer to distribute the app. For internal use choose Development as the distribution method. You could also choose Copy App as the distribution method and manually send the app to your group.
Topic: App & System Services SubTopic: Core OS Tags:
Mar ’22
Reply to Where do I learn how to make a game?
The book Apple Game Frameworks and Technologies will teach you how to make an iOS game with SpriteKit and GameplayKit. It does require some previous programming knowledge. https://pragprog.com/titles/tcswift/apple-game-frameworks-and-technologies/
Topic: Graphics & Games SubTopic: GameKit Tags:
Replies
Boosts
Views
Activity
Jun ’22
Reply to How can i migrate a project from playground to Xcode or Xcode to playground(or, updating it using Xcode/playground)?
You can open an App playground created in Swift Playgrounds in Xcode and work on it there. The Swift Playgrounds App project template in Xcode is designed to work in both Xcode and Swift Playgrounds. The Swift Playgrounds App project template is in the iOS section of the New Project Assistance.
Replies
Boosts
Views
Activity
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:
Replies
Boosts
Views
Activity
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:
Replies
Boosts
Views
Activity
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:
Replies
Boosts
Views
Activity
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:
Replies
Boosts
Views
Activity
May ’22
Reply to Are there any developer meetings near Columbus / Dayton Ohio?
Check Meetup for local developers groups. I found the Buckeye Cocoa Meetup group in Columbus. https://www.meetup.com/Buckeye-Cocoa I also found Cincinnati CocoaHeads. https://www.meetup.com/CincyCocoaDev/
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
May ’22
Reply to Eligibility regarding Apple Developer Program if I'm under 18
You can't sign up for the paid Apple Developer Program if you are under 18. To register for free as an Apple developer, take the following steps: Go to Apple's Developer home page. Click the Account link at the top of the page. Sign in with your Apple ID.
Replies
Boosts
Views
Activity
Apr ’22
Reply to MacOS cannot open an app project with this version of Swift Playgrounds.
The Mac version of Swift Playgrounds currently does not support Xcode's Swift Playgrounds App project. Use the iPad version of Swift Playgrounds to work on your app project in Swift Playgrounds.
Replies
Boosts
Views
Activity
Apr ’22
Reply to Can't run Swift App on Mojave
What architectures did you build for? What is the value of the Build Active Architecture setting? Judging by the problems you're having, it looks like you built for the active architecture only. If you click the Run button in Xcode's toolbar, Xcode is set to build a Debug build, which builds only for the active architecture. On an M1 Mac, building for the active architecture builds an app that won't run on Intel Macs. Any Mac running 10.14 isn't going to be able to run an M1 app. If you want your app to run on both M1 and Intel Macs, take the following steps: Choose Product > Archive to build and archive this project. This will create a universal binary that runs on both M1 and Intel Macs. Open the Organizer by choosing Window > Organizer. Select your archive from the list in the Organizer. Click the Distribute App button on the right side of the Organizer. Choose Copy App as the method of distribution. Click the Next button. Choose a location to store the exported app. Click the Export button. Now you should be able to copy the app to the older Mac and run it. You might have to bypass macOS's Gatekeeper security to launch the app because of choosing Copy App instead of Developer ID as the method of distribution. If the app still doesn't run on the older Mac, make sure you set the deployment target for both the project and the app target. If that doesn't work, I have nothing else to suggest.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Apr ’22
Reply to Can't run Swift App on Mojave
What type of Xcode project did you create? Xcode defaults to using SwiftUI for Mac App and Document App projects. SwiftUI projects will not run on macOS 10.14. When you choose App or Document App on a Mac project and click the Next button, make sure you choose either Storyboard or Xib from the Interface menu. Choosing Storyboard or Xib will create an AppKit project. With an AppKit project you can set the deployment target to macOS 10.14 and have the app run on macOS 10.14.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Apr ’22
Reply to Failed to prepare device for deployment
Is this error occurring because I am using Xcode 13.1 with iOS 15.4.1 and need to upgrage to Xcode 13.3 instead? Yes. The following article provides more details and workarounds if you're unable to update to Xcode 13.3: https://www.swiftdevjournal.com/dealing-with-failed-to-prepare-device-for-development-error-message-in-xcode/
Replies
Boosts
Views
Activity
Apr ’22
Reply to Prevent Save Panel in SwiftUI Mac app from saving as file type my app exports
I don't make any explicit call in my code to open the Save panel to save the document. It's the standard SwiftUI code where choosing File > Save opens the Save panel. I use fileExporter to export the document. I set the content type for the file exporter to the exported file type.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’22
Reply to Standalone OS-X App
You can create and distribute Mac apps without using the Mac App Store. Start by archiving the project by choosing Product > Archive. You can find the archive in the Organizer window by choosing Window > Organizer. Click the Distribute App button in the Organizer to distribute the app. For internal use choose Development as the distribution method. You could also choose Copy App as the distribution method and manually send the app to your group.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Mar ’22
Reply to "Failed to prepare device for development." with Xcode 13.2.1 and iOS 15.4 device
You need to update to Xcode 13.3 to run and debug projects on a device running iOS 15.4. The following article has a more detailed explanation: https://www.swiftdevjournal.com/dealing-with-failed-to-prepare-device-for-development-error-message-in-xcode/
Replies
Boosts
Views
Activity
Mar ’22