mirror of
https://github.com/bitwarden/mobile
synced 2025-12-23 03:33:59 +00:00
iOS Core project to house common iOS code between app and extension
This commit is contained in:
23
src/iOS.Core/Services/SqlService.cs
Normal file
23
src/iOS.Core/Services/SqlService.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using Bit.App.Abstractions;
|
||||
|
||||
namespace Bit.iOS.Core.Services
|
||||
{
|
||||
public class SqlService : ISqlService
|
||||
{
|
||||
public SQLite.SQLiteConnection GetConnection()
|
||||
{
|
||||
var sqliteFilename = "bitwarden.db3";
|
||||
var documentsPath = Environment.GetFolderPath(Environment.SpecialFolder.Personal); // Documents folder
|
||||
var libraryPath = Path.Combine(documentsPath, "..", "Library"); // Library folder
|
||||
var path = Path.Combine(libraryPath, sqliteFilename);
|
||||
|
||||
Console.WriteLine(path);
|
||||
var conn = new SQLite.SQLiteConnection(path);
|
||||
|
||||
// Return the database connection
|
||||
return conn;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user