This is an adapted version of the Xamarin.Forms Todo sample (repository), with the following key changes:
-
Instead of using the SQLite.Net PCL ORM for accessing SQLite, this version uses Entity Framework Core (repository), since EF Core recently started working on Xamarin.iOS. Jon Douglas' post and sample Building Android Apps with Entity Framework informed on this.
-
Instead of a Portable Class Library (PCL), app shared code is contained in a .NET Standard 1.4 library project. Oren Novotny's post on Using Xamarin Forms with .NET Standard — VS 2017 Edition informed on this.
-
For iOS in particular, the project is configured for "Link Framework SDKs Only", as opposed to not linking. Notice the LinkDescription.xml includes some reflected types referenced by EF Core at runtime. Intersoft's post Configure Linker in Production-Ready Application Release Build informed on this.
The sample app projects compile for and run successfully on each of Android, iOS, and UWP physical devices.
You can use either Visual Studio 2017 (PC) v15.2+ or Visual Studio 2017 for Mac v7.0+ to open the solution and compile the apps; of course, the UWP project only compiles in the PC edition.
I posted about this at the Xamarin Cross Platform with Xamarin forum and welcome comments there.
Regards,
Chris W. Rea
@cwrea
This adapted sample inherits the Apache License 2.0 from the original sample:
Copyright 2011 Xamarin Inc
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Original README.md follows:
This sample demonstrates a Todo list application where the data is stored and accessed in a local SQLite database.
The app functionality is:
- View a list of tasks.
- Add a new item to the list of tasks.
- Set a task's status to 'completed'.
In all cases the tasks are stored in a local SQLite database.
For more information about the sample see Working with a Local Database.
Craig Dunn, Bryan Costanich