[英]Creating a shared link to file using SwiftyDropbox
While trying to use Dropbox SwiftyDropbox for creating a shared link for my file I always get the error: 尝试使用Dropbox SwiftyDropbox为我的文件创建共享链接时,我总是收到错误消息:
Bad Input: Error in call to API function "sharing/create_shared_link": request body: could not decode input as JSON
I have created an App Folder and I can successfully write files to my Dropbox. 我已经创建了一个应用程序文件夹,并且可以成功将文件写入我的Dropbox。 All attempts on calling the methods in
Dropbox.authorizedClient!.sharing
generate this error. 尝试调用
Dropbox.authorizedClient!.sharing
的方法的所有尝试Dropbox.authorizedClient!.sharing
生成此错误。 Does anyone have any idea to why? 有谁知道为什么吗?
This is a known issue in SwiftyDropbox 2.0.3, and I can reproduce the error output you get using 2.0.3. 这是SwiftyDropbox 2.0.3中的一个已知问题,我可以重现使用2.0.3得到的错误输出。 The same code works properly for me in 2.0.2 though.
相同的代码在2.0.2中对我来说正常工作。 I would double check that you downgraded to 2.0.2 successfully.
我会再次检查您是否成功降级到2.0.2。 For example, either of these specs will give you 2.0.3:
例如,以下任一规范将为您提供2.0.3:
platform :ios, '8.0'
use_frameworks!
pod 'SwiftyDropbox'
or 要么
platform :ios, '8.0'
use_frameworks!
pod 'SwiftyDropbox', '~> 2.0.2'
Instead, you can explicitly specify 2.0.2 as such for now: 相反,您现在可以显式指定2.0.2:
platform :ios, '8.0'
use_frameworks!
pod 'SwiftyDropbox', '2.0.2'
Then, run pod update
to get that version. 然后,运行
pod update
以获取该版本。 The output from pod update
will indicate what version was used. pod update
的输出将指示所使用的版本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.