Search code examples
iosxcodeios-app-extensionvisionos

How to remove embedded content built for iOS platform from xrOS target?


I tried to build my iOS target for visionOS and get the following error:

Your target is built for xrOS but contains embedded content built for the iOS platform (Ploppy Pairs Clip.appex), which is not allowed.

and the same for Ploppy Pairs.clip.

I can see from the ending that this somehow belongs to the App Clip and App extension due to the endings, but does anyone know how to fix this?


Solution

  • I found out that you have to deselect visionOS under your iOS target -> General -> Frameworks, Libraries, and Embedded Content -> Filters -> The icon next to Always Used. By default, there is Allow any platform selected, and there you just have to deselect visionOS.

    enter image description here

    Or you can also select the iOS target -> Build Phases -> Embed App Extensions / Embed App Clips -> Filters.

    enter image description here