Lumino Webdesign og SEO
Nettleseren din må oppgraderes. Du har Internet Explorer version {%ieversion%}. Gå til www.microsoft.com for å laste ned siste versjon av Internet Explorer.

Tech blogg

  • Flutter, Change name of your application - complete guide!
  • Android, Help with a nasty 'bug' - Android.Content.Res.Resources+NotFoundException
  • Dark mode for iOS using Xamarin
  • Oppdatering av en iOS app til AppStore
  • Xamarin og endring av Android manifist fil
  • Azure WebJobs - Noen tips ved etablering av bakgrunnsjobber
  • iOS 13 og Xamarin App Development
  • Regular Expressions (RegEx), cheat sheets and examples
  • Pop-up Menus Hidden Behind Flash Content
  • Bootstrap Dropdown - horizontal layout
  • Localizing JavaScript variables
  • IE Conditional Comments in CSS
  • CSS, what about those old tables?
  • Generating new binding redirects for web.config
23.02.2025
Flutter, Change name of your application - complete guide!
30.12.2021
Android, Help with a nasty 'bug' - Android.Content.Res.Resources+NotFoundException
29.07.2020
Dark mode for iOS using Xamarin
13.02.2020
Oppdatering av en iOS app til AppStore
11.02.2020
Xamarin og endring av Android manifist fil
30.09.2019
Azure WebJobs - Noen tips ved etablering av bakgrunnsjobber
12.02.2020
iOS 13 og Xamarin App Development
30.01.2010
Regular Expressions (RegEx), cheat sheets and examples
11.11.2010
Pop-up Menus Hidden Behind Flash Content
22.07.2014
Bootstrap Dropdown - horizontal layout
14.02.2012
Localizing JavaScript variables
14.02.2012
IE Conditional Comments in CSS
12.03.2009
CSS, what about those old tables?
12.09.2021
Generating new binding redirects for web.config

Flutter, Change name of your application - complete guide!

Flutter logo - vertical

Typically, before launching a new app, you will need to change the name of your Flutter application. While developing your application, the app will typically have a "dev" name, and you will most likely want to change this before submitting the app to Apple App store or Google Play.

Follow this step-by-step instruction to implement the necessarry changes.

1. Update pubspec.yaml

  • Open pubspec.yaml, and change the "name" field and the "description" field:
  • name: "myflutterapp" - should be the name of your app
  • description: "My Flutter App" - should be the describing name of your app

Flutter Change Name - pubspec.yaml

Flutter Change Name - pubspec.yaml

Flutter Change Name - pubspec.yaml

 

When making changes to pubspec.yaml, you should run the following command in the TERMINAL window to see the changes: flutter pub get

After you made changes to the "name" field in pubspec.yaml, you will most likely get a lot of errors in your Flutter project. This is due to the "package import" names now being wrong. 

Do a "search-replace all" from the old name to new name as follows: from ":oldappname/" to ":myflutterapp/"

Remember to include the : and the / in the search-replace, as you otherwise may end up replacing unwanted items.

Flutter Change Name - Import Package Error

Flutter Change Name - Import Package Error

Flutter Change Name - Import Package Error

 

2. Change the "Title" attribute in the MaterialApp

This is typically located in the main.dart file. The "Title" attribute is shown in the above image.

 

3. Android specific changes

  • Open the AndroidManifest.xaml file in "android/app/src/main/AndroidManifest.xaml"
  • Change the "android:label" attribute as shown in the following screenshot.

Flutter Change Name - AndroidManifest.xml

Flutter Change Name - AndroidManifest.xml

Flutter Change Name - AndroidManifest.xml

 

  • Open the build.gradle file in "android/app/build.gradle"
  • Change the "applicationId" and the "namespace" as shown in the following image

Flutter Change Name - Android build.gradle

Flutter Change Name - Android build.gradle

Flutter Change Name - Android build.gradle

OBS! Do not change your applicationId after publishing. If you do, Google Play will see the new upload as a different app. 

 

  • Change the folder structure and package declarations to use the new namespace
  • Right click on the name to change in the folder structure as shown in the image below

Flutter Change Name - Android Directory Name Change

Flutter Change Name - Android Directory Name Change

Flutter Change Name - Android Directory Name Change
  • Open MainActivity.kt file
  • Change first line to: "package no.myflutterapp.app"

 

  • If you are using Google Maps in your app, the you should also make make changes to the "google-services.json" file in the "android/app" directory.

4. iOS specific changes

  • Open info.plist in "ios/Runner/Info.plist"
  • Change CFBundleName and CFBundleDisplayName in this file

Flutter Change Name - iOS Info.plist change CFBundle...

Flutter Change Name - iOS Info.plist change CFBundle...

Flutter Change Name - iOS Info.plist change CFBundle...
  •  Change Bundle identifier for iOS platform
iOS app has the bundle identifier set in Info.plist file as value for the key CFBundleIdentifier. First check and make sure that this key in Info.plist file points to a variable like this:
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
 
To set a new value for this variable, open the following file: project/ios/Runner.xcodeproj/project.pbxproj
Find the PRODUCT_BUNDLE_IDENTIFIER variable and change its value to the identifier you want to use.
This variable will be present in at least 3 places (not necessary to change Test-items). Replace all occurrences.
 
PRODUCT_BUNDLE_IDENTIFIER = no.myflutterapp.app;
 
Flutter Change Name - iOS change bundle identifier in project.pbxproj

Flutter Change Name - iOS change bundle identifier in project.pbxproj

Flutter Change Name - iOS change bundle identifier in project.pbxproj

 

  • Make custom URL-scheme so that apps can communicate with your app
  • Only needed if you need to open other apps and redirect back to your app

Access Info.plist again and add the information as shown in the below image:

Flutter Change Name - iOS Info.plist Custom URL

Flutter Change Name - iOS Info.plist Custom URL

Flutter Change Name - iOS Info.plist Custom URL

 

And that should do the trick :)

André Vold

Tech blogg
André Vold

Her er en rask liten BLOGGER BIO for å fortelle litt om min bakgrunn - og hvorfor jeg valgte programmering som fagfelt.

Jeg vokste opp i Norge, men gikk på universitet i USA. Jeg er sivilingeninør med grad innen "Computer Engineering" fra Arizona State University. Etter utdannelsen flyttet jeg tilbake til Norge, begynte å arbeide på Norsk Data og senere IBM, og tok videreutdannelse på BI innen Master of Management. Etter flere år som divisjonsdirektør i IBM Norge, valgte jeg å starte e-læringsfirmaet Apropos Internett AS . Senere startet jeg også ViroSafe Norge AS som importerer og distribuerer anti-malware og anti-virus software og hardware.

Det har alltid vært essensielt for meg å holde meg oppdatert innen teknologiske endringer og trender - ikke bare for å kunne holde programmeringskunnskaper på topp, men også for min suksess som gründer.

Lumino blogger omfatter en rekke temaer som har vært essensiell for min virksomhet, og som derfor kan være relevant for din.
Forsiden
Referanser
Tech blogg
Personvern

Søkeresultater