How to add a Reality Composer Pro project to a Multiplatform project?

If I create a visionOS app project, it automatically creates a RealityKitContent package. However, if I create a Multiplatform project (for visionOS, macOS, and iOS), the package is not added. Is it possible to add it manually? How? (using Xcode 16.1 beta 2)

Answered by Vision Pro Engineer in 808254022

@eddo I would suggest that you create a new Reality Composer Pro project and then add that as a swift package dependency in your Multiplatform Xcode project. You should be able to do so by following these steps:

  1. File > Add Package Dependencies…
  2. In the open window click on ‘Add Local’
  3. Select the folder which contains the Reality Composer Pro project.
  4. Click on ‘Add Package’
  5. Now the RCP project should show up under a new ‘Package Dependencies’ section in the navigator.
  6. Now create a ‘Packages’ folder under your app's folder in the navigator.
  7. Drag the RCP package from the ‘Package dependencies’ section into the ‘Packages’ folder.

Now you should be able to import the content and use it in your code.

Accepted Answer

@eddo I would suggest that you create a new Reality Composer Pro project and then add that as a swift package dependency in your Multiplatform Xcode project. You should be able to do so by following these steps:

  1. File > Add Package Dependencies…
  2. In the open window click on ‘Add Local’
  3. Select the folder which contains the Reality Composer Pro project.
  4. Click on ‘Add Package’
  5. Now the RCP project should show up under a new ‘Package Dependencies’ section in the navigator.
  6. Now create a ‘Packages’ folder under your app's folder in the navigator.
  7. Drag the RCP package from the ‘Package dependencies’ section into the ‘Packages’ folder.

Now you should be able to import the content and use it in your code.

How to add a Reality Composer Pro project to a Multiplatform project?
 
 
Q