Search results for

A Summary of the WWDC25 Group Lab

10,368 results found

Post

Replies

Boosts

Views

Activity

Reply to Should ModelActor be used to populate a view?
I decided to run this task on app launch to sync the clinical labs into the SwiftData store. This allows me to use Query macro in the views where it's needed and no need to combine lab results. Let me know if this is the right approach: import SwiftData import SwiftUI import OSLog @ModelActor actor HealthKitSyncManager { private let logger = Logger(subsystem: com.trtmanager, category: HealthKitSyncManager) func sync() async { do { // Get all Clinical labs let hkClinicalRecords = try await TRTHealthKitService.getHKClinicalRecords() guard !hkClinicalRecords.isEmpty else { return } // Get existing HealthKit IDs in one query let descriptor = FetchDescriptor( // predicate: #Predicate { $0.source == .clinicalRecord } ) let existing = try modelContext.fetch(descriptor) .compactMap { $0.fhirResourceId } let existingIDs = Set(existing) let missingRecords = hkClinicalRecords.filter { lab in guard let fhirResource = lab.fhirResource else { return false } return !existingIDs.contains(f
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Aug ’25
Reply to Should ModelActor be used to populate a view?
It's unclear what LabResultDto in the code snippet is. If it is a Sendable type that wraps the data in a SwiftData model, that's fine; if it is a SwiftData model type, because a SwiftData model object is not Sendable, you won't want to pass it across actors – Otherwise, Swift 6 compiler will give you an error. For more information about this topic, see the discussion here. When using SwiftData + SwiftUI, I typically use @Query to create a result set for a view. Under the hood (of @Query), the query controller should be able to detect the changes you made from within a model actor, and trigger a SwiftUI update. Fore more information about observing SwiftData changes, see this WWDC25 video. Best, —— Ziqiao Chen  Worldwide Developer Relations.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Aug ’25
AppShortcuts.xcstrings does not translate each invocation phrase option separately, just the first
Due to our min iOS version, this is my first time using .xcstrings instead of .strings for AppShortcuts. When using the migrate .strings to .xcstrings Xcode context menu option, an .xcstrings catalog is produced that, as expected, has each invocation phrase as a separate string key. However, after compilation, the catalog changes to group all invocation phrases under the first phrase listed for each intent (see attached screenshot). It is possible to hover in blank space on the right and add more translations, but there is no 1:1 key matching requirement to the phrases on the left nor a requirement that there are the same number of keys in one language vs. another. (The lines just happen to align due to my window size.) What does that mean, practically? Do all sub-phrases in each language in AppShortcuts.xcstrings get processed during compilation, even if there isn't an equivalent phrase key declared in the AppShortcut (e.g., the ja translation has more phrases than the English)? (That makes some log
0
0
296
Aug ’25
Bugs custom 18.6
Hello, when I'm looking to customize the icons of my phone, the applications that are in the grouping genres without replacing with all-black images, I don't know what happens by changing the color of the applications in group of change no color throws just listen not the black stuff
1
0
150
Aug ’25
SwiftData Fatal error: Editors must register their identifiers before invoking operations on this store
I have a UIKit app where I've adopted SwiftData and I'm struggling with a crash coming in from some of my users. I'm not able to reproduce it myself and as it only happens to a small fraction of my user base, it seems like a race condition of some sort. This is the assertion message: SwiftData/DefaultStore.swift:453: Fatal error: API Contract Violation: Editors must register their identifiers before invoking operations on this store SwiftData.DefaultStore: 00CF060A-291A-4E79-BEC3-E6A6B20F345E did not. (ID is unique per crash) This is the ModelActor that crashes: @available(iOS 17, *) @ModelActor actor ConsumptionDatabaseStorage: ConsumptionSessionStorage { struct Error: LocalizedError { var errorDescription: String? } private let sortDescriptor = [SortDescriptor(SDConsumptionSession.startTimeUtc, order: .reverse)] static func createStorage(userId: String) throws -> ConsumptionDatabaseStorage { guard let appGroupContainer = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: UserDefaults
5
0
251
Aug ’25
Summary of iOS/iPadOS 26 UIKit bugs related to UISearchController & UISearchBar using scope buttons
All of these issues appear when the search controller is set on the view controller's navigationItem and the search controller's searchBar has its scopeButtonTitles set. So far the following issues are affecting my app on iOS/iPadOS 26 as of beta 7: When the scopeBarActivation of UISearchController is set to .onSearchActivation, the preferredSearchBarPlacement of the navigationItem is set to .integratedButton, and the searchBarPlacementAllowsToolbarIntegration is set to false (forcing the search icon to appear in the nav bar), on both iPhones and iPads, the scope buttons never appear. They don't appear when the search is activated. They don't appear when any text is entered into the search bar. FB19771313 I attempted to work around that issue by setting the scopeBarActivation to .manual. I then show the scope bar in the didPresentSearchController delegate method and hide the scope bar in the willDismissSearchController. On an iPhone this works though the display is a bit clunky. On an iPad, the scope bar does
10
0
944
Aug ’25
Should ModelActor be used to populate a view?
I'm working with SwiftData and SwiftUI and it's not clear to me if it is good practice to have a @ModelActor directly populate a SwiftUI view. For example when having to combine manual lab results and clinial results from HealthKit. The Clinical lab results are an async operation: @ModelActor actor LabResultsManager { func fetchLabResultsWithHealthKit() async throws -> [LabResultDto] { let manualEntries = try modelContext.fetch(FetchDescriptor()) let clinicalLabs = (try? await HealthKitService.getLabResults()) ?? [] return (manualEntries + clinicalLabs).sorted { $0.date > $1.date }.map { return LabResultDto(from: $0) } } } struct ContentView: View { @State private var labResults: [LabResultDto] = [] var body: some View { List(labResults, id: .id) { result in VStack(alignment: .leading) { Text(result.testName) Text(result.date, style: .date) } } .task { do { let labManager = LabResultsManager() labResults = try await labManager.fetchLabResultsWithHealthKit() } catch { // Handle error }
4
0
203
Aug ’25
Reply to CallKit does not activate audio session with higher probability after upgrading to iOS 18.4.1
Hi @DTS Engineer We attempted to capture a fresh sysdiagnose, but we were unable to reproduce the issue in our lab. We will continue our efforts to replicate the problem. [quote='852684022, DTS Engineer, /thread/783870?answerId=852684022#852684022'] PushKit and CallKit should both be configured in applicationDidFinishLaunching. The goal here is that you want CallKit to be fully configured before your PushKit delegate is called to deliver a VoIP push. I would add an additional call to set the configuration before you call reportNewIncomingCall on the first push you receive, as this should ensure that callservicesd has a valid session ID. Note the configuration doesn't need to change, so setting the configuration to the existing value will work fine. [/quote] I believe our app shall have done this correctly, as both incoming and outgoing calls functioned properly before the problem occurred. Our application did not restart or reinitialize during this time. The issue does not happen on the first call(pu
Topic: App & System Services SubTopic: General Tags:
Aug ’25
Reply to Report Navigator Arrow Icon Missing in XCResult Files Since Xcode 16.4
Hello! The test report has received an overhaul as of Xcode 15. When you open your result bundle in your workspace, you'll be able to find the jump buttons to navigate to the source code in the test case details screen. To get to the test case details screen, you can double click on the corresponding failed test on the Summary screen, or by double clicking into the test in the Tests Outline screen. On either the activities tab or the runs tab, the jump button will appear when you hover over the callstack row. You can also navigate to the source by clicking on the View Source button in the header of the test case details screen. See the WWDC23 video Fix Failures Faster for a tour of the test report - https://developer.apple.com/videos/play/wwdc2023/10175/
Aug ’25
UIScene.ConnectionOptions.shouldHandleActiveWorkoutRecovery Missing?
According to the WWDC25 Presentation Track workouts with HealthKit on iOS and iPadOS, there is supposed to be a new property for restoring an active workout after a crash on iOS/iPadOS. The developer documentation also supports this. However, this property does not seem to exist in the latest Xcode 26 beta, even in projects targeting iOS 26.0 as the minimum version. Am I missing something? Has this property not been made available yet? It is actually looking like all of the new iOS 26.0 properties are missing UIScene.ConnectionOptions on my system.
3
0
208
Aug ’25
Reply to Problem adding Call Directory capability
On our paid Apple Developer Program account (role: Account Holder/Admin), the Call Directory capability toggle does not appear on any iOS App Extension Identifier we create. Because of that, provisioning profiles for those extension IDs never include the Call Directory entitlement and the extension cannot be enabled on device. That is the only reason we tried to add manually which does not work. Environment Membership: Apple Developer Program (paid, active) Xcode: [16.x] iOS devices tested: iOS 18.4.1, 18.5 and 18.6.1 App type: iOS app + Call Directory extension App Groups: enabled and working What I am not seeing In Certificates, Identifiers & Profiles → Identifiers → (iOS App ID, type App Extension), I expect to see a Call Directory capability toggle I can enable but it is not there What actually happens The Call Directory toggle is missing from the extension Identifier details page. Profiles created for the extension ID don’t contain the Call Directory entitlement. The extension never appears
Topic: Code Signing SubTopic: Entitlements Tags:
Aug ’25
Reply to (Electron) You can only transfer sandboxed apps that are not sharing a group container.
There is no option for fixing this. Per the documentation [1], if you have an macOS app that’s ever shipped with an app group, you can’t transfer it. That’s an annoying limitation, and it’d be reasonable for you to file a bug requesting that the limitation be lifted, or perhaps limited in some way. But, right now, you simply can’t transfer such an app. If you do file a bug about this, please post your bug number, just for the record. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com [1] App Store Connect Help > Transfer an app > App transfer criteria
Aug ’25