iOS diagnostic script