The basic idea here is to clone the "selected" node and its geometry, then use a custom vertex and fragment shader to "push" the geometry out along the vertex normals, drawing only the back faces of the cloned geometry with a solid color.
I wrote a small sample project to demonstrate this and posted it here.
The core Swift code looks like this:
let outlineProgram = SCNProgram()
outlineProgram.vertexFunctionName = "outline_vertex"
outlineProgram.fragmentFunctionName = "outline_fragment"
let outlineNode = duplicateNode(node)
scene.rootNode.addChildNode(outlineNode)
outlineNode.geometry?.firstMaterial?.program = outlineProgram
outlineNode.geometry?.firstMaterial?.cullMode = .front
The portion of the vertex shader responsible for pushing vertices along their normal looks like this:
const float extrusionMagnitude = 0.05;
float3 modelPosition = in.position + normalize(in.normal) * extrusionMagnitude;
From there, you just apply your typical model-view-projection matrix and return a flat color from the fragment shader.