Giter Club home page Giter Club logo

coreumeng's Introduction

CoreUmeng

友盟分享封装


Charlin出框架的目标:简单、易用、实用、高度封装、绝对解耦!



框架截图 CUT

基本功能演示:
image


说明 EXPLAIN

本框架封装了友盟诸多细节,目前仅有分享模块,其他模块持续添加中。
成都iOS开发群:
二群:369870753(新开,新鲜着呢,快加)
一群:163865401(已爆满,加不上了)



####框架特性:

1.封装了友盟分享。统一了API,简化了调用api的复杂度。
2.集成SSO授权。
3.框架内部处理了所有的分享细节,错误与提示。基本可以一键集成,且集成后你不需要考虑异常。
4.处理了未安装app的隐藏,不会导致上架被拒。

使用说明 USAGE


集成SSO授权,需要引入系统库:
Security.framework
libiconv.dylib
SystemConfiguration.framework
CoreGraphics.Framework
libsqlite3.dylib
CoreTelephony.framework
libstdc++.dylib
libz.dylib

此外,关于设置URL SCKEME请查阅官方文档:http://dev.umeng.com/social/ios/detail-share#1

1.导入头文件

#import "CoreUMeng.h"

2.集成功能

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  
  //设置AppKey
  [CoreUMeng umengSetAppKey:UmengAppKey];
  //集成新浪
  [CoreUMeng umengSetSinaSSOWithRedirectURL:@"http://www.baidu.com"];
  //集成微信
  [CoreUMeng umengSetWXAppId:WXAPPID appSecret:WXAPPsecret url:WXUrl];
  //集成QQ
  [CoreUMeng umengSetQQAppId:@"100424468" appSecret:@"c7394704798a158208a74ab60104f0ba" url:@"http://www.umeng.com/social"];
  // Override point for customization after application launch.
  return YES;
}

3.SSO授权调

- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url{
    return  [CoreUMeng umengHandleOpenURL:url];
}
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation{
    return  [CoreUMeng umengHandleOpenURL:url];
}

4.使用

- (IBAction)share:(id)sender {

[CoreUmengShare show:self text:@"我是友盟分享文字" image:[UIImage imageNamed:@"show"]];

}

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.