The default OS webview is terrible, there could be a way to opt out from using it, and handle the launchURL by yourself
@peterpaulis There already _is_ a way of opting out of the default web view and using your own logic. It's called additionalData. Put the URL in there if you don't want to use the default logic.
Some people want simple web views, some want super customized complex web views. In either case it's trivial to do it yourself.
But why to opt out from the provided launchURL and force to use custom keys... so many people having issue with this, where the options is a simple setting
https://stackoverflow.com/questions/51950222/onesignal-ios-cant-prevent-webview
moreover the webview is presented in such a nasty way, as inserting a view directly to the window in an async block, making it impossible to prevent
@peterpaulis again - it鈥檚 _extremely_ simple to use additionalData to present your own webview UI. We even provide the ability to set the launchURL for some platforms and not others if you want to handle the URL differently on some platforms.
How about not opening a web view at all, not in app nor in the mobile browser, when using the WordPress plugin to generate the notifications? Is there a way to specify additionalData there?
@StevenCross if you want to present a URL but use your own UI in mobile, instead of using the url parameter on the Create Notification API you can instead use web_url which only gets sent to browser users.
Also....nearly all of the companies and devs that use our SDK are fine with our webview, it works. If you don鈥檛 like it, it is _extremely easy_ and _simple_ to just pass the URL as a field in additionalData and handle it with a custom webview you can build yourself.
I do not want to present a URL at all. All I want to happen is for the app to be displayed when the user clicks an iOS notification and to run some code in the OSHandleNotificationActionBlock to refresh my apps data to include the new post.
My notifications are being sent only from the OneSignal WordPress plugin. I have heard that it is possible to set additionalData there but I cannot figure out how to do so. Again, no webview at all, which I think is possible using additionalData, but confirmation of that would be great.
@StevenCross if you aren鈥檛 using url then I am not sure what this has to do with this issue..? I don鈥檛 know exactly what problem you are running into, what you鈥檙e describing should be pretty simple to do.
hmm. Well I have the OneSignal plugin installed in Wordpress. Whenever I add a post, my iOS app receives a notification. When the notification is clicked, the app is made active and the new post's URL is loaded in either the web view or the mobile browser, depending on kOSSettingsKeyInAppLaunchURL. I am trying to have neither the web view nor the browser be displayed.
@StevenCross are you setting the URL on the notification? If so, the app will open the webview when tapped...
Where would that be specified? I am looking at the OneSIgnal WordPress plugin configuration screen and don't see anywhere to set or not set it.
Hello! I'm facing the exact same issue, by using OneSignal Wordpress plugin. Although URL is present, I don't want WebView or Safari to be opened. There is still no solution to this? Thank you!