aws-amplify/aws-sdk-ios

Install statically via SPM

iwwwh opened this issue · 5 comments

Describe the bug
Hi,

As I can see, there is no way to install AWS SDK as a static library using SPM. It always being installed as a dynamic framework (.framework). It negatively affects application launch time, and in general not an optimal/recommended approach, we have like 30 different dependencies, and the issue is only with AWS SDK.

Could you please tell if there is any workarounds? What can we do?

Thanks.

To Reproduce
Steps to reproduce the behavior:

  1. Install AWS SDK using SPM.
  2. Add any components to a target, S3 for example
  3. Build the project and see that S3 being bundled as .framework

Observed Behavior
AWS SDK being installed as a dynamic framework.

Expected Behavior
AWS SDK being installed as a static library.

Areas of the SDK you are using (AWSMobileClient, Cognito, Pinpoint, IoT, etc)?
AWS SDK, specifically S3

Environment(please complete the following information):

  • SDK Version: latest
  • Dependency Manager: SPM
  • Swift Version : 5.x
  • Xcode Version: 15.4

The only option I can think of to integrate AWS SDK statically is to manually drag & drop SDK source code files to a project, but I can’t find any information on that. I’ll appreciate if someone could clarify on how to do that properly.

Our goal is to integrate S3 only. Is it enough to just drag & drop AWSCore and AWSS3 folders to our project? Or does it require any additional configuration? Can it be normally used in Swift project in that way?

Thanks.

This is the only way we were able to come SPM. (https://github.com/aws-amplify/aws-sdk-ios-spm/)

Our goal is to integrate S3 only. Is it enough to just drag & drop AWSCore and AWSS3 folders to our project?

It might be more than that. We haven't recommended this approach to anyone before.


You could try the new Swift SDK (https://github.com/awslabs/aws-sdk-swift/) that is also used by Amplify.

Hi @harsh62

thanks for your response.

As I see, Swift SDK is in developer preview and is iOS 13+ only. I guess it can be a reasonable option but a little later for our case.

Are you sure that it can not be integrated by just dragging source code files and configuring bridging header properly? We are interested in S3 only, so most probably it should be 2 folders only (Core and S3).

Or perhaps any other options how to integrate the SDK statically?

Are you sure that it can not be integrated by just dragging source code files and configuring bridging header properly?

I haven't tried this personally, so don't know for sure. This is something you can definitely try and update the thread with your findings.

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.