After setting up an external database service (MySQL) and configuring the service in DF, I can successfully query and store elements via the REST calls in the web interface.
However, I’m building a native iOS app (based on the given iOS ToDo-list example) and would appreciate some pointers on the following topics:
How to properly access the external DB service instead of the standard “REST/db/” (is there a way using the SWGDbAPI, or should I use different API classes?).
I’ve now added a custom constructor, replacing the /db/ parts when initialised with another DB API string.
How to create one or multiple records. The ‘body’ argument is a SWGRecordsRequest type, that I’m unsure about how to fill. The API-doc says they should be key value pairs, but how can I properly form these as an SWGRecordsRequest?
I see the ID field is non-optional (can’t be nil) with the DB api/online SWAGGER, but what if the external DB service has an auto-increment on the ID?
Thank you in advance.