1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-23 03:33:59 +00:00

cleanup proj files, added app group for shared db

This commit is contained in:
kspearrin
2016-06-24 19:01:44 -04:00
parent 96914b9bd8
commit 80f127dd7f
3 changed files with 118 additions and 165 deletions

View File

@@ -1,6 +1,7 @@
using System;
using System.IO;
using Bit.App.Abstractions;
using Foundation;
namespace Bit.iOS.Core.Services
{
@@ -9,8 +10,9 @@ namespace Bit.iOS.Core.Services
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 fileManager = new NSFileManager();
var appGroupContainer = fileManager.GetContainerUrl("group.com.8bit.bitwarden");
var libraryPath = Path.Combine(appGroupContainer.Path, "Library"); // Library folder
var path = Path.Combine(libraryPath, sqliteFilename);
Console.WriteLine(path);