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 #22586

Closed
borigas opened this issue May 22, 2024 · 7 comments
Closed

iOS Notification Service Extension Deploy Fails #22586

borigas opened this issue May 22, 2024 · 7 comments
Labels
area-tooling XAML & C# Hot Reload, XAML Editor, Live Visual Tree, Live Preview, Debugging delighter-sc platform/iOS 🍎 s/move-to-vs-feedback Tells automation to ask the person to use VS Feedback to report the issue s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working

Comments

@borigas
Copy link

borigas commented May 22, 2024

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>

Link to public reproduction project repository

https://github.com/borigas/NotificationServiceExtensionRepro

Version with bug

8.0.21 SR4.1

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI, Yes, this used to work in Xamarin.Forms

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

No response

Did you find any workaround?

No, I have not been able to work around this problem. This is a blocker for me.

Relevant log output

No response

@borigas borigas added the t/bug Something isn't working label May 22, 2024
Copy link
Contributor

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@jaosnz-rep jaosnz-rep added s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage labels May 23, 2024
@jaosnz-rep
Copy link
Collaborator

Can repro this issue at iOS platform on the latest 17.11 Preview 1(8.0.40/8.0.21).
https://github.com/borigas/NotificationServiceExtensionRepro

@PureWeen PureWeen added area-tooling XAML & C# Hot Reload, XAML Editor, Live Visual Tree, Live Preview, Debugging s/move-to-vs-feedback Tells automation to ask the person to use VS Feedback to report the issue labels May 23, 2024
Copy link
Contributor

Thanks for the issue report @borigas! This issue appears to be a problem with Visual Studio, so we ask that you use the VS feedback tool to report the issue. That way it will get to the routed to the team that owns this experience in VS.

If you encounter a problem with Visual Studio, we want to know about it so that we can diagnose and fix it. By using the Report a Problem tool, you can collect detailed information about the problem, and send it to Microsoft with just a few button clicks.

  1. Go to the Visual Studio for Windows feedback tool or Visual Studio for Mac feedback tool to report the issue
  2. Close this bug, and consider adding a link to the VS Feedback issue so that others can follow its activity there.

Copy link
Contributor

Thanks for the issue report @borigas! This issue appears to be a problem with Visual Studio (Code), so we ask that you use the VS feedback tool to report the issue. That way it will get to the routed to the team that owns this experience in VS (Code).

If you encounter a problem with Visual Studio or the .NET MAUI VS Code Extension, we want to know about it so that we can diagnose and fix it. By using the Report a Problem tool, you can collect detailed information about the problem, and send it to Microsoft with just a few button clicks.

  1. Go to the Visual Studio for Windows feedback tool or .NET MAUI VS Code Extension repository to report the issue
  2. Close this bug, and consider adding a link to the VS Feedback issue so that others can follow its activity there.

@borigas
Copy link
Author

borigas commented May 23, 2024

I'm not convinced this is a problem with VS or VS Code. I can't deploy an iOS extension using VS, VS Code, dotnet run, or mlaunch. That said, I have created a feedback item at https://developercommunity.visualstudio.com/t/iOS-Notification-Service-Extension-Deplo/10665806 as well

@mattleibow
Copy link
Member

This is more likely an issue with the iOS SDK or the mlaunch tooling. Probably not directly IDE issues, but the people that fix deployment issues are the best. And since this is also VS and Pair to Mac, I am thinking this is best on that side.

I'm closing this one as you opened a new one in the developer community where IDE people live.

@borigas
Copy link
Author

borigas commented Jun 12, 2024

It's been 3 weeks since I posted using the VS feedback tool but haven't seen any evidence that a human even read it. Are you sure the IDE folks are still there?

I also want to clarify from your previous post that this is not VS or Pair to Mac specific. It does fail from VS with Pair to Mac, but also fails from VS Code on a Mac, from dotnet run directly on a Mac, and from mlaunch directly on a Mac.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-tooling XAML & C# Hot Reload, XAML Editor, Live Visual Tree, Live Preview, Debugging delighter-sc platform/iOS 🍎 s/move-to-vs-feedback Tells automation to ask the person to use VS Feedback to report the issue s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants