Reputation: 608
iOS and WP Blank app not rendered in Xamarin Forms PCL.
I have mapped my custom control in a PCL in the below project structure.
Control.XForms.
Control.XForms.Android
Control.XForms.iOS
Control.XForms.WindowsPhone
and the create another Blank app for Xamarin (portable) by attaching the above dlls.(in the below project structure)
Sample.XForms
Sample.XForms.Android
Sample.XForms.iOS
Sample.XForms.Windows.Phone.
I have my application code in App.Xaml in Sample.XForms
and added Control.XForms.dll
to it.
And added Control.XForms.Android.dll,Control.XForms.dll and customControl.dll
, similarly for the other platforms too.
Sample rendered in Android only, where in other platforms it shows empty screen.
Am i miss something.
Any suggestions will be helpful.
Thanks in advance.
Upvotes: 0
Views: 522
Reputation: 1268
It's possible that the assembly isn't being loaded, I'm also experiencing the same issue on iOS and Windows Phone. I solved it by loading the assembly by loading the renderer in the start-up pages of the WP and iOS projects. For example in your AppDelegate in iOS:
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{
new CustomControlRenderer(); //include assembly
// Any other FinishedLaunching code here..
}
I hope this solves your problem.
Upvotes: 1