Renomeando seu aplicativo React Native

Renomear seu aplicativo, é uma coisa que você raramente vai precisar fazer, mas algumas vezes pode acabar surgindo essa necessidade.

Felizmente, essa é uma operação bem simples. Для того, чтобы перейти непосредственно в сеть, а также для мобильных устройств, muitas vezes приходят на гибридные языки, или на языки, такие как Flutter, или нет, React Native.

Используйте a criação do aplicativo pelo react-native init,ou peloexpo init,ele Automaticamente cria um template para que você possa começar a codar Rapidamente, e nesse caso, ele gera o nome baseado no parametro passado na hora de criar o aplicativo, como no instanceo a seguir:

реактивная инициализация AwesomeProject

Альтерандо или другое имя формы для устройства (Android)
Для Android, выберите следующее: android/app/src/main/res/values ​​e dentro dela terá или arquivo strings.xml onde você verá или seguinte código:

‹resources›
‹string name="app_name"›AwesomeProject‹/string›
‹/resources›

Onde AwesomeProject сера о номе ком дие Você criou о aplicativo, аи é так альтерар пункт о номе desejado е pronto.

Альтерандо или другое имя формы (iOS)
Для iOS, вы можете войти в следующую пасту: ios/AwesomeProject/e dentro dela terá o arquivo Info.plistonde você verá o seguinte código:

‹?xml версия=”1.0 кодировка=”UTF-8?›
‹!DOCTYPE plist PUBLIC “-//Apple//DTD PLIST 1.0//EN” “http://www.apple.com/DTDs /PropertyList-1.0.dtd›
‹plist version=”1.0›
‹dict›
‹key›CFBundleDevelopmentRegion‹/key›
‹string›en‹/string›< br /> ‹key›CFBundleDisplayName‹/key›
‹string›AwesomeProject‹/string›
‹key›CFBundleExecutable‹/key›
‹string›$(EXECUTABLE_NAME)‹/string›
‹key›CFBundleIdentifier‹/key›
‹string›$(PRODUCT_BUNDLE_IDENTIFIER)‹/string›
‹key›CFBundleInfoDictionaryVersion‹/key›
‹string›6.0‹/string ›
‹key›CFBundleName‹/key›
‹string›$(PRODUCT_NAME)‹/string›
‹key›CFBundlePackageType‹/key›
‹string›APPL‹/ string›
‹key›CFBundleShortVersionString‹/key›
‹string›1.0‹/string›
‹key›CFBundleSignature‹/key›
‹string›????‹ /string›
‹key›CFBundleVersion‹/key›
‹string›1‹/string›
‹key›LSRequiresIPhoneOS‹/key›
‹true/›
‹key›NSAppTransportSecurity‹/key›
‹dict›
‹key›NSAllowsArbitraryLoads‹/key›
‹true/›
‹key›NSExceptionDomains‹/key›
‹dict›
‹key›localhost‹/key›< br /> ‹dict›
‹key›NSExceptionAllowsInsecureHTTPLoads‹/key›
‹true/›
‹/dict›
‹/dict›
‹/dict›
‹key›NSLocationWhenInUseUsageDescription‹/key›
‹string›‹/string›
‹key›UILaunchStoryboardName‹/key›
‹string›LaunchScreen‹/string›
> ‹key›UIRequiredDeviceCapabilities‹/key›
‹array›
‹string›armv7‹/string›
‹/array›
‹key›UISupportedInterfaceOrientations‹/key›
‹array›
‹string›UIInterfaceOrientationPortrait‹/string›
‹string›UIInterfaceOrientationLandscapeLeft‹/string›
‹string›UIInterfaceOrientationLandscapeRight‹/string›
‹/array›< br /> ‹key›UIViewControllerBasedStatusBarAppearance‹/key›
‹false/›
‹/dict›
‹/plist›

Onde AwesomeProject сера о номе ком дие Você criou о aplicativo, аи é так альтерар пункт о номе desejado е pronto.

Após feitas as alterações, os nomes estarão atualizados, só rodar o seguinte comando:

# caso esteja rodando no Android
react-native run-android
# ou caso esteja rodando no iOS
react-native run-ios

Por hoje é isso. Até a proxima ;)