Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I use the same package name in both my iOS and Android apps?

Should I publish the Android and iOS versions of my app under the same package name, or is there some benefit in using different package names?

i.e. should I use com.mycompany.myapp for the Android and iOS versions of my app, or should I separate them as com.mycompany.myapp.ios and com.mycompany.myapp.android?

I can't think of any technical reason right now to use separate packages, but as this would be horrendous to change later I'm tempted to use different packages.

like image 367
Dan J Avatar asked Nov 21 '12 21:11

Dan J


2 Answers

I agree with the other answers that it's entirely your own choice, but I will also go against the other answers and state that, personally, I feel it's unnecessary to use specific ios and android packages/namespaces.

Both platforms have their own ideologies and structures and I generally play to them when it comes to naming classes and packages/namespaces.

Take these examples:

Android:

  • com.company.app;
  • com.company.app.listeners;
  • com.company.app.adapters
  • com.company.app.ui;

iOS

  • com.company.app;
  • com.company.delegates;
  • com.company.ui;

It's simple, neat and easy to follow. Obviously there are crossovers and there can always be a bit of confusion ... but the languages and IDEs themselves are different enough to keep your head in the game.

So, as stated; personal choice.

like image 144
Rawkode Avatar answered Oct 02 '22 05:10

Rawkode


It's arbitrary. But personally I would use different packages:

com.mycompany.android.myapp
com.mycompany.ios.myapp
like image 21
Madbreaks Avatar answered Oct 02 '22 06:10

Madbreaks