feat(cli): warn in cap doctor when an iOS project has not adopted UIScene
Ā
RE
3d ago+70+70+01234567890123456789-1-1-0123456789
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 migrateand 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.tscovers the three cases. - Full CLI suite passes after
npm run build: 14 suites, 144 tests. ESLint, Prettier andtsc --noEmitare clean on the changed files. - End to end with the built CLI: a fresh
cap add iosproject (already migrated) prints no warning. After removing the scene manifest,SceneDelegate.swiftand theconfigurationForConnectingcall,cap doctor iosprints:
[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