Skip to content
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.

using Shiny;
builder.AddAppSupport(); // registers IAppSupport
public 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 */ };
}
}
MemberNotes
AppVersionAppInfo.Version — the running app’s version (CFBundleShortVersionString on iOS, versionName on Android)
DeviceManufacturer, DeviceModelFrom MAUI DeviceInfo
PlatformVersionDeviceInfo.Version — the OS version
CurrentOrientation + OrientationChangedSurfaced through MAUI’s DeviceDisplay.MainDisplayInfoChanged on iOS/Android/macCatalyst/Windows
CurrentCulture + CultureChangedNative listeners on every platform; 30-second poller on bare TFMs
CurrentTimeZone + TimeZoneChangedNative listeners on every platform; 30-second poller on bare TFMs
OpenBrowserWraps Browser.OpenAsync
OpenMapWraps Map.TryOpenAsync
SetOrientation(DisplayOrientation)Programmatic orientation lock — returns false if the platform can’t honor the request
ResetOrientation()Clears any lock set via SetOrientation
await app.SetOrientation(DisplayOrientation.Landscape); // lock to landscape
await app.ResetOrientation(); // restore system default
PlatformMechanism
AndroidActivity.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 earlierNot supported — returns false
macCatalystNot supported (windows don’t rotate) — returns false
WindowsDisplayInformation.AutoRotationPreferences