├── README.md ├── ShareSDK-flutter-1.3.16.apk └── sharesdk_plugin ├── .gitignore ├── .metadata ├── CHANGELOG.md ├── LICENSE ├── README.md ├── android ├── .gitignore ├── .project ├── build.gradle ├── gradle.properties ├── libs │ ├── MobCoreULT-2022.0617.1428.aar │ ├── MobGUIULT-2022.0617.1428.jar │ ├── MobSupportV1-2022.0617.1428.jar │ ├── OneKeyShare-3.10.17.aar │ └── ShareSDK-3.10.17.aar ├── settings.gradle └── src │ └── main │ ├── AndroidManifest.xml │ └── java │ └── com │ └── mob │ └── flutter │ └── sharesdk │ ├── SharesdkPlugin.java │ └── impl │ ├── Const.java │ ├── FlutterLoopSharePrepare.java │ ├── Log.java │ ├── ObjectUtils.java │ ├── StrUtils.java │ ├── ThreadManager.java │ └── Utils.java ├── example ├── .flutter-plugins-dependencies ├── .gitignore ├── .metadata ├── README.md ├── android │ ├── .gitignore │ ├── .settings │ │ └── org.eclipse.buildship.core.prefs │ ├── MobSDK.gradle │ ├── app │ │ ├── build.gradle │ │ ├── demokey.keystore │ │ ├── proguard-rules.pro │ │ ├── release │ │ │ └── output.json │ │ └── src │ │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── mob │ │ │ │ │ └── sharesdk_plugin_example │ │ │ │ │ ├── App.java │ │ │ │ │ └── MainActivity.java │ │ │ └── res │ │ │ │ ├── drawable │ │ │ │ └── launch_background.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ └── values │ │ │ │ └── styles.xml │ │ │ └── profile │ │ │ └── AndroidManifest.xml │ ├── build.gradle │ ├── demokey.keystore │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ ├── proguard-project.txt │ └── settings.gradle ├── ios │ ├── .gitignore │ ├── Flutter │ │ ├── AppFrameworkInfo.plist │ │ ├── Debug.xcconfig │ │ ├── Flutter.podspec │ │ ├── Release.xcconfig │ │ └── flutter_export_environment.sh │ ├── Podfile │ ├── Podfile.lock │ ├── Runner.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ └── IDEWorkspaceChecks.plist │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── Runner │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ └── Icon-App-83.5x83.5@2x.png │ │ └── LaunchImage.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ └── README.md │ │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ │ ├── Info.plist │ │ ├── Runner-Bridging-Header.h │ │ ├── Runner.entitlements │ │ ├── cat.mp4 │ │ └── tx@2x.png ├── lib │ ├── home.dart │ └── main.dart ├── pubspec.yaml └── test │ └── widget_test.dart ├── ios ├── .gitignore ├── Assets │ └── .gitkeep ├── Classes │ ├── SharesdkPlugin.h │ └── SharesdkPlugin.m └── sharesdk_plugin.podspec ├── lib ├── sharesdk_defines.dart ├── sharesdk_interface.dart ├── sharesdk_map.dart ├── sharesdk_plugin.dart └── sharesdk_register.dart ├── pubspec.yaml └── test └── sharesdk_plugin_test.dart /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # ShareSDK-For-Flutter 4 | 5 | ### 注意: 6 | #### 请使用最新插件sharesdk_plugin([https://pub.dartlang.org/packages/sharesdk_plugin](https://pub.dartlang.org/packages/sharesdk_plugin)) 7 | > 8 | -------------------------------------------------------------------------------- /ShareSDK-flutter-1.3.16.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobClub/ShareSDK-For-Flutter/5789425a5dd7116416da74c4df5f39a0ce8ea4ee/ShareSDK-flutter-1.3.16.apk -------------------------------------------------------------------------------- /sharesdk_plugin/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .dart_tool/ 3 | 4 | .packages 5 | .pub/ 6 | pubspec.lock 7 | 8 | build/ 9 | 10 | # Gradle directory 11 | .gradle/ 12 | 13 | # Java class files 14 | *.class 15 | 16 | # IntelliJ 17 | *.iml 18 | .idea/workspace.xml 19 | .idea/tasks.xml 20 | .idea/gradle.xml 21 | .idea/assetWizardSettings.xml 22 | .idea/dictionaries 23 | .idea/libraries 24 | .idea/caches 25 | .idea 26 | 27 | # generated files 28 | bin/ 29 | gen/ 30 | out/ 31 | -------------------------------------------------------------------------------- /sharesdk_plugin/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 20e59316b8b8474554b38493b8ca888794b0234a 8 | channel: stable 9 | 10 | project_type: plugin 11 | -------------------------------------------------------------------------------- /sharesdk_plugin/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 0.0.1 2 | 3 | * 1.Describe initial release. 4 | 5 | ## 1.0.1 6 | 7 | * 1.Add all ShareSDK API support. 8 | 9 | ## 1.1.0 10 | 11 | * 1.iOS:Support all API & release for swift & bug fix. 12 | * 2.Android:Remove useless interface & bug fix. 13 | 14 | ## 1.1.1 15 | 16 | * 1.Update androidPackage to com.yoozoo.sharesdk 17 | 18 | ## 1.1.1 19 | 20 | * 1.Update android support 21 | 22 | ## 1.1.2 23 | 24 | * 1.Android bug fix. 25 | 26 | ## 1.1.3 27 | 28 | * 1.Android bug fix. 29 | 30 | ## 1.1.4 31 | 32 | * 1.Android add wechat file share 33 | 34 | ## 1.1.5 35 | * 1.Android adapt to flutter sdk 1.9+ 36 | 37 | ## 1.1.6 38 | * 1.Android Add to Douyin sharing function 39 | * 2.Android Add to share video url for general interface 40 | 41 | ## 1.1.7 42 | * 1.iOS Add " Sign in with Apple" 43 | 44 | ## 1.2.0 45 | * 1.Android Add to policy Privacy policy 46 | * 2.IOS Add to Privacy policy 47 | 48 | ## 1.2.1 49 | * 1.Android fix bug that release in Flutter_v1.12.13+hotfix.8 is ok 50 | * 2.iOS fix bug 51 | 52 | ## 1.2.4 53 | 54 | * 1.iOS add snapchat 55 | 56 | ## 1.2.5 57 | 58 | * 1.iOS add KuaiShou/WatermelonVideo 59 | * 2.iOS fix bug 60 | 61 | ## 1.2.6 62 | * 1.iOS fix bug 63 | 64 | ## 1.2.7 65 | * 1.iOS fix bug 66 | 67 | ## 1.2.8 68 | * 1.iOS fix bug 69 | 70 | ## 1.2.9 71 | * 1.iOS fix bug 72 | * 2.iOS add TikTok 73 | * 3.iOS add ShareWithActivity 74 | 75 | ## 1.3.0 76 | * 1.iOS fix bug 77 | 78 | ## 1.3.1 79 | * 1.iOS fix bug 80 | 81 | ## 1.3.2 82 | * 1.android fix bug 83 | * 2.android add douyin 84 | 85 | ## 1.3.3 86 | * 1.upgrade Android embedding from v1 to v2 87 | 88 | ## 1.3.4 89 | * 1.Code formatting optimization 90 | 91 | ## 1.3.5 92 | * 1.standardization 93 | 94 | ## 1.3.6 95 | * 1.优化性能 96 | 97 | ## 1.3.7 98 | * 1.android fix bug 99 | 100 | ## 1.3.8 101 | * 1.android fix bug 102 | * 2.ios fix bug 103 | 104 | ## 1.3.9 105 | * 1.android fix bug 106 | 107 | ## 1.3.10 108 | * 1.android fix bug 109 | 110 | ## 1.3.11 111 | * 1.android fix bug 112 | 113 | ## 1.3.12 114 | * 1.Qzone add config DISABLE_NEW_TASK 115 | 116 | ## 1.3.14 117 | * 1. Update Kakao SDK 118 | 119 | ## 1.3.15 120 | * 1. support douyin IM 121 | 122 | ## 1.3.16 123 | * 1. support nameSpace -------------------------------------------------------------------------------- /sharesdk_plugin/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright © 2015-2030, MobTech. -------------------------------------------------------------------------------- /sharesdk_plugin/README.md: -------------------------------------------------------------------------------- 1 | 2 | # ShareSDK For Flutter 3 | ### 这是一个基于ShareSDK功能的扩展的Flutter插件。使用此插件能够帮助您在使用Flutter开发应用时,快速地实现社会化功能,例如第三方授权登录,获取用户信息以及社交平台的分享等功能。 4 | 5 | **原生SDK支持的最低版本:** 6 | 7 | - [Android](https://github.com/MobClub/ShareSDK-for-Android) - V3.4.0 8 | - [iOS](https://github.com/MobClub/ShareSDK-for-iOS) - V4.3.2 9 | 10 | **简介:** http://www.mob.com/product/sharesdk 11 | 12 | **插件主页:** https://pub.dartlang.org/packages/sharesdk_plugin 13 | 14 | **官网文档:** http://wiki.mob.com/快速集成/ 15 | 16 | **Demo例子:** https://github.com/MobClub/ShareSDK-For-Flutter/sharesdk_plugin 17 | 18 | ## 开始集成 19 | 20 | 参考[官方插件集成文档](https://pub.dartlang.org/packages/sharesdk#-installing-tab-) 21 | 22 | 自定义需要导入的分享平台: 23 | ### iOS 24 | 你需要重新编辑 *sharesdk.podspec* 文件设置 dependency,具体支持的平台可以参阅`pod search mob_sharesdk` 或者参考[官网文档](https://www.mob.com/wiki/detailed?wiki=4&id=14) 25 | 26 | ``` 27 | # 28 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html 29 | # 30 | Pod::Spec.new do |s| 31 | s.name = 'sharesdk' 32 | s.version = '0.0.1' 33 | s.summary = 'flutter plugin for sharesdk.' 34 | s.description = 'ShareSDK is the most comprehensive Social SDK in the world,which share easily with 40+ platforms.' 35 | s.homepage = 'http://www.mob.com' 36 | s.license = { :file => '../LICENSE' } 37 | s.author = { 'Mob' => 'mobproducts@163.com' } 38 | s.source = { :path => '.' } 39 | s.source_files = 'Classes/**/*' 40 | s.public_header_files = 'Classes/**/*.h' 41 | s.dependency 'Flutter' 42 | s.dependency 'mob_sharesdk' 43 | # s.dependency 'mob_sharesdk/ShareSDKUI' 44 | # s.dependency 'mob_sharesdk/ShareSDKPlatforms/QQ' 45 | # s.dependency 'mob_sharesdk/ShareSDKPlatforms/SinaWeibo' 46 | # s.dependency 'mob_sharesdk/ShareSDKPlatforms/WeChat' 47 | # s.dependency 'mob_sharesdk/ShareSDKPlatforms/Facebook' 48 | # s.dependency 'mob_sharesdk/ShareSDKPlatforms/Twitter' 49 | 50 | s.ios.deployment_target = '8.0' 51 | end 52 | ``` 53 | 54 | 然后你需要根据[官方文档](https://www.mob.com/wiki/detailed?wiki=484&id=14)在Xcode工程的info.plist里面配置Appkey 和 AppSecret, 以及各平台的白名单和urlScheme。 55 | 56 | ### Android 57 | 你需要重新编辑build.gradle, mobsdk.gradle文件来选择你需要使用的平台,具体支持的平台可以参阅[官网技术文档](https://www.mob.com/wiki/detailed?wiki=485&id=14) 58 | 59 | #### build.gradle 60 | 61 | ``` 62 | buildscript { 63 | repositories { 64 | google() 65 | jcenter() 66 | maven { 67 | url "http://mvn.mob.com/android" 68 | } 69 | } 70 | 71 | dependencies { 72 | classpath 'com.android.tools.build:gradle:3.1.2' 73 | classpath 'com.mob.sdk:MobSDK:+' 74 | } 75 | } 76 | ``` 77 | 78 | #### mobsdk.gradle 79 | 80 | ``` 81 | MobSDK { 82 | appKey "moba6b6c6d6" 83 | appSecret "b89d2427a3bc7ad1aea1e1e8c1d36bf3" 84 | 85 | ShareSDK { 86 | 87 | // platform configuration information 88 | devInfo { 89 | QQ { 90 | id 7 91 | sortId 7 92 | appId "100371282" 93 | appKey "aed9b0303e3ed1e27bae87c33761161d" 94 | shareByAppClient true 95 | bypassApproval false 96 | enable true 97 | } 98 | 99 | SinaWeibo { 100 | id 1 101 | sortId 1 102 | appKey "568898243" 103 | appSecret "38a4f8204cc784f81f9f0daaf31e02e3" 104 | callbackUri "http://www.sharesdk.cn" 105 | shareByAppClient true 106 | enable true 107 | } 108 | 109 | Wechat { 110 | id 4 111 | sortId 4 112 | appId "wx4868b35061f87885" 113 | appSecret "64020361b8ec4c99936c0e3999a9f249" 114 | userName "gh_afb25ac019c9" 115 | path "pages/index/index.html?id=1" 116 | withShareTicket true 117 | miniprogramType 0 118 | bypassApproval false 119 | enable true 120 | } 121 | 122 | Facebook { 123 | id 8 124 | sortId 8 125 | appKey "1412473428822331" 126 | appSecret "a42f4f3f867dc947b9ed6020c2e93558" 127 | callbackUri "https://mob.com" 128 | shareByAppClient true 129 | enable true 130 | } 131 | 132 | Twitter { 133 | id 9 134 | sortId 9 135 | appKey "viOnkeLpHBKs6KXV7MPpeGyzE" 136 | appSecret "NJEglQUy2rqZ9Io9FcAU9p17omFqbORknUpRrCDOK46aAbIiey" 137 | callbackUri "http://mob.com" 138 | shareByAppClient true 139 | enable true 140 | } 141 | } 142 | } 143 | } 144 | ``` 145 | 146 | ## 接口方法说明 147 | 接口详情:[API接口调用](https://www.mob.com/wiki/detailed?wiki=31&id=14) 148 | 149 | ## 技术支持 150 | 如有问题请联系技术支持: 151 | 152 | ``` 153 | 服务电话: 400-685-2216 154 | QQ: 4006852216 155 | 节假日值班电话: 156 | iOS:185-1664-1951 157 | Android: 185-1664-1950 158 | 电子邮箱: support@mob.com 159 | 市场合作: 021-54623100 160 | ``` -------------------------------------------------------------------------------- /sharesdk_plugin/android/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | -------------------------------------------------------------------------------- /sharesdk_plugin/android/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | android_ 4 | Project android_ created by Buildship. 5 | 6 | 7 | 8 | 9 | org.eclipse.buildship.core.gradleprojectbuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.buildship.core.gradleprojectnature 16 | 17 | 18 | -------------------------------------------------------------------------------- /sharesdk_plugin/android/build.gradle: -------------------------------------------------------------------------------- 1 | group 'com.mob.flutter.sharesdk' 2 | version '1.0-SNAPSHOT' 3 | apply plugin: 'com.android.library' 4 | 5 | buildscript { 6 | repositories { 7 | google() 8 | jcenter() 9 | } 10 | 11 | dependencies { 12 | classpath 'com.android.tools.build:gradle:3.6.0' 13 | } 14 | configurations.all { 15 | resolutionStrategy.cacheDynamicVersionsFor 0, 'seconds' 16 | } 17 | } 18 | 19 | rootProject.allprojects { 20 | repositories { 21 | google() 22 | jcenter() 23 | } 24 | } 25 | 26 | 27 | 28 | //android { 29 | // compileSdkVersion 30 30 | // 31 | // defaultConfig { 32 | // minSdkVersion 16 33 | // } 34 | // lintOptions { 35 | // disable 'InvalidPackage' 36 | // } 37 | //} 38 | 39 | dependencies { 40 | compileOnly fileTree(include: ['*.jar','*.aar'], dir: 'libs',excludes: []) 41 | // implementation 'com.android.support.constraint:constraint-layout:1.1.3' 42 | } 43 | 44 | def localProperties = new Properties() 45 | def localPropertiesFile = rootProject.file('local.properties') 46 | if (localPropertiesFile.exists()) { 47 | localPropertiesFile.withReader('UTF-8') { reader -> 48 | localProperties.load(reader) 49 | } 50 | } 51 | 52 | def flutterRoot = localProperties.getProperty('flutter.sdk') 53 | if (flutterRoot == null) { 54 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 55 | } 56 | 57 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 58 | if (flutterVersionCode == null) { 59 | flutterVersionCode = '1' 60 | } 61 | 62 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 63 | if (flutterVersionName == null) { 64 | flutterVersionName = '1.0' 65 | } 66 | 67 | android { 68 | compileSdkVersion 31 69 | buildToolsVersion '30.0.0' 70 | if (project.android.hasProperty("namespace")) { 71 | namespace 'com.mob.flutter.sharesdk' 72 | } 73 | 74 | lintOptions { 75 | disable 'InvalidPackage' 76 | } 77 | 78 | defaultConfig { 79 | minSdkVersion 16 80 | targetSdkVersion 31 81 | versionCode flutterVersionCode.toInteger() 82 | versionName flutterVersionName 83 | } 84 | 85 | buildTypes { 86 | release { 87 | // Signing with the debug keys for now, so `flutter run --release` works. 88 | signingConfig signingConfigs.debug 89 | } 90 | } 91 | } 92 | 93 | 94 | -------------------------------------------------------------------------------- /sharesdk_plugin/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | -------------------------------------------------------------------------------- /sharesdk_plugin/android/libs/MobCoreULT-2022.0617.1428.aar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobClub/ShareSDK-For-Flutter/5789425a5dd7116416da74c4df5f39a0ce8ea4ee/sharesdk_plugin/android/libs/MobCoreULT-2022.0617.1428.aar -------------------------------------------------------------------------------- /sharesdk_plugin/android/libs/MobGUIULT-2022.0617.1428.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobClub/ShareSDK-For-Flutter/5789425a5dd7116416da74c4df5f39a0ce8ea4ee/sharesdk_plugin/android/libs/MobGUIULT-2022.0617.1428.jar -------------------------------------------------------------------------------- /sharesdk_plugin/android/libs/MobSupportV1-2022.0617.1428.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobClub/ShareSDK-For-Flutter/5789425a5dd7116416da74c4df5f39a0ce8ea4ee/sharesdk_plugin/android/libs/MobSupportV1-2022.0617.1428.jar -------------------------------------------------------------------------------- /sharesdk_plugin/android/libs/OneKeyShare-3.10.17.aar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobClub/ShareSDK-For-Flutter/5789425a5dd7116416da74c4df5f39a0ce8ea4ee/sharesdk_plugin/android/libs/OneKeyShare-3.10.17.aar -------------------------------------------------------------------------------- /sharesdk_plugin/android/libs/ShareSDK-3.10.17.aar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobClub/ShareSDK-For-Flutter/5789425a5dd7116416da74c4df5f39a0ce8ea4ee/sharesdk_plugin/android/libs/ShareSDK-3.10.17.aar -------------------------------------------------------------------------------- /sharesdk_plugin/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'sharesdk' 2 | include ':sharesdk' 3 | 4 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 5 | 6 | def plugins = new Properties() 7 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 8 | if (pluginsFile.exists()) { 9 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 10 | } 11 | 12 | plugins.each { name, path -> 13 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 14 | include ":$name" 15 | project(":$name").projectDir = pluginDirectory 16 | } -------------------------------------------------------------------------------- /sharesdk_plugin/android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /sharesdk_plugin/android/src/main/java/com/mob/flutter/sharesdk/impl/Const.java: -------------------------------------------------------------------------------- 1 | package com.mob.flutter.sharesdk.impl; 2 | 3 | public final class Const { 4 | public static final class Key { 5 | public static final String IMAGES = "images"; 6 | public static final String IMAGE_URL_ANDROID = "imageUrl_android"; 7 | public static final String IMAGE_PATH_ANDROID = "imagePath_android"; 8 | public static final String TITLE = "title"; 9 | public static final String TITLE_URL_ANDROID = "titleUrl_android"; 10 | public static final String TEXT = "text"; 11 | public static final String URL = "url"; 12 | public static final String VIDEO = "video"; 13 | public static final String AUDIO_FLASH_URL = "audio_flash_url"; 14 | public static final String FILE_DATA = "file_data"; 15 | public static final String WXMP_USER_NAME = "wxmp_user_name"; 16 | public static final String WXMP_TYPE = "wxmp_type"; 17 | public static final String WXMP_WITH_TICKET = "wxmp_with_ticket"; 18 | public static final String WXMP_PATH = "wxmp_path"; 19 | public static final String VIDEO_URL_ANDROID = "videoUrl_android"; 20 | public static final String TYPE = "type"; 21 | public static final String SINA_CARD_SUMMARY = "sina_cardSummary"; 22 | public static final String IMAGE_URL = "image_url"; 23 | public static final String SINA_DISPLAY_NAME = "sina_displayname"; 24 | public static final String IMAGE_X = "image_x"; 25 | public static final String IMAGE_Y = "image_y"; 26 | public static final String SITE = "site"; 27 | public static final String SITE_URL = "siteUrl"; 28 | public static final String FILE_PATH = "filePath"; 29 | public static final String IMAGE_DATA = "imageData"; 30 | public static final String VIDEO_ARRAY = "videoArray"; 31 | public static final String HASHTAGS = "HASHTAGS"; //话题 32 | public static final String HASHTAG = "facebook_hashtag"; 33 | public static final String QUOTE = "facebook_quote"; 34 | public static final String DOUYIN_MIX_FILE = "douyin_mix_file"; 35 | public static final String DOUYIN_SHARE_ACTION = "kSSDKDouYinShareAction"; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /sharesdk_plugin/android/src/main/java/com/mob/flutter/sharesdk/impl/FlutterLoopSharePrepare.java: -------------------------------------------------------------------------------- 1 | package com.mob.flutter.sharesdk.impl; 2 | 3 | import android.content.Context; 4 | import android.content.Intent; 5 | 6 | import com.mob.tools.utils.Hashon; 7 | 8 | import java.util.HashMap; 9 | 10 | import cn.sharesdk.framework.ShareSDK; 11 | import cn.sharesdk.framework.loopshare.LoopShareResultListener; 12 | 13 | import static com.mob.flutter.sharesdk.SharesdkPlugin.IS_ALIVE; 14 | 15 | public class FlutterLoopSharePrepare { 16 | 17 | public static final String LOOPSHARE_NEWS = "loopsharenews"; 18 | 19 | public void prepare(final Context context, final Class targetActivity) { 20 | /** 21 | * loopshare init and set Listener 22 | * **/ 23 | ShareSDK.prepareLoopShare(new LoopShareResultListener() { 24 | @Override 25 | public void onResult(Object var1) { 26 | String test = new Hashon().fromHashMap((HashMap) var1); 27 | Log.e("WWW", "LoopShareResultListener onResult " + test); 28 | 29 | Log.e("WWW", "SP的数据=====》 " + ShareSDK.getCustomDataFromLoopShare()); 30 | 31 | Intent intent = new Intent(); 32 | intent.setClass(context, targetActivity); 33 | intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); 34 | context.startActivity(intent); 35 | IS_ALIVE = 456; 36 | } 37 | 38 | @Override 39 | public void onError(Throwable t) { 40 | Log.e("WWW", "LoopShareResultListener onError " + t); 41 | } 42 | }); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /sharesdk_plugin/android/src/main/java/com/mob/flutter/sharesdk/impl/Log.java: -------------------------------------------------------------------------------- 1 | package com.mob.flutter.sharesdk.impl; 2 | 3 | import android.text.TextUtils; 4 | 5 | import com.mob.tools.MobLog; 6 | 7 | public class Log { 8 | public static final String TAG = "SharesdkPlugin"; 9 | 10 | public static void e(String tag, String msg) { 11 | if (TextUtils.isEmpty(tag)) { 12 | tag = TAG; 13 | } 14 | MobLog.getInstance().e("TAG:" + tag + "MSG:" + msg); 15 | } 16 | 17 | public static void d(String tag, String msg) { 18 | if (TextUtils.isEmpty(tag)) { 19 | tag = TAG; 20 | } 21 | MobLog.getInstance().d("TAG:" + tag + "MSG:" + msg); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /sharesdk_plugin/android/src/main/java/com/mob/flutter/sharesdk/impl/ObjectUtils.java: -------------------------------------------------------------------------------- 1 | package com.mob.flutter.sharesdk.impl; 2 | 3 | import java.util.Collection; 4 | import java.util.Map; 5 | 6 | public class ObjectUtils { 7 | public static final boolean isEmpty(Collection collection) { 8 | return null == collection || collection.isEmpty(); 9 | } 10 | 11 | public static final boolean isEmpty(Map map) { 12 | return null == map || map.isEmpty(); 13 | } 14 | 15 | public static final boolean isEmpty(Object[] objects) { 16 | return null == objects || objects.length == 0; 17 | } 18 | 19 | public static final boolean isNull(Object o) { 20 | return null == o; 21 | } 22 | 23 | public static final boolean notNull(Object o) { 24 | return null != o; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /sharesdk_plugin/android/src/main/java/com/mob/flutter/sharesdk/impl/StrUtils.java: -------------------------------------------------------------------------------- 1 | package com.mob.flutter.sharesdk.impl; 2 | 3 | import java.util.ArrayList; 4 | import java.util.HashMap; 5 | import java.util.Map; 6 | 7 | public class StrUtils { 8 | 9 | public static String format(String sepStr, HashMap map) { 10 | StringBuffer sb = new StringBuffer(); 11 | sb.append("{\n"); 12 | String mySepStr = sepStr + "\t"; 13 | int i = 0; 14 | for (Map.Entry entry : map.entrySet()) { 15 | if (i > 0) { 16 | sb.append(",\n"); 17 | } 18 | sb.append(mySepStr).append('\"').append(entry.getKey()).append("\":"); 19 | Object value = entry.getValue(); 20 | if (value instanceof HashMap) { 21 | sb.append(format(mySepStr, (HashMap)value)); 22 | } else if (value instanceof ArrayList) { 23 | sb.append(format(mySepStr, (ArrayList)value)); 24 | } else if (value instanceof String) { 25 | sb.append('\"').append(value).append('\"'); 26 | } else { 27 | sb.append(value); 28 | } 29 | i++; 30 | } 31 | sb.append('\n').append(sepStr).append('}'); 32 | return sb.toString(); 33 | } 34 | 35 | @SuppressWarnings("unchecked") 36 | private static String format(String sepStr, ArrayList list) { 37 | StringBuffer sb = new StringBuffer(); 38 | sb.append("[\n"); 39 | String mySepStr = sepStr + "\t"; 40 | int i = 0; 41 | for (Object value : list) { 42 | if (i > 0) { 43 | sb.append(",\n"); 44 | } 45 | sb.append(mySepStr); 46 | if (value instanceof HashMap) { 47 | sb.append(format(mySepStr, (HashMap)value)); 48 | } else if (value instanceof ArrayList) { 49 | sb.append(format(mySepStr, (ArrayList)value)); 50 | } else if (value instanceof String) { 51 | sb.append('\"').append(value).append('\"'); 52 | } else { 53 | sb.append(value); 54 | } 55 | i++; 56 | } 57 | sb.append('\n').append(sepStr).append(']'); 58 | return sb.toString(); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /sharesdk_plugin/android/src/main/java/com/mob/flutter/sharesdk/impl/ThreadManager.java: -------------------------------------------------------------------------------- 1 | package com.mob.flutter.sharesdk.impl; 2 | 3 | import android.os.Handler; 4 | import android.os.Looper; 5 | import android.text.TextUtils; 6 | 7 | import java.util.concurrent.ExecutorService; 8 | import java.util.concurrent.Executors; 9 | import java.util.concurrent.LinkedBlockingQueue; 10 | import java.util.concurrent.SynchronousQueue; 11 | import java.util.concurrent.ThreadPoolExecutor; 12 | import java.util.concurrent.TimeUnit; 13 | 14 | import cn.sharesdk.framework.utils.SSDKLog; 15 | 16 | public final class ThreadManager { 17 | private static ThreadPoolExecutor parserExecutor = new ThreadPoolExecutor(1, 3, 30, 18 | TimeUnit.MILLISECONDS, new LinkedBlockingQueue()); 19 | 20 | // UI线程 21 | private static Handler mManinHandler; 22 | private static final Object mMainHandlerLock = new Object(); 23 | 24 | /** 25 | * 取得UI线程Handler 26 | * 27 | * @return 28 | */ 29 | public static Handler getMainHandler() { 30 | if (mManinHandler == null) { 31 | synchronized (mMainHandlerLock) { 32 | if (mManinHandler == null) { 33 | mManinHandler = new Handler(Looper.getMainLooper()); 34 | } 35 | } 36 | } 37 | return mManinHandler; 38 | } 39 | 40 | public static void execute(SafeRunnable runnable) { 41 | if (null == parserExecutor) { 42 | return; 43 | } 44 | parserExecutor.execute(runnable); 45 | } 46 | 47 | public static abstract class SafeRunnable implements Runnable { 48 | @Override 49 | final public void run() { 50 | try { 51 | if (!TextUtils.isEmpty(threadName())) { 52 | Thread.currentThread().setName(threadName()); 53 | } 54 | safeRun(); 55 | } catch (Throwable e) { 56 | try { 57 | error(e); 58 | } catch (Throwable t) { 59 | // ignore 60 | } 61 | Log.e("", e.getMessage()); 62 | } 63 | } 64 | 65 | public abstract void safeRun() throws Throwable; 66 | 67 | /** 68 | * 如果有异常需要在catch里处理,实现这个方法 69 | * 70 | * @param e 71 | */ 72 | public void error(Throwable e) { 73 | 74 | } 75 | 76 | /** 77 | * 改变线程的名称 78 | * 79 | * @return 80 | */ 81 | public String threadName() { 82 | return ""; 83 | } 84 | } 85 | 86 | } 87 | -------------------------------------------------------------------------------- /sharesdk_plugin/android/src/main/java/com/mob/flutter/sharesdk/impl/Utils.java: -------------------------------------------------------------------------------- 1 | package com.mob.flutter.sharesdk.impl; 2 | 3 | import java.util.HashMap; 4 | 5 | import cn.sharesdk.framework.Platform; 6 | 7 | /** 8 | * Created by xiangli on 2018/11/29. 9 | */ 10 | 11 | public class Utils { 12 | 13 | public static String platName(String platId) { 14 | switch (platId) { 15 | case "1": 16 | return "SinaWeibo"; 17 | case "2": 18 | return "TencentWeibo"; 19 | case "5": 20 | return "Douban"; 21 | case "6": 22 | return "QZone"; 23 | case "7": 24 | return "Renren"; 25 | case "8": 26 | return "KaiXin"; 27 | case "10": 28 | return "Facebook"; 29 | case "11": 30 | return "Twitter"; 31 | case "12": 32 | return "Evernote"; 33 | case "14": 34 | return "GooglePlus"; 35 | case "15": 36 | return "Instagram"; 37 | case "16": 38 | return "LinkedIn"; 39 | case "17": 40 | return "Tumblr"; 41 | case "18": 42 | return "Email"; 43 | case "19": 44 | return "ShortMessage"; 45 | /* case "20": 46 | return "print"; 47 | case "21": 48 | return "copy";*/ 49 | case "22": 50 | return "Wechat"; //"wechatSession"; 51 | case "23": 52 | return "WechatMoments"; //"wechatTimeline" 53 | case "24": 54 | return "QQ"; 55 | case "25": 56 | return "Instapaper"; 57 | case "26": 58 | return "Pocket"; 59 | case "27": 60 | return "YouDao"; 61 | case "30": 62 | return "Pinterest"; 63 | case "34": 64 | return "Flickr"; 65 | case "35": 66 | return "Dropbox"; 67 | case "36": 68 | return "VKontakte"; 69 | case "37": 70 | return "WechatFavorite"; 71 | case "38": 72 | return "Yixin"; 73 | case "39": 74 | return "YixinMoments"; 75 | /* case "40": 76 | return "yixinFav";*/ 77 | case "41": 78 | return "Mingdao"; 79 | case "42": 80 | return "Line"; 81 | case "43": 82 | return "WhatsApp"; 83 | case "44": 84 | return "KakaoTalk"; 85 | case "45": 86 | return "KakaoStory"; 87 | case "46": 88 | return "FacebookMessenger"; 89 | case "47": 90 | return "Telegram"; 91 | case "50": 92 | return "Alipay"; 93 | case "51": 94 | return "AlipayMoments"; 95 | case "52": 96 | return "Dingding"; 97 | case "53": 98 | return "Youtube"; 99 | case "54": 100 | return "Meipai"; 101 | case "55": 102 | return "Cmcc"; 103 | case "56": 104 | return "Reddit"; 105 | case "59": 106 | return "Douyin"; 107 | case "60": 108 | return "Wework"; 109 | case "63": 110 | return "HWAccount"; 111 | case "64": 112 | return "Oasis"; 113 | case "65": 114 | return "XMAccount"; 115 | case "66": 116 | return "Snapchat"; 117 | case "67": 118 | return "Littleredbook"; 119 | case "68": 120 | return "Kuaishou"; 121 | case "69": 122 | return "Watermelonvideo"; 123 | case "70": 124 | return "Tiktok"; 125 | case "71": 126 | return "Taptap"; 127 | case "72": 128 | return "HonorAccount"; 129 | /* case "994": 130 | return "yixinSeries"; 131 | case "995": 132 | return "kakaoSeries"; 133 | case "997": 134 | return "wechatSeries"; 135 | case "998": 136 | return "qqSeries";*/ 137 | } 138 | return null; 139 | } 140 | 141 | 142 | public static int getShareType(String type,int shareAction) { 143 | int shareType = 0; 144 | switch (type) { 145 | case "1": 146 | shareType = Platform.SHARE_TEXT; 147 | break; 148 | case "2": 149 | shareType = Platform.SHARE_IMAGE; 150 | if (1 == shareAction) { 151 | shareType = Platform.SHARE_DYIM_IMG; 152 | } 153 | break; 154 | case "3": 155 | shareType = Platform.SHARE_WEBPAGE; 156 | if (1 == shareAction) { 157 | shareType = Platform.SHARE_DYIM_WEBPAGE; 158 | } 159 | break; 160 | case "4": 161 | shareType = Platform.SHARE_APPS; 162 | break; 163 | case "5": 164 | shareType = Platform.SHARE_MUSIC; 165 | break; 166 | case "6": 167 | shareType = Platform.SHARE_VIDEO; 168 | break; 169 | case "7": 170 | shareType = Platform.SHARE_FILE; 171 | break; 172 | case "10": 173 | shareType = Platform.SHARE_WXMINIPROGRAM; 174 | break; 175 | case "12": 176 | shareType = Platform.OPEN_WXMINIPROGRAM; 177 | break; 178 | case "13": 179 | shareType = Platform.INSTAGRAM_FRIEND; 180 | break; 181 | case "14": 182 | shareType = Platform.QQ_MINI_PROGRAM; 183 | break; 184 | case "15": 185 | shareType = Platform.KAKAO_FEED_TEMPLATE; 186 | break; 187 | case "16": 188 | shareType = Platform.KAKAO_URL_TEMPLATE; 189 | break; 190 | case "17": 191 | shareType = Platform.KAKAO_COMMERCE_TEMPLATE; 192 | break; 193 | case "18": 194 | shareType = Platform.KAKAO_TEXT_TEMPLATE; 195 | break; 196 | case "19": 197 | shareType = Platform.KAKAO_CUSTOM_TEMPLATE; 198 | break; 199 | case "20": 200 | shareType = Platform.OPEN_QQMINIPROGRAM; 201 | break; 202 | case "21": 203 | shareType = Platform.DY_MIXFILE; 204 | break; 205 | } 206 | return shareType; 207 | } 208 | 209 | private void initPlat(String platId, String platName) { 210 | if (platName != null && platId != null) { 211 | HashMap platMap = new HashMap(); 212 | platMap.put(platId, platName); 213 | } 214 | } 215 | 216 | 217 | } 218 | -------------------------------------------------------------------------------- /sharesdk_plugin/example/.flutter-plugins-dependencies: -------------------------------------------------------------------------------- 1 | {"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"sharesdk_plugin","path":"/Users/mobtech-ios/Documents/Projects/Share_Flutter/sharesdk_plugin/","dependencies":[]}],"android":[{"name":"sharesdk_plugin","path":"/Users/mobtech-ios/Documents/Projects/Share_Flutter/sharesdk_plugin/","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"sharesdk_plugin","dependencies":[]}],"date_created":"2024-12-11 15:34:29.556445","version":"2.10.5"} -------------------------------------------------------------------------------- /sharesdk_plugin/example/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | .dart_tool/ 26 | .flutter-plugins 27 | .packages 28 | .pub-cache/ 29 | .pub/ 30 | /build/ 31 | 32 | # Android related 33 | **/android/**/gradle-wrapper.jar 34 | **/android/.gradle 35 | **/android/captures/ 36 | **/android/gradlew 37 | **/android/gradlew.bat 38 | **/android/local.properties 39 | **/android/**/GeneratedPluginRegistrant.java 40 | 41 | # iOS/XCode related 42 | **/ios/**/*.mode1v3 43 | **/ios/**/*.mode2v3 44 | **/ios/**/*.moved-aside 45 | **/ios/**/*.pbxuser 46 | **/ios/**/*.perspectivev3 47 | **/ios/**/*sync/ 48 | **/ios/**/.sconsign.dblite 49 | **/ios/**/.tags* 50 | **/ios/**/.vagrant/ 51 | **/ios/**/DerivedData/ 52 | **/ios/**/Icon? 53 | **/ios/**/Pods/ 54 | **/ios/**/.symlinks/ 55 | **/ios/**/profile 56 | **/ios/**/xcuserdata 57 | **/ios/.generated/ 58 | **/ios/Flutter/App.framework 59 | **/ios/Flutter/Flutter.framework 60 | **/ios/Flutter/Generated.xcconfig 61 | **/ios/Flutter/app.flx 62 | **/ios/Flutter/app.zip 63 | **/ios/Flutter/flutter_assets/ 64 | **/ios/ServiceDefinitions.json 65 | **/ios/Runner/GeneratedPluginRegistrant.* 66 | 67 | # Exceptions to above rules. 68 | !**/ios/**/default.mode1v3 69 | !**/ios/**/default.mode2v3 70 | !**/ios/**/default.pbxuser 71 | !**/ios/**/default.perspectivev3 72 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 73 | -------------------------------------------------------------------------------- /sharesdk_plugin/example/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 20e59316b8b8474554b38493b8ca888794b0234a 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /sharesdk_plugin/example/README.md: -------------------------------------------------------------------------------- 1 | # sharesdk_plugin_example 2 | 3 | Demonstrates how to use the sharesdk_plugin plugin. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.dev/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /sharesdk_plugin/example/android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | -------------------------------------------------------------------------------- /sharesdk_plugin/example/android/.settings/org.eclipse.buildship.core.prefs: -------------------------------------------------------------------------------- 1 | connection.project.dir= 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /sharesdk_plugin/example/android/MobSDK.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.mob.sdk' 2 | 3 | MobSDK { 4 | appKey "moba0b0c0d0" 5 | appSecret "5713f0d88511f9f4cf100cade0610a34" 6 | 7 | ShareSDK { 8 | 9 | //平台配置信息 10 | devInfo { 11 | SinaWeibo { 12 | id 1 13 | sortId 1 14 | appKey "500068354" 15 | appSecret "0a5f391f938dc371fb44d47a4fa0822e" 16 | callbackUri "http://www.sharesdk.cn" 17 | shareByAppClient true 18 | enable true 19 | } 20 | 21 | TencentWeibo { 22 | id 2 23 | sortId 2 24 | appKey "801307650" 25 | appSecret "ae36f4ee3946e1cbb98d6965b0b2ff5c" 26 | callbackUri "http://sharesdk.cn" 27 | enable true 28 | } 29 | 30 | QZone { 31 | id 3 32 | sortId 3 33 | appId "100371282" 34 | appKey "aed9b0303e3ed1e27bae87c33761161d" 35 | shareByAppClient true 36 | bypassApproval false 37 | enable true 38 | } 39 | 40 | 41 | /* Wechat微信和WechatMoments微信朋友圈的appid是一样的; 42 | 43 | 注意:开发者不能用我们这两个平台的appid,否则分享不了 44 | 微信测试的时候,微信测试需要先签名打包出apk, 45 | sample测试微信,要先签名打包,keystore在sample项目中,密码123456 46 | 47 | BypassApproval是绕过审核的标记,设置为true后AppId将被忽略,故不经过 48 | 审核的应用也可以执行分享,但是仅限于分享文字和图片,不能分享其他类型, 49 | 默认值为false。此外,微信收藏不支持此字段。wx4868b35061f87885 50 | */ 51 | Wechat { 52 | id 4 53 | sortId 4 54 | appId "wx4868b35061f87885" 55 | appSecret "64020361b8ec4c99936c0e3999a9f249" 56 | userName "gh_afb25ac019c9" 57 | path "pages/index/index.html?id=1" 58 | withShareTicket true 59 | miniprogramType 0 60 | bypassApproval false 61 | enable true 62 | } 63 | 64 | WechatMoments { 65 | id 5 66 | sortId 5 67 | appId "wx4868b35061f87885" 68 | appSecret "64020361b8ec4c99936c0e3999a9f249" 69 | bypassApproval false 70 | enable true 71 | } 72 | 73 | WechatFavorite { 74 | id 6 75 | sortId 6 76 | appId "wx4868b35061f87885" 77 | appSecret "64020361b8ec4c99936c0e3999a9f249" 78 | bypassApproval false 79 | enable true 80 | } 81 | 82 | QQ { 83 | id 7 84 | sortId 7 85 | appId "100371282" 86 | appKey "aed9b0303e3ed1e27bae87c33761161d" 87 | shareByAppClient true 88 | bypassApproval false 89 | enable true 90 | } 91 | 92 | QZone { 93 | id 3 94 | sortId 3 95 | appId "100371282" 96 | appKey "aed9b0303e3ed1e27bae87c33761161d" 97 | shareByAppClient true 98 | bypassApproval false 99 | enable true 100 | } 101 | 102 | Facebook { 103 | id 8 104 | sortId 8 105 | appKey "1412473428822331" 106 | appSecret "a42f4f3f867dc947b9ed6020c2e93558" 107 | callbackUri "https://mob.com" 108 | shareByAppClient true 109 | enable true 110 | } 111 | 112 | Twitter { 113 | id 9 114 | sortId 9 115 | appKey "viOnkeLpHBKs6KXV7MPpeGyzE" 116 | appSecret "NJEglQUy2rqZ9Io9FcAU9p17omFqbORknUpRrCDOK46aAbIiey" 117 | callbackUri "http://mob.com" 118 | shareByAppClient true 119 | enable true 120 | } 121 | 122 | Renren { 123 | id 10 124 | sortId 10 125 | appId "226427" 126 | appKey "fc5b8aed373c4c27a05b712acba0f8c3" 127 | appSecret "f29df781abdd4f49beca5a2194676ca4" 128 | enable true 129 | } 130 | 131 | KaiXin { 132 | id 11 133 | sortId 11 134 | appKey "358443394194887cee81ff5890870c7c" 135 | appSecret "da32179d859c016169f66d90b6db2a23" 136 | callbackUri "http://www.sharesdk.cn" 137 | enable true 138 | } 139 | 140 | Email { 141 | id 12 142 | sortId 12 143 | enable true 144 | } 145 | 146 | ShortMessage { 147 | id 13 148 | sortId 13 149 | enable true 150 | } 151 | 152 | Douban { 153 | id 16 154 | sortId 16 155 | appKey "031a96a3aa8b28af094fc3eaffa17a0d" 156 | appSecret "2e675e730571b75d" 157 | callbackUri "http://mob.com" 158 | enable true 159 | } 160 | 161 | YouDao { 162 | id 17 163 | sortId 17 164 | hostType "product" 165 | appKey "dcde25dca105bcc36884ed4534dab940" 166 | appSecret "d98217b4020e7f1874263795f44838fe" 167 | callbackUri "http://www.sharesdk.cn/" 168 | enable true 169 | } 170 | 171 | 172 | /*在中国大陆,印象笔记有两个服务器,一个是沙箱(sandbox),一个是生产服务器(china)。 173 | 一般你注册应用,它会先让你使用sandbox,当你完成测试以后,可以到 174 | http://dev.yinxiang.com/support/上激活你的ConsumerKey,激活成功后,修改HostType 175 | 为china就好了。至于如果您申请的是国际版的印象笔记(Evernote),则其生产服务器类型为 176 | “product”。 177 | 178 | 如果目标设备上已经安装了印象笔记客户端,ShareSDK允许应用调用本地API来完成分享,但 179 | 是需要将应用信息中的“ShareByAppClient”设置为true,此字段默认值为false。*/ 180 | Evernote { 181 | id 19 182 | sortId 19 183 | hostType "sandbox" 184 | appKey "sharesdk-7807" 185 | appSecret "d05bf86993836004" 186 | shareByAppClient true 187 | enable true 188 | } 189 | 190 | LinkedIn { 191 | id 20 192 | sortId 20 193 | appKey "75x5xdhllzno44" 194 | appSecret "uiS3nlE7XBGmTL3P" 195 | callbackUri "https://www.mob.com/" 196 | shareByAppClient false 197 | enable true 198 | } 199 | 200 | GooglePlus { 201 | id 21 202 | sortId 21 203 | appId "236300675100-am5pm8km7md1memjevq8rl9pg5c4s4b8.apps.googleusercontent.com" 204 | callbackUri "http://localhost" 205 | shareByAppClient true 206 | enable true 207 | } 208 | 209 | FourSquare { 210 | id 22 211 | sortId 22 212 | appId "G0ZI20FM30SJAJTX2RIBGD05QV1NE2KVIM2SPXML2XUJNXEU" 213 | appSecret "3XHQNSMMHIFBYOLWEPONNV4DOTCDBQH0AEMVGCBG0MZ32XNU" 214 | callbackUri "http://www.sharesdk.cn" 215 | enable true 216 | } 217 | 218 | Pinterest { 219 | id 23 220 | sortId 23 221 | appId "1432928" 222 | enable true 223 | } 224 | 225 | Flickr { 226 | id 24 227 | sortId 24 228 | appKey "33d833ee6b6fca49943363282dd313dd" 229 | appSecret "3a2c5b42a8fbb8bb" 230 | callbackUri "http://www.sharesdk.cn" 231 | enable true 232 | } 233 | 234 | Tumblr { 235 | id 25 236 | sortId 25 237 | appKey "2QUXqO9fcgGdtGG1FcvML6ZunIQzAEL8xY6hIaxdJnDti2DYwM" 238 | appSecret "3Rt0sPFj7u2g39mEVB3IBpOzKnM3JnTtxX2bao2JKk4VV1gtNo" 239 | callbackUri "http://www.sharesdk.cn" 240 | enable true 241 | } 242 | 243 | Dropbox { 244 | id 26 245 | sortId 26 246 | appKey "i5vw2mex1zcgjcj" 247 | appSecret "3i9xifsgb4omr0s" 248 | callbackUri "https://www.sharesdk.cn" 249 | enable true 250 | } 251 | 252 | VKontakte { 253 | id 27 254 | sortId 27 255 | appId "3921561" 256 | enable true 257 | } 258 | 259 | 260 | Instagram { 261 | id 28 262 | sortId 28 263 | appId "ff68e3216b4f4f989121aa1c2962d058" 264 | appSecret "1b2e82f110264869b3505c3fe34e31a1" 265 | callbackUri "http://sharesdk.cn" 266 | enable true 267 | } 268 | 269 | 270 | /*Yixin易信和YixinMoments易信朋友圈的appid是一样的; 271 | 272 | 注意:开发者不能用我们这两个平台的appid,否则分享不了 273 | 274 | 易信测试的时候需要先签名打包出apk, 275 | sample测试易信,要先签名打包,keystore在sample项目中,密码123456 276 | 277 | BypassApproval是绕过审核的标记,设置为true后AppId将被忽略,故不经过 278 | 审核的应用也可以执行分享,但是仅限于分享文字或图片,不能分享其他类型, 279 | 默认值为false。*/ 280 | Yixin { 281 | id 29 282 | sortId 29 283 | appId "yx0d9a9f9088ea44d78680f3274da1765f" 284 | bypassApproval false 285 | enable true 286 | } 287 | 288 | YixinMoments{ 289 | id 30 290 | sortId 30 291 | appId "yx0d9a9f9088ea44d78680f3274da1765f" 292 | bypassApproval false 293 | enable true 294 | } 295 | 296 | Mingdao { 297 | id 31 298 | sortId 31 299 | appKey "EEEE9578D1D431D3215D8C21BF5357E3" 300 | appSecret "5EDE59F37B3EFA8F65EEFB9976A4E933" 301 | callbackUri "http://sharesdk.cn" 302 | enable true 303 | } 304 | 305 | Line { 306 | id 32 307 | sortId 32 308 | appId "1477692153" 309 | appSecret "f30c036370f2e04ade71c52eef73a9af" 310 | enable true 311 | } 312 | 313 | KakaoTalk { 314 | id 33 315 | sortId 33 316 | appKey "48d3f524e4a636b08d81b3ceb50f1003" 317 | enable true 318 | } 319 | 320 | KakaoStory { 321 | id 34 322 | sortId 34 323 | appKey "48d3f524e4a636b08d81b3ceb50f1003" 324 | enable true 325 | } 326 | 327 | WhatsApp { 328 | id 35 329 | sortId 35 330 | enable true 331 | } 332 | 333 | 334 | Pocket { 335 | id 37 336 | sortId 37 337 | appKey "32741-389c565043c49947ba7edf05" 338 | enable true 339 | } 340 | 341 | Instapaper { 342 | id 38 343 | sortId 38 344 | appKey "4rDJORmcOcSAZL1YpqGHRI605xUvrLbOhkJ07yO0wWrYrc61FA" 345 | appSecret "GNr1GespOQbrm8nvd7rlUsyRQsIo3boIbMguAl9gfpdL0aKZWe" 346 | enable true 347 | } 348 | 349 | FacebookMessenger { 350 | id 39 351 | sortId 39 352 | appId "107704292745179" 353 | bypassApproval true 354 | enable true 355 | } 356 | 357 | Telegram { 358 | id 47 359 | sortId 47 360 | AppKey="782826033" 361 | RedirectUrl="http://www.mob.com" 362 | Enable="true" 363 | } 364 | 365 | 366 | Alipay { 367 | id 50 368 | sortId 50 369 | appId "2015072400185895" 370 | enable true 371 | } 372 | 373 | AlipayMoments { 374 | id 51 375 | sortId 51 376 | appId "2015072400185895" 377 | enable true 378 | } 379 | 380 | Dingding { 381 | id 52 382 | sortId 52 383 | appId "dingoanxyrpiscaovl4qlw" 384 | bypassApproval false 385 | enable true 386 | } 387 | 388 | Youtube { 389 | id 53 390 | sortId 53 391 | appId "370141748022-bicrnsjfiije93bvdt63dh3728m4shas.apps.googleusercontent.com" 392 | appSecret "AIzaSyAO06g-0TDpHcsXXO918a7QE3Zdct2bB5E" 393 | callbackUri "http://localhost" 394 | shareByAppClient true 395 | enable true 396 | } 397 | 398 | Meipai { 399 | id 54 400 | sortId 54 401 | appId "1089867596" 402 | appSecret "y9ym6rrjjijtkt23qtsc" 403 | shareByAppClient true 404 | enable true 405 | } 406 | 407 | Cmcc { 408 | id 55 409 | sortId 55 410 | appId "300011860247" 411 | appKey "2D464D8BFCE73A44B4F9DF95A2FDBE1C" 412 | } 413 | 414 | Reddit { 415 | Id="56" 416 | SortId="56" 417 | AppKey="MExDxPuTCtFiRw" 418 | RedirectUrl="http://www.sharesdk.cn" 419 | } 420 | 421 | Telecom { 422 | id 57 423 | sortId 57 424 | appKey "8148612606" 425 | appSecret "mCltrhUqwshFa86egDTs0491ibaAulKA" 426 | callbackUri "http://www.sharesdk.cn" 427 | enable true 428 | } 429 | 430 | 431 | /* app_secret的值为Account Kit 应用密匙 ,不是客户端口令 */ 432 | Accountkit { 433 | id 58 434 | sortId 58 435 | appKey "579465512480462" 436 | appSecret "8a6383652dd9f23fb0994f03d350d0ca" 437 | callbackUri "http://www.sharesdk.cn/" 438 | enable true 439 | } 440 | 441 | Douyin { 442 | id 59 443 | sortId 1 444 | appKey "awycvl19mldccyso" 445 | appSecret "8793a4dfdc3636cbda0924a3cfbc8424" 446 | enable true 447 | } 448 | HWAccount { 449 | id 63 450 | sortId 63 451 | appId "101353159" 452 | enable true 453 | } 454 | XMAccount { 455 | id 65 456 | sortId 65 457 | appId "2882303761518333605" 458 | callbackUri "http://www.mob.com" 459 | enable true 460 | } 461 | Wework { 462 | id 60 463 | sortId 60 464 | appKey "wwdc4a362d31d88beb" 465 | appSecret "vhwRyxZRvXhIOCIjC6fZayRk1xwlGaPmGnBQdhrWoNc" 466 | agentId "1000002" 467 | schema "wwauthdc4a362d31d88beb000002" 468 | } 469 | } 470 | } 471 | } -------------------------------------------------------------------------------- /sharesdk_plugin/example/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 26 | apply from: '../MobSDK.gradle' 27 | 28 | android { 29 | compileSdkVersion 31 30 | buildToolsVersion '30.0.0' 31 | 32 | lintOptions { 33 | disable 'InvalidPackage' 34 | } 35 | 36 | defaultConfig { 37 | applicationId "cn.sharesdk.demo" 38 | minSdkVersion 16 39 | targetSdkVersion 31 40 | versionCode flutterVersionCode.toInteger() 41 | versionName flutterVersionName 42 | } 43 | 44 | signingConfigs { 45 | config { 46 | keyAlias 'demokey.keystore' 47 | keyPassword '123456' 48 | storeFile file('../demokey.keystore') 49 | storePassword '123456' 50 | } 51 | release { 52 | keyAlias 'demokey.keystore' 53 | keyPassword '123456' 54 | storeFile file('../demokey.keystore') 55 | storePassword '123456' 56 | } 57 | debug { 58 | keyAlias 'demokey.keystore' 59 | keyPassword '123456' 60 | storeFile file('../demokey.keystore') 61 | storePassword '123456' 62 | } 63 | } 64 | 65 | buildTypes { 66 | release { 67 | // ndk{ 68 | // //这里其实我觉可以直接是用"armeabi-v7a",但国内几个大哥之前使用的都是"armeabi" 69 | // abiFilters "armeabi" 70 | // } 71 | shrinkResources false 72 | minifyEnabled false 73 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 74 | //signingConfig signingConfigs.release 75 | signingConfig signingConfigs.debug 76 | } 77 | 78 | debug { 79 | ndk { 80 | //这里要加上,否则debug包会出问题,后面三个为可选,x86建议加上不然部分模拟器回报错 81 | abiFilters "armeabi", "armeabi-v7a", "arm64-v8a", "x86" 82 | } 83 | 84 | shrinkResources false 85 | debuggable true 86 | minifyEnabled false 87 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 88 | //signingConfig signingConfigs.release 89 | signingConfig signingConfigs.debug 90 | } 91 | } 92 | } 93 | 94 | flutter { 95 | source '../..' 96 | } 97 | 98 | dependencies { 99 | 100 | } 101 | -------------------------------------------------------------------------------- /sharesdk_plugin/example/android/app/demokey.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobClub/ShareSDK-For-Flutter/5789425a5dd7116416da74c4df5f39a0ce8ea4ee/sharesdk_plugin/example/android/app/demokey.keystore -------------------------------------------------------------------------------- /sharesdk_plugin/example/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in D:\as_dev_tools\android/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -keep class cn.sharesdk.**{*;} 19 | -keep class com.sina.**{*;} 20 | -keep class **.R$* {*;} 21 | -keep class **.R{*;} 22 | -keep class com.mob.**{*;} 23 | -keep class m.framework.**{*;} 24 | 25 | -keep class com.mob.**{*;} 26 | -dontwarn com.mob.** 27 | 28 | #fastjson 29 | -dontwarn com.alibaba.fastjson.** 30 | -keep class com.alibaba.fastjson.** { *; } 31 | 32 | -dontwarn cn.sharesdk.** 33 | -dontwarn com.sina.** 34 | -dontwarn com.mob.** 35 | -dontwarn **.R$* 36 | 37 | -keep class com.bytedance.**{*;} 38 | -keep class com.tencent.wework.api.** {*;} 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | -dontoptimize 51 | -dontusemixedcaseclassnames 52 | -dontskipnonpubliclibraryclasses 53 | -dontpreverify 54 | -verbose 55 | -dontwarn 56 | -optimizations !code/simplification/arithmetic,!field/*,!class/merging/* 57 | -keepattributes SourceFile,LineNumberTable,Exceptions,InnerClasses,EnclosingMethod,Signature,*Annotation* 58 | -keepparameternames 59 | 60 | -keep public class * extends android.app.Activity 61 | -keep public class * extends android.app.Application 62 | -keep public class * extends android.app.Service 63 | -keep public class * extends android.app.View 64 | -keep public class * extends android.content.BroadcastReceiver 65 | -keep public class * extends android.content.ContentProvider 66 | -keep public class * extends android.app.backup.BackupAgentHelper 67 | -keep public class * extends android.preference.Preference 68 | -keep public class * extends cn.sharesdk.framework.Platform 69 | -keep public class * extends cn.sharesdk.framework.Service 70 | -keep public interface * extends cn.sharesdk.framework.PlatformActionListener 71 | 72 | -keep class android.net.http.SslError 73 | -keep class android.webkit.**{*;} 74 | -keep class cn.sharesdk.framework.ShareSDK 75 | -keep class cn.sharesdk.framework.utils.ShareSDKR 76 | -keep class cn.sharesdk.framework.Platform 77 | -keep class cn.sharesdk.framework.Platform$ShareParams 78 | -keep class cn.sharesdk.framework.InnerShareParams 79 | -keep class cn.sharesdk.framework.Service 80 | -keep class cn.sharesdk.framework.Service$ServiceEvent 81 | -keep class eclipse.local.sdk.**{*;} 82 | -keep class com.sina.**{*;} 83 | -keep class com.mob.**{*;} 84 | -keep class com.alipay.share.sdk.**{*;} 85 | -keep class com.mob.logcollector.db.MessageModel 86 | 87 | #====================================== loopshare ================================================ 88 | #-keep class cn.sharesdk.loopshare.MobLink 89 | #-keep class cn.sharesdk.loopshare.Scene 90 | 91 | -keep class cn.sharesdk.framework.utils.SSDKLog 92 | -keep class cn.sharesdk.loopshare.beans.ConfigData 93 | -keep class cn.sharesdk.loopshare.beans.LinkData 94 | -keep class cn.sharesdk.loopshare.beans.LogData 95 | -keep class cn.sharesdk.loopshare.beans.ServerData 96 | 97 | -keep public class * extends android.app.Activity 98 | -keep public class * extends android.app.Application 99 | -keep public class * extends android.app.Service 100 | -keep public class * extends android.app.View 101 | -keep public class * extends android.content.BroadcastReceiver 102 | -keep public class * extends android.content.ContentProvider 103 | -keep public class * extends android.app.backup.BackupAgentHelper 104 | -keep public class * extends android.preference.Preference 105 | -keep public class * extends com.mob.tools.proguard.ClassKeeper 106 | 107 | -keepclasseswithmembernames class * { 108 | native ; 109 | } 110 | 111 | -keepclasseswithmembers class * { 112 | public (android.content.Context, android.util.AttributeSet); 113 | } 114 | 115 | -keepclasseswithmembers class * { 116 | public (android.content.Context, android.util.AttributeSet, int); 117 | } 118 | 119 | -keepclassmembers class * extends android.app.Activity { 120 | public void *(android.view.View); 121 | } 122 | 123 | -keepclassmembers enum * { 124 | public static **[] values(); 125 | public static ** valueOf(java.lang.String); 126 | } 127 | 128 | -keep class * implements android.os.Parcelable { 129 | public static final android.os.Parcelable$Creator *; 130 | } 131 | 132 | -keep class **.R { 133 | public *; 134 | } 135 | 136 | -keep class **.R$* { 137 | *; 138 | } 139 | 140 | -keep interface * { 141 | *; 142 | } 143 | 144 | -keep class * extends java.lang.Throwable { 145 | *; 146 | } 147 | 148 | -keep class * extends com.mob.tools.proguard.PublicMemberKeeper { 149 | public *; 150 | } 151 | 152 | -keep class * extends com.mob.tools.proguard.ProtectedMemberKeeper { 153 | protected *; 154 | } 155 | 156 | -keepclassmembers class * extends com.mob.tools.proguard.PrivateMemberKeeper { 157 | private *; 158 | } 159 | 160 | -keepclassmembers class * extends com.mob.tools.proguard.ConstructorKeeper { 161 | public (...); 162 | } 163 | 164 | -keep class * extends com.mob.tools.proguard.EverythingKeeper { 165 | *; 166 | } 167 | #================================= loopshare ====================================================== 168 | 169 | -keepclasseswithmembernames class * { 170 | native ; 171 | } 172 | 173 | -keepclasseswithmembers class * { 174 | public (android.content.Context, android.util.AttributeSet); 175 | } 176 | 177 | -keepclasseswithmembers class * { 178 | public (android.content.Context, android.util.AttributeSet, int); 179 | } 180 | 181 | -keepclassmembers class * extends android.app.Activity { 182 | public void *(android.view.View); 183 | } 184 | 185 | -keepclassmembers enum * { 186 | public static **[] values(); 187 | public static ** valueOf(java.lang.String); 188 | } 189 | 190 | -keep class * implements android.os.Parcelable { 191 | public static final android.os.Parcelable$Creator *; 192 | } 193 | 194 | -keepclassmembers class * extends cn.sharesdk.framework.Platform { 195 | public static ; 196 | public (android.content.Context); 197 | public *; 198 | protected *; 199 | } 200 | 201 | -keepclassmembers class * extends cn.sharesdk.framework.Service { 202 | public *; 203 | } 204 | 205 | -keep class **$ShareParams { 206 | *; 207 | } 208 | 209 | -keep class cn.sharesdk.framework.Service { 210 | public static ; 211 | public (android.content.Context); 212 | public *; 213 | protected *; 214 | } 215 | 216 | -keep class **$ServiceEvent { 217 | *; 218 | } 219 | 220 | -keep class cn.sharesdk.framework.FakeActivity { 221 | *; 222 | } 223 | 224 | -keep class **.R { 225 | public *; 226 | } 227 | 228 | -keep class cn.sharesdk.framework.utils.BitmapHelper { 229 | public *; 230 | } 231 | 232 | -keep class **.R$* { 233 | *; 234 | } 235 | 236 | -keep class cn.sharesdk.framework.utils.ShareSDKR { 237 | public *; 238 | } 239 | 240 | -keep class cn.sharesdk.framework.utils.UIHandler { 241 | *; 242 | } 243 | 244 | -keep class cn.sharesdk.framework.TitleLayout { 245 | *; 246 | } 247 | 248 | -keep class cn.sharesdk.framework.PlatformDb { 249 | *; 250 | } 251 | 252 | -keepclasseswithmembers class * { 253 | *** getHTML(java.lang.String); 254 | } 255 | 256 | -keep interface * { 257 | *; 258 | } 259 | 260 | -keep class * extends java.lang.Throwable { 261 | *; 262 | } 263 | 264 | -keep class cn.sharesdk.framework.authorize.AuthorizeAdapter { 265 | *; 266 | } 267 | 268 | -keep class cn.sharesdk.tencent.qzone.QZoneWebShareAdapter { 269 | *; 270 | } 271 | 272 | -keep class cn.sharesdk.tencent.qq.QQWebShareAdapter { 273 | *; 274 | } 275 | 276 | -keep class cn.sharesdk.tencent.qq.ReceiveActivity { 277 | *; 278 | } 279 | 280 | -keep class cn.sharesdk.incentive.IncentivePageAdapter { 281 | *; 282 | } 283 | 284 | -keep class cn.sharesdk.incentive.OnRewardListener { 285 | *; 286 | } 287 | 288 | -keep class * implements cn.sharesdk.wechat.utils.WXMediaMessage$IMediaObject { 289 | *; 290 | } 291 | 292 | -keep class cn.sharesdk.wechat.utils.WXMediaMessage { 293 | public *; 294 | } 295 | 296 | -keep class * extends cn.sharesdk.wechat.utils.WXMediaMessage$IMediaObject { 297 | public *; 298 | } 299 | 300 | -keep class cn.sharesdk.wechat.utils.WechatHandlerActivity { 301 | public *; 302 | } 303 | 304 | -keep class cn.sharesdk.framework.ShareSDK { 305 | public static *; 306 | } 307 | 308 | -keep class cn.sharesdk.yixin.utils.YXMessage { 309 | public *; 310 | } 311 | 312 | -keep class * extends cn.sharesdk.yixin.utils.YXMessage$YXMessageData { 313 | public *; 314 | } 315 | 316 | -keep class * implements cn.sharesdk.yixin.utils.YXMessage$YXMessageData { 317 | *; 318 | } 319 | 320 | -keep class cn.sharesdk.yixin.utils.YXMessage$MessageType { 321 | *; 322 | } 323 | 324 | -keep class cn.sharesdk.yixin.utils.YixinHandlerActivity { 325 | public *; 326 | } 327 | 328 | -keep class cn.sharesdk.kakao.utils.KakaoWebViewClient { 329 | public *; 330 | } 331 | 332 | -keep class * implements cn.sharesdk.dingding.utils.DDMediaMessage$IMediaObject { 333 | *; 334 | } 335 | 336 | -keep class cn.sharesdk.dingding.utils.DDMediaMessage { 337 | public *; 338 | } 339 | 340 | -keep class * extends cn.sharesdk.dingding.utils.DDMediaMessage$IMediaObject { 341 | public *; 342 | } 343 | 344 | -keep class cn.sharesdk.dingding.utils.DingdingHandlerActivity { 345 | public *; 346 | } 347 | 348 | -keep class * extends cn.sharesdk.meipai.entity.MeipaiBaseObject { 349 | *; 350 | } 351 | 352 | -keep class cn.sharesdk.meipai.entity.MeipaiBaseObject { 353 | public *; 354 | } 355 | 356 | -keep class cn.sharesdk.framework.ReflectablePlatformActionListener { 357 | public *; 358 | } 359 | 360 | -keepclassmembers class * { 361 | @android.webkit.JavascriptInterface ; 362 | } 363 | 364 | -keep class cn.sharesdk.facebook.FBWebShareAdapter { 365 | *; 366 | } 367 | 368 | -keep class cn.sharesdk.twitter.MappedFileReader{ 369 | *; 370 | } 371 | -keep class cn.sharesdk.twitter.UpLoadViewCallBack{ 372 | *; 373 | } 374 | -keep class cn.sharesdk.google.WebShareActivity{ 375 | *; 376 | } 377 | -keep class cn.sharesdk.google.GooglePlusAuthorizeWebviewClient{ 378 | *; 379 | } 380 | -keep class cn.sharesdk.google.GooglePlusWebShareAdapter{ 381 | *; 382 | } 383 | -keep class cn.sharesdk.youtube.YoutubeAuthorizeWebviewClient{ 384 | *; 385 | } 386 | -keep class cn.sharesdk.facebookmessenger.ReceiveActivity{ 387 | *; 388 | } 389 | -keep class cn.sharesdk.kakao.talk.ReceiveActivity{ 390 | *; 391 | } 392 | -------------------------------------------------------------------------------- /sharesdk_plugin/example/android/app/release/output.json: -------------------------------------------------------------------------------- 1 | [{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":1,"versionName":"1.0","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}] -------------------------------------------------------------------------------- /sharesdk_plugin/example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /sharesdk_plugin/example/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 9 | 10 | 11 | 12 | 13 | 18 | 24 | 32 | 36 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /sharesdk_plugin/example/android/app/src/main/java/com/mob/sharesdk_plugin_example/App.java: -------------------------------------------------------------------------------- 1 | package com.mob.sharesdk_plugin_example; 2 | 3 | import com.mob.flutter.sharesdk.impl.FlutterLoopSharePrepare; 4 | import io.flutter.app.FlutterApplication; 5 | 6 | public class App extends FlutterApplication { 7 | 8 | @Override 9 | public void onCreate() { 10 | super.onCreate(); 11 | FlutterLoopSharePrepare flutterLoopSharePrepare = new FlutterLoopSharePrepare(); 12 | flutterLoopSharePrepare.prepare(this, MainActivity.class); 13 | 14 | //ShareSDK.prepareLoopShare(new SharesdkPlugin.LoopshareListener()); 15 | 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /sharesdk_plugin/example/android/app/src/main/java/com/mob/sharesdk_plugin_example/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.mob.sharesdk_plugin_example; 2 | 3 | import io.flutter.embedding.android.FlutterActivity; 4 | import io.flutter.embedding.engine.FlutterEngine; 5 | import io.flutter.plugins.GeneratedPluginRegistrant; 6 | 7 | public class MainActivity extends FlutterActivity { 8 | 9 | // @Override 10 | // protected void onCreate(Bundle savedInstanceState) { 11 | // super.onCreate(savedInstanceState); 12 | // GeneratedPluginRegistrant.registerWith(this); 13 | // Log.e("WWW", " ================example android MainActivity onCreate"); 14 | // } 15 | 16 | 17 | @Override 18 | public void configureFlutterEngine(FlutterEngine flutterEngine){ 19 | GeneratedPluginRegistrant.registerWith(flutterEngine); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /sharesdk_plugin/example/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /sharesdk_plugin/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobClub/ShareSDK-For-Flutter/5789425a5dd7116416da74c4df5f39a0ce8ea4ee/sharesdk_plugin/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /sharesdk_plugin/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobClub/ShareSDK-For-Flutter/5789425a5dd7116416da74c4df5f39a0ce8ea4ee/sharesdk_plugin/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /sharesdk_plugin/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobClub/ShareSDK-For-Flutter/5789425a5dd7116416da74c4df5f39a0ce8ea4ee/sharesdk_plugin/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /sharesdk_plugin/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobClub/ShareSDK-For-Flutter/5789425a5dd7116416da74c4df5f39a0ce8ea4ee/sharesdk_plugin/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /sharesdk_plugin/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobClub/ShareSDK-For-Flutter/5789425a5dd7116416da74c4df5f39a0ce8ea4ee/sharesdk_plugin/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /sharesdk_plugin/example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /sharesdk_plugin/example/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /sharesdk_plugin/example/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | maven { 4 | url "https://mvn.mob.com/android" 5 | } 6 | google() 7 | jcenter() 8 | } 9 | 10 | dependencies { 11 | classpath 'com.android.tools.build:gradle:3.6.0' 12 | classpath 'com.mob.sdk:MobSDK:+' 13 | } 14 | } 15 | 16 | allprojects { 17 | repositories { 18 | maven { 19 | url "https://mvn.mob.com/android" 20 | } 21 | google() 22 | jcenter() 23 | } 24 | } 25 | 26 | rootProject.buildDir = '../build' 27 | subprojects { 28 | project.buildDir = "${rootProject.buildDir}/${project.name}" 29 | } 30 | subprojects { 31 | project.evaluationDependsOn(':app') 32 | } 33 | 34 | task clean(type: Delete) { 35 | delete rootProject.buildDir 36 | } 37 | -------------------------------------------------------------------------------- /sharesdk_plugin/example/android/demokey.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobClub/ShareSDK-For-Flutter/5789425a5dd7116416da74c4df5f39a0ce8ea4ee/sharesdk_plugin/example/android/demokey.keystore -------------------------------------------------------------------------------- /sharesdk_plugin/example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1024M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | MobSDK.spEdition=fp 5 | -------------------------------------------------------------------------------- /sharesdk_plugin/example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip 7 | -------------------------------------------------------------------------------- /sharesdk_plugin/example/android/proguard-project.txt: -------------------------------------------------------------------------------- 1 | -dontoptimize 2 | -dontusemixedcaseclassnames 3 | -dontskipnonpubliclibraryclasses 4 | #-dontpreverify 5 | -verbose 6 | -dontwarn 7 | -optimizations !code/simplification/arithmetic,!field/*,!class/merging/* 8 | -keepattributes InnerClasses,LineNumberTable 9 | 10 | -keep public class * extends android.app.Activity 11 | -keep public class * extends android.app.Application 12 | -keep public class * extends android.app.Service 13 | -keep public class * extends android.app.View 14 | -keep public class * extends android.content.BroadcastReceiver 15 | -keep public class * extends android.content.ContentProvider 16 | -keep public class * extends android.app.backup.BackupAgentHelper 17 | -keep public class * extends android.preference.Preference 18 | 19 | -keep class android.net.http.SslError 20 | -keep class android.webkit.**{*;} 21 | -keep class cn.sharesdk.**{*;} 22 | -keep class com.sina.**{*;} 23 | -keep class com.alipay.share.sdk.**{*;} 24 | 25 | 26 | #========================== 中国电信 =============================== 27 | -keepattributes *Annotation* 28 | -keepattributes *JavascriptInterface* 29 | -dontwarn cn.com.chinatelecom.account.lib.** 30 | -keepclassmembers class cn.com.chinatelecom.account.lib.**{*;} 31 | -keep class cn.com.chinatelecom.account.lib.**{*;} 32 | #========================== 中国电信 =============================== 33 | 34 | 35 | 36 | 37 | -keepclasseswithmembernames class * { 38 | native ; 39 | } 40 | 41 | -keepclasseswithmembers class * { 42 | public (android.content.Context, android.util.AttributeSet); 43 | } 44 | 45 | -keepclasseswithmembers class * { 46 | public (android.content.Context, android.util.AttributeSet, int); 47 | } 48 | 49 | -keepclassmembers class * extends android.app.Activity { 50 | public void *(android.view.View); 51 | } 52 | 53 | -keepclassmembers enum * { 54 | public static **[] values(); 55 | public static ** valueOf(java.lang.String); 56 | } 57 | 58 | -keep class **.R$* { 59 | *; 60 | } 61 | 62 | -keepattributes EnclosingMethod 63 | 64 | -keep class * implements android.os.Parcelable { 65 | public static final android.os.Parcelable$Creator *; 66 | } 67 | 68 | #========================== EventBus =============================== 69 | -keepattributes *Annotation* 70 | -keepclassmembers class * { 71 | @org.greenrobot.eventbus.Subscribe ; 72 | } 73 | -keep enum org.greenrobot.eventbus.ThreadMode { *; } 74 | 75 | # Only required if you use AsyncExecutor 76 | -keepclassmembers class * extends org.greenrobot.eventbus.util.ThrowableFailureEvent { 77 | (java.lang.Throwable); 78 | } 79 | #========================== EventBus =============================== 80 | -keepattributes *Annotation* 81 | -keepclassmembers class * { 82 | @org.greenrobot.eventbus.Subscribe ; 83 | } 84 | -keep enum org.greenrobot.eventbus.ThreadMode { *; } 85 | 86 | # Only required if you use AsyncExecutor 87 | -keepclassmembers class * extends org.greenrobot.eventbus.util.ThrowableFailureEvent { 88 | (java.lang.Throwable); 89 | } 90 | -------------------------------------------------------------------------------- /sharesdk_plugin/example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /sharesdk_plugin/example/ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.mode2v3 3 | *.moved-aside 4 | *.pbxuser 5 | *.perspectivev3 6 | **/*sync/ 7 | .sconsign.dblite 8 | .tags* 9 | **/.vagrant/ 10 | **/DerivedData/ 11 | Icon? 12 | **/Pods/ 13 | **/.symlinks/ 14 | profile 15 | xcuserdata 16 | **/.generated/ 17 | Flutter/App.framework 18 | Flutter/Flutter.framework 19 | Flutter/Generated.xcconfig 20 | Flutter/ephemeral/ 21 | Flutter/app.flx 22 | Flutter/app.zip 23 | Flutter/flutter_assets/ 24 | 25 | ServiceDefinitions.json 26 | Runner/GeneratedPluginRegistrant.* 27 | 28 | # Exceptions to above rules. 29 | !default.mode1v3 30 | !default.mode2v3 31 | !default.pbxuser 32 | !default.perspectivev3 33 | -------------------------------------------------------------------------------- /sharesdk_plugin/example/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 9.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /sharesdk_plugin/example/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /sharesdk_plugin/example/ios/Flutter/Flutter.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # NOTE: This podspec is NOT to be published. It is only used as a local source! 3 | # This is a generated file; do not edit or check into version control. 4 | # 5 | 6 | Pod::Spec.new do |s| 7 | s.name = 'Flutter' 8 | s.version = '1.0.0' 9 | s.summary = 'High-performance, high-fidelity mobile apps.' 10 | s.homepage = 'https://flutter.io' 11 | s.license = { :type => 'MIT' } 12 | s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' } 13 | s.source = { :git => 'https://github.com/flutter/engine', :tag => s.version.to_s } 14 | s.ios.deployment_target = '9.0' 15 | # Framework linking is handled by Flutter tooling, not CocoaPods. 16 | # Add a placeholder to satisfy `s.dependency 'Flutter'` plugin podspecs. 17 | s.vendored_frameworks = 'path/to/nothing' 18 | end 19 | -------------------------------------------------------------------------------- /sharesdk_plugin/example/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /sharesdk_plugin/example/ios/Flutter/flutter_export_environment.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # This is a generated file; do not edit or check into version control. 3 | export "FLUTTER_ROOT=/Users/mobtech-ios/Documents/Projects/Flutter" 4 | export "FLUTTER_APPLICATION_PATH=/Users/mobtech-ios/Documents/Projects/Share_Flutter/sharesdk_plugin/example" 5 | export "COCOAPODS_PARALLEL_CODE_SIGN=true" 6 | export "FLUTTER_TARGET=lib/main.dart" 7 | export "FLUTTER_BUILD_DIR=build" 8 | export "FLUTTER_BUILD_NAME=1.0.0" 9 | export "FLUTTER_BUILD_NUMBER=1" 10 | export "DART_OBFUSCATION=false" 11 | export "TRACK_WIDGET_CREATION=false" 12 | export "TREE_SHAKE_ICONS=true" 13 | export "PACKAGE_CONFIG=/Users/mobtech-ios/Documents/Projects/Share_Flutter/sharesdk_plugin/example/.dart_tool/package_config.json" 14 | -------------------------------------------------------------------------------- /sharesdk_plugin/example/ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # Alamofire required min version: 10.0 3 | platform :ios, '10.0' 4 | 5 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 6 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 7 | 8 | project 'Runner', { 9 | 'Debug' => :debug, 10 | 'Profile' => :release, 11 | 'Release' => :release, 12 | } 13 | 14 | def flutter_root 15 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 16 | unless File.exist?(generated_xcode_build_settings_path) 17 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 18 | end 19 | 20 | File.foreach(generated_xcode_build_settings_path) do |line| 21 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 22 | return matches[1].strip if matches 23 | end 24 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 25 | end 26 | 27 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 28 | 29 | flutter_ios_podfile_setup 30 | 31 | target 'Runner' do 32 | use_frameworks! 33 | use_modular_headers! 34 | 35 | pod 'Alamofire', '=5.9.1' 36 | 37 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 38 | end 39 | 40 | post_install do |installer| 41 | installer.pods_project.targets.each do |target| 42 | flutter_additional_ios_build_settings(target) 43 | target.build_configurations.each do |config| 44 | config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES' 45 | end 46 | end 47 | end 48 | -------------------------------------------------------------------------------- /sharesdk_plugin/example/ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Alamofire (5.9.1) 3 | - Flutter (1.0.0) 4 | - mob_sharesdk (4.4.32): 5 | - mob_sharesdk/ShareSDK (= 4.4.32) 6 | - MOBFoundation (>= 3.2.9) 7 | - mob_sharesdk/ShareSDK (4.4.32): 8 | - MOBFoundation (>= 3.2.9) 9 | - mob_sharesdk/ShareSDKExtension (4.4.32): 10 | - mob_sharesdk/ShareSDK 11 | - MOBFoundation (>= 3.2.9) 12 | - mob_sharesdk/ShareSDKPlatforms/DingTalk (4.4.32): 13 | - mob_sharesdk/ShareSDK 14 | - MOBFoundation (>= 3.2.9) 15 | - mob_sharesdk/ShareSDKPlatforms/Douyin (4.4.32): 16 | - mob_sharesdk/ShareSDK 17 | - MOBFoundation (>= 3.2.9) 18 | - mob_sharesdk/ShareSDKPlatforms/Dropbox (4.4.32): 19 | - mob_sharesdk/ShareSDK 20 | - MOBFoundation (>= 3.2.9) 21 | - mob_sharesdk/ShareSDKPlatforms/Evernote (4.4.32): 22 | - mob_sharesdk/ShareSDK 23 | - MOBFoundation (>= 3.2.9) 24 | - mob_sharesdk/ShareSDKPlatforms/Facebook (4.4.32): 25 | - mob_sharesdk/ShareSDK 26 | - MOBFoundation (>= 3.2.9) 27 | - mob_sharesdk/ShareSDKPlatforms/Flickr (4.4.32): 28 | - mob_sharesdk/ShareSDK 29 | - MOBFoundation (>= 3.2.9) 30 | - mob_sharesdk/ShareSDKPlatforms/GooglePlus (4.4.32): 31 | - mob_sharesdk/ShareSDK 32 | - MOBFoundation (>= 3.2.9) 33 | - mob_sharesdk/ShareSDKPlatforms/Instagram (4.4.32): 34 | - mob_sharesdk/ShareSDK 35 | - MOBFoundation (>= 3.2.9) 36 | - mob_sharesdk/ShareSDKPlatforms/Instapaper (4.4.32): 37 | - mob_sharesdk/ShareSDK 38 | - MOBFoundation (>= 3.2.9) 39 | - mob_sharesdk/ShareSDKPlatforms/Kakao (4.4.32): 40 | - Alamofire 41 | - mob_sharesdk/ShareSDK 42 | - MOBFoundation (>= 3.2.9) 43 | - mob_sharesdk/ShareSDKPlatforms/KuaiShou (4.4.32): 44 | - mob_sharesdk/ShareSDK 45 | - MOBFoundation (>= 3.2.9) 46 | - mob_sharesdk/ShareSDKPlatforms/Line (4.4.32): 47 | - mob_sharesdk/ShareSDK 48 | - MOBFoundation (>= 3.2.9) 49 | - mob_sharesdk/ShareSDKPlatforms/LinkedIn (4.4.32): 50 | - mob_sharesdk/ShareSDK 51 | - MOBFoundation (>= 3.2.9) 52 | - mob_sharesdk/ShareSDKPlatforms/Messenger (4.4.32): 53 | - mob_sharesdk/ShareSDK 54 | - MOBFoundation (>= 3.2.9) 55 | - mob_sharesdk/ShareSDKPlatforms/MingDao (4.4.32): 56 | - mob_sharesdk/ShareSDK 57 | - MOBFoundation (>= 3.2.9) 58 | - mob_sharesdk/ShareSDKPlatforms/Oasis (4.4.32): 59 | - mob_sharesdk/ShareSDK 60 | - MOBFoundation (>= 3.2.9) 61 | - mob_sharesdk/ShareSDKPlatforms/Pinterest (4.4.32): 62 | - mob_sharesdk/ShareSDK 63 | - MOBFoundation (>= 3.2.9) 64 | - mob_sharesdk/ShareSDKPlatforms/Pocket (4.4.32): 65 | - mob_sharesdk/ShareSDK 66 | - MOBFoundation (>= 3.2.9) 67 | - mob_sharesdk/ShareSDKPlatforms/QQ (4.4.32): 68 | - mob_sharesdk/ShareSDK 69 | - MOBFoundation (>= 3.2.9) 70 | - mob_sharesdk/ShareSDKPlatforms/Reddit (4.4.32): 71 | - mob_sharesdk/ShareSDK 72 | - MOBFoundation (>= 3.2.9) 73 | - mob_sharesdk/ShareSDKPlatforms/SinaWeibo (4.4.32): 74 | - mob_sharesdk/ShareSDK 75 | - MOBFoundation (>= 3.2.9) 76 | - mob_sharesdk/ShareSDKPlatforms/SMS (4.4.32): 77 | - mob_sharesdk/ShareSDK 78 | - MOBFoundation (>= 3.2.9) 79 | - mob_sharesdk/ShareSDKPlatforms/SnapChat (4.4.32): 80 | - mob_sharesdk/ShareSDK 81 | - MOBFoundation (>= 3.2.9) 82 | - mob_sharesdk/ShareSDKPlatforms/Telegram (4.4.32): 83 | - mob_sharesdk/ShareSDK 84 | - MOBFoundation (>= 3.2.9) 85 | - mob_sharesdk/ShareSDKPlatforms/TikTok (4.4.32): 86 | - mob_sharesdk/ShareSDK 87 | - MOBFoundation (>= 3.2.9) 88 | - mob_sharesdk/ShareSDKPlatforms/Twitter (4.4.32): 89 | - mob_sharesdk/ShareSDK 90 | - MOBFoundation (>= 3.2.9) 91 | - mob_sharesdk/ShareSDKPlatforms/VKontakte (4.4.32): 92 | - mob_sharesdk/ShareSDK 93 | - MOBFoundation (>= 3.2.9) 94 | - mob_sharesdk/ShareSDKPlatforms/WatermelonVideo (4.4.32): 95 | - mob_sharesdk/ShareSDK 96 | - MOBFoundation (>= 3.2.9) 97 | - mob_sharesdk/ShareSDKPlatforms/WeChat (4.4.32): 98 | - mob_sharesdk/ShareSDK 99 | - MOBFoundation (>= 3.2.9) 100 | - mob_sharesdk/ShareSDKPlatforms/WeWork (4.4.32): 101 | - mob_sharesdk/ShareSDK 102 | - MOBFoundation (>= 3.2.9) 103 | - mob_sharesdk/ShareSDKPlatforms/WhatsApp (4.4.32): 104 | - mob_sharesdk/ShareSDK 105 | - MOBFoundation (>= 3.2.9) 106 | - mob_sharesdk/ShareSDKPlatforms/XHS (4.4.32): 107 | - mob_sharesdk/ShareSDK 108 | - MOBFoundation (>= 3.2.9) 109 | - mob_sharesdk/ShareSDKPlatforms/Yixin (4.4.32): 110 | - mob_sharesdk/ShareSDK 111 | - MOBFoundation (>= 3.2.9) 112 | - mob_sharesdk/ShareSDKPlatforms/YouDaoNote (4.4.32): 113 | - mob_sharesdk/ShareSDK 114 | - MOBFoundation (>= 3.2.9) 115 | - mob_sharesdk/ShareSDKUI (4.4.32): 116 | - mob_sharesdk/ShareSDK 117 | - MOBFoundation (>= 3.2.9) 118 | - MOBFoundation (20241205) 119 | - sharesdk_plugin (1.1.7): 120 | - Flutter 121 | - mob_sharesdk 122 | - mob_sharesdk/ShareSDKExtension 123 | - mob_sharesdk/ShareSDKPlatforms/DingTalk 124 | - mob_sharesdk/ShareSDKPlatforms/Douyin 125 | - mob_sharesdk/ShareSDKPlatforms/Dropbox 126 | - mob_sharesdk/ShareSDKPlatforms/Evernote 127 | - mob_sharesdk/ShareSDKPlatforms/Facebook 128 | - mob_sharesdk/ShareSDKPlatforms/Flickr 129 | - mob_sharesdk/ShareSDKPlatforms/GooglePlus 130 | - mob_sharesdk/ShareSDKPlatforms/Instagram 131 | - mob_sharesdk/ShareSDKPlatforms/Instapaper 132 | - mob_sharesdk/ShareSDKPlatforms/Kakao 133 | - mob_sharesdk/ShareSDKPlatforms/KuaiShou 134 | - mob_sharesdk/ShareSDKPlatforms/Line 135 | - mob_sharesdk/ShareSDKPlatforms/LinkedIn 136 | - mob_sharesdk/ShareSDKPlatforms/Messenger 137 | - mob_sharesdk/ShareSDKPlatforms/MingDao 138 | - mob_sharesdk/ShareSDKPlatforms/Oasis 139 | - mob_sharesdk/ShareSDKPlatforms/Pinterest 140 | - mob_sharesdk/ShareSDKPlatforms/Pocket 141 | - mob_sharesdk/ShareSDKPlatforms/QQ 142 | - mob_sharesdk/ShareSDKPlatforms/Reddit 143 | - mob_sharesdk/ShareSDKPlatforms/SinaWeibo 144 | - mob_sharesdk/ShareSDKPlatforms/SMS 145 | - mob_sharesdk/ShareSDKPlatforms/SnapChat 146 | - mob_sharesdk/ShareSDKPlatforms/Telegram 147 | - mob_sharesdk/ShareSDKPlatforms/TikTok 148 | - mob_sharesdk/ShareSDKPlatforms/Twitter 149 | - mob_sharesdk/ShareSDKPlatforms/VKontakte 150 | - mob_sharesdk/ShareSDKPlatforms/WatermelonVideo 151 | - mob_sharesdk/ShareSDKPlatforms/WeChat 152 | - mob_sharesdk/ShareSDKPlatforms/WeWork 153 | - mob_sharesdk/ShareSDKPlatforms/WhatsApp 154 | - mob_sharesdk/ShareSDKPlatforms/XHS 155 | - mob_sharesdk/ShareSDKPlatforms/Yixin 156 | - mob_sharesdk/ShareSDKPlatforms/YouDaoNote 157 | - mob_sharesdk/ShareSDKUI 158 | 159 | DEPENDENCIES: 160 | - Alamofire (= 5.9.1) 161 | - Flutter (from `Flutter`) 162 | - sharesdk_plugin (from `.symlinks/plugins/sharesdk_plugin/ios`) 163 | 164 | SPEC REPOS: 165 | trunk: 166 | - Alamofire 167 | - mob_sharesdk 168 | - MOBFoundation 169 | 170 | EXTERNAL SOURCES: 171 | Flutter: 172 | :path: Flutter 173 | sharesdk_plugin: 174 | :path: ".symlinks/plugins/sharesdk_plugin/ios" 175 | 176 | SPEC CHECKSUMS: 177 | Alamofire: f36a35757af4587d8e4f4bfa223ad10be2422b8c 178 | Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a 179 | mob_sharesdk: 48d446fc9ba136f4674a2c65b95a82f963f59447 180 | MOBFoundation: 02f12e447148c6d0ada3b1db037744089fccbf69 181 | sharesdk_plugin: 5127eda52840a897a63e7e9ed0df627ce195eb7a 182 | 183 | PODFILE CHECKSUM: 6af6b603c3d79152c6d9b23fae9c99381651f875 184 | 185 | COCOAPODS: 1.16.2 186 | -------------------------------------------------------------------------------- /sharesdk_plugin/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /sharesdk_plugin/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /sharesdk_plugin/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 71 | 77 | 78 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /sharesdk_plugin/example/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /sharesdk_plugin/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /sharesdk_plugin/example/ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /sharesdk_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /sharesdk_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobClub/ShareSDK-For-Flutter/5789425a5dd7116416da74c4df5f39a0ce8ea4ee/sharesdk_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /sharesdk_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobClub/ShareSDK-For-Flutter/5789425a5dd7116416da74c4df5f39a0ce8ea4ee/sharesdk_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /sharesdk_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobClub/ShareSDK-For-Flutter/5789425a5dd7116416da74c4df5f39a0ce8ea4ee/sharesdk_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /sharesdk_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobClub/ShareSDK-For-Flutter/5789425a5dd7116416da74c4df5f39a0ce8ea4ee/sharesdk_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /sharesdk_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobClub/ShareSDK-For-Flutter/5789425a5dd7116416da74c4df5f39a0ce8ea4ee/sharesdk_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /sharesdk_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobClub/ShareSDK-For-Flutter/5789425a5dd7116416da74c4df5f39a0ce8ea4ee/sharesdk_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /sharesdk_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobClub/ShareSDK-For-Flutter/5789425a5dd7116416da74c4df5f39a0ce8ea4ee/sharesdk_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /sharesdk_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobClub/ShareSDK-For-Flutter/5789425a5dd7116416da74c4df5f39a0ce8ea4ee/sharesdk_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /sharesdk_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobClub/ShareSDK-For-Flutter/5789425a5dd7116416da74c4df5f39a0ce8ea4ee/sharesdk_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /sharesdk_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobClub/ShareSDK-For-Flutter/5789425a5dd7116416da74c4df5f39a0ce8ea4ee/sharesdk_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /sharesdk_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobClub/ShareSDK-For-Flutter/5789425a5dd7116416da74c4df5f39a0ce8ea4ee/sharesdk_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /sharesdk_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobClub/ShareSDK-For-Flutter/5789425a5dd7116416da74c4df5f39a0ce8ea4ee/sharesdk_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /sharesdk_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobClub/ShareSDK-For-Flutter/5789425a5dd7116416da74c4df5f39a0ce8ea4ee/sharesdk_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /sharesdk_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobClub/ShareSDK-For-Flutter/5789425a5dd7116416da74c4df5f39a0ce8ea4ee/sharesdk_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /sharesdk_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobClub/ShareSDK-For-Flutter/5789425a5dd7116416da74c4df5f39a0ce8ea4ee/sharesdk_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /sharesdk_plugin/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /sharesdk_plugin/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobClub/ShareSDK-For-Flutter/5789425a5dd7116416da74c4df5f39a0ce8ea4ee/sharesdk_plugin/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /sharesdk_plugin/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobClub/ShareSDK-For-Flutter/5789425a5dd7116416da74c4df5f39a0ce8ea4ee/sharesdk_plugin/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /sharesdk_plugin/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobClub/ShareSDK-For-Flutter/5789425a5dd7116416da74c4df5f39a0ce8ea4ee/sharesdk_plugin/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /sharesdk_plugin/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /sharesdk_plugin/example/ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /sharesdk_plugin/example/ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /sharesdk_plugin/example/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | FacebookClientToken 6 | 807754a71d62e42df8302fdaf7564b9f 7 | CADisableMinimumFrameDurationOnPhone 8 | 9 | CFBundleDevelopmentRegion 10 | $(DEVELOPMENT_LANGUAGE) 11 | CFBundleExecutable 12 | $(EXECUTABLE_NAME) 13 | CFBundleIdentifier 14 | $(PRODUCT_BUNDLE_IDENTIFIER) 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ios 19 | CFBundlePackageType 20 | APPL 21 | CFBundleShortVersionString 22 | $(FLUTTER_BUILD_NAME) 23 | CFBundleSignature 24 | ???? 25 | CFBundleURLTypes 26 | 27 | 28 | CFBundleTypeRole 29 | Editor 30 | CFBundleURLName 31 | alipayShare 32 | CFBundleURLSchemes 33 | 34 | ap2017062107540437 35 | 36 | 37 | 38 | CFBundleTypeRole 39 | Editor 40 | CFBundleURLName 41 | facebook 42 | CFBundleURLSchemes 43 | 44 | fb1412473428822331 45 | 46 | 47 | 48 | CFBundleTypeRole 49 | Editor 50 | CFBundleURLName 51 | tumblr 52 | CFBundleURLSchemes 53 | 54 | tb2QUXqO9fcgGdtGG1FcvML6ZunIQzAEL8xY6hIaxdJnDti2DYwM 55 | 56 | 57 | 58 | CFBundleTypeRole 59 | Editor 60 | CFBundleURLName 61 | qq 62 | CFBundleURLSchemes 63 | 64 | tencent1110451818 65 | QQ05FB8B52 66 | 67 | 68 | 69 | CFBundleTypeRole 70 | Editor 71 | CFBundleURLName 72 | 73 | CFBundleURLSchemes 74 | 75 | 76 | 77 | CFBundleTypeRole 78 | Editor 79 | CFBundleURLName 80 | wechat 81 | CFBundleURLSchemes 82 | 83 | wx617c77c82218ea2c 84 | 85 | 86 | 87 | CFBundleTypeRole 88 | Editor 89 | CFBundleURLName 90 | line 91 | CFBundleURLSchemes 92 | 93 | line3rdp.$(PRODUCT_BUNDLE_IDENTIFIER) 94 | 95 | 96 | 97 | CFBundleTypeRole 98 | Editor 99 | CFBundleURLName 100 | weibo 101 | CFBundleURLSchemes 102 | 103 | wb1556465402 104 | 105 | 106 | 107 | CFBundleTypeRole 108 | Editor 109 | CFBundleURLName 110 | yixin 111 | CFBundleURLSchemes 112 | 113 | yxfddfe3934340436da964fd20885fe2a4 114 | 115 | 116 | 117 | CFBundleTypeRole 118 | Editor 119 | CFBundleURLName 120 | pin 121 | CFBundleURLSchemes 122 | 123 | pdk5057854497590653616 124 | 125 | 126 | 127 | CFBundleTypeRole 128 | Editor 129 | CFBundleURLName 130 | kakao 131 | CFBundleURLSchemes 132 | 133 | kakao9c17eb03317e0e627ec95a400f5785fb 134 | 135 | 136 | 137 | CFBundleTypeRole 138 | Editor 139 | CFBundleURLName 140 | dingding 141 | CFBundleURLSchemes 142 | 143 | dingoabcwtuab76wy0kyzo 144 | dingoax9s2mdekb7a6748n 145 | 146 | 147 | 148 | CFBundleTypeRole 149 | Editor 150 | CFBundleURLName 151 | pocket 152 | CFBundleURLSchemes 153 | 154 | pocketapp1234 155 | 156 | 157 | 158 | CFBundleTypeRole 159 | Editor 160 | CFBundleURLName 161 | vk 162 | CFBundleURLSchemes 163 | 164 | vk5312801 165 | 166 | 167 | 168 | CFBundleTypeRole 169 | Editor 170 | CFBundleURLName 171 | pinterest 172 | CFBundleURLSchemes 173 | 174 | pdk4799618093317899411 175 | 176 | 177 | 178 | CFBundleTypeRole 179 | Editor 180 | CFBundleURLName 181 | yixin 182 | CFBundleURLSchemes 183 | 184 | yx0d9a9f9088ea44d78680f3274da1765f 185 | 186 | 187 | 188 | CFBundleTypeRole 189 | Editor 190 | CFBundleURLName 191 | twitter 192 | CFBundleURLSchemes 193 | 194 | twitterkit-YUJMMTFOcE93MGI4Zi1aRTlHQnM6MTpjaQ 195 | 196 | 197 | 198 | CFBundleTypeRole 199 | Editor 200 | CFBundleURLName 201 | 202 | CFBundleURLSchemes 203 | 204 | 205 | 206 | CFBundleTypeRole 207 | Editor 208 | CFBundleURLSchemes 209 | 210 | ak1412473428822331 211 | 212 | 213 | 214 | CFBundleTypeRole 215 | Editor 216 | CFBundleURLName 217 | douyin 218 | CFBundleURLSchemes 219 | 220 | awycvl19mldccyso 221 | 222 | 223 | 224 | 225 | CFBundleTypeRole 226 | Editor 227 | CFBundleURLSchemes 228 | 229 | oasis568898243 230 | 231 | 232 | 233 | CFBundleTypeRole 234 | Editor 235 | CFBundleURLSchemes 236 | 237 | line3rdp.$(PRODUCT_BUNDLE_IDENTIFIER) 238 | 239 | 240 | 241 | CFBundleTypeRole 242 | Editor 243 | CFBundleURLSchemes 244 | 245 | ssdkmoba0b0c0d0 246 | 247 | 248 | 249 | CFBundleTypeRole 250 | Editor 251 | CFBundleURLName 252 | tiktok 253 | CFBundleURLSchemes 254 | 255 | aw3vqar8qg1oy91q 256 | 257 | 258 | 259 | CFBundleTypeRole 260 | Editor 261 | CFBundleURLName 262 | kuaishou 263 | CFBundleURLSchemes 264 | 265 | ks705657770555308030 266 | 267 | 268 | 269 | CFBundleTypeRole 270 | Editor 271 | CFBundleURLName 272 | wework 273 | CFBundleURLSchemes 274 | 275 | wwautha21eaecf93f0e3ba000012 276 | 277 | 278 | 279 | CFBundleTypeRole 280 | Editor 281 | CFBundleURLName 282 | xiaohongshu 283 | CFBundleURLSchemes 284 | 285 | xhs7bf2d19af55b56259a4c6984ecf9445c 286 | 287 | 288 | 289 | CFBundleVersion 290 | $(FLUTTER_BUILD_NUMBER) 291 | FacebookAdvertiserIDCollectionEnabled 292 | 293 | FacebookAppID 294 | 1412473428822331 295 | FacebookAutoLogAppEventsEnabled 296 | 297 | KAKAO_APP_KEY 298 | 9c17eb03317e0e627ec95a400f5785fb 299 | LSApplicationQueriesSchemes 300 | 301 | xhsdiscover 302 | db-auth 303 | tumblr 304 | mingdao 305 | vk 306 | pocket 307 | youdaonote 308 | instapaper 309 | linkedin 310 | flickr 311 | pinterest 312 | weibosdk3.3 313 | ksnebula 314 | KwaiSDKMediaV2 315 | kwai.clip.multi 316 | KwaiBundleToken 317 | kwaiopenapi 318 | kwai 319 | kakao3rdauth 320 | kakaostory-2.9.0 321 | instagram-capture 322 | instagram 323 | instagram-stories 324 | KwaiAuth2 325 | snssdk32 326 | bitmoji-sdk 327 | sharesdk 328 | itms-apps 329 | snapchat 330 | lineauth2 331 | oasis 332 | fbshareextension 333 | fbapi20160328 334 | fbapi20150629 335 | snssdk1180 336 | snssdk1233 337 | snssdk1128 338 | weixinULAPI 339 | kakaotalk-5.9.7 340 | pinterestsdk.v1 341 | vkauthorize 342 | storylink 343 | kakao9c17eb03317e0e627ec95a400f5785fb 344 | kakaolink 345 | storykompassauth 346 | kakaokompassauth 347 | yixinfav 348 | yixinopenapi 349 | pocket-oauth-v1 350 | dingtalk-sso 351 | dingtalk-open 352 | dingtalk 353 | alipayshare 354 | alipay 355 | whatsapp 356 | tim 357 | timapi 358 | timopensdkfriend 359 | timwpa 360 | timgamebindinggroup 361 | timapiwallet 362 | timOpensdkSSoLogin 363 | wtlogintim 364 | timopensdkgrouptribeshare 365 | timopensdkapiV4 366 | timopensdkdataline 367 | wtlogintimV1 368 | timapiV1 369 | yixinoauth 370 | yixin 371 | sinaweibohd 372 | sinaweibo 373 | weibosdk2.5 374 | weibosdk 375 | weibo 376 | sinaweibosso 377 | weixin 378 | youtube 379 | mtmv 380 | mqqopensdkapiV4 381 | mqzone 382 | mqqwpa 383 | wtloginmqq2 384 | mqzoneopensdkapiV2 385 | mqqopensdkminiapp 386 | mqzoneopensdkapi19 387 | mqzoneopensdkapi 388 | mqzoneopensdk 389 | mqqopensdkapiV3 390 | mqqopensdkapiV2 391 | mqq 392 | mqqOpensdkSSoLogin 393 | mqqapi 394 | line3rdp.$(PRODUCT_BUNDLE_IDENTIFIER) 395 | lineauth 396 | line 397 | instagram 398 | fbauth 399 | fb-messenger-platform-20150714 400 | fb-messenger-api20140430 401 | fb-messenger-share-api 402 | fb-messenger 403 | fbauth2 404 | fbapi 405 | fbapi20130214 406 | twitterauth 407 | tg 408 | telegram 409 | douyinsharesdk 410 | douyinopensdk 411 | tiktokopensdk 412 | tiktoksharesdk 413 | wxwork 414 | wxworkrdm 415 | wechat 416 | 417 | LSRequiresIPhoneOS 418 | 419 | LineSDKConfig 420 | 421 | ChannelID 422 | 1639219273 423 | UniversalLink 424 | https://70imc.share2dlink.com/line-auth/ 425 | 426 | MOBAppKey 427 | 3276d3e413040 428 | MOBAppSecret 429 | 4280a3a6df667cfce37528dec03fd9c3 430 | MOBNetLater 431 | 2 432 | NSAppTransportSecurity 433 | 434 | NSAllowsArbitraryLoads 435 | 436 | 437 | NSPhotoLibraryAddUsageDescription 438 | 写入相册视频 439 | NSPhotoLibraryUsageDescription 440 | 从手机相册中选择 441 | SCSDKClientId 442 | dc8e6068-0578-41b8-8392-4da009519725 443 | SCSDKRedirectUrl 444 | ssdkmoba0b0c0d0://mob 445 | SCSDKScopes 446 | 447 | https://auth.snapchat.com/oauth2/api/user.external_id 448 | https://auth.snapchat.com/oauth2/api/user.display_name 449 | https://auth.snapchat.com/oauth2/api/user.bitmoji.avatar 450 | 451 | UILaunchStoryboardName 452 | LaunchScreen 453 | UIMainStoryboardFile 454 | Main 455 | UISupportedInterfaceOrientations 456 | 457 | UIInterfaceOrientationPortrait 458 | UIInterfaceOrientationLandscapeLeft 459 | UIInterfaceOrientationLandscapeRight 460 | 461 | UISupportedInterfaceOrientations~ipad 462 | 463 | UIInterfaceOrientationPortrait 464 | UIInterfaceOrientationPortraitUpsideDown 465 | UIInterfaceOrientationLandscapeLeft 466 | UIInterfaceOrientationLandscapeRight 467 | 468 | UIViewControllerBasedStatusBarAppearance 469 | 470 | 471 | 472 | -------------------------------------------------------------------------------- /sharesdk_plugin/example/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /sharesdk_plugin/example/ios/Runner/Runner.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.developer.associated-domains 6 | 7 | applinks:ybpre.share2dlink.com 8 | applinks:ahmn.t4m.cn 9 | applinks:bj2ks.share2dlink.com 10 | applinks:70imc.share2dlink.com 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /sharesdk_plugin/example/ios/Runner/cat.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobClub/ShareSDK-For-Flutter/5789425a5dd7116416da74c4df5f39a0ce8ea4ee/sharesdk_plugin/example/ios/Runner/cat.mp4 -------------------------------------------------------------------------------- /sharesdk_plugin/example/ios/Runner/tx@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobClub/ShareSDK-For-Flutter/5789425a5dd7116416da74c4df5f39a0ce8ea4ee/sharesdk_plugin/example/ios/Runner/tx@2x.png -------------------------------------------------------------------------------- /sharesdk_plugin/example/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:sharesdk_plugin_example/home.dart'; 3 | import 'package:flutter/cupertino.dart'; 4 | 5 | void main() => runApp(MyApp()); 6 | 7 | class MyApp extends StatefulWidget { 8 | @override 9 | _MyAppState createState() => _MyAppState(); 10 | } 11 | 12 | class _MyAppState extends State { 13 | @override 14 | void initState() { 15 | super.initState(); 16 | //if (Platform.isIOS) { 17 | 18 | //} 19 | } 20 | 21 | @override 22 | Widget build(BuildContext context) { 23 | return MaterialApp(home: HomePage()); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /sharesdk_plugin/example/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: sharesdk_plugin_example 2 | description: Demonstrates how to use the sharesdk_plugin plugin. 3 | publish_to: 'none' 4 | 5 | environment: 6 | sdk: ">=2.12.0 <3.0.0" 7 | 8 | dependencies: 9 | flutter: 10 | sdk: flutter 11 | 12 | # The following adds the Cupertino Icons font to your application. 13 | # Use with the CupertinoIcons class for iOS style icons. 14 | cupertino_icons: ^1.0.3 15 | 16 | dev_dependencies: 17 | flutter_test: 18 | sdk: flutter 19 | 20 | sharesdk_plugin: 21 | path: ../ 22 | 23 | # For information on the generic Dart part of this file, see the 24 | # following page: https://dart.dev/tools/pub/pubspec 25 | 26 | # The following section is specific to Flutter. 27 | flutter: 28 | 29 | # The following line ensures that the Material Icons font is 30 | # included with your application, so that you can use the icons in 31 | # the material Icons class. 32 | uses-material-design: true 33 | 34 | # To add assets to your application, add an assets section, like this: 35 | # assets: 36 | # - images/a_dot_burr.jpeg 37 | # - images/a_dot_ham.jpeg 38 | 39 | # An image asset can refer to one or more resolution-specific "variants", see 40 | # https://flutter.dev/assets-and-images/#resolution-aware. 41 | 42 | # For details regarding adding assets from package dependencies, see 43 | # https://flutter.dev/assets-and-images/#from-packages 44 | 45 | # To add custom fonts to your application, add a fonts section here, 46 | # in this "flutter" section. Each entry in this list should have a 47 | # "family" key with the font family name, and a "fonts" key with a 48 | # list giving the asset and other descriptors for the font. For 49 | # example: 50 | # fonts: 51 | # - family: Schyler 52 | # fonts: 53 | # - asset: fonts/Schyler-Regular.ttf 54 | # - asset: fonts/Schyler-Italic.ttf 55 | # style: italic 56 | # - family: Trajan Pro 57 | # fonts: 58 | # - asset: fonts/TrajanPro.ttf 59 | # - asset: fonts/TrajanPro_Bold.ttf 60 | # weight: 700 61 | # 62 | # For details regarding fonts from package dependencies, 63 | # see https://flutter.dev/custom-fonts/#from-packages 64 | -------------------------------------------------------------------------------- /sharesdk_plugin/example/test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // To perform an interaction with a widget in your test, use the WidgetTester utility that Flutter 3 | // provides. For example, you can send tap and scroll gestures. You can also use WidgetTester to 4 | // find child widgets in the widget tree, read text, and verify that the values of widget properties 5 | // are correct. 6 | 7 | import 'package:flutter/material.dart'; 8 | //import 'package:flutter_test/flutter_test.dart'; 9 | 10 | //import 'package:sharesdk_example/main.dart'; 11 | 12 | /*void main() { 13 | testWidgets('Verify Platform version', (WidgetTester tester) async { 14 | // Build our app and trigger a frame. 15 | await tester.pumpWidget(new MyApp()); 16 | 17 | // Verify that platform version is retrieved. 18 | expect( 19 | find.byWidgetPredicate( 20 | (Widget widget) => 21 | widget is Text && widget.data.startsWith('Running on:'), 22 | ), 23 | findsOneWidget); 24 | }); 25 | }*/ 26 | -------------------------------------------------------------------------------- /sharesdk_plugin/ios/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vagrant/ 3 | .sconsign.dblite 4 | .svn/ 5 | 6 | .DS_Store 7 | *.swp 8 | profile 9 | 10 | DerivedData/ 11 | build/ 12 | GeneratedPluginRegistrant.h 13 | GeneratedPluginRegistrant.m 14 | 15 | .generated/ 16 | 17 | *.pbxuser 18 | *.mode1v3 19 | *.mode2v3 20 | *.perspectivev3 21 | 22 | !default.pbxuser 23 | !default.mode1v3 24 | !default.mode2v3 25 | !default.perspectivev3 26 | 27 | xcuserdata 28 | 29 | *.moved-aside 30 | 31 | *.pyc 32 | *sync/ 33 | Icon? 34 | .tags* 35 | 36 | /Flutter/Generated.xcconfig 37 | -------------------------------------------------------------------------------- /sharesdk_plugin/ios/Assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobClub/ShareSDK-For-Flutter/5789425a5dd7116416da74c4df5f39a0ce8ea4ee/sharesdk_plugin/ios/Assets/.gitkeep -------------------------------------------------------------------------------- /sharesdk_plugin/ios/Classes/SharesdkPlugin.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface SharesdkPlugin : NSObject 4 | @end 5 | -------------------------------------------------------------------------------- /sharesdk_plugin/ios/sharesdk_plugin.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html 3 | # 4 | Pod::Spec.new do |s| 5 | s.name = 'sharesdk_plugin' 6 | s.version = '1.1.7' 7 | s.summary = 'Flutter plugin for ShareSDK.' 8 | s.description = <<-DESC 9 | ShareSDK is the most comprehensive Social SDK in the world,which share easily with 40+ platforms. 10 | DESC 11 | s.homepage = 'http://www.mob.com/mobService/sharesdk' 12 | s.license = { :file => '../LICENSE' } 13 | s.author = { 'Mob' => 'mobproduct@mob.com' } 14 | s.source = { :path => '.' } 15 | s.source_files = 'Classes/**/*' 16 | s.public_header_files = 'Classes/**/*.h' 17 | s.dependency 'Flutter' 18 | s.dependency 'mob_sharesdk' 19 | s.dependency 'mob_sharesdk/ShareSDKExtension' 20 | s.dependency 'mob_sharesdk/ShareSDKUI' 21 | s.dependency 'mob_sharesdk/ShareSDKPlatforms/XHS' 22 | s.dependency 'mob_sharesdk/ShareSDKPlatforms/QQ' 23 | s.dependency 'mob_sharesdk/ShareSDKPlatforms/SinaWeibo' 24 | s.dependency 'mob_sharesdk/ShareSDKPlatforms/WeChat' 25 | s.dependency 'mob_sharesdk/ShareSDKPlatforms/Facebook' 26 | s.dependency 'mob_sharesdk/ShareSDKPlatforms/Twitter' 27 | s.dependency 'mob_sharesdk/ShareSDKPlatforms/Oasis' 28 | s.dependency 'mob_sharesdk/ShareSDKPlatforms/Line' 29 | s.dependency 'mob_sharesdk/ShareSDKPlatforms/SnapChat' 30 | s.dependency 'mob_sharesdk/ShareSDKPlatforms/WatermelonVideo' 31 | s.dependency 'mob_sharesdk/ShareSDKPlatforms/KuaiShou' 32 | s.dependency 'mob_sharesdk/ShareSDKPlatforms/Douyin' 33 | s.dependency 'mob_sharesdk/ShareSDKPlatforms/TikTok' 34 | s.dependency 'mob_sharesdk/ShareSDKPlatforms/Kakao' 35 | s.dependency 'mob_sharesdk/ShareSDKPlatforms/Line' 36 | s.dependency 'mob_sharesdk/ShareSDKPlatforms/Instagram' 37 | s.dependency 'mob_sharesdk/ShareSDKPlatforms/Messenger' 38 | s.dependency 'mob_sharesdk/ShareSDKPlatforms/WhatsApp' 39 | s.dependency 'mob_sharesdk/ShareSDKPlatforms/GooglePlus' 40 | s.dependency 'mob_sharesdk/ShareSDKPlatforms/LinkedIn' 41 | s.dependency 'mob_sharesdk/ShareSDKPlatforms/VKontakte' 42 | s.dependency 'mob_sharesdk/ShareSDKPlatforms/Telegram' 43 | s.dependency 'mob_sharesdk/ShareSDKPlatforms/Reddit' 44 | s.dependency 'mob_sharesdk/ShareSDKPlatforms/Pocket' 45 | s.dependency 'mob_sharesdk/ShareSDKPlatforms/Flickr' 46 | s.dependency 'mob_sharesdk/ShareSDKPlatforms/Dropbox' 47 | s.dependency 'mob_sharesdk/ShareSDKPlatforms/Pinterest' 48 | s.dependency 'mob_sharesdk/ShareSDKPlatforms/Reddit' 49 | s.dependency 'mob_sharesdk/ShareSDKPlatforms/Instapaper' 50 | s.dependency 'mob_sharesdk/ShareSDKPlatforms/DingTalk' 51 | s.dependency 'mob_sharesdk/ShareSDKPlatforms/YouDaoNote' 52 | s.dependency 'mob_sharesdk/ShareSDKPlatforms/MingDao' 53 | s.dependency 'mob_sharesdk/ShareSDKPlatforms/Evernote' 54 | s.dependency 'mob_sharesdk/ShareSDKPlatforms/Yixin' 55 | s.dependency 'mob_sharesdk/ShareSDKPlatforms/SMS' 56 | s.dependency 'mob_sharesdk/ShareSDKPlatforms/WeWork' 57 | 58 | s.static_framework = true 59 | 60 | s.ios.deployment_target = '8.0' 61 | end 62 | 63 | -------------------------------------------------------------------------------- /sharesdk_plugin/lib/sharesdk_defines.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | 3 | enum SSDKResponseState { Success, Fail, Cancel, Unknown } 4 | 5 | class SSDKError extends Error { 6 | final dynamic? rawData; 7 | final int? code; 8 | final dynamic? userInfo; 9 | 10 | SSDKError({this.rawData}) 11 | : code = rawData != null ? rawData["code"] : 0, 12 | userInfo = rawData != null ? rawData["userInfo"] : {}, 13 | super(); 14 | } 15 | 16 | class ShareSDKMethod { 17 | final String? name; 18 | final int? id; 19 | 20 | ShareSDKMethod({@required this.name, @required this.id}) 21 | : assert(name != null && id != null), 22 | super(); 23 | } 24 | 25 | class ShareSDKMethods { 26 | static final ShareSDKMethod getVersion = 27 | ShareSDKMethod(name: 'getVersion', id: 0); 28 | static final ShareSDKMethod share = ShareSDKMethod(name: 'share', id: 1); 29 | static final ShareSDKMethod auth = ShareSDKMethod(name: 'auth', id: 2); 30 | static final ShareSDKMethod hasAuthed = 31 | ShareSDKMethod(name: 'hasAuthed', id: 3); 32 | static final ShareSDKMethod cancelAuth = 33 | ShareSDKMethod(name: 'cancelAuth', id: 4); 34 | static final ShareSDKMethod getUserInfo = 35 | ShareSDKMethod(name: 'getUserInfo', id: 5); 36 | static final ShareSDKMethod regist = ShareSDKMethod(name: 'regist', id: 6); 37 | static final ShareSDKMethod showMenu = 38 | ShareSDKMethod(name: 'showMenu', id: 7); 39 | static final ShareSDKMethod showEditor = 40 | ShareSDKMethod(name: 'showEditor', id: 8); 41 | static final ShareSDKMethod openMiniProgram = 42 | ShareSDKMethod(name: 'openMiniProgram', id: 9); 43 | static final ShareSDKMethod activePlatforms = 44 | ShareSDKMethod(name: 'activePlatforms', id: 10); 45 | static final ShareSDKMethod isClientInstalled = 46 | ShareSDKMethod(name: 'isClientInstalled', id: 11); 47 | static final ShareSDKMethod uploadPrivacyPermissionStatus = 48 | ShareSDKMethod(name: 'uploadPrivacyPermissionStatus', id: 12); 49 | static final ShareSDKMethod setAllowShowPrivacyWindow = 50 | ShareSDKMethod(name: 'setAllowShowPrivacyWindow', id: 13); 51 | static final ShareSDKMethod getPrivacyPolicy = 52 | ShareSDKMethod(name: 'getPrivacyPolicy', id: 14); 53 | static final ShareSDKMethod setPrivacyUI = 54 | ShareSDKMethod(name: 'setPrivacyUI', id: 15); 55 | static final ShareSDKMethod shareWithActivity = 56 | ShareSDKMethod(name: 'shareWithActivity', id: 16); 57 | static final ShareSDKMethod getSharedFilePath = 58 | ShareSDKMethod(name: 'targetFilePath', id: 17); 59 | } 60 | 61 | class ShareSDKPlatform { 62 | final String? name; 63 | final int? id; 64 | 65 | ShareSDKPlatform({@required this.id, @required this.name}) 66 | : assert(id != null && name != null), 67 | super(); 68 | } 69 | 70 | class ShareSDKPlatforms { 71 | static final ShareSDKPlatform sina = ShareSDKPlatform(name: 'sina', id: 1); 72 | static final ShareSDKPlatform tencentWeibo = 73 | ShareSDKPlatform(name: 'tencentWeibo', id: 2); 74 | static final ShareSDKPlatform douBan = 75 | ShareSDKPlatform(name: 'douBan', id: 5); 76 | static final ShareSDKPlatform qZone = ShareSDKPlatform(name: 'qZone', id: 6); 77 | static final ShareSDKPlatform renren = 78 | ShareSDKPlatform(name: 'renren', id: 7); 79 | static final ShareSDKPlatform kaixin = 80 | ShareSDKPlatform(name: 'kaixin', id: 8); 81 | static final ShareSDKPlatform facebook = 82 | ShareSDKPlatform(name: 'facebook', id: 10); 83 | static final ShareSDKPlatform twitter = 84 | ShareSDKPlatform(name: 'twitter', id: 11); 85 | static final ShareSDKPlatform yinXiang = 86 | ShareSDKPlatform(name: 'yinXiang', id: 12); 87 | static final ShareSDKPlatform googlePlus = 88 | ShareSDKPlatform(name: 'googlePlus', id: 14); 89 | static final ShareSDKPlatform instagram = 90 | ShareSDKPlatform(name: 'instagram', id: 15); 91 | static final ShareSDKPlatform linkedIn = 92 | ShareSDKPlatform(name: 'linkedIn', id: 16); 93 | static final ShareSDKPlatform tumblr = 94 | ShareSDKPlatform(name: 'tumblr', id: 17); 95 | static final ShareSDKPlatform mail = ShareSDKPlatform(name: 'mail', id: 18); 96 | static final ShareSDKPlatform sms = ShareSDKPlatform(name: 'sms', id: 19); 97 | static final ShareSDKPlatform print = ShareSDKPlatform(name: 'print', id: 20); 98 | static final ShareSDKPlatform copy = ShareSDKPlatform(name: 'copy', id: 21); 99 | static final ShareSDKPlatform wechatSession = 100 | ShareSDKPlatform(name: 'wechatSession', id: 22); 101 | static final ShareSDKPlatform wechatTimeline = 102 | ShareSDKPlatform(name: 'wechatTimeline', id: 23); 103 | static final ShareSDKPlatform qq = ShareSDKPlatform(name: 'qq', id: 24); 104 | static final ShareSDKPlatform instapaper = 105 | ShareSDKPlatform(name: 'instapaper', id: 25); 106 | static final ShareSDKPlatform pocket = 107 | ShareSDKPlatform(name: 'pocket', id: 26); 108 | static final ShareSDKPlatform youdaoNote = 109 | ShareSDKPlatform(name: 'youdaoNote', id: 27); 110 | static final ShareSDKPlatform pinterest = 111 | ShareSDKPlatform(name: 'pinterest', id: 30); 112 | static final ShareSDKPlatform flickr = 113 | ShareSDKPlatform(name: 'flickr', id: 34); 114 | static final ShareSDKPlatform dropbox = 115 | ShareSDKPlatform(name: 'dropbox', id: 35); 116 | static final ShareSDKPlatform vKontakte = 117 | ShareSDKPlatform(name: 'vKontakte', id: 36); 118 | static final ShareSDKPlatform weChatFavorites = 119 | ShareSDKPlatform(name: 'weChatFavorites', id: 37); 120 | static final ShareSDKPlatform yixinSession = 121 | ShareSDKPlatform(name: 'yixinSession', id: 38); 122 | static final ShareSDKPlatform yixinTimeline = 123 | ShareSDKPlatform(name: 'yixinTimeline', id: 39); 124 | static final ShareSDKPlatform yiXinFav = 125 | ShareSDKPlatform(name: 'yiXinFav', id: 40); 126 | static final ShareSDKPlatform mingDao = 127 | ShareSDKPlatform(name: 'mingDao', id: 41); 128 | static final ShareSDKPlatform line = ShareSDKPlatform(name: 'line', id: 42); 129 | static final ShareSDKPlatform whatsApp = 130 | ShareSDKPlatform(name: 'whatsApp', id: 43); 131 | static final ShareSDKPlatform kakaoTalk = 132 | ShareSDKPlatform(name: 'kakaoTalk', id: 44); 133 | static final ShareSDKPlatform kakaoStory = 134 | ShareSDKPlatform(name: 'kakaoStory', id: 45); 135 | static final ShareSDKPlatform messenger = 136 | ShareSDKPlatform(name: 'messenger', id: 46); 137 | static final ShareSDKPlatform telegram = 138 | ShareSDKPlatform(name: 'telegram', id: 47); 139 | static final ShareSDKPlatform aliSocial = 140 | ShareSDKPlatform(name: 'aliSocial', id: 50); 141 | static final ShareSDKPlatform aliSocialTimeline = 142 | ShareSDKPlatform(name: 'aliSocialTimeline', id: 51); 143 | static final ShareSDKPlatform dingding = 144 | ShareSDKPlatform(name: 'dingding', id: 52); 145 | static final ShareSDKPlatform youtube = 146 | ShareSDKPlatform(name: 'youtube', id: 53); 147 | static final ShareSDKPlatform meiPai = 148 | ShareSDKPlatform(name: 'meiPai', id: 54); 149 | static final ShareSDKPlatform cmcc = ShareSDKPlatform(name: 'cmcc', id: 55); 150 | static final ShareSDKPlatform reddit = 151 | ShareSDKPlatform(name: 'reddit', id: 56); 152 | static final ShareSDKPlatform douyin = 153 | ShareSDKPlatform(name: 'douyin', id: 59); 154 | static final ShareSDKPlatform wework = 155 | ShareSDKPlatform(name: 'wework', id: 60); 156 | static final ShareSDKPlatform apple = ShareSDKPlatform(name: 'apple', id: 61); 157 | static final ShareSDKPlatform hwaccount = 158 | ShareSDKPlatform(name: 'HWAccount', id: 63); 159 | static final ShareSDKPlatform oasis = ShareSDKPlatform(name: 'oasis', id: 64); 160 | static final ShareSDKPlatform xmaccount = 161 | ShareSDKPlatform(name: 'XMAccount', id: 65); 162 | static final ShareSDKPlatform snapchat = 163 | ShareSDKPlatform(name: 'snapchat', id: 66); 164 | static final ShareSDKPlatform xhs = ShareSDKPlatform(name: 'xhs', id: 67); 165 | static final ShareSDKPlatform kuaishou = 166 | ShareSDKPlatform(name: 'kuaishou', id: 68); 167 | static final ShareSDKPlatform watermelonvideo = 168 | ShareSDKPlatform(name: 'watermelonvideo', id: 69); 169 | static final ShareSDKPlatform tiktok = 170 | ShareSDKPlatform(name: 'tiktok', id: 70); 171 | static final ShareSDKPlatform yixinSeries = 172 | ShareSDKPlatform(name: 'yixinSeries', id: 994); 173 | static final ShareSDKPlatform kakaoSeries = 174 | ShareSDKPlatform(name: 'kakaoSeries', id: 995); 175 | static final ShareSDKPlatform evernote = 176 | ShareSDKPlatform(name: 'evernote', id: 996); 177 | static final ShareSDKPlatform wechatSeries = 178 | ShareSDKPlatform(name: 'wechatSeries', id: 997); 179 | static final ShareSDKPlatform qqSeries = 180 | ShareSDKPlatform(name: 'qqSeries', id: 998); 181 | } 182 | 183 | class SSDKFacebookShareType { 184 | final int? value; 185 | 186 | SSDKFacebookShareType({this.value}) : super(); 187 | } 188 | 189 | class SSDKFacebookShareTypes extends Object { 190 | static SSDKFacebookShareType get native => SSDKFacebookShareType(value: 1); 191 | 192 | static SSDKFacebookShareType get sheet => SSDKFacebookShareType(value: 2); 193 | } 194 | 195 | class SSDKContentType { 196 | final int? value; 197 | 198 | SSDKContentType({this.value}) : super(); 199 | } 200 | 201 | class SSDKContentTypes extends Object { 202 | static SSDKContentType get auto => SSDKContentType(value: 0); 203 | 204 | static SSDKContentType get text => SSDKContentType(value: 1); 205 | 206 | static SSDKContentType get image => SSDKContentType(value: 2); 207 | 208 | static SSDKContentType get webpage => SSDKContentType(value: 3); 209 | 210 | static SSDKContentType get app => SSDKContentType(value: 4); 211 | 212 | static SSDKContentType get audio => SSDKContentType(value: 5); 213 | 214 | static SSDKContentType get video => SSDKContentType(value: 6); 215 | 216 | static SSDKContentType get file => SSDKContentType(value: 7); 217 | 218 | static SSDKContentType get miniProgram => SSDKContentType(value: 10); 219 | 220 | static SSDKContentType get message => SSDKContentType(value: 11); 221 | 222 | static SSDKContentType get open_wxMiniProgram => SSDKContentType(value: 12); 223 | 224 | static SSDKContentType get instagram_friend => SSDKContentType(value: 13); 225 | 226 | static SSDKContentType get qq_miniProgram => SSDKContentType(value: 14); 227 | 228 | static SSDKContentType get kakao_feed_template => SSDKContentType(value: 15); 229 | 230 | static SSDKContentType get kakao_url_template => SSDKContentType(value: 16); 231 | 232 | static SSDKContentType get kakao_commerce_template => SSDKContentType(value: 17); 233 | 234 | static SSDKContentType get kakao_text_template => SSDKContentType(value: 18); 235 | 236 | static SSDKContentType get kakao_custom_template => SSDKContentType(value: 19); 237 | 238 | static SSDKContentType get open_qqMiniProgram => SSDKContentType(value: 20); 239 | 240 | static SSDKContentType get dy_mixFile => SSDKContentType(value: 21); 241 | } 242 | -------------------------------------------------------------------------------- /sharesdk_plugin/lib/sharesdk_interface.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'package:flutter/services.dart'; 3 | import './sharesdk_defines.dart'; 4 | import './sharesdk_register.dart'; 5 | import './sharesdk_map.dart'; 6 | 7 | typedef void EventHandler(dynamic event); 8 | 9 | class SharesdkPlugin { 10 | static const MethodChannel _channel = 11 | const MethodChannel('com.mob.sharesdk.methodchannel'); 12 | static const EventChannel _channelReciever = 13 | const EventChannel('com.mob.sharesdk.restorereceiver'); 14 | 15 | static Future regist(ShareSDKRegister register) async { 16 | return await _channel.invokeMethod( 17 | ShareSDKMethods.regist.name!, register.platformsInfo); 18 | } 19 | 20 | static Future targetFilePath( 21 | String fileName, String fileType, Function(String path) result) async { 22 | Map args = {"name": fileName, "type": fileType}; 23 | Future callback = 24 | _channel.invokeMethod(ShareSDKMethods.getSharedFilePath.name!, args); 25 | callback.then((dynamic response) { 26 | if (response != null) { 27 | result(response["path"]); 28 | } 29 | }); 30 | return callback; 31 | } 32 | 33 | static Future share(ShareSDKPlatform platform, SSDKMap params, 34 | Function(SSDKResponseState, dynamic, dynamic, SSDKError) result) { 35 | Map args = {"platform": platform.id, "params": params.map}; 36 | Future callback = 37 | _channel.invokeMethod(ShareSDKMethods.share.name!, args); 38 | callback.then((dynamic response) { 39 | if (result != null) { 40 | result(_state(response), response["userData"], 41 | response["contentEntity"], SSDKError(rawData: response["error"])); 42 | } 43 | }); 44 | return callback; 45 | } 46 | 47 | static Future shareByMap(ShareSDKPlatform platform, Map params, 48 | Function(SSDKResponseState, dynamic, dynamic, SSDKError) result) { 49 | Map args = {"platform": platform.id, "params": params}; 50 | Future callback = 51 | _channel.invokeMethod(ShareSDKMethods.share.name!, args); 52 | callback.then((dynamic response) { 53 | if (result != null) { 54 | result(_state(response), response["userData"], 55 | response["contentEntity"], SSDKError(rawData: response["error"])); 56 | } 57 | }); 58 | return callback; 59 | } 60 | 61 | static Future shareWithActivity( 62 | ShareSDKPlatform platform, 63 | SSDKMap params, 64 | Function(SSDKResponseState, dynamic, dynamic, SSDKError) result) { 65 | Map args = {"platform": platform.id, "params": params.map}; 66 | Future callback = 67 | _channel.invokeMethod(ShareSDKMethods.shareWithActivity.name!, args); 68 | callback.then((dynamic response) { 69 | if (result != null) { 70 | result(_state(response), response["userData"], 71 | response["contentEntity"], SSDKError(rawData: response["error"])); 72 | } 73 | }); 74 | return callback; 75 | } 76 | 77 | static Future auth(ShareSDKPlatform platform, Map settings, 78 | Function(SSDKResponseState, dynamic, SSDKError) result) { 79 | Map args = {"platform": platform.id, "settings": settings}; 80 | Future callback = 81 | _channel.invokeMethod(ShareSDKMethods.auth.name!, args); 82 | callback.then((dynamic response) { 83 | if (result != null) { 84 | result(_state(response), response["user"], 85 | SSDKError(rawData: response["error"])); 86 | } 87 | }); 88 | return callback; 89 | } 90 | 91 | static Future hasAuthed(ShareSDKPlatform platform, 92 | Function(SSDKResponseState, dynamic, SSDKError) result) { 93 | Future callback = 94 | _channel.invokeMethod(ShareSDKMethods.hasAuthed.name!, platform.id); 95 | callback.then((dynamic response) { 96 | if (result != null) { 97 | result(_state(response), response["user"], 98 | SSDKError(rawData: response["error"])); 99 | } 100 | }); 101 | return callback; 102 | } 103 | 104 | static Future cancelAuth(ShareSDKPlatform platform, 105 | Function(SSDKResponseState, dynamic, SSDKError) result) { 106 | Future callback = 107 | _channel.invokeMethod(ShareSDKMethods.cancelAuth.name!, platform.id); 108 | callback.then((dynamic response) { 109 | if (result != null) { 110 | result(_state(response), response["user"], 111 | SSDKError(rawData: response["error"])); 112 | } 113 | }); 114 | return callback; 115 | } 116 | 117 | static Future getUserInfo(ShareSDKPlatform platform, 118 | Function(SSDKResponseState, dynamic, SSDKError) result) { 119 | Map args = {"platform": platform.id}; 120 | Future callback = 121 | _channel.invokeMethod(ShareSDKMethods.getUserInfo.name!, args); 122 | callback.then((dynamic response) { 123 | if (result != null) { 124 | result(_state(response), response["user"], 125 | SSDKError(rawData: response["error"])); 126 | } 127 | }); 128 | return callback; 129 | } 130 | 131 | static Future showMenu( 132 | dynamic view, 133 | List? platforms, 134 | SSDKMap params, 135 | Function( 136 | SSDKResponseState, ShareSDKPlatform, dynamic, dynamic, SSDKError)? 137 | result) { 138 | List? types; 139 | if (platforms != null) { 140 | Iterable ids = platforms.map((ShareSDKPlatform item) => item.id!); 141 | types = List.from(ids); 142 | } 143 | 144 | Map args = {"platforms": types, "params": params.map, "view": view}; 145 | Future callback = 146 | _channel.invokeMethod(ShareSDKMethods.showMenu.name!, args); 147 | callback.then((dynamic response) { 148 | if (result != null) { 149 | result( 150 | _state(response), 151 | ShareSDKPlatform(id: response["platform"], name: "null"), 152 | response["userData"], 153 | response["contentEntity"], 154 | SSDKError(rawData: response["error"])); 155 | } 156 | }); 157 | return callback; 158 | } 159 | 160 | static Future showEditor( 161 | ShareSDKPlatform platform, 162 | SSDKMap params, 163 | Function( 164 | SSDKResponseState, ShareSDKPlatform, dynamic, dynamic, SSDKError)? 165 | result) { 166 | Map args = {"platform": platform.id, "params": params.map}; 167 | Future callback = 168 | _channel.invokeMethod(ShareSDKMethods.showEditor.name!, args); 169 | callback.then((dynamic response) { 170 | if (result != null) { 171 | result( 172 | _state(response), 173 | ShareSDKPlatform(id: response["platform"], name: "null"), 174 | response["userData"], 175 | response["contentEntity"], 176 | SSDKError(rawData: response["error"])); 177 | } 178 | }); 179 | return callback; 180 | } 181 | 182 | static Future getPrivacyPolicy(String type, String? language, 183 | Function(dynamic? data, dynamic error) result) { 184 | Map args = {"type": type}; 185 | if (language != null) { 186 | args["language"] = language; 187 | } 188 | Future callback = 189 | _channel.invokeMethod(ShareSDKMethods.getPrivacyPolicy.name!, args); 190 | callback.then((dynamic response) { 191 | if (result != null) { 192 | result(response["data"], response["error"]); 193 | } 194 | }); 195 | return callback; 196 | } 197 | 198 | static Future uploadPrivacyPermissionStatus( 199 | int status, Function(bool success) result) { 200 | Map args = {"status": status}; 201 | Future callback = _channel.invokeMethod( 202 | ShareSDKMethods.uploadPrivacyPermissionStatus.name!, args); 203 | callback.then((dynamic response) { 204 | if (result != null) { 205 | result(response["success"]); 206 | } 207 | }); 208 | return callback; 209 | } 210 | 211 | static Future activePlatforms() async { 212 | return await _channel.invokeMethod(ShareSDKMethods.activePlatforms.name!); 213 | } 214 | 215 | static Future get sdkVersion async { 216 | return await _channel.invokeMethod(ShareSDKMethods.getVersion.name!); 217 | } 218 | 219 | static Future openWeChatMiniProgram( 220 | String userName, String path, int miniProgramType) async { 221 | Map args = {"userName": userName, "path": path, "type": miniProgramType}; 222 | return await _channel.invokeMethod( 223 | ShareSDKMethods.openMiniProgram.name!, args); 224 | } 225 | 226 | static Future isClientInstalled(ShareSDKPlatform platform) async { 227 | Map args = {"platform": platform.id}; 228 | return await _channel.invokeMethod( 229 | ShareSDKMethods.isClientInstalled.name!, args); 230 | } 231 | 232 | static SSDKResponseState _state(Map response) { 233 | SSDKResponseState state = SSDKResponseState.Unknown; 234 | switch (response["state"]) { 235 | case 1: 236 | state = SSDKResponseState.Success; 237 | break; 238 | case 2: 239 | state = SSDKResponseState.Fail; 240 | break; 241 | case 3: 242 | state = SSDKResponseState.Cancel; 243 | break; 244 | } 245 | return state; 246 | } 247 | 248 | static void addRestoreReceiver(EventHandler onEvent, EventHandler onError) { 249 | _channelReciever.receiveBroadcastStream().listen(onEvent, onError: onError); 250 | } 251 | } 252 | -------------------------------------------------------------------------------- /sharesdk_plugin/lib/sharesdk_map.dart: -------------------------------------------------------------------------------- 1 | import './sharesdk_defines.dart'; 2 | 3 | const String kText = "text"; 4 | const String kThumbImage = "thumb_image"; 5 | const String kImages = "images"; 6 | const String kImageUrlAndroid = "imageUrl_android"; 7 | const String kImagePathAndroid = "imagePath_android"; 8 | const String kImageDataAndroid = "imageData"; 9 | const String kTitleUrlAndroid = "titleUrl_android"; 10 | const String kMusicUrlAndroid = "musicUrl_android"; 11 | const String kVideoUrlAndroid = "videoUrl_android"; 12 | const String kUrl = "url"; 13 | const String kType = "type"; 14 | const String kLat = "lat"; 15 | const String kLong = "long"; 16 | const String kTitle = "title"; 17 | const String kAudioUrl = "audio_url"; 18 | const String kExtension = "ext_info"; 19 | const String kFile = "file_data"; 20 | const String kEmoticon = "emoticon_data"; 21 | const String kWeChatScene = "wechat_scene"; 22 | const String kWeiboObjectId = "object_id"; 23 | const String kWeiboIsStory = "sina_isStory"; 24 | const String kAttachments = "attachments"; 25 | const String kRecipients = "recipients"; 26 | const String kCCRecipients = "cc_recipients"; 27 | const String kBCCRecipients = "bcc_recipients"; 28 | const String kDesc = "desc"; 29 | const String kLinkURL = "linkURL"; 30 | const String kAlbumId = "album_id"; 31 | const String kTags = "tags"; 32 | const String kTweetId = "tweet_id"; 33 | const String kDeepLinkId = "deep_link_id"; 34 | const String kMenuDisplayX = "menu_display_x"; 35 | const String kMenuDisplayY = "menu_display_y"; 36 | const String kVisibility = "visibility"; 37 | const String kBlogName = "blog_name"; 38 | const String kIsPublic = "is_public"; 39 | const String kIsFriend = "is_friend"; 40 | const String kIsFamily = "is_family"; 41 | const String kSafetyLevel = "safety_level"; 42 | const String kContentType = "content_type"; 43 | const String kHidden = "hidden"; 44 | const String kAudio = "audio"; 45 | const String kVideo = "video"; 46 | const String kSource = "source"; 47 | const String kAuthor = "author"; 48 | const String kNoteBook = "notebook"; 49 | const String kBoard = "board"; 50 | const String kPermission = "permission"; 51 | const String kTemplateId = "templateId"; 52 | const String kTemplateArgs = "templateArgs"; 53 | const String kEnableShare = "enable_share"; 54 | const String kAndroidExecParam = "android_exec_param"; 55 | const String kIPhoneExecParam = "iphone_exec_param"; 56 | const String kGroupId = "group_id"; 57 | const String kPrivateFromSource = "private_from_source"; 58 | const String kFolderId = "folder_id"; 59 | const String kResolveFinalUrl = "resolve_final_url"; 60 | const String kComment = "comment"; 61 | const String kUid = "uid"; 62 | const String kWeChatFile = "source_file"; 63 | const String kWeChatFileExtension = "source_extension"; 64 | const String kAudioFlashURL = "audio_flash_url"; 65 | const String kVideoFlashURL = "video_flash_url"; 66 | const String kVideoAssetURL = "video_asset_url"; 67 | const String kURLName = "url_name"; 68 | const String kPrivacyStatus = "privacy_status"; 69 | const String kYouTubeParts = "youtube_parts"; 70 | const String kYouTubeJsonString = "youtube_json_string"; 71 | const String kWXMPUserName = "wxmp_user_name"; 72 | const String kWXMPPath = "wxmp_path"; 73 | const String kWXMPWithTicket = "wxmp_with_ticket"; 74 | const String kWXMPType = "wxmp_type"; 75 | const String kWXMPHdThumbImage = "wxmp_hdthumbimage"; 76 | const String kFacebookHashtag = "facebook_hashtag"; 77 | const String kFacebookQuote = "facebook_quote"; 78 | const String kFacebookShareType = "facebook_shareType"; 79 | const String ksina_summary = "sina_cardSummary"; 80 | const String ksina_displayname = "sina_displayname"; 81 | const String ksina_cardTitle = "sina_cardTitle"; 82 | const String ksina_linkcard = "sina_linkCard"; 83 | const String kimage_url = "image_url"; 84 | const String kimage_x = "image_x"; 85 | const String kimage_y = "image_y"; 86 | const String ksite = "site"; 87 | const String ksiteUrl = "siteUrl"; 88 | const String kFilePath = "filePath"; 89 | const String kAsset_localIds = "asset_localIds"; 90 | const String kYXLowBandUrl = "yx_lowBand"; 91 | const String kYXLowBandDataUrl = "yx_lowBandData"; 92 | const String kYXDataUrl = "yx_Data"; 93 | const String kYXVideoLowBandDataUrl = "yx_lowvideoBandData"; 94 | const String KHASHTAGS = "HASHTAGS"; 95 | const String KVIDEO_ARRAY = "videoArray"; 96 | const String KDISABLE_NEW_TASK = "disableNewTask"; 97 | const String DOUYIN_MIX_FILE = "douyin_mix_file"; 98 | 99 | class SSDKMap { 100 | final Map map = Map(); 101 | 102 | void setGeneral( 103 | String title, 104 | String text, 105 | dynamic images, 106 | String imageUrlAndroid, 107 | String imagePathAndroid, 108 | String url, 109 | String titleUrlAndroid, 110 | String musicUrlAndroid, 111 | String videoUrlAndroid, 112 | String filePath, 113 | SSDKContentType contentType) { 114 | map[kType] = contentType.value; 115 | map[kText] = text; 116 | map[kTitle] = title; 117 | map[kImages] = images; 118 | map[kUrl] = url; 119 | map[kTitleUrlAndroid] = titleUrlAndroid; 120 | map[kMusicUrlAndroid] = musicUrlAndroid; 121 | map[kVideoUrlAndroid] = videoUrlAndroid; 122 | map[kImageUrlAndroid] = imageUrlAndroid; 123 | map[kImagePathAndroid] = imagePathAndroid; 124 | map[kFilePath] = filePath; 125 | } 126 | 127 | void setImageAndVideoAssets(String imageAssets, Map videoAsset) { 128 | map["imageAssets"] = imageAssets; 129 | map["videoAsset"] = videoAsset; 130 | } 131 | 132 | void setXHS( 133 | {String? title, 134 | String? desc, 135 | String? text, 136 | dynamic images, 137 | dynamic videos, 138 | String? url, 139 | SSDKContentType? contentType}) { 140 | Map params = {}; 141 | if (title != null) { 142 | map[kTitle] = title; 143 | params[kTitle] = title; 144 | } 145 | if (desc != null) { 146 | params[kDesc] = kDesc; 147 | } 148 | if (text != null) { 149 | map[kText] = text; 150 | } 151 | if (url != null) { 152 | map[kUrl] = url; 153 | } 154 | if (images != null) { 155 | map[kImages] = images; 156 | } 157 | if (videos != null) { 158 | map[kVideo] = videos; 159 | } 160 | if (contentType != null) { 161 | map[kType] = contentType.value; 162 | } 163 | 164 | int? id = ShareSDKPlatforms.xhs.id; 165 | map["@platform($id)"] = params; 166 | } 167 | 168 | void setWechat( 169 | String text, 170 | String title, 171 | String url, 172 | String thumbImage, 173 | dynamic images, 174 | String musicFileURL, 175 | String extInfo, 176 | String imageUrl, 177 | dynamic imageData, 178 | String fileData, 179 | String emoticonData, 180 | String fileExtension, 181 | String sourceFileData, 182 | SSDKContentType contentType, 183 | ShareSDKPlatform subPlatform) { 184 | Map params = {}; 185 | params[kType] = contentType.value; 186 | params[kText] = text; 187 | params[kTitle] = title; 188 | params[kUrl] = url; 189 | params[kThumbImage] = thumbImage; 190 | params[kImages] = images; 191 | params[kAudioUrl] = musicFileURL; 192 | params[kExtension] = extInfo; 193 | params[kFile] = fileData; 194 | params[kWeChatFileExtension] = fileExtension; 195 | params[kWeChatFile] = sourceFileData; 196 | params[kEmoticon] = emoticonData; 197 | params[kImageUrlAndroid] = imageUrl; 198 | params[kImageDataAndroid] = imageData; 199 | int? id = subPlatform.id; 200 | map["@platform($id)"] = params; 201 | } 202 | 203 | void setWeChatMiniProgram( 204 | String title, 205 | String desc, 206 | String webUrl, 207 | String path, 208 | String thumbImage, 209 | String hdThumbImage, 210 | String imageUrlAndroid, 211 | String userName, 212 | bool withShareTicket, 213 | int miniProgramType, 214 | ShareSDKPlatform subPlatform) { 215 | Map params = {}; 216 | params[kType] = SSDKContentTypes.miniProgram.value; 217 | params[kTitle] = title; 218 | params[kUrl] = webUrl; 219 | params[kWXMPUserName] = userName; 220 | params[kWXMPPath] = path; 221 | params[kThumbImage] = thumbImage; 222 | params[kWXMPHdThumbImage] = hdThumbImage; 223 | params[kWXMPType] = miniProgramType; 224 | params[kWXMPWithTicket] = withShareTicket; 225 | params[kImageUrlAndroid] = imageUrlAndroid; 226 | int? id = subPlatform.id; 227 | map["@platform($id)"] = params; 228 | } 229 | 230 | void setQQ( 231 | String text, 232 | String title, 233 | String url, 234 | String audio, 235 | String video, 236 | String musicUrl, 237 | String videoUrl, 238 | String thumbImage, 239 | dynamic images, 240 | String imageUrlAndroid, 241 | String imagePathAndroid, 242 | String titleUrlAndroid, 243 | String siteAndroid, 244 | String siteUrlAndroid, 245 | SSDKContentType type, 246 | ShareSDKPlatform subPlatform) { 247 | Map params = {}; 248 | 249 | params[kType] = type.value; 250 | params[kText] = text; 251 | params[kTitle] = title; 252 | params[kTitleUrlAndroid] = titleUrlAndroid; 253 | params[kUrl] = url; 254 | params[kMusicUrlAndroid] = musicUrl; 255 | params[kVideoUrlAndroid] = videoUrl; 256 | params[kAudioFlashURL] = audio; 257 | params[kVideoFlashURL] = video; 258 | params[kThumbImage] = thumbImage; 259 | params[kImages] = images; 260 | params[kImageUrlAndroid] = imageUrlAndroid; 261 | params[kImagePathAndroid] = imagePathAndroid; 262 | params[ksite] = siteAndroid; 263 | params[ksiteUrl] = siteUrlAndroid; 264 | 265 | int? id = subPlatform.id; 266 | map["@platform($id)"] = params; 267 | } 268 | 269 | void setSina( 270 | String text, 271 | String title, 272 | dynamic images, 273 | String video, 274 | String url, 275 | double latitude, 276 | double longitude, 277 | String objectId, 278 | bool isStory, 279 | String imageUrl, 280 | String imagePath, 281 | SSDKContentType type) { 282 | Map params = {}; 283 | 284 | params[kType] = type.value; 285 | params[kText] = text; 286 | params[kImages] = images; 287 | params[kTitle] = title; 288 | params[kVideo] = video; 289 | params[kUrl] = url; 290 | params[kLat] = latitude; 291 | params[kLong] = longitude; 292 | params[kWeiboIsStory] = isStory; 293 | params[kWeiboObjectId] = objectId; 294 | params[kImagePathAndroid] = imagePath; 295 | params[kImageUrlAndroid] = imageUrl; 296 | 297 | int? id = ShareSDKPlatforms.sina.id; 298 | map["@platform($id)"] = params; 299 | } 300 | 301 | void setSinaLinkCard(String text, String title, String url, 302 | String sinaSummary, String imageUrl, String imageX, String imageY) { 303 | Map params = {}; 304 | params[kText] = text; 305 | params[ksina_cardTitle] = title; 306 | params[ksina_displayname] = title; 307 | params[ksina_summary] = sinaSummary; 308 | params[kUrl] = url; 309 | params[ksina_linkcard] = true; 310 | params[kimage_url] = imageUrl; 311 | params[kimage_x] = imageX; 312 | params[kimage_y] = imageY; 313 | params[kType] = SSDKContentTypes.webpage.value; 314 | 315 | int? id = ShareSDKPlatforms.sina.id; 316 | map["@platform($id)"] = params; 317 | } 318 | 319 | void setTwitter(String text, dynamic images, String video, double latitude, 320 | double longitude, SSDKContentType type) { 321 | Map params = {}; 322 | 323 | params[kText] = text; 324 | params[kType] = type.value; 325 | params[kImages] = images; 326 | params[kLat] = latitude; 327 | params[kLong] = longitude; 328 | params[kVideo] = video; 329 | int? id = ShareSDKPlatforms.twitter.id; 330 | map["@platform($id)"] = params; 331 | } 332 | 333 | void setFacebook( 334 | String text, 335 | dynamic images, 336 | String url, 337 | String urlTitle, 338 | String urlName, 339 | String attachementUrl, 340 | String hasTag, 341 | String quote, 342 | SSDKFacebookShareType shareType, 343 | SSDKContentType type) { 344 | Map params = {}; 345 | params[kType] = type.value; 346 | params[kText] = text; 347 | params[kImages] = images; 348 | 349 | if (url.contains("assets-library")) { 350 | params[kVideoAssetURL] = url; 351 | } else { 352 | params[kUrl] = url; 353 | } 354 | 355 | params[kTitle] = urlTitle; 356 | params[kURLName] = urlName; 357 | params[kAttachments] = attachementUrl; 358 | params[kFacebookHashtag] = hasTag; 359 | params[kFacebookQuote] = quote; 360 | params[kFacebookShareType] = shareType.value; 361 | int? id = ShareSDKPlatforms.facebook.id; 362 | map["@platform($id)"] = params; 363 | } 364 | 365 | void setFacebookAssetLocalIdentifier( 366 | String imageLocalIdentifiers, String videoLocalIdentifier) { 367 | map["facebookAssetLocalIdentifierKey_image"] = imageLocalIdentifiers; 368 | map["facebookAssetLocalIdentifierKey_video"] = videoLocalIdentifier; 369 | } 370 | 371 | void setFacebookMessenger(String title, String url, dynamic images, 372 | dynamic video, SSDKContentType type) { 373 | Map params = {}; 374 | 375 | params[kType] = type.value; 376 | params[kImages] = images; 377 | params[kTitle] = title; 378 | params[kUrl] = url; 379 | if (video != null) { 380 | params[kVideo] = video; 381 | } 382 | int? id = ShareSDKPlatforms.messenger.id; 383 | map["@platform($id)"] = params; 384 | } 385 | 386 | void setOasis( 387 | String title, 388 | String text, 389 | dynamic assetLoacalIds, 390 | dynamic image, 391 | String? video, 392 | String fileExtension, 393 | SSDKContentType type) { 394 | Map params = {}; 395 | 396 | params[kType] = type.value; 397 | params[kText] = text; 398 | params[kImages] = image; 399 | params[kTitle] = title; 400 | if (assetLoacalIds != null) { 401 | params[kAsset_localIds] = assetLoacalIds; 402 | } 403 | params[kWeChatFileExtension] = fileExtension; 404 | if (video != null) { 405 | params[kVideo] = video; 406 | } 407 | int? id = ShareSDKPlatforms.oasis.id; 408 | map["@platform($id)"] = params; 409 | } 410 | 411 | void setSnapchat( 412 | String title, 413 | String attachmentUrl, 414 | String image, 415 | String? video, 416 | String sticker, 417 | bool stickerAnimated, 418 | double stickerRotation, 419 | bool cameraViewState, 420 | SSDKContentType type) { 421 | Map params = {}; 422 | 423 | params[kType] = type.value; 424 | params[kImages] = image; 425 | params[kTitle] = title; 426 | params["Sticker"] = sticker; 427 | params[kAttachments] = attachmentUrl; 428 | params["Sticker_animated"] = stickerAnimated; 429 | params["Sticker_rotation"] = stickerRotation; 430 | params["Sticker_cameraviewstate"] = cameraViewState; 431 | if (video != null) { 432 | params[kVideo] = video; 433 | } 434 | 435 | int? id = ShareSDKPlatforms.snapchat.id; 436 | map["@platform($id)"] = params; 437 | } 438 | 439 | void setKuaiShou( 440 | String title, 441 | String desc, 442 | String linkURL, 443 | String thumbImage, 444 | String openID, 445 | String receiverOpenID, 446 | String localIdentifier, 447 | List tags, 448 | String extraInfo, 449 | SSDKContentType type) { 450 | Map params = {}; 451 | 452 | params[kType] = type.value; 453 | params[kTitle] = title; 454 | params[kDesc] = desc; 455 | params[kLinkURL] = linkURL; 456 | params["thumbImage"] = thumbImage; 457 | params["openID"] = openID; 458 | params["receiverOpenID"] = receiverOpenID; 459 | params["localIdentifier"] = localIdentifier; 460 | params["tags"] = tags; 461 | params["extraInfo"] = extraInfo; 462 | 463 | int? id = ShareSDKPlatforms.kuaishou.id; 464 | map["@platform($id)"] = params; 465 | } 466 | 467 | void setDouYinShareActionMode(int shareActionMode) { 468 | map["kSSDKDouYinShareAction"] = shareActionMode; 469 | } 470 | 471 | void setDouYin(List assetLocalIds, String hashtag, Map extraInfo, 472 | int shareActionMode, SSDKContentType type) { 473 | Map params = {}; 474 | 475 | params[kAsset_localIds] = assetLocalIds; 476 | params["douyin_hashtag"] = hashtag; 477 | params["douyin_extraInfo"] = extraInfo; 478 | params["kSSDKDouYinShareAction"] = shareActionMode; 479 | params[kType] = type.value; 480 | 481 | int? id = ShareSDKPlatforms.douyin.id; 482 | map["@platform($id)"] = params; 483 | } 484 | 485 | void setTikTok( 486 | List assetLocalIds, String hashtag, Map extraInfo, SSDKContentType type) { 487 | Map params = {}; 488 | params[kAsset_localIds] = assetLocalIds; 489 | params["tiktok_hashtag"] = hashtag; 490 | params["tiktok_extraInfo"] = extraInfo; 491 | params[kType] = type.value; 492 | int? id = ShareSDKPlatforms.tiktok.id; 493 | map["@platform($id)"] = params; 494 | } 495 | 496 | void setKakaoTalk(String url, String templateId, Map templateArgs) { 497 | Map params = {}; 498 | params[kUrl] = url; 499 | params["templateId"] = templateId; 500 | params["templateArgs"] = templateArgs; 501 | int? id = ShareSDKPlatforms.kakaoTalk.id; 502 | map["@platform($id)"] = params; 503 | } 504 | 505 | void setKakaoStory( 506 | String text, 507 | dynamic images, 508 | String title, 509 | String url, 510 | int permission, 511 | int enableShare, 512 | Map androidExecParam, 513 | Map iOSExecParams, 514 | SSDKContentType type) { 515 | Map params = {}; 516 | 517 | params[kText] = text; 518 | params[kImages] = images; 519 | params[kTitle] = title; 520 | params[kUrl] = url; 521 | params[kPermission] = permission; 522 | params[kEnableShare] = enableShare; 523 | params[kAndroidExecParam] = androidExecParam; 524 | params[kIPhoneExecParam] = iOSExecParams; 525 | int? id = ShareSDKPlatforms.kakaoStory.id; 526 | map["@platform($id)"] = params; 527 | } 528 | 529 | void setInstagram(dynamic images, dynamic x, dynamic y) { 530 | Map params = {}; 531 | 532 | params[kImages] = images; 533 | params[kMenuDisplayX] = x; 534 | params[kMenuDisplayY] = y; 535 | int? id = ShareSDKPlatforms.instagram.id; 536 | map["@platform($id)"] = params; 537 | } 538 | 539 | void setWhatsApp(String text, dynamic images, dynamic audio, dynamic video, 540 | dynamic x, dynamic y, SSDKContentType type) { 541 | Map params = {}; 542 | 543 | params[kType] = type.value; 544 | params[kImages] = images; 545 | params[kText] = text; 546 | if (audio != null) { 547 | params[kAudio] = audio; 548 | } 549 | if (video != null) { 550 | params[kVideo] = video; 551 | } 552 | 553 | params[kMenuDisplayX] = x; 554 | params[kMenuDisplayY] = y; 555 | int? id = ShareSDKPlatforms.whatsApp.id; 556 | map["@platform($id)"] = params; 557 | } 558 | 559 | void setLinkedIn(String text, dynamic images, String url, String title, 560 | String urlDesc, dynamic visibility, SSDKContentType type) { 561 | Map params = {}; 562 | 563 | params[kType] = type.value; 564 | params[kImages] = images; 565 | params[kText] = text; 566 | params[kTitle] = title; 567 | params[kUrl] = url; 568 | params[kDesc] = urlDesc; 569 | params[kVisibility] = visibility; 570 | int? id = ShareSDKPlatforms.linkedIn.id; 571 | map["@platform($id)"] = params; 572 | } 573 | 574 | void setTelegram(String text, dynamic images, dynamic audio, dynamic video, 575 | dynamic file, dynamic x, dynamic y, SSDKContentType type) { 576 | Map params = {}; 577 | params[kType] = type.value; 578 | params[kText] = text; 579 | params[kImages] = images; 580 | if (audio != null) { 581 | params[kAudio] = audio; 582 | } 583 | if (video != null) { 584 | params[kVideo] = video; 585 | } 586 | if (file != null) { 587 | params[kFile] = file; 588 | } 589 | int? id = ShareSDKPlatforms.telegram.id; 590 | map["@platform($id)"] = params; 591 | } 592 | 593 | void setDropbox(dynamic attachment) { 594 | Map params = {}; 595 | params[kAttachments] = attachment; 596 | int? id = ShareSDKPlatforms.dropbox.id; 597 | map["@platform($id)"] = params; 598 | } 599 | 600 | void setPinterest(String image, String desc, String url, String boardName) { 601 | Map params = {}; 602 | 603 | params[kImages] = image; 604 | params[kText] = desc; 605 | params[kUrl] = url; 606 | params[kBoard] = boardName; 607 | int? id = ShareSDKPlatforms.pinterest.id; 608 | map["@platform($id)"] = params; 609 | } 610 | 611 | void setYiXin( 612 | String text, 613 | String title, 614 | String url, 615 | dynamic thumbImage, 616 | dynamic images, 617 | String musicFileURL, 618 | String musicLowBandUrl, 619 | String musicDataUrl, 620 | String musicLowBandDataUrl, 621 | String extInfo, 622 | String fileData, 623 | String videoLowBandUrl, 624 | String comment, 625 | String userId, 626 | SSDKContentType type, 627 | int platformSubType) { 628 | Map params = {}; 629 | 630 | params[kText] = text; 631 | params[kTitle] = title; 632 | params[kUrl] = url; 633 | params[kThumbImage] = thumbImage; 634 | params[kImages] = images; 635 | params[kAudio] = musicFileURL; 636 | params[kYXLowBandUrl] = musicLowBandUrl; 637 | params[kYXDataUrl] = musicDataUrl; 638 | params[kYXLowBandDataUrl] = musicLowBandDataUrl; 639 | params[kExtension] = extInfo; 640 | params[kFile] = fileData; 641 | params[kYXVideoLowBandDataUrl] = videoLowBandUrl; 642 | params[kComment] = comment; 643 | params[kUid] = userId; 644 | params[kType] = type; 645 | 646 | int? id = platformSubType; 647 | map["@platform($id)"] = params; 648 | } 649 | 650 | void setYouDaoNote(String text, dynamic images, String title, String source, 651 | String author, String notebook) { 652 | Map params = {}; 653 | params[kText] = text; 654 | params[kImages] = images; 655 | params[kTitle] = title; 656 | params[kSource] = source; 657 | params[kAuthor] = author; 658 | params[kNoteBook] = notebook; 659 | int? id = ShareSDKPlatforms.youdaoNote.id; 660 | map["@platform($id)"] = params; 661 | } 662 | 663 | 664 | void setDouyinMixFile(dynamic mixFiles) { 665 | Map params = {}; 666 | params[DOUYIN_MIX_FILE] = mixFiles; 667 | params[kType] = SSDKContentTypes.dy_mixFile.value; 668 | int? id = ShareSDKPlatforms.douyin.id; 669 | map["@platform($id)"] = params; 670 | } 671 | } 672 | -------------------------------------------------------------------------------- /sharesdk_plugin/lib/sharesdk_plugin.dart: -------------------------------------------------------------------------------- 1 | /// Flutter plugin implementing share and auth 2 | /// 3 | /// To use, import `package:sharesdk_plugin/sharesdk_plugin.dart`; 4 | library sharesdk_plugin; 5 | 6 | export './sharesdk_defines.dart'; 7 | export './sharesdk_interface.dart'; 8 | export './sharesdk_map.dart'; 9 | export './sharesdk_register.dart'; 10 | 11 | -------------------------------------------------------------------------------- /sharesdk_plugin/lib/sharesdk_register.dart: -------------------------------------------------------------------------------- 1 | import './sharesdk_defines.dart'; 2 | 3 | class ShareSDKRegister { 4 | static const String _ssdkAppkey = "app_key"; 5 | static const String _ssdkAppId = "app_id"; 6 | static const String _ssdkConsumerKey = "consumer_key"; 7 | static const String _ssdkApikey = "api_key"; 8 | static const String _ssdkClientId = "client_id"; 9 | static const String _ssdkRestApiKey = "rest_api_key"; 10 | static const String _ssdkApplicationId = "application_id"; 11 | static const String _ssdkClientSecret = "client_secret"; 12 | static const String _ssdkConsumerSecret = "consumer_secret"; 13 | static const String _ssdkAppSecret = "app_secret"; 14 | static const String _ssdkSecretKey = "secret_key"; 15 | static const String _ssdkApiSecret = "api_secret"; 16 | static const String _ssdkRedirectUrl = "redirect_uri"; 17 | static const String _ssdkOAuthCallback = "oauth_callback"; 18 | static const String _ssdkDisplayName = "display_name"; 19 | static const String _ssdkSandbox = "sandbox_mode"; 20 | static const String _ssdkAppUniversalLink = "app_universalLink"; 21 | static const String _ssdkclientIdUnsafe = "client_id_unsafe"; 22 | static const String _ssdkOpen_countryList = "open_countryList"; 23 | final Map platformsInfo = Map(); 24 | static const String _ssdkCorp_id = "corp_id"; 25 | static const String _ssdkAgent_id = "agent_id"; 26 | 27 | void setupXHS(String appId, String appUniversalLink) { 28 | Map info = {_ssdkAppId: appId, _ssdkAppUniversalLink: appUniversalLink}; 29 | platformsInfo[ShareSDKPlatforms.xhs.id] = info; 30 | } 31 | 32 | void setupSinaWeibo(String appkey, String appSecret, String redirectUrl, 33 | String universalLink) { 34 | Map info = { 35 | _ssdkAppkey: appkey, 36 | _ssdkAppSecret: appSecret, 37 | _ssdkRedirectUrl: redirectUrl, 38 | _ssdkAppUniversalLink: universalLink 39 | }; 40 | 41 | platformsInfo[ShareSDKPlatforms.sina.id] = info; 42 | } 43 | 44 | void setupWechat(String appId, String appSecret, String appUniversalLink) { 45 | Map info = { 46 | _ssdkAppId: appId, 47 | _ssdkAppSecret: appSecret, 48 | _ssdkAppUniversalLink: appUniversalLink 49 | }; 50 | platformsInfo[ShareSDKPlatforms.wechatSeries.id] = info; 51 | } 52 | 53 | void setupQQ(String appId, String appkey) { 54 | Map info = {_ssdkAppId: appId, _ssdkAppkey: appkey}; 55 | platformsInfo[ShareSDKPlatforms.qqSeries.id] = info; 56 | } 57 | 58 | void setupWework( 59 | String schema, String appKey, String agentId, String appSecret) { 60 | Map info = { 61 | _ssdkAppkey: schema, 62 | _ssdkCorp_id: appKey, 63 | _ssdkAgent_id: agentId, 64 | _ssdkAppSecret: appSecret 65 | }; 66 | 67 | platformsInfo[ShareSDKPlatforms.wework.id] = info; 68 | } 69 | 70 | void setupTwitter( 71 | String consumerKey, String consumerSecret, String redirectUrl) { 72 | Map info = { 73 | _ssdkConsumerKey: consumerKey, 74 | _ssdkConsumerSecret: consumerSecret, 75 | _ssdkRedirectUrl: redirectUrl 76 | }; 77 | 78 | platformsInfo[ShareSDKPlatforms.twitter.id] = info; 79 | } 80 | 81 | void setupFacebook(String appkey, String appSecret, String displayName) { 82 | Map info = { 83 | _ssdkApikey: appkey, 84 | _ssdkAppSecret: appSecret, 85 | _ssdkDisplayName: displayName 86 | }; 87 | 88 | platformsInfo[ShareSDKPlatforms.facebook.id] = info; 89 | } 90 | 91 | void setupSnapchat(String appkey, String appSecret, String redirectUrl) { 92 | Map info = { 93 | _ssdkclientIdUnsafe: appkey, 94 | _ssdkAppSecret: appSecret, 95 | _ssdkRedirectUrl: redirectUrl 96 | }; 97 | 98 | platformsInfo[ShareSDKPlatforms.snapchat.id] = info; 99 | } 100 | 101 | void setupTencentWeibo(String appkey, String appSecret, String redirectUrl) { 102 | Map info = { 103 | _ssdkAppkey: appkey, 104 | _ssdkAppSecret: appSecret, 105 | _ssdkRedirectUrl: redirectUrl 106 | }; 107 | 108 | platformsInfo[ShareSDKPlatforms.tencentWeibo.id] = info; 109 | } 110 | 111 | void setupMingDao(String appKey, String appSecret, String redirectUrl) { 112 | Map info = { 113 | _ssdkAppkey: appKey, 114 | _ssdkAppSecret: appSecret, 115 | _ssdkRedirectUrl: redirectUrl 116 | }; 117 | 118 | platformsInfo[ShareSDKPlatforms.mingDao.id] = info; 119 | } 120 | 121 | void setupYiXin(String appid, String appSecret, String redirectUrl) { 122 | Map info = { 123 | _ssdkAppId: appid, 124 | _ssdkAppSecret: appSecret, 125 | _ssdkRedirectUrl: redirectUrl 126 | }; 127 | 128 | platformsInfo[ShareSDKPlatforms.yixinSeries.id] = info; 129 | } 130 | 131 | void setupEvernote(String consumerKey, String consumerSecret, bool sandbox) { 132 | Map info = { 133 | _ssdkConsumerKey: consumerKey, 134 | _ssdkConsumerSecret: consumerSecret, 135 | _ssdkSandbox: sandbox 136 | }; 137 | platformsInfo[ShareSDKPlatforms.yinXiang.id] = info; 138 | } 139 | 140 | void setupDouBan(String apikey, String appSecret, String redirectUrl) { 141 | Map info = { 142 | _ssdkApikey: apikey, 143 | _ssdkAppSecret: appSecret, 144 | _ssdkRedirectUrl: redirectUrl 145 | }; 146 | 147 | platformsInfo[ShareSDKPlatforms.douBan.id] = info; 148 | } 149 | 150 | void setupKaiXin(String apikey, String appSecret, String redirectUrl) { 151 | Map info = { 152 | _ssdkApikey: apikey, 153 | _ssdkSecretKey: appSecret, 154 | _ssdkRedirectUrl: redirectUrl 155 | }; 156 | 157 | platformsInfo[ShareSDKPlatforms.kaixin.id] = info; 158 | } 159 | 160 | void setupPocket(String consumerKey, String redirectUrl) { 161 | Map info = {_ssdkConsumerKey: consumerKey, _ssdkRedirectUrl: redirectUrl}; 162 | 163 | platformsInfo[ShareSDKPlatforms.pocket.id] = info; 164 | } 165 | 166 | void setupGooglePlus( 167 | String clientId, String clientSecret, String redirectUrl) { 168 | Map info = { 169 | _ssdkClientId: clientId, 170 | _ssdkClientSecret: clientSecret, 171 | _ssdkRedirectUrl: redirectUrl 172 | }; 173 | platformsInfo[ShareSDKPlatforms.googlePlus.id] = info; 174 | } 175 | 176 | void setupInstagram( 177 | String clientId, String clientSecret, String redirectUrl) { 178 | Map info = { 179 | _ssdkClientId: clientId, 180 | _ssdkClientSecret: clientSecret, 181 | _ssdkRedirectUrl: redirectUrl 182 | }; 183 | platformsInfo[ShareSDKPlatforms.instagram.id] = info; 184 | } 185 | 186 | void setupLinkedIn(String apikey, String appSecret, String redirectUrl) { 187 | Map info = { 188 | _ssdkApikey: apikey, 189 | _ssdkSecretKey: appSecret, 190 | "redirect_url": redirectUrl 191 | }; 192 | 193 | platformsInfo[ShareSDKPlatforms.linkedIn.id] = info; 194 | } 195 | 196 | void setupTumblr( 197 | String consumerKey, String consumerSecret, String redirectUrl) { 198 | Map info = { 199 | _ssdkConsumerKey: consumerKey, 200 | _ssdkConsumerSecret: consumerSecret, 201 | "callback_url": redirectUrl 202 | }; 203 | 204 | platformsInfo[ShareSDKPlatforms.tumblr.id] = info; 205 | } 206 | 207 | void setupFlick(String apikey, String apiSecret) { 208 | Map info = {_ssdkApikey: apikey, _ssdkApiSecret: apiSecret}; 209 | 210 | platformsInfo[ShareSDKPlatforms.flickr.id] = info; 211 | } 212 | 213 | void setupYouDao( 214 | String consumerKey, String consumerSecret, String oauthCallback) { 215 | Map info = { 216 | _ssdkConsumerKey: consumerKey, 217 | _ssdkConsumerSecret: consumerSecret, 218 | _ssdkOAuthCallback: oauthCallback 219 | }; 220 | 221 | platformsInfo[ShareSDKPlatforms.youdaoNote.id] = info; 222 | } 223 | 224 | void setupAliSocial(String appId) { 225 | Map info = {_ssdkAppId: appId}; 226 | 227 | platformsInfo[ShareSDKPlatforms.aliSocial.id] = info; 228 | } 229 | 230 | void setupPinterest(String clientId) { 231 | Map info = { 232 | _ssdkClientId: clientId, 233 | }; 234 | 235 | platformsInfo[ShareSDKPlatforms.pinterest.id] = info; 236 | } 237 | 238 | void setupKakao(String appkey, String restApiKey, String redirectUrl) { 239 | Map info = { 240 | _ssdkAppkey: appkey, 241 | _ssdkRestApiKey: restApiKey, 242 | _ssdkRedirectUrl: redirectUrl 243 | }; 244 | 245 | platformsInfo[ShareSDKPlatforms.kakaoSeries.id] = info; 246 | } 247 | 248 | void setupDropbox(String appkey, String appSecret, String oauthCallback) { 249 | Map info = { 250 | _ssdkAppkey: appkey, 251 | _ssdkAppSecret: appSecret, 252 | _ssdkOAuthCallback: oauthCallback 253 | }; 254 | 255 | platformsInfo[ShareSDKPlatforms.dropbox.id] = info; 256 | } 257 | 258 | void setupVKontakte(String applicationId, String secretKey) { 259 | Map info = {_ssdkApplicationId: applicationId, _ssdkSecretKey: secretKey}; 260 | platformsInfo[ShareSDKPlatforms.vKontakte.id] = info; 261 | } 262 | 263 | void setupInstapaper(String consumerKey, String consumerSecret) { 264 | Map info = { 265 | _ssdkConsumerKey: consumerKey, 266 | _ssdkConsumerSecret: consumerSecret 267 | }; 268 | 269 | platformsInfo[ShareSDKPlatforms.instapaper.id] = info; 270 | } 271 | 272 | void setupDingTalk(String appId) { 273 | Map info = {_ssdkAppId: appId}; 274 | 275 | if (platformsInfo[ShareSDKPlatforms.dingding.id] == null) { 276 | platformsInfo[ShareSDKPlatforms.dingding.id] = info; 277 | } else { 278 | Map param = platformsInfo[ShareSDKPlatforms.dingding.id]; 279 | info.addEntries(param.entries); 280 | platformsInfo[ShareSDKPlatforms.dingding.id] = info; 281 | } 282 | } 283 | 284 | void setupDingTalkAuth(String appId, String appSecret, String redirectUrl) { 285 | Map info = { 286 | "auth" + _ssdkAppId: appId, 287 | "auth" + _ssdkAppSecret: appSecret, 288 | "auth" + _ssdkRedirectUrl: redirectUrl 289 | }; 290 | 291 | if (platformsInfo[ShareSDKPlatforms.dingding.id] == null) { 292 | platformsInfo[ShareSDKPlatforms.dingding.id] = info; 293 | } else { 294 | Map param = platformsInfo[ShareSDKPlatforms.dingding.id]; 295 | info.addEntries(param.entries); 296 | platformsInfo[ShareSDKPlatforms.dingding.id] = info; 297 | } 298 | } 299 | 300 | void setupMeiPai(String appkey) { 301 | Map info = {_ssdkAppkey: appkey}; 302 | platformsInfo[ShareSDKPlatforms.meiPai.id] = info; 303 | } 304 | 305 | void setupYouTube(String clientId, String clientSecret, String redirectUrl) { 306 | Map info = { 307 | _ssdkClientId: clientId, 308 | _ssdkClientSecret: clientSecret, 309 | _ssdkRedirectUrl: redirectUrl 310 | }; 311 | 312 | platformsInfo[ShareSDKPlatforms.youtube.id] = info; 313 | } 314 | 315 | void setupTelegram(String botToken, String botDomain) { 316 | Map info = {"bot_token": botToken, "bot_domain": botDomain}; 317 | platformsInfo[ShareSDKPlatforms.telegram.id] = info; 318 | } 319 | 320 | void setupReddit(String appkey, String redirectUrl) { 321 | Map info = {_ssdkAppkey: appkey, _ssdkRedirectUrl: redirectUrl}; 322 | platformsInfo[ShareSDKPlatforms.reddit.id] = info; 323 | } 324 | 325 | void setupDouyin(String appkey, String appSecret) { 326 | Map info = {_ssdkAppkey: appkey, _ssdkAppSecret: appSecret}; 327 | 328 | platformsInfo[ShareSDKPlatforms.douyin.id] = info; 329 | } 330 | 331 | void setupKuaiShou(String appkey, String appSecret, String appUniversalLink) { 332 | Map info = { 333 | _ssdkAppId: appkey, 334 | _ssdkAppSecret: appSecret, 335 | _ssdkAppUniversalLink: appUniversalLink 336 | }; 337 | 338 | platformsInfo[ShareSDKPlatforms.kuaishou.id] = info; 339 | } 340 | 341 | void setupTikTok(String appkey, String appSecret) { 342 | Map info = { 343 | _ssdkAppkey: appkey, 344 | _ssdkAppSecret: appSecret, 345 | }; 346 | 347 | platformsInfo[ShareSDKPlatforms.tiktok.id] = info; 348 | } 349 | 350 | void setupOasis(String appkey) { 351 | Map info = {_ssdkAppkey: appkey}; 352 | platformsInfo[ShareSDKPlatforms.oasis.id] = info; 353 | } 354 | 355 | void setupSMS(bool openCountryList) { 356 | Map info = {_ssdkOpen_countryList: openCountryList}; 357 | platformsInfo[ShareSDKPlatforms.sms.id] = info; 358 | } 359 | } 360 | -------------------------------------------------------------------------------- /sharesdk_plugin/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: sharesdk_plugin 2 | description: ShareSDK is a social sharing component that provides social functions for apps, like authorization and share, and has social statistical analysis management background. 3 | version: 1.3.16 4 | homepage: http://www.mob.com/mobService/sharesdk 5 | 6 | environment: 7 | sdk: ">=2.12.0 <3.0.0" 8 | flutter: ">=1.12.0" 9 | dependencies: 10 | flutter: 11 | sdk: flutter 12 | 13 | dev_dependencies: 14 | flutter_test: 15 | sdk: flutter 16 | 17 | flutter: 18 | plugin: 19 | platforms: 20 | android: 21 | package: com.mob.flutter.sharesdk 22 | pluginClass: SharesdkPlugin 23 | ios: 24 | pluginClass: SharesdkPlugin 25 | 26 | false_secrets: 27 | - example/android/MobSDK.gradle 28 | 29 | -------------------------------------------------------------------------------- /sharesdk_plugin/test/sharesdk_plugin_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/services.dart'; 2 | import 'package:flutter_test/flutter_test.dart'; 3 | // import 'package:sharesdk_plugin/sharesdk_plugin.dart'; 4 | 5 | void main() { 6 | const MethodChannel channel = MethodChannel('sharesdk_plugin'); 7 | 8 | setUp(() { 9 | channel.setMockMethodCallHandler((MethodCall methodCall) async { 10 | return '42'; 11 | }); 12 | }); 13 | 14 | tearDown(() { 15 | channel.setMockMethodCallHandler(null); 16 | }); 17 | 18 | // test('getPlatformVersion', () async { 19 | // expect(await SharesdkPlugin.platformVersion, '42'); 20 | // }); 21 | } 22 | --------------------------------------------------------------------------------