Post

Replies

Boosts

Views

Activity

Reply to iPhone 15 series' 24MP photoshoot
Hi @DTS Engineer I noticed there is few words mentioned 24MP capture things in the AVCapturePhotoOutput definition header file. I linked the image below. Check it out. But I tried a lot of things, still can’t got this work. Is this something new this year?
Topic: Media Technologies SubTopic: Audio Tags:
Jul ’24
Reply to Macbook Pro crashing after updating to latest Xcode and mac OS. how do i resolve this ?
Same issue. The only solution is not to use iOS simulators, instead using macOS target to run it as a macOS app. (A solution for SwiftUI app) Only in this way, it will not crash. This issue happens after WWDC 22 and many of you are using previous version of macOS, macOS Monterey, so I guess it's not a bug of the macOS but a bug of Xcode 13.
Dec ’22
Reply to Add multiple events to the Calendar with Concurrency
After a long time researching every aspect of the code. I found that the problem is try eventStore.save(courseEvent, span: .futureEvents). Alternatively, I use try eventStore.save(..., span: ..., commit: false) and eventStore.commit() to solve the problem. I think this is caused by the data races because I'm using swift concurrency. While one event is saving, another one calls save method to save again, leading to data conflicts (just my guess.) To solve this, luckily, we can commit a batch of events later using eventStore.commit() to avoid data conflicts. The result is what I expected !!🥳 And after that optimization, the performance of this function is up to 25% faster (exactly 136ms faster). (haha. Perfect.) Final Code (in Swift 5.7): func export_test() { Task.detached { await withTaskGroup(of: Void.self) { group in for i in 0...15 { group.addTask { print("Task \(i): Start") let courseEvent = EKEvent(eventStore: eventStore) courseEvent.title = "TEST" courseEvent.location = "TEST LOC" courseEvent.startDate = .now courseEvent.endDate = .now.addingTimeInterval(3600) courseEvent.calendar = eventStore.defaultCalendarForNewEvents courseEvent.addRecurrenceRule(EKRecurrenceRule(recurrenceWith: .daily, interval: 1, end: nil)) try eventStore.save(courseEvent, span: .futureEvents, commit: false) } } } eventStore.commit() } }
Topic: Programming Languages SubTopic: Swift Tags:
Dec ’22
Reply to .backgroundTask in SwiftUI cannot compile
This can compile: WindowGroup {     ContentView() // <-- If we only have one line of code, it works. } .backgroundTask(.appRefresh("task")) {  } But this can't😒😒😒 WindowGroup {     ContentView() .environment(\.managedObjectContext, persistenceController.container.viewContext) // <-- We have modifier(s) here, it fails. } .backgroundTask(.appRefresh("task")) {  } Please fix this issue!!!! HELP!!! @eskimo Is yours the same?? @javiermares
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Aug ’22
Reply to .backgroundTask in SwiftUI cannot compile
Beta 4 is out. I have tried that again, but unfortunately it fails again. I checked the docs, .backgroundTask support macOS 13.0+ Beta. And I also have a question about how to back support iOS 15.0 while using this modifier, because I cannot use if-condition to switch between different WindowsGroups inside the Scene(I got a compile error)
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jul ’22
Reply to Toolbar Roles behavior
I have find some changes when pushing a navigationLink. In I understanding, browsing role let you know the page you came from, so you will get a great experience across different pages just like a browser. The Editor rule let you focus on a single view so that it will not show you where you came from when you're in a new view. It would just show a "back"(<) symbol.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’22
Reply to iPhone 15 series' 24MP photoshoot
Hi @DTS Engineer I noticed there is few words mentioned 24MP capture things in the AVCapturePhotoOutput definition header file. I linked the image below. Check it out. But I tried a lot of things, still can’t got this work. Is this something new this year?
Topic: Media Technologies SubTopic: Audio Tags:
Replies
Boosts
Views
Activity
Jul ’24
Reply to numericText transition for normal SwiftUI View
Finally fixed in Xcode beta 6. Good work.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’23
Reply to Macbook Pro crashing after updating to latest Xcode and mac OS. how do i resolve this ?
Same issue. The only solution is not to use iOS simulators, instead using macOS target to run it as a macOS app. (A solution for SwiftUI app) Only in this way, it will not crash. This issue happens after WWDC 22 and many of you are using previous version of macOS, macOS Monterey, so I guess it's not a bug of the macOS but a bug of Xcode 13.
Replies
Boosts
Views
Activity
Dec ’22
Reply to Add multiple events to the Calendar with Concurrency
After a long time researching every aspect of the code. I found that the problem is try eventStore.save(courseEvent, span: .futureEvents). Alternatively, I use try eventStore.save(..., span: ..., commit: false) and eventStore.commit() to solve the problem. I think this is caused by the data races because I'm using swift concurrency. While one event is saving, another one calls save method to save again, leading to data conflicts (just my guess.) To solve this, luckily, we can commit a batch of events later using eventStore.commit() to avoid data conflicts. The result is what I expected !!🥳 And after that optimization, the performance of this function is up to 25% faster (exactly 136ms faster). (haha. Perfect.) Final Code (in Swift 5.7): func export_test() { Task.detached { await withTaskGroup(of: Void.self) { group in for i in 0...15 { group.addTask { print("Task \(i): Start") let courseEvent = EKEvent(eventStore: eventStore) courseEvent.title = "TEST" courseEvent.location = "TEST LOC" courseEvent.startDate = .now courseEvent.endDate = .now.addingTimeInterval(3600) courseEvent.calendar = eventStore.defaultCalendarForNewEvents courseEvent.addRecurrenceRule(EKRecurrenceRule(recurrenceWith: .daily, interval: 1, end: nil)) try eventStore.save(courseEvent, span: .futureEvents, commit: false) } } } eventStore.commit() } }
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Dec ’22
Reply to Voice to text
This button means stop listening to your voice.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’22
Reply to SwiftUI Support
Thanks
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’22
Reply to PKCanvasView size error
I'm sorry for consuming network resources. I have FIXED this issue!
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’22
Reply to .backgroundTask in SwiftUI cannot compile
This can compile: WindowGroup {     ContentView() // <-- If we only have one line of code, it works. } .backgroundTask(.appRefresh("task")) {  } But this can't😒😒😒 WindowGroup {     ContentView() .environment(\.managedObjectContext, persistenceController.container.viewContext) // <-- We have modifier(s) here, it fails. } .backgroundTask(.appRefresh("task")) {  } Please fix this issue!!!! HELP!!! @eskimo Is yours the same?? @javiermares
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’22
Reply to .backgroundTask in SwiftUI cannot compile
Beta 4 is out. I have tried that again, but unfortunately it fails again. I checked the docs, .backgroundTask support macOS 13.0+ Beta. And I also have a question about how to back support iOS 15.0 while using this modifier, because I cannot use if-condition to switch between different WindowsGroups inside the Scene(I got a compile error)
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jul ’22
Reply to The primary action of Menu cannot triggered
Resolved in Beta 4!!
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jul ’22
Reply to .backgroundTask in SwiftUI cannot compile
Feedback ID: FB10634593
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jul ’22
Reply to Toolbar Roles behavior
I have find some changes when pushing a navigationLink. In I understanding, browsing role let you know the page you came from, so you will get a great experience across different pages just like a browser. The Editor rule let you focus on a single view so that it will not show you where you came from when you're in a new view. It would just show a "back"(<) symbol.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’22
Reply to Xcode 13 beta Error with Pencil kit
Go to -> Target -> Build Settings and search for iOS Deployment Target, and switch it to iOS 15. Now, it works!
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Aug ’21