JGHybrid 3.0.0

JGHybrid 3.0.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Nov 2017
SwiftSwift Version 4.0
SPMSupports SPM

Maintained by lbj147123.



 
Depends on:
SSZipArchive>= 0
Kingfisher>= 0
JGWebKitURLProtocol>= 0
 

JGHybrid 3.0.0

JGHybrid

CI Status
Version
License
Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

JGHybrid is available through CocoaPods. To install
it, simply add the following line to your Podfile:

此类库在caiyang基础上新增js注入功能
https://github.com/suncry/MLHybrid

pod 'JGHybrid'

How To Use

MLHybrid.register(sess: "GuU7KeV154f8juslkNWRONyVE3m8Sq9h5nJFpcARiCFIvrMsp6boxDzcYabBwAoM",
                  platform: "i",
                  appName: "medlinker",
                  domain: "medlinker.com",
                  backIndicator: "hybridBack",
                  delegate: MethodExtension())
                  
let vc:UIViewController =  MLHybrid.load(urlString: "https://yexiaochai.github.io/Hybrid/webapp/demo/index.html")!
self.navigationController?.pushViewController(vc, animated: true)
window.webkit.messageHandlers.requestHybrid.postMessage({'name':'updateheader','param':{"left":[{"tagname":"back","callback":""}],"right":[],"title":{"tagname":"title","title":"哈哈哈"}}})

Author

[email protected], [email protected]

License

JGHybrid is available under the MIT license. See the LICENSE file for more info.