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

4

18

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.

Auberbach answered 21/11, 2012 at 21:44 Comment(0)
L
11

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.

Linn answered 21/11, 2012 at 21:59 Comment(1)
It sounds like there is no technical reason why you should or shouldn't use the same package across Android and iOS, but accepting this answer because it provides the most detail. :-)Auberbach
F
5

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

com.mycompany.android.myapp
com.mycompany.ios.myapp
Fougere answered 21/11, 2012 at 21:46 Comment(0)
U
1

Agreed. In Android itself, you should use the same package name for the app and for its classes (wherever possible), but don't use the same package across iOS and Android. It's not a technical limitation, it's just that it will help you avoid dumb mistakes.

Udell answered 21/11, 2012 at 21:52 Comment(0)
M
1

There is no technical requirements to use same bundle/package name. A good practice is stick to iOS/Android recommendations

Meekins answered 30/9, 2022 at 12:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.