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: move public into iOS target directory #4002

Merged
merged 6 commits into from
Jan 8, 2021
Merged

fix: move public into iOS target directory #4002

merged 6 commits into from
Jan 8, 2021

Conversation

imhoffd
Copy link
Contributor

@imhoffd imhoffd commented Dec 31, 2020

The public directory, which contains generated web assets, should exist alongside the generated capacitor.config.json within the iOS target directory, not the Xcode workspace directory.

TODO:

  • Add migration steps to upgrade guide.
  • Add a check for old pbxproj and link to upgrade guide.
  • Update these docs

@imhoffd imhoffd changed the title fix: move public into target directory, not project fix: make public a child directory of the iOS target, not the Xcode project Dec 31, 2020
@imhoffd imhoffd changed the title fix: make public a child directory of the iOS target, not the Xcode project fix: move public into iOS target directory Jan 2, 2021
Copy link
Member

@jcesarmobile jcesarmobile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

the .gitignore change for existing apps should be documented

also the native iOS project change, I find this one more problematic and easier to miss and can lead to a lot of users not knowing why their file changes don't get updated after the migration

should the CLI remove the existing ios/app/public folder? or should also be documented that users need to remove it?

@imhoffd
Copy link
Contributor Author

imhoffd commented Jan 7, 2021

The CLI should probably continue to support ios/app/public, warning the user during every sync to migrate with a link to the migration guide. When they delete the folder we can assume they made the project changes and start writing to the new location. Will that work?

@jcesarmobile
Copy link
Member

since the public folder is gitignored, there can be the case that an user downloads the project and the folder is not there so the CLI thinks the migration was done, but it wasn't

maybe make the CLI check the project.pbxproj to see if the path = public; sourceTree = SOURCE_ROOT; was updated to path = public; sourceTree = "<group>"; and if not, copy to the old location?

@imhoffd
Copy link
Contributor Author

imhoffd commented Jan 7, 2021

Good point.

maybe make the CLI check the project.pbxproj

Yeah, should be possible. 👍

@imhoffd imhoffd marked this pull request as draft January 7, 2021 18:42
@imhoffd imhoffd marked this pull request as ready for review January 8, 2021 20:06
@imhoffd imhoffd added this to the 3.0.0-beta milestone Jan 8, 2021
@imhoffd imhoffd merged commit 4f41296 into main Jan 8, 2021
@imhoffd imhoffd deleted the move-public branch January 8, 2021 21:43
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.

3 participants