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 extension product types (new in Xcode 14) #687

Closed
kwridan opened this issue Jun 7, 2022 · 5 comments Β· Fixed by #691
Closed

Add support for ExtensionKit extension product types (new in Xcode 14) #687

kwridan opened this issue Jun 7, 2022 · 5 comments Β· Fixed by #691

Comments

@kwridan
Copy link
Collaborator

kwridan commented Jun 7, 2022

Context πŸ•΅οΈβ€β™€οΈ

Xcode 14 has introduced a few new frameworks and associated extension product types:

app-intents

background-assets

What 🌱

  • The new extensions have a new product type com.apple.product-type.extensionkit-extension which not currently supported by XcodeProj
		FB2930F2284F86D7004FAF29 /* AppIntentsExtension */ = {
			isa = PBXNativeTarget;
			buildConfigurationList = FB2930FB284F86D7004FAF29 /* Build configuration list for PBXNativeTarget "AppIntentsExtension" */;
			buildPhases = (
				FB2930EF284F86D7004FAF29 /* Sources */,
				FB2930F0284F86D7004FAF29 /* Frameworks */,
				FB2930F1284F86D7004FAF29 /* Resources */,
			);
			buildRules = (
			);
			dependencies = (
			);
			name = AppIntentsExtension;
			productName = AppIntentsExtension;
			productReference = FB2930F3284F86D7004FAF29 /* AppIntentsExtension.appex */;
			productType = "com.apple.product-type.extensionkit-extension";
		};
		FBE4DE842859B1EC00C6A189 /* BackgroundExt */ = {
			isa = PBXNativeTarget;
			buildConfigurationList = FBE4DE8E2859B1EC00C6A189 /* Build configuration list for PBXNativeTarget "BackgroundExt" */;
			buildPhases = (
				FBE4DE812859B1EC00C6A189 /* Sources */,
				FBE4DE822859B1EC00C6A189 /* Frameworks */,
				FBE4DE832859B1EC00C6A189 /* Resources */,
			);
			buildRules = (
			);
			dependencies = (
			);
			name = BackgroundExt;
			productName = BackgroundExt;
			productReference = FBE4DE852859B1EC00C6A189 /* BackgroundExt.appex */;
			productType = "com.apple.product-type.extensionkit-extension";
		};

Proposal πŸŽ‰

  • Add a new supported PBXProductType. extensionKitExtension that maps to com.apple.product-type.extensionkit-extension

Questions ❓

  • Should it be appIntentsExtension or something more raw like extensionKitExtension ?

Looking at appExtension, the same product type is used for several extension types (e.g. NotificationsServiceExtension, WidgetKitExtension, SiriKit IntentsExtension, etc...) - as such calling appIntentsExtension may require a breaking change to generalise it the future should new extensions appear that share the same product type 🀐

@kwridan
Copy link
Collaborator Author

kwridan commented Jun 7, 2022

For consistency with the current appExtension in the library, I'm leaning towards extensionKitExtension - within XcodeGen / Tuist (or other generator tooling), we can map from .appIntentsExtension > .extensionKitExtension.

Does this sound reasonable?

@fortmarek
Copy link
Member

Does this sound reasonable?

Yes, I believe so πŸ‘ πŸ‘€

@kwridan
Copy link
Collaborator Author

kwridan commented Jun 15, 2022

As I suspected, the same product type is used for a few different extension types, the new product type is also used for the Background Assets extension.

		FBE4DE842859B1EC00C6A189 /* BackgroundExt */ = {
			isa = PBXNativeTarget;
			buildConfigurationList = FBE4DE8E2859B1EC00C6A189 /* Build configuration list for PBXNativeTarget "BackgroundExt" */;
			buildPhases = (
				FBE4DE812859B1EC00C6A189 /* Sources */,
				FBE4DE822859B1EC00C6A189 /* Frameworks */,
				FBE4DE832859B1EC00C6A189 /* Resources */,
			);
			buildRules = (
			);
			dependencies = (
			);
			name = BackgroundExt;
			productName = BackgroundExt;
			productReference = FBE4DE852859B1EC00C6A189 /* BackgroundExt.appex */;
			productType = "com.apple.product-type.extensionkit-extension";
		};

@kwridan kwridan changed the title Add support for AppIntents extension product types (new in Xcode 14) Add support for ExtensionKit extension product types (new in Xcode 14) Jun 15, 2022
kwridan pushed a commit that referenced this issue Jun 29, 2022
Resolves: #687

### Short description πŸ“
From Xcode14 beta 1, `com.apple.product-type.extensionkit-extension` was introduced as the new productType.
The new productType is used for a new app extension like AppIntents Extension.

### Solution πŸ“¦
Added `.extensionKitExtension` as the new case of `PBXProductType` in this PR, to support the new productType.

### Implementation πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»
- [x] Added `.extensionKitExtension` as the new case of `PBXProductType`
- [x] Added `fileExtension` of `.extensionKitExtension`
- [x] Added a new UnitTest for `.extensionKitExtension`
@freddi-kit
Copy link
Contributor

Sorry for asking again. when is this change release?

@kwridan
Copy link
Collaborator Author

kwridan commented Jul 14, 2022

We had a few more PRs pending πŸ˜…

This should now be in
https://github.com/tuist/XcodeProj/releases/tag/8.8.0

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

Successfully merging a pull request may close this issue.

3 participants