0

I am creating an application in Xamarin Forms and I'll show graphs with OxyPlot, running the Hello World OxyPlot on Android and Windows Phone running, but I have a problem with IOS. When the emulator loads the application sends the following:

{System.IO.FileNotFoundException: Could not load file or assembly ‘OxyPlot.Xamarin.iOS’}

and the stack:

System.AppDomain.Load (assemblyRef={OxyPlot.Xamarin.iOS, Version=2015.1.889.0, Culture=neutral, PublicKeyToken=null}, assemblySecurity=(null)) in /Users/builder/data/lanes/1962/8b265d64/source/mono/mcs/class/corlib/System/AppDomain.cs:706

it seems that does not refer to Packete Oxyplot.xamarin.iOS but not how to solve it.

I have added Nuget pre-release of OxyPlot Xamarin Forms, in each platform. As I mentioned in android and windows phone (using visual studio) is working properly.

I appreciate your attention and stay tuned if more data is needed.

greetings

1 Answers1

0

Make sure you have https://www.nuget.org/packages/OxyPlot.Xamarin.Forms/ installed. Then, you need to initialize the OxyPlot renderers by adding the following call just before Xamarin.Forms.Forms.Init():

iOS: OxyPlot.Xamarin.Forms.Platform.iOS.Forms.Init();

Android: OxyPlot.Xamarin.Forms.Platform.Android.Forms.Init();

WinPhone: OxyPlot.Xamarin.Forms.Platform.WinPhone.Forms.Init();

OR

It's possible that assembly is cut because of Xamarin linker. Add:

var ignoreOxyplot = typeof(OxyPlot.Xamarin.Forms.Platform.iOS.PlotViewRenderer) in iOS project FinishedLaunching method.

See: http://forums.xamarin.com/discussion/comment/122219

Daniel Luberda
  • 7,374
  • 1
  • 32
  • 40
  • Thanks for replying, add typeof and brand me the following error: The type ‘OxyPlot.Xamarin.iOS.PlotView’ is defined in an assembly that is not referenced Consider adding a reference to assembly ‘OxyPlot.Xamarin.iOS’,Version=2015.1.889.0, Culture=neutral, PublicKeyToken=null’ – cronos1412 Jul 21 '15 at 18:26
  • Just remove all Oxyplot packages, dlls etc. Then add OxyPlot.Xamarin.Forms package. – Daniel Luberda Jul 22 '15 at 10:53
  • Hi, thanks for the information, the solution was to look for besides the Oxyplot.Xamarin.iOS.dll and add it as a new reference, it is already working! – cronos1412 Jul 23 '15 at 09:27
  • No problem. If it's working you can mark this question as answered. Thanks! – Daniel Luberda Aug 25 '15 at 09:32
  • 1
    It seems like the namespace `OxyPlot.Xamarin.Forms.Platform` does not exist in the current prerelease of Oxyplot.Xamarin.Forms ... for me this is not working. – Markus Weber May 19 '16 at 23:01