I updated one of my sample Xamarin Forms applications to the new Universal API and Xamarin.Forms 1.3.0.6286-pre4.
The main parts of the two projects:
//App.cs in XamlMaps (the PCL part)
namespace XamlMap
{
public class App : Application
{
public App ()
{
MainPage = new MainPage(); //Main page is a Xaml which holds a Label
}
protected override void OnResume()
{
Debug.WriteLine("OnResume");
base.OnResume();
}
protected override void OnSleep()
{
Debug.WriteLine("OnSleep");
base.OnSleep();
}
protected override void OnStart()
{
Debug.WriteLine("OnStart");
base.OnStart();
}
}
}
//AppDelegate.cs in XamlMaps.iOS
namespace XamlMap.iOS
{
[Register ("AppDelegate")]
public partial class AppDelegate : FormsApplicationDelegate
{
public override bool FinishedLaunching (UIApplication app, NSDictionary options)
{
Forms.Init();
LoadApplication (new App ());
return base.FinishedLaunching (app, options);
}
}
}
I removed all other dependencies except for Xamarin.Forms.
I am still receving the following error when I am trying to build for the device:
Error MT2002: Failed to resolve "System.Void UIKit.UICollectionView::set_DataSource(UIKit.UICollectionViewDataSource)" reference from "Xamarin.iOS, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065" (MT2002) (XamlPlayer.iOS)
When I run my projects on the simulator everything works just fine: the apps come up and everything works as before.
Any idea why Mtouch is failing on this one?