Latest 1.5.0
Homepage https://github.com/raxityo/BrowserActivity
License MIT
Platforms ios 8.0
Authors

Version
License
Platform

Custom UIActivity implementations to show "Open in Safari", "Open in Chrome" and "Open in Firefox" options in the list of activities, implemented in Swift 5.

UIActivity Screenshot

Usage:

    let sharingURL = URL(string: "https://www.google.com/search?q=swift")
    let activityViewController = UIActivityViewController(
        activityItems: [sharingURL],
        applicationActivities: BrowserActivity.compatibleActivities
    )
    present(activityViewController, animated: true, completion: nil)

Helper:

BrowserActivity.compatibleActivities

Returns an Array of UIActivity instances to open the given URL in Safari and/or Google Chrome (if Google Chrome is installed in the device).

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

BrowserActivity is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "BrowserActivity"

Add/append googlechrome, googlechromes and firefox schemes in your Info.plist under LSApplicationQueriesSchemes. For example:

    <key>LSApplicationQueriesSchemes</key>
    <array>
        <string>firefox</string>
        <string>googlechrome</string>
        <string>googlechromes</string>
    </array>

Author

Raxit Majithiya (@raxityo)

License

BrowserActivity is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "BrowserActivity",
    "version": "1.5.0",
    "summary": "Custom UIActivity implementations to show "Open in Safari", "Open in Chrome" and "Open in Firefox" options in the list of activities.",
    "homepage": "https://github.com/raxityo/BrowserActivity",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Raxit Majithiya": "[email protected]"
    },
    "source": {
        "git": "https://github.com/raxityo/BrowserActivity.git",
        "tag": "1.5.0"
    },
    "social_media_url": "https://twitter.com/raxityo",
    "platforms": {
        "ios": "8.0"
    },
    "screenshots": [
        "https://raw.githubusercontent.com/raxityo/BrowserActivity/master/Example/screenshot.png"
    ],
    "source_files": "BrowserActivity/Classes/**/*",
    "resources": "BrowserActivity/Assets.xcassets",
    "pod_target_xcconfig": {
        "SWIFT_VERSION": "5.0"
    }
}

Pin It on Pinterest

Share This