Welcome! › Forums › Unity Plugins › In-App Web Browser › iOS 13 issues
- This topic has 11 replies, 2 voices, and was last updated 5 years, 4 months ago by
Piotr.
-
AuthorPosts
-
October 21, 2019 at 6:13 pm #1790
jimmydelaney19
ParticipantIs anyone else having issues with iOS 13 and InAppWebBrowser? I know Apple changed a lot of things from 12 to 13, including going from a default of fullscreen to a card system, and also changing the default presentation mode.
I have 4 iPads, two on iOS 13.1.3, one on iOS 12.4.2, and one on 12.3.1. I have the same app loaded all 4 iPads starting the example debug “ExampleScene”. On iOS 12 and iOS 13 when I tap the link Open google.com! different behavior occurs.
12.4.1 and 12.3.1 – Link opens correctly, expected behavior occurs.
13.1.3 – Nothing happens. I push the button again(for a total of 2 times), I get this debug information.`SendMessage: object InAppBrowserBridge not found!
SendMessage: object InAppBrowserBridge not found!
2019-10-21 12:48:20.633502-0500 ExampleApp[761:390743] Warning: Attempt to present <StandardNavigationController: 0x10b1ac000> on <UnityDefaultViewController: 0x11ab6f050> which is already presenting <StandardNavigationController: 0x10a9d8a00>
SendMessage: object InAppBrowserBridge not found!
SendMessage: object InAppBrowserBridge not found!
`If i minimize the app, then reopen it, the app is successfully displaying google.com. It only successfully displays if I’ve tapped the button 2 different times and minimized/reopened. At this point the browser works correctly and i can push the back button to hide it, and tap the link to reopen it without minimizing the app.
After a google search I found this https://stackoverflow.com/questions/32696615/warning-attempt-to-present-on-which-is-already-presenting-null
I believe in iOS 13 they switched the property definesPresentationContext to false, which I believe may be causing the problem.
Is anyone else able to get inappbrowser to work normally in iOS 13? I’ve tested on two different 13 devices and neither worked.
October 21, 2019 at 6:47 pm #1791Piotr
KeymasterHi,
Thanks for detailed explanations.1. Are you sure you are using latest version of a plugin? (2.0.1)
2. Are you sure old files from previous versions are still inside your project (thus being exported to xcode project)?
Those files should not be there:
InAppBrowserViewController.h
InAppBrowserViewController.mm
iOSInAppBrowser.mm
OrientationNavigationViewController.h
OrientationNavigationViewController.m3. Are you able to reproduce it in empty project with imported plugin?
October 21, 2019 at 7:46 pm #1793jimmydelaney19
Participant1. Yes
2. None of those files are there.
3. Whoops, works on an empty project… I’m going to go look at a bunch of different settings see what’s different. If i figure it out I’ll post again.October 21, 2019 at 8:18 pm #1794Piotr
KeymasterInteresting… that might reason why I was not able to reproduce any of these. Please let me know once you find anything!
October 21, 2019 at 8:49 pm #1795jimmydelaney19
ParticipantIt appears to be related to the bug peterlaw mentioned here https://www.kokosoft.pl/forums/topic/cannot-trigger-the-inappbrowser/
When you build without “Portrait” and “Portrait Upside Down” options inside of Unity onto a Device on iOS 13+ innAppBrowser will behave strangely like I mentioned above.
If you build it onto iOS 12 or before, it works fine with the other options disabled.
My app needs to be able to rotate, and have both portrait and portrait upside down disabled. Do you know of a way I could get around this? Or will this need an update?
October 21, 2019 at 10:03 pm #1796jimmydelaney19
ParticipantDid some more testing. This bug ONLY occurs if you have 3 things. 1)iOS 13. 2)Default Orientation in Unity set to “Auto Rotation”. 3)Allowed Orientation for Auto Rotation needs to have Portrait Disabled. No other options make any difference whether they are on or off.
October 22, 2019 at 9:10 am #1797Piotr
KeymasterSo I tested it on iPad with OS version 13.1.3, and Unity settings you mentioned (I think):
Default Orientation: Auto Rotation Allowed orientations for Auto Rotation Portrait: disabled Portrait Upside Down: disabled Landscape left/right: enabled
Opened Example scene with 2.0.1 version and… it works. Are you sure it’s about this orientation setting? Maybe something else is involved, .e.g Unity version?
October 22, 2019 at 3:30 pm #1801jimmydelaney19
Participant1. I upgraded Unity to the latest (2019.2.9f1). I was on 2019.2.01f previously.
2. I created a new project.
3. I imported 2.0.1 of in app browser.
4. Added examplescene in build settings.
5. Unchecked portrait mode from the auto rotation settings.
6. Built to Xcode
7. Signed project
8. Built to a few devices(iPad Air 2, iPad 6th gen, iPhone 7 Plus) with 13.1.3.
9. Opened app
10. Same buggy behavior as before.
I didn’t change any other settings in Unity or Xcode. If the only setting I change is checking the box next to portrait, it works perfectly. Or if I build to iOS 12 it works.Not sure what else to do. Gonna take a break and work on some other stuff.
October 23, 2019 at 9:14 am #1802Piotr
KeymasterOne more thought – have you tried
options.shouldStickToLandscape
?October 29, 2019 at 9:48 pm #1807Piotr
KeymasterI think I found what was wrong with help from other user.
Could you check out attached file:
https://drive.google.com/open?id=1H4Oiil-zDd7geb7JRxFStH3lYYHmSj2EJust replace current plugin’s file inside Plugins/iOS with this one above and rebuild your xcode project.
November 14, 2019 at 5:24 pm #1836jimmydelaney19
ParticipantHey Piotr, I realize this is a bit late, but your updated file fixed everything. I had coded kind of a janky workaround and forgot about this issue for a couple weeks. Figured I’d go ahead and check the forums again today and saw the update. Everything rotates correctly now and I don’t need portrait enabled. Thanks.
November 19, 2019 at 6:43 pm #1862Piotr
KeymasterPatch should be released on Unity Asset Store in next few days.
-
AuthorPosts
- You must be logged in to reply to this topic.