Post

Replies

Boosts

Views

Activity

Reply to Core Data : When is the point of no return with adding attributes ?
If by versioning you mean creating a new version of the Core Data model, create a new version of the data model when you reach the point in development that you want to keep the existing data in your app. In the early stages of making your app it's easier to trash the existing Core Data store (file) and starting with a fresh store. Eventually you will hit a point where starting with a fresh store causes problems, such as when other people start using your app. That's when you need to create a new version of the model and migrate from the old version to the new version.
Feb ’21
Reply to XCode Beta Archives
There is no Xcode beta available for Catalina. Just use Xcode 12.4, which you can download from the App Store or from Apple's developer downloads page. If you can't find Apple's developer downloads page, the site Xcode Releases (xcodereleases.com) has Apple's download links for every Xcode version.
Feb ’21
Reply to Xcode on macOS High Sierra
If you are stuck on High Sierra, you cannot learn SwiftUI. Either learn UIKit for iOS development or AppKit (Cocoa) for Mac development. You will not be able to submit iOS apps to the App Store with Xcode 10, but you can use Xcode 10 to learn iOS development. The following articles provide resources for learning iOS and Mac development, most of which do not use SwiftUI: swiftdevjournal.com/learning-ios-development/ swiftdevjournal.com/resources-for-learning-mac-development/ Unforunately these forums don't let us add clickable links so you will have to copy and paste the URLs in your browser.
Mar ’21
Reply to Library Pane
If you option-click the Add button in the project window toolbar, the Library window will stay open. I don't know if that's what you mean by "pin the library view on the Xcode desktop", but if option-clicking isn't enough for you, you will have to explain what you mean by pinning the library view.
Mar ’21
Reply to Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value
You can set the delegate from the storyboard instead of in the viewDidLoad function. In the storyboard, make a connection from the text field to the view controller and choose the delegate outlet. If that does not work, you should tell us the book you're following. The following article provides a detailed explanation of the error message you are getting: swiftdevjournal.com/crashing-with-swift-optionals/
Topic: Programming Languages SubTopic: Swift Tags:
Mar ’21
Reply to Save When Program Exits
To save when the app exits, go to the AppDelegate.swift file. For an iOS app there will be a function called applicationWillResignActive. In a Mac app, the function will be called applicationWillTerminate. These functions are called when quitting the app. Call the saveContext function in either applicationWillResignActive or applicationWillTerminate.
Topic: Programming Languages SubTopic: Swift Tags:
Apr ’21
Reply to Save When Program Exits
Make sure the saveContext function is called by setting a breakpoint on that line of code. Does it get called in applicationWillTerminate? I made a mistake in my first reply. For an iOS app the function where you should save the context is applicationDidEnterBackground. That's the function that will be called when someone quits the app. The applicationWillTerminate function does not get called until the app is purged from memory completely, which requires the user to launch several apps after quitting your app. Can you explain what you mean by "make the object persistent"? Saving the context is how you save data in Core Data.
Topic: Programming Languages SubTopic: Swift Tags:
Apr ’21
Reply to Custom fonts in Xcode Playgrounds
Creating a theme is how you set a font for the text in Xcode. I'm not sure if Xcode supports custom fonts, but take the following steps to create a theme and set a font: Choose Xcode Preferences. Click the Themes button at the top of the preferences window. Select one of the themes that you want to duplicate. Click the Add button below the list of themes. Choose Duplicate from the menu of theme choices. Select your duplicated theme and press the Return key to rename the theme. Select all the items for the theme, starting with Plain Text and ending with the last item, which should be Heading. Below the list of items is a selected font. Next to the font is a small button. Click that button to open the Font panel and choose the font.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’21
Reply to Devices
Do I have to program the app for each Iphone separately No you don't. how could I make it so that the labels and texts (no matter how big the Iphone is) are in one uniform place? If you are using UIKit for the app's user interface, do some research on auto layout. Apple provides an Auto Layout Guide - https://developer.apple.com/library/archive/documentation/UserExperience/Conceptual/AutolayoutPG/index.html#//apple_ref/doc/uid/TP40010853-CH7-SW1 on their developer website. If you are using SwiftUI, you declare how you want the interface to look, and SwiftUI takes care of the details.
Apr ’21
Reply to 1 duplicate symbol for architecture x86_64 Xcode
For anyone to help you, you need to provide more information. List the steps you take to create the Xcode project. What kind of Xcode project did you make? If you create a command-line tool project and run it, do you get the Duplicate Symbol error message? List anything else you do before building the project, such as any files you added to the project. A common cause of a Duplicate Symbol error message in a C project is to create a command-line tool project, add a new file, and add a main function to the new file. The project comes with its own main function so you end up with two main functions. A C program can have only one main function.
Apr ’21