Search results for

“SwiftData inheritance relationship”

4,982 results found

Post

Replies

Boosts

Views

Activity

CloudKit Sharing Not Working with Other Apple IDs (SwiftData + SwiftUI)
Hi everyone, I’m currently developing a SwiftUI app that uses SwiftData with CloudKit sharing enabled. The app works fine on my own Apple ID, and local syncing with iCloud is functioning correctly — but sharing with other Apple IDs consistently fails. Setup: SwiftUI + SwiftData using a ModelContainer with .shared configuration Sharing UI is handled via UICloudSharingController iCloud container: iCloud.com.de.SkerskiDev.FoodGuard Proper entitlements enabled (com.apple.developer.icloud-services, CloudKit, com.apple.developer.coredata.cloudkit.containers, etc.) Automatic provisioning profiles created by Xcode Error: What I’ve tried: Verified the iCloud container is correctly created and enabled in the Apple Developer portal Checked bundle identifier and container settings Rebuilt and reinstalled the app Ensured correct iCloud entitlements and signing capabilities Questions: Why does CloudKit reject the container for sharing while local syncing works fine? Are there known issues with SwiftData
4
0
278
Jul ’25
Reply to CloudKit Sharing Not Working with Other Apple IDs (SwiftData + SwiftUI)
Thanks for your clarification. For my curiosity: @main struct FoodGuardApp: App { var body: some Scene { WindowGroup { ContentView() } .modelContainer(for: FoodItem.self, configurations: [ ModelConfiguration(Default, cloudKitDatabase: .shared) ]) } } The above code doesn't build (because .shared isn't supported), does it? The sharing worked locally (between users in the same Apple ID)... If the code doesn't build, I am super curious how the sharing worked locally ... I am guessing that you probably added .shared with your own code by extending ModelConfiguration.CloudKitDatabase, and that SwiftData falled back to .private because it didn't know .shared. That will explain why the synchronization of the private database works, but is definitely not the way to support CloudKit sharing. Best, —— Ziqiao Chen  Worldwide Developer Relations.
Jul ’25
Reply to CloudKit Sharing Not Working with Other Apple IDs (SwiftData + SwiftUI)
Thanks a lot, Ziqiao, for your quick response. You’re absolutely right – I now realize that .shared CloudKit containers are not yet supported with SwiftData. In my implementation, I attempted to use a SwiftData model with a ModelContainer(for:sharing:) configuration and used UICloudSharingController to manage sharing between Apple IDs. The ModelContainer was configured like this: @main struct FoodGuardApp: App { var body: some Scene { WindowGroup { ContentView() } .modelContainer(for: FoodItem.self, configurations: [ ModelConfiguration(Default, cloudKitDatabase: .shared) ]) } } The sharing worked locally (between users in the same Apple ID), but failed when another Apple ID accepted the share, producing this error: CKError: Bad Container (5/1014) Couldn't get container configuration from the server for container iCloud.com.de.seki.FoodGuard Based on your reply and DTS confirmation, I now plan to migrate my project to Core Data + CloudKit, using NSPersistentCloudKitContainer and UICloudSharin
Jul ’25
Reply to CloudKit Sharing Not Working with Other Apple IDs (SwiftData + SwiftUI)
As of today, SwiftData + CloudKit integration doesn't support CloudKit sharing, as you can see that ModelConfiguration.CloudKitDatabase only has private(_:). I am wondering what SwiftData with CloudKit sharing means in your context. If you don't mind to share more details about your implementation, together with the code snippet that triggers the CloudKit error, I'd probably have more to comment. Best, —— Ziqiao Chen  Worldwide Developer Relations.
Jul ’25
Structured concurrency + preconcurrency API (SFAuthorizationPluginView)
I'm having trouble dealing with concurrency with the SFAuthorizationPluginView. Does anybody know how this can be solved? https://developer.apple.com/documentation/securityinterface/sfauthorizationpluginview The crux of it is: If I inherit an object as part of an API, and the API is preconcurrency, and thus is nonisolated (but in reality is @MainActor), how do I return a @MainActor GUI element? https://developer.apple.com/documentation/securityinterface/sfauthorizationpluginview/firstresponder() The longer story: I made my view class inherit SFAuthorizationPluginView. The API is preconcurrency (but not marked as preconcurrency) I started using concurrency in my plugin to retrieve data over XPC. (https://developer.apple.com/documentation/xpc/xpcsession + https://developer.apple.com/documentation/swift/withcheckedthrowingcontinuation(isolation:function:_:)) Once I retrieve the data over XPC, I need to post it on GUI, hence I've set my view class as @MainActor in order to do the thread switch.
2
0
748
Jul ’25
Change to SwiftData ModelContainer causing crashes
I have some models in my app: [SDPlanBrief.self, SDAirport.self, SDChart.self, SDIndividualRunwayAirport.self, SDLocationBrief.self] SDLocationBrief has a @Relationship with SDChart When I went live with my app I didn't have a versioned schema, but quickly had to change that as I needed to add items to my SDPlanBrief Model. The first versioned schema I made included only the model that I had made a change to. static var models: [any PersistentModel.Type] { [SDPlanBrief.self] } I had made zero changes to my model container and the whole time, and it was working fine. The migration worked well and this is what I was using: .modelContainer(for: [SDAirport.self, SDIndividualRunwayAirport.self, SDLocationBrief.self, SDChart.self, SDPlanBrief.self]) I then saw that to do this all properly, I should actually include ALL of my @Models in the versioned schema: enum AllSwiftDataSchemaV3: VersionedSchema { static var models: [any PersistentModel.Type] { [SDPlanBrief.self, SDAirport.self, SDChart.self, SDIndivid
6
0
284
Jul ’25
File/Folder access/scoping for background only apps
We create plug-ins for Adobe Creative Cloud and have run into an issue with respect to file/folder permissions. First, all of our libraries, code is code-signed and notarized as per Apple requirements but distribute outside of the Mac App store. We install a Photoshop plug-in and its mainly a UI which then executes a background app containing the business logic to read/write files. The background app runs as a separate process and is not in the Photoshop sandbox space so it doesn't inherit Photoshop permissions/scoping rules. Our plug-in communicates with the background process via ports etc. When a user chooses a file to process from lets say the Desktop, generally macOS first pops up a message that says ABCD background app is trying to access files from the Desktop do you grant it permission etc...This is also true for network mounted volumes or downloads folder. This message generally appears properly when everything is under an account with admin rights. However, when our tool is installed from a
8
0
210
Jul ’25
TabView + NavigationStack + ScrollView navigationTitle bug
Hello there! I've been struggline with this thing for a two days now, and seems like it's a bug in SwiftUI. Navigation title is jumping on top of the ScrollView's content when switching tabs in TabView. Steps to reproduce: Scroll one tab to the bottom so that the large title is hidden and the floating toolbar appears. Go to another tab in the tab bar. Go back to the initial tab (it is still scrolled), and press the current tab button again to scroll to the top. The navigation title will glitch and be on top of the content. The animation fixes if you scroll again manually. Video: https://share.cleanshot.com/PFCSKMlH Code (simplified): import SwiftData import SwiftUI @main struct MyApp: App { var body: some Scene { WindowGroup { TabsContentView() } } } // ... struct TabsContentView: View { enum Tab { case library, profile } @State private var selectedTab: Tab = .library var body: some View { TabView(selection: $selectedTab) { NavigationStack { YourLibraryList() .navigationTitle(Your Library) } .tabItem
2
0
283
Jul ’25
SwiftData and discarding unsaved changes idea???
Someone smarter than me please tell me if this will work... I want to have an edit screen for a SwiftData class. Auto Save is on, but I want to be able to revert changes. I have read all about sending a copy in, sending an ID and creating a new context without autosave, etc. What about simply creating a second set of ephemeral values in the actual original model. initialize them with the actual fields. Edit them and if you save changes, migrate that back to the permanent fields before returning. Don't have to manage a list of @State variables corresponding to every model field, and don't have to worry about a second model context. Anyone have any idea of the memory / performance implications of doing it this way, and if it is even possible? Does this just make a not quite simple situation even more complicated? Haven't tried yet, just got inspiration from reading some medium content on attributes on my lunch break, and wondering if I am just silly for considering it.
2
0
208
Jul ’25
Reply to Struggling With Guideline 4.3(b) Rejections – Would Love Dev Insight
Precedent & Fairness in Enforcement Rove is an intentional, safety-forward dating product. It is neither spammy, low-effort, nor duplicative — and yet we continue to face rejections under Guideline 4.3(b). This raises serious concerns about selective enforcement of App Store policy. In the past 60 days, Apple has approved a wide range of new dating apps, including: • Ready: Dating & Relationships – Launched June 3, 2025. Marketed as a native app for “intentional dating,” with a thematic approach directly comparable to Rove. • Meetline – Launched May 15, 2025. A transit-based connection app that limits conversations, just like Rove limits user visibility to avoid overload. • Yuzu – Asian Dating & Friends – A non-swipe app tailored to a specific community — proof that niche dating concepts are not inherently duplicative. • Metya / DateGuard – Two safety-first apps that use community filters and moderation-centric design. These are directionally aligned with Rove’s own innovation in safety a
Jul ’25
Reply to File/Folder access/scoping for background only apps
First off, ruling an issue out here: However, when our tool is installed from a Standard Account, the macOS messages asking for confirmation to access the Desktop or Documents or Downloads folder don’t appear and access to the file/folders is denied. Does your app include all of the relevant tcc strings (NSDesktopFolderUsageDescription, etc.)? Also, one thing to be careful of here is that there are a bunch of heuristics in this system that control how/when these are presented, which can make knowing why something is working a particular way difficult to determine. When you're looking closely at an issue like this, I'd always suggest working on a totally clean machine*, not your normal development machine. *VMs are handy for this, as you can get the system to a fully configured state, then duplicate the VM image so you can always start over from the same exact starting point. We install a Photoshop plug-in and it’s mainly a UI which then executes a background app containing the business logic to read/write fil
Topic: App & System Services SubTopic: Core OS Tags:
Jul ’25
SwiftData error: Attempting to retrieve an NSManagedObjectModel version checksum while the model is still editable
Hi, I'm getting a very odd error log in my SwiftData setup for an iOS app. It is implemented to support schema migration. When starting the app, it simply prints the following log twice (seems to be dependent on how many migration steps, I have two steps in my sample code): CoreData: error: Attempting to retrieve an NSManagedObjectModel version checksum while the model is still editable. This may result in an unstable verison checksum. Add model to NSPersistentStoreCoordinator and try again. (Yes there is a mistyped word verison, this is exactly the log) The code actually fully works. But I have neither CloudKit configured, nor is this app in Production yet. I'm still just developing. Here is the setup and code to reproduce the issue. Development mac version: macOS 15.5 XCode version: 16.4 iOS Simulator version: 18.5 Real iPhone version: 18.5 Project name: SwiftDataDebugApp SwiftDataDebugApp.swift: import SwiftUI import SwiftData @main struct SwiftDataDebugApp: App { var sharedModelContainer
2
0
157
Jul ’25
Reply to Authorization Credentials Caching Implications
Thank you Quinn for the insights! It's quite a coincidence indeed, I hadn't seen that other thread yet! I think I found that ancient Q&A while searching the Documentation Archive for Authorization information (or maybe on a comment you left in an older thread). Before filing a bug report, I'd like to clarify whether this is actually a bug or simply a missing feature. What puzzles me specifically is the behavior of Activity Monitor.app: Even when I use rights that are explicitly configured as non-shared (like authenticate-admin-nonshared), Activity Monitor still appears to inherit the credentials. I also tried to configure com.apple.activitymonitor.kill with a timeout of 0, but that didn't help. The only way I've found to prevent this behavior is when the original application explicitly calls AuthorizationFree() with the .destroyRights flag. However, newer versions of System Settings don't have the lock icon you mentioned, so they appear to not be destroying these rights (even if I close the windo
Topic: Privacy & Security SubTopic: General Tags:
Jul ’25
Reply to SwiftData SortDescriptor Limitation...
I am not asking for help fixing a crash. I did that by commenting out one line of code where I was asking SwiftData to sort ModelA results on a title string from an associated ModelB object. ModeB has a one to many association to ModelA and must exist before any ModelA objects are created BUT CloudKit requires that you specify the relationships between these two models as Optional. Therefore when I tried to sort ModelA results by a Title in ModelB I needed to declare the property as a force unwrapped title of ModelB in the SortDescriptor. It would be ludicrous to try to show the actual code so that you can follow everything. Suffice it to say that this SortDescriptor was accepted by the compiler, and gave me exactly what I wanted when I ran the App either in a Simulator or on a device that downloaded the app from Xcode. BUT when the app was uploaded to the App Store and then downloaded from TestFlight the App would immediately crash with no useful error pointing to the problem. Bottom line i
Jul ’25
Reply to How can I get the system to use my FSModule for probing?
As a workaround, it does seem that if I log in to a GUI session as the root user (https://support.apple.com/en-us/102367) and enable my FSKit module as the root user in System Settings, then automount works (even from a regular user). Seems like some kind of “modules enabled as the logged in user” vs “modules enabled as the root user” discrepancy. Yeah, there are a bunch of places in the system where logging in as root will change the normal system behavior. There's a common Unix pattern macOS inherits, which is that the root is both a: Standard user account (which is why you can log in). The user ID the system uses as the owner ID for stuff it doesn't want some other specific user to own. Going back to here: enable my FSKit module as the root user in System Settings, then automount works (even from a regular user). What's going here is that there's a split between the system's extensions (which work) and the user's extensions (which should work, but don't). Strictly speaking, logging in as root shou
Topic: App & System Services SubTopic: Core OS Tags:
Jul ’25
CloudKit Sharing Not Working with Other Apple IDs (SwiftData + SwiftUI)
Hi everyone, I’m currently developing a SwiftUI app that uses SwiftData with CloudKit sharing enabled. The app works fine on my own Apple ID, and local syncing with iCloud is functioning correctly — but sharing with other Apple IDs consistently fails. Setup: SwiftUI + SwiftData using a ModelContainer with .shared configuration Sharing UI is handled via UICloudSharingController iCloud container: iCloud.com.de.SkerskiDev.FoodGuard Proper entitlements enabled (com.apple.developer.icloud-services, CloudKit, com.apple.developer.coredata.cloudkit.containers, etc.) Automatic provisioning profiles created by Xcode Error: What I’ve tried: Verified the iCloud container is correctly created and enabled in the Apple Developer portal Checked bundle identifier and container settings Rebuilt and reinstalled the app Ensured correct iCloud entitlements and signing capabilities Questions: Why does CloudKit reject the container for sharing while local syncing works fine? Are there known issues with SwiftData
Replies
4
Boosts
0
Views
278
Activity
Jul ’25
Reply to CloudKit Sharing Not Working with Other Apple IDs (SwiftData + SwiftUI)
Thanks for your clarification. For my curiosity: @main struct FoodGuardApp: App { var body: some Scene { WindowGroup { ContentView() } .modelContainer(for: FoodItem.self, configurations: [ ModelConfiguration(Default, cloudKitDatabase: .shared) ]) } } The above code doesn't build (because .shared isn't supported), does it? The sharing worked locally (between users in the same Apple ID)... If the code doesn't build, I am super curious how the sharing worked locally ... I am guessing that you probably added .shared with your own code by extending ModelConfiguration.CloudKitDatabase, and that SwiftData falled back to .private because it didn't know .shared. That will explain why the synchronization of the private database works, but is definitely not the way to support CloudKit sharing. Best, —— Ziqiao Chen  Worldwide Developer Relations.
Replies
Boosts
Views
Activity
Jul ’25
Reply to CloudKit Sharing Not Working with Other Apple IDs (SwiftData + SwiftUI)
Thanks a lot, Ziqiao, for your quick response. You’re absolutely right – I now realize that .shared CloudKit containers are not yet supported with SwiftData. In my implementation, I attempted to use a SwiftData model with a ModelContainer(for:sharing:) configuration and used UICloudSharingController to manage sharing between Apple IDs. The ModelContainer was configured like this: @main struct FoodGuardApp: App { var body: some Scene { WindowGroup { ContentView() } .modelContainer(for: FoodItem.self, configurations: [ ModelConfiguration(Default, cloudKitDatabase: .shared) ]) } } The sharing worked locally (between users in the same Apple ID), but failed when another Apple ID accepted the share, producing this error: CKError: Bad Container (5/1014) Couldn't get container configuration from the server for container iCloud.com.de.seki.FoodGuard Based on your reply and DTS confirmation, I now plan to migrate my project to Core Data + CloudKit, using NSPersistentCloudKitContainer and UICloudSharin
Replies
Boosts
Views
Activity
Jul ’25
Reply to CloudKit Sharing Not Working with Other Apple IDs (SwiftData + SwiftUI)
As of today, SwiftData + CloudKit integration doesn't support CloudKit sharing, as you can see that ModelConfiguration.CloudKitDatabase only has private(_:). I am wondering what SwiftData with CloudKit sharing means in your context. If you don't mind to share more details about your implementation, together with the code snippet that triggers the CloudKit error, I'd probably have more to comment. Best, —— Ziqiao Chen  Worldwide Developer Relations.
Replies
Boosts
Views
Activity
Jul ’25
Structured concurrency + preconcurrency API (SFAuthorizationPluginView)
I'm having trouble dealing with concurrency with the SFAuthorizationPluginView. Does anybody know how this can be solved? https://developer.apple.com/documentation/securityinterface/sfauthorizationpluginview The crux of it is: If I inherit an object as part of an API, and the API is preconcurrency, and thus is nonisolated (but in reality is @MainActor), how do I return a @MainActor GUI element? https://developer.apple.com/documentation/securityinterface/sfauthorizationpluginview/firstresponder() The longer story: I made my view class inherit SFAuthorizationPluginView. The API is preconcurrency (but not marked as preconcurrency) I started using concurrency in my plugin to retrieve data over XPC. (https://developer.apple.com/documentation/xpc/xpcsession + https://developer.apple.com/documentation/swift/withcheckedthrowingcontinuation(isolation:function:_:)) Once I retrieve the data over XPC, I need to post it on GUI, hence I've set my view class as @MainActor in order to do the thread switch.
Replies
2
Boosts
0
Views
748
Activity
Jul ’25
Change to SwiftData ModelContainer causing crashes
I have some models in my app: [SDPlanBrief.self, SDAirport.self, SDChart.self, SDIndividualRunwayAirport.self, SDLocationBrief.self] SDLocationBrief has a @Relationship with SDChart When I went live with my app I didn't have a versioned schema, but quickly had to change that as I needed to add items to my SDPlanBrief Model. The first versioned schema I made included only the model that I had made a change to. static var models: [any PersistentModel.Type] { [SDPlanBrief.self] } I had made zero changes to my model container and the whole time, and it was working fine. The migration worked well and this is what I was using: .modelContainer(for: [SDAirport.self, SDIndividualRunwayAirport.self, SDLocationBrief.self, SDChart.self, SDPlanBrief.self]) I then saw that to do this all properly, I should actually include ALL of my @Models in the versioned schema: enum AllSwiftDataSchemaV3: VersionedSchema { static var models: [any PersistentModel.Type] { [SDPlanBrief.self, SDAirport.self, SDChart.self, SDIndivid
Replies
6
Boosts
0
Views
284
Activity
Jul ’25
File/Folder access/scoping for background only apps
We create plug-ins for Adobe Creative Cloud and have run into an issue with respect to file/folder permissions. First, all of our libraries, code is code-signed and notarized as per Apple requirements but distribute outside of the Mac App store. We install a Photoshop plug-in and its mainly a UI which then executes a background app containing the business logic to read/write files. The background app runs as a separate process and is not in the Photoshop sandbox space so it doesn't inherit Photoshop permissions/scoping rules. Our plug-in communicates with the background process via ports etc. When a user chooses a file to process from lets say the Desktop, generally macOS first pops up a message that says ABCD background app is trying to access files from the Desktop do you grant it permission etc...This is also true for network mounted volumes or downloads folder. This message generally appears properly when everything is under an account with admin rights. However, when our tool is installed from a
Replies
8
Boosts
0
Views
210
Activity
Jul ’25
TabView + NavigationStack + ScrollView navigationTitle bug
Hello there! I've been struggline with this thing for a two days now, and seems like it's a bug in SwiftUI. Navigation title is jumping on top of the ScrollView's content when switching tabs in TabView. Steps to reproduce: Scroll one tab to the bottom so that the large title is hidden and the floating toolbar appears. Go to another tab in the tab bar. Go back to the initial tab (it is still scrolled), and press the current tab button again to scroll to the top. The navigation title will glitch and be on top of the content. The animation fixes if you scroll again manually. Video: https://share.cleanshot.com/PFCSKMlH Code (simplified): import SwiftData import SwiftUI @main struct MyApp: App { var body: some Scene { WindowGroup { TabsContentView() } } } // ... struct TabsContentView: View { enum Tab { case library, profile } @State private var selectedTab: Tab = .library var body: some View { TabView(selection: $selectedTab) { NavigationStack { YourLibraryList() .navigationTitle(Your Library) } .tabItem
Replies
2
Boosts
0
Views
283
Activity
Jul ’25
SwiftData and discarding unsaved changes idea???
Someone smarter than me please tell me if this will work... I want to have an edit screen for a SwiftData class. Auto Save is on, but I want to be able to revert changes. I have read all about sending a copy in, sending an ID and creating a new context without autosave, etc. What about simply creating a second set of ephemeral values in the actual original model. initialize them with the actual fields. Edit them and if you save changes, migrate that back to the permanent fields before returning. Don't have to manage a list of @State variables corresponding to every model field, and don't have to worry about a second model context. Anyone have any idea of the memory / performance implications of doing it this way, and if it is even possible? Does this just make a not quite simple situation even more complicated? Haven't tried yet, just got inspiration from reading some medium content on attributes on my lunch break, and wondering if I am just silly for considering it.
Replies
2
Boosts
0
Views
208
Activity
Jul ’25
Reply to Struggling With Guideline 4.3(b) Rejections – Would Love Dev Insight
Precedent & Fairness in Enforcement Rove is an intentional, safety-forward dating product. It is neither spammy, low-effort, nor duplicative — and yet we continue to face rejections under Guideline 4.3(b). This raises serious concerns about selective enforcement of App Store policy. In the past 60 days, Apple has approved a wide range of new dating apps, including: • Ready: Dating & Relationships – Launched June 3, 2025. Marketed as a native app for “intentional dating,” with a thematic approach directly comparable to Rove. • Meetline – Launched May 15, 2025. A transit-based connection app that limits conversations, just like Rove limits user visibility to avoid overload. • Yuzu – Asian Dating & Friends – A non-swipe app tailored to a specific community — proof that niche dating concepts are not inherently duplicative. • Metya / DateGuard – Two safety-first apps that use community filters and moderation-centric design. These are directionally aligned with Rove’s own innovation in safety a
Replies
Boosts
Views
Activity
Jul ’25
Reply to File/Folder access/scoping for background only apps
First off, ruling an issue out here: However, when our tool is installed from a Standard Account, the macOS messages asking for confirmation to access the Desktop or Documents or Downloads folder don’t appear and access to the file/folders is denied. Does your app include all of the relevant tcc strings (NSDesktopFolderUsageDescription, etc.)? Also, one thing to be careful of here is that there are a bunch of heuristics in this system that control how/when these are presented, which can make knowing why something is working a particular way difficult to determine. When you're looking closely at an issue like this, I'd always suggest working on a totally clean machine*, not your normal development machine. *VMs are handy for this, as you can get the system to a fully configured state, then duplicate the VM image so you can always start over from the same exact starting point. We install a Photoshop plug-in and it’s mainly a UI which then executes a background app containing the business logic to read/write fil
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jul ’25
SwiftData error: Attempting to retrieve an NSManagedObjectModel version checksum while the model is still editable
Hi, I'm getting a very odd error log in my SwiftData setup for an iOS app. It is implemented to support schema migration. When starting the app, it simply prints the following log twice (seems to be dependent on how many migration steps, I have two steps in my sample code): CoreData: error: Attempting to retrieve an NSManagedObjectModel version checksum while the model is still editable. This may result in an unstable verison checksum. Add model to NSPersistentStoreCoordinator and try again. (Yes there is a mistyped word verison, this is exactly the log) The code actually fully works. But I have neither CloudKit configured, nor is this app in Production yet. I'm still just developing. Here is the setup and code to reproduce the issue. Development mac version: macOS 15.5 XCode version: 16.4 iOS Simulator version: 18.5 Real iPhone version: 18.5 Project name: SwiftDataDebugApp SwiftDataDebugApp.swift: import SwiftUI import SwiftData @main struct SwiftDataDebugApp: App { var sharedModelContainer
Replies
2
Boosts
0
Views
157
Activity
Jul ’25
Reply to Authorization Credentials Caching Implications
Thank you Quinn for the insights! It's quite a coincidence indeed, I hadn't seen that other thread yet! I think I found that ancient Q&A while searching the Documentation Archive for Authorization information (or maybe on a comment you left in an older thread). Before filing a bug report, I'd like to clarify whether this is actually a bug or simply a missing feature. What puzzles me specifically is the behavior of Activity Monitor.app: Even when I use rights that are explicitly configured as non-shared (like authenticate-admin-nonshared), Activity Monitor still appears to inherit the credentials. I also tried to configure com.apple.activitymonitor.kill with a timeout of 0, but that didn't help. The only way I've found to prevent this behavior is when the original application explicitly calls AuthorizationFree() with the .destroyRights flag. However, newer versions of System Settings don't have the lock icon you mentioned, so they appear to not be destroying these rights (even if I close the windo
Topic: Privacy & Security SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jul ’25
Reply to SwiftData SortDescriptor Limitation...
I am not asking for help fixing a crash. I did that by commenting out one line of code where I was asking SwiftData to sort ModelA results on a title string from an associated ModelB object. ModeB has a one to many association to ModelA and must exist before any ModelA objects are created BUT CloudKit requires that you specify the relationships between these two models as Optional. Therefore when I tried to sort ModelA results by a Title in ModelB I needed to declare the property as a force unwrapped title of ModelB in the SortDescriptor. It would be ludicrous to try to show the actual code so that you can follow everything. Suffice it to say that this SortDescriptor was accepted by the compiler, and gave me exactly what I wanted when I ran the App either in a Simulator or on a device that downloaded the app from Xcode. BUT when the app was uploaded to the App Store and then downloaded from TestFlight the App would immediately crash with no useful error pointing to the problem. Bottom line i
Replies
Boosts
Views
Activity
Jul ’25
Reply to How can I get the system to use my FSModule for probing?
As a workaround, it does seem that if I log in to a GUI session as the root user (https://support.apple.com/en-us/102367) and enable my FSKit module as the root user in System Settings, then automount works (even from a regular user). Seems like some kind of “modules enabled as the logged in user” vs “modules enabled as the root user” discrepancy. Yeah, there are a bunch of places in the system where logging in as root will change the normal system behavior. There's a common Unix pattern macOS inherits, which is that the root is both a: Standard user account (which is why you can log in). The user ID the system uses as the owner ID for stuff it doesn't want some other specific user to own. Going back to here: enable my FSKit module as the root user in System Settings, then automount works (even from a regular user). What's going here is that there's a split between the system's extensions (which work) and the user's extensions (which should work, but don't). Strictly speaking, logging in as root shou
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jul ’25