├── .gitignore ├── LICENSE ├── README.md ├── WeChat.Android.Samples ├── Assets │ └── AboutAssets.txt ├── MainActivity.cs ├── Properties │ ├── AndroidManifest.xml │ └── AssemblyInfo.cs ├── Resources │ ├── AboutResources.txt │ ├── Resource.Designer.cs │ ├── drawable │ │ └── Icon.png │ ├── layout │ │ └── Main.axml │ └── values │ │ └── Strings.xml └── WeChat.Android.Samples.csproj ├── WeChat.Android ├── Additions │ └── AboutAdditions.txt ├── Jars │ ├── AboutJars.txt │ └── wechat-sdk-android-without-mta-1.3.4.jar ├── Properties │ └── AssemblyInfo.cs ├── Transforms │ ├── EnumFields.xml │ ├── EnumMethods.xml │ └── Metadata.xml └── WeChat.Android.csproj ├── WeChat.IOS.Samples ├── AppDelegate.cs ├── Entitlements.plist ├── Info.plist ├── Main.cs ├── Properties │ └── AssemblyInfo.cs ├── Resources │ ├── LaunchScreen.xib │ └── icon.png ├── TestViewController.cs ├── TestViewController.designer.cs ├── TestViewController.xib └── WeChat.IOS.Samples.csproj ├── WeChat.IOS ├── ApiDefinition.cs ├── Native References │ └── libWeChatSDK.a ├── Properties │ └── AssemblyInfo.cs ├── Structs.cs ├── WeChat.IOS.csproj ├── libWeChatSDK.a └── libWeChatSDK.linkwith.cs └── WechatDemo.sln /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | [Xx]64/ 19 | [Xx]86/ 20 | [Bb]uild/ 21 | bld/ 22 | [Bb]in/ 23 | [Oo]bj/ 24 | 25 | # Visual Studio 2015 cache/options directory 26 | .vs/ 27 | # Uncomment if you have tasks that create the project's static files in wwwroot 28 | #wwwroot/ 29 | 30 | # MSTest test Results 31 | [Tt]est[Rr]esult*/ 32 | [Bb]uild[Ll]og.* 33 | 34 | # NUNIT 35 | *.VisualState.xml 36 | TestResult.xml 37 | 38 | # Build Results of an ATL Project 39 | [Dd]ebugPS/ 40 | [Rr]eleasePS/ 41 | dlldata.c 42 | 43 | # DNX 44 | project.lock.json 45 | artifacts/ 46 | 47 | *_i.c 48 | *_p.c 49 | *_i.h 50 | *.ilk 51 | *.meta 52 | *.obj 53 | *.pch 54 | *.pdb 55 | *.pgc 56 | *.pgd 57 | *.rsp 58 | *.sbr 59 | *.tlb 60 | *.tli 61 | *.tlh 62 | *.tmp 63 | *.tmp_proj 64 | *.log 65 | *.vspscc 66 | *.vssscc 67 | .builds 68 | *.pidb 69 | *.svclog 70 | *.scc 71 | 72 | # Chutzpah Test files 73 | _Chutzpah* 74 | 75 | # Visual C++ cache files 76 | ipch/ 77 | *.aps 78 | *.ncb 79 | *.opendb 80 | *.opensdf 81 | *.sdf 82 | *.cachefile 83 | *.VC.db 84 | 85 | # Visual Studio profiler 86 | *.psess 87 | *.vsp 88 | *.vspx 89 | *.sap 90 | 91 | # TFS 2012 Local Workspace 92 | $tf/ 93 | 94 | # Guidance Automation Toolkit 95 | *.gpState 96 | 97 | # ReSharper is a .NET coding add-in 98 | _ReSharper*/ 99 | *.[Rr]e[Ss]harper 100 | *.DotSettings.user 101 | 102 | # JustCode is a .NET coding add-in 103 | .JustCode 104 | 105 | # TeamCity is a build add-in 106 | _TeamCity* 107 | 108 | # DotCover is a Code Coverage Tool 109 | *.dotCover 110 | 111 | # NCrunch 112 | _NCrunch_* 113 | .*crunch*.local.xml 114 | nCrunchTemp_* 115 | 116 | # MightyMoose 117 | *.mm.* 118 | AutoTest.Net/ 119 | 120 | # Web workbench (sass) 121 | .sass-cache/ 122 | 123 | # Installshield output folder 124 | [Ee]xpress/ 125 | 126 | # DocProject is a documentation generator add-in 127 | DocProject/buildhelp/ 128 | DocProject/Help/*.HxT 129 | DocProject/Help/*.HxC 130 | DocProject/Help/*.hhc 131 | DocProject/Help/*.hhk 132 | DocProject/Help/*.hhp 133 | DocProject/Help/Html2 134 | DocProject/Help/html 135 | 136 | # Click-Once directory 137 | publish/ 138 | 139 | # Publish Web Output 140 | *.[Pp]ublish.xml 141 | *.azurePubxml 142 | 143 | # TODO: Un-comment the next line if you do not want to checkin 144 | # your web deploy settings because they may include unencrypted 145 | # passwords 146 | #*.pubxml 147 | *.publishproj 148 | 149 | # NuGet Packages 150 | *.nupkg 151 | # The packages folder can be ignored because of Package Restore 152 | **/packages/* 153 | # except build/, which is used as an MSBuild target. 154 | !**/packages/build/ 155 | # Uncomment if necessary however generally it will be regenerated when needed 156 | #!**/packages/repositories.config 157 | # NuGet v3's project.json files produces more ignoreable files 158 | *.nuget.props 159 | *.nuget.targets 160 | 161 | # Microsoft Azure Build Output 162 | csx/ 163 | *.build.csdef 164 | 165 | # Microsoft Azure Emulator 166 | ecf/ 167 | rcf/ 168 | 169 | # Microsoft Azure ApplicationInsights config file 170 | ApplicationInsights.config 171 | 172 | # Windows Store app package directory 173 | AppPackages/ 174 | BundleArtifacts/ 175 | 176 | # Visual Studio cache files 177 | # files ending in .cache can be ignored 178 | *.[Cc]ache 179 | # but keep track of directories ending in .cache 180 | !*.[Cc]ache/ 181 | 182 | # Others 183 | ClientBin/ 184 | [Ss]tyle[Cc]op.* 185 | ~$* 186 | *~ 187 | *.dbmdl 188 | *.dbproj.schemaview 189 | *.pfx 190 | *.publishsettings 191 | node_modules/ 192 | orleans.codegen.cs 193 | 194 | # RIA/Silverlight projects 195 | Generated_Code/ 196 | 197 | # Backup & report files from converting an old project file 198 | # to a newer Visual Studio version. Backup files are not needed, 199 | # because we have git ;-) 200 | _UpgradeReport_Files/ 201 | Backup*/ 202 | UpgradeLog*.XML 203 | UpgradeLog*.htm 204 | 205 | # SQL Server files 206 | *.mdf 207 | *.ldf 208 | 209 | # Business Intelligence projects 210 | *.rdl.data 211 | *.bim.layout 212 | *.bim_*.settings 213 | 214 | # Microsoft Fakes 215 | FakesAssemblies/ 216 | 217 | # GhostDoc plugin setting file 218 | *.GhostDoc.xml 219 | 220 | # Node.js Tools for Visual Studio 221 | .ntvs_analysis.dat 222 | 223 | # Visual Studio 6 build log 224 | *.plg 225 | 226 | # Visual Studio 6 workspace options file 227 | *.opt 228 | 229 | # Visual Studio LightSwitch build output 230 | **/*.HTMLClient/GeneratedArtifacts 231 | **/*.DesktopClient/GeneratedArtifacts 232 | **/*.DesktopClient/ModelManifest.xml 233 | **/*.Server/GeneratedArtifacts 234 | **/*.Server/ModelManifest.xml 235 | _Pvt_Extensions 236 | 237 | # LightSwitch generated files 238 | GeneratedArtifacts/ 239 | ModelManifest.xml 240 | 241 | # Paket dependency manager 242 | .paket/paket.exe 243 | 244 | # FAKE - F# Make 245 | .fake/ -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 vilyo 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # WeChatDemo 2 | Xamarin Android and IOS binding WeChatSDK 3 | *** 4 | Xamarin Android和IOS集成微信SDK,实现分享功能 5 | -------------------------------------------------------------------------------- /WeChat.Android.Samples/Assets/AboutAssets.txt: -------------------------------------------------------------------------------- 1 | Any raw assets you want to be deployed with your application can be placed in 2 | this directory (and child directories) and given a Build Action of "AndroidAsset". 3 | 4 | These files will be deployed with you package and will be accessible using Android's 5 | AssetManager, like this: 6 | 7 | public class ReadAsset : Activity 8 | { 9 | protected override void OnCreate (Bundle bundle) 10 | { 11 | base.OnCreate (bundle); 12 | 13 | InputStream input = Assets.Open ("my_asset.txt"); 14 | } 15 | } 16 | 17 | Additionally, some Android functions will automatically load asset files: 18 | 19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf"); -------------------------------------------------------------------------------- /WeChat.Android.Samples/MainActivity.cs: -------------------------------------------------------------------------------- 1 | using Android.App; 2 | using Android.Widget; 3 | using Android.OS; 4 | using Com.Tencent.MM.Opensdk.Openapi; 5 | using Com.Tencent.MM.Opensdk.Modelbase; 6 | using Com.Tencent.MM.Opensdk.Modelmsg; 7 | using System; 8 | using Android.Graphics; 9 | using System.IO; 10 | 11 | namespace WeChat.Android.Samples 12 | { 13 | [Activity(Label = "WeChat.Android.Samples", MainLauncher = true, Icon = "@drawable/icon")] 14 | public class MainActivity : Activity, IWXAPIEventHandler 15 | { 16 | // IWXAPI 是第三方app和微信通信的openapi接口 17 | private IWXAPI api; 18 | 19 | // APP_ID 替换为你的应用从官方网站申请到的合法appId 20 | public const string APP_ID = "wxd930ea5d5a258f4f"; 21 | 22 | //最小支持朋友圈的版本 23 | private const int TIMELINE_SUPPORTED_VERSION = 0x21020001; 24 | 25 | public void OnReq(BaseReq p0) 26 | { 27 | throw new NotImplementedException(); 28 | } 29 | 30 | public void OnResp(BaseResp p0) 31 | { 32 | throw new NotImplementedException(); 33 | } 34 | 35 | protected override void OnCreate(Bundle bundle) 36 | { 37 | base.OnCreate(bundle); 38 | 39 | // Set our view from the "main" layout resource 40 | SetContentView(Resource.Layout.Main); 41 | 42 | // 通过WXAPIFactory工厂,获取IWXAPI的实例 43 | api = WXAPIFactory.CreateWXAPI(this, APP_ID, false); 44 | 45 | Button btnRegister = FindViewById 26 | 35 | 44 | 53 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /WeChat.IOS.Samples/WeChat.IOS.Samples.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | iPhoneSimulator 6 | {DBBC72F4-CE4B-4F65-B402-3CB59388CDCF} 7 | {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 8 | Exe 9 | WeChat.IOS.Samples 10 | Resources 11 | WeChat.IOS.Samples 12 | 13 | 14 | true 15 | full 16 | false 17 | bin\iPhoneSimulator\Debug 18 | DEBUG 19 | prompt 20 | 4 21 | false 22 | x86_64 23 | None 24 | true 25 | 26 | 27 | none 28 | true 29 | bin\iPhoneSimulator\Release 30 | prompt 31 | 4 32 | None 33 | x86_64 34 | false 35 | 36 | 37 | true 38 | full 39 | false 40 | bin\iPhone\Debug 41 | DEBUG 42 | prompt 43 | 4 44 | false 45 | ARMv7, ARM64 46 | Entitlements.plist 47 | iPhone Developer 48 | true 49 | 50 | 51 | 52 | 53 | none 54 | true 55 | bin\iPhone\Release 56 | prompt 57 | 4 58 | Entitlements.plist 59 | ARMv7, ARM64 60 | false 61 | iPhone Developer 62 | 63 | 64 | none 65 | True 66 | bin\iPhone\Ad-Hoc 67 | prompt 68 | 4 69 | False 70 | ARMv7, ARM64 71 | Entitlements.plist 72 | True 73 | Automatic:AdHoc 74 | iPhone Distribution 75 | 76 | 77 | none 78 | True 79 | bin\iPhone\AppStore 80 | prompt 81 | 4 82 | False 83 | ARMv7, ARM64 84 | Entitlements.plist 85 | Automatic:AppStore 86 | iPhone Distribution 87 | 88 | 89 | 90 | 91 | 92 | 93 | TestViewController.cs 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | {f4253f45-f668-4272-82ec-576cde775887} 113 | WeChat.IOS 114 | 115 | 116 | 117 | -------------------------------------------------------------------------------- /WeChat.IOS/ApiDefinition.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | using UIKit; 4 | using Foundation; 5 | using ObjCRuntime; 6 | using CoreGraphics; 7 | 8 | namespace WeChat.IOS 9 | { 10 | // @protocol WechatAuthAPIDelegate 11 | [Protocol, Model] 12 | [BaseType(typeof(NSObject))] 13 | interface WechatAuthAPIDelegate 14 | { 15 | // @optional -(void)onAuthGotQrcode:(UIImage *)image; 16 | [Export("onAuthGotQrcode:")] 17 | void OnAuthGotQrcode(UIImage image); 18 | 19 | // @optional -(void)onQrcodeScanned; 20 | [Export("onQrcodeScanned")] 21 | void OnQrcodeScanned(); 22 | 23 | // @optional -(void)onAuthFinish:(int)errCode AuthCode:(NSString *)authCode; 24 | [Export("onAuthFinish:AuthCode:")] 25 | void OnAuthFinish(int errCode, string authCode); 26 | } 27 | 28 | // @interface WechatAuthSDK : NSObject 29 | [BaseType(typeof(NSObject))] 30 | interface WechatAuthSDK 31 | { 32 | [Wrap("WeakDelegate")] 33 | WechatAuthAPIDelegate Delegate { get; set; } 34 | 35 | // @property (nonatomic, weak) id delegate; 36 | [NullAllowed, Export("delegate", ArgumentSemantic.Weak)] 37 | NSObject WeakDelegate { get; set; } 38 | 39 | // @property (readonly, nonatomic) NSString * sdkVersion; 40 | [Export("sdkVersion")] 41 | string SdkVersion { get; } 42 | 43 | // -(BOOL)Auth:(NSString *)appId nonceStr:(NSString *)nonceStr timeStamp:(NSString *)timeStamp scope:(NSString *)scope signature:(NSString *)signature schemeData:(NSString *)schemeData; 44 | [Export("Auth:nonceStr:timeStamp:scope:signature:schemeData:")] 45 | bool Auth(string appId, string nonceStr, string timeStamp, string scope, string signature, string schemeData); 46 | 47 | // -(BOOL)StopAuth; 48 | [Export("StopAuth")] 49 | //[Verify(MethodToProperty)] 50 | bool StopAuth { get; } 51 | } 52 | 53 | // @interface BaseReq : NSObject 54 | [BaseType(typeof(NSObject))] 55 | interface BaseReq 56 | { 57 | // @property (assign, nonatomic) int type; 58 | [Export("type")] 59 | int Type { get; set; } 60 | 61 | // @property (retain, nonatomic) NSString * openID; 62 | [Export("openID", ArgumentSemantic.Retain)] 63 | string OpenID { get; set; } 64 | } 65 | 66 | // @interface BaseResp : NSObject 67 | [BaseType(typeof(NSObject))] 68 | interface BaseResp 69 | { 70 | // @property (assign, nonatomic) int errCode; 71 | [Export("errCode")] 72 | int ErrCode { get; set; } 73 | 74 | // @property (retain, nonatomic) NSString * errStr; 75 | [Export("errStr", ArgumentSemantic.Retain)] 76 | string ErrStr { get; set; } 77 | 78 | // @property (assign, nonatomic) int type; 79 | [Export("type")] 80 | int Type { get; set; } 81 | } 82 | 83 | // @interface PayReq : BaseReq 84 | [BaseType(typeof(BaseReq))] 85 | interface PayReq 86 | { 87 | // @property (retain, nonatomic) NSString * partnerId; 88 | [Export("partnerId", ArgumentSemantic.Retain)] 89 | string PartnerId { get; set; } 90 | 91 | // @property (retain, nonatomic) NSString * prepayId; 92 | [Export("prepayId", ArgumentSemantic.Retain)] 93 | string PrepayId { get; set; } 94 | 95 | // @property (retain, nonatomic) NSString * nonceStr; 96 | [Export("nonceStr", ArgumentSemantic.Retain)] 97 | string NonceStr { get; set; } 98 | 99 | // @property (assign, nonatomic) UInt32 timeStamp; 100 | [Export("timeStamp")] 101 | uint TimeStamp { get; set; } 102 | 103 | // @property (retain, nonatomic) NSString * package; 104 | [Export("package", ArgumentSemantic.Retain)] 105 | string Package { get; set; } 106 | 107 | // @property (retain, nonatomic) NSString * sign; 108 | [Export("sign", ArgumentSemantic.Retain)] 109 | string Sign { get; set; } 110 | } 111 | 112 | // @interface PayResp : BaseResp 113 | [BaseType(typeof(BaseResp))] 114 | interface PayResp 115 | { 116 | // @property (retain, nonatomic) NSString * returnKey; 117 | [Export("returnKey", ArgumentSemantic.Retain)] 118 | string ReturnKey { get; set; } 119 | } 120 | 121 | // @interface HBReq : BaseReq 122 | [BaseType(typeof(BaseReq))] 123 | interface HBReq 124 | { 125 | // @property (retain, nonatomic) NSString * nonceStr; 126 | [Export("nonceStr", ArgumentSemantic.Retain)] 127 | string NonceStr { get; set; } 128 | 129 | // @property (assign, nonatomic) UInt32 timeStamp; 130 | [Export("timeStamp")] 131 | uint TimeStamp { get; set; } 132 | 133 | // @property (retain, nonatomic) NSString * package; 134 | [Export("package", ArgumentSemantic.Retain)] 135 | string Package { get; set; } 136 | 137 | // @property (retain, nonatomic) NSString * sign; 138 | [Export("sign", ArgumentSemantic.Retain)] 139 | string Sign { get; set; } 140 | } 141 | 142 | // @interface HBResp : BaseResp 143 | [BaseType(typeof(BaseResp))] 144 | interface HBResp 145 | { 146 | } 147 | 148 | // @interface SendAuthReq : BaseReq 149 | [BaseType(typeof(BaseReq))] 150 | interface SendAuthReq 151 | { 152 | // @property (retain, nonatomic) NSString * scope; 153 | [Export("scope", ArgumentSemantic.Retain)] 154 | string Scope { get; set; } 155 | 156 | // @property (retain, nonatomic) NSString * state; 157 | [Export("state", ArgumentSemantic.Retain)] 158 | string State { get; set; } 159 | } 160 | 161 | // @interface SendAuthResp : BaseResp 162 | [BaseType(typeof(BaseResp))] 163 | interface SendAuthResp 164 | { 165 | // @property (retain, nonatomic) NSString * code; 166 | [Export("code", ArgumentSemantic.Retain)] 167 | string Code { get; set; } 168 | 169 | // @property (retain, nonatomic) NSString * state; 170 | [Export("state", ArgumentSemantic.Retain)] 171 | string State { get; set; } 172 | 173 | // @property (retain, nonatomic) NSString * lang; 174 | [Export("lang", ArgumentSemantic.Retain)] 175 | string Lang { get; set; } 176 | 177 | // @property (retain, nonatomic) NSString * country; 178 | [Export("country", ArgumentSemantic.Retain)] 179 | string Country { get; set; } 180 | } 181 | 182 | // @interface SendMessageToWXReq : BaseReq 183 | [BaseType(typeof(BaseReq))] 184 | interface SendMessageToWXReq 185 | { 186 | // @property (retain, nonatomic) NSString * text; 187 | [Export("text", ArgumentSemantic.Retain)] 188 | string Text { get; set; } 189 | 190 | // @property (retain, nonatomic) WXMediaMessage * message; 191 | [Export("message", ArgumentSemantic.Retain)] 192 | WXMediaMessage Message { get; set; } 193 | 194 | // @property (assign, nonatomic) BOOL bText; 195 | [Export("bText")] 196 | bool BText { get; set; } 197 | 198 | // @property (assign, nonatomic) int scene; 199 | [Export("scene")] 200 | int Scene { get; set; } 201 | } 202 | 203 | // @interface SendMessageToWXResp : BaseResp 204 | [BaseType(typeof(BaseResp))] 205 | interface SendMessageToWXResp 206 | { 207 | // @property (retain, nonatomic) NSString * lang; 208 | [Export("lang", ArgumentSemantic.Retain)] 209 | string Lang { get; set; } 210 | 211 | // @property (retain, nonatomic) NSString * country; 212 | [Export("country", ArgumentSemantic.Retain)] 213 | string Country { get; set; } 214 | } 215 | 216 | // @interface GetMessageFromWXReq : BaseReq 217 | [BaseType(typeof(BaseReq))] 218 | interface GetMessageFromWXReq 219 | { 220 | // @property (retain, nonatomic) NSString * lang; 221 | [Export("lang", ArgumentSemantic.Retain)] 222 | string Lang { get; set; } 223 | 224 | // @property (retain, nonatomic) NSString * country; 225 | [Export("country", ArgumentSemantic.Retain)] 226 | string Country { get; set; } 227 | } 228 | 229 | // @interface GetMessageFromWXResp : BaseResp 230 | [BaseType(typeof(BaseResp))] 231 | interface GetMessageFromWXResp 232 | { 233 | // @property (retain, nonatomic) NSString * text; 234 | [Export("text", ArgumentSemantic.Retain)] 235 | string Text { get; set; } 236 | 237 | // @property (retain, nonatomic) WXMediaMessage * message; 238 | [Export("message", ArgumentSemantic.Retain)] 239 | WXMediaMessage Message { get; set; } 240 | 241 | // @property (assign, nonatomic) BOOL bText; 242 | [Export("bText")] 243 | bool BText { get; set; } 244 | } 245 | 246 | // @interface ShowMessageFromWXReq : BaseReq 247 | [BaseType(typeof(BaseReq))] 248 | interface ShowMessageFromWXReq 249 | { 250 | // @property (retain, nonatomic) WXMediaMessage * message; 251 | [Export("message", ArgumentSemantic.Retain)] 252 | WXMediaMessage Message { get; set; } 253 | 254 | // @property (retain, nonatomic) NSString * lang; 255 | [Export("lang", ArgumentSemantic.Retain)] 256 | string Lang { get; set; } 257 | 258 | // @property (retain, nonatomic) NSString * country; 259 | [Export("country", ArgumentSemantic.Retain)] 260 | string Country { get; set; } 261 | } 262 | 263 | // @interface ShowMessageFromWXResp : BaseResp 264 | [BaseType(typeof(BaseResp))] 265 | interface ShowMessageFromWXResp 266 | { 267 | } 268 | 269 | // @interface LaunchFromWXReq : BaseReq 270 | [BaseType(typeof(BaseReq))] 271 | interface LaunchFromWXReq 272 | { 273 | // @property (retain, nonatomic) WXMediaMessage * message; 274 | [Export("message", ArgumentSemantic.Retain)] 275 | WXMediaMessage Message { get; set; } 276 | 277 | // @property (retain, nonatomic) NSString * lang; 278 | [Export("lang", ArgumentSemantic.Retain)] 279 | string Lang { get; set; } 280 | 281 | // @property (retain, nonatomic) NSString * country; 282 | [Export("country", ArgumentSemantic.Retain)] 283 | string Country { get; set; } 284 | } 285 | 286 | // @interface OpenTempSessionReq : BaseReq 287 | [BaseType(typeof(BaseReq))] 288 | interface OpenTempSessionReq 289 | { 290 | // @property (retain, nonatomic) NSString * username; 291 | [Export("username", ArgumentSemantic.Retain)] 292 | string Username { get; set; } 293 | 294 | // @property (retain, nonatomic) NSString * sessionFrom; 295 | [Export("sessionFrom", ArgumentSemantic.Retain)] 296 | string SessionFrom { get; set; } 297 | } 298 | 299 | // @interface OpenWebviewReq : BaseReq 300 | [BaseType(typeof(BaseReq))] 301 | interface OpenWebviewReq 302 | { 303 | // @property (retain, nonatomic) NSString * url; 304 | [Export("url", ArgumentSemantic.Retain)] 305 | string Url { get; set; } 306 | } 307 | 308 | // @interface OpenWebviewResp : BaseResp 309 | [BaseType(typeof(BaseResp))] 310 | interface OpenWebviewResp 311 | { 312 | } 313 | 314 | // @interface OpenTempSessionResp : BaseResp 315 | [BaseType(typeof(BaseResp))] 316 | interface OpenTempSessionResp 317 | { 318 | } 319 | 320 | // @interface OpenRankListReq : BaseReq 321 | [BaseType(typeof(BaseReq))] 322 | interface OpenRankListReq 323 | { 324 | } 325 | 326 | // @interface OpenRankListResp : BaseResp 327 | [BaseType(typeof(BaseResp))] 328 | interface OpenRankListResp 329 | { 330 | } 331 | 332 | // @interface JumpToBizProfileReq : BaseReq 333 | [BaseType(typeof(BaseReq))] 334 | interface JumpToBizProfileReq 335 | { 336 | // @property (retain, nonatomic) NSString * username; 337 | [Export("username", ArgumentSemantic.Retain)] 338 | string Username { get; set; } 339 | 340 | // @property (retain, nonatomic) NSString * extMsg; 341 | [Export("extMsg", ArgumentSemantic.Retain)] 342 | string ExtMsg { get; set; } 343 | 344 | // @property (assign, nonatomic) int profileType; 345 | [Export("profileType")] 346 | int ProfileType { get; set; } 347 | } 348 | 349 | // @interface JumpToBizWebviewReq : BaseReq 350 | [BaseType(typeof(BaseReq))] 351 | interface JumpToBizWebviewReq 352 | { 353 | // @property (assign, nonatomic) int webType; 354 | [Export("webType")] 355 | int WebType { get; set; } 356 | 357 | // @property (retain, nonatomic) NSString * tousrname; 358 | [Export("tousrname", ArgumentSemantic.Retain)] 359 | string Tousrname { get; set; } 360 | 361 | // @property (retain, nonatomic) NSString * extMsg; 362 | [Export("extMsg", ArgumentSemantic.Retain)] 363 | string ExtMsg { get; set; } 364 | } 365 | 366 | // @interface WXCardItem : NSObject 367 | [BaseType(typeof(NSObject))] 368 | interface WXCardItem 369 | { 370 | // @property (retain, nonatomic) NSString * cardId; 371 | [Export("cardId", ArgumentSemantic.Retain)] 372 | string CardId { get; set; } 373 | 374 | // @property (retain, nonatomic) NSString * extMsg; 375 | [Export("extMsg", ArgumentSemantic.Retain)] 376 | string ExtMsg { get; set; } 377 | 378 | // @property (assign, nonatomic) UInt32 cardState; 379 | [Export("cardState")] 380 | uint CardState { get; set; } 381 | 382 | // @property (retain, nonatomic) NSString * encryptCode; 383 | [Export("encryptCode", ArgumentSemantic.Retain)] 384 | string EncryptCode { get; set; } 385 | 386 | // @property (retain, nonatomic) NSString * appID; 387 | [Export("appID", ArgumentSemantic.Retain)] 388 | string AppID { get; set; } 389 | } 390 | 391 | // @interface AddCardToWXCardPackageReq : BaseReq 392 | [BaseType(typeof(BaseReq))] 393 | interface AddCardToWXCardPackageReq 394 | { 395 | // @property (retain, nonatomic) NSArray * cardAry; 396 | [Export("cardAry", ArgumentSemantic.Retain)] 397 | //[Verify(StronglyTypedNSArray)] 398 | NSObject[] CardAry { get; set; } 399 | } 400 | 401 | // @interface AddCardToWXCardPackageResp : BaseResp 402 | [BaseType(typeof(BaseResp))] 403 | interface AddCardToWXCardPackageResp 404 | { 405 | // @property (retain, nonatomic) NSArray * cardAry; 406 | [Export("cardAry", ArgumentSemantic.Retain)] 407 | //[Verify(StronglyTypedNSArray)] 408 | NSObject[] CardAry { get; set; } 409 | } 410 | 411 | // @interface WXChooseCardReq : BaseReq 412 | [BaseType(typeof(BaseReq))] 413 | interface WXChooseCardReq 414 | { 415 | // @property (nonatomic, strong) NSString * appID; 416 | [Export("appID", ArgumentSemantic.Strong)] 417 | string AppID { get; set; } 418 | 419 | // @property (assign, nonatomic) UInt32 shopID; 420 | [Export("shopID")] 421 | uint ShopID { get; set; } 422 | 423 | // @property (assign, nonatomic) UInt32 canMultiSelect; 424 | [Export("canMultiSelect")] 425 | uint CanMultiSelect { get; set; } 426 | 427 | // @property (nonatomic, strong) NSString * cardType; 428 | [Export("cardType", ArgumentSemantic.Strong)] 429 | string CardType { get; set; } 430 | 431 | // @property (nonatomic, strong) NSString * cardTpID; 432 | [Export("cardTpID", ArgumentSemantic.Strong)] 433 | string CardTpID { get; set; } 434 | 435 | // @property (nonatomic, strong) NSString * signType; 436 | [Export("signType", ArgumentSemantic.Strong)] 437 | string SignType { get; set; } 438 | 439 | // @property (nonatomic, strong) NSString * cardSign; 440 | [Export("cardSign", ArgumentSemantic.Strong)] 441 | string CardSign { get; set; } 442 | 443 | // @property (assign, nonatomic) UInt32 timeStamp; 444 | [Export("timeStamp")] 445 | uint TimeStamp { get; set; } 446 | 447 | // @property (nonatomic, strong) NSString * nonceStr; 448 | [Export("nonceStr", ArgumentSemantic.Strong)] 449 | string NonceStr { get; set; } 450 | } 451 | 452 | // @interface WXChooseCardResp : BaseResp 453 | [BaseType(typeof(BaseResp))] 454 | interface WXChooseCardResp 455 | { 456 | // @property (retain, nonatomic) NSArray * cardAry; 457 | [Export("cardAry", ArgumentSemantic.Retain)] 458 | //[Verify(StronglyTypedNSArray)] 459 | NSObject[] CardAry { get; set; } 460 | } 461 | 462 | // @interface WXMediaMessage : NSObject 463 | [BaseType(typeof(NSObject))] 464 | interface WXMediaMessage 465 | { 466 | // +(WXMediaMessage *)message; 467 | [Static] 468 | [Export("message")] 469 | //[Verify(MethodToProperty)] 470 | WXMediaMessage Message { get; } 471 | 472 | // @property (retain, nonatomic) NSString * title; 473 | [Export("title", ArgumentSemantic.Retain)] 474 | string Title { get; set; } 475 | 476 | // @property (retain, nonatomic) NSString * description; 477 | [Export("description", ArgumentSemantic.Retain)] 478 | string Description { get; set; } 479 | 480 | // @property (retain, nonatomic) NSData * thumbData; 481 | [Export("thumbData", ArgumentSemantic.Retain)] 482 | NSData ThumbData { get; set; } 483 | 484 | // @property (retain, nonatomic) NSString * mediaTagName; 485 | [Export("mediaTagName", ArgumentSemantic.Retain)] 486 | string MediaTagName { get; set; } 487 | 488 | // @property (retain, nonatomic) NSString * messageExt; 489 | [Export("messageExt", ArgumentSemantic.Retain)] 490 | string MessageExt { get; set; } 491 | 492 | // @property (retain, nonatomic) NSString * messageAction; 493 | [Export("messageAction", ArgumentSemantic.Retain)] 494 | string MessageAction { get; set; } 495 | 496 | // @property (retain, nonatomic) id mediaObject; 497 | [Export("mediaObject", ArgumentSemantic.Retain)] 498 | NSObject MediaObject { get; set; } 499 | 500 | // -(void)setThumbImage:(UIImage *)image; 501 | [Export("setThumbImage:")] 502 | void SetThumbImage(UIImage image); 503 | } 504 | 505 | // @interface WXImageObject : NSObject 506 | [BaseType(typeof(NSObject))] 507 | interface WXImageObject 508 | { 509 | // +(WXImageObject *)object; 510 | [Static] 511 | [Export("object")] 512 | //[Verify(MethodToProperty)] 513 | WXImageObject Object { get; } 514 | 515 | // @property (retain, nonatomic) NSData * imageData; 516 | [Export("imageData", ArgumentSemantic.Retain)] 517 | NSData ImageData { get; set; } 518 | } 519 | 520 | // @interface WXMusicObject : NSObject 521 | [BaseType(typeof(NSObject))] 522 | interface WXMusicObject 523 | { 524 | // +(WXMusicObject *)object; 525 | [Static] 526 | [Export("object")] 527 | //[Verify(MethodToProperty)] 528 | WXMusicObject Object { get; } 529 | 530 | // @property (retain, nonatomic) NSString * musicUrl; 531 | [Export("musicUrl", ArgumentSemantic.Retain)] 532 | string MusicUrl { get; set; } 533 | 534 | // @property (retain, nonatomic) NSString * musicLowBandUrl; 535 | [Export("musicLowBandUrl", ArgumentSemantic.Retain)] 536 | string MusicLowBandUrl { get; set; } 537 | 538 | // @property (retain, nonatomic) NSString * musicDataUrl; 539 | [Export("musicDataUrl", ArgumentSemantic.Retain)] 540 | string MusicDataUrl { get; set; } 541 | 542 | // @property (retain, nonatomic) NSString * musicLowBandDataUrl; 543 | [Export("musicLowBandDataUrl", ArgumentSemantic.Retain)] 544 | string MusicLowBandDataUrl { get; set; } 545 | } 546 | 547 | // @interface WXVideoObject : NSObject 548 | [BaseType(typeof(NSObject))] 549 | interface WXVideoObject 550 | { 551 | // +(WXVideoObject *)object; 552 | [Static] 553 | [Export("object")] 554 | //[Verify(MethodToProperty)] 555 | WXVideoObject Object { get; } 556 | 557 | // @property (retain, nonatomic) NSString * videoUrl; 558 | [Export("videoUrl", ArgumentSemantic.Retain)] 559 | string VideoUrl { get; set; } 560 | 561 | // @property (retain, nonatomic) NSString * videoLowBandUrl; 562 | [Export("videoLowBandUrl", ArgumentSemantic.Retain)] 563 | string VideoLowBandUrl { get; set; } 564 | } 565 | 566 | // @interface WXWebpageObject : NSObject 567 | [BaseType(typeof(NSObject))] 568 | interface WXWebpageObject 569 | { 570 | // +(WXWebpageObject *)object; 571 | [Static] 572 | [Export("object")] 573 | //[Verify(MethodToProperty)] 574 | WXWebpageObject Object { get; } 575 | 576 | // @property (retain, nonatomic) NSString * webpageUrl; 577 | [Export("webpageUrl", ArgumentSemantic.Retain)] 578 | string WebpageUrl { get; set; } 579 | } 580 | 581 | // @interface WXAppExtendObject : NSObject 582 | [BaseType(typeof(NSObject))] 583 | interface WXAppExtendObject 584 | { 585 | // +(WXAppExtendObject *)object; 586 | [Static] 587 | [Export("object")] 588 | //[Verify(MethodToProperty)] 589 | WXAppExtendObject Object { get; } 590 | 591 | // @property (retain, nonatomic) NSString * url; 592 | [Export("url", ArgumentSemantic.Retain)] 593 | string Url { get; set; } 594 | 595 | // @property (retain, nonatomic) NSString * extInfo; 596 | [Export("extInfo", ArgumentSemantic.Retain)] 597 | string ExtInfo { get; set; } 598 | 599 | // @property (retain, nonatomic) NSData * fileData; 600 | [Export("fileData", ArgumentSemantic.Retain)] 601 | NSData FileData { get; set; } 602 | } 603 | 604 | // @interface WXEmoticonObject : NSObject 605 | [BaseType(typeof(NSObject))] 606 | interface WXEmoticonObject 607 | { 608 | // +(WXEmoticonObject *)object; 609 | [Static] 610 | [Export("object")] 611 | //[Verify(MethodToProperty)] 612 | WXEmoticonObject Object { get; } 613 | 614 | // @property (retain, nonatomic) NSData * emoticonData; 615 | [Export("emoticonData", ArgumentSemantic.Retain)] 616 | NSData EmoticonData { get; set; } 617 | } 618 | 619 | // @interface WXFileObject : NSObject 620 | [BaseType(typeof(NSObject))] 621 | interface WXFileObject 622 | { 623 | // +(WXFileObject *)object; 624 | [Static] 625 | [Export("object")] 626 | //[Verify(MethodToProperty)] 627 | WXFileObject Object { get; } 628 | 629 | // @property (retain, nonatomic) NSString * fileExtension; 630 | [Export("fileExtension", ArgumentSemantic.Retain)] 631 | string FileExtension { get; set; } 632 | 633 | // @property (retain, nonatomic) NSData * fileData; 634 | [Export("fileData", ArgumentSemantic.Retain)] 635 | NSData FileData { get; set; } 636 | } 637 | 638 | // @interface WXLocationObject : NSObject 639 | [BaseType(typeof(NSObject))] 640 | interface WXLocationObject 641 | { 642 | // +(WXLocationObject *)object; 643 | [Static] 644 | [Export("object")] 645 | //[Verify(MethodToProperty)] 646 | WXLocationObject Object { get; } 647 | 648 | // @property (assign, nonatomic) double lng; 649 | [Export("lng")] 650 | double Lng { get; set; } 651 | 652 | // @property (assign, nonatomic) double lat; 653 | [Export("lat")] 654 | double Lat { get; set; } 655 | } 656 | 657 | // @interface WXTextObject : NSObject 658 | [BaseType(typeof(NSObject))] 659 | interface WXTextObject 660 | { 661 | // +(WXTextObject *)object; 662 | [Static] 663 | [Export("object")] 664 | //[Verify(MethodToProperty)] 665 | WXTextObject Object { get; } 666 | 667 | // @property (retain, nonatomic) NSString * contentText; 668 | [Export("contentText", ArgumentSemantic.Retain)] 669 | string ContentText { get; set; } 670 | } 671 | 672 | // @protocol WXApiDelegate 673 | [Protocol, Model] 674 | [BaseType(typeof(NSObject))] 675 | interface WXApiDelegate 676 | { 677 | // @optional -(void)onReq:(BaseReq *)req; 678 | [Export("onReq:")] 679 | void OnReq(BaseReq req); 680 | 681 | // @optional -(void)onResp:(BaseResp *)resp; 682 | [Export("onResp:")] 683 | void OnResp(BaseResp resp); 684 | } 685 | 686 | // @interface WXApi : NSObject 687 | [BaseType(typeof(NSObject))] 688 | interface WXApi 689 | { 690 | // +(BOOL)registerApp:(NSString *)appid; 691 | [Static] 692 | [Export("registerApp:")] 693 | bool RegisterApp(string appid); 694 | 695 | // +(BOOL)registerApp:(NSString *)appid enableMTA:(BOOL)isEnableMTA; 696 | [Static] 697 | [Export("registerApp:enableMTA:")] 698 | bool RegisterApp(string appid, bool isEnableMTA); 699 | 700 | // +(void)registerAppSupportContentFlag:(UInt64)typeFlag; 701 | [Static] 702 | [Export("registerAppSupportContentFlag:")] 703 | void RegisterAppSupportContentFlag(ulong typeFlag); 704 | 705 | // +(BOOL)handleOpenURL:(NSURL *)url delegate:(id)delegate; 706 | [Static] 707 | [Export("handleOpenURL:delegate:")] 708 | bool HandleOpenURL(NSUrl url, WXApiDelegate @delegate); 709 | 710 | // +(BOOL)isWXAppInstalled; 711 | [Static] 712 | [Export("isWXAppInstalled")] 713 | //[Verify(MethodToProperty)] 714 | bool IsWXAppInstalled { get; } 715 | 716 | // +(BOOL)isWXAppSupportApi; 717 | [Static] 718 | [Export("isWXAppSupportApi")] 719 | //[Verify(MethodToProperty)] 720 | bool IsWXAppSupportApi { get; } 721 | 722 | // +(NSString *)getWXAppInstallUrl; 723 | [Static] 724 | [Export("getWXAppInstallUrl")] 725 | //[Verify(MethodToProperty)] 726 | string WXAppInstallUrl { get; } 727 | 728 | // +(NSString *)getApiVersion; 729 | [Static] 730 | [Export("getApiVersion")] 731 | //[Verify(MethodToProperty)] 732 | string ApiVersion { get; } 733 | 734 | // +(BOOL)openWXApp; 735 | [Static] 736 | [Export("openWXApp")] 737 | //[Verify(MethodToProperty)] 738 | bool OpenWXApp { get; } 739 | 740 | // +(BOOL)sendReq:(BaseReq *)req; 741 | [Static] 742 | [Export("sendReq:")] 743 | bool SendReq(BaseReq req); 744 | 745 | // +(BOOL)sendAuthReq:(SendAuthReq *)req viewController:(UIViewController *)viewController delegate:(id)delegate; 746 | [Static] 747 | [Export("sendAuthReq:viewController:delegate:")] 748 | bool SendAuthReq(SendAuthReq req, UIViewController viewController, WXApiDelegate @delegate); 749 | 750 | // +(BOOL)sendResp:(BaseResp *)resp; 751 | [Static] 752 | [Export("sendResp:")] 753 | bool SendResp(BaseResp resp); 754 | } 755 | } 756 | -------------------------------------------------------------------------------- /WeChat.IOS/Native References/libWeChatSDK.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vilyo/WeChatDemo/884e4a3a09155d82081764f141c326cb279976b6/WeChat.IOS/Native References/libWeChatSDK.a -------------------------------------------------------------------------------- /WeChat.IOS/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | using Foundation; 5 | 6 | // This attribute allows you to mark your assemblies as “safe to link”. 7 | // When the attribute is present, the linker—if enabled—will process the assembly 8 | // even if you’re using the “Link SDK assemblies only” option, which is the default for device builds. 9 | 10 | [assembly: LinkerSafe] 11 | 12 | // Information about this assembly is defined by the following attributes. 13 | // Change them to the values specific to your project. 14 | 15 | [assembly: AssemblyTitle("WeChat.IOS")] 16 | [assembly: AssemblyDescription("")] 17 | [assembly: AssemblyConfiguration("")] 18 | [assembly: AssemblyCompany("")] 19 | [assembly: AssemblyProduct("WeChat.IOS")] 20 | [assembly: AssemblyCopyright("Copyright © 2017")] 21 | [assembly: AssemblyTrademark("")] 22 | [assembly: AssemblyCulture("")] 23 | 24 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 25 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 26 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 27 | 28 | [assembly: AssemblyVersion("1.0.*")] 29 | 30 | // The following attributes are used to specify the signing key for the assembly, 31 | // if desired. See the Mono documentation for more information about signing. 32 | 33 | //[assembly: AssemblyDelaySign(false)] 34 | //[assembly: AssemblyKeyFile("")] 35 | -------------------------------------------------------------------------------- /WeChat.IOS/Structs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace WeChat.IOS 4 | { 5 | public enum AuthErrCode 6 | { 7 | Ok = 0, 8 | NormalErr = -1, 9 | NetworkErr = -2, 10 | GetQrcodeFailed = -3, 11 | Cancel = -4, 12 | Timeout = -5 13 | } 14 | 15 | public enum WXErrCode 16 | { 17 | Success = 0, 18 | ErrCodeCommon = -1, 19 | ErrCodeUserCancel = -2, 20 | ErrCodeSentFail = -3, 21 | ErrCodeAuthDeny = -4, 22 | ErrCodeUnsupport = -5 23 | } 24 | 25 | public enum WXScene : uint 26 | { 27 | Session = 0, 28 | Timeline = 1, 29 | Favorite = 2 30 | } 31 | 32 | public enum WXAPISupport : uint 33 | { 34 | WXAPISupportSession = 0 35 | } 36 | 37 | public enum WXBizProfileType : uint 38 | { 39 | Normal = 0, 40 | Device = 1 41 | } 42 | 43 | public enum WXMPWebviewType : uint 44 | { 45 | WXMPWebviewType_Ad = 0 46 | } 47 | 48 | public enum enAppSupportContentFlag : ulong 49 | { 50 | Nocontent = 0, 51 | Text = 1, 52 | Picture = 2, 53 | Location = 4, 54 | Video = 8, 55 | Audio = 16, 56 | Webpage = 32, 57 | Doc = 64, 58 | Docx = 128, 59 | Ppt = 256, 60 | Pptx = 512, 61 | Xls = 1024, 62 | Xlsx = 2048, 63 | Pdf = 4096 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /WeChat.IOS/WeChat.IOS.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | {8FFB629D-F513-41CE-95D2-7ECE97B6EEEC};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 7 | {F4253F45-F668-4272-82EC-576CDE775887} 8 | Library 9 | WeChat.IOS 10 | Resources 11 | WeChat.IOS 12 | 13 | 14 | true 15 | full 16 | false 17 | bin\Debug 18 | DEBUG; 19 | prompt 20 | 4 21 | false 22 | true 23 | 24 | 25 | full 26 | true 27 | bin\Release 28 | prompt 29 | 4 30 | false 31 | true 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | libWeChatSDK.a 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /WeChat.IOS/libWeChatSDK.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vilyo/WeChatDemo/884e4a3a09155d82081764f141c326cb279976b6/WeChat.IOS/libWeChatSDK.a -------------------------------------------------------------------------------- /WeChat.IOS/libWeChatSDK.linkwith.cs: -------------------------------------------------------------------------------- 1 | using ObjCRuntime; 2 | 3 | [assembly: LinkWith("libWeChatSDK.a", ForceLoad = true, SmartLink = true, 4 | Frameworks = "CFNetwork CoreTelephony Security SystemConfiguration", 5 | LinkerFlags = "-ObjC -all_load -lc++ -lsqlite3.0 -lz")] 6 | -------------------------------------------------------------------------------- /WechatDemo.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.25420.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WeChat.Android", "WeChat.Android\WeChat.Android.csproj", "{5904454A-C7F8-4D49-B2BD-0ED26AFB6F1F}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WeChat.Android.Samples", "WeChat.Android.Samples\WeChat.Android.Samples.csproj", "{BA7E768F-1B5C-4433-B61F-DA111259BC4F}" 9 | EndProject 10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WeChat.IOS.Samples", "WeChat.IOS.Samples\WeChat.IOS.Samples.csproj", "{DBBC72F4-CE4B-4F65-B402-3CB59388CDCF}" 11 | EndProject 12 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WeChat.IOS", "WeChat.IOS\WeChat.IOS.csproj", "{F4253F45-F668-4272-82EC-576CDE775887}" 13 | EndProject 14 | Global 15 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 16 | Ad-Hoc|Any CPU = Ad-Hoc|Any CPU 17 | Ad-Hoc|iPhone = Ad-Hoc|iPhone 18 | Ad-Hoc|iPhoneSimulator = Ad-Hoc|iPhoneSimulator 19 | AppStore|Any CPU = AppStore|Any CPU 20 | AppStore|iPhone = AppStore|iPhone 21 | AppStore|iPhoneSimulator = AppStore|iPhoneSimulator 22 | Debug|Any CPU = Debug|Any CPU 23 | Debug|iPhone = Debug|iPhone 24 | Debug|iPhoneSimulator = Debug|iPhoneSimulator 25 | Release|Any CPU = Release|Any CPU 26 | Release|iPhone = Release|iPhone 27 | Release|iPhoneSimulator = Release|iPhoneSimulator 28 | EndGlobalSection 29 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 30 | {5904454A-C7F8-4D49-B2BD-0ED26AFB6F1F}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU 31 | {5904454A-C7F8-4D49-B2BD-0ED26AFB6F1F}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU 32 | {5904454A-C7F8-4D49-B2BD-0ED26AFB6F1F}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU 33 | {5904454A-C7F8-4D49-B2BD-0ED26AFB6F1F}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU 34 | {5904454A-C7F8-4D49-B2BD-0ED26AFB6F1F}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU 35 | {5904454A-C7F8-4D49-B2BD-0ED26AFB6F1F}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU 36 | {5904454A-C7F8-4D49-B2BD-0ED26AFB6F1F}.AppStore|Any CPU.ActiveCfg = Release|Any CPU 37 | {5904454A-C7F8-4D49-B2BD-0ED26AFB6F1F}.AppStore|Any CPU.Build.0 = Release|Any CPU 38 | {5904454A-C7F8-4D49-B2BD-0ED26AFB6F1F}.AppStore|iPhone.ActiveCfg = Release|Any CPU 39 | {5904454A-C7F8-4D49-B2BD-0ED26AFB6F1F}.AppStore|iPhone.Build.0 = Release|Any CPU 40 | {5904454A-C7F8-4D49-B2BD-0ED26AFB6F1F}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU 41 | {5904454A-C7F8-4D49-B2BD-0ED26AFB6F1F}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU 42 | {5904454A-C7F8-4D49-B2BD-0ED26AFB6F1F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 43 | {5904454A-C7F8-4D49-B2BD-0ED26AFB6F1F}.Debug|Any CPU.Build.0 = Debug|Any CPU 44 | {5904454A-C7F8-4D49-B2BD-0ED26AFB6F1F}.Debug|iPhone.ActiveCfg = Debug|Any CPU 45 | {5904454A-C7F8-4D49-B2BD-0ED26AFB6F1F}.Debug|iPhone.Build.0 = Debug|Any CPU 46 | {5904454A-C7F8-4D49-B2BD-0ED26AFB6F1F}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU 47 | {5904454A-C7F8-4D49-B2BD-0ED26AFB6F1F}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU 48 | {5904454A-C7F8-4D49-B2BD-0ED26AFB6F1F}.Release|Any CPU.ActiveCfg = Release|Any CPU 49 | {5904454A-C7F8-4D49-B2BD-0ED26AFB6F1F}.Release|Any CPU.Build.0 = Release|Any CPU 50 | {5904454A-C7F8-4D49-B2BD-0ED26AFB6F1F}.Release|iPhone.ActiveCfg = Release|Any CPU 51 | {5904454A-C7F8-4D49-B2BD-0ED26AFB6F1F}.Release|iPhone.Build.0 = Release|Any CPU 52 | {5904454A-C7F8-4D49-B2BD-0ED26AFB6F1F}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU 53 | {5904454A-C7F8-4D49-B2BD-0ED26AFB6F1F}.Release|iPhoneSimulator.Build.0 = Release|Any CPU 54 | {BA7E768F-1B5C-4433-B61F-DA111259BC4F}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU 55 | {BA7E768F-1B5C-4433-B61F-DA111259BC4F}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU 56 | {BA7E768F-1B5C-4433-B61F-DA111259BC4F}.Ad-Hoc|Any CPU.Deploy.0 = Release|Any CPU 57 | {BA7E768F-1B5C-4433-B61F-DA111259BC4F}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU 58 | {BA7E768F-1B5C-4433-B61F-DA111259BC4F}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU 59 | {BA7E768F-1B5C-4433-B61F-DA111259BC4F}.Ad-Hoc|iPhone.Deploy.0 = Release|Any CPU 60 | {BA7E768F-1B5C-4433-B61F-DA111259BC4F}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU 61 | {BA7E768F-1B5C-4433-B61F-DA111259BC4F}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU 62 | {BA7E768F-1B5C-4433-B61F-DA111259BC4F}.Ad-Hoc|iPhoneSimulator.Deploy.0 = Release|Any CPU 63 | {BA7E768F-1B5C-4433-B61F-DA111259BC4F}.AppStore|Any CPU.ActiveCfg = Release|Any CPU 64 | {BA7E768F-1B5C-4433-B61F-DA111259BC4F}.AppStore|Any CPU.Build.0 = Release|Any CPU 65 | {BA7E768F-1B5C-4433-B61F-DA111259BC4F}.AppStore|Any CPU.Deploy.0 = Release|Any CPU 66 | {BA7E768F-1B5C-4433-B61F-DA111259BC4F}.AppStore|iPhone.ActiveCfg = Release|Any CPU 67 | {BA7E768F-1B5C-4433-B61F-DA111259BC4F}.AppStore|iPhone.Build.0 = Release|Any CPU 68 | {BA7E768F-1B5C-4433-B61F-DA111259BC4F}.AppStore|iPhone.Deploy.0 = Release|Any CPU 69 | {BA7E768F-1B5C-4433-B61F-DA111259BC4F}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU 70 | {BA7E768F-1B5C-4433-B61F-DA111259BC4F}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU 71 | {BA7E768F-1B5C-4433-B61F-DA111259BC4F}.AppStore|iPhoneSimulator.Deploy.0 = Release|Any CPU 72 | {BA7E768F-1B5C-4433-B61F-DA111259BC4F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 73 | {BA7E768F-1B5C-4433-B61F-DA111259BC4F}.Debug|Any CPU.Build.0 = Debug|Any CPU 74 | {BA7E768F-1B5C-4433-B61F-DA111259BC4F}.Debug|Any CPU.Deploy.0 = Debug|Any CPU 75 | {BA7E768F-1B5C-4433-B61F-DA111259BC4F}.Debug|iPhone.ActiveCfg = Debug|Any CPU 76 | {BA7E768F-1B5C-4433-B61F-DA111259BC4F}.Debug|iPhone.Build.0 = Debug|Any CPU 77 | {BA7E768F-1B5C-4433-B61F-DA111259BC4F}.Debug|iPhone.Deploy.0 = Debug|Any CPU 78 | {BA7E768F-1B5C-4433-B61F-DA111259BC4F}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU 79 | {BA7E768F-1B5C-4433-B61F-DA111259BC4F}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU 80 | {BA7E768F-1B5C-4433-B61F-DA111259BC4F}.Debug|iPhoneSimulator.Deploy.0 = Debug|Any CPU 81 | {BA7E768F-1B5C-4433-B61F-DA111259BC4F}.Release|Any CPU.ActiveCfg = Release|Any CPU 82 | {BA7E768F-1B5C-4433-B61F-DA111259BC4F}.Release|Any CPU.Build.0 = Release|Any CPU 83 | {BA7E768F-1B5C-4433-B61F-DA111259BC4F}.Release|Any CPU.Deploy.0 = Release|Any CPU 84 | {BA7E768F-1B5C-4433-B61F-DA111259BC4F}.Release|iPhone.ActiveCfg = Release|Any CPU 85 | {BA7E768F-1B5C-4433-B61F-DA111259BC4F}.Release|iPhone.Build.0 = Release|Any CPU 86 | {BA7E768F-1B5C-4433-B61F-DA111259BC4F}.Release|iPhone.Deploy.0 = Release|Any CPU 87 | {BA7E768F-1B5C-4433-B61F-DA111259BC4F}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU 88 | {BA7E768F-1B5C-4433-B61F-DA111259BC4F}.Release|iPhoneSimulator.Build.0 = Release|Any CPU 89 | {BA7E768F-1B5C-4433-B61F-DA111259BC4F}.Release|iPhoneSimulator.Deploy.0 = Release|Any CPU 90 | {DBBC72F4-CE4B-4F65-B402-3CB59388CDCF}.Ad-Hoc|Any CPU.ActiveCfg = Ad-Hoc|iPhone 91 | {DBBC72F4-CE4B-4F65-B402-3CB59388CDCF}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone 92 | {DBBC72F4-CE4B-4F65-B402-3CB59388CDCF}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone 93 | {DBBC72F4-CE4B-4F65-B402-3CB59388CDCF}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Ad-Hoc|iPhoneSimulator 94 | {DBBC72F4-CE4B-4F65-B402-3CB59388CDCF}.Ad-Hoc|iPhoneSimulator.Build.0 = Ad-Hoc|iPhoneSimulator 95 | {DBBC72F4-CE4B-4F65-B402-3CB59388CDCF}.AppStore|Any CPU.ActiveCfg = AppStore|iPhone 96 | {DBBC72F4-CE4B-4F65-B402-3CB59388CDCF}.AppStore|iPhone.ActiveCfg = AppStore|iPhone 97 | {DBBC72F4-CE4B-4F65-B402-3CB59388CDCF}.AppStore|iPhone.Build.0 = AppStore|iPhone 98 | {DBBC72F4-CE4B-4F65-B402-3CB59388CDCF}.AppStore|iPhoneSimulator.ActiveCfg = AppStore|iPhoneSimulator 99 | {DBBC72F4-CE4B-4F65-B402-3CB59388CDCF}.AppStore|iPhoneSimulator.Build.0 = AppStore|iPhoneSimulator 100 | {DBBC72F4-CE4B-4F65-B402-3CB59388CDCF}.Debug|Any CPU.ActiveCfg = Debug|iPhone 101 | {DBBC72F4-CE4B-4F65-B402-3CB59388CDCF}.Debug|iPhone.ActiveCfg = Debug|iPhone 102 | {DBBC72F4-CE4B-4F65-B402-3CB59388CDCF}.Debug|iPhone.Build.0 = Debug|iPhone 103 | {DBBC72F4-CE4B-4F65-B402-3CB59388CDCF}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator 104 | {DBBC72F4-CE4B-4F65-B402-3CB59388CDCF}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator 105 | {DBBC72F4-CE4B-4F65-B402-3CB59388CDCF}.Release|Any CPU.ActiveCfg = Release|iPhone 106 | {DBBC72F4-CE4B-4F65-B402-3CB59388CDCF}.Release|iPhone.ActiveCfg = Release|iPhone 107 | {DBBC72F4-CE4B-4F65-B402-3CB59388CDCF}.Release|iPhone.Build.0 = Release|iPhone 108 | {DBBC72F4-CE4B-4F65-B402-3CB59388CDCF}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator 109 | {DBBC72F4-CE4B-4F65-B402-3CB59388CDCF}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator 110 | {F4253F45-F668-4272-82EC-576CDE775887}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU 111 | {F4253F45-F668-4272-82EC-576CDE775887}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU 112 | {F4253F45-F668-4272-82EC-576CDE775887}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU 113 | {F4253F45-F668-4272-82EC-576CDE775887}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU 114 | {F4253F45-F668-4272-82EC-576CDE775887}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU 115 | {F4253F45-F668-4272-82EC-576CDE775887}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU 116 | {F4253F45-F668-4272-82EC-576CDE775887}.AppStore|Any CPU.ActiveCfg = Release|Any CPU 117 | {F4253F45-F668-4272-82EC-576CDE775887}.AppStore|Any CPU.Build.0 = Release|Any CPU 118 | {F4253F45-F668-4272-82EC-576CDE775887}.AppStore|iPhone.ActiveCfg = Release|Any CPU 119 | {F4253F45-F668-4272-82EC-576CDE775887}.AppStore|iPhone.Build.0 = Release|Any CPU 120 | {F4253F45-F668-4272-82EC-576CDE775887}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU 121 | {F4253F45-F668-4272-82EC-576CDE775887}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU 122 | {F4253F45-F668-4272-82EC-576CDE775887}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 123 | {F4253F45-F668-4272-82EC-576CDE775887}.Debug|Any CPU.Build.0 = Debug|Any CPU 124 | {F4253F45-F668-4272-82EC-576CDE775887}.Debug|iPhone.ActiveCfg = Debug|Any CPU 125 | {F4253F45-F668-4272-82EC-576CDE775887}.Debug|iPhone.Build.0 = Debug|Any CPU 126 | {F4253F45-F668-4272-82EC-576CDE775887}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU 127 | {F4253F45-F668-4272-82EC-576CDE775887}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU 128 | {F4253F45-F668-4272-82EC-576CDE775887}.Release|Any CPU.ActiveCfg = Release|Any CPU 129 | {F4253F45-F668-4272-82EC-576CDE775887}.Release|Any CPU.Build.0 = Release|Any CPU 130 | {F4253F45-F668-4272-82EC-576CDE775887}.Release|iPhone.ActiveCfg = Release|Any CPU 131 | {F4253F45-F668-4272-82EC-576CDE775887}.Release|iPhone.Build.0 = Release|Any CPU 132 | {F4253F45-F668-4272-82EC-576CDE775887}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU 133 | {F4253F45-F668-4272-82EC-576CDE775887}.Release|iPhoneSimulator.Build.0 = Release|Any CPU 134 | EndGlobalSection 135 | GlobalSection(SolutionProperties) = preSolution 136 | HideSolutionNode = FALSE 137 | EndGlobalSection 138 | EndGlobal 139 | --------------------------------------------------------------------------------