The following code shows how you can create a spring joint between sprite nodes. The physics body of staticNode has its isDynamic property set to false, preventing it from being affected by gravity. It is animated with an SKAction to move it upward.
dynamicNode is joined to staticNode with an SKPhysicsJointSpring named spring, with a frequency of 0.5 and a damping of 0.2.
The result is that as staticNode moves vertically, dynamicNode follows the upward path with a slight delay and bounce.