Web Bluetooth functionality through App Bridge

benfagan
Visitor
3 0 0

Hi, I'm building an app for the shopify pos and my app uses the web bluetooth api. I currently get an error when testing saying bluetooth is unavailable because the apps are displayed through an iframe.

Is there a way for me to get access to the bluetooth web api for my app?

Replies 4 (4)

CalD
Shopify Staff
140 22 36

Hey @benfagan,

Is your iframe loaded already through an application proxy? (similar thread here). If not, this is something you could look into, although I'm not certain to what extent the web bluetooth API supports iframe behaviour.

CalD | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

benfagan
Visitor
3 0 0

Hey @CalD,

Thanks for the response.  I was trying to use App Bridge so that our app can be used in the Shopify POS, which I think renders through an iframe.  Can proxies be used to render inside the POS without App Bridge or an iframe?

Looks like permission delegation from parent to child through an iframe is being worked on by chromium: https://bugs.chromium.org/p/chromium/issues/detail?id=518042.  But not yet implemented.

CalD
Shopify Staff
140 22 36

App Bridge should be sufficient in this case. If you haven't already found it, here's some documentation you can read on Application Proxies and App Bridge, although it sounds like that chromium issue is what you're waiting for!

CalD | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

benfagan
Visitor
3 0 0

Sorry, I'm trying to avoid using an iframe, which App Bridge uses.  Chromium is working on a way to delegate permissions through iframes.

Was wondering if an app proxy can be used to render inside the Shopify POS or if I need to use App Bridge.