Swiftpack.co - cybozu/AttachmentInput as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by cybozu.
cybozu/AttachmentInput 1.0.0
AttachmentInput is image picker keyboard.
⭐️ 30
πŸ•“ 2 years ago
iOS
.package(url: "https://github.com/cybozu/AttachmentInput.git", from: "1.0.0")

πŸ“· AttachmentInput

AttachmentInput is a photo attachment keyboard.It is similar to the keyboard for photo attachment of iOS 11 Messenger.

🍱 Supported Features

  • Shoot a photo on the keyboard
  • Pick image/video on the keyboard
  • Pick image/video from UIImagePickerController
  • Download and attach image/video stored on iCloud
  • Compress image/video
  • Get the image/video file name, file size, thumbnail image
  • Provides custom features

βš“ Requirements

  • Written in Swift 5
  • Compatible with iOS 12.0+
  • Development with Xcode 12.0+

πŸƒ Install

CocoaPods

Add this to your CocoaPods Podfile.

pod 'AttachmentInput'

Swift Package Manager

Add dependencies value of your Package.swift.

dependencies: [
    .package(url: "https://github.com/cybozu/AttachmentInput.git", .upToNextMajor(from: "1.0.0"))
]

πŸ› οΈ Usage

  1. Add privacy properties in info.plist with a usage description

    • Privacy - Photo Library Usage Description
    • Privacy - Microphone Usage Description
    • Privacy - Camera Usage Description
  2. Create AttachmentInput instance

    let attachmentInput = AttachmentInput()
    
  3. By returning AttachmentInput#view at inputview you can display the keyboard in the class that inherited UIResponder

    override var inputView: UIView? {
        return attachmentInput.view
    }
    
  4. Define the behavior when receive the photos in AttachmentInputDelegate and set it to AttachmentInput

    attachmentInput.delegate = self
    
  5. If you need to use your config, you can pass the config as you create instance

    let config = AttachmentInputConfiguration()
    config.videoQuality = .typeLow
    attachmentInput = AttachmentInput(configuration: config)
    

πŸ–‹οΈ License

MIT

GitHub

link
Stars: 30
Last commit: 14 weeks ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

1.0.0
2 years ago

What's Changed

New Contributors

Full Changelog: https://github.com/cybozu/AttachmentInput/compare/0.0.5...1.0.0

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics