Post

Replies

Boosts

Views

Activity

Reply to Can I use async/await under iOS15.0?
There's some discussion about the same issue on forums.swift.org . Will Swift Concurrency deploy back to older OSs? It seems to be true that the runtime needed for await/async is provided as part of the new OSs. It is a very sad fact that most of us developers need years to adopt this bright and successful new feature. My company follows three-generation policy to support older OSs, which means we can use async/await when iOS 17 will be out. I cannot be sure if I could remember that we could use this feature three years from now. Apple should consider backward compatibility more severely to make this sort of great feature more popular in apps.
Topic: Programming Languages SubTopic: Swift Tags:
Jun ’21
Reply to Can we use the SwiftUI for every IOS app version?
is it possible to use the app for sub version of IOS like iPhone 6s devices ? I may be mistaking what you mean by sub version of IOS, but you should better check the documentations of SwiftUI components. For example, View -- a very basic component in SwiftUI -- has an Availability notation as iOS 13.0+. Generally, SwiftUI was introduced in iOS 13 and SwiftUI apps run only on devices with iOS 13 or later. If the app may be using some feature available only in later iOS, it will run on devices with such iOS versions.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’21
Reply to Thread 1: signal SIGABRT
Generally, you would see some more info in the debug console when you get Thread 1: signal SIGABRT. Better check it again. But when you get it on the line let destinationVC = segue.destination as! ViewController, the most suspicious thing is segue.destination being non-ViewController. Have you checked which segue is invoked and what is set in the Custom Class of the target view controller?
Jun ’21
Reply to Foundation's new Attributed String in UIKit
NSAttributedString is given a new initializer taking an AttributedString. convenience init(_ attrStr: AttributedString) You can easily convert an AttributedString to an NSAttributedString: var astr = AttributedString("Hello, world!") if let range = astr.range(of: "world") { astr[range].font = .boldSystemFont(ofSize: 22) } label.attributedText = NSAttributedString(astr)
Topic: App & System Services SubTopic: General Tags:
Jun ’21
Reply to Error in try await URLSession.shared.data
You should better use Code Block properly which improves readability and increases the chance to get better responses sooner. But generally, Swift for Ubuntu cannot be the main topic of the dev forums. This site is mainly intended to discuss and share info about Apple's frameworks on Apple's platforms. And the final Swift 5.5 is not released yet. Foundation types such as URLSession would be ported into Ubuntu, but it may not be the same time as the Swift 5.5 for Apple's platforms is released. You should better visit swift.org and get info about the status of Swift 5.5 for Ubuntu there.
Topic: Programming Languages SubTopic: Swift Tags:
Jun ’21