Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Migrating my app from PCL to .NET

$
0
0

I finally migrated my PCL (Portable) app which has been published for two years to .NET and thought I would share the experience. Just moving to .NET went smoothly for most things. The app is published to Android, iOS and UWP. I then updated packages and that's where the problems began. So here are some tips. My app uses SQLite databases and the sqlite-net-pcl broke when updating it's SQLite dependencies. So there I just deleted all the SQLite packages and reinstalled sqlit-net-pcl and let it install the compatible packages (currently not some of the 2.0 SQLite packages). So one has to be careful with batch updates because not everything is ready for prime time.

I offer printing in my app and the Android printing needs some serious updating. Older example code still works but warnings are given about the Xamarin Forms context however using a local context doesn't work ... yet. So I still use the older example code.

I allow the user to upload and download their database to Google Drive. Of course there is the Progress Dialog deprecation warning. Except the way I handle it the user could still cancel the download from the dialog. The fix there is going to take some experimentation given the way that API works.

At the moment most everything is working in the app except for one frustrating thing on UWP. The user can save PNGs of info and the designated folder is of course the Pictures Library on Windows. But I get a "access is denied" error. Now on the PCL version this worked fine. I can save text files to the Documents folder okay. The error is a NetCore error for UWP (Android works fine, haven't test the iOS version yet). Originally the error also occurred on text files but then I downgraded the NetCore package to the one used in my PCL version and text but not PNGs were writable. I also read through a number of reports about this error but nothing works so far. Annoying thing about the FilePicker is it actually doesn't go most of the time to the designated folder that's been set up. Seems like a bug and probably annoying to the user especially if they just saved a text file to Documents and then want to save a PNG and it opens again to Documents when it should open to the Pictures library. Any thoughts on this?


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>