Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: required update screen refers to iTunes Store instead of Apple App Store #210

Merged
merged 3 commits into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased
### Fixed
- Voice over and accessibility tags are not correctly set on the PIN screen
- Required update screen refers to iTunes Store instead of Apple App Store

### Internal
- Add integration test for declining the credential offer in an issuance session
Expand Down
20 changes: 11 additions & 9 deletions lib/src/screens/required_update/required_update_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,18 @@ class RequiredUpdateScreen extends StatelessWidget {
bottomNavigationBar: IrmaBottomBar(
primaryButtonLabel: FlutterI18n.translate(context, 'update.update_app'),
onPrimaryPressed: () {
switch (Platform.operatingSystem) {
case 'android':
launch('market://details?id=org.irmacard.cardemu');
break;
case 'ios':
launch('itms://itunes.apple.com/us/app/apple-store/id1294092994?mt=8');
break;
default:
throw Exception('Unsupported Platfrom.operatingSystem');
late String url;
if (Platform.isAndroid) {
url = 'https://play.google.com/store/apps/details?id=org.irmacard.cardemu';
} else if (Platform.isIOS) {
url = 'https://apps.apple.com/app/id1294092994';
} else {
throw Exception('Unsupported platform');
}
launchUrl(
Uri.parse(url),
mode: LaunchMode.externalNonBrowserApplication,
);
},
),
);
Expand Down