Introducing AI Conversations: Natural Language Interaction for Your Apps! Learn More
App Support
Frameworks
.NET MAUI
IAppSupport exposes device info, browser/map helpers, and live notifications for changes the user may make in system settings (orientation, locale, time zone). Each event has its own lazy subscription — the native listener spins up when you add the first handler and tears down when the last one detaches.
Registration
Section titled “Registration”using Shiny;
builder.AddAppSupport(); // registers IAppSupportpublic class SettingsViewModel{ public SettingsViewModel(IAppSupport app) { // Snapshot Version current = app.AppVersion; DisplayOrientation o = app.CurrentOrientation; CultureInfo culture = app.CurrentCulture; TimeZoneInfo tz = app.CurrentTimeZone;
// Live updates app.OrientationChanged += (s, e) => { /* e is the new orientation */ }; app.CultureChanged += (s, e) => { /* e is the new CultureInfo */ }; app.TimeZoneChanged += (s, e) => { /* e is the new TimeZoneInfo */ }; }}| Member | Notes |
|---|---|
AppVersion | AppInfo.Version — the running app’s version (CFBundleShortVersionString on iOS, versionName on Android) |
DeviceManufacturer, DeviceModel | From MAUI DeviceInfo |
PlatformVersion | DeviceInfo.Version — the OS version |
CurrentOrientation + OrientationChanged | Surfaced through MAUI’s DeviceDisplay.MainDisplayInfoChanged on iOS/Android/macCatalyst/Windows |
CurrentCulture + CultureChanged | Native listeners on every platform; 30-second poller on bare TFMs |
CurrentTimeZone + TimeZoneChanged | Native listeners on every platform; 30-second poller on bare TFMs |
OpenBrowser | Wraps Browser.OpenAsync |
OpenMap | Wraps Map.TryOpenAsync |
SetOrientation(DisplayOrientation) | Programmatic orientation lock — returns false if the platform can’t honor the request |
ResetOrientation() | Clears any lock set via SetOrientation |
Orientation Lock
Section titled “Orientation Lock”await app.SetOrientation(DisplayOrientation.Landscape); // lock to landscapeawait app.ResetOrientation(); // restore system default| Platform | Mechanism |
|---|---|
| Android | Activity.RequestedOrientation set to SensorPortrait / SensorLandscape (sensor variants let the device flip between left/right) |
| iOS 16+ | UIWindowScene.RequestGeometryUpdate — the active view controller must permit the mask via supportedInterfaceOrientations or the request is silently dropped |
| iOS 15 and earlier | Not supported — returns false |
| macCatalyst | Not supported (windows don’t rotate) — returns false |
| Windows | DisplayInformation.AutoRotationPreferences |