# Introduction

SCADE provides support of all necessary APIs, including Swift Foundation und linking of C libraries that are necessary for running SQLite.Swift:

** All your pure SQLite.swift code compiles and runs on Android without modifications **

Download Sourcecode

Please see the **UgSqliteSwift** project for the source code created in this chapter. See [Installing examples](🔗) for information on how to download the examples. The URL is https://github.com/scadedoc/UgExamples/tree/master/UgSwissClockDemo

# Add SQLite libraries and modulemap file

The use of SQLite and SQLite.Swift is straightforward and easy:

## 1. Setup directory structure

Add the following directory structure below <project_root>



## 2. Copy files

File location

Please find all files in Examples section on GitHub here https://github.com/scadedoc/UgExamples/tree/master/UgSqlLiteSwift/lib/android

  • Copy to **x86/libsqlite3.so** to ./lib/android/x86

  • Copy to **armeabi-v7a/libsqlite3.so** to ./lib/android/armeabi-v7a

  • Copy header file **sqlite3.h **to ./lib/include

  • Copy module map file **module.modulemap** to ./lib/include



Your directory should now look like this

(Script tags will be stripped)


# Add dependency for SQLite.Swift

Open your build file and add the dependency

  • Add GitHub Url **https://github.com/stephencelis/SQLite.swift**

  • Add from **0.11.5**

  • Add linkedLibrary **SQLite**

Your build.file should look similar to this now:

(Script tags will be stripped)


# Replace main.page.swift with sample code



# Run the project

You should see the following output in the console.

(Script tags will be stripped)