返回 Skill 列表
extension
分类: 开发与工程无需 API Key

Navigation Debugger

调试Leavn导航问题 - NotificationCenter路由、深度链接、标签选择、AppCoordinator、模态展示

person作者: jakexiaohubgithub

Navigation Debugger

Fix navigation bugs in Leavn:

  1. Check notification handling:

    • Search for notification name in ContentView
    • Verify .onReceive() handlers exist
    • Check AppCoordinator navigation methods
  2. Common Leavn patterns:

    // Post navigation
    NotificationCenter.default.post(
        name: .OpenBibleReference,
        userInfo: ["book": "Genesis", "chapter": 1]
    )
    
    // Handle in ContentView
    .onReceive(NotificationCenter.default.publisher(for: .OpenBibleReference)) {
        // Navigate to Bible
    }
    
  3. Debug steps:

    • Add AppLog in notification handlers
    • Verify userInfo parsing
    • Check tab selection works
    • Test deep link URLs

Use when: Navigation broken, wrong screen, deep links fail, tab routing issues