Build Errors for Reality Composer Pro Packages in Xcode 16 Beta 6 for iOS 18

Using Xcode 15.4, I have successfully built and run my app using Reality Composer Pro Version 1.0 package. I then successfully submitted that app version for release. Now, using Xcode 16 Beta 6, I've created a new branch repository for updating my app for iOS/iPadOS 18 and visionOS 2. However, once I created and switched to the new branch and did a build, I get build errors. It seems to be regarding the package manifest that relates to my Reality Composer Pro package that is part of my app. When I go to the package file in my project navigator and click the Open in Reality Composer Pro button, my package opens in Reality Composer Pro 2.0, which makes sense since it it the version for Xcode 16. However, I don't know how to address/get rid of the build errors. I've added and image of my build errors.

Answered by aandyzoom01 in 804723022

I wound up having to do your second piece of advice. I had to go into the project, then the project settings under general, scroll down to the area where frameworks and libraries are listed, and I saw my package listed there. I wound up having to click the minus sign to remove my package from that area. Then, I went to my Target and went to Package dependencies menu and I deleted the package reference in that location as well. Once I did another build action, I got a build error wherever I called import package in my swiftUI files. Once I clicked on the error, it asked for me to associate a package. I went and found my package locally on disk and added it. Once I did that, I went to my target build dependencies menu and saw that the package was then re-inserted and then went back to my project settings under general and found that that package had also been added to the frameworks and library section. At that point I was able to build again and with no errors.

So I guess the issue is that with both Xcode 15 and Xcode 16, at least with a Reality Composer Pro package, Xcode doesn’t properly preserve a Reality Composer Pro package going into a new branch created from my main branch. This happened multiple times during my app development process this summer. I submitted this issue in a couple of radar feedbacks earlier in the summer, but they were closed supposedly because there wasn’t enough information. I’d appreciate if Apple could go look at those two feedbacks and reopen them and fix it so that whenever a Reality Composer Pro package manifest is part of a branch repository and a new branch repository is created from an existing one, that these package dependency errors don’t occur.

Here are the feedback numbers: FB14829607 and FB14786606

Apple. Please respond to this. I need Apple DTS support to understand how to fix these package build errors.

Link to similar issue I recently had: https://developer.apple.com/forums/thread/761776

This is consistent in Xcode 16 Beta 6 and occurs on alll my source control feature branches, as well as my main branch. Does not occur on any of my source control feature branches, nor on my main branch, in Xcode 15.4.

it seems Xcode 16 is not properly handling my project‘s Reality Composer Pro package and is unable to locate the package even though it’s definitely in the path location to which the error is referring

Doing a clean build folder fails. Also resetting package cache executes but does not work to fix the build error. Deleting the DerivedData folder under /Library/Developer/Xcode does not work.

What happens if you make a completely new checkout of your repository, to a new location on disk? A second tact here based on the error message would be to remove your package from the project entirely, go through your project's structure afterwards and make sure there's no other references in build phases, target memberships, file associations, and then reassociate it. What happens when you do that?

— Ed Ford,  DTS Engineer

Accepted Answer

I wound up having to do your second piece of advice. I had to go into the project, then the project settings under general, scroll down to the area where frameworks and libraries are listed, and I saw my package listed there. I wound up having to click the minus sign to remove my package from that area. Then, I went to my Target and went to Package dependencies menu and I deleted the package reference in that location as well. Once I did another build action, I got a build error wherever I called import package in my swiftUI files. Once I clicked on the error, it asked for me to associate a package. I went and found my package locally on disk and added it. Once I did that, I went to my target build dependencies menu and saw that the package was then re-inserted and then went back to my project settings under general and found that that package had also been added to the frameworks and library section. At that point I was able to build again and with no errors.

So I guess the issue is that with both Xcode 15 and Xcode 16, at least with a Reality Composer Pro package, Xcode doesn’t properly preserve a Reality Composer Pro package going into a new branch created from my main branch. This happened multiple times during my app development process this summer. I submitted this issue in a couple of radar feedbacks earlier in the summer, but they were closed supposedly because there wasn’t enough information. I’d appreciate if Apple could go look at those two feedbacks and reopen them and fix it so that whenever a Reality Composer Pro package manifest is part of a branch repository and a new branch repository is created from an existing one, that these package dependency errors don’t occur.

Here are the feedback numbers: FB14829607 and FB14786606

Build Errors for Reality Composer Pro Packages in Xcode 16 Beta 6 for iOS 18
 
 
Q