-2

I'm building an iOS application which will read in XML files and generate various reports from them. The application must read them from the local device (in this case an iPad Mini 4). Users later may upload new XML files to the device (via non-developer type means and not changing the app's source code in any way). What is a good method for users to upload files to the iPad in a way that my application will have read access to them? Also, any pointers for XML reading in Swift would be beneficial.

I'm using Swift 4.0.3 and XCode 9.2 and while I've been a software developer for a long time, I'm relatively new to iOS development.

Chuck Claunch
  • 1,624
  • 1
  • 17
  • 29
  • Many possible answers to a question doesn't mean it's a broad question. Accusing people of not researching is pointless, and you paste a link to a Cocoa implementation of my very specific Swift question. This shows a lack of reading the question. Fortunately the one answer that made it in before the ridiculous hold pointed me in the right direction and led to an even [broader question which wasn't held](https://stackoverflow.com/questions/6029916/how-to-enable-file-sharing-for-my-app). – Chuck Claunch Jan 25 '18 at 14:00

1 Answers1

1

For upload new XML files to the device, you can

  • Using "File Sharing", that will allow user can upload file to your app via Itunes

  • Make your app like a server, and user will upload file via Wifi (you can search the open source in github, for example https://github.com/swisspol/GCDWebServer)

P/s: I think the json file will be lighter than the xml file. Swift 4 has supported json reader well with Codable protocol, too

Quoc Nguyen
  • 2,839
  • 6
  • 23
  • 28