question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

inconsistent arguments to "bundle" command between android and iOS build scripts

See original GitHub issue

Description:

As of 0.61.5, the Android/Gradle react.gradle script calls react-native bundle with the --sourcemap-output argument. In other words, it includes building source maps by default. However, the iOS/Xcode equivalent does not. Would it be possible to add support for the latter to also pass the --sourcemap-output value by default?

I realize both include ways to pass “extra args” to the react native bundle call, but in our case, we have a whitespace character in our Xcode scheme names (an unintended effect of following the suggestion in the react-native-config approach), and there does not seem to be a way to properly escape it in the $EXTRA_PACKAGER_ARGS value so that the script will interpret it properly (here is an explanation of this issue).

Nevertheless, it seems prudent for both scripts to behave consistently when bundling the js code. (It seems the --sourcemap-output arg was added to the android script about six months ago.)

React Native version:

Run `react-native info` in your terminal and copy the results here.
    OS: macOS Mojave 10.14.6
    CPU: (8) x64 Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
    Memory: 209.79 MB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 10.16.0 - ~/.nvm/versions/node/v10.16.0/bin/node
    Yarn: 1.17.3 - ~/.nvm/versions/node/v10.16.0/bin/yarn
    npm: 6.9.0 - ~/.nvm/versions/node/v10.16.0/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
    Android SDK:
      API Levels: 23, 25, 26, 27, 28, 29
      Build Tools: 28.0.2, 28.0.3, 29.0.0
      System Images: android-27 | Google APIs Intel x86 Atom, android-27 | Google Play Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom, android-29 | Google Play Intel x86 Atom
  IDEs:
    Android Studio: 3.5 AI-191.8026.42.35.6010548
    Xcode: 11.3/11C29 - /usr/bin/xcodebuild
  npmPackages:
    react: ^16.9.0 => 16.12.0 
    react-native: ^0.61.5 => 0.61.5 
  npmGlobalPackages:
    react-native-cli: 2.0.1
    react-native: 0.59.10

Steps To Reproduce

Provide a detailed list of steps that reproduce the issue.
Issues without reproduction steps or code are likely to stall.
  1. Compile binary code on Android Studio/Gradle
  2. Compile binary code on Xcode/xcodebuild
  3. Examine the output, or add debugging output to the react.gradle or react-native-xcode.sh scripts to see how they invoke the react-native bundle command.

Expected Results

Expect both bundler commands to be consistent in the arguments passed to the bundler-- e.g. both should create source maps.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:5
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
hramoscommented, Jan 31, 2020

Thanks for catching this! Tagging as a “Good first issue” in case anyone wants to send a PR and add this to iOS.

0reactions
kwkrcommented, Dec 14, 2020

As it doesn’t seem to be actively worked on, I tried to come up with some solution to that. Could anyone give me feedback on my current changes? https://github.com/facebook/react-native/pull/30573

Read more comments on GitHub >

github_iconTop Results From Across the Web

Known issues with Android Studio and Android Gradle Plugin
When you navigate to Build > Generate Signed Bundle / APK and attempt to configure app signing for an app bundle or an...
Read more >
How to change $(PRODUCT_BUNDLE_IDENTIFIER) in Xcode?
I have try you suggestion use PlistBuddy but still not work. If leave build script last get error: The project's Bundle ID is...
Read more >
Xcode 11 Command PhaseScriptExecut… - Apple Developer
It seems like you have a Build Run Script in your Build Phases that is failing. You might want to look at the...
Read more >
(beta) Efficient mobile interpreter in Android and iOS - PyTorch
Prepare model: Prepare the mobile interpreter version of model by run the script ... Test app: Build and run the ImageSegmentation app in...
Read more >
GN Reference - Google Git
Contents. Commands. analyze: Analyze which targets are affected by a list of files. args: Display or configure arguments declared by the build ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found