|
|
| Previous ID |
SR-2226 |
| Radar |
None |
| Original Reporter |
Zyphrax (JIRA User) |
| Type |
Bug |
| Status |
Resolved |
| Resolution |
Invalid |
Environment
Swift 2.1, Xcode 7.3.1
Additional Detail from JIRA
|
|
| Votes |
2 |
| Component/s |
Foundation |
| Labels |
Bug |
| Assignee |
None |
| Priority |
Medium |
md5: 90d9f3752eaa802e02564704deb0df91
Issue Description:
The proper way to create a NSURLSessionConfiguration is to use one of these three methods:
-
defaultSessionConfiguration
-
ephemeralSessionConfiguration
-
backgroundSessionConfigurationWithIdentifier
However the compiler allows me to create a new NSURLSessionConfiguration through the parameterless initializer:
NSURLSessionConfiguration()
When you run the code after that, you get weird runtime errors:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: [NSURLSessionConfiguration setTimeoutIntervalForRequest:] unrecognized selector sent to instance 0x7fb1b2dd2a30
It would be great if using the mentioned initializer would throw a compile error.
Environment
Swift 2.1, Xcode 7.3.1
Additional Detail from JIRA
md5: 90d9f3752eaa802e02564704deb0df91
Issue Description:
The proper way to create a NSURLSessionConfiguration is to use one of these three methods:
defaultSessionConfiguration
ephemeralSessionConfiguration
backgroundSessionConfigurationWithIdentifier
However the compiler allows me to create a new NSURLSessionConfiguration through the parameterless initializer:
NSURLSessionConfiguration()When you run the code after that, you get weird runtime errors:
It would be great if using the mentioned initializer would throw a compile error.