AppBridge sometimes does not dispatch actions in iOS Shopify App

Highlighted
New Member
5 0 0

My app needs appBridge to dispatch some actions in iOS Shopify App. The actions sometimes are not dispatched. It often works if I restart the Shopify App, and enters my app and dispatch the actions immediately. However, if I exit my app, go to another page (e.g. products admin) and go back to my app, it always fails.

I tried different types of actions. Loading.Action.START, Scanner.Action.OPEN_CAMERA, ResourcePicker.Action.OPEN, Features.Action.REQUEST. All have the same behavior, so I think it is not related to app permissions.

 

const app = createApp({
  apiKey: SHOPIFY_API_KEY,
  shopOrigin: shopOrigin
});

const loading = Loading.create(app);

dispatchLoading() {
  loading.dispatch(Loading.Action.START);
}

 

 

Has anyone encountered this before? Would it be related to cookies?

0 Likes
Shopify Partner
661 46 132

I have a private app that works with our Shopify POS setup via the POS SDK. The app displays some selection options, invoking a few Edit Cart functions to add defined quick sale items to the POS sale. I've found that the first transaction of the day seems to hang up, where my app just presents a blank screen. If I close out of the transaction and go back in then the app page is displayed. Since we aren't using this in production I didn't pursue the quirk any further. But it does seem that the connection takes some priming (in non-technical, superstitious terms). 

0 Likes
Highlighted
Shopify Staff
Shopify Staff
192 8 44

I can help troubleshoot this, is the app that you're having trouble with installed on a shop somewhere that I can test it?

Fire me a DM and we'll try to get this sorted out.