I did some search about using database in swift, I found many subject with SQLLite but they use librairies from GitHub and other, but I want to know if they're something built-in on iOS Swift, because I don't want to use librairies.
-
You can use core data provided by ios SDKRatul Sharker– Ratul Sharker2016-01-06 10:57:40 +00:00Commented Jan 6, 2016 at 10:57
-
@RatulSharker I'm gonna do search I think it's new on Swift2 no ?Ben– Ben2016-01-06 10:59:11 +00:00Commented Jan 6, 2016 at 10:59
-
@Ben it has been there for very long time already...but it need to write pretty a lot of extra code, i recomend Realm, its fast and its easyTj3n– Tj3n2016-01-06 11:06:07 +00:00Commented Jan 6, 2016 at 11:06
-
Actually I used core data in swift 2.0 project but written in objective-c and bridged it to swift.Because swift can't work well with C APIs.Lumialxk– Lumialxk2016-01-06 11:09:01 +00:00Commented Jan 6, 2016 at 11:09
-
Just to be clear, SQLite is completely built-in to iOS. Easy tutorial: raywenderlich.com/123579/sqlite-tutorial-swift Also, there is a very popular wrapper for SQLite: github.com/stephencelis/SQLite.swiftFattie– Fattie2016-12-12 08:52:37 +00:00Commented Dec 12, 2016 at 8:52
3 Answers
Why don't you use Coredata? I haven't tried swift yet, but I'm sure it will be similar to using it with Objective-C.
2 Comments
I've coredata book link - this book will have swift/Objective-C both, You can refer it and integrate on your project. I've read this book and learned from it thoroughly, in this you will also find how to add coredata in existing project. I hope this will help you through. enter link description here
Comments
There are database available for iOS like CoreData, RealM, SQLite, etc.
CoreData is a ObjectGraph DataStore, based on SQLite,
Coredata is easy to learn, understand and implement as compared to SQLite syntax.
Use CoreData. Follow this awesome tutorial http://www.raywenderlich.com/115695/getting-started-with-core-data-tutorial