Book Image

Swift Cookbook

By : Cecil Costa, Cecil Costa
Book Image

Swift Cookbook

By: Cecil Costa, Cecil Costa

Overview of this book

Table of Contents (18 chapters)
Swift Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Using your old address book


In this recipe, we will learn how to use C code inside a Swift project. In this case, let's imagine that we want to recycle one linked list of an address book written in C, this way, we can read the contact from the device's address book and store it into a file. The advantage of storing structures on a file is that you can open the same file using other platforms that don't have Swift, such as Linux or Windows.

Getting ready

Create a new project called Chapter 9 Address Book, and ensure that this project is a Swift project.

We can see that the new file will be created inside an application subfolder. As you know, we can't see any device application folders without using a third-party application. In this case, we will download an application called iFunBox, which can explore our device files. This application can be downloaded for free from http://www.i-funbox.com/. However, if you prefer, there are other free apps and commercial apps like iBrowser and iPad Folder...