Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish a Carthage-compatible xcframework #3493

Closed
blimmer opened this issue Feb 2, 2024 · 4 comments
Closed

Publish a Carthage-compatible xcframework #3493

blimmer opened this issue Feb 2, 2024 · 4 comments
Labels
build Issues related to build and CI/CD feature-request Request a new feature

Comments

@blimmer
Copy link

blimmer commented Feb 2, 2024

Is your feature request related to a problem? Please describe.

We use fastlane to build our application on a CircleCI macos.m1.large.gen1 executor. Compiling the amplify-swift package alone with a cold cache takes around 3 minutes 40 seconds.

Caching SPM packages is challenging because the built packages are stored in the DerivedData folder, and developing a reliable cache-busting technique is not straightforward.

Describe the solution you'd like

If this package provided a prebuilt xcframework, we could use a tool like Carthage to pull the prebuilt framework instead of building it ourselves.

Another project in your GitHub organization, https://github.com/aws-amplify/aws-sdk-ios, already publishes a Carthage-compatible xcframework file to each Github Release (e.g., https://github.com/aws-amplify/aws-sdk-ios/releases/tag/2.33.8):

Screenshot_2024-02-02_at_08_54_11

Following a similar process for this package would significantly improve our user experience by reducing compile times.

Describe alternatives you've considered

I have tried using Carthage to produce an archive, but have run into problems.

# Cartfile
github "aws-amplify/amplify-swift" ~>2.25.3

But when I run carthage update, I receive a build-time error:

/Users/blimmer/MY_REPO/Carthage/Checkouts/amplify-swift/AmplifyTools/AmplifyXcode/AmplifyXcode.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 12.0 to 17.2.99. (in target 'ProjectSpec' from project 'AmplifyXcode')

I'm not a seasoned iOS developer, so I'm not sure how/if I could work around this issue. A Github Code Search for people using Carthage with this package makes me think that others have not been able to make this work either. To be clear, I'm not looking for support on Carthage in this forum, I'm just providing context on what other steps I've tried.

Is the feature request related to any of the existing Amplify categories?

No response

Additional context

@phantumcode mentioned in #3015 (comment) that xcframeworks was not a viable distribution method for this repository. However, since a related project, the AWS SDK for iOS has implemented this behavior since 2021 (see aws-amplify/aws-sdk-ios#3348 (comment)), I wanted to bring this up again for discussion.

@thisisabhash thisisabhash added build Issues related to build and CI/CD feature-request Request a new feature labels Feb 2, 2024
Copy link
Contributor

github-actions bot commented Feb 2, 2024

This has been identified as a feature request. If this feature is important to you, we strongly encourage you to give a 👍 reaction on the request. This helps us prioritize new features most important to you. Thank you!

@thisisabhash
Copy link
Member

Thank you for posting this. Our team will discuss and post updates here.

@sebaland
Copy link
Contributor

sebaland commented Nov 1, 2024

After doing research and discussions with the team, we concluded that distributing the Amplify Library for Swift as an XCFramework is not feasible at the moment, mostly due to the existing limitations when classes and modules share the same name and the significant effort it would take to work around that.

The mentioned AWS SDK for iOS is a completely different product that is mostly self contained, unlike Amplify which has other dependencies that would need to be handled as well.

@sebaland sebaland closed this as not planned Won't fix, can't repro, duplicate, stale Nov 1, 2024
Copy link
Contributor

github-actions bot commented Nov 1, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues related to build and CI/CD feature-request Request a new feature
Projects
None yet
Development

No branches or pull requests

3 participants