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

Should we build dependencies as static and link them to the Core target to improve launch times? #16

Open
n8chur opened this issue Nov 14, 2018 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@n8chur
Copy link
Owner

n8chur commented Nov 14, 2018

This should increase application launch times significantly as the number of dependencies increases.

In theory this should be as easy as:

  1. Write a script that creates a temporary.xcconfig file that contains MACH_O_TYPE = staticlib and then $ export XCODE_XCCONFIG_FILE="$xcconfig" before running carthage build
  2. In the project.yml reference the dependency file directly with framework: Carthage/Build/iOS/Static/XXX.framework of carthage: xxx
  3. Add -all_load to the Core target's OTHER_LDFLAGS build setting (OTHER_LDFLAGS = $(inherited) -all_load in the Core target's .xcconfig)
@n8chur n8chur added the question Further information is requested label Nov 14, 2018
@n8chur
Copy link
Owner Author

n8chur commented Nov 15, 2018

I started working on this on the static-core branch.

@n8chur n8chur changed the title Should we use a static framework to import as many dependencies as possible? Should we build dependencies as static and link them to the Core target to improve launch times? Nov 15, 2018
@n8chur
Copy link
Owner Author

n8chur commented Nov 15, 2018

I'm not seeing an improvement in launch times. I'll have to try this again once more dependencies are added.

@n8chur n8chur self-assigned this Nov 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant