Sketchfab API - selectAnotation event on IOS doesn't work

I have a problem with working “annotationSelect” event on IOS, when using Sketchfab API. It works properly on browsers like Chrome and Firefox, but it doesn’t work on IOS. Nothing works when clicking on annotations. What should I do?

Here is a piece of code:

  api.addEventListener('viewerready', function () {

  console.log('Viewer is ready');

  api.addEventListener('annotationSelect', function (index) {
            window.webkit.messageHandlers.iosListener.postMessage(index) //doesn't work

What Should I do?


Trying to understand the bug, it works on browser on iOS (chrome/firefox but safari too ?)
But doesn’t work inside an “ios app” ?

1 Like

Hi! thanks for your reply! It had made me check how it works in safari and I found a problem. It’s actually not connected with Sketchfab api itself but it’s connected with safari innerHTML support problems. I use innerHTML to insert some javascript code. thank you :slight_smile: