iOS App Preloaded Data Guidance [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 5 years ago.
Improve this question
I'm working on an app with quite a few images and general information about them. Are there any general guidelines about when it is a good idea to just bundle the data with your app and when it should just be downloaded on first run? When you should use Core Data and when just keyed archiving is sufficient? Or is there a better solution I haven't even considered?
I imagine that the data will be updated from time to time, but not frequently. I'd like the app to be able to download updates.
Kind of a vague question, and I apologize for that.

It depends on whether the initial data (images & information) is important and always the same.
If you wish to have it dynamically changed to whatever is updated on the server then you shouldn't bundle it within the app. On the other hand, if the initial data is trivial and you can just include it in the app.
Now if you wish to store the initial data locally in the app, given that the data is just images and theirs information, I would recommend to just use keyed archiving to keep things nice and simple.

Related

CloudKit | User deleting all iCloud data inside Settings also resets local core-data store? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I'm facing the problem below:
When the user decides to delete all iCloud data inside settings, automatically, all local core-data savings are deleted as well.
After some debugging, I could find out that this exactly happens after the first time I initialize an NSPersistentCloudKitContainer. So somehow the merge happens to reset the local data?
I have also made a dummy project using the NSPersistentCloudKitContainer. I could observe this behaviour as well, which makes me conclude that this happens by default?
Any help would be greatly appreciated. I could tell you the details if you wish, I just don't know what I should include.
Update
Could this be intended?
It says this action will also delete all data stored on this iPhone.
But what if the user only whats to clean some iCloud space?
Interesting
From testing many real-world applications - part of them shows the behavior of losing all local data as well. But there is also a decent amount of apps keeping the local data after the reset.
I also tested it with apples own Clips app. All local-data were gone as well.

How to save data and then share it with React Native? [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 2 years ago.
Improve this question
I am beginner to building Apps with React Native + Redux.
I am trying to create an App family budget. It's almost done.
BUT I have two questions for them who already created these kind of apps.
What is the best way to save data? I want to save it (data: expenses/dates/category etc) on devices iOS (not database) if it's possible. I think it does not take a lot of memory. I've read about AsyncStorage, but not sure about it. Is it still present after reloading App/Phone?
How to share data between two users? I want to make a function, like sharing the budget between family members.
I will be very grateful for the recommendations and suggestions, maybe even for some good articles with explanation.
Thanks!
If you are using redux, you can use redux-persist to store your state on devices.
To share data between devices, you probably need to implement a remote server (cloud), which receives budget changes and propagates them to other family members.

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!

How do I store persistent data on my iOS app using Swift? [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 6 years ago.
Improve this question
I'm developing an iOS app that is going to parse XML from an RSS feed of events and display the details of each event on a table view. Each event has a title, a description (optional), a date and a time. I am able to parse the XML data using NSXMLParser; however, I am not sure how I should store the data and make it so that it persists after the app is closed.
I have read that I can use NSCoder to persist the data but I am not sure if this is the best route forward.
Does anyone have any ideas or suggestions as to what I could do?
Any help is appreciated.
You have several options for persisting data.
NSUserDefaults are meant for user settings - small amounts of data. They seem unsuitable for what you have in mind.
NSCoding is quite a good way to store structured data without the overhead of a database, yet it is slow in comparison to core data.
Core Data is Apples ORM, which is quite powerfull but not as easy to wrap your head around.
I answered a similar question recently, which goes into more detail regarding NSCoding with a complete example and some links for further reading.

Storing Hundreds of Images [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 9 years ago.
Improve this question
I'm trying to determine what would be the best route to go for an app idea I have in regards to using a back-end service or not.
The app will not require any sign up / log in steps
The concept does have a part of taking a photo. For example, a photo could be taken every day, or multiple photos per day, equaling 365 + photos.
I'd like for the user to be able to view these photos at any time, and possibly export them all at once in some form (if that is possible) at any time.
What's the best way of doing this to have a good experience in the app?
I supposed you'd define a good experience in terms of photo storage by being quick. You really don't have many options. You could either write 365+ photos into your documents directory or write them into a CoreData store. I'd probably opt for the CoreData store, because I have a feeling you're going to have some metadata associated with the image.
Really though, this question is a bit too specific to your situation. See also Best way to store images in iOS

Resources