Post

Replies

Boosts

Views

Activity

Reply to NSPersistentCloudKitContainer losing data
Thank you for answering in detail. I have following questions Are you suggesting that iCloud-sync should be enabled by default and if the users want to turn it off then they can do that from System Settings app? Based on your answer, I think I agree that having toggle to enable/disable iCloud will not provide consistent experience. But then I don't understand how that can be fixed since iCloud is available only to the premium users in the app. The toggle is off and disabled for the free users of the app. Is there a way to know if the user has disabled iCloud for the app from System Settings? c. A new user launches the app and add more data. I am sorry, I did not follow this part where data of 2 users get mixed. Won't the new user have a separate container where their data will be separately stored and if they have logged into their iCloud account then it will sync in their account?
Sep ’24
Reply to Mapping model not found if the attribute has "Preserve after deletion" enabled
Thank you for your response. The workaround you mentioned may work, however, the step #3 of calling the migrateStore function is extremely complicated. The documents also does not explain much. Some of the points that I can think of is Should the migration be called on the background context. Where should be the new temporary destination file be created? Are there any other functions that I should invoke before and after migration? Should I explicitly delete the temporary file if migration fails. It would be great if you can share a resource with code sample that explains how to use the migrateStore method.
Feb ’25
Reply to Mapping model not found if the attribute has "Preserve after deletion" enabled
Thank you for sharing the code snippet. Can you please update the code that demonstrates initialization of following variables for the sake of completeness of the code sourceModel destinationModel sourceStoreURL destinationStoreURL Also, if you could show how to replace the newly created destinationStore with sourceStore. Are there any edge cases that are to be handled? Should I manually delete the wal and shm files? guard let fileURL = Bundle.main.url(forResource: "Model", withExtension: "xcmappingmodel") For the snippet above, should I use xcmappingmodel or cdm extension? After compiling, a cdm file is created from a MappingModel
Feb ’25
Reply to Shortcut Command-L within Spotlight is not working on Big Sur
This has been fixed in 11.4
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
May ’21
Reply to In-App Purchase Sandbox completely broken on macOS Catalina
@radionoise were you able to resolve this? I am facing the same issue on Monterey
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
Nov ’21
Reply to _MASReceipt data won't download when testing with Sandbox users
Hi. I am facing the same issue and have filed a radar. Is there a temporary workaround until the issue is fixed in the backend?
Replies
Boosts
Views
Activity
Dec ’21
Reply to XCode 14.2 randomly crashes often since update to Ventura
From past few days, my Xcode has been crashing every 5 mins
Replies
Boosts
Views
Activity
Apr ’23
Reply to "Failed to set up CloudKit integration" in TestFlight build
Thanks a lot for this answer. Was stuck on this for more than 2 days.
Replies
Boosts
Views
Activity
Oct ’23
Reply to NSPersistentCloudKitContainer losing data
Thank you for answering in detail. I have following questions Are you suggesting that iCloud-sync should be enabled by default and if the users want to turn it off then they can do that from System Settings app? Based on your answer, I think I agree that having toggle to enable/disable iCloud will not provide consistent experience. But then I don't understand how that can be fixed since iCloud is available only to the premium users in the app. The toggle is off and disabled for the free users of the app. Is there a way to know if the user has disabled iCloud for the app from System Settings? c. A new user launches the app and add more data. I am sorry, I did not follow this part where data of 2 users get mixed. Won't the new user have a separate container where their data will be separately stored and if they have logged into their iCloud account then it will sync in their account?
Replies
Boosts
Views
Activity
Sep ’24
Reply to os_log into a App's local file
Swift does not support macros, so you can’t use that technique in Swift code. Is it possible now since macro was introduced in Swift 5.9
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Nov ’24
Reply to Core Data Migration: Custom policy in Entity Mapping for the case where App name contains a space
and a space isn't allowed in a class name. The space is in the App name not in the class name. Thanks for the additional information about staged migrations. Will check them out.
Topic: UI Frameworks SubTopic: General Tags:
Replies
Boosts
Views
Activity
Feb ’25
Reply to Core Data Migration: Custom policy in Entity Mapping for the case where App name contains a space
Also, I just checked Staged Migrations. It supports macOS 14 and onwards.
Topic: UI Frameworks SubTopic: General Tags:
Replies
Boosts
Views
Activity
Feb ’25
Reply to Mapping model not found if the attribute has "Preserve after deletion" enabled
Found a similar issue on forums https://developer.apple.com/forums/thread/120013
Replies
Boosts
Views
Activity
Feb ’25
Reply to Location of MacOS app when run from Xcode
You can print the path of your app to the Debug Console print(Bundle.main.bundlePath)
Replies
Boosts
Views
Activity
Feb ’25
Reply to Mapping model not found if the attribute has "Preserve after deletion" enabled
Thank you for your response. The workaround you mentioned may work, however, the step #3 of calling the migrateStore function is extremely complicated. The documents also does not explain much. Some of the points that I can think of is Should the migration be called on the background context. Where should be the new temporary destination file be created? Are there any other functions that I should invoke before and after migration? Should I explicitly delete the temporary file if migration fails. It would be great if you can share a resource with code sample that explains how to use the migrateStore method.
Replies
Boosts
Views
Activity
Feb ’25
Reply to MappingModel generate incorrect model hash for 'Preserve After Deletion' attributes
This is a bug in Xcode as confirmed by Apple. The only workaround at the moment is to manually load the mapping and update the hash as mentioned by @ulizurucker Ref: https://developer.apple.com/forums/thread/774218
Replies
Boosts
Views
Activity
Feb ’25
Reply to Mapping model not found if the attribute has "Preserve after deletion" enabled
Thank you for sharing the code snippet. Can you please update the code that demonstrates initialization of following variables for the sake of completeness of the code sourceModel destinationModel sourceStoreURL destinationStoreURL Also, if you could show how to replace the newly created destinationStore with sourceStore. Are there any edge cases that are to be handled? Should I manually delete the wal and shm files? guard let fileURL = Bundle.main.url(forResource: "Model", withExtension: "xcmappingmodel") For the snippet above, should I use xcmappingmodel or cdm extension? After compiling, a cdm file is created from a MappingModel
Replies
Boosts
Views
Activity
Feb ’25
Reply to Mapping model not found if the attribute has "Preserve after deletion" enabled
Is it necessary to manually checkpoint the WAL journal before starting the migration or does the NSMigrationManager handles it internally? Ref: https://developer.apple.com/library/archive/qa/qa1809/_index.html
Replies
Boosts
Views
Activity
Feb ’25