Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
Created attachment 12595 [details]
When using Device.OnPlatform in a Windows Phone 8.1 (runtime) project it returns the value given for iOS.
Tested it both in Xamarin.Forms 18.104.22.16892 && 22.214.171.12496-pre1.
In a WP 8.0 project it's returning the correct value.
I also read the documentation that the Device.OnPlatform cannot make a difference between WP 8.1 or Windows 8.1, but returning the iOS value doesn't seem like the best option.
I have added an
I witness the same behavior and have located the error.
The OnDevice method uses the following switch statement to return the value:
The Forms.Init function in the assembly Xamarin.Forms.Platform.WinRT.Phone.dll, used by the Windows Phone 8.1 (runtime) project, sets the Device.OS value to TargetPlatform.Windows. As there is no case that matches this value, the iOS value is returned instead.
Thank you for taking the time to submit this report. After reviewing the description of this bug, we believe it no longer affects the current version of Xamarin.Forms. If you are still experiencing the issue after updating your packages, please reopen this report with an attached reproduction.
For your convenience, we have created some reproduction best practices viewable here: https://gist.github.com/jassmith/92405c300e54a01dcc6d
Xamarin Forms Team