Bug 16135 - CIImage includes "initWithCVImageBuffer:" constructor which is "not available on iOS"
Summary: CIImage includes "initWithCVImageBuffer:" constructor which is "not available...
Status: VERIFIED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 7.0.4.x
Hardware: PC Mac OS
: --- minor
Target Milestone: 7.0.6
Assignee: Sebastien Pouliot
URL:
Depends on:
Blocks:
 
Reported: 2013-11-12 00:47 UTC by Brendan Zagaeski (Xamarin Team, assistant)
Modified: 2014-01-02 14:55 UTC (History)
4 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:
VERIFIED FIXED

Description Brendan Zagaeski (Xamarin Team, assistant) 2013-11-12 00:47:29 UTC
Similar to bug #1808

The CIImage class includes an unneeded constructor for the "initWithCVImageBuffer:" selector:
public CIImage (CVImageBuffer imageBuffer) : base (NSObjectFlag.Empty)


This selector is not present in iOS. For example, in Xcode attempting to compile an iOS project that calls this method, displays an error:
> 'initWithCVImageBuffer:' is unavailable: not available on iOS


This method appears in the following lines in the CIImage.h header file. Interestingly, there is no `#if !TARGET_OS_IPHONE` surrounding these lines.

> - (id)initWithCVImageBuffer:(CVImageBufferRef)imageBuffer __OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_NA);
> - (id)initWithCVImageBuffer:(CVImageBufferRef)imageBuffer options:(NSDictionary *)dict __OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_NA);


Compare also the iOS documentation:
> https://developer.apple.com/library/ios/documentation/graphicsimaging/reference/QuartzCoreFramework/Classes/CIImage_Class/Reference/Reference.html

... to the OS X documentation:
> https://developer.apple.com/library/mac/documentation/graphicsimaging/reference/QuartzCoreFramework/Classes/CIImage_Class/Reference/Reference.html
Comment 1 Sebastien Pouliot 2013-11-12 08:41:39 UTC
You won't find any `#if !TARGET_OS_IPHONE` - that would be too chatty ;-)

The `__OSX_AVAILABLE_STARTING` macro handle this, e.g. it says that `__IPHONE_NA` which means the API is not available in any version of the iPhone SDK.

That looks like a mistake in the bindings - which our introspection tests should have spotted (I'll look why it did not).
Comment 2 Sebastien Pouliot 2013-11-12 09:22:23 UTC
Yes, the introspection tests only checked the methods, not the constructors. There's a few extra in there that I'll review. Good catch!
Comment 3 Sebastien Pouliot 2013-11-12 11:59:55 UTC
Fixed in maccore/master c115fb50cd3902c160a93e50a9861c5da2b5ec15
Comment 4 Brendan Zagaeski (Xamarin Team, assistant) 2013-11-12 12:23:25 UTC
Thanks for the quick fix!
Comment 5 PJ 2013-12-11 18:46:04 UTC
This fix is planned to be released with Xamarin.iOS 7.0.6, which should hit the beta channel before December 23rd.
Comment 6 Sadik Ali 2013-12-24 09:15:40 UTC
@PJ, 
I have verified this issue, with stable and latest build and compare on both.
As per my observation as I checked that I am seeing code with current build "https://gist.github.com/saurabh360/9399003b2969166df3c2" as show in screen cast "http://www.screencast.com/t/uNgAxZ5a7U" while with stable builds I getting code "https://gist.github.com/saurabh360/7a98b480dde443302f74" as shown in screen cast "http://screencast.com/t/24dTEVTL" 

Checked With:
Stables build:
All Mac
XS 4.2.1 (build 1)
X iOs 7.0.4.209

Current Build:
All Mac
XS 4.2.3 (build 23)
X iOs 7.0.6.166

Please let me know is it correct behavior which I have followed or is there anything else which I have missed out to verify this issue.
Comment 7 PJ 2014-01-02 14:55:02 UTC
Looks good Sadik, marking as VERIFIED.