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

Single project iOS Service Extensions #8299

Closed
peter-bozovic opened this issue Jun 24, 2022 · 4 comments
Closed

Single project iOS Service Extensions #8299

peter-bozovic opened this issue Jun 24, 2022 · 4 comments
Labels
area-single-project Splash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizer proposal/open

Comments

@peter-bozovic
Copy link

Description

There is currently no documentation on how to add iOS Service Extensions on MAUI and it doesn't seem to be possible in the current first release.
In Xamarin, it was needed to have separate projects for that (like for push notifications: https://docs.microsoft.com/en-us/xamarin/ios/platform/user-notifications/enhanced-user-notifications#working-with-service-extensions)
In MAUI, it would be great if this can be handled by the compiler itself and only one project could handle the main app code and the services.

Public API Changes

Instead of adding new project, this should be handled within the new single project architecture.
It could be done by adding some attribute on the Class that will be used as a service and the build should pick this up and handle the creation of separate package if needed, etc.
Or there could be specific "Services" folder within iOS platform where different service classes could be created and transformed into service packages.

Intended Use-Case

Needed when iOS Service Extension is necessary, like to intercept encrypted push notification and decrypt them before the display.

@Eilon Eilon added the area-single-project Splash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizer label Jun 24, 2022
@emawby
Copy link

emawby commented Sep 16, 2022

Notification Service Extensions in particular are crucial for a lot of powerful push features, such as creating categories (buttons) on demand, downloading assets (images) on demand, and other modifying content of notifications before they are displayed

@Transatranticism
Copy link

Is there any solution?
I am very confused about this matter.

@rolfbjarne
Copy link
Member

We support extensions on iOS, and they're implemented very similarly to how they were in Xamarin.iOS: by using a separate project. The only roadblock is that we don't have any templates yet, so the simplest way to create them is likely to create a new extension using a legacy Xamarin.iOS template, and then port the project file to .NET.

See also #3289.

@mattleibow
Copy link
Member

Duplicate of dotnet/docs-maui#1343

@mattleibow mattleibow marked this as a duplicate of dotnet/docs-maui#1343 Mar 9, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Apr 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-single-project Splash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizer proposal/open
Projects
None yet
Development

No branches or pull requests

6 participants