Referencing NSURLSessionTaskPriority* when optimized on iOS 8 crashes
| Originator: | zacwest | ||
| Number: | rdar://23956486 | Date Originated: | 18-Dec-2015 10:05 AM |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | |
| Classification: | Reproducible: |
Summary: When referencing NSURLSessionTaskPriorityDefault (e.g.) on iOS 8 with optimizations enabled, the runtime crashes: dyld: Symbol not found: _NSURLSessionTaskPriorityDefault Referenced from: /Users/zacharywest/Library/Developer/CoreSimulator/Devices/4DA14D1B-48B0-49BC-9DE6-965F412E4CC9/data/Containers/Bundle/Application/936B5CCC-9688-4AF7-B59D-6A7751132DC1/NSURLSessionTaskCrash.app/NSURLSessionTaskCrash Expected in: /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 8.4.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/Foundation.framework/Foundation in /Users/zacharywest/Library/Developer/CoreSimulator/Devices/4DA14D1B-48B0-49BC-9DE6-965F412E4CC9/data/Containers/Bundle/Application/936B5CCC-9688-4AF7-B59D-6A7751132DC1/NSURLSessionTaskCrash.app/NSURLSessionTaskCrash When running without optimizations enabled, this does not crash. This header is flagged: FOUNDATION_EXPORT const float NSURLSessionTaskPriorityDefault NS_AVAILABLE(10_10, 8_0); FOUNDATION_EXPORT const float NSURLSessionTaskPriorityLow NS_AVAILABLE(10_10, 8_0); FOUNDATION_EXPORT const float NSURLSessionTaskPriorityHigh NS_AVAILABLE(10_10, 8_0); It should be accessible anywhere 8.0 and above. It is not, with optimizations. Steps to Reproduce: 1. Reference NSURLSessionTaskPriorityDefault on iOS 8 2. Run with optimizations enabled 3. Crash Expected Results: The float is available. Actual Results: The float crashes. Version: Xcode 7.2 & Xcode 7.1 both have this behavior Notes: Attached is a sample project. It's literally: 1. File > New Project 2. Deployment target 8.0 3. Add a reference to NSURLSessionTaskPriorityDefault 4. Run as 'release' in the simulator. No kidding. Seriously, that's it. Happens every time. Happens _on the App Store_. Configuration: iOS 8.x Attachments: 'NSURLSessionTaskCrash.zip' was successfully uploaded.
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!