Coder Social home page Coder Social logo

wangxingdaren / weex-devtool-ios Goto Github PK

View Code? Open in Web Editor NEW

This project forked from weexteam/devtool-ios-for-apache-weex

0.0 2.0 0.0 136 KB

Remote debug for your native iOS app using Chrome Developer Tools

License: GNU General Public License v3.0

Ruby 0.15% Objective-C 99.85%

weex-devtool-ios's Introduction

weex-devtool-iOS

Remote debug for your native iOS app using Chrome Developer Tools

weex-devtool launch:

  1. install and run weex-devtool

     $:npm install -g weex-devtool
    
     $:weex-devtool  
    

    it will launch chrome browser, showing wss ip address in chrome address bar.

    For more detailed instructions, redirect to weex-toolkit

playground install WXDevtool

  1. Install dependencies.

    $:pod install
    

Usage

  1. AppDelegate.m header file

     #import "WXDevTool.h"
    
  2. Initialize inspector when the APP launched

    Note: The inspector API must be called before weex is initialized

    + (void)setDebug:(BOOL)isDebug;
    

    isDebug default is NO, now you open inspect model. opposite is YES, if you set isDebug to YES, then open debug model and inspect model.

      + (void)launchDevToolDebugWithUrl:(NSString *)url;		
    

    wssip was the wss address showing in the chrome address bar.

    • open debug model and inspector model

      eg:- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
        {
          [WXDevTool setDebug:YES];
          [WXDevTool launchDevToolDebugWithUrl:@"ws://wssip/debugProxy/native"];
        }
      
    • open inspect model, remove the @selector(setDebug:) or add [WXDevTool setDebug:NO]

      eg:- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
        {
          [WXDevTool launchDevToolDebugWithUrl:@"ws://wssip/debugProxy/native"];
        }
      
  3. Build and running APP, this time chrome will display your device with App name, select inspector to open the inspector tab.

  4. Log print support for different levels of print.

    eg: #import "WXDevTool.h"
        PDLogE()/PDLogW()
    

WXDevtool Dependencies

Your app must be linked against the following frameworks/dylibs

  • libicucore.dylib
  • CFNetwork.framework
  • CoreData.framework
  • Security.framework
  • Foundation.framework

weex-devtool-ios's People

Contributors

yangshengtao avatar

Watchers

James Cloos avatar wangxingdaren avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.