ios - 微信SDK集成iOS

标签 ios iphone ios7 wechat

我搜索了很多,但没有得到任何演示。 我怎样才能将它集成到我的应用程序中?

我检查了很多来源,例如 this answerthis site

最佳答案

您好,我从链接 http://dev.wechat.com/wechatapi 下载英文版 SDK你提供。结果发现少了一些方法。在最新的1.5中文版本(所有评论都是中文)中有这样的方法

+(BOOL) sendAuthReq:(SendAuthReq*) req viewController : (UIViewController*) viewController delegate:(id<WXApiDelegate>) delegate;

和类:

#pragma mark - SendAuthReq
@interface SendAuthReq : BaseReq
@property (nonatomic, retain) NSString* scope;
@property (nonatomic, retain) NSString* state;
@end

#pragma mark - SendAuthResp
@interface SendAuthResp : BaseResp
@property (nonatomic, retain) NSString* code;
@property (nonatomic, retain) NSString* state;
@property (nonatomic, retain) NSString* lang;
@property (nonatomic, retain) NSString* country;
@end

请求方法示例:

-(void)sendAuthRequest
{ 
    SendAuthReq* req =[[[SendAuthReq alloc ] init ] autorelease ];
    req.scope = @"snsapi_userinfo" ;
    req.state = @"123" ;
    [WXApi sendReq:req]; 
}

这里是中文版download link如果你有兴趣

关于ios - 微信SDK集成iOS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29666805/

相关文章:

ios - 对于哪些用例,可以选择 tableView :didSelectRowAtIndexPath: rather than prepareForSegue:sender:?

ios - react 原生 : change background color of initial loading view

javascript - 如何在iOS中绑定(bind)点击事件?

ios - 在现有上传的应用程序中启用推送通知

ios - 在自定义注释之上显示用户个人资料图像

ios - 在 iOS 设备中通过 wifi 或无线接入点进行通信

iphone - 基于客户端-服务器的 iPhone 应用程序中的通信安全

iphone - 如何以编程方式设置标签字体

ios - 如何使用 NSFileManager 保护或加密视频文件?

ios 使用音频/voip 模式永远在后台运行应用程序