Search results for

“SwiftData inheritance relationship”

4,986 results found

Post

Replies

Boosts

Views

Activity

Reply to Production Mac app becomes progressively unusable in Issues workspace; Mac_Dev remains fast
Here is more concrete context. Platform / tools Target: macOS app Language / frameworks: Swift, SwiftUI, SwiftData Cloud sync: SwiftData with CloudKit mirroring in the production configuration Xcode: 26.4 (17E192) Test OS: macOS 26.4 (25E246) What I’m seeing In the macOS app, issue board scrolling can become inconsistent or very slow. Changing an issue status from detail view can be very slow. Scrolling the status menu itself can be slow. Typing in issue description/notes fields can become sluggish. The problem is much more noticeable with my full production-sized dataset than with a small dev dataset. What I’ve tested so far I compared a small dev dataset vs a much larger production-sized dataset. With a small dataset, the same UI feels fast and smooth. With the large dataset, the same UI becomes noticeably slower. I also tested a local-only copy of the production dataset with CloudKit disabled. That improved some behavior, but it did not remove the lag entirely. When I reduced the local te
18h
App Store version stuck after Pending Developer Release – cannot add builds or create new versions
Hello everyone, I’m running into a situation in App Store Connect that appears to be a backend lock related to an approved version, and I’m looking for confirmation or similar experiences. Context: App had version 1.2.6 Version progressed to Pending Developer Release Before releasing to users, I chose Developer Reject I then edited the version number (to 1.2.7) Current State / Issue: After this, App Store Connect is effectively blocked: ❌ Cannot associate any builds to the version ❌ Uploading a build with the same version and higher build number does not help ❌ Cannot create a fresh version (no “+ Version” button is visible) ❌ App Store Connect API returns: ENTITY_ERROR.RELATIONSHIP.INVALID ❌ Remove Version / Delete Version is not available Even attempting brand‑new version numbers does not work. It looks like App Store Connect still considers the previously approved Pending Developer Release version to be active and locked internally. What I understand so far From my understanding: Once a version reaches Pen
0
0
16
19h
Reply to Need MetricKit Implementation details for MacOS background Application, mainly for
[quote='882729022, PavanGulla, /thread/821002?answerId=882729022#882729022, /profile/PavanGulla'] we received approximately 48 hours of past metric payloads [/quote] Oh, interesting. I’m not 100% sure what’s going on here but this behaviour doesn’t surprise me. Internally, MetricKit uses an XPC activity to drive metric delivery [1], and XPC activities a very much a best effort kinda thing. [quote='882729022, PavanGulla, /thread/821002?answerId=882729022#882729022, /profile/PavanGulla'] could u comment if MetricKit works for NE Process? [/quote] Well, I think you have pretty solid evidence that it doesn’t (-: I’m going to talk about what’s going on in a sec, but before I do that I want to give you some concrete advice: If you want MetricKit to work in your NE system extension, I encourage you to file an enhancement request that describes your setup and why MetricKit is important to you. Once you’re done, please post your bug number here, just for the record. As to why this doesn’t work, consider this: % find /
20h
Production Mac app becomes progressively unusable in Issues workspace; Mac_Dev remains fast
The production macOS build is showing severe performance problems, while Mac_Dev performs normally. Observed behavior in production Mac build: Issue board scrolling becomes inconsistent or nearly unusable Changing an issue status in detail view is very slow Scrolling the status menu/options can be slow Typing in issue description/notes fields becomes sluggish Dragging issues between milestones/statuses on the board can lag badly Observed behavior in Mac_Dev: Board scrolling is smooth Status changes are immediate Typing in description fields is responsive Drag/drop between milestones works well Important comparison: Mac_Dev appears to run against an isolated local SwiftData store Production Mac app uses the normal CloudKit-backed store Because the same UI is fast in Mac_Dev, this does not look like a pure rendering problem Most likely cause is production store / CloudKit sync churn amplifying existing SwiftUI invalidation and save behavior Current hypothesis: The production app is saving or observing
2
0
41
1d
TestFlight build crashes from fetch descriptor
I have a FetchDescriptor that uses starts(with:) which works fine in debug builds but crashes in TestFlight and archive. For background information I'm using iCloud and model inheritance where the property being used in fetch descriptor is defined on the superclass, the fetch descriptor is for the subclass. Implementation: static func fetchDescriptor(nameStartingWith prefix: String) -> FetchDescriptor { let predicate = #Predicate { asset in asset.name.starts(with: prefix) } return FetchDescriptor(predicate: predicate) } @Model public class Asset: Identifiable { // MARK: - Properties var name: String = .... } @available(macOS 26.0, *) @Model public class ColorAsset: Asset { ... }
2
0
63
2d
Reply to My macOS app is unable to read a Managed Preferences plist unless the App Sandbox is disabled. Is there any solution to read the MDM plist file while the sandbox is still enabled?
Could you please suggest the recommended approach? First off, as a clarification, what are you actually trying read here? If this is your apps preference file (meaning, it has your apps bundle ID), then NSUserDefaults (or CFPreference) will read automatically without any special code. Similarly, if this ISN'T your apps data, then what's the relationship between your app and the data you're trying to read? __ Kevin Elliott DTS Engineer, CoreOS/Hardware
Topic: App & System Services SubTopic: Core OS Tags:
3d
MapKit in SwiftUI
Anyone worked with MapKit's MapCameraPosition in SwiftUI? I'm building a navigation app and ran into a limitation I can't find a clean solution for when using .userLocation(followsHeading: true) MapKit takes full control of the camera, smooth heading tracking, follows the user automatically. Perfect. But there's no way to set a custom pitch (tilt) on it. The only initializer available is... .userLocation(followsHeading: true, fallback: .automatic) No pitch, no distance parameters.... The workaround I found is setting .camera(MapCamera(..., pitch: 60)) first, waiting 200ms, then switching to .userLocation(followsHeading: true), MapKit inherits the pitch from the rendered camera state before handing off to user tracking.... It works, but it's clearly exploiting an undocumented behaviour in MapKit's state machine rather than a proper API Has anyone found a cleaner way to achieve this? Or is UIViewRepresentable wrapping MKMapView the only proper solution? It would be awesome to have something like this c
1
0
117
4d
NavigationLink selection in DisclosureGroup not working with .draggable modifier
NavigationLink selection in DisclosureGroup not working with .draggable modifier This was recently also posted here: https://stackoverflow.com/questions/79914290/ I am playing around with a tree data structure with folders and entries.I would like to add dragging of entries and folders between folders, using .draggable and dropDestination. In my current code, dragging works, but selection of entries no longer works, except if I click outside of the Text If I comment out .draggable(subfolder.name) in func FolderRow(), selection works as expected. How can I make sure both selection and drag and drop works for both folders and entries? I also tried using Transferable and Codable, but I get the same result. Here is an MRE: import SwiftData import SwiftUI @Model final class Folder { @Attribute(.unique) var name: String // Parent var parentFolder: Folder? // Child folders @Relationship(deleteRule: .cascade, inverse: Folder.parentFolder) var subfolders: [Folder] = [] // Leaf entries @Relationship
Topic: UI Frameworks SubTopic: SwiftUI
1
0
168
4d
Reply to CoreData + CloudKit -- Many-to-Many Relationship not Syncing
This sounds like a general synchronization issue, and so you can probably start with the technotes mentioned in this post to hopefully figure out the cause of the issue. NSPersistentCloudKitContainer supports many-to-many relationships. Before seeing an evidence that proves it doesn't work (by going through the debugging process the technotes describe), I probably won't change the Core Data model. Best, —— Ziqiao Chen  Worldwide Developer Relations.
1w
CoreData + CloudKit -- Many-to-Many Relationship not Syncing
In an iOS App that uses CKShare I have a many-to-many relationship that does not consistently sync between the share's N participants. The relationship is between Group and Player as group.players and player.groups. As an example, given 3 group each with 4 players (aka 4:4:4), some devices show CoreData (it is NOT a UI issue) with 4:2:3 or 3:4:4. (A deletion of CoreData from a device, forcing a full re-sync from CloudKit, seems to populate the group:player relationships consistently; but obviously that is impractical to resolving the issue). How do I avoid these sync-from-CloudKit inconsistencies? Note: AI agents generally suggest adding a CoreData 'join' entity - such as 'GroupPlayer'. Is that THE fix?
1
0
72
1w
Reply to App Store Connect Screenshot Upload Stuck in “Processing” State – Blocking Submission Completely
alam333, I don’t see any relationship between your issue and the one being reported by DarrenHan. And regarding your issue, let’s focus that discussion on this thread, which you’ve already posted on. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
1w
Reply to iCloud Sync not working with iPhone, works fine for Mac.
-It is the iPhone not receiving the notification to update. Steps to reproduce Change property on Mac iPhone app is active, no changes received (even after 2 hours) Swipe to home screen on iPhone open iPhone app SwiftData syncs on iPhone and shows changes that were made on the Mac (Again, this worked 48 hours ago, and the only change that was made was updating all devices to iOS26.4)
1w
Reply to 3.2(f) triggered — account pending termination despite repeated attempts to comply
They only tell you how you violate review guidelines. They won't tell you how you should make changes so that you will pass the review process. It's been like that for the past 15 years or longer. We only pay $99 annually. So it shouldn't be a surprise. If you need to find out how you should make changes, I'm afraid you need to hire a consultant. I get that they won’t provide step-by-step instructions, but pointing out specific elements that are considered non-compliant would benefit both sides. When the feedback is just “overtly sexual,” it’s hard to know what that actually refers to, whether it’s the imagery, VO, copy, or even the character relationships. Since only Apple knows where they draw that line, having more specific guidance would significantly reduce the number of resubmissions and make the process more efficient for all. As well as prevent good intentioned developers from having their accounts terminated.
1w
Reply to Production Mac app becomes progressively unusable in Issues workspace; Mac_Dev remains fast
Here is more concrete context. Platform / tools Target: macOS app Language / frameworks: Swift, SwiftUI, SwiftData Cloud sync: SwiftData with CloudKit mirroring in the production configuration Xcode: 26.4 (17E192) Test OS: macOS 26.4 (25E246) What I’m seeing In the macOS app, issue board scrolling can become inconsistent or very slow. Changing an issue status from detail view can be very slow. Scrolling the status menu itself can be slow. Typing in issue description/notes fields can become sluggish. The problem is much more noticeable with my full production-sized dataset than with a small dev dataset. What I’ve tested so far I compared a small dev dataset vs a much larger production-sized dataset. With a small dataset, the same UI feels fast and smooth. With the large dataset, the same UI becomes noticeably slower. I also tested a local-only copy of the production dataset with CloudKit disabled. That improved some behavior, but it did not remove the lag entirely. When I reduced the local te
Replies
Boosts
Views
Activity
18h
App Store version stuck after Pending Developer Release – cannot add builds or create new versions
Hello everyone, I’m running into a situation in App Store Connect that appears to be a backend lock related to an approved version, and I’m looking for confirmation or similar experiences. Context: App had version 1.2.6 Version progressed to Pending Developer Release Before releasing to users, I chose Developer Reject I then edited the version number (to 1.2.7) Current State / Issue: After this, App Store Connect is effectively blocked: ❌ Cannot associate any builds to the version ❌ Uploading a build with the same version and higher build number does not help ❌ Cannot create a fresh version (no “+ Version” button is visible) ❌ App Store Connect API returns: ENTITY_ERROR.RELATIONSHIP.INVALID ❌ Remove Version / Delete Version is not available Even attempting brand‑new version numbers does not work. It looks like App Store Connect still considers the previously approved Pending Developer Release version to be active and locked internally. What I understand so far From my understanding: Once a version reaches Pen
Replies
0
Boosts
0
Views
16
Activity
19h
Reply to Need MetricKit Implementation details for MacOS background Application, mainly for
[quote='882729022, PavanGulla, /thread/821002?answerId=882729022#882729022, /profile/PavanGulla'] we received approximately 48 hours of past metric payloads [/quote] Oh, interesting. I’m not 100% sure what’s going on here but this behaviour doesn’t surprise me. Internally, MetricKit uses an XPC activity to drive metric delivery [1], and XPC activities a very much a best effort kinda thing. [quote='882729022, PavanGulla, /thread/821002?answerId=882729022#882729022, /profile/PavanGulla'] could u comment if MetricKit works for NE Process? [/quote] Well, I think you have pretty solid evidence that it doesn’t (-: I’m going to talk about what’s going on in a sec, but before I do that I want to give you some concrete advice: If you want MetricKit to work in your NE system extension, I encourage you to file an enhancement request that describes your setup and why MetricKit is important to you. Once you’re done, please post your bug number here, just for the record. As to why this doesn’t work, consider this: % find /
Replies
Boosts
Views
Activity
20h
Production Mac app becomes progressively unusable in Issues workspace; Mac_Dev remains fast
The production macOS build is showing severe performance problems, while Mac_Dev performs normally. Observed behavior in production Mac build: Issue board scrolling becomes inconsistent or nearly unusable Changing an issue status in detail view is very slow Scrolling the status menu/options can be slow Typing in issue description/notes fields becomes sluggish Dragging issues between milestones/statuses on the board can lag badly Observed behavior in Mac_Dev: Board scrolling is smooth Status changes are immediate Typing in description fields is responsive Drag/drop between milestones works well Important comparison: Mac_Dev appears to run against an isolated local SwiftData store Production Mac app uses the normal CloudKit-backed store Because the same UI is fast in Mac_Dev, this does not look like a pure rendering problem Most likely cause is production store / CloudKit sync churn amplifying existing SwiftUI invalidation and save behavior Current hypothesis: The production app is saving or observing
Replies
2
Boosts
0
Views
41
Activity
1d
TestFlight build crashes from fetch descriptor
I have a FetchDescriptor that uses starts(with:) which works fine in debug builds but crashes in TestFlight and archive. For background information I'm using iCloud and model inheritance where the property being used in fetch descriptor is defined on the superclass, the fetch descriptor is for the subclass. Implementation: static func fetchDescriptor(nameStartingWith prefix: String) -> FetchDescriptor { let predicate = #Predicate { asset in asset.name.starts(with: prefix) } return FetchDescriptor(predicate: predicate) } @Model public class Asset: Identifiable { // MARK: - Properties var name: String = .... } @available(macOS 26.0, *) @Model public class ColorAsset: Asset { ... }
Replies
2
Boosts
0
Views
63
Activity
2d
Reply to My macOS app is unable to read a Managed Preferences plist unless the App Sandbox is disabled. Is there any solution to read the MDM plist file while the sandbox is still enabled?
Could you please suggest the recommended approach? First off, as a clarification, what are you actually trying read here? If this is your apps preference file (meaning, it has your apps bundle ID), then NSUserDefaults (or CFPreference) will read automatically without any special code. Similarly, if this ISN'T your apps data, then what's the relationship between your app and the data you're trying to read? __ Kevin Elliott DTS Engineer, CoreOS/Hardware
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
3d
Reply to iCloud Sync not working with iPhone, works fine for Mac.
I just updated my iPhone to 26.5 beta. The syncing is now working on the iPhone. I have Mac, AppleTV and iPhone all running at the same time, and any change to SwiftData on any of the 3 devices immediately updates on the other 2.
Replies
Boosts
Views
Activity
3d
MapKit in SwiftUI
Anyone worked with MapKit's MapCameraPosition in SwiftUI? I'm building a navigation app and ran into a limitation I can't find a clean solution for when using .userLocation(followsHeading: true) MapKit takes full control of the camera, smooth heading tracking, follows the user automatically. Perfect. But there's no way to set a custom pitch (tilt) on it. The only initializer available is... .userLocation(followsHeading: true, fallback: .automatic) No pitch, no distance parameters.... The workaround I found is setting .camera(MapCamera(..., pitch: 60)) first, waiting 200ms, then switching to .userLocation(followsHeading: true), MapKit inherits the pitch from the rendered camera state before handing off to user tracking.... It works, but it's clearly exploiting an undocumented behaviour in MapKit's state machine rather than a proper API Has anyone found a cleaner way to achieve this? Or is UIViewRepresentable wrapping MKMapView the only proper solution? It would be awesome to have something like this c
Replies
1
Boosts
0
Views
117
Activity
4d
NavigationLink selection in DisclosureGroup not working with .draggable modifier
NavigationLink selection in DisclosureGroup not working with .draggable modifier This was recently also posted here: https://stackoverflow.com/questions/79914290/ I am playing around with a tree data structure with folders and entries.I would like to add dragging of entries and folders between folders, using .draggable and dropDestination. In my current code, dragging works, but selection of entries no longer works, except if I click outside of the Text If I comment out .draggable(subfolder.name) in func FolderRow(), selection works as expected. How can I make sure both selection and drag and drop works for both folders and entries? I also tried using Transferable and Codable, but I get the same result. Here is an MRE: import SwiftData import SwiftUI @Model final class Folder { @Attribute(.unique) var name: String // Parent var parentFolder: Folder? // Child folders @Relationship(deleteRule: .cascade, inverse: Folder.parentFolder) var subfolders: [Folder] = [] // Leaf entries @Relationship
Topic: UI Frameworks SubTopic: SwiftUI
Replies
1
Boosts
0
Views
168
Activity
4d
Choosing Minimum Deployment Targets
My app uses SwiftData so I need at least iOS 17 as the minimum deployment target. When I select iOS 17 in the dropdown it selects iOS 17.6 as the target. However, the newest simulator available is iOS 17.5. Should I set my minimum deployment target to 17.0, 17.5, 17.6, or something else?
Replies
3
Boosts
0
Views
73
Activity
1w
Reply to CoreData + CloudKit -- Many-to-Many Relationship not Syncing
This sounds like a general synchronization issue, and so you can probably start with the technotes mentioned in this post to hopefully figure out the cause of the issue. NSPersistentCloudKitContainer supports many-to-many relationships. Before seeing an evidence that proves it doesn't work (by going through the debugging process the technotes describe), I probably won't change the Core Data model. Best, —— Ziqiao Chen  Worldwide Developer Relations.
Replies
Boosts
Views
Activity
1w
CoreData + CloudKit -- Many-to-Many Relationship not Syncing
In an iOS App that uses CKShare I have a many-to-many relationship that does not consistently sync between the share's N participants. The relationship is between Group and Player as group.players and player.groups. As an example, given 3 group each with 4 players (aka 4:4:4), some devices show CoreData (it is NOT a UI issue) with 4:2:3 or 3:4:4. (A deletion of CoreData from a device, forcing a full re-sync from CloudKit, seems to populate the group:player relationships consistently; but obviously that is impractical to resolving the issue). How do I avoid these sync-from-CloudKit inconsistencies? Note: AI agents generally suggest adding a CoreData 'join' entity - such as 'GroupPlayer'. Is that THE fix?
Replies
1
Boosts
0
Views
72
Activity
1w
Reply to App Store Connect Screenshot Upload Stuck in “Processing” State – Blocking Submission Completely
alam333, I don’t see any relationship between your issue and the one being reported by DarrenHan. And regarding your issue, let’s focus that discussion on this thread, which you’ve already posted on. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Replies
Boosts
Views
Activity
1w
Reply to iCloud Sync not working with iPhone, works fine for Mac.
-It is the iPhone not receiving the notification to update. Steps to reproduce Change property on Mac iPhone app is active, no changes received (even after 2 hours) Swipe to home screen on iPhone open iPhone app SwiftData syncs on iPhone and shows changes that were made on the Mac (Again, this worked 48 hours ago, and the only change that was made was updating all devices to iOS26.4)
Replies
Boosts
Views
Activity
1w
Reply to 3.2(f) triggered — account pending termination despite repeated attempts to comply
They only tell you how you violate review guidelines. They won't tell you how you should make changes so that you will pass the review process. It's been like that for the past 15 years or longer. We only pay $99 annually. So it shouldn't be a surprise. If you need to find out how you should make changes, I'm afraid you need to hire a consultant. I get that they won’t provide step-by-step instructions, but pointing out specific elements that are considered non-compliant would benefit both sides. When the feedback is just “overtly sexual,” it’s hard to know what that actually refers to, whether it’s the imagery, VO, copy, or even the character relationships. Since only Apple knows where they draw that line, having more specific guidance would significantly reduce the number of resubmissions and make the process more efficient for all. As well as prevent good intentioned developers from having their accounts terminated.
Replies
Boosts
Views
Activity
1w