Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I had the same problem and just found a solution.</p> <p>You should add the following definitions at the beginning of your prefix header:</p> <pre><code>#import &lt;Availability.h&gt; #define __AVAILABILITY_INTERNAL__IPHONE_3_2 __AVAILABILITY_INTERNAL_DEPRECATED #define __AVAILABILITY_INTERNAL__IPHONE_4_0 __AVAILABILITY_INTERNAL_DEPRECATED #define __AVAILABILITY_INTERNAL__IPHONE_4_1 __AVAILABILITY_INTERNAL_DEPRECATED #define __AVAILABILITY_INTERNAL__IPHONE_4_2 __AVAILABILITY_INTERNAL_DEPRECATED #define __AVAILABILITY_INTERNAL__IPHONE_4_3 __AVAILABILITY_INTERNAL_DEPRECATED </code></pre> <p>Then the next time you compile the app, the methods that are not available in old versions (in this case iOS 3.1) will be marked as deprecated and you will get warnings for each of them.</p> <p>You can use <code>__AVAILABILITY_INTERNAL_UNAVAILABLE</code> instead of <code>__AVAILABILITY_INTERNAL_DEPRECATED</code> if you want to get errors.</p> <p>These lines redefine the actual definitions in AvailabilityInternal.h so you should remove them from your prefix header when your are done.</p> <p><strong>Here is how it works:</strong></p> <p>Apple marks the availability of the methods in the header files with macros like <code>__OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_4_0)</code>.</p> <p>Since you are compiling for iOS the following definition in <code>Availibility.h</code> is applied:</p> <pre><code>#define __OSX_AVAILABLE_STARTING(_mac, _iphone) __AVAILABILITY_INTERNAL##_iphone </code></pre> <p>So the methods are actually marked with <code>__AVAILABILITY_INTERNAL__IPHONE_4_0</code> and similar macros. Normally when you are compiling with the new SDK these macros are replaced with <code>__AVAILABILITY_INTERNAL_WEAK_IMPORT</code>, which does not produce any warning. By adding the lines at the beginning of my answer to your prefix header, you overwrite these definitions with <code>__AVAILABILITY_INTERNAL_DEPRECATED</code>. Therefore Xcode thinks these methods are deprecated and produces the warnings.</p>
 

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