ios reports code

starting to merge iOS reports code.
Should probably clean up the debug stuff.