Home Features Docs Blog Support GitHub

HTTPS requests with IOS-MOE are not working


(Nino Zalascek) #1

Trying to do a GET HTTPS request but it is not working on IOS MOE. If I do a normal HTTP request it works fine, but with HTTPS there is no error or success response. On Android HTTPS requests are working fine.

Altough I found the problem. Adding this option to gradle:

moe {
        proguardLevel 'all'
    }

causes the problem. But this option reduces the file size so I would rather keep it. I am guessing that I must add some lines in the proguard.append.cfg in order to make this work. Has anyone any ideas what those lines should be? Current content of the proguard.append.cfg :

-keep class com.badlogic.** { *; }
-keep enum com.badlogic.** { *; }

-keepclassmembers class ** {
  @org.moe.natj.objc.ann.** public *;
}

-keep class mk.gdx.firebase.**{*;}
-keepattributes Signature
-keepattributes *Annotation*

I am using LibGDX 1.9.8, IOS-MOE 1.4.2 and Java 8.


(Nicolas Prugne) #2

Hello,

Have you tried this? Libgdx with proguardLevel all causes HttpRequests to fail

I had the same issue and the answer given in this post resolved it :slight_smile:

Nicolas


(Nino Zalascek) #3

I solved the problem with adding few lines in proguard.append.cfg :

-keep class com.badlogic.** { *; }
-keep enum com.badlogic.** { *; }

-keep class com.android.okhttp.** { *; }

-keep enum com.android.okhttp.** { *; }

-keep class com.android.org.conscrypt.** { *; }

-keep enum com.android.org.conscrypt.** { *; }

-keep class java.lang.String { *; }

-keepclassmembers class ** {
  @org.moe.natj.objc.ann.** public *;
}

-keep class de.tomgrill.gdxfacebook.**{*;}
-keep class mk.gdx.firebase.**{*;}
-keepattributes Signature
-keepattributes *Annotation*

(Nino Zalascek) #4

Thanks for the reply. I was a bit faster and solved this on my own. I added a comment to this post with the solution.