Skip to content

Commit

Permalink
Update xamarin.md
Browse files Browse the repository at this point in the history
Documentation related to [dotnet/efcore #22559](dotnet/efcore#22559). May address [dotnet/efore #10963](dotnet/efcore#10963).
  • Loading branch information
JeremyLikness authored Sep 25, 2020
1 parent 805fba4 commit 640ef47
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions entity-framework/core/get-started/xamarin.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,23 @@ using (var blogContext = new BloggingContext())
}
```

## iPhone Configuration

Entity Framework Core sometimes generates dynamic code for performance reasons. This is not supported on the iOS platform and may cause the application to crash. The Xamarin team built an interpretor to handle these scenarios. It should be configured in your `.csproj` file in a `PropertyGroup`. Use a `Condition` to ensure the group is only valid for iPhone release builds:

```xml
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
</PropertyGroup>
```

Then add the `--interpreter` flag as an extra argument inside the group:

```xml
<CodesignExtraArgs>--interpreter</CodesignExtraArgs>
```

More information is available in the [interpreter repository](https://github.com/spouliot/interpreter).

## Next steps

In this getting started you have learned how to use a Xamarin.Forms application to access a SQLite database using Entity Framework Core.
Expand Down

0 comments on commit 640ef47

Please # to comment.