From 59d5e5c53cb773e7bf41c805cf550845252bf0f7 Mon Sep 17 00:00:00 2001 From: Cory Davis Date: Sun, 16 Nov 2025 13:04:43 -0500 Subject: [PATCH 1/2] fix: additional detection method needed for IsAppExtensionProduct --- .../go-xcode/xcodeproject/xcodeproj/target.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/vendor/github.com/bitrise-io/go-xcode/xcodeproject/xcodeproj/target.go b/vendor/github.com/bitrise-io/go-xcode/xcodeproject/xcodeproj/target.go index 4b34e9ef..6e6066f4 100644 --- a/vendor/github.com/bitrise-io/go-xcode/xcodeproject/xcodeproj/target.go +++ b/vendor/github.com/bitrise-io/go-xcode/xcodeproject/xcodeproj/target.go @@ -18,7 +18,11 @@ const ( LegacyTargetType TargetType = "PBXLegacyTarget" ) -const appClipProductType = "com.apple.product-type.application.on-demand-install-capable" +const ( + appClipProductType = "com.apple.product-type.application.on-demand-install-capable" + extensionKitExtensionFileExt = ".extensionkitextension" + extensionKitExtensionType = "com.apple.product-type.extensionkit-extension" +) // Target ... type Target struct { @@ -49,7 +53,12 @@ func (t Target) IsAppProduct() bool { // IsAppExtensionProduct ... func (t Target) IsAppExtensionProduct() bool { - return filepath.Ext(t.ProductReference.Path) == ".appex" + switch filepath.Ext(t.ProductReference.Path) { + case ".appex", extensionKitExtensionFileExt: + return true + } + + return t.ProductType == extensionKitExtensionType } // IsExecutableProduct ... From 10fe25f3d6c51c5ce67ec73377468226e1792d5c Mon Sep 17 00:00:00 2001 From: Cory Davis Date: Sun, 16 Nov 2025 13:41:22 -0500 Subject: [PATCH 2/2] feat: carry through to generation --- .../bitrise-io/go-xcode/v2/xcarchive/ios.go | 52 ++++++++++++++----- 1 file changed, 38 insertions(+), 14 deletions(-) diff --git a/vendor/github.com/bitrise-io/go-xcode/v2/xcarchive/ios.go b/vendor/github.com/bitrise-io/go-xcode/v2/xcarchive/ios.go index c945d99c..449b5072 100644 --- a/vendor/github.com/bitrise-io/go-xcode/v2/xcarchive/ios.go +++ b/vendor/github.com/bitrise-io/go-xcode/v2/xcarchive/ios.go @@ -83,6 +83,34 @@ type IosExtension struct { IosBaseApplication } +func findIosExtensionPaths(path string) ([]string, error) { + patterns := []string{ + filepath.Join(escapeGlobPath(path), "PlugIns/*.appex"), + filepath.Join(escapeGlobPath(path), "PlugIns/*.extensionkitextension"), + filepath.Join(escapeGlobPath(path), "Extensions/*.appex"), + filepath.Join(escapeGlobPath(path), "Extensions/*.extensionkitextension"), + } + + extensionPaths := []string{} + visited := map[string]struct{}{} + + for _, pattern := range patterns { + pths, err := filepath.Glob(pattern) + if err != nil { + return nil, fmt.Errorf("failed to search for extensions using pattern: %s, error: %s", pattern, err) + } + for _, pth := range pths { + if _, ok := visited[pth]; ok { + continue + } + visited[pth] = struct{}{} + extensionPaths = append(extensionPaths, pth) + } + } + + return extensionPaths, nil +} + // NewIosExtension ... func NewIosExtension(path string) (IosExtension, error) { baseApp, err := NewIosBaseApplication(path) @@ -115,10 +143,9 @@ func NewIosWatchApplication(path string) (IosWatchApplication, error) { } extensions := []IosExtension{} - pattern := filepath.Join(escapeGlobPath(path), "PlugIns/*.appex") - pths, err := filepath.Glob(pattern) + pths, err := findIosExtensionPaths(path) if err != nil { - return IosWatchApplication{}, fmt.Errorf("failed to search for watch application's extensions using pattern: %s, error: %s", pattern, err) + return IosWatchApplication{}, err } for _, pth := range pths { extension, err := NewIosExtension(pth) @@ -197,20 +224,17 @@ func NewIosApplication(path string) (IosApplication, error) { } extensions := []IosExtension{} - { - pattern := filepath.Join(escapeGlobPath(path), "PlugIns/*.appex") - pths, err := filepath.Glob(pattern) + pths, err := findIosExtensionPaths(path) + if err != nil { + return IosApplication{}, err + } + for _, pth := range pths { + extension, err := NewIosExtension(pth) if err != nil { - return IosApplication{}, fmt.Errorf("failed to search for watch application's extensions using pattern: %s, error: %s", pattern, err) + return IosApplication{}, err } - for _, pth := range pths { - extension, err := NewIosExtension(pth) - if err != nil { - return IosApplication{}, err - } - extensions = append(extensions, extension) - } + extensions = append(extensions, extension) } return IosApplication{