I have a FMX app that I am trying to run on an iPhone. The app loads and launches but when I try to login to a remote XData Server I get Connection Failed - Unsupported URL (Error - 1002). This isn't a problem when I run it under Win32. If I make a call to a service method which doesn't have any params that seems fine.
Any ideas?
Details:
[ServiceContract]
ILoginService = interface(IInvokable)
['{9CFD59B2-A832-4F82-82BB-9A25FC93F305}']
function Login(const UserName, Password: string): string;
It should not be any difference in the URL because if that's the exact interface you are using client side, you have no [HttpGet] attribute in Login method, thus the parameters are simply passed in the body, not in the URL.
Usually errors in URL in iOS (sometimes Android as well) when the Windows version works are related to lack of percent encoding (which XData does automatically but it's not the case here) or some "security" issues, like using an IP as the host, using HTTP protocol instead of HTTPS, etc..
Your FClientRes and FClientAuth clients are accessing different URL's. What are the URL's used in each of them?
They both use the same root which is a domain named https call. The only difference is one ends /auth and the other /res both of which are handled within the same XData server.
It seems that the way the exception was raised from the iOS install had me looking in the wrong place. It isn't on a call to the ILoginService that is the problem, that is working.
This is fixed by encoding the spaces in the filter to "%20" (note encoding the spaces as "+" didn't work even though that is valid query encoding for a space) , as the querystring isn't encoded in TXDataClient. So