We found a solution that will not require drastic changes or javascript. Basically you need to make use of WKURLSchemeHandler protocol:1. Setup webviewlet config = WKWebViewConfiguration()
config.setURLSchemeHandler(self, forURLScheme: "my-custom-scheme")
let wkWebView = WKWebView(frame: .zero, configuration: config)2. Implement WKURLSchemeHandler protocolfunc webView(_ webView: WKWebView, start urlSchemeTask: WKURLSchemeTask) {
if let url = urlSchemeTask.request.url, url.scheme == "my-custom-scheme" {
self.handleTermURLCallback(urlSchemeTask.request)
}
}By using this you'll find that your request httpBody in the callback is not null and you can continue the same way you used to with UIWebView.It took a lot of effort to find this but it is working for us and we didn't need to change very much. Hope it helps you guys.
Post
Replies
Boosts
Views
Activity
We found a solution that will not require drastic changes or javascript. Basically you need to make use of WKURLSchemeHandler protocol:1. Setup webviewlet config = WKWebViewConfiguration()
config.setURLSchemeHandler(self, forURLScheme: "my-custom-scheme")
let wkWebView = WKWebView(frame: .zero, configuration: config)2. Implement WKURLSchemeHandler protocolfunc webView(_ webView: WKWebView, start urlSchemeTask: WKURLSchemeTask) {
if let url = urlSchemeTask.request.url, url.scheme == "my-custom-scheme" {
self.handleTermURLCallback(urlSchemeTask.request)
}
}By using this you'll find that your request httpBody in the callback is not null and you can continue the same way you used to with UIWebView.Just set the URL to be my-custom-schemeYou'll also no longer need to cancel requests in the WKNavigationDelegate that match your url. This actually ends up being a nice improvement over UIWebView!It took a lot of effort to find this but it is working for us and we didn't need to change very much. Hope it helps you guys.
Another gotcha to look our for are things in asset catalogues such as colours. i.e.
var mycol = UIColor(named: "mycol")!
will crash because the colour can't be found in whatever context the xib is running. Do this instead:
var mycol = UIColor(named: "mycol", in: Bundle(for: MyView.self), compatibleWith: nil)!
This is annoying beyond words - for now you can get to Connect by logging in through https://developer.apple.com/ and then choosing AppStore Connect from the menu on the left.
Hi Quinn. This an iOS app.
It's certainly not had a lot of development over the past couple of years but I think that's partly for two reasons:
RealityKit has clearly been a priority due to the Vision Pro.
SceneKit is already fairly mature and works well - although some things are fiddly.
SceneKit has a scene graph, PBR works, there are hooks for post processing (SCNTechnique), there is a way to overwrite rendering for an an object (SCNProgram or snippets) so you can basically do anything you want - but you need to be fairly experienced in rendering tech if you want to go out of the realm of the editor.
I use SceneKit all the time for hobbies and it works really well - docs could be a lot better but there is stuff out there.
SceneKit does not provide any VR/AR functionality so if that's a use case you can scrub it from your options.
+1
I'm working around this by making my music model code separate from the main app. That way I can target it to an iOS device and get it working. Then I can use that in my Vision Pro app but with mocked data. Very clunky.
So basically build to an interface and mock the data on the pro when testing, and using your none mock data when going to production.
Check it actually works by using your iPhone or iPad.
I really wish there was a way to simulate this...
Hi thanks for your reply. I've created an enhancement request FB14241109 'Create developer hooks to respond to hovering over Entities'.
It might be a bit late in the day, but it would be great to have this for the release of visionOS 2. I have a bunch of use cases in various apps that would be better with this functionality.
I have a similar problem. I have a particle effect that is contained within an object that is semi opaque (it looks like glass) The particles are flashing in and out. Once I get through the glass it all works ok.
I filed a feedback to the RealityKit team explaining my issue: FB14285128