Skip to content

chore(ios): default to RocketChat scheme by renaming workspace and project#7433

Open
diegolmello wants to merge 2 commits into
developfrom
holistic-picture
Open

chore(ios): default to RocketChat scheme by renaming workspace and project#7433
diegolmello wants to merge 2 commits into
developfrom
holistic-picture

Conversation

@diegolmello

@diegolmello diegolmello commented Jun 25, 2026

Copy link
Copy Markdown
Member

Proposed changes

The experimental multi-scheme setup was removed from the iOS project, leaving RocketChatRN as a scheme that no longer exists. Despite that, react-native run-ios (and the pnpm ios script that wraps it) still inferred RocketChatRN as the default scheme and failed with:

error Could not load the shared scheme for RocketChatRN.

The React Native CLI does not read the workspace name directly. It selects the alphabetically-greatest .xcworkspace/.xcodeproj in ios/, then infers the scheme from that file's basename. Because RocketChat is a prefix of RocketChatRN, no RocketChat.xcworkspace can ever sort ahead of RocketChatRN.xcodeproj — so renaming the workspace alone is not enough: the CLI would select the bare project (bypassing CocoaPods) and still infer the dead RocketChatRN scheme.

Renaming both the workspace and the Xcode project to RocketChat makes RocketChat the intrinsic, flag-free default for every RN CLI invocation. No --scheme flag is added to the pnpm script.

Changes:

  • RocketChatRN.xcworkspaceRocketChat.xcworkspace
  • RocketChatRN.xcodeprojRocketChat.xcodeproj
  • Updated the workspace file reference and all scheme ReferencedContainers to container:RocketChat.xcodeproj
  • Pinned the generated workspace name with workspace 'RocketChat' in the Podfile
  • Pointed the build and build_simulator Fastlane lanes at RocketChat.xcworkspace
  • Removed the dead build_fork Fastlane lane (no longer referenced anywhere)

The iOS source folder (ios/RocketChatRN/) and the target/product names (Rocket.Chat, Rocket.Chat.app) are unchanged.

Issue(s)

https://rocketchat.atlassian.net/browse/NATIVE-1341

How to test or reproduce

  1. pnpm pod-install
  2. pnpm ios --simulator "iPhone 16 Pro"

The app builds and launches with no --scheme flag. The CLI logs Found Xcode workspace "RocketChat.xcworkspace" and builds with -workspace RocketChat.xcworkspace -scheme RocketChat.

Screenshots

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves a current function)
  • New feature (non-breaking change which adds functionality)
  • Documentation update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if applicable)
  • I have added necessary documentation (if applicable)
  • Any dependent changes have been merged and published in downstream modules

Further comments

This change only touches Xcode project/workspace configuration, so there are no JS/TS units to add or run — the iOS build itself is the verification, and the PR build lanes cover it on CI.

On a machine with a paired physical iOS device, bare pnpm ios will, after successfully building and launching on the simulator, additionally attempt a device build that fails codesigning (xcodebuild exit 70). That is pre-existing device-targeting behavior of the RN CLI, unrelated to this rename; pass --simulator "<name>" to target the simulator only.

https://claude.ai/code/session_01QU3tY9QDvsM1H9yeoDAenp

Summary by CodeRabbit

  • Bug Fixes
    • Fixed iOS build/run consistency by aligning the app workspace and schemes used for compiling and launching the main app.
    • Updated CocoaPods/Xcode workspace naming so iOS runs select the correct scheme automatically.
    • Improved Fastlane build settings to use the correct workspace for both device and simulator builds, reducing build/launch mismatches.
  • Documentation
    • Removed outdated Fastlane action documentation related to iOS builds.

…oject

The experimental multi-scheme setup was removed and RocketChatRN is no longer
a valid scheme, but `react-native run-ios` still inferred it as the default
and failed. The CLI picks the alphabetically-greatest .xcworkspace/.xcodeproj
and infers the scheme from its basename, so a workspace-only rename cannot win
against RocketChatRN.xcodeproj (RocketChat is a prefix of RocketChatRN).

Renaming both the workspace and the Xcode project to RocketChat makes
RocketChat the flag-free default for every RN CLI invocation, with no
--scheme flag in the pnpm script. The dead build_fork Fastlane lane is removed.

Claude-Session: https://claude.ai/code/session_01QU3tY9QDvsM1H9yeoDAenp
@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 240c8904-6688-4254-a67f-48614c662f76

📥 Commits

Reviewing files that changed from the base of the PR and between 7393bdb and 37a95d3.

📒 Files selected for processing (1)
  • ios/Podfile
✅ Files skipped from review due to trivial changes (1)
  • ios/Podfile
📜 Recent review details
⏰ Context from checks skipped due to timeout. (2)
  • GitHub Check: ESLint and Test / run-eslint-and-test
  • GitHub Check: format

Walkthrough

The iOS workspace, project, schemes, and Fastlane build configuration now reference RocketChat instead of RocketChatRN. The Fastlane README also removes the build_fork action entry.

Changes

iOS workspace and build reference alignment

Layer / File(s) Summary
Workspace and project references
ios/Podfile, ios/RocketChat.xcworkspace/contents.xcworkspacedata, ios/RocketChat.xcodeproj/project.pbxproj
Podfile declares workspace 'RocketChat', the workspace file points to RocketChat.xcodeproj, and the project configuration list is updated for PBXProject "RocketChat".
Shared scheme containers
ios/RocketChat.xcodeproj/xcshareddata/xcschemes/RocketChat.xcscheme, ios/RocketChat.xcodeproj/xcshareddata/xcschemes/NotificationService.xcscheme, ios/RocketChat.xcodeproj/xcshareddata/xcschemes/ShareRocketChatRN.xcscheme
BuildableReference entries in the app, notification, and share schemes now point to container:RocketChat.xcodeproj.
Fastlane workspace updates
ios/fastlane/Fastfile, ios/fastlane/README.md
The build and build_simulator lanes use RocketChat.xcworkspace, and the Fastlane README no longer lists ios build_fork.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

type: chore

Suggested reviewers

  • OtavioStasiak
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main iOS change: making RocketChat the default scheme by renaming the workspace and project.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • NATIVE-1341: Request failed with status code 401

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@ios/Podfile`:
- Around line 7-9: The Podfile comment is stale and now conflicts with the
updated iOS build setup. Update the note near the workspace/scheme configuration
in Podfile so it matches the current project identity, replacing the old
RocketChatRN reference with the correct RocketChat Xcode project context. Keep
the comment aligned with the workspace basename and shared scheme behavior to
avoid misleading future changes to the iOS build configuration.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8ca4a8cd-7055-4e0b-a78c-8888dc58d5bb

📥 Commits

Reviewing files that changed from the base of the PR and between da389be and 7393bdb.

⛔ Files ignored due to path filters (1)
  • ios/Podfile.lock is excluded by !**/*.lock
📒 Files selected for processing (10)
  • ios/Podfile
  • ios/RocketChat.xcodeproj/project.pbxproj
  • ios/RocketChat.xcodeproj/xcshareddata/xcschemes/NotificationService.xcscheme
  • ios/RocketChat.xcodeproj/xcshareddata/xcschemes/RocketChat.xcscheme
  • ios/RocketChat.xcodeproj/xcshareddata/xcschemes/ShareRocketChatRN.xcscheme
  • ios/RocketChat.xcworkspace/contents.xcworkspacedata
  • ios/RocketChat.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
  • ios/RocketChat.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
  • ios/fastlane/Fastfile
  • ios/fastlane/README.md
💤 Files with no reviewable changes (1)
  • ios/fastlane/README.md
📜 Review details
⏰ Context from checks skipped due to timeout. (1)
  • GitHub Check: format
🔇 Additional comments (7)
ios/Podfile (1)

10-10: LGTM!

ios/RocketChat.xcworkspace/contents.xcworkspacedata (1)

5-5: LGTM!

ios/RocketChat.xcodeproj/project.pbxproj (1)

1169-1169: LGTM!

Also applies to: 2473-2480

ios/RocketChat.xcodeproj/xcshareddata/xcschemes/RocketChat.xcscheme (1)

20-20: LGTM!

Also applies to: 50-50, 67-67

ios/RocketChat.xcodeproj/xcshareddata/xcschemes/NotificationService.xcscheme (1)

21-21: LGTM!

Also applies to: 66-66

ios/RocketChat.xcodeproj/xcshareddata/xcschemes/ShareRocketChatRN.xcscheme (1)

21-21: LGTM!

Also applies to: 37-37, 75-75

ios/fastlane/Fastfile (1)

111-115: LGTM!

Also applies to: 119-121

Comment thread ios/Podfile Outdated
The comment still claimed the Xcode project was RocketChatRN, which this
branch renamed to RocketChat. Rewrite it to state why the workspace name
is pinned.

Claude-Session: https://claude.ai/code/session_01QU3tY9QDvsM1H9yeoDAenp
@Shevilll

Copy link
Copy Markdown

Hi holistic-picture,

This is an extremely clean and highly practical PR! Renaming the .xcodeproj and .xcworkspace files to match the main RocketChat scheme name is a major quality-of-life improvement for iOS developers. It correctly pins the workspace name and ensures react-native run-ios successfully infers the matching scheme automatically without requiring external override flags.

I also wanted to highlight a couple of great decisions here:

  1. Preserving Internal App Registry/Directories: Keeping the root directory as RocketChatRN and preserving the bundle identifiers/action file paths was a great choice. Attempting to rename the actual folders and the RN registry would have caused immense git churn and high risk of breaking various automated CI workflows, and is completely unnecessary.
  2. Fastfile Synchronization: Updating the Fastfile workspace parameter to target RocketChat.xcworkspace ensures Fastlane tasks continue to run seamlessly under the new setup.

Everything looks correct and well-tested. This is a very welcome improvement! 🚀

@github-actions

Copy link
Copy Markdown

iOS Build Available

Rocket.Chat 4.74.0.109209

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants