How should you programatically add a contact so it remains only on the device and isn't synched to iCloud?

I want to programmatically add a contact, preferably within its own group, such that it remains only on the (iPhone) device local copy of contacts and doesn't get synched elsewhere.

However if I programmatically create a group then the group itself appears in iCloud, so presumably contacts within it will to.

What sort of arrangement of containers/groups/contacts etc. should I create to achieve this?

How should you programatically add a contact so it remains only on the device and isn't synched to iCloud?
 
 
Q