flutterfire icon indicating copy to clipboard operation
flutterfire copied to clipboard

[firebase_core] Update `initiateOnDeviceConversionMeasurementWithEmailAddress` code sample

Open Mercutio1243 opened this issue 1 year ago • 2 comments

Bug report

Describe the bug When using the example project from the repository with android device, I get an exception:

Exception has occurred.
UnimplementedError (UnimplementedError: initiateOnDeviceConversionMeasurementWithEmailAddress() is only supported on iOS.)

Steps to reproduce

  1. Download and run example project with Android device.
  2. tab initiateOnDeviceConversionMeasurement button

Expected behavior

No error

Sample project

Example project from repository

Mercutio1243 avatar Jan 31 '24 09:01 Mercutio1243

Hi @Mercutio1243, the error message indicates that the method you're calling is only supported on iSO. In your actual app, you should check if the platform is iOS before you use that method.

We will have to update the example to do that check.

danagbemava-nc avatar Jan 31 '24 10:01 danagbemava-nc

Thanks! I am just using the example project to test my firebase setup. It will be an improvement, if it avoids these errors under Android.

Mercutio1243 avatar Jan 31 '24 10:01 Mercutio1243

Closing this since it's expected behavior.

Lyokone avatar Mar 11 '24 13:03 Lyokone