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

Generate optional info plist and entitlements #415

Merged
merged 8 commits into from
Oct 30, 2018

Conversation

yonaskolb
Copy link
Owner

@yonaskolb yonaskolb commented Sep 29, 2018

Resolves #406

This allows an Info.plist or .entitlements file to be generated per target via the project spec.
Some basic attributes are generated by default, but app specific ones are not for now.

This features is powerful when used in combination with include and targetTemplates.

  • read and generate
  • basic defaults
  • tests
  • fine grained per platform/product defaults
  • documentation

@lukewakeford
Copy link
Contributor

I've just tested this functionality by adding the following to my app.yml:

info:
  path: App.plist
entitlements:
  attributes:
    com.apple.security.application-groups: group.com.app

I was expecting the entitlements file to be generated without defining a path - it wasn't so I added a path like so:

info:
  path: App.plist
entitlements:
  path: App.entitlements
  attributes:
    com.apple.security.application-groups: group.com.app

This works well and I appreciate why giving a file name is helpful.
Should the xcodegen output warn when the file was not generated due to no path provided? - or is this just something for the documentation?

Otherwise this is great, thanks again 👍

@brentleyjones
Copy link
Collaborator

I’ll review this tonight. Looks neat!

Sent with GitHawk

defaultInfoPlist["CFBundleName"] = "$(PRODUCT_NAME)"
defaultInfoPlist["CFBundleDevelopmentRegion"] = "$(DEVELOPMENT_LANGUAGE)"
defaultInfoPlist["CFBundleShortVersionString"] = "1.0"
defaultInfoPlist["CFBundleVersion"] = "1"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could this be stored in a static property?

Copy link
Owner Author

Choose a reason for hiding this comment

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

It could indeed. I'll refactor this stuff out into a InfoPlistGenerator as well

@lukewakeford
Copy link
Contributor

@yonaskolb I've just deleted my previous comments as I've got things working with a few additional yml files.

Is this likely to merge soon? - i'd like to start using this on my build servers.

@yonaskolb
Copy link
Owner Author

yonaskolb commented Oct 23, 2018

I'll work on this this weekend and get everything up to scratch. I'd like to add it to the next release.

I was expecting the entitlements file to be generated without defining a path

We couldn't make any good guesses about where to generate this path, so it's a required property for now

Should the xcodegen output warn when the file was not generated due to no path provided? - or is this just something for the documentation?

Yep, this should throw an error. I'll add this

@yonaskolb yonaskolb force-pushed the info_and_entitlement_generation branch from 0af8843 to f651560 Compare October 29, 2018 13:51
@yonaskolb yonaskolb force-pushed the info_and_entitlement_generation branch from f651560 to 26106a0 Compare October 29, 2018 13:52
@yonaskolb
Copy link
Owner Author

@lukewakeford completed. Note that attributes is now called properties

@yonaskolb yonaskolb force-pushed the info_and_entitlement_generation branch from f4632c4 to 0089dd2 Compare October 30, 2018 12:08
@yonaskolb yonaskolb merged commit a0bbe69 into master Oct 30, 2018
@yonaskolb yonaskolb deleted the info_and_entitlement_generation branch October 30, 2018 13:09
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