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

Fix public headers path for ObjC SwiftPM target #205

Merged
merged 3 commits into from
Dec 3, 2021

Conversation

master-nevi
Copy link
Contributor

@master-nevi master-nevi commented Dec 1, 2021

publicHeadersPath is relative to the path parameter. Without this change, no headers are exposed for consuming libraries and apps to use. I tested this in a sample project to verify. We may want to consider adding demo apps for the two swift package libraries to ensure this can't happen again.

@master-nevi
Copy link
Contributor Author

cc @chiahsien

@chiahsien
Copy link
Owner

We may want to consider adding demo apps for the two swift package libraries to ensure this can't happen again.

Good idea!
I'm trying to use local SPM in demo apps but can't figure out a correct way to do that. Do you know how to do it? @master-nevi

@master-nevi
Copy link
Contributor Author

master-nevi commented Dec 2, 2021

Sure @chiahsien, do you want that in this PR or a separate PR?

@chiahsien
Copy link
Owner

In this same PR would be fine, thank you @master-nevi !

@master-nevi
Copy link
Contributor Author

master-nevi commented Dec 2, 2021

Hi @chiahsien . I figured you'd want to use the same demo apps if possible to avoid having a whole other set of sample code and xcode projects to maintain. So I just created a new target in each of the two demo projects that consumes the Swift Package and re-uses the demo-app code. There are no changes to the original targets. I separated this task out into two commits, one for the Objective-C demo app and one for the Swift demo app so it's easier to see the changes:

Screen Shot 2021-12-02 at 1 06 13 PM Screen Shot 2021-12-02 at 1 06 04 PM

Just to be sure, I tested the current Package.swift and got an error (which is expected) from the CI:
Screen Shot 2021-12-02 at 12 43 27 PM

My update to the Package.swift fixes the error above.

@chiahsien
Copy link
Owner

LGTM! Thanks a lot for your help @master-nevi 👍

@chiahsien chiahsien merged commit f05ed60 into chiahsien:develop Dec 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants