The browser won’t open when it’s a Release Build.

Welcome! Forums Unity Plugins In-App Web Browser The browser won’t open when it’s a Release Build.

Tagged: 

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #23010
    Kai
    Participant

    Hello,
    Thank you for creating such a useful asset!

    I tried doing an Android Release Build in my environment, and the browser did not open. Could you please advise on how to resolve this issue?

    (Build Environment)
    – Windows
    – Unity 2021.3.20f1

    (Steps to Reproduce)
    1. Create a new Unity project
    2. Switch to Android Build
    3. Import In-App Web Browser
    4. Add a UI button to an empty scene and set the following function to its click event:

    
    public void OnTap()
    {
        InAppBrowser.OpenURL("https://www.google.com");
        Debug.Log("OK");
    }
    

    5. Build and run the project on Android
    6. Confirm that the browser opens upon button press
    7. Return to the editor and check the “Minify” option for Release
    8. Build and run the project on Android again
    9. The browser doesn’t open when the button is pressed

    Thank you.

    #23011
    Kai
    Participant

    Hello!
    I managed to find the answer to the question I asked the other day on my own. All I had to do was add the following settings to the “proguard-user.txt” file:
    `
    -keep class com.unity3d.player.UnityPlayer { *; }
    -keep class inappbrowser.kokosoft.com.Helper { *; }
    -keep class inappbrowser.kokosoft.com.DisplayOptions { *; }
    `
    Sorry for the trouble.

    #23012
    PiotrPiotr
    Keymaster

    Glad to see you found solution 🙂

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.