阅读背景:

Amazon AWS SDK使用Swift和Perfect吗?

来源:互联网 

Is it possible to leverage the Amazon Web Services SDK for iOS in a server-side Swift app developed using the Perfect framework? I'd like to be able to deploy my Perfect app to AWS and make calls to DynamoDB, S3, etc. from the app. However, I haven't found any examples showing if that is even possible. Can the AWS SDK be used server-side, even though it says "for iOS"? Does it support the Swift Package Manager, which Perfect seems to use for integrating with 3rd party libraries? If not, does Perfect support CocoaPods for dependency management?

是否有可能在使用完美框架开发的服务器端Swift应用程序中利用Amazon Web Services SDK实现iOS ?我希望能够将我的完美应用程序部署到AWS上,并从应用程序中调用DynamoDB、S3等等。但是,我还没有找到任何可以显示这一功能的例子。AWS SDK是否可以在服务器端使用,即使它说“for iOS”?它是否支持Swift包管理器,它似乎用于与第三方库集成?如果没有,那么完美的产品是否支持依赖管理?

If what I'm attempting feasible, or would I have to write my own integration code using Amazon's RESTful services directly?

如果我正在尝试的是可行的,或者我必须直接使用Amazon的RESTful服务编写我自己的集成代码吗?

2 个解决方案

#1


1  

"Original" AWS library does not support Swift Package Manager in that moment, and also uses some Obj-c code (as far as I know), so you can't use it on linux. But there is feature suggestion, so maybe it would be there in future

“原始”AWS库当时不支持Swift包管理器,而且还使用了一些object -c代码(据我所知),所以您不能在linux上使用它。但是有一些特性建议,所以可能将来会有

Now you can use AWS services with that library: https://github.com/noppoMan/aws-sdk-swift though its a bit hacky :)

现在,您可以使用AWS服务来使用这个库:https://github.com/noppoMan/aws-sdk-swift,尽管有点陈腐:)

I use that one in my current projects and it's look like all the basic needs are implemented :)

我在目前的项目中使用了这个,看起来所有的基本需求都实现了:)

#2


0  

As far as I know, you would probably using Perfect-CURL to perform such tasks; Perfect-MySQL supports RDS, however, you can easily add all SPM compatible 3rd party components as many as need, just edit Package.swift to include; a better idea is to user Perfect Assistant to safely import different components and quickly build / test & deploy to AWS EC2: https://www.perfect.org/en/assistant/

据我所知,您可能会使用完美旋度来执行这样的任务;完全mysql支持RDS,但是,您可以轻松地添加所有SPM兼容的第三方组件,只需编辑包即可。包括迅速;更好的办法是让用户完美的助手安全地导入不同的组件,并快速构建/测试并部署到AWS EC2: https://www.perfect.org/en/assistant/。

About Perfect-CURL, there are many examples about Server Side Operations, such as https://github.com/PerfectExamples/Perfect-Cloudinary-ImageUploader-Demo which contains how to generate a digital signature in posting files,

关于完美curl,有很多关于服务器端操作的例子,比如https://github.com/perfectexamples/perfectcloudin-imageuploader - demo,它包含了如何在发布文件中生成数字签名,

also https://github.com/PerfectServers/SlackBot with curling API

还有https://github.com/PerfectServers/SlackBot,与冰壶API


分享到: