From 474ce458bfc3fb40285446e7bbcb9f446e81e224 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 8 Apr 2019 21:38:17 -0400 Subject: [PATCH] ios core lib --- bitwarden-mobile.sln | 29 +++++++- src/iOS.Core/Properties/AssemblyInfo.cs | 35 ++++++++++ .../Services/CryptoPrimitiveService.cs | 2 +- .../Services/KeyChainStorageService.cs | 2 +- src/iOS.Core/iOS.Core.csproj | 67 +++++++++++++++++++ src/iOS.Core/packages.config | 4 ++ src/iOS/iOS.csproj | 11 ++- 7 files changed, 145 insertions(+), 5 deletions(-) create mode 100644 src/iOS.Core/Properties/AssemblyInfo.cs rename src/{iOS => iOS.Core}/Services/CryptoPrimitiveService.cs (98%) rename src/{iOS => iOS.Core}/Services/KeyChainStorageService.cs (99%) create mode 100644 src/iOS.Core/iOS.Core.csproj create mode 100644 src/iOS.Core/packages.config diff --git a/bitwarden-mobile.sln b/bitwarden-mobile.sln index a2c3b52a2..5691f2367 100644 --- a/bitwarden-mobile.sln +++ b/bitwarden-mobile.sln @@ -11,12 +11,14 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "App", "src\App\App.csproj", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Core", "src\Core\Core.csproj", "{4B8A8C41-9820-4341-974C-41E65B7F4366}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Playground", "test\Playground\Playground.csproj", "{9C8DA5A8-904D-466F-B9B0-1A4AB5A9AFC3}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Playground", "test\Playground\Playground.csproj", "{9C8DA5A8-904D-466F-B9B0-1A4AB5A9AFC3}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{D10CA4A9-F866-40E1-B658-F69051236C71}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{8904C536-C67D-420F-9971-51B26574C3AA}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "iOS.Core", "src\iOS.Core\iOS.Core.csproj", "{E71F3053-056C-4381-9638-048ED73BDFF6}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Ad-Hoc|Any CPU = Ad-Hoc|Any CPU @@ -189,6 +191,30 @@ Global {9C8DA5A8-904D-466F-B9B0-1A4AB5A9AFC3}.Release|iPhone.Build.0 = Release|Any CPU {9C8DA5A8-904D-466F-B9B0-1A4AB5A9AFC3}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU {9C8DA5A8-904D-466F-B9B0-1A4AB5A9AFC3}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {E71F3053-056C-4381-9638-048ED73BDFF6}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU + {E71F3053-056C-4381-9638-048ED73BDFF6}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU + {E71F3053-056C-4381-9638-048ED73BDFF6}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU + {E71F3053-056C-4381-9638-048ED73BDFF6}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU + {E71F3053-056C-4381-9638-048ED73BDFF6}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU + {E71F3053-056C-4381-9638-048ED73BDFF6}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU + {E71F3053-056C-4381-9638-048ED73BDFF6}.AppStore|Any CPU.ActiveCfg = Release|Any CPU + {E71F3053-056C-4381-9638-048ED73BDFF6}.AppStore|Any CPU.Build.0 = Release|Any CPU + {E71F3053-056C-4381-9638-048ED73BDFF6}.AppStore|iPhone.ActiveCfg = Release|Any CPU + {E71F3053-056C-4381-9638-048ED73BDFF6}.AppStore|iPhone.Build.0 = Release|Any CPU + {E71F3053-056C-4381-9638-048ED73BDFF6}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU + {E71F3053-056C-4381-9638-048ED73BDFF6}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU + {E71F3053-056C-4381-9638-048ED73BDFF6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E71F3053-056C-4381-9638-048ED73BDFF6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E71F3053-056C-4381-9638-048ED73BDFF6}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {E71F3053-056C-4381-9638-048ED73BDFF6}.Debug|iPhone.Build.0 = Debug|Any CPU + {E71F3053-056C-4381-9638-048ED73BDFF6}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {E71F3053-056C-4381-9638-048ED73BDFF6}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {E71F3053-056C-4381-9638-048ED73BDFF6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E71F3053-056C-4381-9638-048ED73BDFF6}.Release|Any CPU.Build.0 = Release|Any CPU + {E71F3053-056C-4381-9638-048ED73BDFF6}.Release|iPhone.ActiveCfg = Release|Any CPU + {E71F3053-056C-4381-9638-048ED73BDFF6}.Release|iPhone.Build.0 = Release|Any CPU + {E71F3053-056C-4381-9638-048ED73BDFF6}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {E71F3053-056C-4381-9638-048ED73BDFF6}.Release|iPhoneSimulator.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -199,6 +225,7 @@ Global {EE44C6A1-2A85-45FE-8D9B-BF1D5F88809C} = {D10CA4A9-F866-40E1-B658-F69051236C71} {4B8A8C41-9820-4341-974C-41E65B7F4366} = {D10CA4A9-F866-40E1-B658-F69051236C71} {9C8DA5A8-904D-466F-B9B0-1A4AB5A9AFC3} = {8904C536-C67D-420F-9971-51B26574C3AA} + {E71F3053-056C-4381-9638-048ED73BDFF6} = {D10CA4A9-F866-40E1-B658-F69051236C71} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {7D436EA3-8B7E-45D2-8D14-0730BD2E0410} diff --git a/src/iOS.Core/Properties/AssemblyInfo.cs b/src/iOS.Core/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..86b194178 --- /dev/null +++ b/src/iOS.Core/Properties/AssemblyInfo.cs @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("BitwardeniOSCore")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("8bit Solutions LLC")] +[assembly: AssemblyProduct("Bitwarden")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("50c7b8c9-e664-45af-b88e-0c9b8b9c1be1")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/iOS/Services/CryptoPrimitiveService.cs b/src/iOS.Core/Services/CryptoPrimitiveService.cs similarity index 98% rename from src/iOS/Services/CryptoPrimitiveService.cs rename to src/iOS.Core/Services/CryptoPrimitiveService.cs index aba0d993f..93cb6d97c 100644 --- a/src/iOS/Services/CryptoPrimitiveService.cs +++ b/src/iOS.Core/Services/CryptoPrimitiveService.cs @@ -4,7 +4,7 @@ using Foundation; using System; using System.Runtime.InteropServices; -namespace Bit.iOS.Services +namespace Bit.iOS.Core.Services { public class CryptoPrimitiveService : ICryptoPrimitiveService { diff --git a/src/iOS/Services/KeyChainStorageService.cs b/src/iOS.Core/Services/KeyChainStorageService.cs similarity index 99% rename from src/iOS/Services/KeyChainStorageService.cs rename to src/iOS.Core/Services/KeyChainStorageService.cs index fa44bbce9..ace993d47 100644 --- a/src/iOS/Services/KeyChainStorageService.cs +++ b/src/iOS.Core/Services/KeyChainStorageService.cs @@ -8,7 +8,7 @@ using Newtonsoft.Json; using Newtonsoft.Json.Serialization; using Security; -namespace Bit.iOS.Services +namespace Bit.iOS.Core.Services { public class KeyChainStorageService : IStorageService { diff --git a/src/iOS.Core/iOS.Core.csproj b/src/iOS.Core/iOS.Core.csproj new file mode 100644 index 000000000..3a19e51bc --- /dev/null +++ b/src/iOS.Core/iOS.Core.csproj @@ -0,0 +1,67 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {E71F3053-056C-4381-9638-048ED73BDFF6} + {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + {a52b8a63-bc84-4b47-910d-692533484892} + Library + Bit.iOS.Core + Resources + BitwardeniOSCore + + + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + + + full + true + bin\Release + prompt + 4 + false + + + + ..\..\packages\Newtonsoft.Json.12.0.1\lib\netstandard2.0\Newtonsoft.Json.dll + + + + + + + + + + + + + + + + + {ee44c6a1-2a85-45fe-8d9b-bf1d5f88809c} + App + + + {4b8a8c41-9820-4341-974c-41e65b7f4366} + Core + + + + + + + \ No newline at end of file diff --git a/src/iOS.Core/packages.config b/src/iOS.Core/packages.config new file mode 100644 index 000000000..dabb475f5 --- /dev/null +++ b/src/iOS.Core/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/iOS/iOS.csproj b/src/iOS/iOS.csproj index 9ba949d92..c1a5914e6 100644 --- a/src/iOS/iOS.csproj +++ b/src/iOS/iOS.csproj @@ -92,8 +92,6 @@ - - @@ -166,5 +164,14 @@ {4b8a8c41-9820-4341-974c-41e65b7f4366} Core + + {e71f3053-056c-4381-9638-048ed73bdff6} + iOS.Core + false + false + + + + \ No newline at end of file