If you are cautious, and take the right precautions then you won’t have any issues. Use common sense. Don’t use unlicensed taxis late at night (use Uber), don’t flash the cash or walk around with your phone on display, and there are certain areas not to go. Tourism is a really important to Cape Town so you’re very unlikely to encounter any issues, but as with all major cities keep your wits about you and stay in the well-worn tourist areas.