-
Notifications
You must be signed in to change notification settings - Fork 25k
Description
Is this a bug report?
Yes
Have you read the Contributing Guidelines?
Yes
Environment
Environment:
OS: Linux 4.10
Node: 6.10.3
Yarn: 1.1.0
npm: 3.10.10
Watchman: 4.7.0
Error: unable to print environment info
{ Error: not found: xcodebuild
(snip stacktrace)
Steps to Reproduce
- Run
react-native init MyProject --version 0.48.3 - Rename your
com.myprojectpackage / applicationId tocom.my.new.projectaccording to this SO answer: https://stackoverflow.com/a/37390022/543864 - Run
react-native-git-upgradeto upgrade to 0.49.1 (or higher) which failes silently like described in react-native-git-upgrade changes nothing #12112
There is a similar issue #11163 from when MainApplication.java was introduced in 0.29.
Expected Behavior
Running react-native-git-upgrade in step 3 uses the current Android package name by either parsing AndroidManifest.xml or accepting the package name as a param (ie. react-native-git-upgrade --package com.my.new.project and patches MainApplication.java in the correct path (ie. com/my/new/project).
It looks like react-native init took a package param in version 0.38 which was later removed. That code could be used as a basis for either a --package option to react-native-git-upgrade or parsing AndroidManifest.xml. What is the best approach?
Actual Behavior
Running react-native-git-upgrade in step 3 fails silently like described in #12112 because it tried to patch a file that is not in the git index. It tried to patch com/myproject/MainApplication.java instead of com/my/new/project/MainApplication.java.
Reproducible Demo
Follow the steps under Steps to Reproduce.