MobileNativeFoundation/rules_xcodeproj

Bug: Xcode Previews failing in extensions

andre-alves opened this issue · 2 comments

Description

I'm not sure if it's a recent regression or not, but Xcode Previews is not working with extensions:

The app extension ”WidgetExtension.appex” needs to be embedded in an app in order to use previews
image

Reproduction steps

It's possible to reproduce using the integration example without any changes:

  • cd examples/integration
  • bazel run //:xcodeproj-incremental-bazel-sim_arm64
  • open Integration.xcodeproj
  • Select schemeiOSApp or WidgetExtension in iOSApp
  • Open WidgetExtension.swift and check previews

Expected behavior

Xcode Previews to display.

rules_xcodeproj version

main (de3089f)

Xcode version

15.2

Bazel version

7.1.0

rules_apple version

3.5.0

rules_swift version

1.18.0

Additional information

No response

Got it! Xcode Previews just need explicit dependency between the app and the extension to work.

Target Dependencies Xcode Previews
Screenshot 2024-04-06 at 11 45 37 Screenshot 2024-04-06 at 11 38 34

Draft with possible fix: #2999

@andre-alves Can you verify that #3005 fixes this for you?