RealityKit and Reality Composer incompatibile with iOS 12 support

Hi,

In a new update of my app I want to integrate a new AR function using the Reality Composer, this function will available only for iOS 13, but I have a problem.

I want to maintain my project compatible with iOS 12, but I'm unable to do this.

When I set the compatibility with iOS 12 the swift file auto-generated by the .rcproject give me a lots of errors "... is only available in iOS 13.0 or newer". I tried to add "@available(iOS 13.0, *)" but when I rebuild the project xCode restores the original file and returns me the same errors "... is only available in iOS 13.0 or newer".


There is a solution for these?

Thanks in advance

FS

Having the same problem. Is it just too hard to add `@available(iOS 13.0, *)` for the main generated class Apple guys? Come on, you can do better than that..

Is there any possible solution or we're just screwed and can throw all our work in the trash because Apple didn't expect that someone would use Reality composer in app with lower deployment target?

Ok, so I found a solution. You can't use the *.rcproject, but you can use the generated *.reality file. Add it to your project and then just copy paste the generated code in your own swift file and add `@available(iOS 13.0, *)` in front of the main class.

Of course, you then need to do this again with every change in the reality composer project.

I sent couple report tickets to Apple and it's finally fixed! Just download new Xcode version (Xcode 12 beta 6 and above)
RealityKit and Reality Composer incompatibile with iOS 12 support
 
 
Q