Bug 26782 - ViewRenderer<TView,TNativeView> from Xamarin.Forms.Platform.iOS.Classic can't be inherited in Unified API iOS project
Summary: ViewRenderer<TView,TNativeView> from Xamarin.Forms.Platform.iOS.Classic can't...
Status: RESOLVED INVALID
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.3.3
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-02-05 13:06 UTC by Sten
Modified: 2015-02-05 14:42 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED INVALID

Description Sten 2015-02-05 13:06:09 UTC
Custom view renderer can't compile in unified api iOS project because ViewRenderer<TView, TNativeView> and a few other classes refer to non-unifield api classes


In an iOS project I have a custom view renderer:

  public class InteractiveContentViewRenderer : ViewRenderer<InteractiveContentView, UIView>

on the line of class declaration shown above the compiler gives this error:

/Users/Sten/Documents/Projects/Auditor/Mobile/iOS/Forms/Gestures/InteractiveContentViewRenderer.cs(51,51): Error CS0012: The type `MonoTouch.UIKit.UIView' is defined in an assembly that is not referenced. Consider adding a reference to assembly `monotouch, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065' (CS0012) (BradyVOC.iOS)


Using the assembly browser in Xamarin Studio I navigate to the ViewRenderer<T,N> definition:


  namespace Xamarin.Forms.Platform.iOS
  {
	public abstract class ViewRenderer<TView, TNativeView> 
             : VisualElementRenderer<TView> where TView : View where TNativeView : UIView // THIS UIView is Monotouch.UIKit.UIView
 	{
  ...
  }

The same issue exists in EventTracker.GetNativeRecognizer(), ScrollViewRenderer and ImageViewRenderer (and possibly other renderers)
 

From there I click on the UIView definition and noticed it has "Monotouch.UIKit" namespace

namespace MonoTouch.UIKit
{
	[Register("UIView", true)]
	public class UIView : UIResponder, IEnumerable, INSCoding, IUIAccessibilityIdentification, IUICoordinateSpace, IUIDynamicItem, IUITraitEnvironment, INativeObject, IDisposable
	


This issue prevents me from publishing the app