Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use specific package name when setting up a react-native project

Tags:

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?

like image 503
Anna Melzer Avatar asked Oct 27 '16 09:10

Anna Melzer


Video Answer


1 Answers

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 
like image 125
Michael Radionov Avatar answered Oct 19 '22 10:10

Michael Radionov