Skip to content

XCode Builds should run packager inline #12425

Description

@steve-gray

Description

The XCode usage of the packager is different to the usage for Gradle/Android. In an Android build the packager is invoked directly, feeding the bundle into the process and then terminating cleanly. This causes problems with build servers (Jenkins, GoCD, anything), as you:

  • can't run concurrent headless builds - the first in claims the port.
  • can't change the port easily globally, so many things assume 8081

We've tried working around this with lsof -P | grep ":8081" and using kill -9 to terminate processes, but you still can't run more than one at a time, and eventually OSX headless servers choke to the point of needing a reboot because the packager terminates with 'Process exited' consume memory, and OSX lacks an option to close terminated windows.

Reproduction

For example, when trying to build an iOS simulator bundle:

react-native init someapp
cd someapp
xcodebuild -workspace ios/someapp.xcworkspace -scheme someapp -configuration Release -derivedDataPath ios/build -sdk iphonesimulator9.3 -arch i386

Note that the packager remains active.

Solution

  • Modify the build scripts that are run as part of the iOS Release process so that the packager runs inline.

Additional Information

  • React Native version: 0.41
  • Platform: iOS
  • Operating System: MacOS

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions