Skip to content

buid on iOS do not honor RCT_NO_LAUNCH_PACKAGER setup #23661

@kascote

Description

@kascote

🐛 Bug Report

Every time a build start for iOS, Xcode try to launch metro bundler. There is a flag to disable this behavior but is not honored

The script defined here [1] is using this condition

[ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ]

and that never will resolve to null (-z), I think the correct check is

[ \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" = \"+xxx\" ]

[1] https://github.com/facebook/react-native/blob/master/React/React.xcodeproj/project.pbxproj#L4005

To Reproduce

Under Build Settings add an User Defined variable like

RCT_NO_LAUNCH_PACKAGER=1

close all terminals. Start a build, when React building starts, the metro bundler script is launched.

Expected Behavior

No terminal launched with metro bundler.

Environment

  React Native Environment Info:
    System:
      OS: macOS High Sierra 10.13.6
      CPU: (2) x64 Intel(R) Core(TM)2 Duo CPU     P8600  @ 2.40GHz
      Memory: 3.31 GB / 8.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 8.11.3 - /usr/local/bin/node
      Yarn: 1.7.0 - /usr/local/bin/yarn
      npm: 6.8.0 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
    IDEs:
      Xcode: 10.1/10B61 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.6.3 => 16.6.3
      react-native: 0.58.5 => 0.58.5
    npmGlobalPackages:
      react-native-cli: 2.0.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugPlatform: iOSiOS applications.Resolution: LockedThis issue was locked by the bot.Tech: Bundler 📦This issue is related to the bundler (Metro, Haul, etc) used.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions