Bug 34079 - cannot find protocol declaration for 'UIBarPositioningDelegate'
Summary: cannot find protocol declaration for 'UIBarPositioningDelegate'
Status: RESOLVED ANSWERED
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: XI 9.0 (iOS9)
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-09-18 19:41 UTC by David N. Junod
Modified: 2015-09-22 07:56 UTC (History)
3 users (show)

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


Attachments
registrar.m for the project. (234.81 KB, application/octet-stream)
2015-09-19 16:56 UTC, David N. Junod
Details
full log file (126.87 KB, application/octet-stream)
2015-09-19 17:01 UTC, David N. Junod
Details


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 ANSWERED

Description David N. Junod 2015-09-18 19:41:15 UTC
Building with the latest version of everything. Xamarin 5.9.7 (build 9). Xcode 7. 


@interface wtkJams_SingerSearchBarController_SingerSearchDelegate : NSObject<UISearchBarDelegate, UIBarPositioningDelegate> {

		/Users/djunod2/rci/wtkJams_Xamarin/wtkJams_single/obj/iPhone/Debug/mtouch-cache/registrar.m:3228:99: error: cannot find protocol declaration for 'UIBarPositioningDelegate'
		@interface wtkJams_SingerSearchBarController_SingerSearchDelegate : NSObject<UISearchBarDelegate, UIBarPositioningDelegate> {
		                                                                                                  ^ 
		1 error generated.
		
MTOUCH: error MT4109: Failed to compile the generated registrar code. Please file a bug report at http://bugzilla.xamarin.com
	Task "MTouch" execution -- FAILED
	Done building target "_CompileToNative" in project "/Users/djunod2/rci/wtkJams_Xamarin/wtkJams_single/wtkJams_ios.csproj".-- FAILED
	
Done building project "/Users/djunod2/rci/wtkJams_Xamarin/wtkJams_single/wtkJams_ios.csproj".-- FAILED
Comment 1 Sebastien Pouliot 2015-09-19 00:09:59 UTC
Can you attach the full build log to the bug report along with all version informations*

Also attaching the registrar.m file** would be useful as UISearchBarDelegate is not a new (or even recent) type and the actual error could be located in the lines before this one.

Thanks!

* The easiest way to get exact version information is to use the "Xamarin Studio" menu, "About Xamarin Studio" item, "Show Details" button and copy/paste the version informations (you can use the "Copy Information" button).

** /Users/djunod2/rci/wtkJams_Xamarin/wtkJams_single/obj/iPhone/Debug/mtouch-cache/registrar.m
Comment 2 David N. Junod 2015-09-19 16:53:48 UTC
This is a new bug.

I've been building this project with this configuration since 2012. I include iPhoneOS6.1.sdk in the Xcode SDKs, and build for 6.1.  

Unfortunately, the last build that I did was in March.  I only work on it when I need to do an update, such as to get it to work for iOS 9.
Comment 3 David N. Junod 2015-09-19 16:56:47 UTC
Created attachment 12978 [details]
registrar.m for the project.
Comment 4 David N. Junod 2015-09-19 17:01:48 UTC
Created attachment 12979 [details]
full log file
Comment 5 Rolf Bjarne Kvinge [MSFT] 2015-09-21 04:12:16 UTC
You're building using the 6.1 SDK:

> 		Xamarin.iOS 9.0.1 Business Edition using framework: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk

and UIBarPositioningDelegate was introduced in iOS 7.

You need to build with at least the iOS 7.0 SDK (but we recommend you always build with the latest SDK for the Xcode version you're using; this can be done by selecting 'Default' as the SDK version in your project's iOS Build options).

That said we need a better error message; and that's already been reported as bug #24677 (thus marking this as a duplicate).

*** This bug has been marked as a duplicate of bug 24677 ***
Comment 6 David N. Junod 2015-09-22 06:18:30 UTC
Like I said before, this is a new bug.  I've been able to build with this configuration for a couple of years.  Now with the latest version (don't know exactly when it broke, sometime after March 2015), it doesn't work.

Since I'm denied access to bug 24677, I can't say yes or no that this is a duplicate of it, but from the sounds of it, I don't think so.
Comment 7 David N. Junod 2015-09-22 06:18:54 UTC
Since I'm denied access to bug 24677, I can't say yes or no that this is a
duplicate of it, but from the sounds of it, I don't think so.
Comment 8 Rolf Bjarne Kvinge [MSFT] 2015-09-22 07:56:24 UTC
(In reply to comment #6)
> Like I said before, this is a new bug.

It's not a bug, it's a requirement: if you update to the latest Xamarin.iOS, you'll also have to build with the corresponding iOS SDK (in this case iOS 9) [1].

> Since I'm denied access to bug 24677, I can't say yes or no that this is a
> duplicate of it, but from the sounds of it, I don't think so.

Bug #24677 is just an enhancement request to get a better error message for this scenario/requirement.

[1] Unless you enable the managed linker (in the project's iOS Build options, set "Linker behavior" to "Link SDK assemblies" or "Link all").