Skip to content

Commit

Permalink
feat: adds support to macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
diegocoxta committed Oct 29, 2021
1 parent cab1daf commit 50c4491
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -2,7 +2,7 @@

The Flutter port of the popular [Siren](https://github.com/ArtSabintsev/Siren), one way to notify users when a new version of your app is available and prompt them to upgrade.

🚀 Supports iOS and Android.
🚀 Supports iOS, Android and MacOS.

## Install
Add this to your package's pubspec.yaml file:
Expand Down
8 changes: 6 additions & 2 deletions lib/src/siren.dart
Expand Up @@ -15,11 +15,15 @@ class Siren {
SirenStoreResponse(version: '', package: '', url: '');

static SirenStoreService _getStoreClient() {
if (Platform.isIOS) {
if (Platform.isAndroid) {
return SirenGooglePlayStore();
}

if (Platform.isIOS || Platform.isMacOS) {
return SirenAppleAppStore();
}

return SirenGooglePlayStore();
throw UnimplementedError('This lib only supports Android, iOS and MacOS');
}

// This method checks for an update in the application store and returns if there is a newer version than the local one.
Expand Down

0 comments on commit 50c4491

Please sign in to comment.