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
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.
shareToTiktokPost iOS function updated to support a list of images and videos according to TikTok iOS DocsNotes: 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.
Example project updated to show how to use each social share feature.
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 afilePath
which can only point to an image, otherwise app would crash with the following logs:What this PR contains
shareToFacebook
function updated to support a list of images and videos according to Facebook iOS Docs and Android Docs. Note: I kept the currnetfilePath
param for backward compatibility but I marked it as@Deprecated()
to be removed in later versions.shareToTiktokPost
iOS function updated to support a list of images and videos according to TikTok iOS Docs Notes: I kept the currnetvideoPath
param for backward compatibility but I marked it as@Deprecated()
to be removed in later versions. This TikTok feature may need some more work.