I am having an issue with forms, server connect and API when using POST on mobile when using WKWebView. Posting via a form works fine when using UIWebView however as this is now depreciated for iOS I am looking for a solution for WKWebView as currently form submissions simply will not work for me when using it.
Thanks for suggesting this and yes it is using Server Connect and Security provider. It does sound like what you are suggesting makes sense but please can you tell me how to turn this off?
Do you get any errors? I don’t think it is the cookie, the cookie is only set after a successful login and it uses the session cookie by default, only when the session is expired it uses the cookie from the remember me option.
It looks like a CORS problem to me, but it is difficult to tell without any information. Would at least want to know what the server responded (maybe check the server logs) and if there where some javascript errors in the WKWebView.
When looking at Console/Debug through Adobe Phone Gap, the script simply shows as pending and will not complete processing.
It works with normal forms with POST and Server Connect but not with Security provider and Login - it will just not complete almost like there is a rule blocking it but I have everything open on the server so it could be something that is being blocked locally on the app but I am stuck on this.
Thanks, so the Database Connection and Security Provider steps are not causing the pending state. Then we know that it is the login step. Does it keep pending also on invalid login credentials or only with a valid login?
I don’t know exactly where to look, do sessions work? Try using a setSession action step.
You could also test to create a Security Provider of type Single with just a single username/password, no database. Do not allow Basic Authentication and set the Remember of the login step to {{false}}.
Single did work when putting the credentials in the Server Connect action. In fact it worked on the database one too when hard coding the credentials. it only seems to be when you pass a POST value to either the username or password field. Confusing.
Could there be some firewall blocking the request? It is possible that it is being blocked because it sends plain-text password, do you use https on your server?