I made an animation in Blender and moved it to Xcode and it is converted from .dae file to .scn by Xcode.
I can play the animation in scene graph of Xcode as it is designed in the Blender.
I am loading geometry and animation and create node for animated object.
I use SCNAnimationPlayer() to load animation. The code is below.
let scene = SCNScene(named: "scene.scn")!
let geometry = scene.rootNode.childNode(withName: "animatedGeo",
recursively:true).geometry!
let animationNode = SCNNode(geometry: geometry)
let armature = scene.rootNode.childNode(withName: "Armature", recursively: true)!
let animationPlayer = armature.animationPlayer(forKey: "action_container-Armature")!
animationNode.addAnimationPlayer(animationPlayer, forKey: "action_container-Armature")
rootNode.addChildNode(animationNode)
I did not set anything for animationPlayer programmatically because all the settings looks Ok in scene graph window of Xcode.
However when scene loaded I see a small movement on animated object on iPhone screen. Looks like only first (parent) bone animation is partly playing. I could not find the why all of animation was not playing as it is played in scene graph.