Post

Replies

Boosts

Views

Activity

Reply to Why does a MainActor class / function not run on Main Thread?
Change (optional) @MainActor func updateSomeUI() {     assert(Thread.isMainThread) // Assertion failed! } to     func updateSomeUI() {         assert(Thread.isMainThread) // Assertion failed!     } Then class UpdateObject {     func fetchSomeData(completion: @escaping (_ success: Bool) -> Void) {         DispatchQueue.global().async {             completion(true)         }     } } to class UpdateObject {     func fetchSomeData(completion: @escaping (_ success: Bool) -> Void) {        Task { @MainActor in             completion(true)         }     } }
Topic: UI Frameworks SubTopic: UIKit Tags:
Mar ’22
Reply to Contact who ?
Betas are meant for development devices with the accepted risk of issues. Wait until it goes into public release then book an appoint with your local Apple store or ask your questions in the community forums where retail Apple specialist will assist you seeing this is not a developer related issue.
Topic: App & System Services SubTopic: Hardware Tags:
Mar ’22
Reply to App got rejected
More functionality. Add more beef in terms of the feature set not minimal fluff just to show that you can load a JSON feed. What benefits will your application offer the end user. Will it allow the end user to submit their recipes, will it allow the end user to share recipes, will it allow them to rate other recipes or plan meals. Sit down and ask yourself as an end user of this application what will compel me to want to download this app and build your new design and work flows from those questions. Involve family & friends get their feedback.
Topic: Design SubTopic: General Tags:
Mar ’22
Reply to Question about formatting of Measurement<...> items
import Foundation let times = [1,10,100,1000,10103,2354,83674,182549].map {     Measurement<UnitDuration>(value: $0, unit: .microseconds) } // convert times from microseconds to milliseconds let milliseconds = times.map { $0.converted(to: .milliseconds)} milliseconds.forEach { print($0.value) } // output 0.001 0.009999999999999998 0.09999999999999999 1.0 10.103 2.3539999999999996 83.67399999999999 182.54899999999998 Or to mutate a measurement inplace var micro = Measurement<UnitDuration>(value: 1000000, unit: .microseconds) micro.convert(to: .milliseconds) print(micro.value) // output 1000.00
Topic: App & System Services SubTopic: General Tags:
Mar ’22