title: Alternative to animation(forKey:) (now deprecated)?
body: <p>I am working with iOS 11 (for <code>ARKit</code>) and while many point to a sample app for <code>SceneKit</code> from Apple with a Fox, I am having problem with the extension it uses in that sample project (<a href="https://developer.apple.com/library/content/samplecode/Fox/Listings/Swift_Common_SceneKitExtensions_swift.html" rel="noreferrer">file</a>) to add animations:</p>
  
  <pre><code>extension CAAnimation {
      class func animationWithSceneNamed(_ name: String) -&gt; CAAnimation? {
          var animation: CAAnimation?
          if let scene = SCNScene(named: name) {
              scene.rootNode.enumerateChildNodes({ (child, stop) in
                  if child.animationKeys.count &gt; 0 {
                      animation = child.animation(forKey: child.animationKeys.first!)
                      stop.initialize(to: true)
                  }
              })
          }
          return animation
      }
  }
  </code></pre>
  
  <p>It seems that this extension is very handy but I am not sure how to migrate this now that it is deprecated?  Is it built into <code>SceneKit</code> by default now?</p>
  
  <p>The documentation didn't really show much info on why it was deprecated or where to go from here.</p>
  
  <p>Thanks</p>