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

[Microsoft.Android.Sdk.ILLink] preserve types with IJniNameProviderAttribute #9099

Merged

Commits on Jul 11, 2024

  1. [Microsoft.Android.Sdk.ILLink] preserve types with `IJniNameProviderA…

    …ttribute`
    
    Fixes: dotnet#8940
    Context: TobiasBuchholz/Plugin.Firebase#144
    
    Using the NuGet package:
    
        <PackageReference Include="Plugin.Firebase.CloudMessaging" Version="3.0.0" />
    
    Includes a service:
    
        namespace Plugin.Firebase.CloudMessaging.Platforms.Android;
    
        [Service(Exported = true)]
        [IntentFilter(new[] { "com.google.firebase.MESSAGING_EVENT" })]
        public class MyFirebaseMessagingService : FirebaseMessagingService
    
    Unfortunately, using `TrimMode=full` completely trims away the above
    service, which is required for push notifications to work.
    
    I could reproduce this problem in a test using the above NuGet package.
    
    To fix this, we can modify `MarkJavaObjects` to preserve types with
    attributes that implement `Java.Interop.IJniNameProviderAttribute`,
    and the new test now passes.
    jonathanpeppers committed Jul 11, 2024
    Configuration menu
    Copy the full SHA
    1297bf0 View commit details
    Browse the repository at this point in the history
  2. formatting

    jonathanpeppers committed Jul 11, 2024
    Configuration menu
    Copy the full SHA
    e1afd73 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    49b46e3 View commit details
    Browse the repository at this point in the history
  4. Revert "Update BuildReleaseArm64XFormsDotNet.apkdesc"

    This reverts commit 49b46e3.
    jonathanpeppers committed Jul 11, 2024
    Configuration menu
    Copy the full SHA
    36d58ae View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c4bffbd View commit details
    Browse the repository at this point in the history