Welcome! › Forums › Unity Plugins › In-App Web Browser › UIWebView deprecation
Tagged: ITMS-90809, UIWebView
- This topic has 38 replies, 7 voices, and was last updated 5 years ago by alfpooh.
-
AuthorPosts
-
August 30, 2019 at 1:15 am #1647wiksyParticipant
iOS App Store is going to stop accepting apps that use UIWebView soon, but I saw this plugin still relies on it.
ITMS-90809: Deprecated API Usage – Apple will stop accepting submissions of apps that use UIWebView APIs . See https://developer.apple.com/documentation/uikit/uiwebview for more information.
Is there a way to remove this dependency or upgrade to WKWebView?
August 30, 2019 at 9:02 am #1648PiotrKeymasterOf course, I prepared new version with WKWebView.
Would you like to test it out and let me know if you see any regression?
Here are instructions:
1. Remove plugin files from /Plugins/iOS directory*,
2. Download http://kokosoft.eu/beta/InAppWebBrowser206.a
3. Place it into /Plugins/iOS directory
4. Rebuild iOS project
5. Test it out and let me know about results ?* These files:
InAppBrowserViewController.h
InAppBrowserViewController.mm
iOSInAppBrowser.mm
OrientationNavigationViewController.h
OrientationNavigationViewController.mAugust 31, 2019 at 2:20 am #1649wiksyParticipantHi,
I tried this new library. It works, but it seems that somehow all texts are rendered twice with an offset, making them hard to read.
September 1, 2019 at 7:20 pm #1650PiotrKeymasterThanks for getting back with feedback. Could you post screenshot of this issue?
September 10, 2019 at 5:31 pm #1660tpitmanParticipantAny word on when this might be fully tested and released?
September 11, 2019 at 12:57 am #1661tpitmanParticipantI followed your instructions to download the .a file and remove the other files. It builds fine, but when I run it I get an exception.
I am using javascript interaction. Do I have to change any of that for it to work?
September 11, 2019 at 1:01 am #1662tpitmanParticipantNot sure this will be much help, but here is the top part of the exception stack:
0 CoreFoundation 0x000000019c65ead0 <redacted> + 256 1 libobjc.A.dylib 0x000000019b863d00 objc_exception_throw + 60 2 CoreFoundation 0x000000019c57c4d4 <redacted> + 0 3 CoreFoundation 0x000000019c664464 <redacted> + 1412 4 CoreFoundation 0x000000019c666260 _CF_forwarding_prep_0 + 96 5 espresso 0x0000000102d58978 +[InAppBrowserConfig(DisplayOptionsStruct) fromDisplayOptions:] + 356 6 espresso 0x0000000102d54c6c _ShowURLWithDisplayOptions + 120 7 espresso 0x0000000102d54e74 _OpenInAppBrowser + 104 8 espresso 0x0000000102d686b4 iOSInAppBrowser__OpenInAppBrowser_mC93248E1F49443BED3C3D03A7C55783E7EAFE0C4 + 108 9 espresso 0x0000000102d67064 CliveWebBrowserScript_Awake_mC890CB4E232C63AD0AA251991D4ECD40F2EEB86A + 132 10 espresso 0x000000010240ae50
September 11, 2019 at 2:12 am #1663alienhereticParticipantI also have this issue and client is pressing me for a fix can you please advise using unity 2019.2.4.f1
September 23, 2019 at 12:40 pm #1666PiotrKeymasterSeptember 23, 2019 at 12:41 pm #1668PiotrKeymasterHow do you open InAppBrowser? Could you post code you are using?
September 23, 2019 at 1:15 pm #1669alienhereticParticipantpublic class BrowserOpener : MonoBehaviour
{public string pageToOpen = “http://www.google.com”;
// check readme file to find out how to change title, colors etc.
public void OnButtonClicked()
{
InAppBrowser.DisplayOptions options = new InAppBrowser.DisplayOptions();
options.displayURLAsPageTitle = false;
options.pageTitle = “InAppBrowser example”;InAppBrowser.OpenURL(pageToOpen, options);
}public void OnClearCacheClicked()
{
InAppBrowser.ClearCache();
}
}September 23, 2019 at 1:44 pm #1670tpitmanParticipantI am confused about the new communication mechanism. I start typing webkit and it isn’t defined.
Here is some of my code:
private void Start () { InAppBrowser.ClearCache (); InAppBrowserBridge bridge = FindObjectOfType<InAppBrowserBridge> (); bridge.onJSCallback.AddListener (OnMessageFromJS); bridge.onBrowserStartedLoading.AddListener (OnBrowserStartedLoading); } private void Awake () { InAppBrowser.DisplayOptions options = new InAppBrowser.DisplayOptions (); options.displayURLAsPageTitle = false; options.pageTitle = "My App"; options.hidesTopBar = true; InAppBrowser.OpenURL ("https://myapp.com", options); }
Here is a place where I send some Json to the browser javascript:
InAppBrowser.ExecuteJS("$nuxt.messageFromUnity('{\"success\": \"" + success + "\"}');");
September 23, 2019 at 6:09 pm #1672PiotrKeymasterCould you give some details what’s exactly not working?
i.e. is browser not opening? is communication not working? what’s$nuxt.messageFromUnity
?September 23, 2019 at 6:33 pm #1673tpitmanParticipantI am the one who posted that the app crashes on iOS. I gave the crash stack in case that would give some idea of what is going on.
With a crash that means I don’t get anywhere with it.
The string I gave you is just what the web page is expecting to process in JavaScript. As far as your plugin goes I think it should just be passing that along to the web page JavaScript.
- This reply was modified 5 years, 3 months ago by tpitman.
September 24, 2019 at 8:02 am #1676PiotrKeymasterIs sample scene working for you? Have you tried to re-generate xcode project?
-
AuthorPosts
- You must be logged in to reply to this topic.