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

Open
blimmer opened this issue Feb 2, 2024 · 2 comments
Open

Publish a Carthage-compatible xcframework #3493

blimmer opened this issue Feb 2, 2024 · 2 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

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.

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

2 participants