TUSafariActivity
A UIActivity subclass that opens URLs in Safari
Install / Use
/learn @davbeck/TUSafariActivityREADME
TUSafariActivity
TUSafariActivity is a UIActivity subclass that provides an "Open In Safari" action to a UIActivityViewController.

Installation
Swift Package Manager
TUSafariActivity is available through Swift Package Manager. To install
it, simply add the following line to your Package.swift:
dependencies: [.package(url: "https://github.com/davbeck/TUSafariActivity.git", from: "1.0.0")]
CocoaPods
TUSafariActivity is available through CocoaPods. To install
it, simply add the following line to your Podfile:
pod 'TUSafariActivity', '~> 1.0'
Usage
(See example Xcode project)
Simply alloc/init an instance of TUSafariActivity and pass that object into the applicationActivities array when creating a UIActivityViewController.
Objective-C
NSURL *URL = [NSURL URLWithString:@"http://google.com"];
TUSafariActivity *activity = [[TUSafariActivity alloc] init];
UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:@[URL] applicationActivities:@[activity]];
Swift
let url = URL(string: "http://google.com")!
let activity = TUSafariActivity()
let activityViewController = UIActivityViewController(activityItems: [url], applicationActivities: [activity])
Note that you can include the activity in any UIActivityViewController and it will only be shown to the user if there is a URL in the activity items.
Related Skills
node-connect
351.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
351.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
351.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
