respondsToSelector returning YES for appStoreReceiptURL on iOS 6
Originator: | ben.dolman | ||
Number: | rdar://14216650 | Date Originated: | 20-Jun-2013 09:38 AM |
Status: | Open | Resolved: | |
Product: | iPhone SDK | Product Version: | 6.1 |
Classification: | Reproducible: | Always |
Summary: In the 2013 WWDC session entitled "Using Store Kit for In-App Purchases", it says: Use weak linking to support both iOS 6 and iOS 7 receipts [[NSBundle mainBundle] respondsToSelector:@selector(appStoreReceiptURL)]; However, when I run this on iOS 6 this call returns YES. If I then actually invoke it I get an unrecognized selector exception. This happens even if I build against iOS 7 SDK but target iOS 6. Steps to Reproduce: Call: [[NSBundle mainBundle] respondsToSelector:@selector(appStoreReceiptURL)] Expected Results: Returns NO on iOS 6 Actual Results: Returns YES Regression: Notes: This also seems to happen with other methods that are decorated with the NS_AVAILABLE_MAC macro. For example, +[NSFileVersion temporaryDirectoryURLForNewVersionOfItemAtURL:]
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!