Latest 0.1
Homepage https://github.com/TextureGroup/Weaver
License Apache License, Version 2.0
Platforms ios 8.0, requires ARC
Dependencies Texture/Core, SocketRocket
Authors , , , ,

Version
License
Platform

Weaver is a remote debugging tool for Texture apps. It is a client library and gateway server combination that uses Chrome DevTools on your browser to debug your application’s layout hierarchy.

Demo video: https://youtu.be/zdACP6dQlQ8

Weaver is a hard fork of PonyDebugger. It was trimmed down and modified to work with layout elements from both UIKit and Texture.

To use Weaver, you must enable the client in your iOS application and connect it to the gateway server called "ponyd".

Quick Start

Install ponyd

  • Prerequisite: Xcode’s Command Line Tools must be installed.
  1. Create a temporary directory:

    $ mkdir ponyd
    $ cd ponyd
  2. Download required dependencies

    $ curl -O https://pypi.python.org/packages/11/b6/abcb525026a4be042b486df43905d6893fb04f05aac21c32c638e939e447/pip-9.0.1.tar.gz
    $ curl -O https://pypi.python.org/packages/25/5d/cc55d39ac39383dd6e04ae80501b9af3cc455be64740ad68a4e12ec81b00/setuptools-0.6c11-py2.7.egg
    $ curl -O https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/pybonjour/pybonjour-1.1.1.tar.gz
    $ tar xvf pybonjour-1.1.1.tar.gz
    $ mv pybonjour-1.1.1 pybonjour
  3. Download and run ponyd’s boostrap script:

    $ curl -s https://raw.githubusercontent.com/TextureGroup/Weaver/master/scripts/bootstrap-ponyd.py | python - --never-download ~/Library/Weaver
  4. Install dependencies

    $ ~/Library/Weaver/bin/easy_install -U backports_abc
    $ ~/Library/Weaver/bin/easy_install -U certifi
    $ ~/Library/Weaver/bin/easy_install -U singledispatch
    $ ~/Library/Weaver/bin/easy_install -U pybonjour
  5. Add ponyd alias to your bash profile

    $ alias ponyd="~/Library/Weaver/bin/ponyd"
  6. Install DevTools

    $ ponyd update-devtools
  7. Start the ponyd server
$ ponyd serve -i 0.0.0.0 -p 9229

In your browser, navigate to http://localhost:9229. You should see the
ponyd lobby. Now you need to integrate the client to your application.

For more detailed instructions, check out the gateway server
README_ponyd.

Weaver iOS Client

The Weaver iOS client lets you to debug your application’s layout hierarchy.

Technical

  • Requires iOS 8.0 or above
  • Uses ARC (Automatic Reference Counting).
  • Uses SocketRocket as a WebSocket client.

Installing via CocoaPods

Weaver is available on CocoaPods. Add the following to your Podfile:

target 'MyApp' do
  pod 'Texture'
  pod 'Weaver'
end

Quit Xcode completely before running the following command in the project directory

$ pod install

in the project directory in Terminal.

To update your version of Weaver, run the following command in the project directory

$ pod update Weaver

Don’t forget to use the workspace .xcworkspace file, not the project .xcodeproj file.

Usage

Weaver’s main entry points exist in the WVDebugger singleton.

WVDebugger *debugger = [WVDebugger defaultInstance];

Then enable layout debugging by calling enableLayoutElementDebuggingWithApplication and passing your UIApplication to it:

[debugger enableLayoutElementDebuggingWithApplication:application];

To connect automatically to ponyd on your LAN (via Bonjour):

[debugger autoConnect];

Or to open the connection to a specific host, for instance
ws://localhost:9229/device:

[debugger connectToURL:[NSURL URLWithString:@"ws://localhost:9229/device"]];

To manually close the connection:

[debugger disconnect];

Integration example

You can find an example on how to integrate Weaver into an existing app here.

Getting Help

We use Slack for real-time debugging, community updates, and general talk about Texture and Weaver. Signup yourself and join #weaver channel.

Contributing

We welcome any contributions. See the CONTRIBUTING file for how to get involved.

License

The Weaver project was created by Pinterest as a continuation, under a different name, of the PonyDebugger codebase originally developed by Square. PonyDebugger was originally released by Square under the Apache License, Version 2.0. All code contributed to Weaver after 5/15/2017 is released by Pinterest under the same license, Apache 2.0 license (http://www.apache.org/licenses/LICENSE-2.0.html).

Some useful links:

Latest podspec

{
    "name": "Weaver",
    "version": "0.1",
    "summary": "Remote debugging for Texture apps using Chrome DevTools.",
    "homepage": "https://github.com/TextureGroup/Weaver",
    "description": "Weaver is a remote debugging toolset. It is a client library and gateway server combination that uses Chrome DevTools on your browser to debug applications that use Texture framework",
    "authors": {
        "Huy Nguyen": "[email protected]",
        "Garrett Moon": "[email protected]",
        "Michael Schneider": "[email protected]",
        "Adlai Holler": "[email protected]",
        "Square": "https://squareup.com/"
    },
    "source": {
        "git": "https://github.com/TextureGroup/Weaver.git",
        "tag": "0.1"
    },
    "license": "Apache License, Version 2.0",
    "requires_arc": true,
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "ObjC/{DerivedSources,PonyDebugger,Weaver}/**/*.{h,m,mm}",
    "dependencies": {
        "Texture/Core": [
            "2.3.4"
        ],
        "SocketRocket": [
            "0.5.1"
        ]
    },
    "xcconfig": {
        "ENABLE_NS_ASSERTIONS": "YES"
    }
}

Pin It on Pinterest

Share This