Coder Social home page Coder Social logo

leeceny / wechat_xamarin.ios Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 1.0 49.29 MB

Xamarin iOS binding WeChatSDK v1.8.31

Home Page: https://www.nuget.org/packages/Xamarin.iOS.WechatOpenSDK

License: MIT License

C# 100.00%
xamarin xamarin-forms xamarin-ios xamarin-binding xamarin-ios-binding wechat wechat-sdk weixin weixin-sdk

wechat_xamarin.ios's Introduction

Xamarin iOS binding WeChatSDK v1.8.31

NuGet 安装

    using WeChat_Xamarin;
  • 向微信注册ID

    public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
    {
        //请填写您的AppID,否则不会激活微信页面
        WXApi.RegisterApp("AppID");
        
        return true;
    }
  • 调用微信分享文本

    WXSendMessage("SDK1.8.3" +
                  "1.SDK增加调起微信刷卡支付接口" +
                  "2.SDK增加小程序订阅消息接口" +
                  "3.修复小程序订阅消息接口没有resp的问题");
  • 微信分享文本函数

    void WXSendMessage(string text)
    {
        try {
            SendMessageToWXReq req = new SendMessageToWXReq();
            req.Text = text;
            req.BText = true;
            req.Scene = (int)WXScene.Session;

            var result = WXApi.SendReq(req);
            UIAlertView alertView = new UIAlertView("", "分享结果:" + result, null, "取消");
            alertView.Show();
        } catch (Exception ex) {
            UIAlertView alertView = new UIAlertView("", "错误:" + ex, null, "取消");
            alertView.Show();
        }
    }

wechat_xamarin.ios's People

Contributors

leeceny avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

wangyankun33

wechat_xamarin.ios's Issues

Unsupported clang availability platform: 'macCatalyst'

wykuser@wykuserdeMac WeChatSDK1.8.6.1 % sharpie xcode -sdks

sdk: appletvos13.0 arch: arm64
sdk: iphoneos13.1 arch: arm64 armv7
sdk: driverkit19.0 arch: x86_64 i386
sdk: macosx10.15 arch: x86_64 i386
sdk: watchos6.0 arch: armv7k

wykuser@wykuserdeMac WeChatSDK1.8.6.1 % sharpie bind -output=NativeLibrary.iOS -namespace=NativeLibrary.iOS -sdk=iphoneos13.1 /Users/wykuser/Desktop/WeChatSDK1.8.6.1/WechatAuthSDK.h /Users/wykuser/Desktop/WeChatSDK1.8.6.1/WXApi.h /Users/wykuser/Desktop/WeChatSDK1.8.6.1/WXApiObject.h

Parsing 3 header files...

Binding...
System.Exception: Unsupported clang availability platform: 'macCatalyst'
at Sharpie.Bind.Attributes.AvailabilityBaseAttribute+d__6.MoveNext () [0x0037d] in /Users/builder/vsts/_work/2/s/Sharpie.Bind/Attributes/AvailabilityBaseAttribute.cs:192
at System.Linq.Enumerable+SelectManySingleSelectorIterator`2[TSource,TResult].MoveNext () [0x0006f] in <3fb92ec709f44a579da6a23087df403d>:0
at Sharpie.Bind.Massagers.AvailabilityMassager.Massage (ICSharpCode.NRefactory.CSharp.EntityDeclaration entity) [0x00092] in /Users/builder/vsts/_work/2/s/Sharpie.Bind/Massagers/AvailabilityMassager.cs:55
at Sharpie.Bind.Massagers.AvailabilityMassager.VisitMethodDeclaration (ICSharpCode.NRefactory.CSharp.MethodDeclaration methodDeclaration) [0x00000] in /Users/builder/vsts/_work/2/s/Sharpie.Bind/Massagers/AvailabilityMassager.cs:35
at ICSharpCode.NRefactory.CSharp.MethodDeclaration.AcceptVisitor (ICSharpCode.NRefactory.CSharp.IAstVisitor visitor) [0x00000] in :0
at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00010] in :0
at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitTypeDeclaration (ICSharpCode.NRefactory.CSharp.TypeDeclaration typeDeclaration) [0x00000] in :0
at Sharpie.Bind.Massagers.AvailabilityMassager.VisitTypeDeclaration (ICSharpCode.NRefactory.CSharp.TypeDeclaration typeDeclaration) [0x00006] in /Users/builder/vsts/_work/2/s/Sharpie.Bind/Massagers/AvailabilityMassager.cs:24
at ICSharpCode.NRefactory.CSharp.TypeDeclaration.AcceptVisitor (ICSharpCode.NRefactory.CSharp.IAstVisitor visitor) [0x00000] in :0
at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00010] in :0
at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitSyntaxTree (ICSharpCode.NRefactory.CSharp.SyntaxTree syntaxTree) [0x00000] in :0
at Sharpie.Bind.DocumentSyntaxTree.AcceptVisitor (ICSharpCode.NRefactory.CSharp.IAstVisitor visitor) [0x00015] in /Users/builder/vsts/_work/2/s/Sharpie.Bind/DocumentSyntaxTree.cs:37
at Sharpie.Bind.BindingMassager.Massage (ICSharpCode.NRefactory.CSharp.AstNode astNode, Sharpie.Bind.BindingTarget bindingTarget) [0x00033] in /Users/builder/vsts/_work/2/s/Sharpie.Bind/BindingMassager.cs:103
at Sharpie.Bind.BindingFrontend.Bind (Clang.Ast.Decl decl) [0x000b5] in /Users/builder/vsts/_work/2/s/Sharpie.Bind/BindingFrontend.cs:61
at Sharpie.BindTool.HandleTranslationUnit (Clang.Ast.TranslationUnitDecl decl) [0x0018b] in /Users/builder/vsts/_work/2/s/Sharpie/BindTool.cs:164
at Clang.Driver.HandleTranslationUnit (Clang.Ast.TranslationUnitDecl translationUnit) [0x00000] in /Users/builder/vsts/_work/2/s/Clang/Driver.cs:158
at Clang.Driver.HandleTranslationUnit (System.IntPtr translationUnit) [0x00000] in /Users/builder/vsts/_work/2/s/Clang/Driver.cs:148
at (wrapper managed-to-native) Clang.Driver:RunInternal (Clang.Driver,string[],string,Clang.Frontend.DiagnosticConsumer)
at Clang.Driver.Run (System.String[] inputFiles, System.String[] clangArgs, Clang.Frontend.DiagnosticConsumer diagnosticConsumer) [0x00177] in /Users/builder/vsts/_work/2/s/Clang/Driver.cs:139
at Sharpie.ParseTool.Run () [0x005c8] in /Users/builder/vsts/_work/2/s/Sharpie/ParseTool.cs:576
at Sharpie.BindTool.CoreRun () [0x00001] in /Users/builder/vsts/_work/2/s/Sharpie/BindTool.cs:120
at Sharpie.BindTool.Run () [0x00026] in /Users/builder/vsts/_work/2/s/Sharpie/BindTool.cs:98

Done. Exiting with error code 1.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.