Sharing CoreData objet with nested data

Is there a way to share CoreData data containing complex relationships easily by file? And also to create them easily after receiving the file?

The application runs on a secure iPad without iCloud, so CloudKit is not an option.

I'd really like to keep the file principle, so that data can be shared via Airdrop, e-mail, file transfer, etc.

The ideal would be :

  1. data = myNSManagedObject.toJSON()
  2. file = createFile(data)
  3. share file
  4. receive file
  5. data = file.data.decodeJSON()
  6. myNSManagedObjectContext.add(data)

All this without having to browse all the objects to create them individually

Thx

Sharing CoreData objet with nested data
 
 
Q