Crash on iOS

Welcome! Forums Unity Plugins In-App Web Browser Crash on iOS

Tagged: 

Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • #1770
    ChrisVOiD
    Participant

    Hi, I have an issue where by the app for iOS crashed when calling the InAppBrowser function to open a URL.

    I upgraded to the latest version of the plugin 2.0.1.
    I have upgraded my project to Unity 2018.3.14 and have tested on 2019.1.14 and when running the app and trying to open a URL in the InAppBrowser I get a crash. Nothing in the Xcode error log expect for (lldb)

    Xcode is version 11 and iOS is version 13.1.2.

    When building from Unity version 2018.2.2 the functionality on the phone works fine.

    Hopefully you can help me out.

    Thanks.

    #1771
    ChrisVOiD
    Participant

    Attached is a screenshot of the file Xcode is pointing me to when it crashed. Hopefully, this helps.

    Xcode feedback

    • This reply was modified 5 years ago by ChrisVOiD.
    #1773
    PiotrPiotr
    Keymaster

    This screenshot is not working for me – could you upload it somewhere else?
    In addition could you show code you are using for opening website?

    #1774
    ChrisVOiD
    Participant

    https://pasteboard.co/ICxvOAG.png – Does the link work directly?

    And the code:
    InAppBrowser.OpenURL("https://www.speedstartup.org");

    #1775
    PiotrPiotr
    Keymaster

    Not sure how is it possible but you are using files from old version of a plugin. Probably Unity’s import botched it.

    There should be only InAppWebBrowser.a inside Plugins/iOS directory.

    There should not be these files:
    InAppBrowserViewController.h
    InAppBrowserViewController.mm
    iOSInAppBrowser.mm
    OrientationNavigationViewController.h
    OrientationNavigationViewController.m

    #1776
    PiotrPiotr
    Keymaster

    Also remember to regenerated xcode project after deleting those files.

    #1777
    ChrisVOiD
    Participant

    Thank you Piotr I will try that. Not sure what happened there with the import. I’ll comment back once I have tried it.

    #1780
    ChrisVOiD
    Participant

    Hi thanks for the help I have done what you suggested and I longer get a crash.

    However, when trying to Open a URL I get the warning in the Xcode log
    “InAppBrowserBridge not found!” and the InAppBrowser doesn’t open.

    The InAppBrowserBridge.cs script is in the project inside of ‘InAppBrowser > Scripts”

    Am I missing something? I have never had this message before from other versions?

    • This reply was modified 5 years ago by ChrisVOiD.
    #1782
    ChrisVOiD
    Participant

    Sorry that error is no longer showing in Xcode. I replaced the InAppBrowserBridge file I had setup manually with the prefab which seems to have fixed it.

    However the browser is not opening. In the logs within Xcode I can see:

    InAppBrowser: FinishedLoading https://google.com/
    InAppBrowserBridge:OnBrowserFinishedLoading(String)

    I expected the browser to open and work looking at the logs but I have nothing showing on screen.

    #1783
    ChrisVOiD
    Participant

    Sorry the groups of messages but I have more strange behaviour here.

    The IAB does open up as expected. However not on the first load of the app. If we load the app up, call the IAB nothing happens. If we then lock the device and load the app again the IAB is loaded and everything works as expected.

    This is very confusing and strange behaviour. Any ideas?

    #1784
    PiotrPiotr
    Keymaster

    No idea, could you send me test project so I could see that behaviour on my machine?

    #1785
    ChrisVOiD
    Participant

    Sure, do you need the Xcode project? And where can I send it?

    #1786
    ChrisVOiD
    Participant

    Would it be easier to send you a video of this behaviour on a device?

    #1787
    PiotrPiotr
    Keymaster

    Before that – could you try create plain new project, open the example scene and check out if you see the same behavior?

    Example scene is under InAppBrowser/Example directory.

    #1788
    ChrisVOiD
    Participant

    I have tested that and it works fine. Seems to be isolated to this project. Not sure if the existing issue with the botched import and created other issues

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