I'm working on iPhone application using Appcelerator .Every thing in app working fine .but now one alert shows in this.

- 3,866
- 1
- 11
- 28

- 109
- 1
- 8
-
Do you use `Ti.Network.HTTPClient` or any APIs or modules that use internet access? Are there any https URLs called that you know might have invalid certificates? – Fokke Zandbergen Mar 03 '16 at 13:56
1 Answers
A quick google search should bring you to the list of error codes (https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_Constants/index.html#//apple_ref/doc/constant_group/URL_Loading_System_Error_Codes)
In here, we can find the following
NSURLErrorServerCertificateUntrusted = -1202
Meaning that there seems to be a problem with the server certificates.
A quick search on this error gives us a possible cause:
The time of the phone might be wrong
(One of my iPhone users gets an NSURLErrorServerCertificateUntrusted error)
EDIT
I have no experience with appcelerator. This workaround is for native only, however, the idea should be the same.
And a workaround, if you were using NSUrlConnection:
Which makes use of
NSUrlConnection -connection:didReceiveAuthenticationChallenge:
HTTPS with NSURLConnection - NSURLErrorServerCertificateUntrusted