Enables the WKWebView interactive-pop (edge-swipe-back) gesture on iOS, matching the Android predictive-back parity already in place, by patching the generated AppDelegate.swift during cap sync. - Add packages/mobile/scripts/patch-ios-webview.ts: patches AppDelegate.swift to cast the root view controller to CAPBridgeViewController and set webView?.allowsBackForwardNavigationGestures = true before the didFinishLaunchingWithOptions return, is idempotent, and no-ops safely when no ios/ project exists yet - Wire capacitor:sync:after to run both patch-android-manifest.ts and patch-ios-webview.ts so cap sync keeps both native back-gesture opt-ins in sync; add patch:ios-webview script - Add unit tests covering patch, idempotency, already-patched, missing-project, and source-preservation cases for the new iOS webview patch, alongside the existing Android manifest patch tests - Add TaskDetail.swipe-back.test.tsx coverage proving the shared popstate-driven nav-history dismissal stack (no iOS-specific native-back emitter needed) already satisfies the gesture's dismissal contract - Add mobile-scripts.test.ts dashboard coverage and update MOBILE.md / packages/mobile/README.md documenting the new iOS gesture opt-in Files changed: MOBILE.md | 12 ++ .../dashboard/app/__tests__/mobile-scripts.test.ts | 31 +++++ .../__tests__/TaskDetail.swipe-back.test.tsx | 131 +++++++++++++++++++++ packages/mobile/README.md | 36 ++++++ packages/mobile/package.json | 3 +- packages/mobile/scripts/patch-ios-webview.ts | 119 +++++++++++++++++++ packages/mobile/src/__tests__/native-shell.test.ts | 122 +++++++++++++++++++ 7 files changed, 453 insertions(+), 1 deletion(-) Fusion-Task-Id: FN-7586 Fusion-Task-Lineage: 248092a1-de1b-49b6-94ef-70675a7b93a1 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
46 lines
1.5 KiB
JSON
46 lines
1.5 KiB
JSON
{
|
|
"name": "@fusion/mobile",
|
|
"version": "0.55.0",
|
|
"license": "MIT",
|
|
"description": "Fusion mobile: Capacitor wrapper around the Fusion dashboard for iOS and Android.",
|
|
"homepage": "https://github.com/Runfusion/Fusion#readme",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/Runfusion/Fusion",
|
|
"directory": "packages/mobile"
|
|
},
|
|
"bugs": {
|
|
"url": "https://github.com/Runfusion/Fusion/issues"
|
|
},
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"cap": "cap",
|
|
"dev:ios": "tsx scripts/live-reload.ts --platform ios",
|
|
"dev:android": "tsx scripts/live-reload.ts --platform android",
|
|
"build:mobile": "pnpm --filter @fusion/dashboard build && npx cap sync",
|
|
"patch:android-manifest": "npx tsx scripts/patch-android-manifest.ts",
|
|
"patch:ios-webview": "npx tsx scripts/patch-ios-webview.ts",
|
|
"capacitor:sync:after": "npx tsx scripts/patch-android-manifest.ts && npx tsx scripts/patch-ios-webview.ts",
|
|
"test": "vitest run --silent=passed-only --reporter=dot",
|
|
"typecheck": "tsc --noEmit"
|
|
},
|
|
"dependencies": {
|
|
"@capacitor-community/safe-area": "^7.0.0",
|
|
"@capacitor/app": "^7.1.2",
|
|
"@capacitor/core": "^7.0.0",
|
|
"@capacitor/preferences": "^7.0.0",
|
|
"@capacitor/push-notifications": "^7.0.0",
|
|
"@capacitor/share": "^7.0.4"
|
|
},
|
|
"devDependencies": {
|
|
"@capacitor/android": "^7.0.0",
|
|
"@capacitor/cli": "^7.0.0",
|
|
"@capacitor/ios": "^7.0.0",
|
|
"@types/node": "^22.0.0",
|
|
"tsx": "^4.19.0",
|
|
"typescript": "^5.7.0",
|
|
"vitest": "^4.1.0"
|
|
}
|
|
}
|