appinioGmbH / flutter_packages

Dart and Flutter plugins/packages used and maintained by @appinioGmbH
187 stars 214 forks source link

[appinio_social_share] Bugs fixed and made some improvements #96

Closed luis901101 closed 1 year ago

luis901101 commented 1 year ago

First of all, thanks for this great plugin.

Preamble

In the latest version of appinio_social_share: ^0.2.2 the shareToFacebook feature is limited to share only one image, the function expects a filePath which can only point to an image, otherwise app would crash with the following logs:

appinio_social_share/ShareUtil.swift:322: Fatal error: Unexpectedly found nil while unwrapping an Optional value
appinio_social_share/ShareUtil.swift:322: Fatal error: Unexpectedly found nil while unwrapping an Optional value
* thread #1, queue = 'com.apple.main-thread', stop reason = Fatal error: Unexpectedly found nil while unwrapping an Optional value
    frame #0: 0x00000001c202d23c libswiftCore.dylib`_swift_runtime_on_report
libswiftCore.dylib`:
->  0x1c202d23c <+0>: ret    
libswiftCore.dylib`:
    0x1c202d240 <+0>: b      0x1c202d23c               ; _swift_runtime_on_report
libswiftCore.dylib`:
    0x1c202d244 <+0>: adrp   x8, 366040
    0x1c202d248 <+4>: ldrb   w0, [x8, #0x994]
Target 0: (FLCKN) stopped.
Lost connection to device.

What this PR contains

  1. shareToFacebook function updated to support a list of images and videos according to Facebook iOS Docs and Android Docs. Note: I kept the currnet filePath param for backward compatibility but I marked it as @Deprecated() to be removed in later versions.
  2. shareToTiktokPost iOS function updated to support a list of images and videos according to TikTok iOS Docs Notes: I kept the currnet videoPath param for backward compatibility but I marked it as @Deprecated() to be removed in later versions. This TikTok feature may need some more work.
  3. Example project updated to show how to use each social share feature.
luis901101 commented 1 year ago

Hi, at least the bugs mentioned in the PR got fixed?