Latest 0.0.1
Homepage https://github.com/duanruiying/DryWechat
License MIT
Platforms ios 9.0, requires ARC
Dependencies WechatOpenSDK
Frameworks UIKit, Foundation, SystemConfiguration, Security, CoreTelephony, CFNetwork, CoreGraphics
Authors

iOS: 微信功能简化(登录、支付、分享、打开小程序)
微信开放平台

Prerequisites

  • Xcode 10.2.1
  • iOS 9.0 or later
  • ObjC、Swift 5 or later

Installation

  • pod ‘DryWechat’
  • Targets => Info => URL Types添加scheme( identifier:"weixin"、URL Schemes:"wx+AppID" )
  • info.plist文件属性LSApplicationQueriesSchemes中增加weixin、wechat字段

Features

注册客户端

注册客户端
[DryWechat registerClientWithAppID:""
                            secret:nil
                         partnerID:nil
                        partnerKey:nil
                           package:nil];
接收回调信息
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {

    [DryWechat handleOpenURL:url];
    return YES;
}

获取授权(登录)

[DryWechat applyAuthAt:vc completion:^(DryWechatCode code, NSString * _Nullable openID, NSString * _Nullable accessToken) {

}];

获取用户信息

[DryWechat userInfoWithOpenID:"" accessToken:"" completion:^(DryWechatCode code, NSString * _Nullable nickName, NSString * _Nullable headImgURL) {

}];

支付

[DryWechat payWithPrepayID:"" noncestr:"" completion:^(DryWechatCode code) {

}];

分享文本

[DryWechat shareTextWithScene:kDryWechatScenePerson text:"" completion:^(DryWechatCode code) {

}];

分享多媒体

DryWechatMedia *mediaObj = [[DryWechatMedia alloc] init];
[DryWechat shareMediaWithScene:kDryWechatScenePerson title:"" descrip:"" thumbImage:"" mediaType:kDryWechatMediaTypeImage media:mediaObj completion:^(DryWechatCode code) {

}];

打开小程序

[DryWechat openProgramWithUserName:"" path:nil type:kDryWechatProgramRelease completion:^(DryWechatCode code, NSString * _Nullable msg) {

}];

Latest podspec

{
    "name": "DryWechat",
    "version": "0.0.1",
    "summary": "DryWechat",
    "homepage": "https://github.com/duanruiying/DryWechat",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "duanruiying": "[email protected]"
    },
    "source": {
        "git": "https://github.com/duanruiying/DryWechat.git",
        "tag": "0.0.1"
    },
    "description": "TODO: iOSu5faeu4fe1u529fu80fdu7b80u5316(u767bu5f55u3001u652fu4ed8u3001u5206u4eabu3001u6253u5f00u5c0fu7a0bu5e8f).",
    "swift_version": "5",
    "platforms": {
        "ios": "9.0"
    },
    "requires_arc": true,
    "user_target_xcconfig": {
        "OTHER_LDFLAGS": [
            "-w",
            "-ObjC"
        ]
    },
    "static_framework": true,
    "pod_target_xcconfig": {
        "OTHER_LDFLAGS": [
            "-w"
        ]
    },
    "source_files": "DryWechat/Classes/Code/**/*",
    "public_header_files": "DryWechat/Classes/Code/Public/**/*.h",
    "libraries": [
        "z",
        "sqlite3.0",
        "c++"
    ],
    "frameworks": [
        "UIKit",
        "Foundation",
        "SystemConfiguration",
        "Security",
        "CoreTelephony",
        "CFNetwork",
        "CoreGraphics"
    ],
    "dependencies": {
        "WechatOpenSDK": []
    }
}

Pin It on Pinterest

Share This