Hi and Welcome. My Name is ***** ***** I look forward to assisting you today with your question.
The OfficeJet Pro 8710 manufactured before a certain date doesn't have the AirPrint feature enabled. So you will have to do a firmware update on the printer to get the AirPrint feature on it. AirPrint is what makes the printer visible to iPhone or other Apple products.
Follow the steps below to do update the printer's firmware.
From the home screen on the printer control panel, swipe down to open the Dashboard, and then touch the Setup icon .
Swipe up on the display, and then touch Printer Maintenance.
Touch Update the Printer, and then touch Check for Printer Updates Now.
If it found any updates, then do all the updates..
Once the update is finished, turn off the printer. Turn it back on and then see if your iPhone can find it.
Note : Your iPhone and the printer must be connected to same WiFi network for them to recognize each other. You can also HP ePrint app which you can download from App Store to print from iPhone without the firmware update.
Please let me know if that didn't work, so we can continue troubleshooting