mirror of
https://github.com/bitwarden/mobile
synced 2025-12-25 20:53:25 +00:00
iOS Core project to house common iOS code between app and extension
This commit is contained in:
@@ -20,6 +20,7 @@ using Plugin.Settings.Abstractions;
|
||||
using System.Diagnostics;
|
||||
using Xamarin.Forms;
|
||||
using Bit.App;
|
||||
using Bit.iOS.Core.Services;
|
||||
|
||||
namespace Bit.iOS
|
||||
{
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict/>
|
||||
<dict>
|
||||
<key>com.apple.security.application-groups</key>
|
||||
<array>
|
||||
<string>group.com.bitwarden.vault</string>
|
||||
</array>
|
||||
<key>keychain-access-groups</key>
|
||||
<array>
|
||||
<string>$(AppIdentifierPrefix)keychain.com.bitwarden.vault</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using Bit.App.Abstractions;
|
||||
|
||||
namespace Bit.iOS.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -119,7 +119,6 @@
|
||||
<Compile Include="Services\KeyChainStorageService.cs" />
|
||||
<Compile Include="Main.cs" />
|
||||
<Compile Include="AppDelegate.cs" />
|
||||
<Compile Include="Services\SqlService.cs" />
|
||||
<None Include="Entitlements.plist" />
|
||||
<None Include="Info.plist" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
@@ -238,6 +237,12 @@
|
||||
<Project>{b490c5da-639e-4994-abd2-54222b8a348e}</Project>
|
||||
<Name>App</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\iOS.Core\iOS.Core.csproj">
|
||||
<Project>{b2538ada-b605-4d6f-acd2-62a409680f84}</Project>
|
||||
<Name>iOS.Core</Name>
|
||||
<IsAppExtension>false</IsAppExtension>
|
||||
<IsWatchApp>false</IsWatchApp>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\iOS.Extension\iOS.Extension.csproj">
|
||||
<Project>{32f5a2d6-f54d-4da1-ae26-0a980d48f422}</Project>
|
||||
<Name>iOS.Extension</Name>
|
||||
@@ -361,9 +366,9 @@
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\..\packages\SQLitePCL.raw.0.8.6\build\Xamarin.iOS10\SQLitePCL.raw.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\SQLitePCL.raw.0.8.6\build\Xamarin.iOS10\SQLitePCL.raw.targets'))" />
|
||||
<Error Condition="!Exists('..\..\packages\Xamarin.Forms.2.2.0.31\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Xamarin.Forms.2.2.0.31\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets'))" />
|
||||
<Error Condition="!Exists('..\..\packages\SQLitePCL.raw.0.8.6\build\Xamarin.iOS10\SQLitePCL.raw.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\SQLitePCL.raw.0.8.6\build\Xamarin.iOS10\SQLitePCL.raw.targets'))" />
|
||||
</Target>
|
||||
<Import Project="..\..\packages\SQLitePCL.raw.0.8.6\build\Xamarin.iOS10\SQLitePCL.raw.targets" Condition="Exists('..\..\packages\SQLitePCL.raw.0.8.6\build\Xamarin.iOS10\SQLitePCL.raw.targets')" />
|
||||
<Import Project="..\..\packages\Xamarin.Forms.2.2.0.31\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets" Condition="Exists('..\..\packages\Xamarin.Forms.2.2.0.31\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" />
|
||||
<Import Project="..\..\packages\SQLitePCL.raw.0.8.6\build\Xamarin.iOS10\SQLitePCL.raw.targets" Condition="Exists('..\..\packages\SQLitePCL.raw.0.8.6\build\Xamarin.iOS10\SQLitePCL.raw.targets')" />
|
||||
</Project>
|
||||
Reference in New Issue
Block a user