You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Microsoft.Android.Sdk.ILLink] preserve types with IJniNameProviderAttribute (#9099)
Fixes: #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.
With one exception, `Android.Runtime.RegisterAttribute`, should not be
preserved as that would be any Java type bound for C#.
0 commit comments