Skip to content

InputInjector members are marked [NotImplemented] on Android, iOS and WASM although they work, causing UNO0001 warnings #25339

Open

Description

@MartinZikmund

Current behavior 🐛

Most InputInjector members are marked [Uno.NotImplemented] for the Android, iOS/tvOS and WebAssembly flavors, even though injection is implemented and works on those Skia heads. The member list on master (InputInjector.cs):

Member Flavors listed as not implemented
TryCreate() / TryCreate(object) (L73, L91) __ANDROID__, __IOS__, __NETSTD_REFERENCE__
InjectMouseInput (L496) __ANDROID__, __IOS__, __WASM__, __NETSTD_REFERENCE__
InjectKeyboardInput (L329, added by #23970) __ANDROID__, __IOS__, __TVOS__, IS_UNIT_TESTS, __WASM__, __NETSTD_REFERENCE__
Initialize/UninitializeTouchInjection, InjectTouchInput, Initialize/UninitializePenInjection, InjectPenInput (L133-L259) __ANDROID__, __IOS__, __TVOS__, __WASM__, __NETSTD_REFERENCE__

Because Uno.WinRT is built once per flavor, the UnoNotImplementedAnalyzer (UNO0001) evaluates these tokens against the consumer's flavor. An app head or library built for browserwasm, android or ios that calls these members gets a "not implemented" warning for an API that works there.

Expected behavior 🎯

The attributes should list only flavors where the API really is unimplemented (__NETSTD_REFERENCE__), or be dropped. No UNO0001 warning on Skia Android, iOS/tvOS or WebAssembly heads. The IS_UNIT_TESTS token on InjectKeyboardInput is not a flavor token the analyzer knows and has no effect.

For comparison, WinUI implements InputInjector fully; this is a metadata problem in Uno only.

How to reproduce it 🔬

Confirmed by code inspection on master (0599dad), not at runtime.

  1. Create (or take) a Skia head targeting net10.0-browserwasm, net10.0-android or net10.0-ios.
  2. Add the following to any code file in that head:
var injector = InputInjector.TryCreate();
injector?.InjectMouseInput(new[] { new InjectedInputMouseInfo() });
injector?.InjectKeyboardInput(new[] { new InjectedInputKeyboardInfo() });
  1. Build. Expected diagnostics: UNO0001 on TryCreate, InjectMouseInput and InjectKeyboardInput (the analyzer maps BROWSERWASM to __WASM__, ANDROID to __ANDROID__, IOS to __IOS__, see UnoNotImplementedAnalyzer.GetConsumerFlavors and IsPerFlavorAssembly for Uno.WinRT).

Why the API is implemented on those heads (source-backed):

  • InputInjector.cs has no platform suffix and no #if, so it compiles into every Uno.WinRT flavor.
  • Uno.UI is a single Skia build with HAS_INPUT_INJECTOR defined (Uno.CrossTargetting.targets), and InputManager registers itself as the injection target (InputManager.cs L32-L33) on every head.

Not verified: running the injection itself on a Skia Android/iOS/WASM device. The warnings follow from the attribute lists and the analyzer logic.

Workaround 🛠️

Suppress UNO0001 at the call site (#pragma warning disable UNO0001).

Works on UWP/WinUI

Yes (no such warning; the API is implemented).

Affected platforms 📱💻🖥️

WebAssembly (Skia), Android (Skia), iOS/tvOS (Skia)

Uno.Sdk version (and other relevant versions) 📦

master @ 0599dad (7.0, net10.0/net11.0)

IDE version 🧑‍💻

N/A (build diagnostic)

Anything else we need to know? 💬

The lists predate 7.0, when these flavors meant the removed native renderers; #23970 copied the pattern for InjectKeyboardInput. The fix is to trim the attributes to __NETSTD_REFERENCE__ (and remove IS_UNIT_TESTS).

Activity

  1. added
    kind/bug
    good first issue
    platform/wasm 🌐
    platform/android 🤖
    platform/ios 🍎
    triage/untriaged
    area/skia ✏️
    project/input ⌨️
    project/non-ui ⚙️
    difficulty/starter 🚀
    on Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/skia ✏️difficulty/starter 🚀good first issuekind/bugplatform/android 🤖platform/ios 🍎platform/wasm 🌐project/input ⌨️project/non-ui ⚙️triage/untriaged

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions