Open marco-visualsquares opened 2 years ago
I am testing app bridge 2 and also unable to get scanner to work on iOS. When I use the below:
features.dispatch(Features.Action.REQUEST, {
feature: Group.Scanner,
action: Scanner.Action.OPEN_CAMERA
});
scanner.dispatch(Scanner.Action.OPEN_CAMERA)
I get:
Optional Params: [{"version":"2.0.5","group":"Error","type":"APP::ERROR::UNSUPPORTED_OPERATION","payload":{"action":{"group":"Features","type":"APP::FEATURES::REQUEST","payload":{"feature":"Scanner","action":"APP::SCANNER::OPEN::CAMERA","id":"f3cfc79b-7b45-4767-b747-712a07324676"},"version":"2.0.5","clientInterface":{"name":"@shopify/app-bridge","version":"2.0.5"},"source":{"apiKey":"635c3add70ebdf3b81518d25d6acc86b","host":"fjtesting2.myshopify.com/admin","forceRedirect":false}},"id":"f3cfc79b-7b45-4767-b747-712a07324676","type":"APP::ERROR::UNSUPPORTED_OPERATION","message":"Scanner and APP::SCANNER::OPEN::CAMERA are not supported","property":"feature"}}]
When I remove the features.dispatch
and try to only use scanner.dispatch
, nothing happens and no error is returned.
Here's a workaround for this bug.
features.dispatch(Features.Action.REQUEST, {
feature: Group.Scanner,
action: "OPEN::CAMERA", // Work around for app-bridge 2.0 on iOS/iPadOS
});
scanner.dispatch(Scanner.Action.OPEN_CAMERA); // Oddly, this works fine
I can't get the scanner to appear at all, on iOS, app bridge react 3. No error messages, nothing. Tried all combinations of app bridge 2/3, and React 16/17
Describe the bug
Unable to disptach scanner feature request on IOS POS using shopify appBridge 2
To Reproduce
Sample code to reproduce the behaviour:
the feature key for shopify appbridege 2
APP::SCANNER::OPEN::CAMERA
is not in IOS POS. However android has itIOS result: android result
Expected behaviour
both payload should be the same and feature should be able to dispatch
Contextual information
Packages and versions
List the relevant packages:
@shopify/app-bridge
@2.0.5
@shopify/app-bridge-react
@2.0.5
Platform