A SwiftUI view that enables you to properly present a UIActivityViewController. (iOS)

Overview

ios

ActivityView

Also available as a part of my SwiftUI+ Collection – just add it to Xcode 13+

A SwiftUI view that enables you to properly present a UIActivityViewController.

Features

  • Convenient modifier API
  • Correctly lays out full screen
  • Full support for UIActivityViewController

Example

@State private var item: ActivityItem?

var body: some View {
    Button {
        item = ActivityItem(
            items: "This will be shared"
        )
    } label: {
        Text("Share")
    }
    .activitySheet($item)
}

Installation

The code is packaged as a framework. You can install manually (by copying the files in the Sources directory) or using Swift Package Manager (preferred)

To install using Swift Package Manager, add this to the dependencies section of your Package.swift file:

.package(url: "https://github.com/SwiftUI-Plus/ActivityView.git", .upToNextMinor(from: "1.0.0"))

Note: The package requires iOS v13+

Other Packages

If you want easy access to this and more packages, add the following collection to your Xcode 13+ configuration:

https://benkau.com/packages.json

You might also like...
A demo of how you can integrate SwiftUI and Airtable in your app
A demo of how you can integrate SwiftUI and Airtable in your app

SwiftUI Airtable Demo This is a small, functional example app that demonstrates how you can use Airtable as a lightweight backend. I wouldn't recommen

This mobile application built in SwiftUI is designed to help you medicate your cat faster.
This mobile application built in SwiftUI is designed to help you medicate your cat faster.

MediKitty This mobile application built in SwiftUI is designed to help you medicate your cat faster. If you medicate your kitty it will be happy Add w

In this tutorial, you’ll write your very first Core Data application with SwiftUI in Xcode

TodoApp-IOS In this tutorial, you’ll write your very first Core Data application with SwiftUI in Xcode. You’ll see how easy it is to get started with

SwiftUI App to view the App Activity Record from iOS 15
SwiftUI App to view the App Activity Record from iOS 15

App Activity Viewer A viewer for the iOS 15 "Record App Activity" export. FAQ How do I create an App Activity Report? Go to the "Settings" app of your

A SwiftUI implementation of React Hooks. Enhances reusability of stateful logic and gives state and lifecycle to function view.

SwiftUI Hooks A SwiftUI implementation of React Hooks. Enhances reusability of stateful logic and gives state and lifecycle to function view. Introduc

Vector editor to showcase advanced scroll view and SwiftUI
Vector editor to showcase advanced scroll view and SwiftUI

ShapeEdit ShapeEdit is a showcase for Advanced ScrollView, inspired by WWDC sample with the same name. ShapeEdit is build in SwiftUI, with exception o

A realistic reflective shimmer to SwiftUI Views that uses device orientation. Position any View relative to device orientation to appear as if through a window or reflected by the screen.
A realistic reflective shimmer to SwiftUI Views that uses device orientation. Position any View relative to device orientation to appear as if through a window or reflected by the screen.

A 3d rotation effect that uses Core Motion to allow SwiftUI views to appear projected in a specific direction and distance relative to the device in r

A simple and lightweight Swift package which provides a SwiftUI view for interactive geo coordinates input!
A simple and lightweight Swift package which provides a SwiftUI view for interactive geo coordinates input!

LocationPicker for SwiftUI LocationPicker for SwiftUI is a very simple and lightweight Swift package which provides you a SwiftUI view for interactive

INTUZ is presenting an interesting a custom alert view in SwiftUI
INTUZ is presenting an interesting a custom alert view in SwiftUI

Introduction INTUZ is presenting an interesting a custom alert view in SwiftUI, App Control to integrate inside your native iOS-based application. Cus

Comments
  • Allow invokation without variadic arguments

    Allow invokation without variadic arguments

    Have you read the Contributing Guidelines? yes

    Issue #3

    Describe your changes

    • Added a non-variadic initializer to ActivityItem, leaving the existing function signature intact. Deliberately uses a different function signature itemsArray items: [Any] so there is no conflict with the existing initializer/the Any type.
    • Fixed missing comment(s)
    opened by iamcalledrob 0
Owner
SwiftUI+
A collection of SwiftUI backports and more. Fully certificate signed, so please do not use any of the packages if Xcode warns otherwise.
SwiftUI+
Portfolio application developed to present my skills.

CatsApp-project Portfolio application developed to present my skills. CatsApp has the following functionality: it takes information (URL of a picture)

null 0 Nov 1, 2021
ReleaseNotesKit - a brand new, elegant, and extremely simple way to present the recent version’s release notes to your users

ReleaseNotesKit This is ReleaseNotesKit, a brand new, elegant, and extremely simple way to present the recent version’s release notes to your users. R

Swapnanil Dhol 22 Jun 30, 2022
Visualize your dividend growth. DivRise tracks dividend prices of your stocks, gives you in-depth information about dividend paying stocks like the next dividend date and allows you to log your monthly dividend income.

DivRise DivRise is an iOS app written in Pure SwiftUI that tracks dividend prices of your stocks, gives you in-depth information about dividend paying

Kevin Li 78 Oct 17, 2022
Are you bored? This app helps find you something to do via Bored api

Bored Swift Are you bored? This app helps find you something to do via Bored api Features Beautiful widgets ?? Simple and easy ✅ Open source ?? Previe

Armin Shalchian 29 Oct 11, 2022
MapApp - You can save the location of the places you go on the map and add names and notes

MapApp - You can save the location of the places you go on the map and add names and notes

Yağız Savran 3 Feb 1, 2022
Bookworm - Track which books you’ve read and what you thought of them

Bookworm Description: Bookworm is an app I built while following 100 Days of Swi

Ionut Vasile 0 Aug 18, 2022
A beautiful app that will let you know how much sun you have today.

Daylight A beautiful app that will let you know how much sun you have today. Running the project Open Project.xcodeproj and run What's interesting abo

Bakken & Bæck 118 Jan 2, 2023
A package that allows you to easily enable the Xcode canvas to a UIKit view.

UIViewCanvas This package allows you to enable a SwiftUI Xcode canva to a UIView or a entire ViewController. Why? Run emulator everytime you need to t

Wender 14 Jun 9, 2022
A SwiftUI app that reads iOS/watchOS/tvOS device model information from Xcode you select.

iVariant A SwiftUI app that reads iOS/watchOS/tvOS device model information from Xcode you select. Preview License iVariant is licensed under MIT. Cop

Lakr Aream 20 Aug 4, 2022
A open source Swift app for iOS 13 that allows you to check your NFC transit card information. Written with SwiftUI.

ABANDONED Metrodroid, which TransitPal was heavily inspired by, now has its own fully functional iOS app! It should be in the App Store "soon". I stro

Robbie Trencheny 132 Jun 30, 2022