Skip to content

Workarounds for Xamarin.iOS app with EFCore 2.0 #597

@bricelam

Description

@bricelam

Updated to current known issues and workarounds:

Good sample app link applying workarounds by @cwrea: https://github.com/cwrea/XamarinTodo/tree/master

Original Issue:

From @alexdrl on November 21, 2017 8:44

A Xamarin.iOS app with EFCore 2.0 needs a call to

SQLitePCL.Batteries_V2.Init();

If the call is not made, the app initialization throws this error message.

You need to call SQLitePCL.raw.SetProvider(). If you are using a bundle package, this is done by calling SQLitePCL.Batteries.Init().

Like explained here

Steps to reproduce

Xamarin.iOS project working with EFCore 2.0. Solution with a common .NET Standard project which shares code between iOS and Android, using PackageReference.

Further technical details

EF Core version: 2.0.0
Database Provider: Microsoft.EntityFrameworkCore.Sqlite
Operating system: iOS
IDE: Visual Studio 15.4

Copied from original issue: dotnet/efcore#10361

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions