Post

Replies

Boosts

Views

Activity

Reply to Better alternative to WWDC's `withContinuousObservation` in View initializers for SwiftData?
WWDC sample code and code-alongs aren't meant to be architectural endorsements, just quick and easy ways to introduce new stuff in the shortest, most isolated way possible so you can see how the syntax works in a brief video. Your proposed workaround has a couple of key flaws and risks: It will silently fail during CloudKit Sync and database loads. When SwiftData pulls an item from the SQLite database into memory or when CK downloads a remote sync change, it will bypass computed properties entirely, and instead directly populate the underlying stored backing field (_title) using the internal BackingData engine. So if a user modifies an item's title on their iPad, CK will sync that change down to their iPhone. The iPhone will directly apply the update to _title and as a result, because the custom setter for title is completely bypassed updatedAt will never be updated. So now you're dealing with permanent data drift and desync across user devices. It also breaks the context transaction and undo engine. The transaction engine can't track the dirty state and is unable to handle undo/redo operations because it'll roll back _title but the custom setter won't execute and now updatedAt is stuck in the future. I think it's also risky for predicate evaluation and KeyPath tracking. When a SwiftUI view evaluates item.title it goes through a computed gateway to read _title, and while basic observation might still find the dependency, once we get to deeply nested filtering, sectioned fetches or complex data graph evaluations things might fail because the public title property doesn't directly map to a verified storage index. And like you already noted, it forces the underlying database columns to be saved as _TITLE instead of TITLE, so now your database schema is permanently polluted with implementation details because there is no custom columnName modifier. CK console debugging will become very confusing if you ever share the database with a non-SwiftData client and it will make future lightweight schema migrations a nightmare. I recommend either putting withContinousObservation in a .task modifier if the side effects is strictly for the UI, or using a coordinator and ModelActor if the side effect is for the data. .task example: import SwiftUI import Observation import SwiftData struct ActivityDetailView: View { let activity: Activity // 1. A stable place to store the token for the lifetime of this view @State private var observationToken: ObservationTracking.Token? var body: some View { Form { TextField("Activity Name", text: Bindable(activity).name) LabeledContent("Last Updated") { Text(activity.updatedAt.formatted(date: .omitted, time: .standard)) } } // 2. The task modifier manages the lifecycle safely .task { // Cancel any old token just in case of unexpected task restarts observationToken?.cancel() // 3. Initialize the loop once when the view appears observationToken = withContinuousObservation(options: .didSet) { event in // 4. Check if the mutation matches the property we care about if event.matches(\Activity.name) { // Because .task defaults to the @MainActor, this inline write // runs safely within the main rendering loop activity.updatedAt = .now } } } // 5. Automatic cleanup! The second the user leaves this screen, // the task scope cancels, tearing down the token automatically. } } There is zero init overhead, if the parent view reevaluates this view 100 times due to an animation or structural layout change the code in .task is completely skipped, it executes exactly once when the view physically takes up space on the screen Because the .task modifier inherits @MainActor isolation by default the code block is guaranteed to run on the main thread, so you avoid cross thread data races You don't have to worry about accidentally leaking memory or creating zombie looks because SwiftUI handles tearing down the async environment the moment the view is removed from the hierarchy That said, the boundary is visibility, so if that's a deal breaker or you need to avoid blocking the main thread then I'd recommend a different approach. Coordinator + ModelActor example: import Observation import SwiftData import Foundation // 1. The model remains clean and free of custom setters @Model class Activity { var name: String var updatedAt: Date var token: ObservationTracking.Token? // Kept here if you want it model-scoped init(name: String) { self.name = name self.updatedAt = .now } } // 2. The Background Actor handles the actual database write transaction @ModelActor actor ActivityDataEngine { func applyTimestampSideEffect(for identifier: PersistentIdentifier) { guard let activity = modelContext.model(for: identifier) as? Activity else { return } // This is where our actual business logic side-effect lives activity.updatedAt = .now // Save the transaction safely off the main thread try? modelContext.save() } } // 3. The Coordinator Service provides the "stable home" for the continuous observation @MainActor class ActivityCoordinator { private let dataEngine: ActivityDataEngine private var observationToken: ObservationTracking.Token? init(container: ModelContainer) { self.dataEngine = ActivityDataEngine(container: container) } func registerPersistentObservation(on activity: Activity) { // Discard any existing token to prevent duplicates observationToken?.cancel() let activityID = activity.id // This loop is initialized ONCE. It survives view teardowns entirely. observationToken = withContinuousObservation(options: .didSet) { [weak self] event in guard let self else { return } // The moment ANY property changes on this activity, the observation fires. // We hand the persistent ID over to our background actor to do the heavy lifting. Task { await self.dataEngine.applyTimestampSideEffect(for: activityID) } } } } The view layer simply displays the data, when it appears it calls coordinator.registerPersistentObservation(on: activity) inside a .task, the coordinator holds the single active observation token By passing the PersistentIdentifier down to the ActivityDataEngine actor the main thread is instantly freed up, preventing UI stutters
1w
Reply to Auto Renewable Subscription Localization Rejected Repeatedly Without Explanation
It's hard to say without more information. Are you sure that the red banner on your product page doesn't contain a link with an explanation? Usually when you get localization rejection its due to potentially confusing strings between products. Is there a chance that in a list your localization strings wouldn't make clear which one is your 6 months and which one is your annual product? It also helps if you don't have a build in review at the same time, sometimes the review team will otherwise assume they should be able to find the products in question without hassle (i.e. even though you might have these to test pricing).
1w
Reply to macOS 27 Beta 1 Install Failure
Boot into Recovery Mode and make sure the Security Policy is set to Full Security in the Startup Security Utility. The current beta seems to ignore it when it's not set to Full Security and still tries to create a personalization ticket (i.e. follow the Full Security protocol) and fail in attempting to do so.
Topic: Community SubTopic: Apple Developers Tags:
1w
Reply to BANK PROBLEM HELP APPLE
It's weird that developer support over the phone wasn't able to help you. Make sure that if you have a personal account the bank account you've setup is in your personal name, and if your developer account is a business account the bank account you've setup is in your business name. Payments addressed to the wrong name often bounce back. You could try emailing iTSpayments[at]apple.com and see if they can make a case for you and resolve your issue. That's the department that deals with finances.
1w
Reply to To say I'm extremely hurt is an understatement! 😔
Hello Dayton, I'm sorry to hear you're running into issues. This forum will probably not be the place where you'll find solutions however. This is a forum for developers to discuss matters related to software development for Apple's devices and Apple doesn't monitor these forums. It seems like you've already been in contact with a support representative and if they state it's being worked on despite not being able to provide more detailed information then that's as good as it gets I'm afraid.
Jun ’25
Reply to cannot find DeveloperDiskImage.dmg on iphone 18.5
The implementation details of how Xcode works with iPhones have changed. Apple moved away from using DeveloperDiskImage.dmg and signature files since iOS 17. I doubt anyone here is able to help you because what you aim to do strays far from the main supported path and I doubt the forum moderators will allow people to share Apple's copyrighted proprietary materials in ways not officially supported. Your best bet is to update to the latest Xcode version your MacBook supports and if that Xcode version doesn't support your iOS 18.5 device then I'm afraid your best option is to ugprade your developer machine. You might be able to find some creative GitHub project that might try to provide a solution for your conundrum, but there be dragons and they'd be much better suited to help you with any questions you might have about the files Xcode needs.
Jun ’25
Reply to Better alternative to WWDC's `withContinuousObservation` in View initializers for SwiftData?
WWDC sample code and code-alongs aren't meant to be architectural endorsements, just quick and easy ways to introduce new stuff in the shortest, most isolated way possible so you can see how the syntax works in a brief video. Your proposed workaround has a couple of key flaws and risks: It will silently fail during CloudKit Sync and database loads. When SwiftData pulls an item from the SQLite database into memory or when CK downloads a remote sync change, it will bypass computed properties entirely, and instead directly populate the underlying stored backing field (_title) using the internal BackingData engine. So if a user modifies an item's title on their iPad, CK will sync that change down to their iPhone. The iPhone will directly apply the update to _title and as a result, because the custom setter for title is completely bypassed updatedAt will never be updated. So now you're dealing with permanent data drift and desync across user devices. It also breaks the context transaction and undo engine. The transaction engine can't track the dirty state and is unable to handle undo/redo operations because it'll roll back _title but the custom setter won't execute and now updatedAt is stuck in the future. I think it's also risky for predicate evaluation and KeyPath tracking. When a SwiftUI view evaluates item.title it goes through a computed gateway to read _title, and while basic observation might still find the dependency, once we get to deeply nested filtering, sectioned fetches or complex data graph evaluations things might fail because the public title property doesn't directly map to a verified storage index. And like you already noted, it forces the underlying database columns to be saved as _TITLE instead of TITLE, so now your database schema is permanently polluted with implementation details because there is no custom columnName modifier. CK console debugging will become very confusing if you ever share the database with a non-SwiftData client and it will make future lightweight schema migrations a nightmare. I recommend either putting withContinousObservation in a .task modifier if the side effects is strictly for the UI, or using a coordinator and ModelActor if the side effect is for the data. .task example: import SwiftUI import Observation import SwiftData struct ActivityDetailView: View { let activity: Activity // 1. A stable place to store the token for the lifetime of this view @State private var observationToken: ObservationTracking.Token? var body: some View { Form { TextField("Activity Name", text: Bindable(activity).name) LabeledContent("Last Updated") { Text(activity.updatedAt.formatted(date: .omitted, time: .standard)) } } // 2. The task modifier manages the lifecycle safely .task { // Cancel any old token just in case of unexpected task restarts observationToken?.cancel() // 3. Initialize the loop once when the view appears observationToken = withContinuousObservation(options: .didSet) { event in // 4. Check if the mutation matches the property we care about if event.matches(\Activity.name) { // Because .task defaults to the @MainActor, this inline write // runs safely within the main rendering loop activity.updatedAt = .now } } } // 5. Automatic cleanup! The second the user leaves this screen, // the task scope cancels, tearing down the token automatically. } } There is zero init overhead, if the parent view reevaluates this view 100 times due to an animation or structural layout change the code in .task is completely skipped, it executes exactly once when the view physically takes up space on the screen Because the .task modifier inherits @MainActor isolation by default the code block is guaranteed to run on the main thread, so you avoid cross thread data races You don't have to worry about accidentally leaking memory or creating zombie looks because SwiftUI handles tearing down the async environment the moment the view is removed from the hierarchy That said, the boundary is visibility, so if that's a deal breaker or you need to avoid blocking the main thread then I'd recommend a different approach. Coordinator + ModelActor example: import Observation import SwiftData import Foundation // 1. The model remains clean and free of custom setters @Model class Activity { var name: String var updatedAt: Date var token: ObservationTracking.Token? // Kept here if you want it model-scoped init(name: String) { self.name = name self.updatedAt = .now } } // 2. The Background Actor handles the actual database write transaction @ModelActor actor ActivityDataEngine { func applyTimestampSideEffect(for identifier: PersistentIdentifier) { guard let activity = modelContext.model(for: identifier) as? Activity else { return } // This is where our actual business logic side-effect lives activity.updatedAt = .now // Save the transaction safely off the main thread try? modelContext.save() } } // 3. The Coordinator Service provides the "stable home" for the continuous observation @MainActor class ActivityCoordinator { private let dataEngine: ActivityDataEngine private var observationToken: ObservationTracking.Token? init(container: ModelContainer) { self.dataEngine = ActivityDataEngine(container: container) } func registerPersistentObservation(on activity: Activity) { // Discard any existing token to prevent duplicates observationToken?.cancel() let activityID = activity.id // This loop is initialized ONCE. It survives view teardowns entirely. observationToken = withContinuousObservation(options: .didSet) { [weak self] event in guard let self else { return } // The moment ANY property changes on this activity, the observation fires. // We hand the persistent ID over to our background actor to do the heavy lifting. Task { await self.dataEngine.applyTimestampSideEffect(for: activityID) } } } } The view layer simply displays the data, when it appears it calls coordinator.registerPersistentObservation(on: activity) inside a .task, the coordinator holds the single active observation token By passing the PersistentIdentifier down to the ActivityDataEngine actor the main thread is instantly freed up, preventing UI stutters
Replies
Boosts
Views
Activity
1w
Reply to Auto Renewable Subscription Localization Rejected Repeatedly Without Explanation
It's hard to say without more information. Are you sure that the red banner on your product page doesn't contain a link with an explanation? Usually when you get localization rejection its due to potentially confusing strings between products. Is there a chance that in a list your localization strings wouldn't make clear which one is your 6 months and which one is your annual product? It also helps if you don't have a build in review at the same time, sometimes the review team will otherwise assume they should be able to find the products in question without hassle (i.e. even though you might have these to test pricing).
Replies
Boosts
Views
Activity
1w
Reply to macOS 27 Beta 1 Install Failure
Boot into Recovery Mode and make sure the Security Policy is set to Full Security in the Startup Security Utility. The current beta seems to ignore it when it's not set to Full Security and still tries to create a personalization ticket (i.e. follow the Full Security protocol) and fail in attempting to do so.
Topic: Community SubTopic: Apple Developers Tags:
Replies
Boosts
Views
Activity
1w
Reply to TestFlight Feedback not populating
Is the feedback also missing when you log into App Store Connect on desktop? App Store Connect on mobile doesn't always show everything correctly. What does it show in the App Store Connect iOS app under Screenshot Feedback?
Replies
Boosts
Views
Activity
1w
Reply to TAHOE: MAIL APP: HUGE MEMORY LEAK
This is the developers forum. Unless you suspect this is a bug, in which case I recommend you report it via the feedback app, I recommend you contact Apple Care if you need technical support.
Replies
Boosts
Views
Activity
1w
Reply to Can FoundationModels Chat be used to explain 2025-2026 Foundation Models features and documentation?
The Foundation Models chat has a knowledge cutoff date in 2024 so the fm chat tool won't be able to help you. I recommend asking via Coding Intelligence in Xcode 27, that one has access to the latest Apple documentation and will be able to help you better.
Replies
Boosts
Views
Activity
1w
Reply to Context window for Foundation Models
Apple doesn't typically make any statements about future plans. I recommend you file feedback explaining your use case so the appropriate team can take it into consideration.
Replies
Boosts
Views
Activity
1w
Reply to BANK PROBLEM HELP APPLE
It's weird that developer support over the phone wasn't able to help you. Make sure that if you have a personal account the bank account you've setup is in your personal name, and if your developer account is a business account the bank account you've setup is in your business name. Payments addressed to the wrong name often bounce back. You could try emailing iTSpayments[at]apple.com and see if they can make a case for you and resolve your issue. That's the department that deals with finances.
Replies
Boosts
Views
Activity
1w
Reply to Managed TestFlight App is replaced by release
The only way to prevent the TestFlight version from replacing a production build is by using a different bundle ID for the TestFlight version e.g. “com.myapp.testflight”
Replies
Boosts
Views
Activity
1w
Reply to TestFlight External Testing Build Stuck in “Waiting for Review” for Several Days
App Review times have generally increased and Beta Reviews seem to receive less priority than regular App Review. I’m afraid there’s not much to do at this time than to wait it out.
Replies
Boosts
Views
Activity
1w
Reply to App Stuck in Review for More Than 4 Weeks
App Review times are generally longer than usual but 4 weeks sounds exceptionally long. Have you contacted developer support by phone to ask if there’s anything specific holding up your App Review?
Replies
Boosts
Views
Activity
1w
Reply to The requested app is not available or doesn't exist
Did you give them the correct role under Users and Access?
Replies
Boosts
Views
Activity
1w
Reply to To say I'm extremely hurt is an understatement! 😔
Hello Dayton, I'm sorry to hear you're running into issues. This forum will probably not be the place where you'll find solutions however. This is a forum for developers to discuss matters related to software development for Apple's devices and Apple doesn't monitor these forums. It seems like you've already been in contact with a support representative and if they state it's being worked on despite not being able to provide more detailed information then that's as good as it gets I'm afraid.
Replies
Boosts
Views
Activity
Jun ’25
Reply to cannot find DeveloperDiskImage.dmg on iphone 18.5
The implementation details of how Xcode works with iPhones have changed. Apple moved away from using DeveloperDiskImage.dmg and signature files since iOS 17. I doubt anyone here is able to help you because what you aim to do strays far from the main supported path and I doubt the forum moderators will allow people to share Apple's copyrighted proprietary materials in ways not officially supported. Your best bet is to update to the latest Xcode version your MacBook supports and if that Xcode version doesn't support your iOS 18.5 device then I'm afraid your best option is to ugprade your developer machine. You might be able to find some creative GitHub project that might try to provide a solution for your conundrum, but there be dragons and they'd be much better suited to help you with any questions you might have about the files Xcode needs.
Replies
Boosts
Views
Activity
Jun ’25