ARKit : Couldn't load AR reference object from URL or AR Resource group

I have a arobject files that's already tested and working perfectly in Reality Composer as an anchor. But for whatever reason when I try them both as AR Resource group in my asset or even loading it directly from the url it always fails (returns nil) I've double check all the file/group names and they seems fine and I couldn't find the error, just always nil. This is my code :

var referenceObject: ARReferenceObject?
 if let referenceObjects = ARReferenceObject.referenceObjects(inGroupNamed: "TestAR", bundle: Bundle.main) {
                referenceObject = referenceObjects[referenceObjects.startIndex]
            }
            
if let referenceObject = referenceObject{
                delegate.didFinishScan(referenceObject, false)
            }else {
                do {
                    if let url = Bundle.main.url(forResource: "Dragonball1", withExtension: "arobject") {
                        
                        referenceObject = try ARReferenceObject(archiveURL: url)
                    }
                } catch let myError{
                    let error = myError as NSError
                    print("try \(error.code)")
                }
            }

Any idea? Thanks

I'm having the same issue. Did you even figure out why the referenceobjects are always nil when trying to load from the ResourceGroup?

This is my code to load in the makeUIView() function.

        let configuration = ARWorldTrackingConfiguration()
        guard let referenceObjects = ARReferenceObject.referenceObjects(inGroupNamed: "Test", bundle: Bundle.main) else {
            
            let ro = ARReferenceObject.referenceObjects(inGroupNamed: "Test", bundle: nil);
            let ro1 = ARReferenceObject.referenceObjects(inGroupNamed: "Gallery", bundle: .main);
            fatalError("Resource not found")
        }

I fail the guard statement here and ro and ro1 are set to nil.

I have the corresponding assets in the Asset Catalog

ARKit : Couldn't load AR reference object from URL or AR Resource group
 
 
Q