I have universal links set up for a native app. E.g. when I tap a link to my website (say https://my.website.com) from an email app, the native app opens automatically. But when I browse some website, which redirects me to https://my.website.com in safari, all I get is a bar at the top, suggesting me to open in the native app. Moreover that bar is only visible if I drag down a bit, so it's not visible immediately. How can it be fixed? how can I make the app auto-open in such case?
Related
I am using an online builder for my app(ApperyDotIo, JQM framework). My application works fine with one exception. I have an in-app link to my website. The link in the iOS app, the link takes me to the page but since the iPhone doesn't have a "back" button I can't go back to the app. Looks like you have to close the app and then reopen it to get back into the app.
I tried to set the link to not open in the same window and vice versa.
Any easy work around?
Links and back buttons in Android apps work fine.
Thank you
You can consider using the inAppBrowser: https://docs.appery.io/docs/cordova-jquerymobile-inappbrowser
It will allow you to open the website in the child window of the application (with the "close" button) or in the native browser, without opening the website as application page.
I have a PWA saved on the home screen, this opens up standardly without search bar nor the bottom buttons (share, tabs, etc..).
So every link gets opened inside the PWA, and that is expected.
I have a problem when showing pdfs as they normally open in Safari with the "share" button and all the bottom bar, but in the PWA they open up without bottom bar and without any share button.
So my idea is to open the PDF link (http://www.mywebsite.com/download/pdf/12345) in a new safari window,.
I tried putting target="_blank" on the PDF link but this did not solve the problem.
I also tried forcing the iOS behavior by opening the app in safari with safari://http://www.mywebsite.com/download/pdf/12345 but with no luck.
How do I open a New Safari window to a link?
OK, the ONLY working solution is to tell iOS you are going onto another domain.
PWA stays in your app frame ONLY if you stay in the same domain.
To open a link within your domain in an EXTERNAL window (or inside the PWA but with Safari standard controls) you have to send it to an external/different domain.
So the PWA is on https://www.mywebsite.com/ and you want to open a PDF with all Safari control buttons, you just create a SUB domain and point the link to it, like https://media.mywebsite.com/download/pdf/12345 at this point the PWA thinks you are on a different domain and does the correct rendering! 🎉
You can try to use window.open(url).
But, remember to put it in an element with onclick event attribute.
For example,
<button class='btn' onclick='window.open("https://www.google.com", "_blank");'>Open Google search</button>
Reference: window.open(url, '_blank'); not working on iMac/Safari
EDIT
You can set a scope in manifest.json to customize where to open an external link.
You can refer https://developers.google.com/web/fundamentals/web-app-manifest on the property scope.
The mailto link was working as expected on previous versions of iOS. After updating to 12.2+ when opening default mail app using the mailto link the mail app works. But when coming back to the PWA, the application stuck on a blank white screen due to the iOS feature update to PWA (saving app state when switching apps)
Now i'm stuck with a blank screen even after swipe close the app.
I'm using the following code to lunch the mail app
send mail
I have tried all other options of targets, only the _blank target opens the default mail app. Other targets are not working as mentioned in this stack overflow answer.
Here is the screenshot of how the blank screen looks after coming back from mail app
have anyone faced similar issue?
I've tried the following solution in my own PWA and it works great (iOS 12.3.1, iPhone 7+)!
On your PWA page, you create the link as following:
<a onclick="sendFeedback()">Send Mail</a>
And you define this function:
function sendFeedback(e)
{
window.location.href = "mailto:example#example.com";
}
Once clicked, it launches the default mail app. When you go back to your PWA, you will land on the page where the link is located. There won't be a blank screen.
I want to open a url that does not exit the app when it is deployed via Cordova / Phone Gap.
UIWebView
Sample UIWebViewImage
I want to do something similar retain the top NavBar of the app, but without the address bar. When I currently visit a url it will open the whole screen into the app, without back/forward buttons or any of the navbar or tabbar navigation.
You need to use the InAppBrowser of PhoneGap.
I am developing a web iPad app using Sencha Touch framework.
As it is a JS and Html5 framework It allows me to use cashing and work offline.
If I use the "+" button on iPad's Safari I can ad the icon/ shortcut to the home screen and make it behave as a native app (work without safari's address bar).
I was wandering would it be possible to create a button on the web page that would have the same functionality as the "+" button - so it allows users to add a web app shortcut to their ipad's home screens directly from the web page.
Is it possible? Can JS deal with it using apple's API?
Sorry, but this isn't possible. (JavaScript has no access to any special Apple API's - merely some additional events for touch handlers, etc.)
If it was, you can imagine that it would be trivial for any web site to automate this process (fake the user pressing the in-page "add" button) and hence add itself to the user's home screen without their permission.