[
  {
    "path": ".gitignore",
    "content": "# OS X\n.DS_Store\n\n# Xcode\nbuild/\n*.pbxuser\n!default.pbxuser\n*.mode1v3\n!default.mode1v3\n*.mode2v3\n!default.mode2v3\n*.perspectivev3\n!default.perspectivev3\nxcuserdata\n*.xccheckout\nprofile\n*.moved-aside\nDerivedData\n*.hmap\n*.ipa"
  },
  {
    "path": ".swift-version",
    "content": "5.0\n"
  },
  {
    "path": ".travis.yml",
    "content": "# references:\n# * http://www.objc.io/issue-6/travis-ci.html\n# * https://github.com/supermarin/xcpretty#usage\nosx_image: xcode10.2\nlanguage: swift\n# cache: cocoapods\n# podfile: Example/Podfile\n# before_install:\n# - gem install cocoapods # Since Travis is not always on latest version\n# - pod install --project-directory=Example\ninstall:\n- gem install xcpretty --no-document --quiet\nscript:\n- set -o pipefail && xcodebuild test -project Regift.xcodeproj/ -scheme Regift -destination 'platform=iOS Simulator,name=iPhone X' ONLY_ACTIVE_ARCH=NO | xcpretty -c\n- set -o pipefail && xcodebuild test -project Regift.xcodeproj/ -scheme RegiftOSX -destination 'platform=OS X,arch=x86_64' ONLY_ACTIVE_ARCH=NO | xcpretty -c\n- pod lib lint --quick\n"
  },
  {
    "path": "LICENSE.markdown",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2014 Matthew Palmer\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE."
  },
  {
    "path": "README.markdown",
    "content": "# Regift\nEasily convert a video to a GIF on iOS and OSX.\n\n[![Travis](https://travis-ci.org/matthewpalmer/Regift.svg?branch=master)](https://travis-ci.org/matthewpalmer/Regift)\n[![Version](https://img.shields.io/cocoapods/v/Regift.svg?style=flat)](http://cocoadocs.org/docsets/Regift)\n[![License](https://img.shields.io/cocoapods/l/Regift.svg?style=flat)](http://cocoadocs.org/docsets/Regift)\n[![Platform](https://img.shields.io/cocoapods/p/Regift.svg?style=flat)](http://cocoadocs.org/docsets/Regift)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n\n<br />\n<br />\n<br />\n\n<p align=\"center\">\n  🚀\n  <br/>\n  <br/>\n\n  I also make <a href=\"http://matthewpalmer.net/rocket\" alt=\"Download Rocket for free\" title=\"Rocket home page\">Rocket</a>, an app that gives you Slack-style emoji everywhere on your Mac.\n\n  <br />\n\n  <img alt=\"Demo image of Rocket\" title=\"Rocket provides better emoji on Macs\" src=\"http://matthewpalmer.net/rocket/screenshot.gif\" />\n</p>\n\n<br/>\n<br />\n<br />\n<br />\n\n## Requirements\n\n- Xcode 10+\n- iOS 11.1+ / macOS 10.12+\n- Swfit 5.0+\n\n## Installation\n### Cocoapods\n\nRegift is available through [CocoaPods](http://cocoapods.org). To install it, simply add the following line to your Podfile:\n\n```\npod \"Regift\"\n```\n\n### Carthage\n\nRegift is available through [Carthage](https://github.com/Carthage/Carthage).\n\n```\ngithub 'matthewpalmer/Regift'\n```\n\n## Quick Start\n\n```swift\nimport Regift\n```\n\nSynchronous GIF creation:\n\n```swift\nlet videoURL   = ...\nlet frameCount = 16\nlet delayTime  = Float(0.2)\nlet loopCount  = 0    // 0 means loop forever\n\nlet regift = Regift(sourceFileURL: videoURL, frameCount: frameCount, delayTime: delayTime, loopCount: loopCount)\nprint(\"Gif saved to \\(regift.createGif())\")\n\nlet startTime = Float(30)\nlet duration  = Float(15)\nlet frameRate = 15\n\nlet trimmedRegift = Regift(sourceFileURL: URL, startTime: startTime, duration: duration, frameRate: frameRate, loopCount: loopCount)\nprint(\"Gif saved to \\(trimmedRegift.createGif())\")\n```\n\nAsynchronous GIF creation:\n\n```swift\nlet videoURL   = ...\nlet frameCount = 16\nlet delayTime  = Float(0.2)\nlet loopCount  = 0    // 0 means loop forever\n\nRegift.createGIFFromSource(videoURL, frameCount: frameCount, delayTime: delayTime) { (result) in\n    print(\"Gif saved to \\(result)\")\n}\n\nlet startTime = Float(30)\nlet duration  = Float(15)\nlet frameRate = 15\n\nRegift.createGIFFromSource(videoURL, startTime: startTime, duration: duration, frameRate: frameRate) { (result) in\n    print(\"Gif saved to \\(result)\")\n}\n```\n\n## Acknowledgements\nThanks to [Rob Mayoff's Gist](https://gist.github.com/mayoff/4969104), without which this library wouldn't exist.\n\nMy personal thanks to all of Regift’s contributors:\n\n* caughtinflux\n* samuelbeek\n* sebyddd\n* nakajijapan\n* dbburgess\n"
  },
  {
    "path": "Regift/AVAssetImageGeneratorTimePoints.swift",
    "content": "//\n//  AVAssetImageGeneratorTimePoints.swift\n//  Vivify\n//\n//  Created by Aditya KD on 26/07/15.\n//  Copyright (c) 2015 Giffage. All rights reserved.\n//\n\nimport AVFoundation\n\npublic extension AVAssetImageGenerator {\n    func generateCGImagesAsynchronouslyForTimePoints(timePoints: [TimePoint], completionHandler: @escaping AVAssetImageGeneratorCompletionHandler) {\n        let times = timePoints.map {timePoint in\n            return NSValue(time: timePoint)\n        }\n        self.generateCGImagesAsynchronously(forTimes: times, completionHandler: completionHandler)\n    }\n}\n"
  },
  {
    "path": "Regift/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>en</string>\n\t<key>CFBundleExecutable</key>\n\t<string>$(EXECUTABLE_NAME)</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>$(PRODUCT_NAME)</string>\n\t<key>CFBundlePackageType</key>\n\t<string>FMWK</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.0</string>\n\t<key>CFBundleSignature</key>\n\t<string>????</string>\n\t<key>CFBundleVersion</key>\n\t<string>$(CURRENT_PROJECT_VERSION)</string>\n\t<key>NSPrincipalClass</key>\n\t<string></string>\n</dict>\n</plist>\n"
  },
  {
    "path": "Regift/Regift.h",
    "content": "//\n//  Regift.h\n//  Regift\n//\n//  Created by Matthew Palmer on 27/12/2014.\n//  Copyright (c) 2014 Matthew Palmer. All rights reserved.\n//\n#import <Foundation/Foundation.h>\n\n#if TARGET_OS_WATCH\n#elif TARGET_OS_TV\n#elif TARGET_OS_IPHONE\n#import <UIKit/UIKit.h>\n#elif TARGET_OS_MAC\n#import <Cocoa/Cocoa.h>\n#endif\n\n//! Project version number for Regift.\nFOUNDATION_EXPORT double RegiftVersionNumber;\n\n//! Project version string for Regift.\nFOUNDATION_EXPORT const unsigned char RegiftVersionString[];\n\n// In this header, you should import all the public headers of your framework using statements like #import <Regift/PublicHeader.h>\n\n\n"
  },
  {
    "path": "Regift/Regift.swift",
    "content": "//\n//  Regift.swift\n//  Regift\n//\n//  Created by Matthew Palmer on 27/12/2014.\n//  Copyright (c) 2014 Matthew Palmer. All rights reserved.\n//\n\n#if os(iOS)\nimport UIKit\nimport MobileCoreServices\n#elseif os(OSX)\nimport AppKit\n#endif\n\nimport ImageIO\nimport AVFoundation\n\npublic typealias TimePoint = CMTime\npublic typealias ProgressHandler = (Double) -> Void\n\n/// Errors thrown by Regift\npublic enum RegiftError: String, Error {\n    case DestinationNotFound = \"The temp file destination could not be created or found\"\n    case SourceFormatInvalid = \"The source file does not appear to be a valid format\"\n    case AddFrameToDestination = \"An error occurred when adding a frame to the destination\"\n    case DestinationFinalize = \"An error occurred when finalizing the destination\"\n}\n\n// Convenience struct for managing dispatch groups.\nprivate struct Group {\n    let group = DispatchGroup()\n    func enter() { group.enter() }\n    func leave() { group.leave() }\n    func wait() { let _ = group.wait(timeout: DispatchTime.distantFuture) }\n}\n\n/// Easily convert a video to a GIF. It can convert the whole thing, or you can choose a section to trim out.\n///\n/// Synchronous Usage:\n///\n///      let regift = Regift(sourceFileURL: movieFileURL, frameCount: 24, delayTime: 0.5, loopCount: 7)\n///      print(regift.createGif())\n///\n///      // OR\n///\n///      let trimmedRegift = Regift(sourceFileURL: movieFileURL, startTime: 30, duration: 15, frameRate: 15)\n///      print(trimmedRegift.createGif())\n///\n/// Asynchronous Usage:\n///\n///      let regift = Regift.createGIFFromSource(movieFileURL, frameCount: 24, delayTime: 0.5, loopCount: 7) { (result) in\n///          print(result)\n///      }\n///\n///      // OR\n///\n///      let trimmedRegift = Regift.createGIFFromSource(movieFileURL, startTime: 30, duration: 15, frameRate: 15, loopCount: 0) { (result) in\n///          print(result)\n///      }\n///\npublic struct Regift {\n\n    // Static conversion methods, for convenient and easy-to-use API:\n\n    /**\n        Create a GIF from a movie stored at the given URL. This converts the whole video to a GIF meeting the requested output parameters.\n\n        - parameters:\n            - sourceFileURL: The source file to create the GIF from.\n            - destinationFileURL: An optional destination file to write the GIF to. If you don't include this, a default path will be provided.\n            - frameCount: The number of frames to include in the gif; each frame has the same duration and is spaced evenly over the video.\n            - delayTime: The amount of time each frame exists for in the GIF.\n            - loopCount: The number of times the GIF will repeat. This defaults to `0`, which means that the GIF will repeat infinitely.\n            - size: The maximum size of generated GIF. This defaults to `nil`, which specifies the asset’s unscaled dimensions. Setting size will not change the image aspect ratio.\n            - completion: A block that will be called when the GIF creation is completed. The `result` parameter provides the path to the file, or will be `nil` if there was an error.\n    */\n    public static func createGIFFromSource(\n        _ sourceFileURL: URL,\n        destinationFileURL: URL? = nil,\n        frameCount: Int,\n        delayTime: Float,\n        loopCount: Int = 0,\n        size: CGSize? = nil,\n        progress: ProgressHandler? = nil,\n        completion: (_ result: URL?) -> Void) {\n            let gift = Regift(\n                sourceFileURL: sourceFileURL,\n                destinationFileURL: destinationFileURL,\n                frameCount: frameCount,\n                delayTime: delayTime,\n                loopCount: loopCount,\n                size: size,\n                progress: progress\n            )\n\n            completion(gift.createGif())\n    }\n\n    /**\n        Create a GIF from a movie stored at the given URL. This allows you to choose a start time and duration in the source material that will be used to create the GIF which meets the output parameters.\n\n        - parameters:\n            - sourceFileURL: The source file to create the GIF from.\n            - destinationFileURL: An optional destination file to write the GIF to. If you don't include this, a default path will be provided.\n            - startTime: The time in seconds in the source material at which you want the GIF to start.\n            - duration: The duration in seconds that you want to pull from the source material.\n            - frameRate: The desired frame rate of the outputted GIF.\n            - loopCount: The number of times the GIF will repeat. This defaults to `0`, which means that the GIF will repeat infinitely.\n            - size: The maximum size of generated GIF. This defaults to `nil`, which specifies the asset’s unscaled dimensions. Setting size will not change the image aspect ratio.\n            - completion: A block that will be called when the GIF creation is completed. The `result` parameter provides the path to the file, or will be `nil` if there was an error.\n    */\n    public static func createGIFFromSource(\n        _ sourceFileURL: URL,\n        destinationFileURL: URL? = nil,\n        startTime: Float,\n        duration: Float,\n        frameRate: Int,\n        loopCount: Int = 0,\n        size: CGSize? = nil,\n        progress: ProgressHandler? = nil,\n        completion: (_ result: URL?) -> Void) {\n            let gift = Regift(\n                sourceFileURL: sourceFileURL,\n                destinationFileURL: destinationFileURL,\n                startTime: startTime,\n                duration: duration,\n                frameRate: frameRate,\n                loopCount: loopCount,\n                size: size,\n                progress: progress\n            )\n\n            completion(gift.createGif())\n    }\n    \n    public static func createGIF(\n        fromAsset asset: AVAsset,\n        destinationFileURL: URL? = nil,\n        startTime: Float,\n        duration: Float,\n        frameRate: Int,\n        loopCount: Int = 0,\n        completion: (_ result: URL?) -> Void) {\n\n        let gift = Regift(\n            asset: asset,\n            destinationFileURL: destinationFileURL,\n            startTime: startTime,\n            duration: duration,\n            frameRate: frameRate,\n            loopCount: loopCount\n        )\n        \n        completion(gift.createGif())\n    }\n\n    private struct Constants {\n        static let FileName = \"regift.gif\"\n        static let TimeInterval: Int32 = 600\n        static let Tolerance = 0.01\n    }\n\n    /// A reference to the asset we are converting.\n    private var asset: AVAsset\n\n    /// The url for the source file.\n    private var sourceFileURL: URL?\n\n    /// The point in time in the source which we will start from.\n    private var startTime: Float = 0\n\n    /// The desired duration of the gif.\n    private var duration: Float\n\n    /// The total length of the movie, in seconds.\n    private var movieLength: Float\n\n    /// The number of frames we are going to use to create the gif.\n    private let frameCount: Int\n\n    /// The amount of time each frame will remain on screen in the gif.\n    private let delayTime: Float\n\n    /// The number of times the gif will loop (0 is infinite).\n    private let loopCount: Int\n\n    /// The destination path for the generated file.\n    private var destinationFileURL: URL?\n\n    /// The handler to inform you about the current GIF export progress\n    private var progress: ProgressHandler?\n    \n    /// The maximum width/height for the generated file.\n    fileprivate let size: CGSize?\n    \n    /**\n        Create a GIF from a movie stored at the given URL. This converts the whole video to a GIF meeting the requested output parameters.\n\n        - parameters:\n            - sourceFileURL: The source file to create the GIF from.\n            - destinationFileURL: An optional destination file to write the GIF to. If you don't include this, a default path will be provided.\n            - frameCount: The number of frames to include in the gif; each frame has the same duration and is spaced evenly over the video.\n            - delayTime: The amount of time each frame exists for in the GIF.\n            - loopCount: The number of times the GIF will repeat. This defaults to `0`, which means that the GIF will repeat infinitely.\n            - size: The maximum size of generated GIF. This defaults to `nil`, which specifies the asset’s unscaled dimensions. Setting size will not change the image aspect ratio.\n\n     */\n    public init(sourceFileURL: URL, destinationFileURL: URL? = nil, frameCount: Int, delayTime: Float, loopCount: Int = 0, size: CGSize? = nil, progress: ProgressHandler? = nil) {\n        self.sourceFileURL = sourceFileURL\n        self.asset = AVURLAsset(url: sourceFileURL, options: nil)\n        self.movieLength = Float(asset.duration.value) / Float(asset.duration.timescale)\n        self.duration = movieLength\n        self.delayTime = delayTime\n        self.loopCount = loopCount\n        self.destinationFileURL = destinationFileURL\n        self.frameCount = frameCount\n        self.size = size\n        self.progress = progress\n    }\n\n    /**\n        Create a GIF from a movie stored at the given URL. This allows you to choose a start time and duration in the source material that will be used to create the GIF which meets the output parameters.\n\n        - parameters:\n            - sourceFileURL: The source file to create the GIF from.\n            - destinationFileURL: An optional destination file to write the GIF to. If you don't include this, a default path will be provided.\n            - startTime: The time in seconds in the source material at which you want the GIF to start.\n            - duration: The duration in seconds that you want to pull from the source material.\n            - frameRate: The desired frame rate of the outputted GIF.\n            - loopCount: The number of times the GIF will repeat. This defaults to `0`, which means that the GIF will repeat infinitely.\n            - size: The maximum size of generated GIF. This defaults to `nil`, which specifies the asset’s unscaled dimensions. Setting size will not change the image aspect ratio.\n\n     */\n    public init(sourceFileURL: URL, destinationFileURL: URL? = nil, startTime: Float, duration: Float, frameRate: Int, loopCount: Int = 0, size: CGSize? = nil, progress: ProgressHandler? = nil) {\n        self.sourceFileURL = sourceFileURL\n        self.asset = AVURLAsset(url: sourceFileURL, options: nil)\n        self.destinationFileURL = destinationFileURL\n        self.startTime = startTime\n        self.duration = duration\n\n        // The delay time is based on the desired framerate of the gif.\n        self.delayTime = (1.0 / Float(frameRate))\n\n        // The frame count is based on the desired length and framerate of the gif.\n        self.frameCount = Int(duration * Float(frameRate))\n\n        // The total length of the file, in seconds.\n        self.movieLength = Float(asset.duration.value) / Float(asset.duration.timescale)\n\n        self.loopCount = loopCount\n        self.size = size\n        self.progress = progress\n    }\n    \n    public init(asset: AVAsset, destinationFileURL: URL? = nil, startTime: Float, duration: Float, frameRate: Int, loopCount: Int = 0, size: CGSize? = nil, progress: ProgressHandler? = nil) {\n        self.asset = asset\n        self.destinationFileURL = destinationFileURL\n        self.startTime = startTime\n        self.duration = duration\n        self.delayTime = (1.0 / Float(frameRate))\n        self.frameCount = Int(duration * Float(frameRate))\n        self.movieLength = Float(asset.duration.value) / Float(asset.duration.timescale)\n        self.loopCount = loopCount\n        self.size = size\n        self.progress = progress\n    }\n\n    /**\n        Get the URL of the GIF created with the attributes provided in the initializer.\n\n        - returns: The path to the created GIF, or `nil` if there was an error creating it.\n    */\n    public func createGif() -> URL? {\n\n        let fileProperties = [kCGImagePropertyGIFDictionary as String:[\n            kCGImagePropertyGIFLoopCount as String: NSNumber(value: Int32(loopCount) as Int32)],\n            kCGImagePropertyGIFHasGlobalColorMap as String: NSValue(nonretainedObject: true)\n        ] as [String : Any]\n        \n        let frameProperties = [\n            kCGImagePropertyGIFDictionary as String:[\n                kCGImagePropertyGIFDelayTime as String:delayTime\n            ]\n        ]\n\n        // How far along the video track we want to move, in seconds.\n        let increment = Float(duration) / Float(frameCount)\n        \n        // Add each of the frames to the buffer\n        var timePoints: [TimePoint] = []\n        \n        for frameNumber in 0 ..< frameCount {\n            let seconds: Float64 = Float64(startTime) + (Float64(increment) * Float64(frameNumber))\n            let time = CMTimeMakeWithSeconds(seconds, preferredTimescale: Constants.TimeInterval)\n            \n            timePoints.append(time)\n        }\n        \n        do {\n            return try createGIFForTimePoints(timePoints, fileProperties: fileProperties as [String : AnyObject], frameProperties: frameProperties as [String : AnyObject], frameCount: frameCount, size: size)\n            \n        } catch {\n            return nil\n        }\n    }\n\n    /**\n        Create a GIF using the given time points in a movie file stored in this Regift's `asset`.\n    \n        - parameters:\n            - timePoints: timePoints An array of `TimePoint`s (which are typealiased `CMTime`s) to use as the frames in the GIF.\n            - fileProperties: The desired attributes of the resulting GIF.\n            - frameProperties: The desired attributes of each frame in the resulting GIF.\n            - frameCount: The desired number of frames for the GIF. *NOTE: This seems redundant to me, as `timePoints.count` should really be what we are after, but I'm hesitant to change the API here.*\n            - size: The maximum size of generated GIF. This defaults to `nil`, which specifies the asset’s unscaled dimensions. Setting size will not change the image aspect ratio.\n\n        - returns: The path to the created GIF, or `nil` if there was an error creating it.\n    */\n    public func createGIFForTimePoints(_ timePoints: [TimePoint], fileProperties: [String: AnyObject], frameProperties: [String: AnyObject], frameCount: Int, size: CGSize? = nil) throws -> URL {\n        // Ensure the source media is a valid file.\n        guard asset.tracks(withMediaCharacteristic: .visual).count > 0 else {\n            throw RegiftError.SourceFormatInvalid\n        }\n\n        var fileURL:URL?\n        if self.destinationFileURL != nil {\n            fileURL = self.destinationFileURL\n        } else {\n            let temporaryFile = (NSTemporaryDirectory() as NSString).appendingPathComponent(Constants.FileName)\n            fileURL = URL(fileURLWithPath: temporaryFile)\n        }\n        \n        guard let destination = CGImageDestinationCreateWithURL(fileURL! as CFURL, kUTTypeGIF, frameCount, nil) else {\n            throw RegiftError.DestinationNotFound\n        }\n        \n        CGImageDestinationSetProperties(destination, fileProperties as CFDictionary)\n        \n        let generator = AVAssetImageGenerator(asset: asset)\n        \n        generator.appliesPreferredTrackTransform = true\n        if let size = size {\n            generator.maximumSize = size\n        }\n        \n        let tolerance = CMTimeMakeWithSeconds(Constants.Tolerance, preferredTimescale: Constants.TimeInterval)\n        generator.requestedTimeToleranceBefore = tolerance\n        generator.requestedTimeToleranceAfter = tolerance\n\n        // Transform timePoints to times for the async asset generator method.\n        var times = [NSValue]()\n        for time in timePoints {\n            times.append(NSValue(time: time))\n        }\n\n        // Create a dispatch group to force synchronous behavior on an asynchronous method.\n        let gifGroup = Group()\n        gifGroup.enter()\n\n        var handledTimes: Double = 0\n        generator.generateCGImagesAsynchronously(forTimes: times, completionHandler: { (requestedTime, image, actualTime, result, error) in\n            handledTimes += 1\n            guard let imageRef = image , error == nil else {\n                print(\"An error occurred: \\(String(describing: error)), image is \\(String(describing: image))\")\n                if requestedTime == times.last?.timeValue {\n                    gifGroup.leave()\n                }\n                return\n            }\n\n            CGImageDestinationAddImage(destination, imageRef, frameProperties as CFDictionary)\n            self.progress?(min(1.0, handledTimes/max(1.0, Double(times.count))))\n            if requestedTime == times.last?.timeValue {\n                gifGroup.leave()\n            }\n        })\n\n        // Wait for the asynchronous generator to finish.\n        gifGroup.wait()\n        \n        CGImageDestinationSetProperties(destination, fileProperties as CFDictionary)\n        \n        // Finalize the gif\n        if !CGImageDestinationFinalize(destination) {\n            throw RegiftError.DestinationFinalize\n        }\n        \n        return fileURL!\n    }\n}\n"
  },
  {
    "path": "Regift.podspec",
    "content": "Pod::Spec.new do |s|\n  s.name             = \"Regift\"\n  s.version          = \"1.6.0\"\n  s.summary          = \"Regift helps you easily convert a video to a GIF on iOS.\"\n  s.description      = <<-DESC\n                       Regift helps you easily convert a video to a GIF on iOS.\n                       Create a gif from a given video URL, tweaking the frame count, delay time, and number of loops.\n                       DESC\n  s.homepage         = \"https://github.com/matthewpalmer/Regift\"\n  s.license          = 'MIT'\n  s.author           = { \"matthewpalmer\" => \"matt@matthewpalmer.net\" }\n  s.source           = { :git => \"https://github.com/matthewpalmer/Regift.git\", :tag => s.version.to_s }\n  s.social_media_url = 'https://twitter.com/_matthewpalmer'\n\n  s.ios.deployment_target = '11.1'\n  s.osx.deployment_target = '10.12'\n\n  s.requires_arc = true\n\n  s.source_files = 'Regift/*.{m,h,swift}'\nend\n"
  },
  {
    "path": "Regift.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section */\n\t\t0E0C3BC61A4E9A7D00325FF0 /* Regift.h in Headers */ = {isa = PBXBuildFile; fileRef = 0E0C3BC51A4E9A7D00325FF0 /* Regift.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t0E0C3BCC1A4E9A7D00325FF0 /* Regift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0E0C3BC01A4E9A7D00325FF0 /* Regift.framework */; };\n\t\t0E0C3BD31A4E9A7D00325FF0 /* RegiftTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E0C3BD21A4E9A7D00325FF0 /* RegiftTests.swift */; };\n\t\t0E0C3BDD1A4E9A9000325FF0 /* Regift.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E0C3BDC1A4E9A9000325FF0 /* Regift.swift */; };\n\t\t0E0C3BDF1A4E9C1900325FF0 /* ImageIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0E0C3BDE1A4E9C1900325FF0 /* ImageIO.framework */; };\n\t\t0E0C3BE11A4E9E6400325FF0 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0E0C3BE01A4E9E6400325FF0 /* MobileCoreServices.framework */; };\n\t\t0E0C3BE51A4EA2F100325FF0 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0E0C3BE41A4EA2F100325FF0 /* AVFoundation.framework */; };\n\t\t0EB2CE501B807C2600854BDD /* regift-test-file.mov in Resources */ = {isa = PBXBuildFile; fileRef = 0EB2CE4F1B807C2600854BDD /* regift-test-file.mov */; };\n\t\tAE9B5BA81D8FC0E500F22881 /* AVAssetImageGeneratorTimePoints.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE9B5BA71D8FC0E500F22881 /* AVAssetImageGeneratorTimePoints.swift */; };\n\t\tDC50F2D61C82B858008518EC /* RegiftOSX.h in Headers */ = {isa = PBXBuildFile; fileRef = DC50F2D51C82B858008518EC /* RegiftOSX.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\tDC50F2DC1C82B8FD008518EC /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0E0C3BE41A4EA2F100325FF0 /* AVFoundation.framework */; };\n\t\tDC50F2DD1C82B8FD008518EC /* ImageIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0E0C3BDE1A4E9C1900325FF0 /* ImageIO.framework */; };\n\t\tDC50F30E1C82C863008518EC /* RegiftTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E0C3BD21A4E9A7D00325FF0 /* RegiftTests.swift */; };\n\t\tDC50F3111C82CB3B008518EC /* Regift.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E0C3BDC1A4E9A9000325FF0 /* Regift.swift */; };\n\t\tDC50F3141C82D2CC008518EC /* regift-test-file.mov in Resources */ = {isa = PBXBuildFile; fileRef = 0EB2CE4F1B807C2600854BDD /* regift-test-file.mov */; };\n\t\tDC50F3151C82D2F9008518EC /* RegiftOSX.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC50F2D31C82B858008518EC /* RegiftOSX.framework */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXContainerItemProxy section */\n\t\t0E0C3BCD1A4E9A7D00325FF0 /* PBXContainerItemProxy */ = {\n\t\t\tisa = PBXContainerItemProxy;\n\t\t\tcontainerPortal = 0E0C3BB71A4E9A7D00325FF0 /* Project object */;\n\t\t\tproxyType = 1;\n\t\t\tremoteGlobalIDString = 0E0C3BBF1A4E9A7D00325FF0;\n\t\t\tremoteInfo = Regift;\n\t\t};\n\t\tDC50F3091C82C85B008518EC /* PBXContainerItemProxy */ = {\n\t\t\tisa = PBXContainerItemProxy;\n\t\t\tcontainerPortal = 0E0C3BB71A4E9A7D00325FF0 /* Project object */;\n\t\t\tproxyType = 1;\n\t\t\tremoteGlobalIDString = DC50F2D21C82B858008518EC;\n\t\t\tremoteInfo = RegiftOSX;\n\t\t};\n/* End PBXContainerItemProxy section */\n\n/* Begin PBXFileReference section */\n\t\t0E0C3BC01A4E9A7D00325FF0 /* Regift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Regift.framework; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t0E0C3BC41A4E9A7D00325FF0 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = \"<group>\"; };\n\t\t0E0C3BC51A4E9A7D00325FF0 /* Regift.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Regift.h; sourceTree = \"<group>\"; };\n\t\t0E0C3BCB1A4E9A7D00325FF0 /* RegiftTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RegiftTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t0E0C3BD11A4E9A7D00325FF0 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = \"<group>\"; };\n\t\t0E0C3BD21A4E9A7D00325FF0 /* RegiftTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RegiftTests.swift; sourceTree = \"<group>\"; };\n\t\t0E0C3BDC1A4E9A9000325FF0 /* Regift.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Regift.swift; sourceTree = \"<group>\"; };\n\t\t0E0C3BDE1A4E9C1900325FF0 /* ImageIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ImageIO.framework; path = System/Library/Frameworks/ImageIO.framework; sourceTree = SDKROOT; };\n\t\t0E0C3BE01A4E9E6400325FF0 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };\n\t\t0E0C3BE21A4EA2A400325FF0 /* AssetsLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AssetsLibrary.framework; path = System/Library/Frameworks/AssetsLibrary.framework; sourceTree = SDKROOT; };\n\t\t0E0C3BE41A4EA2F100325FF0 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };\n\t\t0EB2CE4F1B807C2600854BDD /* regift-test-file.mov */ = {isa = PBXFileReference; lastKnownFileType = video.quicktime; path = \"regift-test-file.mov\"; sourceTree = \"<group>\"; };\n\t\tAE9B5BA71D8FC0E500F22881 /* AVAssetImageGeneratorTimePoints.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AVAssetImageGeneratorTimePoints.swift; sourceTree = \"<group>\"; };\n\t\tDC50F2D31C82B858008518EC /* RegiftOSX.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RegiftOSX.framework; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\tDC50F2D51C82B858008518EC /* RegiftOSX.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RegiftOSX.h; sourceTree = \"<group>\"; };\n\t\tDC50F2D71C82B858008518EC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = \"<group>\"; };\n\t\tDC50F3031C82C85B008518EC /* RegiftOSXTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RegiftOSXTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\tDC50F3071C82C85B008518EC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = \"<group>\"; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\t0E0C3BBC1A4E9A7D00325FF0 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t0E0C3BE51A4EA2F100325FF0 /* AVFoundation.framework in Frameworks */,\n\t\t\t\t0E0C3BE11A4E9E6400325FF0 /* MobileCoreServices.framework in Frameworks */,\n\t\t\t\t0E0C3BDF1A4E9C1900325FF0 /* ImageIO.framework in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t0E0C3BC81A4E9A7D00325FF0 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t0E0C3BCC1A4E9A7D00325FF0 /* Regift.framework in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\tDC50F2CF1C82B858008518EC /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\tDC50F2DD1C82B8FD008518EC /* ImageIO.framework in Frameworks */,\n\t\t\t\tDC50F2DC1C82B8FD008518EC /* AVFoundation.framework in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\tDC50F3001C82C85B008518EC /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\tDC50F3151C82D2F9008518EC /* RegiftOSX.framework in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXFrameworksBuildPhase section */\n\n/* Begin PBXGroup section */\n\t\t0E0C3BB61A4E9A7D00325FF0 = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0E0C3BC21A4E9A7D00325FF0 /* Regift */,\n\t\t\t\t0E0C3BCF1A4E9A7D00325FF0 /* RegiftTests */,\n\t\t\t\tDC50F2D41C82B858008518EC /* RegiftOSX */,\n\t\t\t\tDC50F3041C82C85B008518EC /* RegiftOSXTests */,\n\t\t\t\t0E0C3BC11A4E9A7D00325FF0 /* Products */,\n\t\t\t\tDC50F2DB1C82B8B0008518EC /* frameworks */,\n\t\t\t);\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0E0C3BC11A4E9A7D00325FF0 /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0E0C3BC01A4E9A7D00325FF0 /* Regift.framework */,\n\t\t\t\t0E0C3BCB1A4E9A7D00325FF0 /* RegiftTests.xctest */,\n\t\t\t\tDC50F2D31C82B858008518EC /* RegiftOSX.framework */,\n\t\t\t\tDC50F3031C82C85B008518EC /* RegiftOSXTests.xctest */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0E0C3BC21A4E9A7D00325FF0 /* Regift */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0E0C3BC51A4E9A7D00325FF0 /* Regift.h */,\n\t\t\t\t0E0C3BDC1A4E9A9000325FF0 /* Regift.swift */,\n\t\t\t\tAE9B5BA71D8FC0E500F22881 /* AVAssetImageGeneratorTimePoints.swift */,\n\t\t\t\t0E0C3BC31A4E9A7D00325FF0 /* Supporting Files */,\n\t\t\t);\n\t\t\tpath = Regift;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0E0C3BC31A4E9A7D00325FF0 /* Supporting Files */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0E0C3BC41A4E9A7D00325FF0 /* Info.plist */,\n\t\t\t);\n\t\t\tname = \"Supporting Files\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0E0C3BCF1A4E9A7D00325FF0 /* RegiftTests */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0E0C3BD21A4E9A7D00325FF0 /* RegiftTests.swift */,\n\t\t\t\t0E0C3BD01A4E9A7D00325FF0 /* Supporting Files */,\n\t\t\t);\n\t\t\tpath = RegiftTests;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0E0C3BD01A4E9A7D00325FF0 /* Supporting Files */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0EB2CE4F1B807C2600854BDD /* regift-test-file.mov */,\n\t\t\t\t0E0C3BD11A4E9A7D00325FF0 /* Info.plist */,\n\t\t\t);\n\t\t\tname = \"Supporting Files\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tDC50F2D41C82B858008518EC /* RegiftOSX */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tDC50F2D51C82B858008518EC /* RegiftOSX.h */,\n\t\t\t\tDC50F2D71C82B858008518EC /* Info.plist */,\n\t\t\t);\n\t\t\tpath = RegiftOSX;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tDC50F2DB1C82B8B0008518EC /* frameworks */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0E0C3BE41A4EA2F100325FF0 /* AVFoundation.framework */,\n\t\t\t\t0E0C3BE21A4EA2A400325FF0 /* AssetsLibrary.framework */,\n\t\t\t\t0E0C3BE01A4E9E6400325FF0 /* MobileCoreServices.framework */,\n\t\t\t\t0E0C3BDE1A4E9C1900325FF0 /* ImageIO.framework */,\n\t\t\t);\n\t\t\tname = frameworks;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tDC50F3041C82C85B008518EC /* RegiftOSXTests */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tDC50F3071C82C85B008518EC /* Info.plist */,\n\t\t\t);\n\t\t\tpath = RegiftOSXTests;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXHeadersBuildPhase section */\n\t\t0E0C3BBD1A4E9A7D00325FF0 /* Headers */ = {\n\t\t\tisa = PBXHeadersBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t0E0C3BC61A4E9A7D00325FF0 /* Regift.h in Headers */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\tDC50F2D01C82B858008518EC /* Headers */ = {\n\t\t\tisa = PBXHeadersBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\tDC50F2D61C82B858008518EC /* RegiftOSX.h in Headers */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXHeadersBuildPhase section */\n\n/* Begin PBXNativeTarget section */\n\t\t0E0C3BBF1A4E9A7D00325FF0 /* Regift */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 0E0C3BD61A4E9A7D00325FF0 /* Build configuration list for PBXNativeTarget \"Regift\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t0E0C3BBB1A4E9A7D00325FF0 /* Sources */,\n\t\t\t\t0E0C3BBC1A4E9A7D00325FF0 /* Frameworks */,\n\t\t\t\t0E0C3BBD1A4E9A7D00325FF0 /* Headers */,\n\t\t\t\t0E0C3BBE1A4E9A7D00325FF0 /* Resources */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = Regift;\n\t\t\tproductName = Regift;\n\t\t\tproductReference = 0E0C3BC01A4E9A7D00325FF0 /* Regift.framework */;\n\t\t\tproductType = \"com.apple.product-type.framework\";\n\t\t};\n\t\t0E0C3BCA1A4E9A7D00325FF0 /* RegiftTests */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 0E0C3BD91A4E9A7D00325FF0 /* Build configuration list for PBXNativeTarget \"RegiftTests\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t0E0C3BC71A4E9A7D00325FF0 /* Sources */,\n\t\t\t\t0E0C3BC81A4E9A7D00325FF0 /* Frameworks */,\n\t\t\t\t0E0C3BC91A4E9A7D00325FF0 /* Resources */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t\t0E0C3BCE1A4E9A7D00325FF0 /* PBXTargetDependency */,\n\t\t\t);\n\t\t\tname = RegiftTests;\n\t\t\tproductName = RegiftTests;\n\t\t\tproductReference = 0E0C3BCB1A4E9A7D00325FF0 /* RegiftTests.xctest */;\n\t\t\tproductType = \"com.apple.product-type.bundle.unit-test\";\n\t\t};\n\t\tDC50F2D21C82B858008518EC /* RegiftOSX */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = DC50F2D81C82B858008518EC /* Build configuration list for PBXNativeTarget \"RegiftOSX\" */;\n\t\t\tbuildPhases = (\n\t\t\t\tDC50F2CE1C82B858008518EC /* Sources */,\n\t\t\t\tDC50F2CF1C82B858008518EC /* Frameworks */,\n\t\t\t\tDC50F2D01C82B858008518EC /* Headers */,\n\t\t\t\tDC50F2D11C82B858008518EC /* Resources */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = RegiftOSX;\n\t\t\tproductName = RegiftOSX;\n\t\t\tproductReference = DC50F2D31C82B858008518EC /* RegiftOSX.framework */;\n\t\t\tproductType = \"com.apple.product-type.framework\";\n\t\t};\n\t\tDC50F3021C82C85B008518EC /* RegiftOSXTests */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = DC50F30D1C82C85B008518EC /* Build configuration list for PBXNativeTarget \"RegiftOSXTests\" */;\n\t\t\tbuildPhases = (\n\t\t\t\tDC50F2FF1C82C85B008518EC /* Sources */,\n\t\t\t\tDC50F3001C82C85B008518EC /* Frameworks */,\n\t\t\t\tDC50F3011C82C85B008518EC /* Resources */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t\tDC50F30A1C82C85B008518EC /* PBXTargetDependency */,\n\t\t\t);\n\t\t\tname = RegiftOSXTests;\n\t\t\tproductName = RegiftOSXTests;\n\t\t\tproductReference = DC50F3031C82C85B008518EC /* RegiftOSXTests.xctest */;\n\t\t\tproductType = \"com.apple.product-type.bundle.unit-test\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\t0E0C3BB71A4E9A7D00325FF0 /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tattributes = {\n\t\t\t\tLastSwiftUpdateCheck = 0720;\n\t\t\t\tLastUpgradeCheck = 0900;\n\t\t\t\tORGANIZATIONNAME = \"Matthew Palmer\";\n\t\t\t\tTargetAttributes = {\n\t\t\t\t\t0E0C3BBF1A4E9A7D00325FF0 = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 6.1.1;\n\t\t\t\t\t\tLastSwiftMigration = 0800;\n\t\t\t\t\t};\n\t\t\t\t\t0E0C3BCA1A4E9A7D00325FF0 = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 6.1.1;\n\t\t\t\t\t\tLastSwiftMigration = 0800;\n\t\t\t\t\t};\n\t\t\t\t\tDC50F2D21C82B858008518EC = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 7.2.1;\n\t\t\t\t\t\tLastSwiftMigration = 0800;\n\t\t\t\t\t};\n\t\t\t\t\tDC50F3021C82C85B008518EC = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 7.2.1;\n\t\t\t\t\t\tLastSwiftMigration = 0800;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tbuildConfigurationList = 0E0C3BBA1A4E9A7D00325FF0 /* Build configuration list for PBXProject \"Regift\" */;\n\t\t\tcompatibilityVersion = \"Xcode 3.2\";\n\t\t\tdevelopmentRegion = en;\n\t\t\thasScannedForEncodings = 0;\n\t\t\tknownRegions = (\n\t\t\t\ten,\n\t\t\t\tBase,\n\t\t\t);\n\t\t\tmainGroup = 0E0C3BB61A4E9A7D00325FF0;\n\t\t\tproductRefGroup = 0E0C3BC11A4E9A7D00325FF0 /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\t0E0C3BBF1A4E9A7D00325FF0 /* Regift */,\n\t\t\t\tDC50F2D21C82B858008518EC /* RegiftOSX */,\n\t\t\t\t0E0C3BCA1A4E9A7D00325FF0 /* RegiftTests */,\n\t\t\t\tDC50F3021C82C85B008518EC /* RegiftOSXTests */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\t0E0C3BBE1A4E9A7D00325FF0 /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t0E0C3BC91A4E9A7D00325FF0 /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t0EB2CE501B807C2600854BDD /* regift-test-file.mov in Resources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\tDC50F2D11C82B858008518EC /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\tDC50F3011C82C85B008518EC /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\tDC50F3141C82D2CC008518EC /* regift-test-file.mov in Resources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXResourcesBuildPhase section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\t0E0C3BBB1A4E9A7D00325FF0 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t0E0C3BDD1A4E9A9000325FF0 /* Regift.swift in Sources */,\n\t\t\t\tAE9B5BA81D8FC0E500F22881 /* AVAssetImageGeneratorTimePoints.swift in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t0E0C3BC71A4E9A7D00325FF0 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t0E0C3BD31A4E9A7D00325FF0 /* RegiftTests.swift in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\tDC50F2CE1C82B858008518EC /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\tDC50F3111C82CB3B008518EC /* Regift.swift in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\tDC50F2FF1C82C85B008518EC /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\tDC50F30E1C82C863008518EC /* RegiftTests.swift in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin PBXTargetDependency section */\n\t\t0E0C3BCE1A4E9A7D00325FF0 /* PBXTargetDependency */ = {\n\t\t\tisa = PBXTargetDependency;\n\t\t\ttarget = 0E0C3BBF1A4E9A7D00325FF0 /* Regift */;\n\t\t\ttargetProxy = 0E0C3BCD1A4E9A7D00325FF0 /* PBXContainerItemProxy */;\n\t\t};\n\t\tDC50F30A1C82C85B008518EC /* PBXTargetDependency */ = {\n\t\t\tisa = PBXTargetDependency;\n\t\t\ttarget = DC50F2D21C82B858008518EC /* RegiftOSX */;\n\t\t\ttargetProxy = DC50F3091C82C85B008518EC /* PBXContainerItemProxy */;\n\t\t};\n/* End PBXTargetDependency section */\n\n/* Begin XCBuildConfiguration section */\n\t\t0E0C3BD41A4E9A7D00325FF0 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++0x\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tCURRENT_PROJECT_VERSION = 1;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_TESTABILITY = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu99;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\t\"DEBUG=1\",\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tGCC_SYMBOLS_PRIVATE_EXTERN = NO;\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 11.1;\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.12;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = YES;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-Onone\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t\tVERSIONING_SYSTEM = \"apple-generic\";\n\t\t\t\tVERSION_INFO_PREFIX = \"\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t0E0C3BD51A4E9A7D00325FF0 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++0x\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\n\t\t\t\tCOPY_PHASE_STRIP = YES;\n\t\t\t\tCURRENT_PROJECT_VERSION = 1;\n\t\t\t\tENABLE_NS_ASSERTIONS = NO;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu99;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 11.1;\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.12;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = NO;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-Owholemodule\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t\tVALIDATE_PRODUCT = YES;\n\t\t\t\tVERSIONING_SYSTEM = \"apple-generic\";\n\t\t\t\tVERSION_INFO_PREFIX = \"\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t0E0C3BD71A4E9A7D00325FF0 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"\";\n\t\t\t\tDEFINES_MODULE = YES;\n\t\t\t\tDYLIB_COMPATIBILITY_VERSION = 1;\n\t\t\t\tDYLIB_CURRENT_VERSION = 1;\n\t\t\t\tDYLIB_INSTALL_NAME_BASE = \"@rpath\";\n\t\t\t\tINFOPLIST_FILE = Regift/Info.plist;\n\t\t\t\tINSTALL_PATH = \"$(LOCAL_LIBRARY_DIR)/Frameworks\";\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/Frameworks @loader_path/Frameworks\";\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = \"net.matthewpalmer.$(PRODUCT_NAME:rfc1034identifier)\";\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSKIP_INSTALL = YES;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-Onone\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t0E0C3BD81A4E9A7D00325FF0 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"\";\n\t\t\t\tDEFINES_MODULE = YES;\n\t\t\t\tDYLIB_COMPATIBILITY_VERSION = 1;\n\t\t\t\tDYLIB_CURRENT_VERSION = 1;\n\t\t\t\tDYLIB_INSTALL_NAME_BASE = \"@rpath\";\n\t\t\t\tINFOPLIST_FILE = Regift/Info.plist;\n\t\t\t\tINSTALL_PATH = \"$(LOCAL_LIBRARY_DIR)/Frameworks\";\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/Frameworks @loader_path/Frameworks\";\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = \"net.matthewpalmer.$(PRODUCT_NAME:rfc1034identifier)\";\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSKIP_INSTALL = YES;\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t0E0C3BDA1A4E9A7D00325FF0 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tFRAMEWORK_SEARCH_PATHS = \"$(inherited)\";\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\t\"DEBUG=1\",\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tINFOPLIST_FILE = RegiftTests/Info.plist;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/Frameworks @loader_path/Frameworks\";\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = \"net.matthewpalmer.$(PRODUCT_NAME:rfc1034identifier)\";\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t0E0C3BDB1A4E9A7D00325FF0 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tFRAMEWORK_SEARCH_PATHS = \"$(inherited)\";\n\t\t\t\tINFOPLIST_FILE = RegiftTests/Info.plist;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/Frameworks @loader_path/Frameworks\";\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = \"net.matthewpalmer.$(PRODUCT_NAME:rfc1034identifier)\";\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\tDC50F2D91C82B858008518EC /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tCODE_SIGN_IDENTITY = \"\";\n\t\t\t\tCOMBINE_HIDPI_IMAGES = YES;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = dwarf;\n\t\t\t\tDEFINES_MODULE = YES;\n\t\t\t\tDYLIB_COMPATIBILITY_VERSION = 1;\n\t\t\t\tDYLIB_CURRENT_VERSION = 1;\n\t\t\t\tDYLIB_INSTALL_NAME_BASE = \"@rpath\";\n\t\t\t\tENABLE_TESTABILITY = YES;\n\t\t\t\tFRAMEWORK_VERSION = A;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tINFOPLIST_FILE = RegiftOSX/Info.plist;\n\t\t\t\tINSTALL_PATH = \"$(LOCAL_LIBRARY_DIR)/Frameworks\";\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/../Frameworks @loader_path/Frameworks\";\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.10;\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = net.matthewpalmer.Regift;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSDKROOT = macosx;\n\t\t\t\tSKIP_INSTALL = YES;\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\tDC50F2DA1C82B858008518EC /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tCODE_SIGN_IDENTITY = \"\";\n\t\t\t\tCOMBINE_HIDPI_IMAGES = YES;\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\n\t\t\t\tDEFINES_MODULE = YES;\n\t\t\t\tDYLIB_COMPATIBILITY_VERSION = 1;\n\t\t\t\tDYLIB_CURRENT_VERSION = 1;\n\t\t\t\tDYLIB_INSTALL_NAME_BASE = \"@rpath\";\n\t\t\t\tFRAMEWORK_VERSION = A;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tINFOPLIST_FILE = RegiftOSX/Info.plist;\n\t\t\t\tINSTALL_PATH = \"$(LOCAL_LIBRARY_DIR)/Frameworks\";\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/../Frameworks @loader_path/Frameworks\";\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.10;\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = net.matthewpalmer.Regift;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSDKROOT = macosx;\n\t\t\t\tSKIP_INSTALL = YES;\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\tDC50F30B1C82C85B008518EC /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tCODE_SIGN_IDENTITY = \"-\";\n\t\t\t\tCOMBINE_HIDPI_IMAGES = YES;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = dwarf;\n\t\t\t\tENABLE_TESTABILITY = YES;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tINFOPLIST_FILE = RegiftOSXTests/Info.plist;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks\";\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.11;\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = net.matthewpalmer.RegiftOSXTests;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSDKROOT = macosx;\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\tDC50F30C1C82C85B008518EC /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tCODE_SIGN_IDENTITY = \"-\";\n\t\t\t\tCOMBINE_HIDPI_IMAGES = YES;\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tINFOPLIST_FILE = RegiftOSXTests/Info.plist;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks\";\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.11;\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = net.matthewpalmer.RegiftOSXTests;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSDKROOT = macosx;\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\t0E0C3BBA1A4E9A7D00325FF0 /* Build configuration list for PBXProject \"Regift\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t0E0C3BD41A4E9A7D00325FF0 /* Debug */,\n\t\t\t\t0E0C3BD51A4E9A7D00325FF0 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t0E0C3BD61A4E9A7D00325FF0 /* Build configuration list for PBXNativeTarget \"Regift\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t0E0C3BD71A4E9A7D00325FF0 /* Debug */,\n\t\t\t\t0E0C3BD81A4E9A7D00325FF0 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t0E0C3BD91A4E9A7D00325FF0 /* Build configuration list for PBXNativeTarget \"RegiftTests\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t0E0C3BDA1A4E9A7D00325FF0 /* Debug */,\n\t\t\t\t0E0C3BDB1A4E9A7D00325FF0 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\tDC50F2D81C82B858008518EC /* Build configuration list for PBXNativeTarget \"RegiftOSX\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\tDC50F2D91C82B858008518EC /* Debug */,\n\t\t\t\tDC50F2DA1C82B858008518EC /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\tDC50F30D1C82C85B008518EC /* Build configuration list for PBXNativeTarget \"RegiftOSXTests\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\tDC50F30B1C82C85B008518EC /* Debug */,\n\t\t\t\tDC50F30C1C82C85B008518EC /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n/* End XCConfigurationList section */\n\t};\n\trootObject = 0E0C3BB71A4E9A7D00325FF0 /* Project object */;\n}\n"
  },
  {
    "path": "Regift.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"self:Regift.xcodeproj\">\n   </FileRef>\n</Workspace>\n"
  },
  {
    "path": "Regift.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>IDEDidComputeMac32BitWarning</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "Regift.xcodeproj/xcshareddata/xcschemes/Regift.xcscheme",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Scheme\n   LastUpgradeVersion = \"0900\"\n   version = \"1.3\">\n   <BuildAction\n      parallelizeBuildables = \"YES\"\n      buildImplicitDependencies = \"YES\">\n      <BuildActionEntries>\n         <BuildActionEntry\n            buildForTesting = \"YES\"\n            buildForRunning = \"YES\"\n            buildForProfiling = \"YES\"\n            buildForArchiving = \"YES\"\n            buildForAnalyzing = \"YES\">\n            <BuildableReference\n               BuildableIdentifier = \"primary\"\n               BlueprintIdentifier = \"0E0C3BBF1A4E9A7D00325FF0\"\n               BuildableName = \"Regift.framework\"\n               BlueprintName = \"Regift\"\n               ReferencedContainer = \"container:Regift.xcodeproj\">\n            </BuildableReference>\n         </BuildActionEntry>\n      </BuildActionEntries>\n   </BuildAction>\n   <TestAction\n      buildConfiguration = \"Debug\"\n      selectedDebuggerIdentifier = \"Xcode.DebuggerFoundation.Debugger.LLDB\"\n      selectedLauncherIdentifier = \"Xcode.DebuggerFoundation.Launcher.LLDB\"\n      language = \"\"\n      shouldUseLaunchSchemeArgsEnv = \"YES\">\n      <Testables>\n         <TestableReference\n            skipped = \"NO\">\n            <BuildableReference\n               BuildableIdentifier = \"primary\"\n               BlueprintIdentifier = \"0E0C3BCA1A4E9A7D00325FF0\"\n               BuildableName = \"RegiftTests.xctest\"\n               BlueprintName = \"RegiftTests\"\n               ReferencedContainer = \"container:Regift.xcodeproj\">\n            </BuildableReference>\n         </TestableReference>\n      </Testables>\n      <MacroExpansion>\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"0E0C3BBF1A4E9A7D00325FF0\"\n            BuildableName = \"Regift.framework\"\n            BlueprintName = \"Regift\"\n            ReferencedContainer = \"container:Regift.xcodeproj\">\n         </BuildableReference>\n      </MacroExpansion>\n      <AdditionalOptions>\n      </AdditionalOptions>\n   </TestAction>\n   <LaunchAction\n      buildConfiguration = \"Debug\"\n      selectedDebuggerIdentifier = \"Xcode.DebuggerFoundation.Debugger.LLDB\"\n      selectedLauncherIdentifier = \"Xcode.DebuggerFoundation.Launcher.LLDB\"\n      language = \"\"\n      launchStyle = \"0\"\n      useCustomWorkingDirectory = \"NO\"\n      ignoresPersistentStateOnLaunch = \"NO\"\n      debugDocumentVersioning = \"YES\"\n      debugServiceExtension = \"internal\"\n      allowLocationSimulation = \"YES\">\n      <MacroExpansion>\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"0E0C3BBF1A4E9A7D00325FF0\"\n            BuildableName = \"Regift.framework\"\n            BlueprintName = \"Regift\"\n            ReferencedContainer = \"container:Regift.xcodeproj\">\n         </BuildableReference>\n      </MacroExpansion>\n      <AdditionalOptions>\n      </AdditionalOptions>\n   </LaunchAction>\n   <ProfileAction\n      buildConfiguration = \"Release\"\n      shouldUseLaunchSchemeArgsEnv = \"YES\"\n      savedToolIdentifier = \"\"\n      useCustomWorkingDirectory = \"NO\"\n      debugDocumentVersioning = \"YES\">\n      <MacroExpansion>\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"0E0C3BBF1A4E9A7D00325FF0\"\n            BuildableName = \"Regift.framework\"\n            BlueprintName = \"Regift\"\n            ReferencedContainer = \"container:Regift.xcodeproj\">\n         </BuildableReference>\n      </MacroExpansion>\n   </ProfileAction>\n   <AnalyzeAction\n      buildConfiguration = \"Debug\">\n   </AnalyzeAction>\n   <ArchiveAction\n      buildConfiguration = \"Release\"\n      revealArchiveInOrganizer = \"YES\">\n   </ArchiveAction>\n</Scheme>\n"
  },
  {
    "path": "Regift.xcodeproj/xcshareddata/xcschemes/RegiftOSX.xcscheme",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Scheme\n   LastUpgradeVersion = \"0900\"\n   version = \"1.3\">\n   <BuildAction\n      parallelizeBuildables = \"YES\"\n      buildImplicitDependencies = \"YES\">\n      <BuildActionEntries>\n         <BuildActionEntry\n            buildForTesting = \"YES\"\n            buildForRunning = \"YES\"\n            buildForProfiling = \"YES\"\n            buildForArchiving = \"YES\"\n            buildForAnalyzing = \"YES\">\n            <BuildableReference\n               BuildableIdentifier = \"primary\"\n               BlueprintIdentifier = \"DC50F2D21C82B858008518EC\"\n               BuildableName = \"RegiftOSX.framework\"\n               BlueprintName = \"RegiftOSX\"\n               ReferencedContainer = \"container:Regift.xcodeproj\">\n            </BuildableReference>\n         </BuildActionEntry>\n      </BuildActionEntries>\n   </BuildAction>\n   <TestAction\n      buildConfiguration = \"Debug\"\n      selectedDebuggerIdentifier = \"Xcode.DebuggerFoundation.Debugger.LLDB\"\n      selectedLauncherIdentifier = \"Xcode.DebuggerFoundation.Launcher.LLDB\"\n      language = \"\"\n      shouldUseLaunchSchemeArgsEnv = \"YES\">\n      <Testables>\n         <TestableReference\n            skipped = \"NO\">\n            <BuildableReference\n               BuildableIdentifier = \"primary\"\n               BlueprintIdentifier = \"DC50F3021C82C85B008518EC\"\n               BuildableName = \"RegiftOSXTests.xctest\"\n               BlueprintName = \"RegiftOSXTests\"\n               ReferencedContainer = \"container:Regift.xcodeproj\">\n            </BuildableReference>\n         </TestableReference>\n      </Testables>\n      <MacroExpansion>\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"DC50F2D21C82B858008518EC\"\n            BuildableName = \"RegiftOSX.framework\"\n            BlueprintName = \"RegiftOSX\"\n            ReferencedContainer = \"container:Regift.xcodeproj\">\n         </BuildableReference>\n      </MacroExpansion>\n      <AdditionalOptions>\n      </AdditionalOptions>\n   </TestAction>\n   <LaunchAction\n      buildConfiguration = \"Debug\"\n      selectedDebuggerIdentifier = \"Xcode.DebuggerFoundation.Debugger.LLDB\"\n      selectedLauncherIdentifier = \"Xcode.DebuggerFoundation.Launcher.LLDB\"\n      language = \"\"\n      launchStyle = \"0\"\n      useCustomWorkingDirectory = \"NO\"\n      ignoresPersistentStateOnLaunch = \"NO\"\n      debugDocumentVersioning = \"YES\"\n      debugServiceExtension = \"internal\"\n      allowLocationSimulation = \"YES\">\n      <MacroExpansion>\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"DC50F2D21C82B858008518EC\"\n            BuildableName = \"RegiftOSX.framework\"\n            BlueprintName = \"RegiftOSX\"\n            ReferencedContainer = \"container:Regift.xcodeproj\">\n         </BuildableReference>\n      </MacroExpansion>\n      <AdditionalOptions>\n      </AdditionalOptions>\n   </LaunchAction>\n   <ProfileAction\n      buildConfiguration = \"Release\"\n      shouldUseLaunchSchemeArgsEnv = \"YES\"\n      savedToolIdentifier = \"\"\n      useCustomWorkingDirectory = \"NO\"\n      debugDocumentVersioning = \"YES\">\n      <MacroExpansion>\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"DC50F2D21C82B858008518EC\"\n            BuildableName = \"RegiftOSX.framework\"\n            BlueprintName = \"RegiftOSX\"\n            ReferencedContainer = \"container:Regift.xcodeproj\">\n         </BuildableReference>\n      </MacroExpansion>\n   </ProfileAction>\n   <AnalyzeAction\n      buildConfiguration = \"Debug\">\n   </AnalyzeAction>\n   <ArchiveAction\n      buildConfiguration = \"Release\"\n      revealArchiveInOrganizer = \"YES\">\n   </ArchiveAction>\n</Scheme>\n"
  },
  {
    "path": "RegiftOSX/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>en</string>\n\t<key>CFBundleExecutable</key>\n\t<string>$(EXECUTABLE_NAME)</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>$(PRODUCT_NAME)</string>\n\t<key>CFBundlePackageType</key>\n\t<string>FMWK</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.0</string>\n\t<key>CFBundleSignature</key>\n\t<string>????</string>\n\t<key>CFBundleVersion</key>\n\t<string>$(CURRENT_PROJECT_VERSION)</string>\n\t<key>NSHumanReadableCopyright</key>\n\t<string>Copyright © 2016 Matthew Palmer. All rights reserved.</string>\n\t<key>NSPrincipalClass</key>\n\t<string></string>\n</dict>\n</plist>\n"
  },
  {
    "path": "RegiftOSX/RegiftOSX.h",
    "content": "//\n//  RegiftOSX.h\n//  RegiftOSX\n//\n//  Created by nakajijapan on 2016/02/28.\n//  Copyright © 2016 Matthew Palmer. All rights reserved.\n//\n\n#import <Cocoa/Cocoa.h>\n\n//! Project version number for RegiftOSX.\nFOUNDATION_EXPORT double RegiftOSXVersionNumber;\n\n//! Project version string for RegiftOSX.\nFOUNDATION_EXPORT const unsigned char RegiftOSXVersionString[];\n\n// In this header, you should import all the public headers of your framework using statements like #import <RegiftOSX/PublicHeader.h>\n\n\n"
  },
  {
    "path": "RegiftOSXTests/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>en</string>\n\t<key>CFBundleExecutable</key>\n\t<string>$(EXECUTABLE_NAME)</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>$(PRODUCT_NAME)</string>\n\t<key>CFBundlePackageType</key>\n\t<string>BNDL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.0</string>\n\t<key>CFBundleSignature</key>\n\t<string>????</string>\n\t<key>CFBundleVersion</key>\n\t<string>1</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "RegiftTests/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>en</string>\n\t<key>CFBundleExecutable</key>\n\t<string>$(EXECUTABLE_NAME)</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>$(PRODUCT_NAME)</string>\n\t<key>CFBundlePackageType</key>\n\t<string>BNDL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.0</string>\n\t<key>CFBundleSignature</key>\n\t<string>????</string>\n\t<key>CFBundleVersion</key>\n\t<string>1</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "RegiftTests/RegiftTests.swift",
    "content": "//\n//  RegiftTests.swift\n//  RegiftTests\n//\n//  Created by Matthew Palmer on 27/12/2014.\n//  Copyright (c) 2014 Matthew Palmer. All rights reserved.\n//\n\n#if os(iOS)\n    import UIKit\n    import Regift\n#elseif os(OSX)\n    import AppKit\n    import RegiftOSX\n#endif\nimport XCTest\n\nimport ImageIO\n\nclass RegiftTests: XCTestCase {\n    var URL: Foundation.URL!\n    \n    override func setUp() {\n        super.setUp()\n        // Put setup code here. This method is called before the invocation of each test method in the class.\n        let testBundle = Bundle(for: type(of: self))\n        URL = testBundle.url(forResource: \"regift-test-file\", withExtension: \"mov\")\n        XCTAssertNotNil(URL)\n    }\n    \n    override func tearDown() {\n        // Put teardown code here. This method is called after the invocation of each test method in the class.\n        super.tearDown()\n    }\n    \n    func testGIFIsCreated() {\n        \n        let regift = Regift(sourceFileURL: URL, frameCount: 16, delayTime: 0.2)\n        let result = regift.createGif()\n        XCTAssertNotNil(result, \"The GIF URL should not be nil\")\n        XCTAssertTrue(FileManager.default.fileExists(atPath: result!.path))\n        \n        let source = CGImageSourceCreateWithURL(result! as CFURL, nil)\n        let count = CGImageSourceGetCount(source!)\n        let type = CGImageSourceGetType(source!)\n        let properties = CGImageSourceCopyProperties(source!, nil)! as NSDictionary\n        let fileProperties = properties.object(forKey: kCGImagePropertyGIFDictionary as String) as! NSDictionary\n        let loopCount = fileProperties.value(forKey: kCGImagePropertyGIFLoopCount as String) as! Int\n        \n        XCTAssertEqual(count, 16)\n        XCTAssertEqual(type! as NSString, \"com.compuserve.gif\")\n        XCTAssertEqual(loopCount, 0)\n        \n        (0..<count).forEach { (index) -> () in\n            let frameProperties = CGImageSourceCopyPropertiesAtIndex(source!, index, nil)! as NSDictionary\n            let gifFrameProperties = frameProperties.object(forKey: kCGImagePropertyGIFDictionary as String)\n            print(gifFrameProperties ?? \"\")\n            let delayTime = ((gifFrameProperties as! NSDictionary)[kCGImagePropertyGIFDelayTime as String] as! NSNumber).floatValue\n            XCTAssertEqual(delayTime, 0.2)\n        }\n    }\n    \n    func testGIFIsSaved() {\n        let savedURL = Foundation.URL(fileURLWithPath: (NSTemporaryDirectory() as NSString).appendingPathComponent(\"test.gif\"))\n        let regift = Regift(sourceFileURL: URL, destinationFileURL: savedURL, frameCount: 16, delayTime: 0.2, progress: { (progress) in\n            print(progress)\n        })\n        let result = regift.createGif()\n        XCTAssertNotNil(result, \"The GIF URL should not be nil\")\n        \n        XCTAssertTrue(savedURL.absoluteString == result?.absoluteString)\n        XCTAssertTrue(FileManager.default.fileExists(atPath: result!.path))\n        \n    }\n    \n    func testTrimmedGIFIsSaved() {\n        \n        let savedURL = Foundation.URL(fileURLWithPath: (NSTemporaryDirectory() as NSString).appendingPathComponent(\"test_trim.gif\"))\n        let regift = Regift(sourceFileURL: URL, destinationFileURL: savedURL, startTime: 1, duration: 2, frameRate: 15)\n        let result = regift.createGif()\n        XCTAssertNotNil(result, \"The GIF URL should not be nil\")\n        \n        XCTAssertTrue(savedURL.absoluteString == result?.absoluteString)\n        XCTAssertTrue(FileManager.default.fileExists(atPath: result!.path))\n        \n    }\n    \n    func testGIFIsNotCreated() {\n        let regift = Regift(sourceFileURL: Foundation.URL(fileURLWithPath: \"\"), frameCount: 10, delayTime: 0.5)\n        let result = regift.createGif()\n        XCTAssertNil(result)\n    }\n}\n"
  }
]