[英]Swift iOS CoreData to Flash Drive (Export and Transfer)
I've written an app (to be run on an iPad) that saves entities via CoreData. 我编写了一个应用程序(将在iPad上运行),该应用程序通过CoreData保存实体。 However, it will be used in an environment in which wireless connections may be inhibited and file transfer may need to be done physically.
但是,它将在可能禁止无线连接并且可能需要物理完成文件传输的环境中使用。
Is there any way to export the app's coredata model and saved data entities to a lightning flash drive and then import the data contents onto another iPad running the same app? 有什么方法可以将应用程序的coredata模型和已保存的数据实体导出到闪电驱动器,然后将数据内容导入到运行同一应用程序的另一台iPad上?
Thanks! 谢谢!
It is tricky but possible. 这很棘手,但可能。
UIDocumentInteractionController
to the lighting flash drive app and store it on the drive. UIDocumentInteractionController
将iPad A上的SQLite文件发送到照明闪存驱动器应用程序并将其存储在驱动器上。 It is not possible (without custom hardware and licenses) to access a lightning flash drive directly, so you need an existing drive with own app to transport the data. 无法(没有自定义硬件和许可证)直接访问闪电闪存驱动器,因此您需要具有自己应用程序的现有驱动器来传输数据。
But why can't you use wireless connections anyway? 但是为什么仍然不能使用无线连接? Even without a cellular network or a WiFi access point you can still communicate via Bluetooth or ad hoc WiFi between the iPads.
即使没有蜂窝网络或WiFi接入点,您仍然可以在iPad之间通过蓝牙或ad hoc WiFi进行通信。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.