-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to change the app name #123
Comments
Currently, we're using this tooling along with Capacitor for configuring the apps for different environments. It feels that the feature would be very useful for this scenario. p.s: I understand that for Capacitor, the app name is configured via |
I figured that it is also achievable by replacing the native resource files directly: vars:
BUNDLE_ID:
default: com.example.app
PACKAGE_NAME:
default: $BUNDLE_ID
+ APP_NAME:
+ default: test-app-name
platforms:
ios:
targets:
App:
bundleId: $BUNDLE_ID
+ plist:
+ - replace: true
+ entries:
+ - CFBundleDisplayName:
+ $APP_NAME
android:
packageName: $BUNDLE_ID
+ xml:
+ - resFile: values/strings.xml
+ target: resources/string[@name="app_name"]
+ replace: |
+ <string name="app_name">$APP_NAME</string>
+ - resFile: values/strings.xml
+ target: resources/string[@name="title_activity_main"]
+ replace: |
+ <string name="title_activity_main">$APP_NAME</string>
But, probably, it would make sense to make it more human-readable by having some convenient property. Something like the following: vars:
BUNDLE_ID:
default: com.example.app
PACKAGE_NAME:
default: $BUNDLE_ID
+ APP_NAME:
+ default: test-app-name
platforms:
ios:
targets:
App:
bundleId: $BUNDLE_ID
+ appName: $APP_NAME
android:
packageName: $BUNDLE_ID
+ appName: $APP_NAME |
For iOS there's However, for Android there's nothing built in but I think I can pretty easily add something that reads the |
Added android support in 6.0.3. Having issues building the docs at the moment but you can use the new android:
appName: My App Name |
Thank you @mlynch 🙏 |
@mlynch Hi! Can you help me please? I have a problem. My application name consists only of numbers, I get a runtimeError when i build & run ios but need When $APP_NAME = '1999' |
Would be amazing if we could also set the application name in
config.yml
fileThe text was updated successfully, but these errors were encountered: