How to export result from my app to a web file? sftp? https?

How to export result from my app to a web file? sftp? https?

which is the preferable way?

Replies

You can post to a php script on the server (with https).


php script on the server will get info from posted content to include as needed on web site.

Do you mean web services? calling the web method on a server?

I mean

- a php script (script.php) on the server,

- create a URLRequest with this url theServer/script.php

- set the httpBody with the data you need to send

then all app user has to have their own server php script, that is no possible.

What about ftp? is it more common?

user just type in their ftp server, user name and password and upload their own data into their own account.

That means all app user has to have their own server capable of receiving ftp. Does your app depend on that?

The app is not depend on that.

It is more like a better to have feature, one user can export their data to be imported by another user.

Then you need to prepare a server (or servers) for the users of your app to share contents among users.


Some user may have an account for some file sharing service such as Dropbox or Google something, but another user may not.

Your app may need to support various number of such file sharing services unless you have your own server dedicated for your app.


Anyway, ftp (including sftp or other ftp derived protocols) cannot be your option.


First, choose what servers your app supports. Then you are forced to use the API for the servers. You have no need to choose how.

Do you mean I have to choose either Dropbox or Google etc?

Does Apple support similar free services?

Do you mean I have to choose either Dropbox or Google etc?


Dropbox or Google something is just an example.

Do you want to know more about Microsoft OneDrive? Sorry, this is not a good place to talk much about it.


Does Apple support similar free services?


I have almost forgotten iCloud. But I'm not sure if it's useful to share app data among other users or not.

What about ftp?

Do not use FTP. It’s a very old protocol and has serious issues that make it hard to use in modern apps, not least of which is its total lack of security. See my On FTP post for more details.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

But I'm not sure if it's useful to share app data among other users or not.

Yes it is, but see my big picture post below.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

You really need to decide on the user experience you want first, and then decide whether a server is necessary, and then worry about the technology. For example, if I were building a simple app and I wanted to provide a way to export data, I would do this via iOS’s document model. The user can then choose to export the document to whatever file management service they want, and from there choose to share it with other users via the facilities provided by that service.

Note For more info on iOS’s document model, watch WWDC 2018 Session 216 Managing Documents In Your iOS Apps. It’s an excellent summary of the state of the art here.

However, that may not result in the user experience you’re looking for. If so, I recommend you post more details about that desired user experience. It’s hard to offer concrete advice without knowing more about what you’re trying to do.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"