Enrollment

Connect Flutter mobile and macOS apps to the Ansight CLI through automatic local registration or physical-device QR enrollment.

The native runtime registers automatically in an iOS Simulator, Android emulator, or macOS desktop app. macOS connects to the host on the same machine through loopback and does not provide QR enrollment. For a physical mobile device, run ansight pairing issue --qr, then open the native scanner from a developer-only app surface:

await Ansight.instance.initializeAndActivate(AnsightOptions.developer());
await AnsightFlutterInstrumentation.instance.install();

final result = await Ansight.instance.enrollFromQrCode(
  clientName: 'My Flutter App',
);

The any-app invite does not require prior app registration. The platform SDK supplies its real app ID, stores the installation registration in app-private storage, and reconnects on later launches.

scanPairingQrCode(...) remains an API alias. Use openSession(...) with a payload only when the app already owns the scanning surface.

Cellular paths are rejected by default for QR enrollment, saved profiles, and explicit connections. Use withCellularHostConnections() only for an intentional mobile-data or personal-hotspot development workflow. It can consume mobile data and does not change the clear-text transport.

The Dart option surface does not expose native unattended launch provisioning. Use the QR scanner or an app-owned explicit payload flow instead.