1

I'm trying to access an instance of NSURLSessionConfiguration
I've tried following statements to retrieve instance of NSURLSessionConfiguration.

Statement 1.

 NSURLSessionConfiguration *aConfig = 
     [NSURLSessionConfiguration defaultSessionConfiguration];

Above statement returns nil

Statement 2.

 NSURLSessionConfiguration *aConfig = 
     = [[NSURLSessionConfiguration alloc] init];

Above statement also returns nil.

Can anybody tell me whats wrong with NSURLSessionConfiguration class?

enter image description here

sagarkothari
  • 24,520
  • 50
  • 165
  • 235

1 Answers1

5

It's because you are using this for iOS < 7.0. If you can see it in docs you will find this NS_CLASS_AVAILABLE(10_9, 7_0) which means that it's available in iOS 7.0.

So I'll suggest you to use simulator or device running iOS 7

Inder Kumar Rathore
  • 39,458
  • 17
  • 135
  • 184