Shopify’s documentation says that we can use some new AppBridge functions in the old EASDK - https://help.shopify.com/en/api/embedded-apps/app-bridge/migrating
I don’t feel like migrating my app fully right now, but would love to use the resource picker (as mentioned, is available to use with the EASDK) -
This means that all existing embedded apps, without updating any of their code, get some of the benefits of Shopify App Bridge for free:
more consistent cross-platform rendering and functionality
access to better developer tools for debugging and better error reporting
increased stability
tighter integration with Polaris
access to some new Shopify features, including the Navigation app extension and a new Resource Picker for products and collections
In saying that … how do I use these App Bridge features within EASDK?
Currently I use the following line to initiate the product picker in EASDK:
ShopifyApp.Modal.productPicker(productPickerOptions, function(success, data) {
The equivalent for the resource picker in Bridge is:
const variantPicker = ResourcePicker.create(app, {
resourceType: ResourcePicker.ResourceType.ProductVariant,
});
How do I transfer this code over? I’ve tried different variations but nothing works.
Any ideas here?
Thanks!