0

I've tried following the documentation for ReactiveUI.Fody.

https://github.com/kswoll/ReactiveUI.Fody

  1. Added the FodyWeavers.xml the generated file to the shared project.
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
  <ReactiveUI />
</Weavers>
  1. Added the [Reactive] attribute to the property in the shared project.
    [Reactive]
    public int MyNumber
    {
       get;
       set;
    }
  1. Added references to the ReactiveUI.Fody 16.3.10 Nuget package to my Android, iOS & Shared project.

The property never updates to a newly set value.

Why doesn't this work?

Sach K
  • 591
  • 4
  • 20
  • 1
    please post the relevant code – Jason Nov 16 '21 at 22:34
  • And add link to the installation instructions you are following. Not sure if its still needed, but does FodyWeavers.xml contain line ``? – ToolmakerSteve Nov 17 '21 at 00:07
  • Probably deeper than you want/need to go, but might be worth looking at https://github.com/reactiveui/ReactiveUI/tree/main/integrationtests/IntegrationTests.XamarinForms and https://github.com/reactiveui/ReactiveUI/tree/main/integrationtests/IntegrationTests.XamarinForms.Android. Not sure exactly how to run those, but they presumably have been verified against current Xamarin.Forms. – ToolmakerSteve Nov 17 '21 at 00:16
  • Added extra information – Sach K Nov 17 '21 at 07:38

1 Answers1

0

For ReactiveUI.Fody 16.3.10, you need to ensure that The minimum version of Xamarin Android is Android 11.0, with SDK 30 and .Net Standard minimum version is 2.0.

Make sure your AndroidManifest.xml has SDK 30 as the target SDK.

If you want to dynamically refresh data in Xamarin Forms, using the INotifyPropertyChanged interface is also a good choice. For information about its use, you can refer to INotifyPropertyChanged.

Wen xu Li
  • 1,698
  • 1
  • 4
  • 7