ains</key>
<true/>
<key>NSThirdPartyExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
<key>sinajs.cn</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSThirdPartyExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
<key>sina.cn</key>
<dict>
<!-- 适配 iOS10 -->
<key>NSExceptionMinimumTLSVersion</key>
<string>TLSv1.0</string>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
<key>weibo.cn</key>
<dict>
<!-- 适配 iOS10 -->
<key>NSExceptionMinimumTLSVersion</key>
<string>TLSv1.0</string>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
<key>weibo.com</key>
<dict>
<!-- 适配 iOS10 -->
<key>NSExceptionMinimumTLSVersion</key>
<string>TLSv1.0</string>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSThirdPartyExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
<!-- 新浪微博-->
</dict>
</dict>
第三步:Usage 使用
import JShareModule from 'jshare-react-native';
JShareModule.setup(param) // iOS 需要调用初始化函数, parm 这个参数
,需要填入应用注册信息,详情可以参考 API 文档
成功初始化后,就可以调用分享接口,我们先要构造消息对象,然后再调用 share()
//
// platformString:'wechat_session' / 微信好友(会话)
// 'wechat_timeLine' / 微信朋友圈
// 'wechat_favourite' / 微信收藏
// 'qq' / QQ 好友
// 'qzone' / QQ 空间
// 'sina_weibo' / 新浪微博
// 'sina_weibo_contact'/ 新浪微博联系人
//
//
// textMessage =
// {
// type: 'text'
// platform: platformString // 分享到指定平台
// text: String
// imagePath: // 选填,新浪微博本地图片地址,其他平台没有这个字段(iOS 不支持这个字段)
// }
//
// imageMessage =
// {
// type: 'image'
// platform: platformString // 分享到指定平台
// imagePath: String // 本地图片路径 imagePath, imageUrl imageArray 必须三选一
// text: String // 选填
// imageUrl: String // 网络图片地址,必须以 http 或 https 开头,imagePath, imageUrl imageArray 必须三选一 (iOS 不支持这个字段)
// imageArray: [String] // (选填: 分享到 Qzone 才提供这个字段) 如果需要分享多张图片需要这个参数,数组中问题图片路径 imagePath, imageUrl imageArray 必须三选一
// }
//
// videoMessage =
// {
// type: 'video'
// platform: platformString // 分享到指定平台
// title: String // 选填
// url: String // 视频跳转页面 url
// text: String // 选填
// imagePath: String // 选填,缩略图,本地图片路径
//
// videoUrl: String // QQ 空间本地视频 (iOS 不支持这个字段)
// }
//
// audioMessage =
// {
// type: 'audio'
// platform: platformString // 分享到指定平台
// musicUrl: String //必填 点击直接播放的 url
// url: String //选填,点击跳转的 url
// imagePath: String //选填,缩略图,本地图片路径,imagePath,imageUrl 必须二选一
// imageUrl: String // 选填,网络图片路径,imagePath, imageUrl 必须二选一
// title: String // 选填
// text: String // 选填
// }
//
// fileMessage =
// {
// type: 'file'
// platform: platformString // 分享到指定平台
// path: String // 必填,文件路径
// fileExt: String // 必填,文件类型后