I have been trying for hours to get this to work and keep ending up with an empty page as rendered in the modal. (Edit Cart Link Integration).
Is there a super minimal hello-world app available for Shopify POS and App Bridge ?
import createApp from '@shopify/app-bridge';
import { Toast } from '@shopify/app-bridge/actions';
const root = document.getElementById("root");
const providerProps = {
apiKey: root.dataset.apiKey,
shopOrigin: root.dataset.shopOrigin
};
const app = createApp(providerProps);
const toastOptions = {
message: 'Product saved',
duration: 5000,
};
const toastNotice = Toast.create(app, toastOptions);
toastNotice.dispatch(Toast.Action.SHOW);
Here is a very minimal attempt at triggering a Toast via app bridge on ShopifyPOS. The Toast does not appear. I have confirmed the apiKey and shopOrigin values are correct.