You do not install your friend's IPA file through Xcode.
Third party development IPA files are supposed to be installed via iTunes or through a web service such as TestFlight.
Your friend must ensure that he has signed the app himself and has used an ad-hoc provisioning profile with your device's UDID included.