0

Working on a swift project, I wanna use sqlite3 for data base. I have read many articles in which they used to follow FMDB.Instead of using that, is there any other alternate ways ??
In Objective C, they created instance for sqlite3 which is declared as typedef struct like

sqlite3 *db;


and they used this instance through the program to access the database.
Similarly how can I create an instance for typedef struct in Swift ?????

0

1 Answer 1

0

This is the structure type in Swift

struct sqlite3 {
    var width = 0
    var height = 0
}

And instance example:

var db: sqlite3 = sqlite3()
Sign up to request clarification or add additional context in comments.

2 Comments

I can able to create instance for struct but I can't able to do for typedef struct
I think this might help you: stackoverflow.com/questions/24077428/…

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.