I have seen many questions and articles mentioning that Quaternions can be used to derive better,accurate and stable yaw, pitch and roll readings from the iPhone rather than
You don't have to implement anything, the API provides the quaternion for you:
CMAttitude Class Reference, quaternion propery
I personally like rotation matrices better because I find them easier to understand and to work with.
As I am reading your question, I still have the impression that you somehow want yaw, pitch and roll. You have to use quaternions everywhere in your code to get rid of the problems yaw, pitch and roll cause.