Issue
When creating a react-native app with react-native init MyApp the Android and iOS package names are automatically set to com.myapp.
Changing the Android package name (especially if you need something longer like com.organisation.propject.app) later in the development is pretty fiddly and I was wondering if there was a way to set the package name when setting up a project with react-native init?
Solution
Update for latest React Native (0.72+), use --package-name option.
$ react-native init MyApp --package=com.organization.project.app
Note: it's working only in RN 0.37 and maybe one or two versions up, in 0.40+ this feature was removed.
You need to specify a --package option:
$ react-native init MyApp --package=com.organization.project.app
Answered By - Michael Radionov
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.