Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 723
Apython Avatar asked Jul 26 '20 01:07

Apython


People also ask

Is Flutter code same for iOS and Android?

But fear not, Flutter is here to the rescue… Flutter is Google's mobile UI framework that provides a fast and expressive way for developers to build native apps on both iOS & Android, using a single codebase. That seems great.

Where is the bundle ID for iOS in Flutter?

Using Xcode 2. Click on Runner in the left sidebar. 3. Now you can see your bundle id in the General tab.

How do I change the iOS bundle identifier in Flutter?

And right click on the iOS folder of flutter and open with Xcode. In Xcode > select Runner > In general tab you can change the bundle Identifier.


1 Answers

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.

like image 179
Apython Avatar answered Oct 17 '22 05:10

Apython