简体   繁体   中英

Best way to host plist file on server for iOS app

I am updating an iOS app that has a short list of default items. The default items initially come from a short plist in the app bundle. For refreshing the data, I have written code to pull down a newer plist from a web server with newer default data as needed and it saves it to the documents directory. This all works very very well.

My question: right now for testing I have the plist file in a specific folder on a shared hosting web server. Should I be using a server specifically for such things such as Amazon AWS? I only need to retrieve this plist file (around 90 kilobytes) and nothing else from the server. And what about the security of placing it in hidden folder on a normal web server? The app has quite a few users, so it could get hit as much as 75,000 times on a day the app is updated. But the plist file will probably only be updated every couple of weeks.

Thanks

If the only purpose of the server would be to host the plist file, you would be much better off by serving it through S3 instead of EC2. You can generate the plist file and store it into S3 using any server that you currently have access to. Instead of paying instance-hours for keeping the server alive, you would only pay for each GET request. It's also automatically scalable, it doesn't matter if you have 1 user or 1 million (and you will only pay for the requests you and your users actually make).

If latency is important when retrieving this file, it's trivial and non expensive (for 1 small hosted file) to connect the S3 bucket to a CloudFront distribution. This is a CDN that will deliver the file from the closest location to your users.

Regarding security, you can configure that the file is not public and you can authenticate to S3 before retrieving the file from the iOS / Android app (be sure to obfuscate the AWS credentials).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM