友盟分享

以QQ、微信为例:

1).umengumeng 注册app

2). Podfile配置

pod 'UMCCommon'
#pod 'UMCSecurityPlugins' #和支付宝支付的sdk有冲突,酌情添加
pod 'UMCShare/UI'
   
pod 'UMCShare/Social/ReducedWeChat'
pod 'UMCShare/Social/ReducedQQ'

3). 配置LSApplicationQueriesSchemes白名单

	<array>
		<string>wechat</string>
		<string>weixin</string>
		<string>mqqapi</string>
		<string>mqq</string>
		<string>mqqOpensdkSSoLogin</string>
		<string>mqqconnect</string>
		<string>mqqopensdkdataline</string>
		<string>mqqopensdkgrouptribeshare</string>
		<string>mqqopensdkfriend</string>
		<string>mqqopensdkapi</string>
		<string>mqqopensdkapiV2</string>
		<string>mqqopensdkapiV3</string>
		<string>mqqopensdkapiV4</string>
		<string>mqzoneopensdk</string>
		<string>wtloginmqq</string>
		<string>wtloginmqq2</string>
		<string>mqqwpa</string>
		<string>mqzone</string>
		<string>mqzonev2</string>
		<string>mqzoneshare</string>
		<string>wtloginqzone</string>
		<string>mqzonewx</string>
		<string>mqzoneopensdkapiV2</string>
		<string>mqzoneopensdkapi19</string>
		<string>mqzoneopensdkapi</string>
		<string>mqqbrowser</string>
		<string>mttbrowser</string>
	</array>

4). 注册分享对用平台的AppKey等,如QQ开放平台(不需要提交审核即可使用分享)微信开放平台

5). URL Schema配置。 如果不配置,会出现UrlSchema Fail Code=2007的错误

下图来自http://dev.umeng.com/sdk_integate/ios-integrate-guide/share#2(配置第三方平台URL Scheme 未列出则不需设置) 2018030172064x.png

6). app分享代码。