2

I am using xcode8 + swift3.1. My project is targeting iOS 8.0.

I would like to use SQLite framework directly without using 3rd party wrapper.

When I do:

import SQLite

I got compiler error that no such module 'SQLite'. Then, I followed the answer here for xcode8.1+Swift3 with following steps:

  1. I go to project's Build Phases
  2. I search for SQLite framework in "Link Binary With Libraries"

here, when I search for SQLite, I got:

enter image description here

As you can see, I got libsqlite3.tbd, under iOS 10.3 folder.

My question is, does it mean user with iOS prior to 10.3 not able to use my app because I am using iOS 10.3 SQLite framework? Does the folder name iOS 10.3 hint that?

(My project target is iOS 8.0)

Leem.fin
  • 40,781
  • 83
  • 202
  • 354
  • Sorry, just a comment and question passing through: Is it okay to use sqlite in iOS? I've been believing that here are only two kinds of databases or two kinds of persistence frameworks for iOS: Core Data and Realm. I know Core Data uses Sqlite though. – Glenn Posadas Oct 11 '17 at 15:02
  • @Glenn, I believe it is possible, but I just started to use it as you can see from my question:) – Leem.fin Oct 11 '17 at 15:03
  • I see. Why use it though? :D Anyways, I hope you get some answers soon. – Glenn Posadas Oct 11 '17 at 15:04
  • @Glenn, because I want to create my own lightweight wrapper. :) – Leem.fin Oct 11 '17 at 15:20
  • @Glenn I've been using SQLite in my iOS apps since 2009. It's fully supported. – rmaddy Oct 11 '17 at 15:23
  • 1
    `import SQLite3` works only in Xcode 9. In Xcode 8 and earlier you have to `#import ` in the bridging header file and add the library "manually". – See https://stackoverflow.com/a/28642293/1187415 for full instructions. (It only depends on Xcode, not on the iOS deployment target.) – Martin R Oct 11 '17 at 15:29
  • Wow awesome guys. – Glenn Posadas Oct 11 '17 at 15:33

0 Answers0