Welcome! › Forums › Unity Plugins › In-App Web Browser › Crash on iOS
Tagged: IOS
- This topic has 16 replies, 2 voices, and was last updated 5 years ago by ChrisVOiD.
-
AuthorPosts
-
October 18, 2019 at 12:20 pm #1770ChrisVOiDParticipant
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.
October 18, 2019 at 12:26 pm #1771ChrisVOiDParticipantAttached is a screenshot of the file Xcode is pointing me to when it crashed. Hopefully, this helps.
- This reply was modified 5 years ago by ChrisVOiD.
October 18, 2019 at 12:37 pm #1773PiotrKeymasterThis screenshot is not working for me – could you upload it somewhere else?
In addition could you show code you are using for opening website?October 18, 2019 at 12:53 pm #1774ChrisVOiDParticipanthttps://pasteboard.co/ICxvOAG.png – Does the link work directly?
And the code:
InAppBrowser.OpenURL("https://www.speedstartup.org");
October 18, 2019 at 1:36 pm #1775PiotrKeymasterNot 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
insidePlugins/iOS
directory.There should not be these files:
InAppBrowserViewController.h
InAppBrowserViewController.mm
iOSInAppBrowser.mm
OrientationNavigationViewController.h
OrientationNavigationViewController.mOctober 18, 2019 at 1:36 pm #1776PiotrKeymasterAlso remember to regenerated xcode project after deleting those files.
October 18, 2019 at 2:02 pm #1777ChrisVOiDParticipantThank you Piotr I will try that. Not sure what happened there with the import. I’ll comment back once I have tried it.
October 21, 2019 at 8:45 am #1780ChrisVOiDParticipantHi 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.
October 21, 2019 at 8:58 am #1782ChrisVOiDParticipantSorry 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.
October 21, 2019 at 9:15 am #1783ChrisVOiDParticipantSorry 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?
October 21, 2019 at 10:59 am #1784PiotrKeymasterNo idea, could you send me test project so I could see that behaviour on my machine?
October 21, 2019 at 11:14 am #1785ChrisVOiDParticipantSure, do you need the Xcode project? And where can I send it?
October 21, 2019 at 11:31 am #1786ChrisVOiDParticipantWould it be easier to send you a video of this behaviour on a device?
October 21, 2019 at 2:26 pm #1787PiotrKeymasterBefore 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.
October 21, 2019 at 2:27 pm #1788ChrisVOiDParticipantI 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
-
AuthorPosts
- You must be logged in to reply to this topic.