The Note 8's advantages chiefly come through its secondary camera, relatively noiseless low-light photography and lightning-quick autofocus. Of the two, Samsung's phone is the one you'd want for portraits or capturing a fast-moving scene. The iPhone, on the other hand, has exceptional high dynamic range performance, accurate face exposure and great overall video performance, particularly with stabilization. And both have their weak points, as you might imagine. The Note 8 has a fairly limited dynamic range that results in lost detail in extreme situations, and has white balance problems in bright lighting or indoors. Apple's device occasionally struggles with autofocus, doesn't always nail the color cast in low lighting and has visible noise in low-light video.
The question is: how much does this influence your choice of device? Frankly, it's complicated. Some of it clearly depends on personal preference based on your photography habits: you may pick the iPhone if you prefer a more accurate color range, or the Note 8 if you enjoy low-light shooting. This also assumes you treat DxOMark's scores as canonical -- it can't account for every situation with tests, and it may downplay factors that you consider crucial. And of course, there's the simple matter of liking the rest of the phone. If you're a hardcore Android or iOS fan, even the best camera in history probably wouldn't convince you to switch sides.