Latest 0.3.1
Homepage https://github.com/AppScaffold/Navy
License MIT
Platforms ios 9.0

Version
Liscence
Platform
Swift4.2

This is a tool which could easily observe and visualize each route and flow we are tracking on the real time.

Navy

There will display a tips view when your cursor is floating on a node text if you have configured the info that you want to show.

Navy

Intent

For a big App, sometime it’s hard to check and debug which route we are using. what reaction will be happened once we click somewhere. in order to easily check those scenario whether or not meet the expectation, this tool is created to tackle this requirement.

Getting Started

This Navy framework has a demo app that you can run it directly following the below steps to see what it looks like and how it runs. But if you want to integrate it into your project, you have to replace the BundleId with your project BundleId in run-navy.sh script and move this script into your project folder.

Prerequistes

  1. Install npm

    brew install node
  2. Install Browsersync
    npm install -g browser-sync

Running Demo App

If you want to run demo app, you just need to cd to the Navy project path and execute pod install
Then you have to run demo app first before you execute the command below.

./run-navy.sh

Integration

Cocoapods

Navy is on Cocoapods! After setting up Cocoapods in your project, simply add the folowing to your Podfile:

pod 'Navy'

then run pod install from the directory containing the Podfile!

Don’t forget to import Navy when you use it.

Conform the NaviProtocol

class Navigation: NaviProtocol {
    // Return root node name
    func rootNodeName() -> String {
        return "Navy"
    }

    // Return tabBar controllers 
    func tabBarViewControllers() -> [String] {
        return ["NavyDemo.FavoriteViewController", "NavyDemo.DownloadViewController", "NavyDemo.HistoryViewController"]
    }

    // Map the business logic document link to corresponding node
    func mapBusinessLogicDocument() -> [String: String] {
        return ["NavyDemo.FavoriteViewController": "https://en.wikipedia.org/wiki/Marie_Curie",
                "NavyDemo.ListViewController": "https://en.wikipedia.org/wiki/Albert_Einstein",
                "NavyDemo.DetailViewController": "https://en.wikipedia.org/wiki/Tu_Youyou",
                "NavyDemo.SettingViewController": "https://en.wikipedia.org/wiki/Alan_Turing",
                "NavyDemo.DownloadViewController": "https://en.wikipedia.org/wiki/Main_Page"]
    }
}

Note: if you are using custome Navigation, you have to implement the two optional protocols.

func currentController() -> UIViewController {
    // Return current controller
}

func previousController() -> UIViewController {
    // Return previous controller
}

Last, call the setup(with:) method and pass the instance has implemented NaviProtocol.

NaviHeader.shared.setup(with: Navigation())

Running Your Project

You have to run your project first before you execute the command below.

⚠️ Don’t forget to replace BundleId and move script into your project.

./run-navy.sh

TODO

  • [ ] Support dynamic display of call stack on web page
  • [x] Support redirect to a new page by clicking the text on a node
  • [x] Map business logic documents
  • [ ] Show history paths
  • [ ] Adapt mobile screen
  • [ ] Monitor the network

Requirements

  • Swift 4.2+
  • iOS 11.0+

Contributing

Pull requests, feature requests and bug reports are welcome 🚀

Latest podspec

{
    "name": "Navy",
    "version": "0.3.1",
    "summary": "This is a tool which could easily observe and visualize each route and flow we are tracking on the real time.",
    "description": "For a big App, sometime it's hard to check and debug which route we are using. what reaction will be happened once we click somewhere. in order to easily check those scenario whether or not meet the expectation, this tool is created to tackle this requirement.",
    "homepage": "https://github.com/AppScaffold/Navy",
    "license": "MIT",
    "platforms": {
        "ios": "9.0"
    },
    "swift_version": "4.2",
    "source": {
        "git": "https://github.com/AppScaffold/Navy.git",
        "tag": "0.3.1"
    },
    "source_files": "Navy/**/*.{h,m,swift}",
    "exclude_files": "Navy/NavyTests/",
    "public_header_files": [
        "Navy/Navi.h",
        "Navy/AllTouchesGestureRecognizer.h"
    ],
    "authors": "AppScaffold"
}

Pin It on Pinterest

Share This