microsoft / vscode-dotnettools

This is a feedback repository to capture issues logged for the C# Dev Kit and related extensions from Visual Studio Code
Other
221 stars 10 forks source link

iOS Notification Service Extension Deploy Fails #1386

Open rolfbjarne opened 3 weeks ago

rolfbjarne commented 3 weeks ago

From @borigas on Thu, 18 Jul 2024 21:14:21 GMT

Description

I'm trying to add an iOS Notification Service Extension to my app, but I can't get it to deploy from VS. I am connected to a Mac and have a device selected.

------ Deploy started: Project: MauiDebugNotificationServiceExtension, Configuration: Release Any CPU ------
Please select a valid device before running the application.
Deploy failed
------ Deploy started: Project: MauiDebug, Configuration: Release Any CPU ------
Xamarin.iOS does not support deploying the previous version. Please ensure your solution builds before deploying it.
Deploy failed
========== Build: 2 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Build completed at 2:19 PM and took 26.135 seconds ==========
========== Deploy: 0 succeeded, 2 failed, 0 skipped ==========
========== Deploy completed at 2:19 PM and took 26.135 seconds ==========

It looks like docs on how to use this haven't been done yet (https://github.com/dotnet/docs-maui/issues/1434). Instead, I referenced and tested a handful of 3rd party examples, but I get the same behavior. Examples referenced:

Other things I've tried include:

Steps to Reproduce

Try to run/deploy/debug from https://github.com/borigas/NotificationServiceExtensionRepro or any of the other examples mentioned above.

Or create a fresh Maui app with an iOS extension. To modify the Xamarin iOS extension to .NET 8, use this csproj:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFrameworks>net8.0-ios</TargetFrameworks>
    <OutputType>Library</OutputType>

    <ApplicationId>MauiDebugNotificationServiceExtension</ApplicationId>

    <ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
    <ApplicationVersion>1</ApplicationVersion>

    <Nullable>enable</Nullable>
    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
    <ImplicitUsings>enable</ImplicitUsings>
    <SupportedOSPlatformVersion>15.4</SupportedOSPlatformVersion>
  </PropertyGroup>

  <PropertyGroup>
    <IsAppExtension>True</IsAppExtension>
    <IsWatchExtension>False</IsWatchExtension>
  </PropertyGroup>
</Project>

Expected Behavior

The app and the extension both deploy and run

Actual Behavior

Both fail to deploy

Environment

Version information ``` 8.0.21 SR4.1 ```

Build Logs

Example Project (If Possible)

https://github.com/borigas/NotificationServiceExtensionRepro

Copied from original issue xamarin/xamarin-macios#20918

rolfbjarne commented 3 weeks ago

From @sarahfmurray on Mon, 29 Jul 2024 09:39:08 GMT

I am having the exact same problem. I've been trying so many things for weeks to fix it, thinking it may have been the entitlements being slightly wrong or something, but if you're getting the same error with a clean project then it can't be that. But your comment on the other thread has saved me (for now), so now I'm building an ipa in debug mode, and deploying that to my test iPhone. Thank you!

rolfbjarne commented 3 weeks ago

From @rolfbjarne on Tue, 06 Aug 2024 08:05:14 GMT

The test solution works if I change the bundle identifier of the extension to be prefixed with the main app's bundle identifier:

diff --git a/MauiDebugNotificationServiceExtension/Info.plist b/MauiDebugNotificationServiceExtension/Info.plist
index 2fa14d3..5abb1bf 100644
--- a/MauiDebugNotificationServiceExtension/Info.plist
+++ b/MauiDebugNotificationServiceExtension/Info.plist
@@ -7,7 +7,7 @@
        <key>CFBundleName</key>
        <string>MauiDebugNotificationServiceExtension</string>
        <key>CFBundleIdentifier</key>
-       <string>MauiDebugNotificationServiceExtension</string>
+       <string>com.companyname.mauidebug.NotificationServiceExtension</string>
        <key>CFBundleDevelopmentRegion</key>
        <string>en</string>
        <key>CFBundleInfoDictionaryVersion</key>
diff --git a/MauiDebugNotificationServiceExtension/MauiDebugNotificationServiceExtension.csproj b/MauiDebugNotificationServiceExtension/MauiDebugNotificationServiceExtension.csproj
index 6a1f5e7..38de6c5 100644
--- a/MauiDebugNotificationServiceExtension/MauiDebugNotificationServiceExtension.csproj
+++ b/MauiDebugNotificationServiceExtension/MauiDebugNotificationServiceExtension.csproj
@@ -3,7 +3,7 @@
     <TargetFrameworks>net8.0-ios</TargetFrameworks>
     <OutputType>Library</OutputType>

-    <ApplicationId>MauiDebugNotificationServiceExtension</ApplicationId>
+    <ApplicationId>com.companyname.mauidebug.NotificationServiceExtension</ApplicationId>

     <ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
     <ApplicationVersion>1</ApplicationVersion>

That said, the error code 0xe8008014 you're getting indicates a signing problem. Can you get a binary build log (https://github.com/xamarin/xamarin-macios/wiki/Diagnosis#binary-build-logs) of your app and attach it here?

rolfbjarne commented 3 weeks ago

From @borigas on Tue, 06 Aug 2024 18:36:27 GMT

@rolfbjarne thanks for taking a look. I pushed updates to the repro repo with the changes you suggested, but I'm still getting the same error.

Here's a binlog from the latest attempt in VS. It wouldn't let me upload with .binlog as the extension, so just change it back after downloading. CentralNode_devenv_PID=45216_x64_BuildManager_Default.log

rolfbjarne commented 3 weeks ago

From @rolfbjarne on Wed, 07 Aug 2024 14:06:15 GMT

@rolfbjarne thanks for taking a look. I pushed updates to the repro repo with the changes you suggested, but I'm still getting the same error.

Here's a binlog from the latest attempt in VS. It wouldn't let me upload with .binlog as the extension, so just change it back after downloading. CentralNode_devenv_PID=45216_x64_BuildManager_Default.log

That looks good to me.

Can you try creating a dummy Xcode project + a notification service extension and see if that works (use the same bundle identifier as the sample project)? Sometimes Xcode is able to automatically fix signing problems, so if it works, try again with your .NET project to see if it's been fixed.

rolfbjarne commented 3 weeks ago

From @borigas on Wed, 07 Aug 2024 15:23:23 GMT

I'm able to deploy a dummy app and extension with the same bundle ids from XCode, but still get the same error from VS.

rolfbjarne commented 3 weeks ago

From @rolfbjarne on Thu, 08 Aug 2024 10:41:37 GMT

Does it work if you use VSCode on the Mac directly?

rolfbjarne commented 3 weeks ago

From @borigas on Thu, 08 Aug 2024 17:47:38 GMT

Still doesn't work in VSCode. 2 observations that are possibly related:

  1. The app and the extension are using 2 different provisioning profiles. They're using the same code signing key, but different profiles. I believe both these profiles are being autogenerated. Provisioning Profile: "iOS Team Provisioning Profile: com.companyname.mauidebug" (4b7d65f2-9dc8-46b9-94f8-4b87bbcbe16a) vs Provisioning Profile: "iOS Team Provisioning Profile: *" (e896d5d1-3c56-4413-88c3-cfa5242f2c4d)
  2. A more detailed error is logged.
    warning HE1902: The application 'com.companyname.mauidebug.NotificationServiceExtension' has been signed with a provisioning profile which does not include the device 'ocv6splus'.
    Installing application bundle 'com.companyname.mauidebug.NotificationServiceExtension' on 'ocv6splus'
    ApplicationVerificationFailed: Failed to verify code signature of /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.klreW0/extracted/MauiDebugNotificationServiceExtension.appex.app : 0xe800801c (No code signature found.)
rolfbjarne commented 3 weeks ago

From @rolfbjarne on Fri, 09 Aug 2024 11:37:00 GMT

Still doesn't work in VSCode. 2 observations that are possibly related:

  1. The app and the extension are using 2 different provisioning profiles. They're using the same code signing key, but different profiles. I believe both these profiles are being autogenerated. Provisioning Profile: "iOS Team Provisioning Profile: com.companyname.mauidebug" (4b7d65f2-9dc8-46b9-94f8-4b87bbcbe16a) vs Provisioning Profile: "iOS Team Provisioning Profile: *" (e896d5d1-3c56-4413-88c3-cfa5242f2c4d)

Are these the same provisioning profiles the Xcode sample uses?

  1. A more detailed error is logged.
warning HE1902: The application 'com.companyname.mauidebug.NotificationServiceExtension' has been signed with a provisioning profile which does not include the device 'ocv6splus'.
Installing application bundle 'com.companyname.mauidebug.NotificationServiceExtension' on 'ocv6splus'
 ApplicationVerificationFailed: Failed to verify code signature of /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.klreW0/extracted/MauiDebugNotificationServiceExtension.appex.app : 0xe800801c (No code signature found.)

It looks like you deployed the extension, but you have to deploy the main app (which will include the extension). AFAIK VS doesn't allow you to do this, but I'm not sure if VSCode prevents you from doing it.

rolfbjarne commented 3 weeks ago

From @borigas on Fri, 09 Aug 2024 19:27:46 GMT

Are these the same provisioning profiles the Xcode sample uses?

Yes, they're the same profile Xcode says it's using

It looks like you deployed the extension, but you have to deploy the main app (which will include the extension). AFAIK VS doesn't allow you to do this, but I'm not sure if VS Code prevents you from doing it.

I think I am deploying the main app. I think VS Code is also filtering the extension, so there's only the app project to choose from. image

I could be wrong, but it seems like it's correctly trying to install the main app and extension, but failing because the extension isn't signed.

rolfbjarne commented 3 weeks ago

From @rolfbjarne on Mon, 12 Aug 2024 09:35:26 GMT

OK, let's do this on the command line then, to minimize noise from elsewhere.

  1. Clean your project (if you're using git, then git clean -xfd)

  2. Build the main app for device:

    dotnet build /p:RuntimeIdentifier=ios-arm64 /bl -f net8.0-ios
  3. Try to install using mlaunch directly:

    /usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/17.2.8053/tools/bin/mlaunch --installdev bin/Debug/net8.0-ios/ios-arm64/MauiDebug.app/ --devname ocv6splus

What's the complete output of the last command?

I know you tried to invoke mlaunch directly before, but then you tried to install a build for the simulator (see "iossimulator-arm64" in the command line somewhere), which obviously didn't work.

rolfbjarne commented 3 weeks ago

From @borigas on Mon, 12 Aug 2024 16:26:37 GMT

Good catch on simulator being in there. I think there was something else I was testing on the simulator and I reused that command without updating.

Using mlaunch from the command line appears to be working after building via dotnet build. mlaunch is also working using the artifacts left behind by a failed VS Code debug attempt.

Here's the output from mlaunch:

``` 2024-08-12 11:18:31.388 mlaunch[27984:15624919] Requested but did not find extension point with identifier Xcode.IDEDebugger.VariablesViewQuickLookProvider for extension Xcode.SpriteKit.GKStateMachineQuickLookProvider of plug-in com.apple.IDESpriteKitParticleEditor 2024-08-12 11:18:31.389 mlaunch[27984:15624919] Requested but did not find extension point with identifier Xcode.IDEDebugger.VariablesViewQuickLookProvider for extension Xcode.IDEDebugger.SpriteKitQuickLookProvider of plug-in com.apple.IDESpriteKitParticleEditor 2024-08-12 11:18:31.396 mlaunch[27984:15624919] Requested but did not find extension point with identifier Xcode.Xcode3ProjectSupport.TargetSummaryEditor for extension Xcode.Xcode3ProjectSupport.TargetSummaryEditor.WatchOS.WatchKit2-AppExtension of plug-in com.apple.dt.IDEWatchSupportUI 2024-08-12 11:18:31.396 mlaunch[27984:15624919] Requested but did not find extension point with identifier Xcode.IDEiPhoneSupport.TargetEditor for extension Xcode.IDEiPhoneSupport.TargetEditor.WatchOS.Application of plug-in com.apple.dt.IDEWatchSupportUI 2024-08-12 11:18:31.396 mlaunch[27984:15624919] Requested but did not find extension point with identifier Xcode.Xcode3ProjectSupport.InfoEditorType for extension Xcode.Xcode3ProjectSupport.InfoEditorType.WatchOS.Bundle of plug-in com.apple.dt.IDEWatchSupportUI 2024-08-12 11:18:31.396 mlaunch[27984:15624919] Requested but did not find extension point with identifier Xcode.Xcode3ProjectSupport.TargetSummaryEditor for extension Xcode.Xcode3ProjectSupport.TargetSummaryEditor.WatchOS.Tool of plug-in com.apple.dt.IDEWatchSupportUI 2024-08-12 11:18:31.396 mlaunch[27984:15624919] Requested but did not find extension point with identifier Xcode.Xcode3ProjectSupport.TargetSummaryEditor for extension Xcode.Xcode3ProjectSupport.TargetSummaryEditor.WatchOS.Application of plug-in com.apple.dt.IDEWatchSupportUI 2024-08-12 11:18:31.396 mlaunch[27984:15624919] Requested but did not find extension point with identifier Xcode.DebuggerFoundation.ViewDescriber for extension Xcode.DebuggerFoundation.watchOSSimulator.ViewDescriber of plug-in com.apple.dt.IDEWatchSupportUI 2024-08-12 11:18:31.396 mlaunch[27984:15624919] Requested but did not find extension point with identifier Xcode.Xcode3ProjectSupport.TargetSummaryEditor for extension Xcode.Xcode3ProjectSupport.TargetSummaryEditor.WatchOS.Framework of plug-in com.apple.dt.IDEWatchSupportUI 2024-08-12 11:18:31.396 mlaunch[27984:15624919] Requested but did not find extension point with identifier Xcode.Xcode3UI.Xcode3SupportedDestinations for extension IDEWatchSupportUI:IDEWatchSupportUI.plugindata/plug-in[1]/extension[20] of plug-in com.apple.dt.IDEWatchSupportUI 2024-08-12 11:18:31.396 mlaunch[27984:15624919] Requested but did not find extension point with identifier Xcode.DebuggerFoundation.DataSourceConnection for extension Xcode.DebuggerFoundation.watchOS.DataSourceConnectionTargetHub of plug-in com.apple.dt.IDEWatchSupportUI 2024-08-12 11:18:31.397 mlaunch[27984:15624919] Requested but did not find extension point with identifier Xcode.DebuggerFoundation.DataSourceConnection for extension Xcode.DebuggerFoundation.watchOSSimulator.DataSourceConnectionTargetHub of plug-in com.apple.dt.IDEWatchSupportUI 2024-08-12 11:18:31.397 mlaunch[27984:15624919] Requested but did not find extension point with identifier Xcode.Xcode3ProjectSupport.TargetSummaryEditor for extension Xcode.Xcode3ProjectSupport.TargetSummaryEditor.WatchOS.ExtensionKitAppExtension of plug-in com.apple.dt.IDEWatchSupportUI 2024-08-12 11:18:31.397 mlaunch[27984:15624919] Requested but did not find extension point with identifier Xcode.Xcode3ProjectSupport.TargetSummaryEditor for extension Xcode.Xcode3ProjectSupport.TargetSummaryEditor.WatchOS.AppExtension of plug-in com.apple.dt.IDEWatchSupportUI 2024-08-12 11:18:31.397 mlaunch[27984:15624919] Requested but did not find extension point with identifier Xcode.Xcode3ProjectSupport.TargetSummaryEditor for extension Xcode.Xcode3ProjectSupport.TargetSummaryEditor.WatchOS.WatchApplication of plug-in com.apple.dt.IDEWatchSupportUI 2024-08-12 11:18:31.397 mlaunch[27984:15624919] Requested but did not find extension point with identifier Xcode.Xcode3ProjectSupport.TargetSummaryEditor for extension Xcode.Xcode3ProjectSupport.TargetSummaryEditor.WatchOS.IntentsService-AppExtension of plug-in com.apple.dt.IDEWatchSupportUI 2024-08-12 11:18:31.397 mlaunch[27984:15624919] Requested but did not find extension point with identifier Xcode.Xcode3ProjectSupport.InfoEditorSlice for extension Xcode.Xcode3ProjectSupport.InfoEditorSlice.WatchOS.BundleInfo of plug-in com.apple.dt.IDEWatchSupportUI 2024-08-12 11:18:31.397 mlaunch[27984:15624919] Requested but did not find extension point with identifier Xcode.DebuggerFoundation.ViewDescriber for extension Xcode.DebuggerFoundation.watchOS.ViewDescriber of plug-in com.apple.dt.IDEWatchSupportUI 2024-08-12 11:18:31.397 mlaunch[27984:15624919] Requested but did not find extension point with identifier Xcode.Xcode3UI.Xcode3SupportedDestinations for extension IDEOSXSupportUI:IDEOSXSupportUI.plugindata/plug-in[1]/extension[5] of plug-in com.apple.dt.IDE.IDEOSXSupportUI 2024-08-12 11:18:31.397 mlaunch[27984:15624919] Requested but did not find extension point with identifier Xcode.Xcode3ProjectSupport.TargetSummaryEditor for extension Xcode.Xcode3ProjectSupport.TargetSummaryEditor.XROS.DynamicLibrary of plug-in com.apple.dt.IDE.IDESupportUI-xrOS 2024-08-12 11:18:31.397 mlaunch[27984:15624919] Requested but did not find extension point with identifier Xcode.Xcode3ProjectSupport.TargetSummaryEditor for extension Xcode.Xcode3ProjectSupport.TargetSummaryEditor.XROS.ExtensionKitAppExtension of plug-in com.apple.dt.IDE.IDESupportUI-xrOS 2024-08-12 11:18:31.397 mlaunch[27984:15624919] Requested but did not find extension point with identifier Xcode.Xcode3ProjectSupport.TargetSummaryEditor for extension Xcode.Xcode3ProjectSupport.TargetSummaryEditor.XROS.XPC of plug-in com.apple.dt.IDE.IDESupportUI-xrOS 2024-08-12 11:18:31.397 mlaunch[27984:15624919] Requested but did not find extension point with identifier Xcode.Xcode3ProjectSupport.InfoEditorType for extension Xcode.Xcode3ProjectSupport.InfoEditorType.Reality.Application of plug-in com.apple.dt.IDE.IDESupportUI-xrOS 2024-08-12 11:18:31.397 mlaunch[27984:15624919] Requested but did not find extension point with identifier Xcode.Xcode3ProjectSupport.TargetSummaryEditor for extension Xcode.Xcode3ProjectSupport.TargetSummaryEditor.XROS.Bundle of plug-in com.apple.dt.IDE.IDESupportUI-xrOS 2024-08-12 11:18:31.397 mlaunch[27984:15624919] Requested but did not find extension point with identifier Xcode.Xcode3ProjectSupport.InfoEditorType for extension Xcode.Xcode3ProjectSupport.InfoEditorType.Reality.Framework of plug-in com.apple.dt.IDE.IDESupportUI-xrOS 2024-08-12 11:18:31.397 mlaunch[27984:15624919] Requested but did not find extension point with identifier Xcode.Xcode3ProjectSupport.TargetSummaryEditor for extension Xcode.Xcode3ProjectSupport.TargetSummaryEditor.XROS.Application of plug-in com.apple.dt.IDE.IDESupportUI-xrOS 2024-08-12 11:18:31.397 mlaunch[27984:15624919] Requested but did not find extension point with identifier Xcode.Xcode3ProjectSupport.TargetSummaryEditor for extension Xcode.Xcode3ProjectSupport.TargetSummaryEditor.XROS.Tool of plug-in com.apple.dt.IDE.IDESupportUI-xrOS 2024-08-12 11:18:31.397 mlaunch[27984:15624919] Requested but did not find extension point with identifier Xcode.Xcode3ProjectSupport.InfoEditorType for extension Xcode.Xcode3ProjectSupport.InfoEditorType.Reality.Bundle of plug-in com.apple.dt.IDE.IDESupportUI-xrOS 2024-08-12 11:18:31.397 mlaunch[27984:15624919] Requested but did not find extension point with identifier Xcode.Xcode3UI.Xcode3SupportedDestinations for extension IDESupportUI_xrOS:IDESupportUI_xrOS.plugindata/plug-in[1]/extension[13] of plug-in com.apple.dt.IDE.IDESupportUI-xrOS 2024-08-12 11:18:31.397 mlaunch[27984:15624919] Requested but did not find extension point with identifier Xcode.Xcode3ProjectSupport.TargetSummaryEditor for extension Xcode.Xcode3ProjectSupport.TargetSummaryEditor.XROS.AppExtension of plug-in com.apple.dt.IDE.IDESupportUI-xrOS 2024-08-12 11:18:31.397 mlaunch[27984:15624919] Requested but did not find extension point with identifier Xcode.Xcode3ProjectSupport.TargetSummaryEditor for extension Xcode.Xcode3ProjectSupport.TargetSummaryEditor.XROS.Framework of plug-in com.apple.dt.IDE.IDESupportUI-xrOS 2024-08-12 11:18:31.397 mlaunch[27984:15624919] Requested but did not find extension point with identifier Xcode.DebuggerFoundation.ViewDescriber for extension Xcode.DebuggerFoundation.ATVSimulator.ViewDescriber of plug-in com.apple.dt.IDEAppleTVSupportUI 2024-08-12 11:18:31.397 mlaunch[27984:15624919] Requested but did not find extension point with identifier Xcode.Xcode3ProjectSupport.TargetSummaryEditor for extension Xcode.Xcode3ProjectSupport.TargetSummaryEditor.IDEAppleTVSupportUI.ExtensionKitAppExtension of plug-in com.apple.dt.IDEAppleTVSupportUI 2024-08-12 11:18:31.397 mlaunch[27984:15624919] Requested but did not find extension point with identifier Xcode.Xcode3ProjectSupport.TargetSummaryEditor for extension Xcode.Xcode3ProjectSupport.TargetSummaryEditor.IDEAppleTVSupportUI.AppExtension of plug-in com.apple.dt.IDEAppleTVSupportUI 2024-08-12 11:18:31.397 mlaunch[27984:15624919] Requested but did not find extension point with identifier Xcode.Xcode3ProjectSupport.TargetSummaryEditor for extension Xcode.Xcode3ProjectSupport.TargetSummaryEditor.IDEAppleTVSupportUIFramework of plug-in com.apple.dt.IDEAppleTVSupportUI 2024-08-12 11:18:31.397 mlaunch[27984:15624919] Requested but did not find extension point with identifier Xcode.Xcode3ProjectSupport.InfoEditorSlice for extension Xcode.Xcode3ProjectSupport.InfoEditorSlice.appletvos.BundleTargetInfo of plug-in com.apple.dt.IDEAppleTVSupportUI 2024-08-12 11:18:31.397 mlaunch[27984:15624919] Requested but did not find extension point with identifier Xcode.DebuggerFoundation.DataSourceConnection for extension Xcode.DebuggerFoundation.tvOS.DataSourceConnectionTargetHub of plug-in com.apple.dt.IDEAppleTVSupportUI 2024-08-12 11:18:31.398 mlaunch[27984:15624919] Requested but did not find extension point with identifier Xcode.DebuggerFoundation.ViewDescriber for extension Xcode.DebuggerFoundation.ATV.ViewDescriber of plug-in com.apple.dt.IDEAppleTVSupportUI 2024-08-12 11:18:31.398 mlaunch[27984:15624919] Requested but did not find extension point with identifier Xcode.Xcode3ProjectSupport.InfoEditorType for extension Xcode.Xcode3ProjectSupport.InfoEditorType.appletvos.Bundle of plug-in com.apple.dt.IDEAppleTVSupportUI 2024-08-12 11:18:31.398 mlaunch[27984:15624919] Requested but did not find extension point with identifier Xcode.DebuggerFoundation.DataSourceConnection for extension Xcode.DebuggerFoundation.tvOSSimulator.DataSourceConnectionTargetHub of plug-in com.apple.dt.IDEAppleTVSupportUI 2024-08-12 11:18:31.398 mlaunch[27984:15624919] Requested but did not find extension point with identifier Xcode.Xcode3ProjectSupport.TargetSummaryEditor for extension Xcode.Xcode3ProjectSupport.TargetSummaryEditor.IDEAppleTVSupportUI.Application of plug-in com.apple.dt.IDEAppleTVSupportUI 2024-08-12 11:18:31.398 mlaunch[27984:15624919] Requested but did not find extension point with identifier Xcode.Xcode3UI.Xcode3SupportedDestinations for extension IDEAppleTVSupportUI:IDEAppleTVSupportUI.plugindata/plug-in[1]/extension[16] of plug-in com.apple.dt.IDEAppleTVSupportUI 2024-08-12 11:18:31.398 mlaunch[27984:15624919] Requested but did not find extension point with identifier Xcode.Xcode3ProjectSupport.TargetSummaryEditor for extension Xcode.Xcode3ProjectSupport.TargetSummaryEditor.IDEAppleTVSupportUI.XPC of plug-in com.apple.dt.IDEAppleTVSupportUI 2024-08-12 11:18:31.398 mlaunch[27984:15624919] Requested but did not find extension point with identifier Xcode.DebuggerFoundation.DeviceIconProvider for extension Xcode.DebuggerFoundation.DeviceIconProvider.AppleTV of plug-in com.apple.dt.IDEAppleTVSupportUI Please connect the device 'ocv6splus'... Installing application bundle 'com.companyname.mauidebug' on 'ocv6splus' Application bundle 'com.companyname.mauidebug' installed on 'ocv6splus' ```
rolfbjarne commented 3 weeks ago

From @rolfbjarne on Mon, 12 Aug 2024 17:05:07 GMT

Yes, that's a successful installation.

Is the app extension working on the device?

rolfbjarne commented 3 weeks ago

From @borigas on Mon, 12 Aug 2024 17:53:02 GMT

Yep, it's working when installed via mlaunch. Seems like VS Code and VS are trying to do something slightly different to install?

rolfbjarne commented 3 weeks ago

From @borigas on Mon, 12 Aug 2024 18:27:20 GMT

Actually, re-reading your question, I haven't proven the extension is working. The main app itself is working, but I don't know a good way to verify the extension without jumping through Apple hoops to send APNS to that repro bundle id. Any suggestions?

rolfbjarne commented 3 weeks ago

From @rolfbjarne on Thu, 15 Aug 2024 10:11:12 GMT

Actually, re-reading your question, I haven't proven the extension is working. The main app itself is working, but I don't know a good way to verify the extension without jumping through Apple hoops to send APNS to that repro bundle id. Any suggestions?

You could just change the bundle id in your repro project to the one for your real project.

rolfbjarne commented 3 weeks ago

From @borigas on Fri, 16 Aug 2024 16:28:44 GMT

Fair enough. I was trying to keep things identical to the repro repo, but that's an easy solution.

The NSE is running when installed via mlaunch. It's able to modify the content of the push notification.

rolfbjarne commented 3 weeks ago

From @rolfbjarne on Wed, 21 Aug 2024 15:40:58 GMT

I can reproduce the problem where VSCode for some reason tries to install the extension, even if the main project is the startup project. This seems like a bug in VSCode, so I'm moving this issue there.

lores3000 commented 3 weeks ago

Thank you! I can confirm that building and installing an app with a Call Directory Extension works from command line (dotnet build and mlaunch).

As i spent some time trying to find a solution to this issue, I hope that the following text will help others find this thread when they search for the error code or description:

After Launching, i see the following in the debug console. As you mentioned, VS Code tries to install the appex instead of the app.

ERROR: Failed to install the app on the device. (com.apple.dt.CoreDeviceError error 3002 (0xBBA)) NSLocalizedFailureReason = The provided item to be installed is not of a type that CoreDevice recognizes. NSURL = file:///Users/lores3000/Documents/git/maui-extension-test/extension/bin/Debug/net8.0-ios/ios-arm64/extension.appex/

Here's the reproduction project (just the hello world app and an extension): https://github.com/lores3000/maui-extension-test

Hope this helps.