feat(cli): warn in cap doctor when an iOS project has not adopted UIScene

RE
3d ago
+70-1

Discussed in #8712.

What

cap doctor now warns when an iOS project has not adopted UIScene, or has only partly adopted it. Today it reports "iOS looking great!" for a project with no UIApplicationSceneManifest.

The check reuses the detection that cap migrate already has (readDetectionSignals, classify and describeSignals in migrate-uiscene.ts), so doctor and migrate agree on what "migrated" means:

  • nothing present: warns and points to npx cap migrate and the 8.5 update guide
  • partly present: warns and lists what is present and missing
  • fully migrated: no output

It is a warning, not a failure, so projects that deliberately stay on the old lifecycle keep passing.

Testing

  • New cli/test/doctor-uiscene.spec.ts covers the three cases.
  • Full CLI suite passes after npm run build: 14 suites, 144 tests. ESLint, Prettier and tsc --noEmit are clean on the changed files.
  • End to end with the built CLI: a fresh cap add ios project (already migrated) prints no warning. After removing the scene manifest, SceneDelegate.swift and the configurationForConnecting call, cap doctor ios prints:
[warn] This iOS project has not adopted UIScene. Run `npx cap migrate` or see https://capacitorjs.com/docs/updating/8-5 to migrate.
[success] iOS looking great! šŸ‘Œ

Happy to change the wording, or to make the success line conditional on there being no warnings, if you prefer.

šŸ¤– Generated with Claude Code