Generally best to have some redundancy there.
My ass has been saved more times by an iPhone compass and offline OrganicMaps than the other way round. Quote the situation a couple of years back where the state issued paper maps were completely wrong and my Suunto compass turned out to likely be a fake one and froze and cracked open overnight. 30km from humans on a mountain range in central asia.
I have never had an iPhone crap out on me I will add. Has completely replaced my dedicated GPS.
The worst thing I've ever seen though is a compass app on Android that won't work if it can't contact the ad server.