title: How can you tell if a block parameter in Objective-C is escaping or not?
body: <p>Long-time Swift dev here but haven't touched Objective-C in about ten years, so definitely rusty.  Trying to figure out how to tell if a block parameter is escaping or not (i.e. so I know whether to use a weak ref or not as it isn't needed for non-escaping blocks.)</p>
  <p>For instance, from what I've read, by default in Objective-C, block parameters are implicitly escaping (which is the opposite of Swift BTW.)  If you don't want that, you have to use the <code>NS_NOESCAPE</code> annotation, like so...</p>
  <pre><code>- (void)executeActions:(void (NS_NOESCAPE ^)(void))actions;
  </code></pre>
  <p>However, the <a href="https://developer.apple.com/documentation/foundation/nsarray/1415846-enumerateobjectsusingblock?language=objc" rel="nofollow noreferrer"><code>enumerateObjectsUsingBlock</code></a> function I'm told is non-escaping, yet I don't see that annotation on the method in Apple's documentation.  Actually, they don't talk about escaping or non-escaping at all.  They just list the method.</p>
  <p>Again, <a href="https://developer.apple.com/documentation/foundation/nsarray/1415846-enumerateobjectsusingblock?language=objc" rel="nofollow noreferrer">here's the documentation</a>.</p>
  <p>I then tried to search out the header file.  I came across <code>NSArray.h</code> which does mention it, but there too I don't see <code>NS_NOESCAPE</code>.</p>
  <p><a href="https://github.com/nst/iOS-Runtime-Headers/blob/master/Frameworks/CoreFoundation.framework/NSArray.h" rel="nofollow noreferrer">https://github.com/.../NSArray.h</a> (Line 79)</p>
  <p>(I think this may be a generated/scraped page so maybe that information wouldn't be found here and you need the original headers. Not sure. Again, rusty.)</p>
  <p>So how can one determine if a method's block parameters are escaping or not?</p>