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

Simplify iOS development team setup #368

Merged
merged 3 commits into from
Dec 19, 2023

Conversation

rolandkakonyi
Copy link
Contributor

@rolandkakonyi rolandkakonyi commented Dec 19, 2023

Description

Currently when trying to run the iOS or tvOS example application on a physical device, it ends up with an error requiring an Apple Development Team to be set in the project file.
This is a change that should not be committed into the repository as the development team can be unique to each contributor.
This causes unnecessary overhead with change management.
This PR changes that to simplify the handling of this via an optional Developer.xcconfig file.

Changes

  1. Introduced specific build configuration files (.xcconfig) for iOS and tvOS per config (Debug/Release) and configured to optionally import the Developer.xcconfig file.
    Same way as in our Flutter Player SDK.
  2. Updated CONTRIBUTING.md with the instructions for setup.
  3. Applied workaround for Resource Bundle targets from the Pods project to avoid the need of a development team there.

NOTE: if you already have the project checked out, you need to run yarn example pods for the Pods project workaround to take effect.

Checklist

  • 🗒 CHANGELOG entry - not applicable, only example project and documentation changes

@rolandkakonyi rolandkakonyi self-assigned this Dec 19, 2023
target_is_resource_bundle = target.respond_to?(:product_type) && target.product_type == 'com.apple.product-type.bundle'
target.build_configurations.each do |config|
if target_is_resource_bundle
config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
Copy link
Contributor Author

@rolandkakonyi rolandkakonyi Dec 19, 2023

Choose a reason for hiding this comment

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

This is needed to workaround the required code-signing for resource bundle targets.

Initially I wanted to set the team properly but it is not trivial to get the value out of the Developer.xcconfig file.
This is no problem as long as we don't want to submit the example application to the App Store (it will never happen 🙂 )

Copy link
Contributor

@zigavehovec zigavehovec Dec 19, 2023

Choose a reason for hiding this comment

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

Thanks for the comment. Might be worth to add it to the code also 🙂

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a great idea, added comment for all workaround here: ed4dfa5

@rolandkakonyi rolandkakonyi marked this pull request as ready for review December 19, 2023 13:37
Copy link
Contributor

@zigavehovec zigavehovec left a comment

Choose a reason for hiding this comment

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

LGTM!

target_is_resource_bundle = target.respond_to?(:product_type) && target.product_type == 'com.apple.product-type.bundle'
target.build_configurations.each do |config|
if target_is_resource_bundle
config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
Copy link
Contributor

@zigavehovec zigavehovec Dec 19, 2023

Choose a reason for hiding this comment

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

Thanks for the comment. Might be worth to add it to the code also 🙂

@rolandkakonyi rolandkakonyi merged commit 36036f1 into development Dec 19, 2023
4 checks passed
@rolandkakonyi rolandkakonyi deleted the feature/simplify-developer-team-setup branch December 19, 2023 14:48
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.

2 participants