We discussed the possibilities and pitfalls of being able to directly instantiate an Anonymous SdfLayer from an ArAsset. We believe we could make this work for most FileFormats, but not for usdz assets, for reasons (and more) I alluded to in the GitHub Issue you filed.
But although you may not be running into it at the moment, this pattern seems vulnerable the moment you want to put such a layer on a stage. Under the assumption that under this constraint (no filesystem access), all of the layers in a composition would need to be handled this way, you’d be faced with the prospect of needing to modify each layer’s embedded asset paths to identify the anonymous layers you created for the other layers, and of course be tracking all of those dependencies and mappings yourself. THis is because as the composition engine comes across a reference to another asset, it will resolve it through ArResolver to find the layer to open and add to the composition.
That’s a key reason why the “natural” solution to this problem is to deploy an ArResolver that can be populated with data streams and identifier mappings to those streams. Then you can put any such layer on a Stage without modification, and the resolver keeps track of all the layer mappings, and all the downstream clients of the system “just work”. And it would enable usdz packages to work also, I think (there might be some work needed to the UsdzPackageResolver which we’d be happy to look into if so.)