Cannot install my app on my iPad. Error MT1006: Could not install the application

Kim Strasser 1,301 Reputation points
2025-01-19T15:09:10.31+00:00

I always get this error in Visual Studio on Windows when I try to debug my iOS project on my iPad:

error MT1006: Could not install the application '/Users/kimstrasser/Library/Caches/Xamarin/mtbs/builds/MyAppiOS/32f79b8f682b34723c1c51ad8d136c490105a1a152109fdef3a3729d3eaaa0b7/bin/Debug/net9.0-ios/ios-arm64/MyAppiOS.app' on the device 'iPad Kim': One or more errors occurred. (Failed to execute 'devicectl': 'devicectl -j /var/folders/5c/b_5b2y1n7c129rl8611_7_hh0000gn/T/tmpzosP4V.tmp device install app --device "iPad Kim" /Users/kimstrasser/Library/Caches/Xamarin/mtbs/builds/MyAppiOS/32f79b8f682b34723c1c51ad8d136c490105a1a152109fdef3a3729d3eaaa0b7/bin/Debug/net9.0-ios/ios-arm64/MyAppiOS.app' returned the exit code 1.) (Additional output: xcrun devicectl -j /var/folders/5c/b_5b2y1n7c129rl8611_7_hh0000gn/T/tmpzosP4V.tmp device install app --device "iPad Kim" /Users/kimstrasser/Library/Caches/Xamarin/mtbs/builds/MyAppiOS/32f79b8f682b34723c1c51ad8d136c490105a1a152109fdef3a3729d3eaaa0b7/bin/Debug/net9.0-ios/ios-arm64/MyAppiOS.app) (Additional output: 15:51:21 Acquired tunnel connection to device.) (Additional output: 15:51:21 Enabling developer disk image services.) (Additional output: 15:51:21 Acquired usage assertion.) (Additional output: ERROR: Failed to install the app on the device. (com.apple.dt.CoreDeviceError error 3002 (0xBBA))) (Additional output: NSURL = file:///Users/kimstrasser/Library/Caches/Xamarin/mtbs/builds/MyAppiOS/32f79b8f682b34723c1c51ad8d136c490105a1a152109fdef3a3729d3eaaa0b7/bin/Debug/net9.0-ios/ios-arm64/MyAppiOS.app/) (Additional output: ----------------------------------------) (Additional output: NSLocalizedRecoverySuggestion = Failed to verify code signature of /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.94DrWd/extracted/MyAppiOS.app : 0xe8008015 (A valid provisioning profile for this executable was not found.)) (Additional output: ----------------------------------------) (Additional output: Failed to verify code signature of /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.94DrWd/extracted/MyAppiOS.app : 0xe8008015 (A valid provisioning profile for this executable was not found.) (MIInstallerErrorDomain error 13 (0x0D))) (Additional output: SourceFileLine = 79) (Additional output: FunctionName = +[MICodeSigningVerifier _validateSignatureAndCopyInfoForURL:withOptions:error:]) (Additional output: LegacyErrorString = ApplicationVerificationFailed) (Additional output: LibMISErrorNumber = -402620395) (Additional output: 1%... 2%... 3%... 4%... 5%... 6%... 7%... 8%... 9%... 10%... 11%... 12%... 13%... 14%... 15%... 16%... 18%... 19%... 20%... 21%... 22%... 23%... 24%... 25%... 26%... 27%... 28%... 30%... 31%... 32%... 33%... 34%... 35%... 36%... 37%... 38%... 39%... 40%... 41%... 42%... 43%... 44%... 45%... 46%... 47%... 48%... 49%... 50%... 51%... 52%... 53%... 54%... 55%... 56%... 57%... 59%... 60%... 62%... 66%... 68%... 72%... ).

My Apple account is added in Visual Studio and I have chosen my certificate Apple Development and provisioning profile Development in my iOS project properties-->iOS-->Bundle Signing.

Why is it not working?

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,913 questions
{count} votes

Accepted answer
  1. Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 35,346 Reputation points Microsoft Vendor
    2025-01-20T03:30:01.1966667+00:00

    Hello,

    A valid provisioning profile for this executable was not found

    This error means that there is not a valid provisioning profile for your app (and your iPad device)

    My Apple account is added in Visual Studio and I have chosen my certificate Apple Development and provisioning profile Development in my iOS project properties-->iOS-->Bundle Signing.

    Please follow the steps below to troubleshooting:

    1. Select manual provisioning for your app and double-check if you still can select the provisioning profile.
    2. Check if you add some iOS capabilities in the app's Entitlements.plist file. If so, the provisioning profile must contain an App ID, that matches your app's bundle identifier, with the required capabilities enabled. You may have to generate a provisioning profile manually. Please see iOS capabilities - .NET MAUI | Microsoft Learn and Manual provisioning for .NET MAUI iOS apps - .NET MAUI | Microsoft Learn
    3. Check if your device is included in the provisioning profile. You could go to Apple developer portal, select the provisioning profile, and click the 'Edit' button to see if your iPad is included in the 'Devices' list. If not, you could add the device and edit the provisioning profile to include it.
    4. Re-authorize the device. Opening iOS Settings, and Developer Tools, resetting "Clear Trusted computers" and then authorizing the iPad again.
    5. Use the latest VS and Xcode, clean the bin/obj file of your project and debug again.

    If you have any other issues during the troubleshooting process, please feel free to let me know.


    Update

    It works now. I have changed aps-environment in Entitlements.plist from:

    <key>aps-environment</key>
    <string>production</string>
    

    to:

    <key>aps-environment</key>
    <string>development</string>
    

    Yes, it's the root cause. It means that you are using APNs, the provisioning profile should be matched. Remember to change it back(production) when publishing the app on release mode.

    Best Regards,

    Wenyan Zhang


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

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.