× {{alert.msg}} Never ask again
Get notified about new tutorials RECEIVE NEW TUTORIALS

$T4 does not have a member named Generator ERROR swift

Antonio Bello
Mar 01, 2015
<p><code>stillImageOutput</code> is an optional - even if you are using optional chaining, it cannot be used in a <code>for</code> loop, because if <code>stillImageOutput</code> is nil, the statement would be:</p> <pre><code>for connection in nil { } </code></pre> <p>which wouldn't make sense.</p> <p>To fix it, you have to use optional binding:</p> <pre><code>if let connections = x?.connections { for connection in connections { } } </code></pre> <p>This tip was originally posted on <a href="http://stackoverflow.com/questions/26504195/%24T4%20does%20not%20have%20a%20member%20named%20Generator%20ERROR%20swift/26504279">Stack Overflow</a>.</p>
comments powered by Disqus