Solved

App-bridge - Close App

tomchan
Excursionist
13 0 5

I found in below docs that the POS Close Modal is Deprecated in app-bridge:

https://help.shopify.com/en/api/embedded-apps/app-bridge/migrating

 

Is there really no alternatives to this method if my app is using app-bridge? 

 

 

Accepted Solutions (2)

Henry_Tao
Shopify Staff
91 28 15

This is an accepted solution.

Hi @tomchan ,

 

There is no alternatives to this method in App Bridge. Do you have a good use case for it? 

Henry | Social Care @ 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 the Shopify Help Center or the Shopify Blog

View solution in original post

Henry_Tao
Shopify Staff
91 28 15

This is an accepted solution.

I made a feature request ticket for this. I will let you know when it is supported.

Henry | Social Care @ 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 the Shopify Help Center or the Shopify Blog

View solution in original post

Replies 10 (10)

Henry_Tao
Shopify Staff
91 28 15

This is an accepted solution.

Hi @tomchan ,

 

There is no alternatives to this method in App Bridge. Do you have a good use case for it? 

Henry | Social Care @ 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 the Shopify Help Center or the Shopify Blog

tomchan
Excursionist
13 0 5

Hi Henry,

 

My app calculate discount and apply it to the cart. It's good if the app can close automatically after the discount is applied. 

 

Henry_Tao
Shopify Staff
91 28 15

This is an accepted solution.

I made a feature request ticket for this. I will let you know when it is supported.

Henry | Social Care @ 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 the Shopify Help Center or the Shopify Blog

development_s57
Shopify Expert
6 0 4

Hi Henry,

 

I just wanted to follow up on this method. Is it released yet?

 

Thanks!

Henry_Tao
Shopify Staff
91 28 15

Hi @development_s57 

 

We haven't had new updates for this yet unfortunately. 

 

Thanks, 

Henry

Henry | Social Care @ 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 the Shopify Help Center or the Shopify Blog

development_s57
Shopify Expert
6 0 4

Hi Henry,

 

Do you have an estimated timeline for this release?

 

Thank you so much!

Henry_Tao
Shopify Staff
91 28 15

Hi @development_s57 

 

It is scheduled for next year but we haven't had fix timeline for it yet. I will post here when we have new updates.

 

Thanks, 

Henry

Henry | Social Care @ 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 the Shopify Help Center or the Shopify Blog

FezVrasta
Tourist
11 0 1

Hi, I see the Close action is now available but when I execute it nothing seems to happen. Did anyone manage to make it work?

 

https://shopify.dev/tools/app-bridge/actions/pos

Henry_Tao
Shopify Staff
91 28 15

Hi @FezVrasta 

Can you let me know what App Bridge version you are using? What platform (Android / iOS) are you testing? 

Henry | Social Care @ 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 the Shopify Help Center or the Shopify Blog

FezVrasta
Tourist
11 0 1

Hi! I'm on 1.30.0 and I'm trying it on iOS (iPhone with latest iOS update)

If it helps, this is the code I'm sending, other App Bridge commands (such as Cart) work just fine.

 

 <!DOCTYPE html>
  <script src="https://unpkg.com/@shopify/app-bridge@1.30.0/umd/index.js"></script>
  <script>
    const AppBridge = window['app-bridge'];
    const params = new URL(window.location.href).searchParams;
    const shop = params.get('shop');
    const shopifyApp = AppBridge.createApp({
      apiKey: 'xxxxxxxxxx',
      shopOrigin: shop,
    });
    const pos = AppBridge.actions.Pos.create(shopifyApp);
    pos.dispatch(AppBridge.actions.Pos.Action.CLOSE);
  </script>