Skip to content

Commit fe53311

Browse files
Add conditional compilation for non-iOS platforms
Introduce `#if !IOS` directives to include methods only for non-iOS builds. Comment out unused `IsIOS` method, streamlining the `HomePageViewModel` class for better platform-specific logic handling.
1 parent 31bf67f commit fe53311

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

TransactionMobile.Maui.BusinessLogic/ViewModels/HomePageViewModel.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public async Task ShowDebugMessage(String message) {
3636

3737
#region Methods
3838

39+
#if !IOS
3940
public async Task Initialise(CancellationToken cancellationToken) {
4041
Configuration configuration = this.ApplicationCache.GetConfiguration();
4142

@@ -59,13 +60,14 @@ public async Task Initialise(CancellationToken cancellationToken) {
5960
Logger.LogError("Error during initialise", ex);
6061
}
6162
}
63+
#endif
6264

6365
private async void NoReleaseAvailable() {
6466
await this.DialogService.ShowDialog("Software Update", "No Release Available","OK");
6567
}
6668

67-
//private Boolean IsIOS() => this.DeviceService.IsIOS//DeviceInfo.Current.Platform == DevicePlatform.iOS;
6869

70+
#if !IOS
6971
private Boolean OnReleaseAvailable(ReleaseDetails releaseDetails) {
7072
Logger.LogInformation("In OnReleaseAvailable");
7173
// Look at releaseDetails public properties to get version information, release notes text or release notes URL
@@ -111,6 +113,7 @@ private Boolean OnReleaseAvailable(ReleaseDetails releaseDetails) {
111113
// Return true if you're using your own dialog, false otherwise
112114
return true;
113115
}
116+
#endif
114117

115-
#endregion
118+
#endregion
116119
}

0 commit comments

Comments
 (0)