Xcode10报错:‘iPhone已拒绝启动请求’问题咨询
Hey there, I’ve dealt with this frustrating error plenty of times while debugging with Xcode 10—let’s go through the most effective solutions that have worked for me and fellow developers:
Check Developer Trust Settings on Your iPhone
This is the #1 culprit for this error. On your iPhone, head to Settings > General > Device Management (or Profiles & Device Management depending on your iOS version). Locate your developer account in the list, tap it, then select "Trust [Your Account Name]". Confirm the prompt, then restart both Xcode and your iPhone.Clean Xcode Cache & Build Files
Corrupted cache can mess up the launch process. First, use the shortcutCmd + Shift + Kto clean the build folder (or go to Product > Clean Build Folder). Next, navigate to~/Library/Developer/Xcode/DerivedData, find the folder associated with your project, delete it, and restart Xcode.Repair Xcode-Device Pairing
Sometimes the pairing between Xcode and your iPhone gets glitched. Open Xcode, go to Window > Devices and Simulators. Find your iPhone in the list, right-click it, and select "Unpair". Disconnect your device, reconnect it, and follow the on-screen prompts to re-pair (you’ll need to enter your iPhone’s passcode).Verify Project Signing Configuration
Double-check your project’s signing settings:- Select your project in the Xcode navigator.
- Go to the Signing & Capabilities tab.
- Ensure your correct developer team is selected under "Team", and "Automatically manage signing" is checked. If using manual signing, confirm your certificate and provisioning profile are valid (expired certificates often cause this issue—check your Apple Developer account if needed).
Restart Everything (Yes, Really)
It sounds trivial, but a full restart of both your iPhone and Xcode can resolve random connection bugs. Power off your iPhone, wait 30 seconds, turn it back on, then quit and reopen Xcode before reconnecting.Check iOS Version Compatibility
Xcode 10 officially supports up to iOS 12. If your iPhone is running iOS 13 or later, there might be compatibility issues. In this case, you’ll either need to upgrade Xcode to a newer version that supports your iOS version, or (less ideally) downgrade your iPhone’s iOS to a version compatible with Xcode 10.
If none of these work, try creating a brand new empty Xcode project and see if it launches on your device. If it does, the issue is likely specific to your project’s configuration—you might want to compare the signing and build settings between the test project and yours.
内容的提问来源于stack exchange,提问作者cavalier

