Both phones have their ups and downs, and they both take great photos. Overall, though, I'd prefer to take the Pixel 2 XL with me. The Pixel seems to know when to saturate colors and when not to, as shown with the flower photo. And the iPhone simply adds too much yellow tint to its photos compared to the Pixel for my taste.
Portrait Modes on either phone are a mixed bag, as the Pixel did better in one example and the iPhone did better in another. Portrait Modes on smartphones are still in their early stages, and there's certainly room for improvement on both cameras to produce more consistent results.
Both cameras have similar sharpness except when it comes to zooming, where the iPhone wins hands-down. But remember, it's up to you. If you like the iPhone's warmer photo style, then the iPhone is the better camera. If you'd rather have more accurate, less warm photos, the Pixel is the way to go.