Skip to content

Commit

Permalink
Fixed up the sqlite-net packages to work for both ios and android
Browse files Browse the repository at this point in the history
  • Loading branch information
Programming-With-Chris committed Aug 17, 2022
1 parent 78708ee commit f011377
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 11 deletions.
2 changes: 1 addition & 1 deletion ShoppingList/Controls/CircularButton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public class CircularButton : GraphicsView, IGraphicsView

public CircularButton()
{
var drawable = new ShoppingList.Drawable.CircularButton();
var drawable = new ShoppingList.Drawable.CircularButtonDrawable();
this.Drawable = drawable;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace ShoppingList.Drawable;

public class CircularButton : IDrawable
public class CircularButtonDrawable : IDrawable
{
public Color StrokeColor { get; set; } = Colors.DarkGrey;

Expand Down
21 changes: 16 additions & 5 deletions ShoppingList/ShoppingList.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0-ios;</TargetFrameworks>
<TargetFrameworks>net6.0-ios;net6.0-android;</TargetFrameworks>
<!-- <TargetFrameworks>net6.0;net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>-->
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
<!--<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>-->
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
<!-- <TargetFrameworks>$(TargetFrameworks);net6.0-tizen</TargetFrameworks> -->

Expand Down Expand Up @@ -81,7 +81,7 @@
<None Remove="Tests\**" />
<None Remove="SQLiteNetExtensions" />
<None Remove="Microsoft.Data.Sqlite.Core" />
<None Remove="sqlite-net-static" />
<None Remove="sqlite-net-pcl" />
<None Remove="Drawable\" />
<None Remove="Resources\APIs\krogerapiconfig.json" />
<None Remove="Controls\" />
Expand All @@ -95,10 +95,11 @@
<ItemGroup>
<PackageReference Include="CommunityToolkit.Diagnostics" Version="8.0.0" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.0.0" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="7.0.0-preview.7.22376.2" />
<PackageReference Include="Microsoft.Maui.Graphics" Version="6.0.403" />
<PackageReference Include="SkiaSharp.Extended.UI.Maui" Version="2.0.0-preview.59" />
<PackageReference Include="sqlite-net-pcl" Version="1.8.116" />
<PackageReference Include="SQLiteNetExtensions" Version="2.1.0" />
<PackageReference Include="sqlite-net-static" Version="1.8.116" />
</ItemGroup>

<ItemGroup>
Expand Down Expand Up @@ -145,13 +146,23 @@

<ItemGroup>
<Folder Include="Resources\APIs\" />
<Folder Include="Drawable\" />
<Folder Include="Controls\" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="Resources\Images\plus_sign.png" />
</ItemGroup>

<!--<ItemGroup Condition="'$(TargetFramework)' == 'net6.0-android'">
<PackageReference Include="SQLitePCLRaw.lib.e_sqlite3.android">
<Version>2.1.0</Version>
</PackageReference>
<PackageReference Include="SQLitePCLRaw.provider.e_sqlite3.android">
<Version>1.1.14</Version>
</PackageReference>
</ItemGroup>-->

<ProjectExtensions><VisualStudio><UserProperties XamarinHotReloadDebuggerTimeoutExceptionShoppingListHideInfoBar="True" /></VisualStudio></ProjectExtensions>

<!-- <PropertyGroup Condition="$(TargetFramework.Contains('-ios'))">
<RuntimeIdentifier>ios-arm64</RuntimeIdentifier>
Expand Down
4 changes: 0 additions & 4 deletions ShoppingList/View/UserListDetails.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
x:Class="ShoppingList.UserListDetails"
Title="{Binding Title}">

<ContentPage.Resources>
<drawables:CircularButton x:Key="circularButton"/>
</ContentPage.Resources>

<Shell.BackButtonBehavior>
<BackButtonBehavior Command="{Binding GoBackToListScreenCommand}"
/>
Expand Down

0 comments on commit f011377

Please sign in to comment.