Latest1.0.3
Homepagehttps://github.com/helpscout/HSAttachmentPicker
LicenseMIT
Platformsios 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.

HSAttachmentPicker

Usage

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

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

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.

HSAttachmentPicker

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.

HSAttachmentPicker

Installation

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

pod 'HSAttachmentPicker'

Localization

The following strings can be specified to override the default messaging:

/* Menu Items */
"Take Photo"="Take Photo";

"Use Last Photo"="Use Last Photo";

"Choose from Library"="Choose from Library";

"Import File from"="Import File from";

"Cancel"="Cancel";

"OK"="OK";

/* Errors */
"This application is not entitled to access iCloud"="This application is not entitled to access iCloud";

"There doesn't seem to be a photo taken yet."="There doesn't seem to be a photo taken yet.";

"To give permissions tap on 'Change Settings' button"="To give permissions tap on 'Change Settings' button";

"Unable to save video: %@"="Unable to save video: %@";

"Unable to save photo: %@"="Unable to save photo: %@";

"Selected media type is unsupported"="Selected media type is unsupported";

By default it will check NSBundle.mainBundle and Localizable.strings, but these values can be overriden with the translationsBundle and translationsTable properties on the HSAttachmentPicker object.

License

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

Latest podspec

{
    "name": "HSAttachmentPicker",
    "version": "1.0.3",
    "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.3"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "HSAttachmentPicker/Classes/**/*"
}

Pin It on Pinterest

Share This