Giter VIP home page Giter VIP logo

shonlinesandbox's Introduction

SHOnlineSandbox

用于在线查看 iOS 沙盒文件;测试人员可以用来验证开发逻辑是否正确,文件管理是否正常;开发人员可以在需要的时候导出文件,日志等。该工程也是学习底层 socket,掌握 HTTP 协议的良好范例,里面使用到了 200, 301,404 等状态码!

使用方法

  • 编译 SHOnlineSandboxSDK 工程,生成 SHOnlineSandboxSDK.framework 静态库,然后添加到你的工程。

  • 启动服务:

    #import <SHOnlineSandboxSDK/SHHttpService.h>
    
    @property (nonatomic, strong) SHHttpService *server;
    
    const int port = 9999;
    self.server = [SHHttpService startServerWithPort:port];
    
    [SHHttpService startServerWithPort:port];
    
    NSString *text = [NSString stringWithFormat:@"请访问:http://%@:%d/index.html",[self.server serverIP],port];

原理

  • 使用 socket 建立通信,实现了一个 HTTP 协议的服务器,服务器可配置文件服务,API 服务。
  • 使用 vue.js 搭建 H5 页面。
  • 使用 ajax 异步请求数据。

效果

响应式设计,支持各种尺寸的设备。

TODO

在线预览,下载沙盒文件。

shonlinesandbox's People

Contributors

debugly avatar

Watchers

James Cloos avatar  avatar  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.