You're working at two different levels here. Setting the fill and stroke color of the CGContext might be appropriate if you were going to use CGContext functions to draw text.
But, since you're using NSAttributedString to draw the text, you need to set the text's fill and stroke colors as attributes.
The attributes you're looking for are NSForegroundColorAttributeName
(the text fill color) and NSStrokeColorAttributeName
.
You also don't need to set the text drawing mode. That, too, is only relevant if you use CGContext functions to draw text.
To get your NSAttributedString stroked, you need to set both NSStrokeColorAttributeName
and NSStrokeWidthAttributeName
.