GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - iOSCopder/LEGO-SDK-OC: LEGO SDK improves UIWebView & WKWebView features. It's light-weight and easy to use.

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

212 Commits
212 Commits

Folders and files

NameName
Last commit message
Last commit date
LEGO-SDK-OC.xcodeproj
LEGO-SDK-OC.xcodeproj
 
 
Resources
Resources
 
 
SDK
SDK
 
 
Sample
Sample
 
 
.clang-format
.clang-format
 
 
.gitignore
.gitignore
 
 
LEGO-SDK.podspec
LEGO-SDK.podspec
 
 
License
License
 
 
Podfile
Podfile
 
 
README.md
README.md
 
 

Repository files navigation

LEGO-SDK-OC

LEGO SDK improves UIWebView & WKWebView features. It's light-weight and easy to use.

Introduce

LEGO SDK includes JavascriptBridge and Modules(APIs).

JavascriptBridge provides an universal pipe connects WebView and Native.

Modules provides some feature which is necessary for developer.

WebApp

You may use SDK for WebApp. It's a good choice to replace Cordavor.

Improve WebView

You may use SDK for WebView Plugin, No need to develop your own protocol.

Protocols

SDK use these classes for pipe.

  • LGOModule - Receive request and build LGORequestable.
  • LGORequestable - Operate request and response result.
  • LGORequest - Saving request params from JSON, built via LGOModule.
  • LGOResponse - Saving response result, and translate to JSON data to WebView.

Usage (Javascript)

Add above code before you use SDK.

window.JSBridge && eval(window.JSBridge.bridgeScript())

Try to request device information, may use above code.

JSMessage.newMessage("Native.Device").call(function(err, result){console.log(result);})

And console log these.

Object
application: {shortVersion: "1.0", buildNumber: 0, name: "Sample", bundleIdentifier: "com.legosdk.Sample"}
custom: {}
device: {osName: "iPhone OS", osVersion: "9.3.4", model: "iPhone", IDFV: "093B2097-1F92-464D-B1BB-232266403FB8", screenWidth: 414, …}
network: {usingWIFI: true, cellularType: 4}

Intergrade

We recommend use CocoaPods.

All

If you're wondering install all modules. Just add following code to Podfile.

pod 'LEGO-SDK'

Core only

If you're just wondering JavascriptBridge, no needs modules. Add following code to Podfile.

pod 'LEGO-SDK/Core'

AutoInject

AutoInject will inject JavascriptBridge to UIWebView & WKWebView automatically. Add following code to Podfile enable it.

pod 'LEGO-SDK/AutoInject'

Install module Stand-alone

You may install module Stand-alone. Just like this.

pod 'LEGO-SDK/API/Native/Device'

About

LEGO SDK improves UIWebView & WKWebView features. It's light-weight and easy to use.

lego-sdk.github.io/

Resources

Readme
License
Activity
Custom properties

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.