ios-samples icon indicating copy to clipboard operation
ios-samples copied to clipboard

ImageInverterExtn sample does not work.

Open dalexsoto opened this issue 8 years ago • 1 comments

ImageInverter sample isn't working anymore but seems to be unrelated to Xamarin.iOS, the native Apple sample this is based on also does not work so there is a high chance that there were some changes in either iOS or Xcode 9 (or both) that are breaking it. Already tested bot ours and Apple's sample down to d15-4 and I get the same results.

Sample with issue: https://github.com/xamarin/ios-samples/tree/master/ios8/ImageInverter

Original Issue report: https://github.com/xamarin/xamarin-macios/issues/3371

quoting original report:

Steps to Reproduce

  1. Download and open https://developer.xamarin.com/samples/monotouch/ios8/ImageInverter/ImageInverter.zip
  2. Set iOS Deployment target to 11.0 or higher in both main and extension app
  3. Set Extension App as startup project and rebuild the project
  4. Deploy it in iOS simulator
  5. Open ImageInverter app in iOS simulator
  6. Enable ImageInverterExtn App in it

Expected Behavior

ImageInverterExtn App should launch in iOS Simulator and Image should be Inverted

Actual Behavior

Blank screen is displayed when ImageInverterExtn loaded Screencast: https://www.screencast.com/t/BweketBj

dalexsoto avatar Feb 02 '18 20:02 dalexsoto

Had a look into this today. What I have found so far is that imageItemProvider.LoadItem is providing an NSData object, not a UIImage, so in the current example the image is null as the cast is failing. However, casting to NSData and trying UIImage.LoadFromData produces a null image, so for the moment I am at a loss.

Interestingly, the original sample code from Apple is nowhere to be found.

BytesGuy avatar Jun 20 '18 14:06 BytesGuy