Skip to content

Fix path retrieval for cordova-ios 8.x#964

Merged
dpa99c merged 2 commits into
dpa99c:masterfrom
artlogic:patch-1
Feb 2, 2026
Merged

Fix path retrieval for cordova-ios 8.x#964
dpa99c merged 2 commits into
dpa99c:masterfrom
artlogic:patch-1

Conversation

@artlogic
Copy link
Copy Markdown

@artlogic artlogic commented Nov 25, 2025

Update getXcodeProjectPath to support cordova-ios 8.x.

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Documentation changes
  • Other... Please describe:

PR Checklist

Please check your PR fulfills the following requirements:

Bugfixes:

  • Regression testing has been carried out using the example project to ensure the intended bug is fixed and no regression bugs have been inadvertently introduced.

What is the purpose of this PR?

This plugin does not work with cordova-ios 8.x - this change should resolve that.

Does this PR introduce a breaking change?

  • Yes
  • No

What testing has been done on the changes in the PR?

Verified the new path is used when it exists.

What testing has been done on existing functionality?

Verified the old path is used in cordova-ios 7.x

Summary by CodeRabbit

  • Bug Fixes
    • Improved iOS build compatibility by preferring the modern Cordova iOS project layout when present and automatically falling back to the legacy layout, ensuring builds succeed across older and newer Cordova iOS setups.

✏️ Tip: You can customize this high-level summary in your review settings.

Update getXcodeProjectPath to support cordova-ios 8.x.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Nov 25, 2025

Walkthrough

The iOS helper's getXcodeProjectPath now computes both the legacy app-named Xcode project path and the Cordova iOS 8+ App.xcodeproj path, returning the newer path when present and falling back to the legacy path otherwise.

Changes

Cohort / File(s) Change Summary
iOS path compatibility
scripts/ios/helper.js
getXcodeProjectPath now builds two candidate paths—legacy (platforms/ios/<AppName>.xcodeproj/project.pbxproj) and new (platforms/ios/App.xcodeproj/project.pbxproj)—and returns the new path if it exists, otherwise falls back to the legacy path.

Sequence Diagram(s)

sequenceDiagram
  participant Caller as Script Caller
  participant Helper as ios/helper.getXcodeProjectPath
  participant FS as Filesystem

  Caller->>Helper: request Xcode project path
  Helper->>FS: check existence of "platforms/ios/App.xcodeproj/project.pbxproj"
  alt new path exists
    FS-->>Helper: exists
    Helper-->>Caller: return new path
  else new path missing
    Helper->>FS: check existence of "platforms/ios/<AppName>.xcodeproj/project.pbxproj"
    alt legacy path exists
      FS-->>Helper: exists
      Helper-->>Caller: return legacy path
    else none found
      FS-->>Helper: not found
      Helper-->>Caller: return legacy path (as fallback) / or undefined
    end
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Single small file change adjusting path resolution.
  • Areas to check:
    • Correct construction of both path strings (escaping/app name injection).
    • Use of filesystem existence checks and returned value when neither exists.
    • Any callers that assume previously always-returned legacy path behavior.

Poem

🐰 A hop between roots old and new,
I sniff for "App", then look for you,
If modern's found I cheer and sway,
If not, the old road shows the way,
Little rabbit, code at play. 🥕

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title accurately describes the main change: fixing path retrieval to support cordova-ios 8.x, which matches the core modification in getXcodeProjectPath().
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 63eb1ba and b2551d1.

📒 Files selected for processing (1)
  • scripts/ios/helper.js (1 hunks)
🧰 Additional context used
🪛 Biome (2.1.2)
scripts/ios/helper.js

[error] 71-71: expected ( but instead found fs

Remove fs

(parse)


[error] 71-71: expected ) but instead found {

Remove {

(parse)

Comment thread scripts/ios/helper.js
Comment thread scripts/ios/helper.js Outdated
@artlogic artlogic changed the title Enhance Xcode project path retrieval logic Fix path retrieval for cordova-ios 8.x Nov 25, 2025
conradlz added a commit to swapnice/cordova-plugin-firebasex that referenced this pull request Jan 3, 2026
@artlogic
Copy link
Copy Markdown
Author

artlogic commented Feb 1, 2026

@dpa99c Anything holding this up from being committed and released? This is causing problems for anyone using iOS engine 8.x.

@dpa99c dpa99c merged commit fe6f3e6 into dpa99c:master Feb 2, 2026
1 check passed
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