Skip to content

React-Native(iOS/Android) functionalities include WeChat Login, Share, Favorite and Payment {QQ: 336021910}

Notifications You must be signed in to change notification settings

chelseazhai/react-native-wechat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-wechat

React native for WeChat, this is still under in-progress to develop. This module binds WeChat's iOS SDK.

Install

$ npm install react-native-wechat --save

Linking in your XCode project

  1. 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.
  2. Added the following libraries to your "Link Binary With Libraries":
  • CoreTelephony.framework
  • libsqlite3.0
  • libc++
  • libz
  1. Done

API Documentation

registerApp(appid)

  • {String} appid

registerAppWithDescription(appid, appdesc)

  • {String} appid
  • {String} appdesc

isWXAppInstalled(callback)

get if wechat installed in this app

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

isWXAppSupportApi(callback)

get if wechat support open url.

  • {Function} callback - the same to isWXAppInstalled.

getApiVersion(callback)

get api version

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

openWXApp(callback)

open wechat app

  • {Function} callback callback

sendRequest(openid, callback)

send request to wechat

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

sendAuthRequest(state, callback)

auth request

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

sendSuccessResponse(callback)

send a success response to wechat

  • {Function} callback callback

sendErrorCommonResponse(message, callback)

send an error response to wechat

  • {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

About

React-Native(iOS/Android) functionalities include WeChat Login, Share, Favorite and Payment {QQ: 336021910}

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Objective-C 59.7%
  • Java 25.2%
  • JavaScript 13.0%
  • Ruby 2.1%