Search results for

A Summary of the WWDC25 Group Lab

10,092 results found

Post

Replies

Boosts

Views

Activity

Should SwiftUI view models in Swift 6 be both @Observable and @MainActor?
Hi, In the WWDC25 session Elevate an app with Swift concurrency (timestamps: 8:04 and later), the StickerViewModel is shown annotated with @Observable but not @MainActor. The narration mentions that updates happen on the main thread, but that guarantee is left implicit in the calling code. In Swift 6, though, one of the major benefits is stronger compiler enforcement against data races and isolation rules. If a view model were also annotated with @MainActor, then the compiler could enforce that observable state is only updated on the main actor, preventing accidental background mutations or updates that can cause data races between nonisolated and main actor-isolated uses. Since @Observable already signals that state changes are intended to be observed (and in practice, usually by views), it seems natural that such types should also be main-actor isolated. Otherwise, we’re left with an implicit expectation that updates will always come from the main thread, but without the compiler’s help in enforcin
6
0
235
Aug ’25
Reply to Icon Composer and Xcode building time
Ah, that's frustrating. It would be helpful if you could file a feedback with a CPU sample of AssetCatalogSimulatorAgent You can get a CPU sample either from activity monitor, or by running this in the terminal just before building. sample AssetCatalogSimulatorAgent 120 -wait Does the performance of the build change if you remove all of the groups and layers from the icon?
Aug ’25
Reply to App extension write data The main target reads data.
As @mungbeans mentioned, not all extensions can write to an App Group container. A keyboard extension with no full access is an example of that kind. The other possibility is you intentionally create your model container with readonly mode by using init(_:schema:isStoredInMemoryOnly:allowsSave:groupContainer:cloudKitDatabase:) with allowsSave being set to false. It doesn't look like the case though, based on your description. Best, —— Ziqiao Chen  Worldwide Developer Relations.
Topic: App & System Services SubTopic: StoreKit Tags:
Aug ’25
Issue with UserDefaults Data Loss after App Transfer and TestFlight Installation
Hello, I recently encountered an issue following the transfer of my app between Apple Developer accounts and would appreciate any insights or solutions. Here's a summary of the situation: App Transfer: I transferred an app from one Apple Developer account to another. The app's bundle ID remained unchanged during this process. App Update: After the transfer, I integrated a new feature into the app and pushed the updated version to TestFlight under the new account. Installation Issue: When I installed the TestFlight version of the app from the new account on my device, which already had the app installed from the old account, the app logged out the user. It appears that the UserDefaults data was not retained, resulting in the loss of stored user data. My hypothesis is that the transfer between accounts caused the user defaults to reset, leading to the data loss. Has anyone else experienced this issue, and if so, are there any recommended solutions or best practices to prevent UserDefaults from resettin
13
0
1.3k
Jul ’24
Have not received weekly analytics email for over a month
The last App Store Connect: App Analytics Weekly Summary email I received was June 3. My apps are still up and the emails are not going to spam. In my Apple Developer settings, App Analytics Weekly Email Summary is still set to on (i.e. Receive a weekly email.). Coincidentally, on June 9 I received an email about updated agreements and guidelines, which I hadn't logged in to accept until today. Is this related, and if so, why should it be? If something else is causing the missing emails, how can that be resolved?
3
0
221
Aug ’25
Reply to SwiftData Inheritance Query Specialized Model
Nice to know that the original issue goes away in the latest Beta. Regarding the crash triggered by the access to Item.children, if you can provide a runnable code snippet to demo the issue, I'll take another look. You have mentioned a few classes with inheritance, and so I think it is probably worth mentioning that over-using inheritance may impact your app's performance negatively. Concretely, with today's default store (DefaultStore), all the types in an inheritance hierarchy are persisted with one single table in SQLite. If your inheritance hierarchy has many classes, the table (columns and data) can be quite big, which can slow down the performance of fetching and inserting data. That being said, when adopting SwiftData inheritance, you might examine if that is a right use case. This WWDC25 session(starting from around 4:25) covers this topic a bit. You can take a look, if haven't yet. Best, —— Ziqiao Chen  Worldwide Developer Relations.
Aug ’25
Reply to How is BGContinuedProcessingTask intended to be used?
This is a problem because if I have a group of tasks to complete on one BGContinuedProcessingTask, the interface won't update gradually as the tasks are completed, but only in steps as each task completes and until the first one does it shows a spinning circle. Is this intended? Or could it be a bug? I think this is a case of neither and both. That is, I don't think what you’re seeing is a design choice, and not due to any accident or mistake. However, I also think it's very possible that this is something that could be tweaked and improved on. Two broad points I'd make here: First off, any time you feel like something isn't working the way you want/expect, it's always worth filing a bug on, particularly when you're dealing with a new API. I won't promise that anything will change— like any large-scale engineering organization, properly prioritizing work is a very complicated task and that sometimes means that things don't change or get fixed when they should. However, any change that happens ALWAYS
Aug ’25
Reply to How is BGContinuedProcessingTask intended to be used?
Hello, I'm posting in this thread rather than starting a new one so all the information is consolidated... I also have some doubts about BGContinuedProcessingTask... My main problem is with the Progress object. I've observed that if I add children Progress objects to the object provided by the task, the popup that shows up with the task on the device doesn't update the progress interface until the Progress object has completed at least one unit. It doesn't seem to be using the fractionCompleted property and instead it seems to use the number of completed units. This is a problem because if I have a group of tasks to complete on one BGContinuedProcessingTask, the interface won't update gradually as the tasks are completed, but only in steps as each task completes and until the first one does it shows a spinning circle. Is this intended? or could it be a bug? Also, as the original poster said, the actual BGContinuedProcessingTask object is not sendable, so when I start an async Task there's no way to p
Aug ’25
(Electron) You can only transfer sandboxed apps that are not sharing a group container.
Hi everyone and Apple Team, please help me to solve the problem with transferring a macOS app built by Electron. I didn't change any options related to sandbox or app groups at all; I'm just using default settings. My app doesn't have any data with other apps. It seems like a huge challenge, and I still haven't solved it after three months. Thanks for your advice.
11
0
114
Aug ’25
Reply to Integrating Apple Fitness+ Workouts – How to Retrieve Metadata?
I shared a similar concern on Reddit and got a reply suggesting there may be an unpublished API. Note that I went one better than filing. Feedback. My Apple Fitness+ data, is part of my Health Data. As such this is not a new feature request but a data access issue. I callled Apple Support they agreed , telling me I was not the first complaining about this. I was issued a case number. You can find my Reddit thread using my case number. Here’s my post: I’ve been using Fitness+ for years and only just realized my HealthKit data is incomplete. Calories/duration sync fine, but instructor, episode number, and workout subtype (Upper/Lower/Total) are missing. That info is clearly stored (it shows up in the Fitness+ Summary tab) but Apple withholds it from HealthKit and data exports. I called Apple Support and they confirmed I’m not the first person to ask. They gave me a case number: 102672392454. 👉 If this bugs you too, please file feedback here: apple.com/feedback or call support. The more users who push,
Aug ’25
Reply to How do you observe the count of records in a Swift Data relationship?
There are some subtle things that determine if a change on a SwiftData model is observable, as discussed in this WWDC25 session (starting from around 14:00.) Your code snippet doesn't show where the folder in FolderView is from and how you add a new item. If you can share a runnable code snippet that demonstrates the issue, I'd be able to figure out why folder doesn't trigger an update. Best, —— Ziqiao Chen  Worldwide Developer Relations.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Aug ’25
Reply to XCode reverts CoreData's .xccurrentversion
I did some of investigation of this issue because I ran into the same problem when trying to convert an old project from groups to folders. I discovered what is happening is that Xcode 16 changes the model's current version to the last one alphabetically. I was able to reproduce it this way: Create a brand new, folder-based, Xcode project. Add an xcdatamodeld with one entity. Add a new model version and name it a. Make it current. Quit Xcode. Relaunch Xcode. Expected result: The a model version should still be current. Actual result: The original model version is current. I was able to reproduce with Xcode 16.2 and 16.4. It appears to be fixed in Xcode 26 beta 6. Based on these steps, one workaround appears to be to name the model versions alphabetically. Another workaround is to keep the xcdatamodeld file in a group, not a folder. And of course if you can switch to Xcode 26, then you don't need to workarounds above.
Aug ’25
ZoneSharing CloudKit UI
I am trying to use Zone Sharing in my SwiftUI app. I have been attempting to get the UICloudSharingController to show an initial share screen to pick users and the mechanism to send the invitation. From the documentation, it appears that the UICloudSharingController .init(preparationHandler:) API is deprecated so I am not using that approach. Following the Apple documentation, I am creating a Zone Share and NOT saving it and presenting using the UICloudSharingController(share:container:) API. However, this presents a UI that is the 'mgmt' API for a Share. I can get to the UI I was expecting by tapping on the 'Share with More People' option, but I want to start on that screen for the user when they have not shared this before. So, I found an example app from Apple at: https://github.com/apple/sample-cloudkit-zonesharing. It has the same behavior. So we can simply discuss this problem based on that example code. How do I get the next View presented when tapping 'Share Group' to be the invitation for ne
3
0
99
Aug ’25
App rejected due to 3.1.1 - Business - Payments - In-App Purchase
Guideline 3.1.1 - Business - Payments - In-App Purchase, as my app currently allows users to purchase digital content (courses) using an external payment system. I am working to comply with Apple’s requirements by integrating In-App Purchase for all digital content within the app. My app contains approximately 100,000 individual courses, and I am seeking guidance on how to effectively implement In-App Purchase for such a large number of items. Creating 100,000 separate In-App Purchase products in App Store Connect seems impractical due to the scale and potential limitations. I would like to explore feasible solutions, such as: Using a subscription model to provide access to all courses. Creating category-based bundles (e.g., Programming, Design) to group courses. Implementing a dynamic purchase system where users can select specific courses after a single In-App Purchase transaction, managed server-side. Could you please advise on the best approach to manage In-App Purchase for 100,000 individual cou
1
0
100
Aug ’25