How to publish 2 apps using 1 source code to Play store and App store? - flutter

I need to publish 2 clients to 1 source code. How do I do it?
I read this article.
How do I build different versions of my Flutter app for qa/dev/prod?
However I could not find the answer from this article.
Is it possible to publish 2 application in same source code and same Key file and same version code and same version name(com.eclipse.side)?

In order publish the same source code into 2 different applications, for example if you have a paid version and a free version of your application you need to use flutter flavors
Basically, it will create 2 different applications that can be uploaded to the stores with the same code, with slight changes in the application Id for example

So, Is it possible to publish 2 application in same source code
Yes. It is irrelevant how you create your app.
and same Key file
Yes, however it's not really recommended
and same version code
Yes, version code is just a version number of your specific app only.
and same version name(com.eclipse.side)
Yes, versionName string used as the version number shown to users. Not sure you meant that one really as noone puts package id there though.
So the only thing that matters globally is application id from your manifest and it must be unique across whole play store submitted apps.
EDIT
my question is, can to publish 2 application with same package name?**
Again, there's no such thing as package name. It's application id that matters only. All the other things are just labels. If you want to release two apps both can show "My App" label. But one mush have different application Id than other (i.e. com.company.app1 and com.company.app2). That's it - so ensure your flavours set different application id and you should be good.

Related

Flutter - how to create a framework where i can have Debug and Prod versions where debug version has some way to choose test environment

I need to create two different versions of the app.
- debug
-prod
for debug, version i need user to select the test environment before anything else begins. i need some way to know what environment user has selected and then load API endpoints config file accordingly.
what's the best way to handle this in flutter?
I have seen in some apps that for iOS, debug options are available in app settings under the standard iOS settings menu , select the app and then see those options in there.
You might want to use Flutter Flavours. As the name suggests, you can practically make flavours of the same app based on your need - debug, test, production etc. And not only API end-points, but you can also configure everything else such as app icon, different labels on the screen etc.
As suggested in this link, you can have different main.dart file for each flavour. You can read different configuration from JSON file (such as API end-point) and rest of your app will remain same. For example, see below :
This is another helpful link.

Create an App within an App

I am being presented with a very interesting project. The task that I must complete is to figure out a way to allow a partner to be involved in an app without giving up their source code. The code will be included in the main bundle of the app so it is not dynamically stored. The partner has a fully functional app that is needed to be ran in a window within the main app at the appropriate time. I know having the partners create a web app would be ideal so it is treated like a webpage but I am more concerned with codes that must be written natively in iOS.
My question is what is the best way to go about solving this? In theory it is like an App within an App. Is there a way if they gave up their .app file I can include this in the bundle and then run it when I catch a certain event? Should I have the partners create their code in a framework and then import into the shell project? What is the best way to approach this problem?
If your 2nd-party doesn't want to provide you with the source code, why doesn't he compile it to object code then let you simply link it to your app?
By the way, at least on official (non-jailbroken) iDevices, apps can't 'embed' or 'open' one another in such a way - you can open an app programmatically if 1. it's a separate app 2. it has a registered special URL associated to its bundle.
Is there a way if they gave up their .app file I can include this in
the bundle and then run it when I catch a certain event?
No, you'll want to have them create a library instead. You can then include that library in your project.
Creating a library is as simple as:
Choose File->New...->Project... in Xcode.
Select the "Cocoa Touch Static Library" project template.
Add your code.
Build.
The result is a static library that you can add to your application(s). The library will contain the compiled code that you added, but doesn't include the source code. The library developer should provide whatever header files are necessary to use the code in the library.
An App within an App is possible however it requires a common data framework that allows one app to reference the same data without confusing the the source of and destination of the data.
Such a framework allows one app to interact with another app referencing the same data.

Same Bundle Id + Different Developer Accounts

We followed following steps and found strange output.
What would be possible reasons for these?
Steps:
Created ipa's for 2 different applications using 2 different distribution profiles (both the profiles belongs to 2 different developer accounts) but keeping bundle id same.
Actual Output: Both ipa's where treated as same i.e. 2nd ipa overridden the 1st one.
Expected Output: Both ipa's should be treated as different i.e. 2nd ipa shouldn't override 1st one.
Surprisingly same output was observed for same applications.
Thanks in advance.
iOS uses bundle identifier to distinguish applications from one another. If you sign two application using similar bundle identifier and try to install one after then it will show similar behavior(Actual output).
For example one application you com.example.user.zzz and another application has same id then iOS will treat them as same application. Installation/Removal of one over other will depend on the order of installation and application version.
So in your case you should provide two different bundle ids so that iOS can distinguish them.
Thanks,

Will first version local database remain in the new version of iphone application

I am bit concern about the local database I have used in my application.
I want to maintain the data enter by user in the first version of application in second version also.
So i did one exercise in which I installed app with version 1.0 and enter few entry in my database from app. Then I installed app again with the version 2.0 and the data enter in the first version app are there in the second version also. Does that mean i don't have to do anything in order to keep users first version data in second version app.
Do let me know if any one has any idea.
Thanks in advance.
Yes, the user data (including databases) will stay around after application upgrades.
When you uninstall an application, its data will also be removed.
Does that mean i don't have to do anything in order to keep users first version data in second version app.
If you have changed the database schema for the new version, you will need to provide ways to continue to be able to read the old data or convert it to the new format. Otherwise, yes, it should just work.

one code base for iphone generic application?

I have built a generic application which can handle different content data - but for each content data, it will be a different iphone application (with a different name).
I would like of couse to only keep one code base for all these different apps (as it would be easier maintenance) but I have 2 questions:
1- I would need to change the appname in the buildsettings, etc.. and may be it is going to be an overkill...? especially with the upload process then...? What are your experiences in that domain and what would you recommend me to do?
2- how can I have all the pictures for logo (Icon.png, etc...) to co-exist into one app? For the moment, I have a global variable (as a singleton pattern) that I switch to change appname and loaded data inside the program
Thanks in advance for your help
Cheers,
geebee
You can do this pretty easily, it's what most developers do in their lite versions. All you have to do is add another target to create a new app out of the same code and use that global variable.
In order to change the images included in the app you simply edit the target and under the copy bundle resources menu remove the unnecessary resources. You'll notice that when you add a new resource you have the option to include it in any one or more of your targets. Simply select the one that you want and it will only be accessible to that target.
The reason that this works is that each target can have its very own info.plist. All the settings and resources can be separate, and the code can be different using your #ifdef global_var.
Here's a slightly outdated tutorial that should get you started if you need it.
http://www.bit-101.com/blog/?p=2098
For each application name add one target.
Create one xyz-info.plist for each of the target. (in this case for the xyz.app)
In each of the xyz-info.plist assign the appropriate icon files etc.
Within your build phases for each of the targets you will define which images go with which app.