I never had to do this, but if I did this, then I would.
:
- Core Data.
NSPersistentContainer ( ) NSPersistentStoreCoordinator. NSPersistentStoreCoordinator migratePersistentStore(_:to:options:withType:) . URL- , UUID . .- .
UserDefaults , .
# 2 Core Data - # 1. , , , .
NSPersistentContainer, persistentStoreCoordinator № 2.
, , . , - . NSPersistentContainer. , . , , , , , , , .
, ,
- .
NSPersistentStoreCoordinator .replacePersistentStore(at:destinationOptions:withPersistentStoreFrom:sourceOptions:ofType:) . - , - , .- ()
NSPersistentStoreCoordinator destroyPersistentStore(at:ofType:options:), . NSPersistentContainer .
API, , FileManager . Core Data , , .