-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Xamarin Support #25
Comments
In principle, it should be possible to do this. Importantly, a PCL version should be built with the EMIT_IL flag disabled, as FsPickler by default uses dynamic methods for performance. Somebody actually mentioned on twitter some time ago that he was able to work with a custom FsPickler build on Xamarin. Ideally, I would like to see a portable build included with the nuget package. It should be possible to build a package on any platform and without Xamarin dependencies. I have included a Thoughts? |
PCL is probably the best path to go with this. You can't create PCL F# projects in Xamarin Studio, but of course we have Visual Studio to do that for us. When I get a chance, I'll look at a PCL build of FsPickler to see what's there and to see if it's do-able. |
I did some exploring on the PCL path. Seems there would need to be a good bit of re-writes to support PCL. While this is a preferred path, it will also take the longest. C:\Users\willsmith\Documents\GitHub\FsPickler\src\FsPickler.PCL\Utils\Utils.fs(11,33): error FS0039: The namespace 'Concurrent' is not defined It is much easier to have a platform specific DLL for iOS and Android. |
I think you have sufficiently proved that PCL is out of the question for FsPickler. The missing reflection types are essential for the library to work. Have you tried using a |
I believe the projects in my xamarin branch do not include any specific defines related to FsPickler. Because the projects do not have the "EMIT_IL" define, it is essentially a NoEmit build. |
Ok, but can it still work without having dependencies on Xamarin's SDK? |
It doesn't use anything iOS or Android specific. The two projects, Touch and Droid, must require their respective platform dependencies, such as MonoTouch and MonoDroid, in order to compile the platform specific library. |
Ah, understood. I will install the SDK as soon as I find the time to get a feel for the process myself. |
Right now, FsPickler isn't a PCL library and I don't know if it can be. It it can, it will be easy to have it work for Xamarin iOS + Android.
I have a prototype branch of FsPickler on Xamarin here: https://github.com/TIHan/FsPickler/tree/xamarin. It will only work if you have OSX and Xamarin Studio + iOS/Android SDKs installed. These are platform specific projects. Just open FsPickler.Mac.sln and look at the src directory. FsPickler.Touch + FsPicker.Droid.
I do not know what else is necessary for this to happen, but I figure, this is a good start.
The text was updated successfully, but these errors were encountered: