Skip to content

Commit

Permalink
chore: adding missing Essentials APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
dansiegel committed Oct 18, 2024
1 parent b171f51 commit 6a0f2d9
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
24 changes: 24 additions & 0 deletions docs/plugins/essentials/latestversion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
uid: Plugins.Essentials.LatestVersion
---

# Latest Version

The `ILatestVersion` provides a cross platform and cross framework API to check if your app is up to date. By default this is Support on Android, iOS, MacCatalyst and WinUI. The interface is also resolvable for WPF and the remaining Uno Platform targets. For the unsupported targets `SupportsAppStore` will return false. `IsUsingLatestVersion` will return true and `GetLatestVersionNumber` will return the current app version. `OpenAppInStore` will throw a `PlatformNotSupportedException`.

```cs
public interface ILatestVersion
{
string CountryCode { get; set; }

string InstalledVersionNumber { get; }

bool SupportsAppStore { get; }

Task<bool> IsUsingLatestVersion();

Task<string> GetLatestVersionNumber();

Task OpenAppInStore();
}
```
16 changes: 16 additions & 0 deletions docs/plugins/essentials/phonedialer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
uid: Plugins.Essentials.PhoneDialer
---

# Phone Dialer

The `IPhoneDialer` provides a cross platform API to open a Phone number on Android and iOS. This API is exposed on all Prism platforms and will provide a default implementation where `IsSupported` will provide a value of false. You should check this before attempting to open a phone number.

```cs
public interface IPhoneDialer
{
bool IsSupported { get; }

void Open(string number);
}
```
6 changes: 6 additions & 0 deletions docs/plugins/essentials/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@
href: connectivity.md
- name: File System
href: filesystem.md
- name: LatestVersion
href: latestversion.md
- name: Main Thread
href: mainthread.md
- name: Permissions
href: permissions.md
- name: Phone Dialer
href: phonedialer.md
- name: Stores
href: stores.md

0 comments on commit 6a0f2d9

Please sign in to comment.