Safari Share Sheet accessible to UIWebView? - ios

I want to add a Share bar button item to my top Navigation Bar that works like the one in Safari (send a link via SMS Message, copy a link, etc), are developers allowed access to that, or is it something where I have to create my own?

Found out you can do this with UIActivityViewController!
Let me know if you have any questions on this-

Related

Website wrapped in iOS App - Catching hyperlink click events

I have a iOS app that wraps a website. When the user clicks a link in the wrapped website, I want to trap the event in my app and be able to get information about the link that was clicked. Is this something that can be done in Swift?
I'm relatively new to iOS app development and I'm working on an app that has been around for a while.
The short answer is "Yes". There are a couple of views that you can use in iOS to display web content. One such view is WKWebView.
If you look at the documentation at that link, close to the bottom of the page you will find a header for "Managing Navigation Through your Web Content".
What you do is create a WKNavigationDelegate that you attach to your WKWebView. That delegate is notified when the user wants to navigate through the web content (for example, when they click on a link) and lets your application code participate in the navigation process. It can allow navigation, deny navigation, find out when it starts and stop, things of that nature.

How to add Button on the Apple Pass Card

I want to add a button on the passcard. I am using Laravel 8 to create a passcard. I can see that layout does not support doing so. Is there any way we can add a button on the passcard and that button will act as a clickable URL to route to some web link. Please help me to achieve this.
I am looking forward to hearing.
Thanks,
I think you cannot add button(s) on cards, maybe on Passes like boarding tickets, but the only link I can see on Passes is a image button (logo of the app) redirecting to the ios app linked.
Alternative for cards you can do:
Format your card with a text encouraging the user to press the dots button.
Then on card description you can add links

What is this iOS view called?

When you click on a url from a native app such as the Twitter or Facebook app, a new panel comes up to display the page. When you X out the panel, you are still in the app at the location from where you launched the url. How is this done as opposed to launching the url in an instance of Safari ?
You can use either WKWebView or SFSafariViewController
SFSafariViewController is now widely used to view websites and it looks just like Safari.app (the user can access his saved passwords/cards, and he can use reader view), the problem is that you don't have any control over it.
WKWebView is a replacement for UIWebView and you will have a better control over it but you'll have to add your own navigation and refresh buttons and title bar.
UIWebView. Here is a link to apples developer reference
https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIWebView_Class/

How to link to my app from the send button in the native photo viewer?

On my iPhone, when I view a photo I see a "send" button on the bottom toolbar; when I click this I see a menu screen with Mail, Message, Twitter, Facebook, Assign to Contact, Print, Copy and Use as Wallpaper icons.
Is there any way to get my app added to this list, and if so how do I set up my app to receive notification of this event and get access to the photo that is being viewed?
I had this exact same question and for whatever reason it took me a very long time to find this answer on stackoverflow that helped me. I hope it helps you.
Problems adding custom activity to UIActivityController

Add Share Button to Naviagtion Bar

I'd like to add a share button to the navigation bar in a webview that when pressed gives the options to open the link in Safari, Email the link, share on facebook, tweet it. Can anyone point me in the right direction on how to go about this?
Try BCDShareSheet. It includes sharing with Email, Twitter, and Facebook, but it lacks opening in Safari, but it should be trivial to add it.

Resources