+[NSLocale localeWithLocaleIdentifer:] SDK availability details incorrect (states 4.0, is actually 7.0)
| Originator: | mauricerkelly | ||
| Number: | rdar://15583112 | Date Originated: | 04-Dec-2013 12:45 PM |
| Status: | Open | Resolved: | |
| Product: | Documentation | Product Version: | iOS SDK 7.0 |
| Classification: | Other Bug | Reproducible: | Always |
Summary: On investigating the +[NSLocale localeWithLocaleIdentifer:] method I found that the documentation stated that it was available in iOS 4.0 and later. In use I found that it could not be used prior to iOS 7, and indeed appears as a newly added method in the 6.1 to 7.0 API Diffs (https://developer.apple.com/library/ios/releasenotes/General/iOS70APIDiffs/) Steps to Reproduce: 1. Use +[NSLocale localeWithLocaleIdentifer:] in code. 2. Build code and find that it generates a "no known selector for class" error. 3. Check documentation for API availability. Expected Results: 4. Documentation should state "Available in iOS 7.0 and later." 5. Facepalm, and use -[NSLocale initWithLocaleIdentifier:] instead. Actual Results: 4. Documentation actually states "Available in iOS 4.0 and later." 5. Scratch head for a while, before Googling for answers and discovering it's actually a new method in iOS 7.0 6. Facepalm, and use -[NSLocale initWithLocaleIdentifier:] instead. Regression: N/A Notes: None
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!