Latest 0.1
Homepage https://github.com/pwlkania/CameraDevicesUtilities
License MIT
Platforms ios 8.0
Authors

CameraDevicesUtilities is a framework written in swift, which is responsible for providing basic information for all built-in cameras in iDevices.

Swift 3.0
Carthage Compatible
Platform
License

WARNING!

Framework is still under development, so please keep in mind that it has not been tested well, especially on iPhone 7 Plus. You can expect unexpected results!

Preview.png

Installation

The most convenient way to install it is by using Cocoapods with Podfile:

pod 'CameraDevicesUtilities'

or using Carthage and add a line to Cartfile:

github "pwlkania/CameraDevicesUtilities"

Requirements

iOS 8.0

Usage

import CameraDevicesUtilities
let builtInCameraDevices = CameraDevicesUtilities.allBuiltInCameraDevices()

if let wideAngle = builtInCameraDevices.wideAngle {
            print("(wideAngle.megapixels)")
            print("(wideAngle.maximumStillImageResolution.width) x (wideAngle.maximumStillImageResolution.height)")

            let supportedCommonResolutionStandards = wideAngle.supportedCommonResolutionStandards

            for supportedCommonResolutionStandard in supportedCommonResolutionStandards {
                switch supportedCommonResolutionStandard {
                case CommonResolutionStandard.res720p(videoFormat: let videoFormat):
                    print("720p @ (videoFormat.maxFrameRate)")
                case CommonResolutionStandard.res1080p(videoFormat: let videoFormat):
                    print("1080p @ (videoFormat.maxFrameRate)")
                case CommonResolutionStandard.res2160p(videoFormat: let videoFormat):
                    print("2160p @ (videoFormat.maxFrameRate)")
                }
            }
        }

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/pwlkania/CameraDevicesUtilities.

License

The project is available as open source under the terms of the MIT License.

Latest podspec

{
    "name": "CameraDevicesUtilities",
    "version": "0.1",
    "license": "MIT",
    "summary": "Swift framework responsible for providing basic information for all built-in cameras in iDevices",
    "homepage": "https://github.com/pwlkania/CameraDevicesUtilities",
    "authors": {
        "Paweu0142 Kania": "[email protected]"
    },
    "source": {
        "git": "https://github.com/pwlkania/CameraDevicesUtilities.git",
        "tag": "0.1"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "Sources/{*.swift}"
}

Pin It on Pinterest

Share This