Bug 20453 - Missing selector for NSTimeZone: localizedName:locale:
Summary: Missing selector for NSTimeZone: localizedName:locale:
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 6.3.x
Hardware: PC Mac OS
: Normal normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2014-06-07 02:03 UTC by John Hair
Modified: 2014-06-11 06:24 UTC (History)
3 users (show)

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:

Description John Hair 2014-06-07 02:03:30 UTC
Hi guys,
the selector localizedName:locale: is missing from NSTimeZone
Will also need an enum for NSTimeZoneNameStyle

I tried writing my own but didn't get very far, I couldn't see a matching Messaging.void_objc_msgSend_xxx method to use.

Any suggestions?
Comment 1 Tajinder Singh 2014-06-09 03:39:39 UTC
I tried to reproduce this issue and I am  able to reproduce this issue

Steps to reproduce 

1. Create iPhone "Single view application".
2. Open assembly browser ( click on View=>Assembly Browser)
3. Search "NSTimeZone" class in "assembly browser".
4. Search "localizedName:locale" in "NSTimeZone class.
5. "localizedName:locale:" is missing.
6. Search for "NSTimeZoneNameStyle" enum.
7. "NSTimeZoneNameStyle" enum is also missing. 

I have check the definition of class "NSTimeZone" and I observed that "NSTimeZone" class is missing the "localizedName:locale:" and also  "NSTimeZoneNameStyle" enum. 

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

Regression Status: This issue is also exits on "X.iOS"

Environment Info:

Xamarin Studio
Version 5.0 (build 878)
Installation UUID: 6ea47b0d-1852-4aaf-808d-373ff0a5002b
	Mono 3.4.0 ((no/63569a7)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 304000205

Version: 4.14.0 (Business Edition)
Android SDK: /Users/jatin66/Desktop/Backup/android-sdk-macosx
	Supported Android versions:
		1.6   (API level 4)
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		3.2   (API level 13)
		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)
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)

Apple Developer Tools
Xcode 5.1 (5084)
Build 5B130a

Version: (Business Edition)
Hash: fc6f56b
Build date: 2014-05-19 19:10:29-0400


Build Information
Release ID: 500000878
Git revision: bcd66920d963483e7d638a2339c4022fe035b529
Build date: 2014-05-27 17:36:26-04
Xamarin addins: da9064ce55b0fa90930a7c437a4cc1ae0e5c778c

Operating System
Mac OS X 10.9.2
Comment 2 Rolf Bjarne Kvinge [MSFT] 2014-06-09 09:59:35 UTC

maccore/master: 56be00a6a2b3e6f1671dc8e5c13a01dddb06f38a
monotouch/master: 1b73c53fee4ab0e1c79cf67c89d52a0995461431
Comment 3 John Hair 2014-06-10 17:34:24 UTC
Any chance of a code example for how I can do this now before it gets released?
Comment 4 Rolf Bjarne Kvinge [MSFT] 2014-06-11 03:44:35 UTC
It would be something likes this:

       using MonoTouch.ObjCRuntime;
       public enum NSTimeZoneNameStyle {

       NSTimeZone tz = ...;
       NSTimeZoneNameStyle style = ...;
       NSLocale locale = ...;
       var ptr = Messaging.IntPtr_objc_msgSend_int_IntPtr (tz.Handle, Selector.GetHandle ("localizedName:locale:"), (int) style, locale.Handle);
      var str = new NSString (ptr);
Comment 5 John Hair 2014-06-11 06:24:32 UTC
Lovely bubbly, worked like a charm. I was close but not quite there, love the whole selector message style you guys have developed. Very handy when you know how!