StageWebView issue on ipad - ipad

I am using stageWebView for showing webpage in my mobile app but don't know how to move back to my app once it gets loaded. In application descriptor file, I had already registered custom uri scheme (myapp://) for IOS devices and from the loaded page inside stageWebView, I was trying to call following URL myapp://webcam. But nothing had happened. It neither called LOCATION_CHANGE event of StageWebView not called INVOKE_EVENT of nativeapplication.
How can I fix this issue?
Thanks in advance,
Mamta

Custom URIs don't work in StageWebView (adobe help page)
Instead of a custom URI, use a hash tag and listen for Event.COMPLETE events on the StageWebView.
Webcam
instead of
Webcam
You'll get a Event.COMPLETE event when they click the link and can then check the StageWebView.location for a location hash.

Related

How to prevent reload on Tizen Public Preview Deeplink?

I'm writing a web app for Tizen Smart TV. One of the required features is implementing the Smarthub Public Preview deeplinking.
I have setup the app to open at a specific content when the Public preview tile is clicked. However, I cannot prevent the app to reload. The documentation mentions adding the appcontrol event to the window event listeners, but I don't think this event is being recognized by the app, since the code is not executed.
It only works if I directly add my deeplink() method to the onload property.
According to documentation, this piece of code should prevent the app to reload, but it is not working:
<tizen:app-control>
<tizen:src name='index.html' reload='disable'></tizen:src>
<tizen:operation name='http://samsung.com/appcontrol/operation/eden_resume'></tizen:operation>
</tizen:app-control>
window eventListener is not working wither:
onload="window.addEventListener('appcontrol', deepLink)"
Any help on how to implement this correctly?
Thank you in advance
You are probably modyfing window.location in the app (ie in router).
reload='disable' prevents reloading index.html. When application receives app control request and page is different, application will be reloaded.
You can find more about appcontrol in Tizen documentation (note that Tizen for TV may differ from other devices):
https://docs.tizen.org/application/web/guides/app-management/app-controls/
I've got some information regarding your question.
To do application resume without Page reload,
Set extra data in app-control like below
key: SkipReload
value: Yes

Custom URL Scheme Failing within own app

I have a custom URL scheme that I've been using successfully in my app during development for a few months now. We have some web pages that we load in some WKWebViews, and some of those links use our custom URL scheme to call our own app, which then takes action based on those URLs.
Today I deleted the app on my phone and reinstalled it in an attempt to work out a different bug I was having.
Suddenly, tapping on these links does nothing. I cannot find an error being thrown anywhere. Not in the console, not anywhere. I've attempted to dig way down into the various WKWebView delegate methods, but it seems like WKWebView isn't even trying to do anything with these URLs.
However, if I attempt to open one of these URLs in Safari, Safari will ask me if I want to open the URL in my app, which will then load and handle the URL.
Has anyone else seen this? Or have any ideas of where to look to track this down?
I've tried:
Removing and re-adding the URL scheme in my info.plist
Changing the scheme to a new value, then removing it and adding it back in info.plist
Deleting the app
Rebooting my phone
The issue has turned out to be something related to Turbolinks. Somehow there are situations where the page load event isn't firing, and Turbolinks then does not call code we need to activate some elements on the page.

iOS WKWebView Handle File Download

I am facing the following problem:
In a web interface, file downloads are triggered with an anchor tag, like this:
<a href="/bla/blabla" download>..</a>
While Safari browser can handle this request and open a dialogue to handle the file, WKWebView treats this just as an ordinary link and does nothing with it. I want to be able to get the file handler dialogue that is normally there when using Safari.
Right now there are 2 problems and I do not see an opening there yet:
I can not detect a click on the element as it is treated just as a normal link. And I can not rely on the URL parameters to detect if it is a file since that is not constantly true.
Even if the URL is defined as a one leading to a file, I can not pass it to Safari since it does not share session info and cookies with my app's WKWebView.
Therefore, I would like to know if there is any opening in handling files in iOS WKWebView. Thank you.

Display flash file with URL in UIWebView: Obj C/swift

I have game URL-
https://nogs-gl.nyxinteractive.eu/game/?nogsgameid=70090&nogsoperatorid=268&nogscurrency=eur&nogslang=en_us&nogsmode=demo
URL is running well in my web browser.
I want to display this in my iOS app. Currently, I am doing that so by using native UIWebView but it's displaying the message as
What am I supposed to do for opening the given URL in my application?
iOS does not support Flash. It never has, and it never will. You cannot run flash content on iOS.

iOS: Open a registered open URL from within the same app

I am running into a situation which I am not sure is possible from technical/design point of view. Please advise.
Here is what I need:
I have an open URL registered for my native iOS app. I expect a request ID to be passed along with it and once hit I open that request.
From within my native iOS app, I need to open a web page in the webview. This page has few buttons in it.
A tap on the button in the webview should open the request inside my app. So, I want to trigger the registered open URL in step #1.
Web page data is dynamic and will change on the fly.
Is this a feasible design. Shall I consider something else.
Any advise/pointers will be appreciated.
This should be possible. Here's a though:
1: Implement the UIWebview delegate method shouldStartLoadWithRequest.
2: when you intercept that your webview is attempting to access the url yourapp://blah-blah-blah you can return NO instead dip into your appdelegate can manually call the function handleOpenURL.
I've seen something similar in the past with supporting oAuth (I believe it was with instagram) within one of our apps. We basically loaded up the login page in a UIWebview and then when we detected the the post login redirect we parsed the oAuth token from the url and called it good.
Good luck

Resources