Reading and writing cookies in Shopify POS
To read or write cookies, an app that's embedded in Shopify POS needs to be in a first-party context, which means that it has no parent. When your app calls
ShopifyPOS.init, it is pulled into a third-party context because Shopify is the parent of your view. In this third-party context, your app can't read or write cookies.
After the first time that your app calls
ShopifyPOS.init, your app might be automatically pulled into a third-party context on consecutive views. To read or write cookies, you need to temporarily escape that third-party context by using
ShopifyPOS.remoteRedirect (if necessary):