jamesmontemagno / StoreReviewPlugin

Request app store reviews across Xamarin and Windows applications
MIT License
184 stars 24 forks source link

Xamarin.Essentials dependency didn't work #29

Closed SnapADrag0n closed 3 years ago

SnapADrag0n commented 3 years ago

Bug

Version Number of Plugin: 3.1.0 Device Tested On: Samsung S9 (Android 10)

Expected Behavior

While installing StoreReview plugin, it should either warn to upgrade Xamarin.Essentials to v1.6.1 or should auto-upgrade Xamarin.Essentials to v1.6.1

Actual Behavior

StoreReview plugin installed without upgrading Xamarin.Essentials - This lead to In-App Review window not being displayed

Steps to reproduce the Behavior

  1. Create a new Xamarin Android solution
  2. Set Target Android version to Android 10.0
  3. Update Xamarin.Essentials to v1.0.1 in all your projects
  4. Install StoreReview v3.1.0 in all your projects

Issue Description

Even though I see dependency Xamarin.Essentials (>= 1.6.1) added for StoreReview v3.1.0 under MonoAndroid v10.0, the Xamarin.Essentials package didn't upgrade or warn about the version mismatch. On running the application, In-App Review window didn't show up, possibly due to Xamarin.Essentials.Platform.CurrentActivity returning null in StoreReviewImplementation.android.cs Nuget Issue

Let me know if this is not an issue or an issue with package manager.

jamesmontemagno commented 3 years ago

When i create a new project it comes with 1.6.1 of Xamarin.Essentials already and compiles against Android 11, not sure what version of VS you are on.

Seems like a packaging thing, it shouldn't have let you install the plugin at all because of my dependency on 1.6.1 and told you to update that first or do it for you.

Now of course unless you aren't building against Android 10 (compile not target) then maybe it wont know to update it and it didn't install anything. But i did verify your behavior and something is odd for sure.

Anyways, you should update to 1.6.1 or 1.7.0 and then make sure you initialize xamarin.essentials

SnapADrag0n commented 3 years ago

When i create a new project it comes with 1.6.1 of Xamarin.Essentials already and compiles against Android 11, not sure what version of VS you are on.

Seems like a packaging thing, it shouldn't have let you install the plugin at all because of my dependency on 1.6.1 and told you to update that first or do it for you.

Now of course unless you aren't building against Android 10 (compile not target) then maybe it wont know to update it and it didn't install anything. But i did verify your behavior and something is odd for sure.

@jamesmontemagno I am on VS 2019 v16.9.4 and a new project gives me 1.6.1 as you mentioned. But I was working on an existing project which had XE 1.0.1. And, Compile and Target were both set to Android 10. Anyways, I had already updated XE and issue was fixed - Raised the bug FYI and to save others time. Cheers!