Generating & Publishing - app names, updates recommendations?

Hi,

I was developing the Ionic App - I am a beginner after cash course and I have some doubts - if You could advise me something, regarding Generating the App.

I’ve generated one, it was working, then I’ve tried put it on Google Play and:
image

Package “io.ionic.starter” exists on Google Play, but I was changing the name of the app everywhere, where it was recommended during the courses.

Ok, after that, I changed “io.ionic.starter” everywhere, using Search Tool. But… It stopped working well. I think that I made some mistakes. If You could tell me - where should be App name and where should be “io.ionic.starter” or something like that.

capacitor.config.json:

{
  "appId": "com.sportigio.smartclub",
  "appName": "SmartClub",

config.xml

<widget id="com.sportigio.smartclub" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">

    <name>SmartClub</name>

build.gradle

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.sportigio.smartclub"
        minSdkVersion 21
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }

AndroidManifest.xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.sportigio.smartclub">

 <activity
            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale"
            android:name="com.sportigio.smartclub.MainActivity"

MainActivity.java

package com.sportigio.smartclub;

strings.xml

<resources>
    <string name="package_name">com.sportigio.smartclub</string>
    <string name="custom_url_scheme">com.sportigio.smartclub</string>
</resources>

However, I see the folder in Android Studio, called io.ionic.starter and I am unable to change the name of this folder:
image


  1. What is the correct workflow when I update my App?

When I was generating my App first time I did in this order:

ng build --prod
ionic capacitor sync android
ionic capacitor open android

When I was updating something - I did everything once again - start from “ng build --prod”.
Is it correct or what should I type when app is already generated, but I want to change something.

I hope You understand my problem and You will help me with my IONIC understanding - thanks in advance!

Hmm, it might be easier to delete the native project, update the bundle identifier, and then add the native project back.

Thanks for your answer.

Could You advise - how to do it exactly? Delete particular folders? Via terminal? Bundle identifier - in which place

And what would be the best practice with app names, identifiers and updates in the future?

Thanks in advance :slight_smile:

delete the android folder in your project root

then open capacitor.config.json and edit the appID entry.

then add back the native project with npx cap add android.

2 Likes

Thanks, I will try it and let you know how it went.

Btw: 1) after every change in my Ionic Code I need to delete platforms and then start from $cap sync?
2) Is it correct, I should change io.ionic.starter for my project name everywhere, as I wrote in my post?