dotnet / dotnet/efcore

EF Core does not work for IOS when using SQLite

Open
#28,117 8 comments 1 reaction 0 assignees View on GitHub
area-adonet-sqlite blocked customer-reported
Dominant language
C#
Stars
14.8k
Forks
3.4k
PR merge metrics
PR metrics pending

Description

Dot net MAUI Blazor app:

IOS still needs extra work to work with SQL lite the follwoing needs adding:
In the project file add:

PackageReference Include="sqlite-net-pcl" Version="1.8.116"
PackageReference Include="SQLitePCLRaw.core" Version="2.1.0-pre20220207221914"
PackageReference Include="SQLitePCLRaw.bundle_green" Version="2.1.0-pre20220207221914"
PackageReference Include="SQLitePCLRaw.provider.dynamic_cdecl" Version="2.1.0-pre20220207221914"
PackageReference Include="SQLitePCLRaw.provider.sqlite3" Version="2.1.0-pre20220207221914"

And add the following line of code in app delegate
raw.SetProvider(new SQLite3Provider_sqlite3());

```C#
public class AppDelegate : MauiUIApplicationDelegate
{
protected override MauiApp CreateMauiApp()
{
raw.SetProvider(new SQLite3Provider_sqlite3());
return MauiProgram.CreateMauiApp();
}
}
```

This issues with the IOS platform has been going on for a long time and I am a bit sad that the GA release is worst than preview 13. Android and windows platforms work well

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.