0

I'm requested to make possible to perform this sequence:

  • user already has a file/backup file stored on pc/mac
  • user plugs an iOS device to pc/mac whiteout my app on it
  • then drags (somewhere, maybe File app?) the file resent on pc/mac
  • THEN installs my app on device (not from the store, but OTA, no store restrictions), and finally starts the onboarding process inside the app to restore the file (a backup file previously saved).

My request is this: is this possible? is this a way iOS could work? I'd like to understand if there is a way, using swift on iOS, to drag a file inside iPhone in a generic place, let's say, File App, or something else. (again, in order to be used after installing app). I'm asking this since my boss, Android developer, has this behavior.

To be clear, I'm not asking about dragging a file from pc/mac to MY app directly, but I need to understand if I can allow user to perform the above task in order to restore a file / backup before the app he or she will be using is downloaded / installed on device.

In my understanding, answer is no. I can only install the app, and if the app has proper settings, you can drag and drop from a folder on your pc/mac to your app once device is plugged.

biggreentree
  • 1,633
  • 3
  • 20
  • 35
  • What do you mean by "THEN installs my app, and finally starts the onboarding process to restore the file"? Is the file "your app"? What do you mean by "restore"? Is the file corrupted or something? – Sweeper Aug 09 '23 at 08:00
  • 1
    You can add the file to the files app through any mechanism available - via USB from a Mac/Windows PC, copy it from a cloud location etc. Then when they launch your app you can use `UIFilePickerViewController` or similar to allow them to select the file for processing by your app. – Paulw11 Aug 09 '23 at 08:55
  • @Sweeper I mean : after user plugged device to Mac or pc, but without my app installed on iPhone, he or she should be able to drag the file (a backup file) from pc to somewhere in iPhone. with "restore" I mean the app allows to set as new or restore a backup. – biggreentree Aug 09 '23 at 13:19
  • @Paulw11 if I plug a device, open finder, go to file tab, Files app is not in the list of apps I can use to drop the file – biggreentree Aug 09 '23 at 13:20
  • There are a myriad of ways to transfer a file to a phone, and you don't even need the phone plugged in. iCloud/AirDrop/Email etc. It is also easy to let the user pick that file on your app. `UIFilePickerViewController` as Paulw suggests is one option. See [here](https://stackoverflow.com/q/19021718/5133585) for a starting point. – Sweeper Aug 09 '23 at 13:26

0 Answers0