Skip to content
This repository has been archived by the owner on Jul 27, 2020. It is now read-only.

Commit

Permalink
added ios8 support
Browse files Browse the repository at this point in the history
added x64 support
  • Loading branch information
iDay committed Sep 11, 2014
1 parent 707f606 commit 46d80b3
Show file tree
Hide file tree
Showing 10 changed files with 200 additions and 94 deletions.
16 changes: 16 additions & 0 deletions WeixinActivity.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
647DC9BF184F023A00DCCA21 /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = 647DC9BD184F023A00DCCA21 /* README.md */; };
647DC9C21850188700DCCA21 /* ios6.png in Resources */ = {isa = PBXBuildFile; fileRef = 647DC9C01850188700DCCA21 /* ios6.png */; };
647DC9C31850188700DCCA21 /* ios7.png in Resources */ = {isa = PBXBuildFile; fileRef = 647DC9C11850188700DCCA21 /* ios7.png */; };
64F461D819C167890059D91F /* icon_timeline-8.png in Resources */ = {isa = PBXBuildFile; fileRef = 64F461D419C167890059D91F /* icon_timeline-8.png */; };
64F461D919C167890059D91F /* icon_timeline-8@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 64F461D519C167890059D91F /* icon_timeline-8@2x.png */; };
64F461DA19C167890059D91F /* icon_session-8.png in Resources */ = {isa = PBXBuildFile; fileRef = 64F461D619C167890059D91F /* icon_session-8.png */; };
64F461DB19C167890059D91F /* icon_session-8@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 64F461D719C167890059D91F /* icon_session-8@2x.png */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -86,6 +90,10 @@
647DC9BD184F023A00DCCA21 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.md; sourceTree = "<group>"; };
647DC9C01850188700DCCA21 /* ios6.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ios6.png; sourceTree = "<group>"; };
647DC9C11850188700DCCA21 /* ios7.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ios7.png; sourceTree = "<group>"; };
64F461D419C167890059D91F /* icon_timeline-8.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_timeline-8.png"; sourceTree = "<group>"; };
64F461D519C167890059D91F /* icon_timeline-8@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_timeline-8@2x.png"; sourceTree = "<group>"; };
64F461D619C167890059D91F /* icon_session-8.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_session-8.png"; sourceTree = "<group>"; };
64F461D719C167890059D91F /* icon_session-8@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_session-8@2x.png"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -210,6 +218,10 @@
641A3BCC184C9A4F00869773 /* Resources */ = {
isa = PBXGroup;
children = (
64F461D419C167890059D91F /* icon_timeline-8.png */,
64F461D519C167890059D91F /* icon_timeline-8@2x.png */,
64F461D619C167890059D91F /* icon_session-8.png */,
64F461D719C167890059D91F /* icon_session-8@2x.png */,
641A3BF0184D5AD900869773 /* icon_session.png */,
641A3BF1184D5AD900869773 /* icon_timeline.png */,
641A3BF2184D5AD900869773 /* icon_timeline@2x.png */,
Expand Down Expand Up @@ -299,6 +311,9 @@
files = (
641A3BF4184D5AD900869773 /* icon_session.png in Resources */,
641A3BB7184C964700869773 /* Images.xcassets in Resources */,
64F461D819C167890059D91F /* icon_timeline-8.png in Resources */,
64F461DB19C167890059D91F /* icon_session-8@2x.png in Resources */,
64F461D919C167890059D91F /* icon_timeline-8@2x.png in Resources */,
647DC9BF184F023A00DCCA21 /* README.md in Resources */,
647DC9C21850188700DCCA21 /* ios6.png in Resources */,
641A3BF6184D5AD900869773 /* icon_timeline@2x.png in Resources */,
Expand All @@ -308,6 +323,7 @@
641A3BB5184C964700869773 /* Main.storyboard in Resources */,
647DC9BE184F023A00DCCA21 /* LICENSE in Resources */,
641A3BB6184C964700869773 /* InfoPlist.strings in Resources */,
64F461DA19C167890059D91F /* icon_session-8.png in Resources */,
641A3BF5184D5AD900869773 /* icon_timeline.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
34 changes: 20 additions & 14 deletions WeixinActivity/Resources/WXApi.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// WXApi.h
// MMApi.h
// ApiClient
//
// Created by Tencent on 12-2-28.
Expand All @@ -10,17 +10,17 @@

#import "WXApiObject.h"

#pragma mark -
/*! @brief 接收并处理来自微信终端程序的事件消息
#pragma mark -
/*! @brief 接收并处理来至微信终端程序的事件消息
*
* 接收并处理来自微信终端程序的事件消息,期间微信界面会切换到第三方应用程序。
* WXApiDelegate 会在handleOpenURL:delegate:中使用并触发
* 接收并处理来至微信终端程序的事件消息,期间微信界面会切换到第三方应用程序。
* WXApiDelegate 会在handleOpenURL中使用并触发
*/
@protocol WXApiDelegate <NSObject>

@optional

/*! @brief 收到一个来自微信的请求,第三方应用程序处理完后调用sendResp向微信发送结果
/*! @brief 收到一个来自微信的请求,处理完后调用sendResp
*
* 收到一个来自微信的请求,异步处理完成后必须调用sendResp发送处理结果给微信。
* 可能收到的请求有GetMessageFromWXReq、ShowMessageFromWXReq等。
Expand All @@ -40,26 +40,23 @@

#pragma mark -

/*! @brief 微信Api接口函数类
/*! @brief 微信Api接口函数
*
* 该类封装了微信终端SDK的所有接口
*/
@interface WXApi : NSObject

/*! @brief WXApi的成员函数,向微信终端程序注册第三方应用
/*! @brief WXApi的成员函数,在微信终端程序中注册第三方应用
*
* 需要在每次启动第三方应用程序时调用。第一次调用后,会在微信的可用应用列表中出现。
* iOS7及以上系统需要调起一次微信才会出现在微信的可用应用列表中。
* @attention 请保证在主线程中调用此函数
* @param appid 微信开发者ID
* @return 成功返回YES,失败返回NO。
*/
+(BOOL) registerApp:(NSString *)appid;

/*! @brief WXApi的成员函数,向微信终端程序注册第三方应用
/*! @brief WXApi的成员函数,在微信终端程序中注册第三方应用
*
* 需要在每次启动第三方应用程序时调用。第一次调用后,会在微信的可用应用列表中出现。
* @see registerApp
* @param appid 微信开发者ID
* @param appdesc 应用附加信息,长度不超过1024字节
* @return 成功返回YES,失败返回NO。
Expand All @@ -69,7 +66,7 @@
/*! @brief 处理微信通过URL启动App时传递的数据
*
* 需要在 application:openURL:sourceApplication:annotation:或者application:handleOpenURL中调用。
* @param url 微信启动第三方应用时传递过来的URL
* @param url 启动App的URL
* @param delegate WXApiDelegate对象,用来接收微信触发的消息。
* @return 成功返回YES,失败返回NO。
*/
Expand Down Expand Up @@ -108,7 +105,7 @@
/*! @brief 发送请求到微信,等待微信返回onResp
*
* 函数调用后,会切换到微信的界面。第三方应用程序等待微信返回onResp。微信在异步处理完成后一定会调用onResp。支持以下类型
* SendAuthReq、SendMessageToWXReq等
* SendMessageToWXReq
* @param req 具体的发送请求,在调用函数后,请自己释放。
* @return 成功返回YES,失败返回NO。
*/
Expand All @@ -123,4 +120,13 @@
*/
+(BOOL) sendResp:(BaseResp*)resp;

/*! @brief 发送请求到微信(安全方式),等待微信返回onResp
*
* 函数调用后,会切换到微信的界面。第三方应用程序等待微信返回onResp。微信在异步处理完成后一定会调用onResp。支持以下类型
* SendAuthReq、PayReq。
* @param req 具体的发送请求,在调用函数后,请自己释放。
* @return 成功返回YES,失败返回NO。
*/
+(BOOL) safeSendReq:(BaseReq*)req;

@end
Loading

0 comments on commit 46d80b3

Please sign in to comment.