Post

Replies

Boosts

Views

Activity

Reply to WKWebView using URLRequest HTTPBody is nil in WKNavigationDelegate (decidePolicyFor)
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.
Mar ’20
Reply to WKWebView using URLRequest with POST results in nil body
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.
Mar ’20
Reply to Where are the SceneKit WWDC videos..?
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.
Feb ’24
Reply to MusicKit on VisionOS
+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...
Apr ’24
Reply to Reacting to hover on a RealityKit Entity
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.
Jul ’24