Add WidgetKit extension target support for plugins#174
Draft
Matildevoldsen wants to merge 1 commit into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ios.extension_targetsmanifest API, initially scoped to WidgetKit app extensionsWhy
WidgetKit code runs in a separate process and must be built as its own
com.apple.product-type.app-extensiontarget. Plugins can currently copy Swift into the host app, but they cannot declare or embed that additional target. This implements the core portion requested in NativePHP discussion #669.Manifest API
{ "ios": { "min_version": "17.0", "entitlements": { "com.apple.security.application-groups": [ "group.${APP_ID}.widgets" ] }, "extension_targets": [ { "name": "NativePHPWidgetsExtension", "type": "widget-extension", "bundle_id_suffix": "widgets", "sources_dir": "extension", "info_plist": { "CFBundleDisplayName": "NativePHP Widgets" } } ] } }deployment_targetis optional and falls back toios.min_version, then iOS 17. The compiler injects the WidgetKit extension point and owns bundle/version/package plist keys so manifests cannot create signing mismatches.For manual distribution signing,
IOS_EXTENSION_PROVISIONING_PROFILESaccepts a JSON object keyed by each full extension bundle ID. Values may be readable.mobileprovisionpaths or strict base64. Profiles are CMS-decoded, checked against the exactapplication-identifier, installed by UUID, applied to the generated target, and added toExportOptions.plist.Safety and packaging
ios/Extensionscontent is preservedpod install.appexbundles usexcodebuild -exportArchiveso Xcode preserves nested signatures and entitlementsVerification
plutilvalidation: generated host/extension entitlements and extension Info.plist passedpod installafter target injection: target preserved and repeated compilation remained byte-identicalNativePHP-simulatorworkspace build passed on iPhone 17 Pro Max simulatorPlugIns/NativePHPWidgetsExtension.appexcom.matildeene.laraloom.widgetsiphoneosextension build produced an arm64 Mach-OThe manual profile installation/export boundary is integration-tested with decoded profile fixtures. A live App Store export was not attempted because that requires matching production host and extension profiles.
Scope
This draft intentionally covers iOS WidgetKit target support only. The Android receiver metadata and resource-copy primitives described by the original widget proposal are already present in current core. Once the manifest shape is agreed, I can follow with the separate documentation PR requested by the contribution guide.