IOS | Storing blog posts for reading later - ios

I'm rather new to IOS but i managed to get my app to display a list of blog posts from RSS feeds. I would like to give my users the ability to save the blog posts for reading later when they might not have an internet connection.
I will do this through a setting in the settings bundle. I do not however know what the best way is to store blog posts within my app. I am already using core data, would this be a good option for it?

If you are already using a persistence option then use it for everything, don't mix and match.
If you are already using Core Data then yes it makes sense to keep using it throughout the application for consistency and maintainability.

Related

how to create a flutter app like wikipedia

I'm trying to create a Flutter app like wikipedia where a user can search and display the information but I'm don't have a lot of backend knowledge so it'll be appreciated if someone can guide me what I should do or learn in order to start this project.
The reason I'm trying to build this app is for my ethnic group. I want to have an app where we can read articles/information in our own language.
My goals is basically get all the article or documents about our cultures from other people and store in one database and display it in my app.
I'm not really sure where will be the best place to store all the article and retrieve that in Flutter. I've been looking Firebase but I'm not really sure if I can store the whole articles and display it.
Just to give you an idea, this is minipedia app and I'm thinking about creating an app just like this.
Any suggestion will be really helpful. thanks
You can use Firebase Firestore for this project. I've used FB before and to the best of my knowledge, there shouldn't be any problem with doing what you mentioned above.
I've been looking Firebase but I'm not really sure if I can store the whole articles and display it.
Yes, you can store whole articles on Firestore and retrieve them whenever you need them. Each document has a maximum limit of 1MB, which is approximately 1 million characters but should you need more space(which I highly doubt), you can always separate your articles into chunks.

Firebase chat backup/export like whatsapp in SWIFT

i implemented a chat app in swift using firebase real time db, there user can send images, emojis and Text.Now i have a requirement of export chat or get the conversation's backup with media and text as per whatsApp.help me to solving it out.
While Firebase offers a backup for the Realtime Database, this doesn't fit your needs here, since you'll want a per-user export of the data.
Since this is specific to your application, you will have to code it yourself, just like the good folks at WhatsApp have probably done. It should be a matter of iterating over all data sources for the user, getting the data through the relevant API (that you're already using to display that data), and then writing to a local file). You can do this either client-side in your Swift code, or server-side on a server you already may have, or using Cloud Functions.
If you're looking for some inspiration for the latter, there is a sample repository that shows how to clean up a user's data, based on a set of wipe-out rules. You'll need to significantly modify this example though, so I'm not convinced this will be less work than rolling your own from scratch.

Best option for storing external database for iOS app

I am working on an app that will access an external database that needs to be able to load quickly. This is our own database, and the issue is where to store it for the fastest loading time. Currently, the database resides on a wpengine website, but it loads very slowly. One option is uploading a .plist file sporadically to the user's app when new data is available; it seems like that might not be very secure - although it would probably make accessing the data lightning fast. I was thinking that possibly CloudKit shared storage would be the best place to store the data if I wanted to keep it fast and also keep users from viewing it directly. I would appreciate any thoughts or suggestions.
As far as I understand, CloudKit will be OK for you. You can have a look at NSHipster's excellent summary here.
You also have a link to a tutorial in the comments above. If you want to discuss it further, don't hesitate to contact me through chat.

Tagging in ios development

I'm an absolute newbie on iOS Development at the minute so please pardon me if this seems like such a simple question to ask.
I want to build a project - almost like a note taking application - in which the user will be able to associate tags to their inputs. I'm sure many have seen them before - it's used in things like hashtags, or to give an example of an iOS app - Journalling apps like DayOne have it. It's basically used to generate tags for easy retrieval of a particular article.
My question is - how do you go about creating these kinds of tags? Particularly - how do you implement the tagging system that can generate custom tags for articles in the app?
Is it something that is built into Cocoa/SDK or do i have to look at something more complex like Core Data (NSPredicates) to learn how to create something like that?
OR is it something that has to be done programatically rather than a built in system in SDK?
Thanks.
In a super simple form (i.e. there are many ways you can build on this to make it scalable):
If each note is text, create an object with properties for the text and the tags
Make the tags property an array of strings
Store the notes in an array initially (archive to save to disk, or just practice with a non-saved version)
Make the user enter the tags (auto-tagging is an interesting topic...)
Consider using a token field (google for 3rd party implementations) for tag entry
Now, when a user starts a search for tagged content, iterate through each of the notes you have and run a predicate on the tag array. This could be done using NSPredicate, or you could ensure that all tags are saved in lower case and, to start with, require exact matching - so you could use '[tagArray containsObject:userEnteredTag];`
Then:
Look at real predicates
Look at Core Data (or SQLite if you love it)
You will need to use Core Data or SQLite3. Personally I would use SQLite but it is down to preference. I have used both but if you have any SQL knowledge then I wouldn't use Core Data. Having created an app with CoreData and using a lot of NSPredicates I found that the app had a lot of bug that appeared over time.
I changed it to use SQLite and now it runs perfectly.
As you are new to iOS I would recommend you take a look at Ray Wenderlich's tutorials. I learnt a lot from there.
http://www.raywenderlich.com/913/sqlite-tutorial-for-ios-making-our-app

How to make iOS client synchronize craigslist-like data

I'm curious what would be the best approach for synchronizing data found on a website like craigslist where an API is not available.
Let's say you have already downloaded a set of posts. When you want to update the posts, what is the best way to compare what you already have with what is there, and then determine which ones are new to download and which ones should be deleted because they no longer exist on the server?
Please note my question isn't specific to craigslist, as this is just an example. I'm interested in general principles/techniques with specific regards to iOS.

Resources