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 support for ExtensionKit App Extensions with extensionkit_extension = True #1944

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

maustinstar
Copy link

@maustinstar maustinstar commented Apr 14, 2023

Related issue: #1943

Plugin App Extensions

Before iOS 16.0, App Extensions were a product type com.apple.product-type.app-extension, build artifacts were installed into the app’s PlugIns directory, and the bundle’s Info.plist properties are defined in an NSExtension dictionary.

ExtensionKit App Extensions

iOS 16, macOS 13, tvOS 16, and watchOS 9, introduced ExtensionKit extensions for newer extensions like the Background Asset Downloader, App Intents, and even third-party-defined extension points.

Distinct from the plugin-type app extensions, ExtensionKit extensions have a product type com.apple.product-type.extensionkit-extension, build artifacts are installed into the app’s Extensions directory, and the bundle’s Info.plist properties are defined in an EXAppExtensionAttributes dictionary.

Architecture Decisions

I noticed the watchos_extension has an attribute to change the product type and linking flags. It's used by setting application_extension = True on watchos_extension. This PR follows a similar pattern by setting extensionkit_extension = True to update the product type and bundle install location.

Alternatively, I considered introducing a separate rule for ExtensionKit app extensions, but this seems to make existing extension rules lose generalizability

@google-cla
Copy link

google-cla bot commented Apr 14, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@BalestraPatrick
Copy link
Member

BalestraPatrick commented Jun 5, 2023

Looks like we have this in the upstream branch now: 3eb01c3

Unclear yet how the implementation differs.

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