Latest 1.0.2
Homepage https://github.com/helpscout/HSAttachmentPicker
License MIT
Platforms ios 8.0
Authors

CI Status
Version
License
Platform

HSAttachmentPicker creates a UIAlertController as a menu to access file data from photos, the camera, and the document browser APIs available on iOS.

Usage

You’ll want to create a new HSAttachmentPicker, assign a delegate, and call showAttachmentMenu.

menu = [[HSAttachmentPicker alloc] init];
menu.delegate = self;
[menu showAttachmentMenu];

It’s important you class holds a reference to the HSAttachmentPicker so it doesn’t get garbage collected.

Example

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

The example project only contains a simple delegate that logs the operations for demonstration purposes.

Requirements

In order to use the photo and camera related features, the NSPhotoLibraryUsageDescription and NSCameraUsageDescription properties need to be set in your application’s Info.plist file. Without these the menu items will be unavailable.

For access to the document picker, you’ll need the entitlements for iCloud and iCloud Containers. This will throw an error message via the delegate on the ‘Import file from’ menu option otherwise.

Installation

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

pod 'HSAttachmentPicker'

License

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

Latest podspec

{
    "name": "HSAttachmentPicker",
    "version": "1.0.2",
    "summary": "Provides a UIAlertMenu to access photos, camera, and document browser",
    "homepage": "https://github.com/helpscout/HSAttachmentPicker",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Help Scout": "[email protected]"
    },
    "source": {
        "git": "https://github.com/helpscout/HSAttachmentPicker.git",
        "tag": "1.0.2"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "HSAttachmentPicker/Classes/**/*"
}

Pin It on Pinterest

Share This