Quantcast
Channel: Active questions tagged https - Stack Overflow
Viewing all articles
Browse latest Browse all 1854

Connecting ionic Android/iOS app over HTTPS with my Local Server

$
0
0

After changes in Ionic App and Local Spring Boot Server, I see this error when switching to HTTPS instead of HTTP, when user tries to login:

[ERROR:ssl_client_socket_impl.cc(878)] handshake failed; returned -1, SSL error code 1, net_error -200

This is what I have tried so far:

  • Generated a Self-Signed Certificate, placed in Spring Boot Server and made changes in application.properties

  • Used the same certificate and placed in ionic android app.

  • Handled CORS in Spring Boot Server

  • Updated the network_security_config.xml to allow HTTPS requests.

  • Created a res/xml/network_security_config.xml file:

<?xml version="1.0" encoding="utf-8"?><network-security-config><domain-config cleartextTrafficPermitted="false"><domain includeSubdomains="true">localhost</domain></domain-config></network-security-config>

In AndroidManifest.xml, reference this file:

<application    android:networkSecurityConfig="@xml/network_security_config"    ... ></application>
  • updated the server url in Ionic App - using 10.0.2.2 as server address
  • Rebuild app in Android Studio and launched in emulator,

Viewing all articles
Browse latest Browse all 1854

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>