First attempt at Composer. Added a button with a Take Photo tap event. Then trying to output to a Set Page Variable. I have created the Page Variable in the Variables section. For the Set Page Variable event, I have the variable name as the Page Variable I created… for Assigned Value, I chose output value of another node. In the drop down box for the output options, the only things that are available for me to select is “Take Photo / Error: rawError” and “Component tap / Event” … It seems PhotoFile : Path should be selectable but it’s disabled.
Make sure your Page Variable is an object with a string property for it to automatically suggest outputting the path from the “Take Photo” output options. I presume your page variable is now a string and since the output of the flow function is an object it’s not suggesting it.
Another way you can do this is to force the assignment through a Formula e.g.
Thank you that certainly was the issue regarding the type of variable. It appears though that the takePhoto function isn’t working properly. In looking at the Output from the takePhoto function, I see this error: “One of the following error codes: -
unknown: Thrown when calling the native API resulted in an unknown error.” It’s not outputting any information about the photo.
Console shows this upon startup:
Warning: RNCNetInfo - You are using the deprecated API. It will still work, but you must upgrade to the new API to receive the new features. The old API will be removed in the future
I’m testing on an iPhone 11 w/ ios 13.3.1
Does the camera open at all? Have you enabled camera permissions in your app settings?
Hi… Yes the camera permissions dialog opened up and I approved it… and the camera opens and takes a photo each time and returns to the page after clicking the button. I tried outputting the basic takePhoto->name or ->path, or just about anything to a text object and nothing is returned.
Could you share your app ID and give us permission to check it? Would make it a lot easier to debug.
Yes thank you it’s 95081. I’m an old Steroids user so I’m pulling my hair out because I want to just write code but I want to give composer a shot!
Looks like the function of the different node outputs was not clear, which is understandable since their functionality is described in the small description box at the top right when you select the node:
Your flow is set up like this:
So if taking the photo succeeds, you toast the photo path. If you cancel the dialog, you set
variable1.path to the taken path – but it’s not really available in the second route since no photo was taken, so it’s
undefined. Finally, you show the photo size in the error output – again, something that is not available.
I created a ticket about output arguments being erroneously available in the wrong outputs (e.g. photo file being available in the cancel output), definitely want to fix this: https://tracker.appgyver.com/bug-reports/p/flow-function-output-arguments-are-available-in-all-outputs-erroneously
Sorry for the head-banging moments, I promise you it’ll start making sense!
Thanks a lot for the detailed response… I didn’t even notice that the outputs were specific and it makes much more sense now.