Post

Replies

Boosts

Views

Activity

Reply to Xcode 14.2 Running Extremely Slow
The 8 GB of RAM and a 5400 rpm hard drive are not good specs for running Xcode. I have a similar model of iMac with 16 GB of RAM and Xcode on an external SSD, and Xcode 14.2 runs decently. It's not blazing fast, but it's not painfully slow either. If your iMac is a 27 inch model, you can add RAM to it. Doing that and moving your boot drive to an external SSD will improve things.
Dec ’23
Reply to Implementing Renaming and Reordering in SwiftUI Sidebar for macOS App
Please provide more details on "the ability to rename an item with the Return key (behavior 2) stops working". What exactly happens when you select a list item and press the Return key? What are you using with your navigation links: NavigationSplitView, NavigationStack, or NavigationView? Show your code for the functions moveItem and renameItem. I tested some code in an app of mine that lets people rearrange and rename list items, and I could not replicate the behavior you see. I was able to select an item, press the Return key, and rename the item. My code uses NavigationView because my app must support macOS 12. My code for the navigation link binds the text field to the selected item, the item property in your item view, instead of using a separate property, such as your newTitle property.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’24
Reply to Xcode build/Developer Account
When I called apple they said Id have to pay for a developer account if I wanted the software to work beyond a pre-determined testing period. Is this true? Only for iOS. You don't need a paid developer account to make Mac apps for personal use. Based on the information you supplied, the most likely cause of your build errors is the Xcode project is set to use the original developer's signing certificate. You are not the original developer so you don't have access to the certificate. I recommend setting the development team for the project to None. That will tell Xcode to not use the original developer's signing certificate when building the project. Take the following steps to do this: Open the project editor by selecting the project from the left side of the project window. Select the app target from the list of targets on the left side of the project editor. Click the Signing & Capabilities button at the top of the project editor. Choose None from the Team menu in the Signing section. That should fix the first error. Build the project again. If the second error still appears, take the following steps to add your Apple account to Xcode: Choose Xcode > Preferences to open Xcode's preferences window. Click the Accounts button at the top of the preferences window. Click the Add (+) button at the bottom of the list of accounts. Select Apple ID from the list of account types. Click the Continue button. Enter the email of your Apple ID. Click the Next button. Enter the password for your Apple ID. Click the Next button. A sheet will open with the title Apple ID Security. Click the Continue button to set up two factor authentication for signing in with this account. If that does not fix the build error, you are going to provide more information for anyone to be able to help you. Provide a link to the GitHub project you are trying to build. List the steps you took to clone and build the project.
Jan ’24
Reply to Xcode build/Developer Account
Choose Product > Archive in Xcode to archive your project. Open the Organizer by choosing Window > Organizer. Select your archived project from the list on the left side of the Organizer. Click the Distribute App button. Choose Copy App from the list of options. Click the Next button. Pick a location to save the app. Click the Export button. Optionally you can copy the exported app to your Applications folder. The following article has more details: https://www.swiftdevjournal.com/running-a-mac-app-outside-of-xcode/
Jan ’24
Reply to any example based on SpriteKit for getting started ?
There are two books that I would recommend to learn SpriteKit, one paid and one free. The paid one is Apple Game Frameworks and Technologies. https://pragprog.com/titles/tcswift/apple-game-frameworks-and-technologies/ The free one is 2D Apple Games by Tutorials. It covers SpriteKit. You may also have to deal with changes in Xcode since the book was published. You can download the book from Kodeco's deprecated book repository. https://github.com/kodecocodes/deprecated-books The site Check Sim Games has introductory SpriteKit articles. https://www.checksimgames.com/
Topic: Graphics & Games SubTopic: SpriteKit Tags:
Jan ’24
Reply to XCode swift assistant editor
What is the course you are following? Above the source code editor on the right side are a set of buttons with small icons. Clicking the button with the stack of horizontal lines lets you open the assistant editor. Choose Assistant to open the assistant editor. If that doesn't do what you need, clicking the button with the + sign in the screenshot (the right button in the group of three at the top left of the screenshot) opens another editor view. That should let you see both the storyboard and the source code file at the same time. If that doesn't work, you are going to have provide more details on what you are trying to do.
Jan ’24
Reply to XCode swift assistant editor
Im doing exactly what you said You did the first part of what I said, opening the assistant editor. That didn't work, as you get the header file for Apple's UIViewController class instead of the source code for your view controller. You didn't do the second part of what I said, opening a new editor view. Open a new editor view by clicking the rightmost button in the upper right corner of your screenshot, the button with a + sign in it. That will open a second view of the storyboard in Xcode. Above the storyboard in your screenshot is a jump bar that lets you jump to any file in your project. If you click the leftmost item in the jump bar, you will open a menu that will let you navigate through the files in your project. Go through the menus until you find your view controller file and choose that file, and you will be able to see the storyboard and source code side by side.
Jan ’24
Reply to Xcode 14.2 Running Extremely Slow
The 8 GB of RAM and a 5400 rpm hard drive are not good specs for running Xcode. I have a similar model of iMac with 16 GB of RAM and Xcode on an external SSD, and Xcode 14.2 runs decently. It's not blazing fast, but it's not painfully slow either. If your iMac is a 27 inch model, you can add RAM to it. Doing that and moving your boot drive to an external SSD will improve things.
Replies
Boosts
Views
Activity
Dec ’23
Reply to Implementing Renaming and Reordering in SwiftUI Sidebar for macOS App
Please provide more details on "the ability to rename an item with the Return key (behavior 2) stops working". What exactly happens when you select a list item and press the Return key? What are you using with your navigation links: NavigationSplitView, NavigationStack, or NavigationView? Show your code for the functions moveItem and renameItem. I tested some code in an app of mine that lets people rearrange and rename list items, and I could not replicate the behavior you see. I was able to select an item, press the Return key, and rename the item. My code uses NavigationView because my app must support macOS 12. My code for the navigation link binds the text field to the selected item, the item property in your item view, instead of using a separate property, such as your newTitle property.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’24
Reply to Xcode build/Developer Account
When I called apple they said Id have to pay for a developer account if I wanted the software to work beyond a pre-determined testing period. Is this true? Only for iOS. You don't need a paid developer account to make Mac apps for personal use. Based on the information you supplied, the most likely cause of your build errors is the Xcode project is set to use the original developer's signing certificate. You are not the original developer so you don't have access to the certificate. I recommend setting the development team for the project to None. That will tell Xcode to not use the original developer's signing certificate when building the project. Take the following steps to do this: Open the project editor by selecting the project from the left side of the project window. Select the app target from the list of targets on the left side of the project editor. Click the Signing & Capabilities button at the top of the project editor. Choose None from the Team menu in the Signing section. That should fix the first error. Build the project again. If the second error still appears, take the following steps to add your Apple account to Xcode: Choose Xcode > Preferences to open Xcode's preferences window. Click the Accounts button at the top of the preferences window. Click the Add (+) button at the bottom of the list of accounts. Select Apple ID from the list of account types. Click the Continue button. Enter the email of your Apple ID. Click the Next button. Enter the password for your Apple ID. Click the Next button. A sheet will open with the title Apple ID Security. Click the Continue button to set up two factor authentication for signing in with this account. If that does not fix the build error, you are going to provide more information for anyone to be able to help you. Provide a link to the GitHub project you are trying to build. List the steps you took to clone and build the project.
Replies
Boosts
Views
Activity
Jan ’24
Reply to How do you make lines of code only for a specific destination in Xcode?
Use the #if os statement to run code for a specific platform. #if os(iOS) // Run iOS code here #endif You can also place the code that Vision Pro does not support into its own file and tell Xcode to compile that file only for the iOS destination. More details are in the following article: https://www.swiftdevjournal.com/xcode-multiplatform-app-targets/
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jan ’24
Reply to Implementing Renaming and Reordering in SwiftUI Sidebar for macOS App
This could be a SwiftUI bug on Mac. I recommend filing a bug report. Choose Help > Report an Issue in Xcode to file a bug report.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’24
Reply to Xcode build/Developer Account
Choose Product > Archive in Xcode to archive your project. Open the Organizer by choosing Window > Organizer. Select your archived project from the list on the left side of the Organizer. Click the Distribute App button. Choose Copy App from the list of options. Click the Next button. Pick a location to save the app. Click the Export button. Optionally you can copy the exported app to your Applications folder. The following article has more details: https://www.swiftdevjournal.com/running-a-mac-app-outside-of-xcode/
Replies
Boosts
Views
Activity
Jan ’24
Reply to any example based on SpriteKit for getting started ?
There are two books that I would recommend to learn SpriteKit, one paid and one free. The paid one is Apple Game Frameworks and Technologies. https://pragprog.com/titles/tcswift/apple-game-frameworks-and-technologies/ The free one is 2D Apple Games by Tutorials. It covers SpriteKit. You may also have to deal with changes in Xcode since the book was published. You can download the book from Kodeco's deprecated book repository. https://github.com/kodecocodes/deprecated-books The site Check Sim Games has introductory SpriteKit articles. https://www.checksimgames.com/
Topic: Graphics & Games SubTopic: SpriteKit Tags:
Replies
Boosts
Views
Activity
Jan ’24
Reply to Removing source control repository from specific Xcode project
There is a hidden folder named .gitin your project folder that contains the git repository. Move that folder to the trash to remove the repository for the project. Press Cmd-Shift-Dot in the Finder to show hidden files and folders so you can remove the .git folder inside the project folder.
Replies
Boosts
Views
Activity
Jan ’24
Reply to What version of Xcode can I make a game for older iOS versions (ex: iOS 5) but still playable on iOS 17?
iOS 13 is the earliest iOS version that can run a SwiftUI app. Xcode 14 is currently the earliest Xcode version you can use to submit apps to the App Store. iOS 11 is the earliest version you can target with Xcode 14.
Replies
Boosts
Views
Activity
Jan ’24
Reply to Are changes to published embedded objects really not detected in SwiftUI?
The view that owns the ObservableObject must use the @StateObject property. struct StartupView: View { @StateObject var userMgr: UserManager ... } Use @ObservedObject in any other views that need access to the user manager.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’24
Reply to XCode swift assistant editor
What is the course you are following? Above the source code editor on the right side are a set of buttons with small icons. Clicking the button with the stack of horizontal lines lets you open the assistant editor. Choose Assistant to open the assistant editor. If that doesn't do what you need, clicking the button with the + sign in the screenshot (the right button in the group of three at the top left of the screenshot) opens another editor view. That should let you see both the storyboard and the source code file at the same time. If that doesn't work, you are going to have provide more details on what you are trying to do.
Replies
Boosts
Views
Activity
Jan ’24
Reply to Xcode 5.0.1 can't run on macOS Catalina
What versions did you try to install? According to the site Xcode Releases, Xcode 12.1 is the latest version that runs on Catalina. https://xcodereleases.com Xcode 11 and 12 are the only Xcode versions that officially support Catalina.
Replies
Boosts
Views
Activity
Jan ’24
Reply to XCode swift assistant editor
Im doing exactly what you said You did the first part of what I said, opening the assistant editor. That didn't work, as you get the header file for Apple's UIViewController class instead of the source code for your view controller. You didn't do the second part of what I said, opening a new editor view. Open a new editor view by clicking the rightmost button in the upper right corner of your screenshot, the button with a + sign in it. That will open a second view of the storyboard in Xcode. Above the storyboard in your screenshot is a jump bar that lets you jump to any file in your project. If you click the leftmost item in the jump bar, you will open a menu that will let you navigate through the files in your project. Go through the menus until you find your view controller file and choose that file, and you will be able to see the storyboard and source code side by side.
Replies
Boosts
Views
Activity
Jan ’24
Reply to Problem with iOS in Xcode
Once a few weeks Xcode want me to install iOS platform again, is it normal? No, it is not normal. I have not encountered this problem so I don't have a solution for you.
Replies
Boosts
Views
Activity
Jan ’24
Reply to Using UIKit & Storyboards
App playgrounds require you to use SwiftUI. You have to create an Xcode app project to use UIKit and storyboards.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Jan ’24