Well, bonjour MultipeerConnectivityService works. I added a test to MuPeer package here
Or at least, it works across VisionOS and iPhone simulators. But, doesn't show up on iPad running iPadOS 17 Beta 5.
My guess is that MTKView may wrap apis that conflict with xrOS, akin to UIScreen.main.bounds.
In the view controller's view
public var metalLayer = CAMetalLayer()
override func viewDidAppear(_ animated: Bool) { ...
view.layer.addSublayer(pipeline.metalLayer)
}
and manually replace drawableSizeWillChange
public func resize(_ viewSize: CGSize, _ scale: CGFloat) {
...
metalLayer.contentsScale = scale
metalLayer.drawableSize = viewSize
}
Oops, wrong reply field:
My guess is that MTKView may wrap apis that conflict with xrOS, akin to UIScreen.main.bounds.
In the view controller's view
public var metalLayer = CAMetalLayer()
override func viewDidAppear(_ animated: Bool) { ...
view.layer.addSublayer(pipeline.metalLayer) }
and manually replace drawableSizeWillChange
public func resize(_ viewSize: CGSize, _ scale: CGFloat) { ...
metalLayer.contentsScale = scale
metalLayer.drawableSize = viewSize }
In RealityKit and in Mixed Reality apps in general, the iPhone screen serves as a viewport onto virtual object anchored to a scene. Currently the user can rotate along the X and Y axis and the programmer can use Gyro to adjust viewport. But rotating along Z axis triggers a Landscape/Portrait animation which is very jarring to the user. So, preventing that animation is crucial for a seamless UX.
One possible way to enable is to switch
UIApplication.shared.connectedScenes.first?.effectiveGeometry.interfaceOrientation
from readonly to readwrite. I think that might work. But, that would be an API change. Better yet, is there something that we can do today?
I am also interested in access to PCM data for a music visualizer. Spotify already provides access but my preferences to start with Apple since I am developing an app that spans different Apple devices and I would like to keep it in the same ecosystem.
Well, bonjour MultipeerConnectivityService works. I added a test to MuPeer package here
Or at least, it works across VisionOS and iPhone simulators. But, doesn't show up on iPad running iPadOS 17 Beta 5.
My guess is that MTKView may wrap apis that conflict with xrOS, akin to UIScreen.main.bounds.
In the view controller's view
public var metalLayer = CAMetalLayer()
override func viewDidAppear(_ animated: Bool) { ...
view.layer.addSublayer(pipeline.metalLayer)
}
and manually replace drawableSizeWillChange
public func resize(_ viewSize: CGSize, _ scale: CGFloat) {
...
metalLayer.contentsScale = scale
metalLayer.drawableSize = viewSize
}
Oops, wrong reply field:
My guess is that MTKView may wrap apis that conflict with xrOS, akin to UIScreen.main.bounds.
In the view controller's view
public var metalLayer = CAMetalLayer()
override func viewDidAppear(_ animated: Bool) { ...
view.layer.addSublayer(pipeline.metalLayer) }
and manually replace drawableSizeWillChange
public func resize(_ viewSize: CGSize, _ scale: CGFloat) { ...
metalLayer.contentsScale = scale
metalLayer.drawableSize = viewSize }
In RealityKit and in Mixed Reality apps in general, the iPhone screen serves as a viewport onto virtual object anchored to a scene. Currently the user can rotate along the X and Y axis and the programmer can use Gyro to adjust viewport. But rotating along Z axis triggers a Landscape/Portrait animation which is very jarring to the user. So, preventing that animation is crucial for a seamless UX.
One possible way to enable is to switch
UIApplication.shared.connectedScenes.first?.effectiveGeometry.interfaceOrientation
from readonly to readwrite. I think that might work. But, that would be an API change. Better yet, is there something that we can do today?
I am also interested in access to PCM data for a music visualizer. Spotify already provides access but my preferences to start with Apple since I am developing an app that spans different Apple devices and I would like to keep it in the same ecosystem.