This iPhone 8 (Model A1863, A1905, A1906, A1907) is running iOS 12.0 (16A5308e), which may not be supported by this version of Xcode. (Version 9.4.1 (9F2000))
iOS 12 is only supported by the beta of Xcode 10 or higher.
If you want to use your iPhone 8 with this iOS version (NOT RECOMMENDED) with your Xcode 9.4 you can try to download the last beta of Xcode 10 and after connecting the iPhone to the mac go to this folder:
/Applications/Xcode10.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
You can see the iOS version folder of the iPhone, copy and past it to the same location in your Xcode 9.4 folder.
After this you should be able to deploy to your iPhone 8.