Hello @mc !
Your iOS apps must be signed with a valid Apple certificate. If the certificate chain can’t be verified (e.g., self-signed or missing trust), the build fails. This happens if:
- The signing certificate isn’t trusted on your Mac.
- The provisioning profile doesn’t match your device.
- The device isn’t properly registered in Xcode.
- Visual Studio can’t see the device because it’s not paired correctly.
Check Xcode Device Pairing
- Open Xcode → Window → Devices and Simulators.
- Make sure your iPhone is listed under “Devices” and shows as paired (not just connected).
- If it’s not paired, click Pair Device and follow the prompts.
Trust the Signing Certificate
- In Keychain Access on your Mac, locate your Apple Development certificate.
- Ensure it’s marked as trusted. If not, right-click → Get Info → expand Trust → set to Always Trust.
Provisioning Profile
- Log into your Apple Developer account.
- Confirm your iPhone’s UDID is registered.
- Regenerate or download a provisioning profile that includes your device.
- In Visual Studio, go to Project Properties → iOS Bundle Signing and select the correct profile.
Reset Remote Device List in Visual Studio
- In Visual Studio (Mac or Windows with Pair-to-Mac), refresh the device list:
- Tools → iOS → Devices (or use the dropdown in the toolbar).
- If your phone doesn’t appear, restart both Visual Studio and Xcode.
Check Wireless Deployment Settings
- If you’re trying to deploy wirelessly, ensure:
- Both Mac and iPhone are on the same Wi-Fi.
- In Xcode, enable Connect via Network for your device.
- Sometimes, first deployment must be done via USB before wireless works.
Clear Old Certificates/Profiles
- Old or expired certs can cause chain errors.
- In Keychain Access, remove duplicates or expired Apple Development/Distribution certs.
- Re-download fresh ones from Apple Developer portal.
I hope this helps! Let me know if you stuck anywhere!