Bug 26481 - [WatchKit] WKInterfaceDevice.PreferredContentSizeCategory should take a UIContentSizeCategory, not a string
Summary: [WatchKit] WKInterfaceDevice.PreferredContentSizeCategory should take a UICon...
Status: VERIFIED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Pre-release ()
Version: XI 8.7.x (iOS 8.2 previews)
Hardware: PC Mac OS
: --- normal
Target Milestone: 8.8 iOS8.2/WatchKit
Assignee: Sebastien Pouliot
URL:
Depends on:
Blocks:
 
Reported: 2015-01-27 19:07 UTC by Larry O'Brien
Modified: 2015-02-27 07:06 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 Larry O'Brien 2015-01-27 19:07:45 UTC
The string value taken by this method should be one of the Content Size Category Constants from UIApplication, which we bind as the UIContentSizeCategory.

ref: https://developer.apple.com/library/prerelease/ios/documentation/WatchKit/Reference/WKInterfaceDevice_class/index.html#//apple_ref/occ/instp/WKInterfaceDevice/preferredContentSizeCategory
Comment 1 Larry O'Brien 2015-01-27 19:09:50 UTC
... Uh, I logged this as if it were the argument to the function, but it's the return value...
Comment 2 Larry O'Brien 2015-01-27 19:10:50 UTC
... And it's a property, not a method ... (/me goes off to get a cup of coffee...)
Comment 3 Sebastien Pouliot 2015-01-27 20:45:36 UTC
Good catch (and coffee I hope). So:
 
		NSString PreferredContentSizeCategory { get; }

will now be internal (and prefixed by '_') and we'll expose

		public UIContentSizeCategory PreferredContentSizeCategory { get; }

c.c. Vincent for sample update (if required).
Comment 4 Sebastien Pouliot 2015-01-27 21:18:06 UTC
Fixed in monotouch/ios8.2 d56cb238f74cd936787be2fcf5dab95ef04a0f0c
Comment 5 Prashant manu 2015-02-27 07:06:55 UTC
We have checked in Assembly browser and now 
NSString PreferredContentSizeCategory { get; } is shown as internal and prefixed by underscore (_). Also public UIContentSizeCategory PreferredContentSizeCategory { get; } is shown for WKInterfaceDevice class.

Screencast: http://www.screencast.com/t/ItlepGMWb

Environment Info:
Xamarin Studio
Version 5.8 (build 429)
Installation UUID: 0b7eaebc-a0ed-4b58-81df-91e378cad28c
Runtime:
	Mono 3.12.0 ((detached/de2f33f)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 312000076

Xamarin.Android
Version: 4.20.0.28 (Indie Edition)
Android SDK: /Users/Admin_Mac/Desktop/Anddk/android-sdk-macosx
	Supported Android versions:
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		4.0    (API level 14)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)

Xamarin Android Player
Version: Unknown version
Location: /Applications/Xamarin Android Player.app

Apple Developer Tools
Xcode 6.2 (6770)
Build 6C121

Xamarin.iOS
Version: 8.7.2.44 (Trial Edition)
Hash: 91e6811
Branch: 
Build date: 2015-02-26 17:33:52-0500

Xamarin.Mac
Version: 1.12.0.8 (Indie Edition)

Build Information
Release ID: 508000429
Git revision: 3201c40884a7a8ca5d4bf5d14fdb712892caabfb
Build date: 2015-02-26 06:20:10-05
Xamarin addins: 41e6c52fa9c545274a19a1b6277336afbb0ad68b

Operating System
Mac OS X 10.10.2
Darwin Admin-Macs-Mac-mini.local 14.1.0 Darwin Kernel Version 14.1.0
    Thu Nov 13 18:36:56 PST 2014
    root:xnu-2782.10.65~2/RELEASE_X86_64 x86_64