Loading...
Loading...
Migrates a Capacitor iOS app or plugin from the AppDelegate lifecycle to the UIScene lifecycle introduced in Capacitor 8.5 and required by Xcode 27. Audits first (custom AppDelegate URL/lifecycle code, CAPBridgeViewController subclasses, existing SceneDelegate.swift, Info.plist UIApplicationSceneManifest, project.pbxproj registration, plugin lifecycle observers, tmpWindow/TmpViewController), reports, then merges surgically or hands template-shaped projects to `npx cap migrate`. Use for "Capacitor 8.5 upgrade", "add SceneDelegate", "adopt UIScene", "CLIENT OF UIKIT REQUIRES UPDATE", deep links or appUrlOpen stopped firing after 8.5, "cap migrate skipped partial state", or as the prerequisite step before Capacitor 9. Do not use for Android, full major upgrades (use capacitor-app-upgrade-v8-to-v9), or new deep-link setup (use capacitor-deep-linking).
npx skill4agent add cap-go/capgo-skills capacitor-uiscene-migration@capacitor/iosUIApplicationSceneManifestInfo.plistnpx cap migrateUIScene migration: project is in a partial state ... Skipping automated migrationappUrlOpenapplicationDidBecomeActivetmpWindowTmpViewControllercapacitor-app-upgrade-v8-to-v9capacitor-plugin-upgrade-v8-to-v9capacitor-deep-linkingnode -e "const fs=require('fs');if(!fs.existsSync('package.json'))process.exit(0);const pkg=JSON.parse(fs.readFileSync('package.json','utf8'));const out=[];for(const s of ['dependencies','devDependencies','peerDependencies']){for(const [n,v] of Object.entries(pkg[s]||{})){if(n.startsWith('@capacitor/'))out.push(s+'.'+n+'='+v)}}const p='ios/App/App/';out.push('SceneDelegate.swift='+fs.existsSync(p+'SceneDelegate.swift'));if(fs.existsSync(p+'Info.plist'))out.push('UIApplicationSceneManifest='+fs.readFileSync(p+'Info.plist','utf8').includes('UIApplicationSceneManifest'));if(fs.existsSync(p+'AppDelegate.swift'))out.push('configurationForConnecting='+fs.readFileSync(p+'AppDelegate.swift','utf8').includes('UISceneConfiguration(name:'));console.log(out.join('\n'))"UIApplicationSceneManifestapplication(_:open:options:)application(_:continue:restorationHandler:)applicationDidBecomeActiveapplicationWillResignActiveapplicationDidEnterBackgroundapplicationWillEnterForegrounddidFinishLaunchingWithOptionsapplicationWillTerminatedidRegisterForRemoteNotificationsWithDeviceTokendidFailToRegister...UIApplication.*NotificationSceneDelegateProxyCAPSceneDelegateProxy.swift.capacitorOpenURL.capacitorOpenUniversalLinkCDVPluginHandleOpenURLApplicationDelegateProxy.shared.lastURL.capacitorViewDidAppearApp.getLaunchUrl().capacitorSceneWillConnect.capacitorSceneOpenURL.capacitorSceneOpenUniversalLinkUISceneuserInfopauseresumeUIScene.didEnterBackgroundNotificationwillEnterForegroundNotificationTmpViewControllerCapacitorBridge.tmpWindowtmpViewControllerAppearedbridge.viewControllerCAPBridgeViewController()Main.storyboardcap migrateInfo.plistSceneDelegate.swiftUISceneConfiguration(name:AppDelegate.swiftSceneDelegate.swiftUIApplication.shared.applicationStatetmpWindowTmpViewControlleropen url:continue userActivity:ios/App/App.xcodeprojPackage.swift*.podspecCAPPlugin@capacitor/ios^8.5.0ios/App/Podfileios/App/CapApp-SPMreferences/audit-patterns.mdios/Appnode_modulestmpWindowTmpViewControllerapplicationStatenode_modulesopen url:continue userActivity:scene(_:openURLContexts:)scene(_:continue:)sceneDidBecomeActivesceneWillResignActivesceneDidEnterBackgroundsceneWillEnterForegroundUIApplicationnpm i @capacitor/core@^8.5.0 @capacitor/ios@^8.5.0npm i -D @capacitor/cli@^8.5.0npx cap migratereferences/scene-delegate-template.mdreferences/pbxproj-registration.mdnpx cap sync iosreferences/plugin-audit.mdnpx cap sync ios
xcodebuild -project ios/App/App.xcodeproj -scheme App -configuration Debug \
-destination 'generic/platform=iOS Simulator' build # use -workspace App.xcworkspace for CocoaPods
grep -rn --include=*.swift -E '\btmpWindow\b|\bTmpViewController\b' ios/App # expect nothingpauseresumeappUrlOpenxcrun simctl openurl booted myscheme://testappUrlOpenApp.getLaunchUrl()registrationcap migrateUISceneDelegateClassNameInfo.plist$(PRODUCT_MODULE_NAME).SceneDelegateCannot find 'SceneDelegate' in scopereferences/pbxproj-registration.mdValue of type 'CapacitorBridge' has no member 'tmpWindow'bridge?.viewControllerappUrlOpengetLaunchUrl()capacitorDidLoadscene(_:willConnectTo:)pbxproj| File | Load when |
|---|---|
| Step 4: grep commands and how to classify each hit |
| Creating or merging SceneDelegate, Info.plist manifest, AppDelegate hook, custom subclass and lifecycle variants |
| Registering |
| The repo is a plugin, or an installed plugin shows lifecycle hits |
capacitor-app-upgrade-v8-to-v9capacitor-plugin-upgrade-v8-to-v9capacitor-app-upgradescapacitor-deep-linkingcapacitor-push-notifications