silkimen / cordova-plugin-advanced-http

Cordova / Phonegap plugin for communicating with HTTP servers. Allows for SSL pinning!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug] [iOS] ssl pinned return null

indraraj26 opened this issue · comments

Describe the bug
On Android i get 'Ok' but on iOS it returns null

System info

  • affected HTTP plugin version: [e.g. 3.1.0] 3.1.0
  • affected platform(s) and version(s): [e.g. iOS 12.2]
  • affected device(s): [e.g. iPhone 8]
  • cordova version: [e.g. 6.5.0] 10.0.0
  • cordova platform version(s): [e.g. android 7.0.0, browser 5.0.3] ios : 6.2.0

Are you using ionic-native-wrapper?

Minimum viable code to reproduce
If applicable, add formatted sample coding to help explain your problem.
Repo: https://github.com/indraraj26/ssl-test
e.g.:

  async ngOnInit() {
    try {
      await this._platForm.ready();
      const data = await this._http.setServerTrustMode('pinned');
      console.log(data, 'data')
      alert(JSON.stringify(data))
    } catch(e) {
      console.log(e, 'error in catchHandler')
    }
  }/

Screenshots
image

Hi,

As u can see here, this function return nothing. You just have to check if promise returns a success or an error.

Kr.