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

Add bundleIdPrefix #67

Merged
merged 3 commits into from
Sep 25, 2017
Merged

Add bundleIdPrefix #67

merged 3 commits into from
Sep 25, 2017

Conversation

yonaskolb
Copy link
Owner

@yonaskolb yonaskolb commented Sep 24, 2017

Fixes #62
This is used for automatically generating PRODUCT_BUNDLE_IDENTIFIER if it's not specified

@yonaskolb
Copy link
Owner Author

I just realized this could be solved without this feature

bundleIdPrefix: com.company

vs

settings: 
  PRODUCT_BUNDLE_IDENTIFIER: com.company.$(PRODUCT_NAME)

Is this feature, worth it then? Maybe not

@aerobounce
Copy link

aerobounce commented Sep 25, 2017

@yonaskolb, I think it worth, I mean it. This is something I wanted, too.
I'm currently using variables to achieve this like below:

projectName: &projectName ProjectName
bundleIdentifier: &bundleIdentifier jp.co.ClientName.ProjectName

name: *projectName
targets:
  *projectName:
    settings:
      base:
        PRODUCT_BUNDLE_IDENTIFIER: *bundleIdentifier

I always wanted to do something like this: *bundleIdentifier.*projectName but yaml doesn't seem to be able to do it.

bundleIdPrefix: com.company

This would be some 'unique' nice feature of XcodeGen. More clearer when you look at it.

@yonaskolb
Copy link
Owner Author

@kixswift thanks for the feedback. You don't think this is simple enough?

settings: 
  PRODUCT_BUNDLE_IDENTIFIER: com.company.$(PRODUCT_NAME)
targets:
  MyTarget:
    platform: iOS
    type: application
  MyFramework:
    platform: iOS
    type: framework

MyApplication would get a PRODUCT_BUNDLE_IDENTIFIER of com.company.MyTarget and MyFramework would get com.company.MyFramework

@yonaskolb
Copy link
Owner Author

Also maybe this should be moved to project.options like carthageBuildPath

@yonaskolb yonaskolb requested a review from pepicrft September 25, 2017 13:11
@aerobounce
Copy link

@kixswift thanks for the feedback. You don't think this is simple enough?

Um... well, actually you have a point and this might be just my personal preference. And I totally agree with you that this is an option.

@yonaskolb
Copy link
Owner Author

Are there any other reasons why a bundleIdPrefix would be useful? Xcode makes you set one when creating a project and calls it the Organisation Identifier, but I don't think they use it for anything else then to prepend to bundle ids

Copy link

@pepicrft pepicrft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea of using the bundleID prefix. Having the prefix as an option will ensure that all the bundle identifiers are consistent across the targets.

@yonaskolb yonaskolb merged commit 658c3f8 into master Sep 25, 2017
@pepicrft pepicrft deleted the bundleIdPrefix branch September 25, 2017 15:29
@aerobounce
Copy link

I like the idea of using the bundleID prefix. Having the prefix as an option will ensure that all the bundle identifiers are consistent across the targets.

@pepibumur, that's good point 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants