Bug 29867 - UIImage wrong mapping on devices lower than iOS8
Summary: UIImage wrong mapping on devices lower than iOS8
Status: RESOLVED INVALID
Alias: None
Product: Forms
Classification: Xamarin
Component: iOS ()
Version: 1.4.3
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-05-07 19:30 UTC by Oleg Demchenko
Modified: 2015-06-15 09:34 UTC (History)
3 users (show)

Tags: crash ios imageview ac
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 Oleg Demchenko 2015-05-07 19:30:33 UTC
Steps to reproduce:
1) Open TabbedPageDemo sample from xamarin-forms-samples
2) Set iOS as startup project and run the app on device/simulator lower than iOS8

Actual result:
"Could not initialize an instance of the type 'UIKit.UIImage': the native 'initWithContentsOfFile:' method returned nil."

Xamarin.Forms tries to init UIImage using web-url of image and it fails because initWithContentsOfFile accept only local file urls.
Exception log: https://gist.github.com/olegoid/2805761c962931964de2
However sample works fine on devices higher than iOS8.
Comment 1 Chris King 2015-05-20 16:46:35 UTC
Indeed. Simulator under version 8 causes the exception described.
Comment 2 Chris King 2015-05-20 16:47:02 UTC
Indeed. Simulator under version 8 causes the exception described.
Comment 3 Stephane Delcroix 2015-06-15 08:10:38 UTC
The issue is _not_ while trying to init an UIImage using a web-url. The projects fails on

    <ContentPage ... Icon="monkeyicon" />

where it should be 

    <ContentPage ... Icon="monkeyicon.png" />
Comment 4 Oleg Demchenko 2015-06-15 09:30:07 UTC
However it still doesn't answer the question why sample works fine in iOS 8.x and doesn't works in iOS 7.x
Comment 5 Stephane Delcroix 2015-06-15 09:34:21 UTC
> why sample works fine in iOS 8.x and doesn't works in iOS 7.x

because of a change in behavior between 7 and 8