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
Ensuring Library search paths and Swift import paths are set #308
Ensuring Library search paths and Swift import paths are set #308
Conversation
Generated by 🚫 Danger |
- A few additional build settings are needed when linking against pre-built static libraries - `LIBRARY_SEARCH_PATHS` needs to point to the directory containing the `.a` file - `SWIFT_INCLUDE_PATHS` need to point to the directory containing the `.swiftmodule` file Test Plan: - Generate `fixtures/ios_app_with_static_libraries` - Verify the application builds - Verify the `LIBRARY_SEARCH_PATHS` and `SWIFT_INCLUDE_PATHS` settings are set on target `A`
06a24ca
to
3de69de
Compare
@@ -266,3 +292,13 @@ final class LinkGenerator: LinkGenerating { | |||
pbxTarget.buildPhases.append(buildPhase) | |||
} | |||
} | |||
|
|||
private extension XCBuildConfiguration { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd move to xcodeproj
(the library) and make it public. I think it's a method more developers could benefit from.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 will submit a separate PR to xcodeproj for this, it would need to be beefed up a bit further as here we only deal with space separated string settings, however other use cases may contain array of strings.
The CI failed due to deleting a workspace file that was accidentally checked in - raised #309 |
Good catch 👏 |
- added a `build.sh` helper script to allow re-creating the static library if needed
Codecov Report
@@ Coverage Diff @@
## master #308 +/- ##
==========================================
+ Coverage 89.18% 89.32% +0.13%
==========================================
Files 276 276
Lines 10474 10591 +117
==========================================
+ Hits 9341 9460 +119
+ Misses 1133 1131 -2
Continue to review full report at Codecov.
|
raised tuist/XcodeProj#395 re: xcodeproj helper |
Resolves #256
Short description 📝
A few additional build settings are needed when linking against pre-built static libraries
LIBRARY_SEARCH_PATHS
needs to point to the directory containing the.a
fileSWIFT_INCLUDE_PATHS
need to point to the directory containing the.swiftmodule
fileSolution 📦
Implementation 👩💻👨💻
Test Plan ⚒
Test Plan:
fixtures/ios_app_with_static_libraries
LIBRARY_SEARCH_PATHS
andSWIFT_INCLUDE_PATHS
settings are set on targetA