Code Monkey home page Code Monkey logo

react-native-wechat's Introduction

react-native-wechat logo

React-Native bridge static library for WeChat SDK.

  • iOS
  • Android

Installation

$ npm install react-native-wechat --save

Linking in your XCode project

  • Link RCTWeChat library from your node_modules/react-native-wechat/ios folder like its described here. Don't forget to add it to "Build Phases" of project.
  • Added the following libraries to your "Link Binary With Libraries":
    • CoreTelephony.framework
    • libsqlite3.0
    • libc++
    • libz

API Documentation

registerApp(appid)

  • {String} appid the appid you get from WeChat dashboard

registerAppWithDescription(appid, appdesc)

  • {String} appid the appid you get from WeChat dashboard
  • {String} appdesc the description of your app

isWXAppInstalled(callback)

Check if wechat installed in this app.

  • {Function} callback - the result callback.
    • {Boolean} installed - the result.

isWXAppSupportApi(callback)

Check if wechat support open url.

  • {Function} callback - the same to isWXAppInstalled.

getApiVersion(callback)

Get api version of WeChat SDK.

  • {Function} callback
    • {Error} err the error if something went wrong
    • {String} version the result

openWXApp(callback)

Open WeChat app with an optional callback argument.

  • {Function} callback callback

sendRequest(openid, callback)

Send request to WeChat with an openid.

  • {String} openid the user openid
  • {Function} callback the callback

sendAuthRequest(state, callback)

Send authentication request.

  • {String} state the state of OAuth2
  • {Function} callback callback

sendSuccessResponse(callback)

Send a success response.

  • {Function} callback callback

sendErrorCommonResponse(message, callback)

Send an error response to WeChat app.

  • {String} message the error message
  • {Function} callback callback

sendErrorUserCancelResponse(message, callback)

Send an error becaosue cancelation by user to WeChat.

  • {String} message the error message
  • {Function} callback callback

For more details, visit WeChat SDK Documentation

License

MIT @ WeFlex,Inc

react-native-wechat's People

Contributors

bobcyw avatar yorkie avatar

Watchers

 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.