how to check if smart app banner is closed - ios

i have a jquery mobile application, in iOS safari a smart app banner comes when the application is loaded in the browser that tells to install or open the application. ones the smart app banner is closed by the x icon in the prompt then its told that the safari sets a flag with the particular app id which is passed with the meta tag.
is there any way that we can get the set flag details ?
or
is there any way we can know if the x icon is clicked ?
the banner shown in the image is smart app banner and ones we click the x icon in that banner then the banner never prompts for that particular app. when i searched about this it was told that a flag will be set by safari for that particular app with the app id we specify in the meta tag for the smart app banner. i need to know, is there any way to get the flag details, or to reset the flag.
the only solution i found to reset the flag is to reset the device

You can subscribe to window resize event. It will be emitted after a banner has been closed.
window.addEventListener('resize', () => ...);

Related

How to forcibly show the Smart App Banner on Safari?

I just added a Smart App Banner to my site. It already showed one time, but I want to show it again for development purposes. As Apple says:
When the user returns to the webpage, the banner won’t reappear.
So how do I avoid this "cooldown" that the banner receives?

How to check if an SpringBoard alert / Safari browser popup is present?

Is there a way to check from the command-line terminal, if an alert view is shown?
I can ssh onto my iPad and wanted to check whether a basic-auth popup from either springboard or the safari browser is present. Does safari store the state of the alert in a specific plist/file on the device?
I can also run an app as a background service on the iPad, but will it capture the alerts shown in other apps? Can this be done via activator?
We ended up on using a Theos Tweak app and hooking in on show method of UIAlertView

iOS disable let user swipe the app in background list

In the iOS, when the user double home button , the app show in the list at background.
Have possible hidden my app show in the list, or force the user swiped the app, the app in the background can't close?
I just known applicationDidEnterBackground can do something in the background. But
I wish force the user can't swipe the app in the list or hidden the app in the list, or have some mobile device management method can do this effect(we can use private api)?
I search many time , but I was not found some answer...
thank you very much.
This is not possible in iOS, the user is in control and Apple does not allow your app to hide it self in this list.
If you want this you will need to target jailbroke devices and hook on the task switch. Then detect you app from being closed and restarted it.

iOS caches the application screen when clicking the home button for the device

we are developing hybrid application on Worklight.
After the user launches the application on iOS, he will see the login screen, providing his credentials, he is inside our application.
Now, if the user clicked the home button for iOS before "logging out" from the app, the iOS will take a snapshot and store it inside the device cache.
By using IExplorer, I can see this screen cached, which in our situation a high critical issue.
How can I a override this screen with a white screen, in case the user clicked the home button of the iOS device it will be populated immediately, and the device will not snapshot the user main screen.?
Is there any thumbnail I can add to my nativeResource folder for iOS to solve this issue?
thank you.
I encourage you to look at the Worklight Knowledge Center. In most cases, you will find your answer.
To control the snapshot taken by the OS when moving to the background, you need to use the following API methods, depending on your needs:
WL.App.BackgroundHandler.setOnAppEnteringBackground and WL.App.BackgroundHandler.setOnAppEnteringForeground

Locking iPad to Safari and one webpage

Can you somehow lock an iPad to Safari and only one webpage? I've found people locking iPad to certain apps but can't find this anywhere.
One app example:
Lock-down iPhone/iPod/iPad so it can only run one app
From the accepted answer to the question you link to:
It is possible to put an iPad or iPhone into 'Store Demo' mode so that the home button and swipe to home gesture is disabled. If you have seen the iPads in the Apple Store running the smart sign apps then you will know what I mean.
So you could, for example, lock the device to Safari. But then it would be possible to navigate to any webpage.
What you need to do is to write a simple app that has a UIWebView that loads your site, and then put the device in 'Store Demo' mode afterwards. Also, depending on whether your site contains links to the outside world, you may have to implement webView:shouldStartLoadWithRequest:navigationType: from the UIWebViewDelegate protocol so that it refuses to leave your site.

Resources