A lightweight RESTful service for SQLite databases running on iOS devices. SQLiteREST provides a simple web UI that allows you to view and edit your device's SQLite database in real-time, making it extremely convenient for development and QA testing. No more manually exporting sandbox files to troubleshoot issues!
一个运行在 iOS 设备上的轻量级 SQLite RESTful 服务。SQLiteREST 提供了一个简单的 Web UI,让你可以实时查看和编辑设备上的 SQLite 数据库,这对于开发和 QA 测试来说非常方便。再也不用手动导出沙盒文件来排查问题了!
- 🚀 RESTful API: Access your SQLite database via HTTP endpoints
- 🌐 Web UI: Built-in web interface for browsing and editing database content
- 📱 Real-time Access: View and modify your database directly on the device
- 🔧 Development Tool: Perfect for debugging and QA testing
- 📦 Easy Integration: Simple CocoaPods installation
- 🔌 Universal Compatibility: Works with any SQLite3-based database
- iOS 13.0+
- Xcode 12.0+
- CocoaPods 1.10.0+
App |
Web UI |
SQLiteREST is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'SQLiteREST'Then run:
pod install- Import the framework:
import SQLiteREST- Get the shared server instance and start it:
let server = SQLiteRESTServer.sharedInstance()
// Optional: Set up log handler
server.logHandler = { message in
print("SQLiteREST: \(message)")
}
// Start the server on a port with your database path
let databasePath = // Your SQLite database file path
server.startServerOnPort(8080, withPath: databasePath)- Access the web UI by navigating to
http://<device-ip>:8080in your browser (make sure your device and computer are on the same network).
The example project demonstrates how to use SQLiteREST with the Northwind SQLite3 database. To run the example:
- Clone the repo
- Run
pod installfrom the Example directory - Open
Example/SQLiteREST.xcworkspace - Build and run the app
- Access the web UI at
http://<device-ip>:8080
SQLiteREST is designed for development and testing purposes only. DO NOT use it in production builds.
- Debug/Internal Testing Only: Always ensure SQLiteREST is only included in debug or internal testing builds. Use conditional compilation to exclude it from release builds:
#if DEBUG
let server = SQLiteRESTServer.sharedInstance()
server.startServerOnPort(8080, withPath: databasePath)
#endif-
No Structured Query Validation: The service does not perform structured query validation. Results may be incorrect, and database corruption is possible.
-
No Important Data: Never use SQLiteREST with databases containing important or sensitive data. Always use test databases or ensure you have proper backups.
-
Network Security: The server runs on your local network without authentication. Make sure you're on a secure network when using this tool.
For detailed API documentation, see api.md.
The example app uses the Northwind SQLite3 database as a sample database to demonstrate SQLiteREST's capabilities. The Northwind database is a classic sample database that includes customers, orders, products, employees, and more.
SQLiteREST is available under the MIT license. See the LICENSE file for more info.
Contributions are welcome! Please feel free to submit a Pull Request.

