Unrecognized selector in NSURLSession extension

Originator:greenfish29
Number:rdar://18228171 Date Originated:04-Sep-2014 01:12 PM
Status:Closed Resolved:
Product:iOS 8 SDK Product Version:iOS 8 beta 5
Classification:iOS SDK Reproducible:Always
 
Summary:
I create extension for NSURLSession class containing one simple method, but when I try use it, app crash with unrecognized selector error.

Steps to Reproduce:
1. Create iOS single view application project in Xcode 6 beta 7 with swift language.
2. Set deployment target to iOS 7.1.
3. Declare NSURLSession extension with one simple method.
4. In ViewController.swift, in viewDidAppear method, create NSURLSession instance with init(configuration configuration: NSURLSessionConfiguration!) -> NSURLSession  (any configuration).
5. Call method from your NSURLSession extension on NSURLSession instance created in previous step.
6. Run project in any simulator or device with iOS 7.1.

Expected Results:
NSURLSession instance should normally be able to use methods from its extensions.

Actual Results:
Application crash, when I try use methods from NSURLSession extension with "unrecognized selector sent to instance ..."

Version:
iOS 7.1

Notes:
This problem only occurs in iOS 7.1, in iOS 8 beta 5 this doesn't happen. I use latest iOS 8 SDK.

Configuration:
Any iOS device and simulator with iOS 7.1

Attachments:
'NetworkingExtensionDemo.zip' http://cl.ly/3C2o1f3G220a

Comments

Engineering has provided the following feedback regarding this issue

This issue is fixed in iOS 8 and there are no plans to address this in iOS 7.

We are closing this bug report.

If you have questions regarding the resolution of this issue, please update your bug report with that information.

Please be sure to regularly check new Apple releases for any updates that might affect this issue.

By greenfish29 at March 19, 2015, 8:54 a.m. (reply...)

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!