Giving up a built nuke would be too humiliating to agree to.
South Africa managed to do it without 'humiliation'.
They were also allies with the USA in a world where basically everyone else hated them. They gave up the nukes a year after they reached an agreement with Cuba to stop sending troops to Namibia.
South Africa doesn't really compare to Iran so much as it compares to Israel in a world where they somehow manage to use diplomacy to be 100% safe from their neighbors
Actually, the main reason for South Africa to dismental their nuclear arsenal was their government's fear of it falling to the hands of Black government.