I am building an App which retrieves some data from a server. The server can be installed elsewhere (I have also built the server) and after setting the correct host in the App you are good to go.
Now my problem. I am trying to make things as secure as possible, and one of those aspects is using SSL. I am using self-signed certificates on the server side, but I can't get it accepted by my iOS app. At first I got the warning that the certificate is not trustworthy even from the PC that is running the server, but after I found this answer [1], I got the "https" being accepted from my browser (and fiddler), it also turns green when calling the server url, so everything is now working fine, but just from the PC where the server is running.
When I try to call the url from an external device, I again get the message that the certificate is not trustworthy (which I understand because I signed the certificate myself, but here I am looking for some way to baypass that), and from inside my app I cannot establish a connection.
So, can I set my self-signed certificate as "trustworthy" for external devices? (Expecting every customer to buy their own certificate is not an option.)
Or, is there an Apple-approved way to accept this certificate from inside my iOS App? I know I can get it accepted by changing something in the private API of NSURLRequest
(if somebody is interested I can explain that), but I have been reading that in this case it is likely that my app is going to be rejected. So here I am looking for some "legal" way of accepting my self-signed certificate.
[1] How to create a self-signed certificate for a domain name for development?