Can the bundle-Identifiers of iOS and Android differ on Flutter?
Asked Answered
S

1

9

I uploaded a test-release for an App on both iOS & Android on AppStore/GooglePlay using their respective native programs. In other words I reserved their bundle-identifiers string. Now I'm trying to code the App using Flutter, which is freshly new to me.

Can I create a Flutter project (running on Android Studio) for this app and then change the bundle-identifiers names for each platform separately? and will it work so I could update these apps continuously?

For example, One App created with a bundle-identifier for iOS like this: 'com.thisApp.thisApp', on itunessconnect (reserved). Same App with a different bundle-identifier was created for Android on Google Play Console and reserved: 'com.anotherApp.anotherApp'. None of the apps are LIVE.

Now, if I create a Flutter project I have to choose a package name say 'com.thisApp.thisApp'. This package name will be created for both platforms by default! Although I figured out that you could change the package name in Flutter, as in this post - How to change package name in flutter?

However it's still isn't clear to me, if I DO change it, does the package-name must be identical foreach platform? i.e 'com.anotherApp.anotherApp' OR could the package-name/bundle-id for each platform differ? and even if it works on debug, will it work on release?

Spend answered 26/7, 2020 at 1:6 Comment(2)
Did you get an answer to this question? I know that no one answered on this post but I'm asking just in case you got an answer somewhere elseBrecciate
yes @countpablo, I just posted the answer below.Spend
S
11

So I managed to solve this and answer my own problem.

Yes it is possible.

As already mentioned, before I started to work with Flutter, I used Android Studio and Xcode to upload a "draft version" of the App to the Google Play and App Store respectively in order to "reserve" these AppNamePackages.

Since in one store the same name/package was already taken, I used another name, for example:

com.thisApp.thisApp

and

com.anotherApp.anotherApp

To achieve this in Flutter you need to make sure that:

  1. You change the desired applicationID in the Android-app level build.gradle file and in the AndroidManifest.xml

for this example lets call it com.thisApp.thisApp

  1. You go through equivalent procedure for iOS by changing the desired package name in the info.plist. for this example - com.anotherApp.anotherApp

By selecting any file under Runner folder (iOS folder in Flutter) you can click "Open iOS module in Xcode" and pick the correct App name and package in the App Project.

And that's it. Flutter didn't make problems considering the two different package names. The App bundles were uploaded based on their previous Google Play and iTunesconnet configurations.

Spend answered 20/9, 2020 at 18:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.