Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

번들 아이디, Bundle Identifier #22

Closed
Taehyeon-Kim opened this issue Jul 10, 2022 · 0 comments
Closed

번들 아이디, Bundle Identifier #22

Taehyeon-Kim opened this issue Jul 10, 2022 · 0 comments
Assignees

Comments

@Taehyeon-Kim
Copy link
Owner

Taehyeon-Kim commented Jul 10, 2022

Bundle Identifier

번들 아이디(Bundle Identifier)는 앱을 구분하는 고유한 식별자를 의미한다. 주민등록번호와 같은 성격을 띤다고 볼 수 있다. 고유해야하니까 중복되어서는 안 되고 실제로 출시 전에 중복 여부를 검사하게 된다.


중본된 Bundle Identifier를 사용한다면

  • 에러가 뜨고 빌드가 되지 않는 경우가 발생한다.
  • 출시가 불가능하다.

가끔 개발을 하다 보면 중복된 Bundle Identifier를 사용했다가 빌드가 되지 않은 경우를 만나고는 한다. 흔치는 않은 일이지만 문제가 생긴다면 적절하게 Id를 변경하면 좋을 것 같다.

(실제로 SOPT 활동 시 세미나를 진행하면서 Bundle Identifier를 com.sopt.Project와 같이 사용한 적이 있는데, 이를 똑같이 따라한 사람들이 꽤 있어서 빌드 에러를 만난 적이 있다.)

출시 역시 불가능하다. 출시하려는 Bundle Identifier가 이미 앱 스토어에 출시된 앱과 동일한 Id를 가진다면 출시가 불가능하다. 출시 전에 중복 확인을 하게 되는데, 중복 확인 후에 변경이 가능하다.


앱을 출시하고 Bundle Identifier를 바꿀 수 있을까?

출시한 이후에는 바꾸지 못한다가 맞는 말이다. 왜 인지를 생각해보자면 Bundle Identifier를 바꾼다는 것은 다른 앱을 만든다는 이야기와도 같은 것이다. 실제로 시뮬레이터에서 같은 프로젝트를 Bundle Identifier만 바꾸어 실행을 시켜보면 새로운 앱이 설치되는 것을 확인할 수 있다.


처음부터 제대로 아이디를 정하기로 하자.

보통 웹 사이트 주소를 거꾸로 작성하는 것이 관습이다.

  • com.taekki.project
  • com.naver.webtoon
  • org.sopt.thesopt
  • com.google.Sheets

코드로 얻고 싶다면

코드로 값을 얻어서 언제 유의미하게 사용할 지는 아직 잘 모르겠다. 하지만 방법은 알아두자.

let bundleID = Bundle.main.bundleIdentifier
@Taehyeon-Kim Taehyeon-Kim self-assigned this Jul 10, 2022
@Taehyeon-Kim Taehyeon-Kim changed the title Bundle Identifier 번들 아이디, Bundle Identifier Jul 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant