Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS Notification Service Extension Deploy Fails #1386

Open
rolfbjarne opened this issue Aug 21, 2024 · 29 comments
Open

iOS Notification Service Extension Deploy Fails #1386

rolfbjarne opened this issue Aug 21, 2024 · 29 comments
Assignees
Labels
area-maui enhancement New feature or request triaged The issue has been triaged

Comments

@rolfbjarne
Copy link
Member

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 (dotnet/docs-maui#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:

  • Updating VS, XCode, dotnet, dotnet workloads
  • Rebooting Windows, Mac
  • Cleaning Windows, nuget package cache, Mac build cache, *.csproj.user
  • Deleting the connection to the Mac, disabling sharing on the Mac, enabling sharing on the Mac, recreating the connection
  • Deploying to different simulators/devices
  • Deploying to a local device with Hot Restart
  • Running mlaunch directly after building from VS:
    • /usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/17.2.8053/tools/bin/mlaunch --installdev ~/Library/Caches/Xamarin/mtbs/builds/MauiDebug/a30afb1d33bf5430897cbab9d42475927750458aadbcba47ce68f91a270a4fc6/bin/Release/net8.0-ios/iossimulator-arm64/MauiDebug.app --devname ocv6splus --wait-for-exit:false
      • Errors with error MT1006: Could not install the application '~/Library/Caches/Xamarin/mtbs/builds/MauiDebug/a30afb1d33bf5430897cbab9d42475927750458aadbcba47ce68f91a270a4fc6/bin/Release/net8.0-ios/iossimulator-arm64/MauiDebug.app' on the device 'ocv6splus': AMDeviceSecureInstallApplicationBundle returned: 0xe8008014
  • Building with dotnet build:
    • dotnet build -t:Run -f net8.0-ios -p:RuntimeIdentifier=ios-arm64 -p:_DeviceName="ocv6splus"
      • Errors with
      EXEC : error MT1006: Could not install the application 'bin/Debug/net8.0-ios/ios-arm64/MauiDebug.app/' on the device 'ocv6splus': AMDeviceSecureInstallApplicationBundle returned: 0xe800801c. [~/Repos/MauiDebug/MauiDebug.csproj]
      /usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/17.2.8053/targets/Xamarin.Shared.Sdk.targets(2068,3): error MSB3073: The command "/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 --wait-for-exit:false" exited with code 1. [~/Repos/MauiDebug/MauiDebug.csproj]
      

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
Copy link
Member Author

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
Copy link
Member Author

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
Copy link
Member Author

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
Copy link
Member Author

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
Copy link
Member Author

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
Copy link
Member Author

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

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

@rolfbjarne
Copy link
Member Author

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
Copy link
Member Author

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
Copy link
Member Author

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
Copy link
Member Author

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
Copy link
Member Author

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
Copy link
Member Author

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
Copy link
Member Author

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
Copy link
Member Author

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
Copy link
Member Author

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
Copy link
Member Author

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
Copy link
Member Author

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
Copy link

lores3000 commented Aug 26, 2024

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.

@emaf
Copy link
Member

emaf commented Oct 16, 2024

Hi all,

Sorry for the late reply.

I'm marking this an enhancement as neither Visual Studio nor the .NET MAUI extension for Visual Studio Code support .NET iOS app extensions. Visual Studio only supports Xamarin.iOS app extensions.

That said, referencing an app extension from your app project should not prevent from deploying it, but we can treat that as a separate issue.

@emaf emaf self-assigned this Oct 16, 2024
@emaf emaf added enhancement New feature or request triaged The issue has been triaged labels Oct 16, 2024
@borigas
Copy link

borigas commented Oct 16, 2024

I want to make sure I'm understanding correctly. I think you're saying MAUI iOS Service Extensions are supported, but not in VS/VS Code Maui Extension. Is that correct?

@emaf
Copy link
Member

emaf commented Oct 17, 2024

That's correct, there is not tooling support for this type of projects.

@wojciechkapko
Copy link

I find it absolutely insane that this is marked as "enhancement", for example we are trying to migrate a enterprise Xamarin app to MAUI, and neither visual studio or visual studio code is able to deploy the app because of the extension.

Sure, a obscure workaround exists but then guess what, Xcode gets updated to 16 and it no longer works. (dotnet/maui#24799)

You kill Xamarin support and tell people to migrate to MAUI. Then why MAUI tooling does not support basic iOS features like extensions.

@LucaDuttoTD
Copy link

Agreed with @wojciechkapko
If the tools don't support iOS extensions yet, there should be at least an official, clear, step by step documentation on how to create and deploy them "by hand" in MAUI.
It's simply ridiculous that, to be able to use those features, we have to dig through obscure GitHub issues scattered across the web, without really knowing what to do...

@KummerMario
Copy link

I have migrated my app from Xamarin to .net-ios some time ago and the deployment of app and extension worked with Visual Studio for Mac without problems. But now VS for MAC is deprecated as well and I need to switch to VS2022. Also with the iOS updates we have to migrate to newer versions. Like the two comments from wojciechkapko and LucaDuttoTD I am not happy how this is handled.

Libraries/Tools like Xamarin and Visual Studio for Mac get marked as deprecated and are not supported with updates anymore and we have to migrate to .net-ios and VS2022 with less features then before (e.g. without support for extension).

@kpareek1
Copy link

@rolfbjarne

Hi, I am having similar issue with iOS Call Extension project. Not able to deploy using VS on windows or VS Code on MAC. I tried mlaunch command as well. Only my MAUI App is getting deployed but not the extension. Jon Goldberger from Microsoft suggested to post here if you have any input.

@wojciechkapko
Copy link

@kpareek1

My suggestion would be to migrate away from maui to literally anything else.

@rolfbjarne
Copy link
Member Author

@KummerMario

Hi, I am having similar issue with iOS Call Extension project. Not able to deploy using VS on windows or VS Code on MAC. I tried mlaunch command as well. Only my MAUI App is getting deployed but not the extension. Jon Goldberger from Microsoft suggested to post here if you have any input.

Can you try building and running the main project from the command line:

dotnet build -t:Run /p:RuntimeIdentifiers=ios-arm64 /p:_DeviceName="My iPhone Name" path/to/executable.csproj /bl:msbuild.binlog

This should launch the app on the device, but a side effect is that it the app extension will be installed.

If this doesn't work (i.e. the app extension isn't installed), please attach the resulting msbuild.binlog.

@rolfbjarne
Copy link
Member Author

dotnet publish -f net8.0-ios -c Release -p:ArchiveOnBuild=true -p:RuntimeIdentifier=ios-arm64 -p:CodesignKey="Apple Distribution: John Smith (AY2GDE9QM7)" -p:CodesignProvision="MyMauiApp"

The problem with specifying properties on the command line is that they will apply to all projects (and they'll also override whatever is in the project files).

My recommendation would be to add the codesigning properties in the project files, potentially behind another property you can set from the command line:

<PropertyGroup Condition="'$(CodesignConf)' == 'Distribution'">
    <CodesignKey>Apple Distribution: John Smith (AY2GDE9QM7)</CodesignKey>
    <CodesignProvision>MyMauiApp</CodesignProvision>
</PropertyGroup>

and then in the extension project, the correct values for the extension project:

<PropertyGroup Condition="'$(CodesignConf)' == 'Distribution'">
    <CodesignKey>Apple Distribution: John Smith (AY2GDE9QM7)</CodesignKey>
    <CodesignProvision>MyMauiExtension</CodesignProvision>
</PropertyGroup>

and finally build from the command line like this:

dotnet publish -f net8.0-ios -c Release -p:ArchiveOnBuild=true -p:RuntimeIdentifier=ios-arm64 -p:CodesignConf=Distribution

@kpareek1
Copy link

@rolfbjarne After removing codesign properties from command line it worked, I was able to publish ipa with extension. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-maui enhancement New feature or request triaged The issue has been triaged
Projects
None yet
Development

No branches or pull requests

9 participants