Latest 1.0.1
Homepage https://github.com/agenric/AGShareDesk
License MIT
Platforms ios 8.0, requires ARC
Dependencies WechatOpenSDK, WeiboSDK, AGTencentOpenAPI
Authors

CI Status
Version
License
Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

AGShareDesk is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "AGShareDesk"

Author

Agenric, [email protected]

License

AGShareDesk is available under the MIT license. See the LICENSE file for more info.

Notice

目前仅对自有业务需求做了简单定制,支持分享普通的文本消息以及附带网址的分享、支持分享到QQ、QQ空间、新浪微博、微信朋友以及微信朋友圈。

其中,需要在info.plist文件中添加对应平台的Scheme以及白名单,如果你不了解,可以去看AGShareDesk-Info.plist中LSApplicationQueriesSchemes对应的键值。

如果你发现不能正常调起第三方App,那有可能是申请的key失效,换成你自己的即可。

  • 两行代码配置完成:
@implementation AGAppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    [[AGShareDesk shareInstance] registerWithWeiboAppKey:@"1818950315" weChatAppKey:@"wx42e8d6a9776ab49c" tencentAppId:@"1105318793"];
    return YES;
}

- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
    [[AGShareDesk shareInstance] handleApplication:app withOpenURL:url options:options];
    return YES;
}
  • 随意调用:
// buttonIndex为选中的分享平台
[[AGShareDesk shareInstance] shareToChannel:buttonIndex withMessgaeObject:[ShareMessageObject messageWithTitle:@"分享标题" content:@"分享内容" link:@"http://www.baidu.com" logoIcon:[UIImage imageNamed:@"shareIcon"]] afterDelegate:self];

Problem

如果你在安装时发现此错误:

 [!] The 'Pods-WeiBoTest' target has transitive dependencies that include static binaries:(省略)

尝试在Podfile文件顶部添加此代码:

pre_install do |installer|
    def installer.verify_no_static_framework_transitive_dependencies; end
end

Latest podspec

{
    "name": "AGShareDesk",
    "version": "1.0.1",
    "summary": "AGShareDesk is a unified sharing desk for QQu3001Wechat and WeiBo.",
    "description": "AGShareDesk is a unified sharing desk whit QQu3001QQZoneu3001WeChatSessionu3001WeChatTimelineu3001Weibo.",
    "homepage": "https://github.com/agenric/AGShareDesk",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Agenric": "[email protected]"
    },
    "source": {
        "git": "https://github.com/agenric/AGShareDesk.git",
        "tag": "1.0.1"
    },
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "AGShareDesk/Classes/**/*",
    "dependencies": {
        "WechatOpenSDK": [],
        "WeiboSDK": [],
        "AGTencentOpenAPI": []
    }
}

Pin It on Pinterest

Share This