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

feat: Support finding an unprefixed Info.plist file #212

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

dpogue
Copy link
Member

@dpogue dpogue commented Aug 23, 2024

Platforms affected

iOS

Motivation and Context

Currently the Info.plist file in a generated iOS project is prefixed with the project name (i.e., HelloCordova-Info.plist), and plugins have to set up their config-file/edit-config directives to use wildcards like **/*-Info.plist.

The standard way for Xcode projects is to just have Info.plist in the project, and this gets us one step closer to supporting that.

Description

  • Try to find an unprefixed Info.plist, falling back to the AppName-Info.plist
  • Cache the result of the Xcodeproj name to avoid repeated globs
  • Streamline plist loading to avoid reading the file twice
    • This allows us to drop the read-chunks dependency in next major

Testing

Added a new test for the Info.plist behaviour. All existing tests pass.

Checklist

  • I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change

@codecov-commenter
Copy link

codecov-commenter commented Aug 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.70%. Comparing base (24f7fa2) to head (49e3f4c).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #212      +/-   ##
==========================================
+ Coverage   88.40%   88.70%   +0.30%     
==========================================
  Files          20       20              
  Lines        1147     1160      +13     
==========================================
+ Hits         1014     1029      +15     
+ Misses        133      131       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

spec/ConfigChanges/ConfigFile.spec.js Outdated Show resolved Hide resolved
spec/ConfigChanges/ConfigFile.spec.js Outdated Show resolved Hide resolved
spec/ConfigChanges/ConfigFile.spec.js Outdated Show resolved Hide resolved
src/ConfigChanges/ConfigFile.js Outdated Show resolved Hide resolved
Copy link
Contributor

@breautek breautek left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Member

@erisu erisu left a comment

Choose a reason for hiding this comment

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

Changes LGTM

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.

4 participants