Architecture of the iOS application that communicates to the server [closed] - ios

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I have a general architecture question. From where applications like Skype or Viber delivers user images?
For example, if I am a user that registers in the application and I set my profile image - then that image is uploaded to the server.
When I open my list of contacts (that is fetched from the server), how are images served? Are they served from some url all the time or they are downloaded and cached on the mobile device?
What do you think, which approach is better. And maybe there is a third approach that I am not aware of.
Thanks for clarifying.

Its common practice to cache that kind of content at least while the app is in memory. Whether to retain it between runs depends on the cost of fetching again and the probability of needing it.

Hope i'm understand your question. I see these ways:
You can use some third-party services to get user's picture by his email or some other information; for example: https://gravatar.com/.
It's similar with 1: You are linking your user with his profile in some social network, Facebook for example. Then you can get access to his avatar and contact list, which includes avatars of his friends.
You are uploading and saving pictures of users by you own.
All apps definitely doing in these ways. In any case, mobile app stored pictures in his cache or file system, it helps your app not to downloading a new copy of images each time. Usually, it's cache: they will not download resource if no change was made. Http protocol has special header ('modified-since' AFAIK) for it.

Related

When offline, how to manage data? IOS [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I would like to know what are the best practices regarding, Modeling data when no network connection available, if the app you are building is cloud computing based, but still you want to be able to have basic functionality and I guess some persistent data?
PD: I am kind of new to IOS development
UserDefaults is okay for small bits of data that don't change often, but as it has to rewrite the entire user defaults dataset to a file each time a change it made, it is not robust enough for anything of volume or with frequent changes. For that you would want CoreData or a third party open source solution like Realm.io.
You can try to using the 'cache' where you store temporary data.
One way to achieve this is NSUserDefaults where you set a variable (let's say users profile photo) and when the user opens his app again, the image will be loaded even if there is no internet connection since its cached. Hope this helps!

Creating a Image-Heavy iOS App- Online DB?- Swift [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
Objective/ Problem: I'm beginning to build an iOS app which will have a ton of images. It's not a photo app (it's a trivia type app) so the photos are not user photos. The app-size can't be huge as then it will take a long time to download from the App Store and take up space on the phone.
Question: If I'm not an expert developer or backend developer, what is my best option for storing the photos online and retrieving them as needed with simple code?
Research:
What I'm looking for seems to fall under the umbrella of "backend". The easy answer used to be Parse, which is a BaaS company (backend-as-a-service). However, they are shutting down. There also used to be PayPal's "StackMob", a BaaS company but they shutdown in 2014.
Both Parse and StackMob were built for people like me, indie-developers with no backend knowledge. Yet, as two of the biggest services shutdown choosing BaaS as a solution is now viewed as risky.
Big companies and expert backend developers will just build their own database, load the photos onto it, and query it as needed.
Yet, I'm no expert. Can anyone let me know what replaced Parse as being the easiest/turn-key solution? After I upload the original photos, the user will never need to add/change any.
If you can make your file names unique you don't even really need a back end. You can just use generic web services. I handled a very similar problem using Amazon Web services S3 which just provides basic HTTP downloads.
I package groups of image file into
zip files and then request a download of the zip to download the group of files. I found a third-party wrapper for zip decompression in Objective-C and use that to unzip the packages into the application documents directory.

Instagram-API integration authentication [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I'm developing an online platform, where one type of users (User Type 2) create a profile in an web-app and submit data into the web-app. Another user type (User Type 1) is then able to view this data from an iOS-app. See image below for overview.
I want the User Type 1 to be able to (without logging into instagram) watch User Type 2s Instagram Images.
I have been playing around with the Instagram-API, registered as a developer, and registered a client app, which is now in sandbox mode. But I find it a bit hard to get started, and a grasp about which user types need to be authenticate.
Is it possible to make the iOS-app Authenticate with the API in the background, and then pull images from any instagram user?
If so, what is the simplest way to get started at pulling images down to the iOS-app? Maybe you have some good suggestions or tutorials...
Technically, you don't need to authenticate to get a user's photos. You might need it for the iOS SDK, but if you want to use HTTP calls you can get a JSON blob of all the photos by just adding /media/ after the user address, like so: https://www.instagram.com/dnlrsn/media/.
Obviously, this doesn't allow for interacting with the images, but from what I understood from your question, you don't need that.

iOS: Best practice for Number of Users to support [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I am building an app that connects to a server at the back end that supports multiple users.Similar in this respect to Facebook etc. On the web version, users log in and then their userid allows them to access all their content. As with any website, you can log out as one user and log on as another.
For the app, is it customary or best practice to allow only one user for an installed app? In other words if someone has signed up once for an app, is it best practice to only allow that one userid and password to sign on and not let someone else come along and log in as a different user? Or is it customary to allow multiple people to log in and out as with website.
If just one user is allowed, I only have to support one profile on the app and one set of data locally so this would obviously be easier but just want to conform to normal practice.
Thank you
In general, if you are able to log in you should be able to log out as well. This is true for apps and web. It is a little more complex but not too much.
Log out can be put in a settings section and when that is clicked you destroy all of the local caches, take them back to the log in screen, and it essentially becomes a freshly installed app.

How to store data on the internet for an iOS App [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
So I know this is a pretty simple question, but I've looked through all of my iOS textbook and can't seem to find out how people do this. I just want to store and edit an array on the internet. That is, let's say all of the data for my application is stored in an NSMutableArray. Ignoring the complications that occur with people editing the array at the same time, how would I allow multiple people to go into my app and then through that app access and edit the NSMutableArray for others to see?
There are a ton of options here, some of which were listed by #Zaph. The most common scenario to share data between a ton of random users is to setup your own server to run an API that you app will be able to communicate with. This is commonly referred to as the "Backend". The solutions here are vast, written in many different languages and sometimes even provided by third parties services. My advice is to pickup a simple, easy to learn server-side setup like Ruby-on-Rails, then deploy test app on Heroku as they provide free accounts to play with.
In addition to the options #coneybeare provided some others include DropBox, Parse and Azure.
Dropbox requires each user so setup an account.
Parse and Azure have rather easy APIs but you will be paying past the free tier.

Resources