Provides a Sharing Sheet on iOS & iPadOS and a Sharing Menu on macOS in a SwiftUI fashion that allows the user to share a piece of data using the Sharing Options available on the device the app is running on.
Installation
Swift Package Manager (Xcode 11 and above)
Select File > Swift Packages > Add Package Dependency… from the File menu.
Paste https://github.com/Appracatappra/SwiftUiSharing.git in the dialog box.
Follow the Xcode’s instruction to complete the installation.
Why not CocoaPods, or Carthage, or blank?
Supporting multiple dependency managers makes maintaining a library exponentially more complicated and time consuming.
Since, the Swift Package Manager is integrated with Xcode 11 (and greater), it’s the easiest choice to support going further.
iOS Example
Here’s an example of using SwiftUiSharing on iOS/iPadOS:
SwiftUiSharing for Swift and SwiftUI
Provides a Sharing Sheet on iOS & iPadOS and a Sharing Menu on macOS in a SwiftUI fashion that allows the user to share a piece of data using the Sharing Options available on the device the app is running on.
Installation
Swift Package Manager (Xcode 11 and above)
https://github.com/Appracatappra/SwiftUiSharing.git
in the dialog box.Supporting multiple dependency managers makes maintaining a library exponentially more complicated and time consuming.
Since, the Swift Package Manager is integrated with Xcode 11 (and greater), it’s the easiest choice to support going further.
iOS Example
Here’s an example of using
SwiftUiSharing
on iOS/iPadOS:Which looks like this on iOS:
Which looks like this on iPadOS:
macOS Example
Here’s an example of using
SwiftUiSharing
on macOS:Which looks like this on macOS: