Putting a "Like" button in an iOS App, iFrame? - ios

Within my native iOS app i have an iFrame that loads an external webpage. Putting a Like button on that page works fine when it's loaded from Safari etc., but when the page is loaded within the App, the Like button just doesn't appear.
Is this not possible?

Related

How to return form the web(iOS) back to the app?

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.

iOS PWA standalone: how to force opening in a new window

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.

Prevent kiosk mode webview link from opening new tab

I've created a chrome app that opens in kiosk mode, inside my chrome app i have a webview which is similar to an iframe except it works for chrome apps. On the website inside the webview there is a link that tries to open in a new tab, and fails.. At the moment it just does nothing when the button is clicked.
Is there a way to make all links inside the webview not open in new tabs? Or is there any other work around that you can think of?
I firebugged the link and this is what it says (i was expecting _blank but..):
<a class="js-tablink" href="/foh" target="FOH">
//link stuff
</a>

Open Cordova iOS external links in webview like an iFrame

I'm building an iOS app using cordova that basically opens news links to external sites. However iFrames don't seem to want to play nice on iOS. Is it possible to use UIWebView much like an iframe? I want to just embed a box on my app page so I can keep my apps header navigation and such. Instead right now opening links just pops the page up over everything.

FaceBook JavaScript API in native app UIWebview

I am creating an app which is reusing some of the HTML pages from my site. In one of the pages, there is a share event in facebook functionality. This is not working in UIWebview as there is no concept of "pop ups" in uiwebview. FB.Login() opens a new tab in an actual browser, but in UIWebview, it loads on top of the existing page.Hence after login, while the actual browser tab closes itself and transfers the control to the callback function in the original tab, UIWebview page just turns blank as it probably cannot find the original call back function anymore. Any solutions?

Resources