Post

Replies

Boosts

Views

Activity

Reply to Resources for getting started
You may find many resources to learn app development in Swift with Xcode, but Apple's books may be a good starting point. Swift Development Resources Check Intro to App Development with Swift or App Development with Swift. Unfortunately, the books may not be up-to-date, and you may find some difficulties to work with it using the latest Xcode. But the core part of them are very fine and can be a good help learning app development. And this site, the dev forums, would be a great help when you cannot solve some issues by yourself.
Topic: Programming Languages SubTopic: Swift Tags:
Jun ’21
Reply to Changing a fetch request
Thanks for showing your code. It would be better if it were properly formatted. (As the editing feature is limited in this site, you may need to add an answer to show additional info to your question.) Anyway, I will look into it when I'm ready.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’21
Reply to Advice needed on passing Count of records in rendered Mapview in Second View Controller to be displayed in First View Controller
What is the best way for the First View Controller to retrieve the count from the rendered map in the Second View Controller so that the count is displayed on the Dashboard to the User upon launching the App? It is hard to say what would the best for your app, as it depends on the details of your view controllers. So, this is just one example, but you can use sort of shared data container. Something like this: class DataContainer { static let shared = DataContainer() var countOfRecords: Int = 0 //... } class FirstViewController: UIViewController { let dataContainer = DataContainer.shared func someMethod() { let count = dataContainer.countOfRecords //... } } class SecondViewController: UIViewController { let dataContainer = DataContainer.shared func someAction() { //... dataContainer.countOfRecords = ... } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’21
Reply to 2021-6 Missing Info.plist value - A value for the Info.plist key 'CFBundleIconName' is missing in the bundle, even then I include CFBundleIconName.
Have you added app icons in an asset catalog as suggested in the Apple's message? Apps built with iOS 11 or later SDK must supply app icons in an asset catalog and must also provide a value for this Info.plist key. For more information see http://help.apple.com/xcode/mac/current/#/dev10510b1f7.
Jun ’21
Reply to Swift migration failed Segmentation fault: 11
Unfortunately, there's no quick fix for Segmentation fault: 11. In some limited cases, Clean Build Folder or removing derived data might work, but not for all cases. The first thing you should do is finding out which Swift file is (or which Swift files are) causing the issue. How many Swift files do you have in your project?
Topic: Programming Languages SubTopic: Swift Tags:
Jun ’21
Reply to Xcode Cannot Run the Default "Hello World" C++ Program
Any idea why this is happening? I have tried what you described using Xcode 12.5 on macOS 11.4. It ran without any problems and I could see in the debug console: Hello, World! Program ended with exit code: 0 Thus, there may be some issues with your environment, or macOS 11.2 may have some problems to work with the version of Xcode you are using. Do you think of anything special with your environment?
Jun ’21
Reply to iOS app development
Is Python usable to make iOS apps on Mac in 2021 or only Swift? Swift and Objective-C are the only supported languages for developing iOS apps. (C/C++ could be another option for some specific components of Apple's platforms.) And Xcode (more specifically, version 12+) is the only supported IDE to make apps for App Store. You can find some third party frameworks or tools which enable you to develop iOS apps in JavaScript, Dart, C#, Ruby or Python. (It is very hard to find articles about developing iOS apps in Python, which seems to be a very minor choice.) If you want to use any of such frameworks, you need to know the risks of using them. For example, there were several posts recently, reporting they could not build their apps made by one of the third party frameworks. Also the Apple's dev forums are meant for code-level questions, using Apple's framework or tools for Apple's platforms. You should not go deep into the third party libraries or frameworks here in the dev forums. My recommendation, get the latest Mac which is capable of running the latest Xcode. And learn developing apps in Swift.
Topic: Programming Languages SubTopic: Swift Tags:
Jun ’21
Reply to How to access viewController components in model (MVC)
Okay, and do you have any idea how I can do that? Or a resource, a link to help me?  You can make your Model to trigger some events, and your view controller will be able to show UIAlertController or update text view based on the evens. To achieve this, you can use NotificationCenter, property observer, delegate pattern or there may be many other ways. Combine would be your another option if you prefer some modern ways. But, as you say Compute class is empty, I cannot say what would be best for you and cannot show any examples.
Topic: UI Frameworks SubTopic: UIKit Tags:
Jun ’21