Unable to debug and connect to a real iOS device while running my MAUI app from windows

Shaik Nazeer 10 Reputation points
2025-05-28T04:35:10.6433333+00:00

Hi,

i had created a MAUI app on windows .netSDK 8.0 and using iOS xcode16 to debug and deploy that on to my real iOS mobile device, but unable to do that and getting a 'self signed root' error while im debuging the same.

Tried changing the .netSDK to .netSDK9.0 also but the error is same. We are using xcode16 on mac to connect real device.

can i get any solution for this.

Please find the attached screenshots of the errorimage.png

Developer technologies | .NET | .NET MAUI
{count} vote

2 answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Tony Dinh (WICLOUD CORPORATION) 945 Reputation points Microsoft External Staff
    2025-08-22T06:19:03.1166667+00:00

    Hello Shaik Nazeer!

    The issue you encountered is common and it's tied to your Mac/Xcode side with Apple's certificate. When your Xcode (on Mac) tries to sign your MAUI app for the iOS device, it checks the certificate chain. Your developer certificate is "signed" by Apple's intermediate cert (WWDR), which traces back to Apple's root cert. If the intermediate is missing, Xcode sees your cert as "self-signed" (untrusted), leading to the "unable to build chain to self-signed root" warning. This blocks deployment/debugging. Here is the logic of connection:

    • Windows sends code to Mac device
    • Mac builds/signs app using Xcode
    • Signing needs trusted chain but missing WWDR breaks chain
    • Error debugging to device

    Solutions

    To resolve it, download and install the missing Apple intermediate certificate on your Mac. Here's how you can do it step-by-step:

    1. Download the certificate: Go to Apple's Certificate Authority page: https://www.apple.com/certificateauthority/ Under "Intermediate Certificates," find and download the latest "Worldwide Developer Relations" (WWDR) cert. Look for the active .cer file.
    2. Install on Mac: After download, open the .cer file to open in Keychain Access (or search for "Keychain Access" app in your Mac). Add it to the "login" or "System" keychain (using System is better for all users).
    3. Trust the certificate: In Keychain Access, find the new WWDR cert (under "Certificates" category). Expand "Trust" section, set "When using this certificate" to "Always Trust" (requires admin privileges). Close and enter your Mac password if needed.
    4. Verify and restart: In Keychain, search for "WWDR" and confirm it's not marked "untrusted" or expired. Restart your Xcode and Visual Studio. Re-pair your Windows VS to the Mac if needed (Tools > iOS > Pair to Mac).
    5. Rebuild and debug: In Visual Studio, select your iOS project → Choose the real device → Build/Debug. If using automatic provisioning, then your VS should handle the rest of the process.
    Considerations
    • Don't use truly self-signed certs, always get from Apple Developer portal since in some cases self-signed won't work for iOS devices due to security. If your developer cert is expired, you can renew it via developer.apple.com > Certificates > Create new Development cert > Install on Mac. See here

    If the solution doesn't fix:

    • Check Keychain for duplicates/conflicts—delete old WWDR certs.
    • Re-download provisioning profile in Xcode (Xcode > Preferences > Accounts > Download Manual Profiles).
    • Test with iOS simulator first (no device needed) to isolate if it's cert vs. connection issue.
    • If error persists, share exact error text (from VS output window) for deeper debug—might be network/firewall between Windows/Mac.

    I hope this helps! Let me know if you get stuck anywhere!

    References:

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.