Search code examples
iosxamarinxamarin.iosgoogle-fit

Xamarin iOS: Check if Google fit app is installed on the device


Is there any way to check if 'Google Fit' app is installed on iOS device?

I tried:

UIApplication.SharedApplication.CanOpenUrl(new NSUrl("FitApp://com.google.fit"));

this always returns false


Solution

  • You need to add FitApp to the LSApplicationQueriesSchemes array in your Info.plist (note, there is no colon).

    Then, in code your can check to see if you can open FitBit: - note the colon

    UIApplication.SharedApplication.CanOpenUrl(new NSUrl("FitApp:"));