Creme Share 插件
一个 Flutter 插件,用于将内容从您的 Flutter 应用分享到社交应用。
平台支持
| Android (开发中) | iOS |
|---|---|
| ❌ | ✔️ |
用法
要使用此插件,请将 creme_share 添加到您的 pubspec.yaml 文件中作为依赖项。
creme_sharing:
git:
url: https://github.com/creme-tech/creme-sharing.git
ref: <commit id or branch name>
初始要求
以下是您的应用在使用 awesome_notifications 时必须满足的强制性要求
Android
WIP
iOS
您需要在 info.plist 文件中添加两个字段
- 列出 Facebook 的自定义 URL 方案 只需在
info.plist中添加以下文本即可
...
<key>LSApplicationQueriesSchemes</key>
<array>
<string>instagram</string>
<string>instagram-stories</string>
</array>
...
- 在
info.plist中添加 NSPhotoLibraryUsageDescription 字段,看起来像这样
...
<key>NSPhotoLibraryUsageDescription</key>
<string>for storage temporary images before share to Instagram</string>
...
您可以在 commit fab7671f21ed8eb8998c589b7423dbc36374da82 的示例应用中看到此配置。
示例应用
通过以下示例,您可以了解 Creme Sharing 的所有功能以及如何在您的应用中使用它。
https://github.com/creme-tech/creme-sharing/tree/main/example 包含所有可用功能的完整示例
要运行 示例,请按照以下步骤操作
- 将 项目 克隆到您的本地计算机
- 使用 Android Studio 或任何其他 IDE 打开 项目
- 通过运行
flutter pub get来同步 项目 依赖项 - 在 iOS 上,运行
pod install来同步原生依赖项 - 使用真实设备或模拟器调试应用程序