Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The behavior is simply explained by this line of code in <a href="https://github.com/AFNetworking/AFNetworking/blob/master/AFNetworking/AFURLSessionManager.h#L83"><code>AFURLSessionManager.h</code></a></p> <pre><code>#if (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) &amp;&amp; __IPHONE_OS_VERSION_MIN_REQUIRED &gt;= 70000) || (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090) </code></pre> <p><code>AFURLSessionManager</code> makes use of <code>NSURLSession</code>, which is available from iOS 7 (and OSX 10.9) on.</p> <p>If you are targeting iOS 6, <code>AFURLSessionManager</code> just can't be used and it's stripped out at compile time. That's why you get the error.</p> <p>Setting iOS 7 as minimum deployment target will fix the compile error, even though it may not fit your needs.</p> <hr> <p>That said, my suggestions is to use CocoaPods to managed third-party dependencies, such as <code>AFNetworking</code>.</p> <p><code>AFNetworking 2.0</code> is a modular framework, meaning that you can pick which modules to use according to your needs. The core supports iOS 6, but some modules only support iOS 7, such as the <code>NSURLSession</code> module which is the one where <code>AFURLSessionManager</code> belongs.</p> <p>Modularity is achieved by using <a href="https://github.com/CocoaPods/CocoaPods/wiki/The-podspec-format#subspecs">CocoaPods subspecs</a>. In order to import <code>AFNetworking</code> and the <code>NSURLSession</code> module, you will just have to do something like </p> <pre><code>platform :ios, '7.0' pod 'AFNetworking', '~&gt; 2.0' pod 'AFNetworking/NSURLSession', '~&gt; 2.0' </code></pre> <p>You still can target iOS 6, but you won't get the incompatible submodules, as specified in the CocoaPods documentation.</p> <blockquote> <p>A subspec can restrict the platform of the parent specification. In this case it will be inherited by the parent specification only if the target of the podfile supports it.</p> </blockquote>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload