Git Product home page Git Product logo

cordova_demo's Introduction

使用的是cordova4.0.1

实现步奏

  1. 创建项目工程 使用pod platform :ios, '8.0' pod 'Cordova', '~> 4.0.1'

  2. 配置confing.xml 非常重要

Hello Cordova A sample Apache Cordova application that responds to the deviceready event. Apache Cordova Team

CPlugin Cordova CPlugin Plugin Apache 2.0 cordova,device

3.如需使用自定义插件与h5进行交互 需要在 CDVViewController 的init 方法里面加入一些代码

  • (instancetype)init { self = [super init]; if (self != nil) { //设置用户代理如不设置无法调用与H5定制的JavaScript方法进行交互 NSString* original = [CDVUserAgentUtil originalUserAgent]; NSString* userAgent = [original stringByAppendingString:@"WeiLian_IOS"]; self.baseUserAgent = userAgent; } return self; } 然后就可以了

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.