Hi,
I am very new to AppGyver. I started to connect a Postgres database using PostgREST. I was able to connect the database and its tables. I am now trying to list records following the published videos.
I got that working using the “list item” component. But the list to DB items is only shown in the Web-Apps preview. No luck on my iPhone. I can chose and see the page (Heading, text…), but the list containing the data - which I can see in my browser in the WebApp i- s not shown on the iPhone…
Hi @Wolfgang_Korosec ! I have not encountered something like this before – as a first step I would use the debugger to check that the data variable is actually populating when I run the app on a mobile device.
Hi Mari,
the debugger was not a great help - but maybe that is my fault.
I am using a self-signed certificate when running the Rest-API. Clould that be the root cause of the problem ?
@Wolfgang_Korosec On the “State” tab of the debugger you can see all your variables and their contents, it would be the first step to understand if the data is coming in at all or if it’s just not displayed right. There is a similar case here where data is coming in but it’s not being shown.
What’s your app ID (number in Composer URL) and what page is this occurring on?
Output of the debugger WebApp
STATE => DATA REFERENCE
{ 1 item
“customers1”:[…] 91 items
}
{ 1 item
“employees1”:[…] 9 items
}
Output of the debugger - App running on the iPhone
STATE => DATA REFERENCE
=>
{
1 item “customers1”:[]0 items
}
{
1 item “employees1”:[] 0 items
}
very strange…
The data source is using https and a self-signed certificate - could that be the reason ?
@Wolfgang_Korosec, how did you manage to use the Get record API? I try to use Postgres based Supabase, and just can’t fetch a single recor in AppGyver. This is my case:
Hi Artem_Dzyuba
I am using Postgrest ( https://postgrest.org/ ) not Supabase.
You can switch return values between array and single record using a HTTP Header Key: Accept Value: application/vnd.pgrst.object+json
See: Tables and Views — PostgREST 9.0.0 documentation
Maybe there is a similar concept in Supabase…