App is getting crashed on iOS with this plugin

Welcome! Forums Unity Plugins In-App Web Browser App is getting crashed on iOS with this plugin

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #242
    vivekkalkur
    Participant

    Hi Piotr!
    Greetings from Vivek! I had downloaded your plugin for implementing in one of my applications for iOS. But I can see that my app is getting crashed and I am getting this error(attached image) in my XCode. Could you please let me know the possible issue and solve it?

    Error XCode

    #243
    PiotrPiotr
    Keymaster

    Hi,
    Cannot really figure out what’s going on.
    Could you send me exact code you are executing from Unity?
    I guess it’s happening just after website finishes loading?

    #245
    vivekkalkur
    Participant

    public class FirstPersonController : MonoBehaviour
    {
    public string MensJacketPage = “https://www.target.com/c/jackets-coats-men-s-clothing/-/N-5xu2a”;

    private void Update () {
    if (hit.transform.name == “Men_Jacket”) {
    InAppBrowser.DisplayOptions options = new InAppBrowser.DisplayOptions();
    options.displayURLAsPageTitle = false;
    options.pinchAndZoomEnabled = true;
    options.pageTitle = “Digital VR Store”;
    InAppBrowser.OpenURL(MensJacketPage, options);
    }
    }
    }
    In the above code,there is a game object called “Men_Jacket” and whenever I click on it, I am trying to open it your browser.I am integrating this with my firstpersonController script,FYI.

    #246
    PiotrPiotr
    Keymaster

    Hmm isn’t OpenURL called more than once in really short time?
    Could you wrap code for opening browser within

    if (!InAppBrowser.IsInAppBrowserOpened()) {
     // open your website...
    }

    Let me know if that helped.

    #247
    vivekkalkur
    Participant

    No luck here. I tried with the above code :

    public class FirstPersonController : MonoBehaviour
    {
    public string MensJacketPage = “https://www.target.com/c/jackets-coats-men-s-clothing/-/N-5xu2a”;

    private void Update () {
    if (hit.transform.name == “Men_Jacket”) {
    InAppBrowser.DisplayOptions options = new InAppBrowser.DisplayOptions();
    options.displayURLAsPageTitle = false;
    options.pinchAndZoomEnabled = true;
    options.pageTitle = “Digital VR Store”;
    if (!InAppBrowser.IsInAppBrowserOpened()) {
    InAppBrowser.OpenURL(MensJacketPage, options);
    }
    }
    }
    }

    #248
    PiotrPiotr
    Keymaster

    Hmm. Interesting.
    Is it happening when you are trying to open http://www.google.com?

    #249
    vivekkalkur
    Participant

    Yes,it is happening the same even with, http://www.google.com

    • This reply was modified 6 years, 9 months ago by vivekkalkur.
    #251
    PiotrPiotr
    Keymaster

    In that case, it seems that OpenURL is called multiple times (every frame) and causes subsequent calls to clash. Could you put Debug.Log before OpenURL method and check if that’s true?
    If so – can you put your own boolean flag, like isShowingBrowser and set it true after first call and then check if it’s set before opening browser?

    #252
    vivekkalkur
    Participant

    Hey piotr,
    You know what, I upgraded my Xcode from 8.2.1 to 8.3.3 and now everything is working fine.I knew that it was a dangling pointer and the object was getting released multiple times but then I just though why don’t I upgrade my Xcode and check. Whoa maybe my luck was good! 😀 Anyways,thanks for your reply! It’s a great plugin!!! I wish it had a control to screen layout(width and height) rather than a full screen. Hope to see that soon though!

    Thanks

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