Book Image

Learning SQLite for iOS

By : Gene Da Rocha
Book Image

Learning SQLite for iOS

By: Gene Da Rocha

Overview of this book

The ability to use SQLite with iOS provides a great opportunity to build amazing apps. Apple's iOS SDK provides native support for SQLite databases. This combination offers the potential to create powerful, data-persistent applications. This book starts with the architecture of SQLite database and introduces you to concepts in SQL . You will find yourself equipped to design your own database system, administer it, and maintain it. Further, you will learn how to operate your SQLite databases smoothly using SQL commands. You will be able to extend the functionality of SQLite by using its vast arsenal of C API calls to build some interesting, exciting, new, and intelligent data-driven applications. Understand how Xcode, HTML5, and Phonegap can be used to build a cross-platform modern app which can benefit from all these technologies - all through creating a complete, customizable application skeleton that you can build on for your own apps.
Table of Contents (15 chapters)
Learning SQLite for iOS
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Creating a simple Swift


With the advent of Swift and Swift2, there is the use of an environment called a playground now. It is a place where you can set up a quick environment with some code and then see the results. It is a quick, new way to use the new setup. When you start, it will have a main window and the results on the second, split one.

In Xcode, navigate to New | Playground and the following screenshot will be shown. Give a name to your playground. You can have several running of them under different platforms, so a meaningful name would be useful:

Once this is created and the Next button is clicked on, the following screen will appear. Here, you can create the code, test ideas and code snippets, and just try it out. It is a great and simple idea, which will help motivate existing developers, and create new developers for the future:

As you can see from the preceding screenshot, there is a split page on the right-hand side, which can be adjusted as per requirement. The code appears...