'Problems when using Autodesk Viewer on iOS 14 device
I'm integrating the Autodesk Viewer in an iOS application.
For that I am using an WKWebView to load the local HTML and javascript to load files from Forge and display them in the web view. Everything is working nice on iOS 15, but on iOS 14 devices I'm having an issue when starting the viewer (I'm using the last 7.x version).
Autodesk.Viewing.Initializer(options, function() {
var htmlDiv = document.getElementById('forgeViewer');
viewer = new Autodesk.Viewing.GuiViewer3D(htmlDiv);
var startedCode = viewer.start(); // Here the code stops
if (startedCode > 0) {
var message = errorMessage(errorCode)
notifyFailure(message)
return;
}
isStarted = true
if (pendingUrn) {
loadUrl(pendingUrn)
pendingUrn = null
}
});
In the javascript console I'm seeing those warnings:
THREE.WebGLRenderer: WEBGL_compressed_texture_s3tc extension not supported.
THREE.WebGLRenderer: OES_texture_float_linear extension not supported.
THREE.WebGLRenderer: WEBGL_draw_buffers extension not supported.
Note: on iOS 15 I'm also having this warning only: THREE.WebGLRenderer: WEBGL_compressed_texture_s3tc extension not supported.
I've seen that WebGL 2 isn't supported on my iOS 14.5 device, so I'm guessing the problem is related to the support of WebGL 2 but I don't see any reference to the supported platforms. Even more odd I don't have any issue when displaying the Autodesk viewer in the same device in Safari while hosted on our website.
Any ideas on how I can fix this problem? Maybe I'm missing a parameter somewhere to allow WebGL 1 compatibility?
Solution 1:[1]
Updates Apr 08.
This issue has been resolved in Forge Viewer v7.65.
====
I don't have an iOS 14 device for testing, but you may try to disable WebGL2.0 in Forge Viewer like the below:
viewer.start(someUrl, someOptions, someSuccessCallback, someErrorCallback, {
webglInitParams: {
useWebGL2: false
}
});
ref: https://forge.autodesk.com/blog/custom-shader-materials-forge-viewer
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |