Creating simple database for iOS application - ios

I'm planing to create an app for iOS which will be kind of informative application for public transport in my city. People will enter street name from where they want to get public transport and will get list of buses and minivans, which are traveling by that street.
My problem is that I'm just started developing for iOS and want to find easy method to create a database/table with simple information as streets name and bus numbers that will connected with those streets.
So basically I need to create database/table and an search-box which will be connected to that database.
From where I need to start? Thanks.
p.s. - sorry for my bad english ;)

SQLite is quite popular and supplied by Apple. This lets you manage your table, and allows most standard SQL queries. You can also link to Core Data if you want to treat your data as objects.
See the Apple overview
There are many tutorials to build a simple app with a table view using SQLite, e.g. here or here
I found the Stanford University videos a good way to learn this stuff, e.g. here on YouTube or there are later versions available in iTunes U.

Yep, for an on-phone database SQLite is the way to go for a full-featured database, or Core Data if you want some "hand holding". And, of course, if you don't need persistence you can make a pretty good database simply using NSMutableDictionary and maybe a few custom classes.

Learn to use CoreData. Its not there to "hand hold" you, its there to provide a complex and optimized ORM interface for the underlying SQLite database-- there are a number of optimizations implemented to improve efficiency. You could pick it up in a night following tutorials and online instructions.

Related

Apple ResearchKit: how to extract information from ORKResult? First time programmer

I'm working on a simple ResearchKit app that has 20 survey questions, or ORKSteps. How do I get the answers from a participant who submits the survey into a database?
My research has found ORKESerializer and SQLite as potential parts of the solution. I'm missing a big picture view of how these things can be integrated into a working solution.
Starting without knowledge of databases or data transfer from Swift, so any basic information would be very helpful.
How do I extract data from ORKResult using Swift?
Where do I extract the data to? Or, what's the standard type of database for a small survey?
ResearchKit doesn't have any out-of-the-box solution for storing your results. Generally, it's the task of the developer to go through the ORKResult hierarchy and either persist the processed results for later access or send them to a remote server.
You have several options here:
Use NSCoding to store the vanilla ORKTaskResult (with their ORKResult children). This way you can recreate the whole ORKTaskResult hierarchy at later time to inspect or process it.
Use ORKESerializer (as you guessed) to serialize ORKResults into the JSON format. ORKESerializer is currently included as part of ORKTest's unit tests, and it's not documented very well. It's possible that it will be moved to ResearchKit proper in the future, but it's completely usable right now. The JSON format is particularly useful if you want to send your results to any remote server of your own.
You can manually iterate through ORKResults and convert them into objects that are suitable for storing, or into database records. As you said, you could persist them using SQLite; or other database of your choice; or Core Data.
To sum up, there's no recommended or standard method for persisting results, it depends on your needs.
You can also have a look at the official open sourced RK apps. I think they make use of the AppCore library (which sits on top of the ResearchKit) to store the task results (and also use the Sage Bridge to send the results to Sage's servers). But that may be overboard if your needs are simpler.
I suggest that you run the sample ORKCatalog app and then inspect the ORKTaskResult hierarchy (you can do that within the app itself). You'll get an idea of how the result hierarchy looks.
I do not have experience with the Research Kit but as a database you could use sqlite. stephencelis has made a great wrapper for swift which you can use.

Basics of simple text data collection iOS apps. Where is the data stored?

I'm trying to inch my way towards building a data collection app for a specific application. Eventually I want to have drop-down and manual text entries, building a dataset that I can export as a CSV and manipulate further in Excel.
I've used some apps like Fulcrum, but eventually I'd like to add some more functionality to the app. Basically I'm trying to figure out how these apps are storing the entered data, then pushing it to a server when internet access is available. What are some general options that I should explore to do this magic?
Thank you!
You can store data with Core Data, you can use the native API's and methods or external libraries which will make a lot easier all the work, such as Magical Record and more.
If you want native I recommend you AppCoda tutorials, you need to do a lot of research to start with core data.
And also you can use an external library to store this info into a server or in the cloud.
I've heard Parse is great.
Hope it helps.

Implementation of articulate

I am looking at Articulate to support my own application. I want my users to be able to use Articulate to create the E-learning and then uploading the files to my site and run it on my site.
However i wish to store both the questions and the answers of the quiz that is created in articulate.
Does anyone know how this is possible or know a way around either by using excel or any other software to store the Q/A?
There may be more than one answer. But Articulate is SCORM compliant. It is designed to return test scores to the server using SCORM. I have not been involved with receiving those test scores by acting as an LMS, but in the past I have made custom applications that send that data to the LMS using scorm. But if you research SCORM and other APIs they use you might find something useful.
For example, if you mean Articulate Storyline then you can test send/receiving data using this package:
http://www.articulate.com/support/storyline/how-to-use-the-scorm-test-suite
This shows that it can be done. But you would have to write your own program to communicate with Storyline. If you can duplicate how that package works you might be on your way.
As an alternative to SCORM, you can also use the xAPI see https://xapi.com/overview/ to store your e-learning data

iOS: Data Driven Drilldown Reference App

I'm looking to create a reference app for iOS that drills-down through categories to display a Detail viewcontroller containing the topic information.
I've been studying Xcode for a while but can't quite find the advice I need to focus my study in this area.
The drill-down will be, at most, 5 levels. What is the best database technology to use for something quite low level?
What should I be targeting in my searches to find tutorials that can help me in this specific area?
Use Core Data backed by a SQL or XML repository. Many tutorials on the Apple sites as well as other sites.

SQLite or CoreData [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Use CoreData or SQLite on iPhone?
I would like to build an App which enables you too find stores (for example stores with your favourite shoe brand) even when you're not connected with WiFi or 3G.
For now the App should have a couple of possibilities:
User selects his favourite brand and gets a list of nearby stores. After that the user must be able to select a store to get the address, contact information and maybe a map;
User selects a certain city, gets a list of the available brands, selects one and gets a list of stores in that city selling the selected brand.
Since I'm new to making this kind of Apps, I have started doing my homework. I know I have to use a database to store all the data and found out there are a lot of ways to do so. One of them, creating a MySQL Database, wouldn't be an option since it can't be used offline. If I'm right two other methods are SQLite or CoreData.
Problem is, I'm getting kinda lost in all the available information which makes it hard for me to start. Are both methods possible for this App and which one is the easiest for this job?
I was hoping someone could point me in the right direction and maybe give me an usefull link or tutorial to continue with my App.
Thanks in advance! :)
Only use SQLite if you already know it, or you know that your use case is one of the rare few that has proven difficult for Core Data.
Thus, I would think your decision is simple. Use Core Data. It's extremely simple, unless you start updating data from multiple threads/contexts at the same time, then it gets pretty hairy relatively quickly.
There are tons of tutorials available online for Core Data, and ou always have Apple's documentation and sample code on their developer web site.
If you've never used MySQL or SQLite, just use CoreData. But if you have used MySQL or SQLite, i would recommend using SQLite as it will be easy for you to understand and thus you will be able to develop your app faster.

Resources