문제

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

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top