Firstly, it may be helpful for you to have the relevant environment details to rule out environmental factors:
Dev PC Environment
_______________________
Windows 10 Enterprise 64 Bit
Intel Core i7 3.40GHz 16GB RAM
Visual Studio Professional 2015 Version 14.0.25123.00 Update 2
Xamarin 4.0.3.214 (0dd817c)
Xamarin.iOS 9.6.1.8 (3a25bf1)
Macbook (Agent) Environment - used to build and simulate
______________________
OS X El Capitan Version 10.11.4
Simulator Version 9.3
Xcode Version 7.3 (7D175)
Looking through SO I can't resolve the issue via the following questions here, here and generally within the Xamarin documentation here.
I have experienced this error in Xamarin.iOS when building:
1>------ Build started: Project: App5.iOS, Configuration: Debug iPhone ------
1> Generated session id: 22824a3fd65b76ad8c03fd7694e35be1
1> Generated build app name: App5iOS
1> Connecting to Mac server 192.168.1.197...
1> C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(997,3): error :
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========
I have a ViewController named MainViewController which is blank, save for a UIButton named MenuButton
which my MainViewController.designer.cs says is correctly attributed as an [Outlet]
.
I CTRL + LEFT CLICKED
from MenuButton
in Main.storyboard
and correctly dragged to the NavigationDropdownViewController
which created the Segue. I named this segue NavigationMenuSegue
.
Within the Widget
tab I set the following:
If I choose either "Present As Popover" from the "Adaptive Segue" tree or the "Popover" from the "Deprecated Segues" tree, the build action encounters the error above.
Oddly, if I choose the "Present Modally" or "Push" options the drop down appears on clicking the MenuButton
- albeit in the wrong position! Essentially I want it to toggle as a popover with a caret pointing towards the menu button (this is what was asked of me!)
All I want is the drop down menu to appear below the MenuButton
much in the same style as a hamburger web based menu does... I am concerned that this is not an isolated issue according to Xamarin's Bugzilla here
In Xcode I could simply drop Views and work with .xibs to easily segue - I just don't seem to be understanding Xamarin's designer perhaps.
Here is my MainViewController.cs
partial class MainViewController : UIViewController
{
public MainViewController (IntPtr handle) : base (handle)
{
}
}
[Register ("MainViewController")]
partial class MainViewController
{
[Outlet]
[GeneratedCode ("iOS Designer", "1.0")]
UIButton MenuButton { get; set; }
[Outlet]
[GeneratedCode ("iOS Designer", "1.0")]
UIView MainView { get; set; }
void ReleaseDesignerOutlets ()
{
if (MenuButton != null) {
MenuButton.Dispose ();
MenuButton = null;
}
if (MainView != null) {
MainView.Dispose ();
MainView = null;
}
}
}
The NaviagationBarDropdownViewController.cs
[Register ("NavigationBarDropdownViewController")]
partial class NavigationBarDropdownViewController
{
[Outlet]
[GeneratedCode ("iOS Designer", "1.0")]
UIButton LogoutButton { get; set; }
[Outlet]
[GeneratedCode ("iOS Designer", "1.0")]
UIImageView LogoutIcon { get; set; }
// omitted the other [Outlet]s for the five other buttons in the view for brevity
[Outlet]
[GeneratedCode ("iOS Designer", "1.0")]
UIView NavigationBarDropdownView { get; set; }
void ReleaseDesignerOutlets ()
{
// omitted for brevity
}
}
Is the Popover Segue build error a bug in the framework or am I going down the wrong path entirely in creating what is a very simple Menu -> Dropdown UI pattern!
Thanks for taking the time to read this and contributing towards a solution - cause I can't afford to lose any more hair over this!
John