├── .gitignore ├── .travis.yml ├── Example ├── Configuration.swift ├── Images │ ├── ic_av_timer.png │ ├── ic_av_timer_2x.png │ ├── ic_av_timer_3x.png │ ├── ic_content_cut.png │ ├── ic_content_cut_2x.png │ ├── ic_content_cut_3x.png │ ├── ic_fiber_manual_record.png │ ├── ic_fiber_manual_record_2x.png │ ├── ic_fiber_manual_record_3x.png │ ├── ic_mic.png │ ├── ic_mic_2x.png │ ├── ic_mic_3x.png │ ├── ic_mic_off.png │ ├── ic_mic_off_2x.png │ ├── ic_mic_off_3x.png │ ├── ic_pause.png │ ├── ic_pause_2x.png │ ├── ic_pause_3x.png │ ├── ic_play_arrow.png │ ├── ic_play_arrow_2x.png │ ├── ic_play_arrow_3x.png │ ├── ic_stop.png │ ├── ic_stop_2x.png │ ├── ic_stop_3x.png │ ├── ic_undo.png │ ├── ic_undo_2x.png │ ├── ic_undo_3x.png │ ├── milkyway.png │ ├── scissor.png │ ├── scissor@2x.png │ └── scissor@3x.png ├── Number+String.swift ├── Podfile ├── Podfile.lock ├── Pods │ ├── FBSnapshotTestCase │ │ ├── FBSnapshotTestCase │ │ │ ├── Categories │ │ │ │ ├── UIApplication+StrictKeyWindow.h │ │ │ │ ├── UIApplication+StrictKeyWindow.m │ │ │ │ ├── UIImage+Compare.h │ │ │ │ ├── UIImage+Compare.m │ │ │ │ ├── UIImage+Diff.h │ │ │ │ ├── UIImage+Diff.m │ │ │ │ ├── UIImage+Snapshot.h │ │ │ │ └── UIImage+Snapshot.m │ │ │ ├── FBSnapshotTestCase.h │ │ │ ├── FBSnapshotTestCase.m │ │ │ ├── FBSnapshotTestCasePlatform.h │ │ │ ├── FBSnapshotTestCasePlatform.m │ │ │ ├── FBSnapshotTestController.h │ │ │ ├── FBSnapshotTestController.m │ │ │ └── SwiftSupport.swift │ │ ├── LICENSE │ │ └── README.md │ ├── FDWaveformViewForked │ │ ├── LICENSE │ │ ├── Pod │ │ │ └── Classes │ │ │ │ ├── FDWaveformView.h │ │ │ │ └── FDWaveformView.m │ │ └── README.md │ ├── Local Podspecs │ │ └── SwiftySoundRecorder.podspec.json │ ├── Manifest.lock │ ├── Nimble-Snapshots │ │ ├── HaveValidSnapshot.swift │ │ ├── LICENSE │ │ ├── NimbleSnapshotsConfiguration.swift │ │ ├── PrettySyntax.swift │ │ └── README.md │ ├── Nimble │ │ ├── LICENSE.md │ │ ├── README.md │ │ └── Sources │ │ │ └── Nimble │ │ │ ├── Adapters │ │ │ ├── AdapterProtocols.swift │ │ │ ├── AssertionDispatcher.swift │ │ │ ├── AssertionRecorder.swift │ │ │ ├── NimbleEnvironment.swift │ │ │ └── NimbleXCTestHandler.swift │ │ │ ├── DSL+Wait.swift │ │ │ ├── DSL.swift │ │ │ ├── Expectation.swift │ │ │ ├── Expression.swift │ │ │ ├── FailureMessage.swift │ │ │ ├── Matchers │ │ │ ├── AllPass.swift │ │ │ ├── BeAKindOf.swift │ │ │ ├── BeAnInstanceOf.swift │ │ │ ├── BeCloseTo.swift │ │ │ ├── BeEmpty.swift │ │ │ ├── BeGreaterThan.swift │ │ │ ├── BeGreaterThanOrEqualTo.swift │ │ │ ├── BeIdenticalTo.swift │ │ │ ├── BeLessThan.swift │ │ │ ├── BeLessThanOrEqual.swift │ │ │ ├── BeLogical.swift │ │ │ ├── BeNil.swift │ │ │ ├── BeVoid.swift │ │ │ ├── BeginWith.swift │ │ │ ├── Contain.swift │ │ │ ├── EndWith.swift │ │ │ ├── Equal.swift │ │ │ ├── HaveCount.swift │ │ │ ├── Match.swift │ │ │ ├── MatcherProtocols.swift │ │ │ ├── PostNotification.swift │ │ │ ├── RaisesException.swift │ │ │ ├── SatisfyAnyOf.swift │ │ │ └── ThrowError.swift │ │ │ ├── Nimble.h │ │ │ ├── ObjCExpectation.swift │ │ │ ├── Utils │ │ │ ├── Async.swift │ │ │ ├── ExceptionCapture.swift │ │ │ ├── Functional.swift │ │ │ ├── SourceLocation.swift │ │ │ └── Stringers.swift │ │ │ ├── Wrappers │ │ │ ├── AsyncMatcherWrapper.swift │ │ │ ├── MatcherFunc.swift │ │ │ └── ObjCMatcher.swift │ │ │ └── objc │ │ │ ├── CurrentTestCaseTracker.m │ │ │ ├── DSL.h │ │ │ ├── DSL.m │ │ │ ├── NMBExceptionCapture.h │ │ │ └── NMBExceptionCapture.m │ ├── Pods.xcodeproj │ │ └── project.pbxproj │ ├── Quick │ │ ├── LICENSE │ │ ├── README.md │ │ └── Sources │ │ │ └── Quick │ │ │ ├── Callsite.swift │ │ │ ├── Configuration │ │ │ ├── Configuration.swift │ │ │ ├── QuickConfiguration.h │ │ │ └── QuickConfiguration.m │ │ │ ├── DSL │ │ │ ├── DSL.swift │ │ │ ├── QCKDSL.h │ │ │ ├── QCKDSL.m │ │ │ ├── World+DSL.h │ │ │ └── World+DSL.swift │ │ │ ├── ErrorUtility.swift │ │ │ ├── Example.swift │ │ │ ├── ExampleGroup.swift │ │ │ ├── ExampleMetadata.swift │ │ │ ├── Filter.swift │ │ │ ├── Hooks │ │ │ ├── Closures.swift │ │ │ ├── ExampleHooks.swift │ │ │ ├── HooksPhase.swift │ │ │ └── SuiteHooks.swift │ │ │ ├── NSBundle+CurrentTestBundle.swift │ │ │ ├── NSString+QCKSelectorName.h │ │ │ ├── NSString+QCKSelectorName.m │ │ │ ├── Quick.h │ │ │ ├── QuickSelectedTestSuiteBuilder.swift │ │ │ ├── QuickSpec.h │ │ │ ├── QuickSpec.m │ │ │ ├── QuickTestSuite.swift │ │ │ ├── String+FileName.swift │ │ │ ├── World.h │ │ │ ├── World.swift │ │ │ └── XCTestSuite+QuickTestSuiteBuilder.m │ ├── SCSiriWaveformView │ │ ├── LICENSE │ │ ├── README.md │ │ └── SCSiriWaveformView │ │ │ ├── SCSiriWaveformView.h │ │ │ └── SCSiriWaveformView.m │ └── Target Support Files │ │ ├── FBSnapshotTestCase │ │ ├── FBSnapshotTestCase-dummy.m │ │ ├── FBSnapshotTestCase-prefix.pch │ │ ├── FBSnapshotTestCase-umbrella.h │ │ ├── FBSnapshotTestCase.modulemap │ │ ├── FBSnapshotTestCase.xcconfig │ │ └── Info.plist │ │ ├── FDWaveformViewForked │ │ ├── FDWaveformViewForked-dummy.m │ │ ├── FDWaveformViewForked-prefix.pch │ │ ├── FDWaveformViewForked-umbrella.h │ │ ├── FDWaveformViewForked.modulemap │ │ ├── FDWaveformViewForked.xcconfig │ │ └── Info.plist │ │ ├── Nimble-Snapshots │ │ ├── Info.plist │ │ ├── Nimble-Snapshots-dummy.m │ │ ├── Nimble-Snapshots-prefix.pch │ │ ├── Nimble-Snapshots-umbrella.h │ │ ├── Nimble-Snapshots.modulemap │ │ └── Nimble-Snapshots.xcconfig │ │ ├── Nimble │ │ ├── Info.plist │ │ ├── Nimble-dummy.m │ │ ├── Nimble-prefix.pch │ │ ├── Nimble-umbrella.h │ │ ├── Nimble.modulemap │ │ └── Nimble.xcconfig │ │ ├── Pods-SwiftySoundRecorder_Example │ │ ├── Info.plist │ │ ├── Pods-SwiftySoundRecorder_Example-acknowledgements.markdown │ │ ├── Pods-SwiftySoundRecorder_Example-acknowledgements.plist │ │ ├── Pods-SwiftySoundRecorder_Example-dummy.m │ │ ├── Pods-SwiftySoundRecorder_Example-frameworks.sh │ │ ├── Pods-SwiftySoundRecorder_Example-resources.sh │ │ ├── Pods-SwiftySoundRecorder_Example-umbrella.h │ │ ├── Pods-SwiftySoundRecorder_Example.debug.xcconfig │ │ ├── Pods-SwiftySoundRecorder_Example.modulemap │ │ └── Pods-SwiftySoundRecorder_Example.release.xcconfig │ │ ├── Pods-SwiftySoundRecorder_Tests │ │ ├── Info.plist │ │ ├── Pods-SwiftySoundRecorder_Tests-acknowledgements.markdown │ │ ├── Pods-SwiftySoundRecorder_Tests-acknowledgements.plist │ │ ├── Pods-SwiftySoundRecorder_Tests-dummy.m │ │ ├── Pods-SwiftySoundRecorder_Tests-frameworks.sh │ │ ├── Pods-SwiftySoundRecorder_Tests-resources.sh │ │ ├── Pods-SwiftySoundRecorder_Tests-umbrella.h │ │ ├── Pods-SwiftySoundRecorder_Tests.debug.xcconfig │ │ ├── Pods-SwiftySoundRecorder_Tests.modulemap │ │ └── Pods-SwiftySoundRecorder_Tests.release.xcconfig │ │ ├── Quick │ │ ├── Info.plist │ │ ├── Quick-dummy.m │ │ ├── Quick-prefix.pch │ │ ├── Quick-umbrella.h │ │ ├── Quick.modulemap │ │ └── Quick.xcconfig │ │ ├── SCSiriWaveformView │ │ ├── Info.plist │ │ ├── SCSiriWaveformView-dummy.m │ │ ├── SCSiriWaveformView-prefix.pch │ │ ├── SCSiriWaveformView-umbrella.h │ │ ├── SCSiriWaveformView.modulemap │ │ └── SCSiriWaveformView.xcconfig │ │ └── SwiftySoundRecorder │ │ ├── Info.plist │ │ ├── ResourceBundle-SwiftySoundRecorder-Info.plist │ │ ├── SwiftySoundRecorder-dummy.m │ │ ├── SwiftySoundRecorder-prefix.pch │ │ ├── SwiftySoundRecorder-umbrella.h │ │ ├── SwiftySoundRecorder.modulemap │ │ └── SwiftySoundRecorder.xcconfig ├── Source │ ├── AssetManager.swift │ ├── Controller │ │ └── SwiftySoundRecorder.swift │ ├── Themes.swift │ └── View │ │ └── Cropper.swift ├── SwiftySoundRecorder-Bridging-Header.h ├── SwiftySoundRecorder.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── SwiftySoundRecorder-Example.xcscheme ├── SwiftySoundRecorder.xcworkspace │ └── contents.xcworkspacedata ├── SwiftySoundRecorder │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── LaunchScreen.xib │ │ └── Main.storyboard │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Info.plist │ └── ViewController.swift └── Tests │ ├── Info.plist │ └── Tests.swift ├── Images ├── ic_av_timer.png ├── ic_av_timer_2x.png ├── ic_av_timer_3x.png ├── ic_content_cut.png ├── ic_content_cut_2x.png ├── ic_content_cut_3x.png ├── ic_fiber_manual_record.png ├── ic_fiber_manual_record_2x.png ├── ic_fiber_manual_record_3x.png ├── ic_mic.png ├── ic_mic_2x.png ├── ic_mic_3x.png ├── ic_mic_off.png ├── ic_mic_off_2x.png ├── ic_mic_off_3x.png ├── ic_pause.png ├── ic_pause_2x.png ├── ic_pause_3x.png ├── ic_play_arrow.png ├── ic_play_arrow_2x.png ├── ic_play_arrow_3x.png ├── ic_stop.png ├── ic_stop_2x.png ├── ic_stop_3x.png ├── ic_undo.png ├── ic_undo_2x.png ├── ic_undo_3x.png ├── milkyway.png ├── scissor.png ├── scissor@2x.png └── scissor@3x.png ├── LICENSE ├── README.md ├── Source ├── AssetManager.swift ├── Configuration.swift ├── Number+String.swift ├── SwiftySoundRecorder.swift ├── Themes.swift └── View │ └── Cropper.swift ├── SwiftySoundRecorder.podspec ├── SwiftySoundRecorder.podspec.bak ├── SwiftySoundRecorder ├── Assets │ └── .gitkeep └── Classes │ └── .gitkeep └── _Pods.xcodeproj /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X 2 | .DS_Store 3 | 4 | # Xcode 5 | build/ 6 | *.pbxuser 7 | !default.pbxuser 8 | *.mode1v3 9 | !default.mode1v3 10 | *.mode2v3 11 | !default.mode2v3 12 | *.perspectivev3 13 | !default.perspectivev3 14 | xcuserdata/ 15 | *.xccheckout 16 | profile 17 | *.moved-aside 18 | DerivedData 19 | *.hmap 20 | *.ipa 21 | 22 | # Bundler 23 | .bundle 24 | 25 | Carthage 26 | # We recommend against adding the Pods directory to your .gitignore. However 27 | # you should judge for yourself, the pros and cons are mentioned at: 28 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 29 | # 30 | # Note: if you ignore the Pods directory, make sure to uncomment 31 | # `pod install` in .travis.yml 32 | # 33 | # Pods/ 34 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # references: 2 | # * http://www.objc.io/issue-6/travis-ci.html 3 | # * https://github.com/supermarin/xcpretty#usage 4 | 5 | osx_image: xcode7.3 6 | language: objective-c 7 | sudo: required 8 | 9 | branches: 10 | only: 11 | - master 12 | # cache: cocoapods 13 | # podfile: Example/Podfile 14 | before_install: 15 | - brew update 16 | - if brew outdated | grep -qx xctool; then brew upgrade xctool; fi 17 | - export LANG=en_US.UTF-8 18 | - gem install xcpretty --no-ri --no-rdoc 19 | # - gem install cocoapods # Since Travis is not always on latest version 20 | # - pod install --project-directory=Example 21 | script: 22 | - xcodebuild -workspace Example/SwiftySoundRecorder.xcworkspace -scheme SwiftySoundRecorder-Example -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 6,OS=9.3' clean build test | xcpretty --test --color 23 | 24 | - pod lib lint --quick 25 | -------------------------------------------------------------------------------- /Example/Configuration.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Configuration.swift 3 | // SwiftySoundRecorder 4 | // 5 | // Created by Guoliang Wang on 8/13/16. 6 | // Copyright © 2016 CocoaPods. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | /* 13 | typealias ThemeColors = (text: UIColor, background: UIColor, siriWaveView: [UIColor], flowWaveView: [UIColor]) 14 | 15 | internal enum Theme: ThemeColors { 16 | case Dark = (text: UIColor(white: 1, alpha: 0.9), background: UIColor.clear, siriWaveView: [UIColor.clearColor(), Configuration.defaultBlueTintColor], flowWaveView: [UIColor.redColor(), UIColor.blueColor()]) 17 | case Default = (text: UIColor(white: 1, alpha: 0.9), background: UIColor.clear, siriWaveView: [UIColor.clearColor(), Configuration.defaultBlueTintColor], flowWaveView: [UIColor.redColor(), UIColor.blueColor()]) // light color 18 | } 19 | */ 20 | 21 | public struct Configuration { 22 | // MARK Colors 23 | public static var defaultBlueTintColor = UIColor(red: 14.0/255, green: 122.0/255, blue: 254.0/255, alpha: 1.0) 24 | public static var recorderWaveNormalTintColor = defaultBlueTintColor 25 | public static var darkOrangeColor = UIColor(red: 255, green: 140, blue: 0, alpha: 1) 26 | public static var recorderWaveHighlightedTintColor = darkOrangeColor 27 | public static var cropperLineColor = UIColor.redColor() 28 | 29 | public static var darkThemeTextAndGraphicColor = UIColor(white: 1, alpha: 0.9) 30 | // MARK Fonts 31 | 32 | 33 | // MARK Titles 34 | public static var navBarButtonLabelsDict: [String : String ] = ["Cancel": "Cancel", "Done": "Done"] 35 | 36 | public static var originalRecordingFileName: String = "recording." // to be appended by file type 37 | public static var trimmedRecordingFileName: String = "recording_trimmed." 38 | 39 | // MARK Dimensions 40 | public static var cropperLineThickness: CGFloat = 2 41 | public static var navBarHeight: CGFloat = 45 42 | 43 | 44 | // MARK images 45 | public static var milkyWayImage: UIImage = AssetManager.getImage("milkyway") // UIImage(named: "milkyway.jpg") 46 | } 47 | -------------------------------------------------------------------------------- /Example/Images/ic_av_timer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Example/Images/ic_av_timer.png -------------------------------------------------------------------------------- /Example/Images/ic_av_timer_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Example/Images/ic_av_timer_2x.png -------------------------------------------------------------------------------- /Example/Images/ic_av_timer_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Example/Images/ic_av_timer_3x.png -------------------------------------------------------------------------------- /Example/Images/ic_content_cut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Example/Images/ic_content_cut.png -------------------------------------------------------------------------------- /Example/Images/ic_content_cut_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Example/Images/ic_content_cut_2x.png -------------------------------------------------------------------------------- /Example/Images/ic_content_cut_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Example/Images/ic_content_cut_3x.png -------------------------------------------------------------------------------- /Example/Images/ic_fiber_manual_record.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Example/Images/ic_fiber_manual_record.png -------------------------------------------------------------------------------- /Example/Images/ic_fiber_manual_record_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Example/Images/ic_fiber_manual_record_2x.png -------------------------------------------------------------------------------- /Example/Images/ic_fiber_manual_record_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Example/Images/ic_fiber_manual_record_3x.png -------------------------------------------------------------------------------- /Example/Images/ic_mic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Example/Images/ic_mic.png -------------------------------------------------------------------------------- /Example/Images/ic_mic_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Example/Images/ic_mic_2x.png -------------------------------------------------------------------------------- /Example/Images/ic_mic_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Example/Images/ic_mic_3x.png -------------------------------------------------------------------------------- /Example/Images/ic_mic_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Example/Images/ic_mic_off.png -------------------------------------------------------------------------------- /Example/Images/ic_mic_off_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Example/Images/ic_mic_off_2x.png -------------------------------------------------------------------------------- /Example/Images/ic_mic_off_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Example/Images/ic_mic_off_3x.png -------------------------------------------------------------------------------- /Example/Images/ic_pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Example/Images/ic_pause.png -------------------------------------------------------------------------------- /Example/Images/ic_pause_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Example/Images/ic_pause_2x.png -------------------------------------------------------------------------------- /Example/Images/ic_pause_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Example/Images/ic_pause_3x.png -------------------------------------------------------------------------------- /Example/Images/ic_play_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Example/Images/ic_play_arrow.png -------------------------------------------------------------------------------- /Example/Images/ic_play_arrow_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Example/Images/ic_play_arrow_2x.png -------------------------------------------------------------------------------- /Example/Images/ic_play_arrow_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Example/Images/ic_play_arrow_3x.png -------------------------------------------------------------------------------- /Example/Images/ic_stop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Example/Images/ic_stop.png -------------------------------------------------------------------------------- /Example/Images/ic_stop_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Example/Images/ic_stop_2x.png -------------------------------------------------------------------------------- /Example/Images/ic_stop_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Example/Images/ic_stop_3x.png -------------------------------------------------------------------------------- /Example/Images/ic_undo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Example/Images/ic_undo.png -------------------------------------------------------------------------------- /Example/Images/ic_undo_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Example/Images/ic_undo_2x.png -------------------------------------------------------------------------------- /Example/Images/ic_undo_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Example/Images/ic_undo_3x.png -------------------------------------------------------------------------------- /Example/Images/milkyway.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Example/Images/milkyway.png -------------------------------------------------------------------------------- /Example/Images/scissor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Example/Images/scissor.png -------------------------------------------------------------------------------- /Example/Images/scissor@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Example/Images/scissor@2x.png -------------------------------------------------------------------------------- /Example/Images/scissor@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Example/Images/scissor@3x.png -------------------------------------------------------------------------------- /Example/Number+String.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Number+String.swift 3 | // SwiftySoundRecorder 4 | // 5 | // Created by Guoliang Wang on 8/13/16. 6 | // Copyright © 2016 CocoaPods. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | extension Int { 12 | func addLeadingZeroAsString() -> String { 13 | return String(format: "%02d", self) // add leading zero to single digit 14 | } 15 | } 16 | 17 | extension Double { 18 | 19 | func stripDecimalZeroAsString() -> String? { 20 | if self >= 1 || self == 0 { 21 | return nil 22 | } 23 | let formatter = NSNumberFormatter() 24 | formatter.positiveFormat = ".###" // decimal without decimal 0 25 | 26 | return formatter.stringFromNumber(self) // 0.333454 becomes ".333" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | use_frameworks! 2 | 3 | target 'SwiftySoundRecorder_Example' do 4 | pod 'SwiftySoundRecorder', :path => '../' 5 | pod 'SCSiriWaveformView' 6 | pod 'FDWaveformViewForked' 7 | #pod 'FDWaveformView'#, :git => 'https://github.com/hackiftekhar/FDWaveformView.git', :commit => '65369f6729bec964db984b7f7439a915342237de' 8 | 9 | 10 | target 'SwiftySoundRecorder_Tests' do 11 | inherit! :search_paths 12 | 13 | pod 'Quick', '~> 0.8' 14 | pod 'Nimble', '~> 3.0' 15 | pod 'FBSnapshotTestCase' 16 | pod 'Nimble-Snapshots' 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - FBSnapshotTestCase (2.1.2): 3 | - FBSnapshotTestCase/SwiftSupport (= 2.1.2) 4 | - FBSnapshotTestCase/Core (2.1.2) 5 | - FBSnapshotTestCase/SwiftSupport (2.1.2): 6 | - FBSnapshotTestCase/Core 7 | - FDWaveformViewForked (0.5.0) 8 | - Nimble (3.2.0) 9 | - Nimble-Snapshots (4.1.0): 10 | - FBSnapshotTestCase (~> 2.0) 11 | - Nimble 12 | - Quick 13 | - Quick (0.9.3) 14 | - SCSiriWaveformView (1.0.3) 15 | - SwiftySoundRecorder (0.0.1): 16 | - FDWaveformViewForked (~> 0.5.0) 17 | - SCSiriWaveformView 18 | 19 | DEPENDENCIES: 20 | - FBSnapshotTestCase 21 | - FDWaveformViewForked 22 | - Nimble (~> 3.0) 23 | - Nimble-Snapshots 24 | - Quick (~> 0.8) 25 | - SCSiriWaveformView 26 | - SwiftySoundRecorder (from `../`) 27 | 28 | EXTERNAL SOURCES: 29 | SwiftySoundRecorder: 30 | :path: "../" 31 | 32 | SPEC CHECKSUMS: 33 | FBSnapshotTestCase: 918c55861356ee83aee7843d759f55a18ff6982b 34 | FDWaveformViewForked: eaf260646d5e2ac3c3d3b8e44730fe47590d8755 35 | Nimble: 703854335d181df169bbca9c97117b5cf8c47c1d 36 | Nimble-Snapshots: 2da4d2ec829b458d6886c06812c52493fce284c9 37 | Quick: 13a2a2b19a5d8e3ed4fd0c36ee46597fd77ebf71 38 | SCSiriWaveformView: b8b2756af42addcd31900c3945f24edafefb5395 39 | SwiftySoundRecorder: 528d34e9643d184e3bc2fa78a283adaea31fbe07 40 | 41 | PODFILE CHECKSUM: fb658aa28f8ff10aad0fb7e0e76213b0b0c4de87 42 | 43 | COCOAPODS: 1.1.0.beta.1 44 | -------------------------------------------------------------------------------- /Example/Pods/FBSnapshotTestCase/FBSnapshotTestCase/Categories/UIApplication+StrictKeyWindow.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #import 12 | 13 | @interface UIApplication (StrictKeyWindow) 14 | 15 | /** 16 | @return The receiver's @c keyWindow. Raises an assertion if @c nil. 17 | */ 18 | - (UIWindow *)fb_strictKeyWindow; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Example/Pods/FBSnapshotTestCase/FBSnapshotTestCase/Categories/UIApplication+StrictKeyWindow.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #import 12 | 13 | @implementation UIApplication (StrictKeyWindow) 14 | 15 | - (UIWindow *)fb_strictKeyWindow 16 | { 17 | UIWindow *keyWindow = [UIApplication sharedApplication].keyWindow; 18 | if (!keyWindow) { 19 | [NSException raise:@"FBSnapshotTestCaseNilKeyWindowException" 20 | format:@"Snapshot tests must be hosted by an application with a key window. Please ensure your test" 21 | " host sets up a key window at launch (either via storyboards or programmatically) and doesn't" 22 | " do anything to remove it while snapshot tests are running."]; 23 | } 24 | return keyWindow; 25 | } 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Example/Pods/FBSnapshotTestCase/FBSnapshotTestCase/Categories/UIImage+Compare.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Gabriel Handford on 3/1/09. 3 | // Copyright 2009-2013. All rights reserved. 4 | // Created by John Boiles on 10/20/11. 5 | // Copyright (c) 2011. All rights reserved 6 | // Modified by Felix Schulze on 2/11/13. 7 | // Copyright 2013. All rights reserved. 8 | // 9 | // Permission is hereby granted, free of charge, to any person 10 | // obtaining a copy of this software and associated documentation 11 | // files (the "Software"), to deal in the Software without 12 | // restriction, including without limitation the rights to use, 13 | // copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | // copies of the Software, and to permit persons to whom the 15 | // Software is furnished to do so, subject to the following 16 | // conditions: 17 | // 18 | // The above copyright notice and this permission notice shall be 19 | // included in all copies or substantial portions of the Software. 20 | // 21 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | // OTHER DEALINGS IN THE SOFTWARE. 29 | // 30 | 31 | #import 32 | 33 | @interface UIImage (Compare) 34 | 35 | - (BOOL)fb_compareWithImage:(UIImage *)image tolerance:(CGFloat)tolerance; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /Example/Pods/FBSnapshotTestCase/FBSnapshotTestCase/Categories/UIImage+Diff.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Gabriel Handford on 3/1/09. 3 | // Copyright 2009-2013. All rights reserved. 4 | // Created by John Boiles on 10/20/11. 5 | // Copyright (c) 2011. All rights reserved 6 | // Modified by Felix Schulze on 2/11/13. 7 | // Copyright 2013. All rights reserved. 8 | // 9 | // Permission is hereby granted, free of charge, to any person 10 | // obtaining a copy of this software and associated documentation 11 | // files (the "Software"), to deal in the Software without 12 | // restriction, including without limitation the rights to use, 13 | // copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | // copies of the Software, and to permit persons to whom the 15 | // Software is furnished to do so, subject to the following 16 | // conditions: 17 | // 18 | // The above copyright notice and this permission notice shall be 19 | // included in all copies or substantial portions of the Software. 20 | // 21 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | // OTHER DEALINGS IN THE SOFTWARE. 29 | // 30 | 31 | #import 32 | 33 | @interface UIImage (Diff) 34 | 35 | - (UIImage *)fb_diffWithImage:(UIImage *)image; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /Example/Pods/FBSnapshotTestCase/FBSnapshotTestCase/Categories/UIImage+Diff.m: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Gabriel Handford on 3/1/09. 3 | // Copyright 2009-2013. All rights reserved. 4 | // Created by John Boiles on 10/20/11. 5 | // Copyright (c) 2011. All rights reserved 6 | // Modified by Felix Schulze on 2/11/13. 7 | // Copyright 2013. All rights reserved. 8 | // 9 | // Permission is hereby granted, free of charge, to any person 10 | // obtaining a copy of this software and associated documentation 11 | // files (the "Software"), to deal in the Software without 12 | // restriction, including without limitation the rights to use, 13 | // copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | // copies of the Software, and to permit persons to whom the 15 | // Software is furnished to do so, subject to the following 16 | // conditions: 17 | // 18 | // The above copyright notice and this permission notice shall be 19 | // included in all copies or substantial portions of the Software. 20 | // 21 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | // OTHER DEALINGS IN THE SOFTWARE. 29 | // 30 | 31 | #import 32 | 33 | @implementation UIImage (Diff) 34 | 35 | - (UIImage *)fb_diffWithImage:(UIImage *)image 36 | { 37 | if (!image) { 38 | return nil; 39 | } 40 | CGSize imageSize = CGSizeMake(MAX(self.size.width, image.size.width), MAX(self.size.height, image.size.height)); 41 | UIGraphicsBeginImageContextWithOptions(imageSize, YES, 0); 42 | CGContextRef context = UIGraphicsGetCurrentContext(); 43 | [self drawInRect:CGRectMake(0, 0, self.size.width, self.size.height)]; 44 | CGContextSetAlpha(context, 0.5); 45 | CGContextBeginTransparencyLayer(context, NULL); 46 | [image drawInRect:CGRectMake(0, 0, image.size.width, image.size.height)]; 47 | CGContextSetBlendMode(context, kCGBlendModeDifference); 48 | CGContextSetFillColorWithColor(context,[UIColor whiteColor].CGColor); 49 | CGContextFillRect(context, CGRectMake(0, 0, self.size.width, self.size.height)); 50 | CGContextEndTransparencyLayer(context); 51 | UIImage *returnImage = UIGraphicsGetImageFromCurrentImageContext(); 52 | UIGraphicsEndImageContext(); 53 | return returnImage; 54 | } 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /Example/Pods/FBSnapshotTestCase/FBSnapshotTestCase/Categories/UIImage+Snapshot.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #import 12 | 13 | @interface UIImage (Snapshot) 14 | 15 | /// Uses renderInContext: to get a snapshot of the layer. 16 | + (UIImage *)fb_imageForLayer:(CALayer *)layer; 17 | 18 | /// Uses renderInContext: to get a snapshot of the view layer. 19 | + (UIImage *)fb_imageForViewLayer:(UIView *)view; 20 | 21 | /// Uses drawViewHierarchyInRect: to get a snapshot of the view and adds the view into a window if needed. 22 | + (UIImage *)fb_imageForView:(UIView *)view; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /Example/Pods/FBSnapshotTestCase/FBSnapshotTestCase/Categories/UIImage+Snapshot.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #import 12 | #import 13 | 14 | @implementation UIImage (Snapshot) 15 | 16 | + (UIImage *)fb_imageForLayer:(CALayer *)layer 17 | { 18 | CGRect bounds = layer.bounds; 19 | NSAssert1(CGRectGetWidth(bounds), @"Zero width for layer %@", layer); 20 | NSAssert1(CGRectGetHeight(bounds), @"Zero height for layer %@", layer); 21 | 22 | UIGraphicsBeginImageContextWithOptions(bounds.size, NO, 0); 23 | CGContextRef context = UIGraphicsGetCurrentContext(); 24 | NSAssert1(context, @"Could not generate context for layer %@", layer); 25 | CGContextSaveGState(context); 26 | [layer layoutIfNeeded]; 27 | [layer renderInContext:context]; 28 | CGContextRestoreGState(context); 29 | 30 | UIImage *snapshot = UIGraphicsGetImageFromCurrentImageContext(); 31 | UIGraphicsEndImageContext(); 32 | return snapshot; 33 | } 34 | 35 | + (UIImage *)fb_imageForViewLayer:(UIView *)view 36 | { 37 | [view layoutIfNeeded]; 38 | return [self fb_imageForLayer:view.layer]; 39 | } 40 | 41 | + (UIImage *)fb_imageForView:(UIView *)view 42 | { 43 | CGRect bounds = view.bounds; 44 | NSAssert1(CGRectGetWidth(bounds), @"Zero width for view %@", view); 45 | NSAssert1(CGRectGetHeight(bounds), @"Zero height for view %@", view); 46 | 47 | // If the input view is already a UIWindow, then just use that. Otherwise wrap in a window. 48 | UIWindow *window = [view isKindOfClass:[UIWindow class]] ? (UIWindow *)view : view.window; 49 | BOOL removeFromSuperview = NO; 50 | if (!window) { 51 | window = [[UIApplication sharedApplication] fb_strictKeyWindow]; 52 | } 53 | 54 | if (!view.window && view != window) { 55 | [window addSubview:view]; 56 | removeFromSuperview = YES; 57 | } 58 | 59 | UIGraphicsBeginImageContextWithOptions(bounds.size, NO, 0); 60 | [view layoutIfNeeded]; 61 | [view drawViewHierarchyInRect:view.bounds afterScreenUpdates:YES]; 62 | 63 | UIImage *snapshot = UIGraphicsGetImageFromCurrentImageContext(); 64 | UIGraphicsEndImageContext(); 65 | 66 | if (removeFromSuperview) { 67 | [view removeFromSuperview]; 68 | } 69 | 70 | return snapshot; 71 | } 72 | 73 | @end 74 | -------------------------------------------------------------------------------- /Example/Pods/FBSnapshotTestCase/FBSnapshotTestCase/FBSnapshotTestCasePlatform.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #import 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | /** 18 | Returns a Boolean value that indicates whether the snapshot test is running in 64Bit. 19 | This method is a convenience for creating the suffixes set based on the architecture 20 | that the test is running. 21 | 22 | @returns @c YES if the test is running in 64bit, otherwise @c NO. 23 | */ 24 | BOOL FBSnapshotTestCaseIs64Bit(void); 25 | 26 | /** 27 | Returns a default set of strings that is used to append a suffix based on the architectures. 28 | @warning Do not modify this function, you can create your own and use it with @c FBSnapshotVerifyViewWithOptions() 29 | 30 | @returns An @c NSOrderedSet object containing strings that are appended to the reference images directory. 31 | */ 32 | NSOrderedSet *FBSnapshotTestCaseDefaultSuffixes(void); 33 | 34 | /** 35 | Returns a fully «normalized» file name. 36 | Strips punctuation and spaces and replaces them with @c _. Also appends the device model, running OS and screen size to the file name. 37 | 38 | @returns An @c NSString object containing the passed @c fileName with the device model, OS and screen size appended at the end. 39 | */ 40 | NSString *FBDeviceAgnosticNormalizedFileName(NSString *fileName); 41 | 42 | #ifdef __cplusplus 43 | } 44 | #endif 45 | -------------------------------------------------------------------------------- /Example/Pods/FBSnapshotTestCase/FBSnapshotTestCase/FBSnapshotTestCasePlatform.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #import 12 | #import 13 | #import 14 | 15 | BOOL FBSnapshotTestCaseIs64Bit(void) 16 | { 17 | #if __LP64__ 18 | return YES; 19 | #else 20 | return NO; 21 | #endif 22 | } 23 | 24 | NSOrderedSet *FBSnapshotTestCaseDefaultSuffixes(void) 25 | { 26 | NSMutableOrderedSet *suffixesSet = [[NSMutableOrderedSet alloc] init]; 27 | [suffixesSet addObject:@"_32"]; 28 | [suffixesSet addObject:@"_64"]; 29 | if (FBSnapshotTestCaseIs64Bit()) { 30 | return [suffixesSet reversedOrderedSet]; 31 | } 32 | return [suffixesSet copy]; 33 | } 34 | 35 | NSString *FBDeviceAgnosticNormalizedFileName(NSString *fileName) 36 | { 37 | UIDevice *device = [UIDevice currentDevice]; 38 | UIWindow *keyWindow = [[UIApplication sharedApplication] fb_strictKeyWindow]; 39 | CGSize screenSize = keyWindow.bounds.size; 40 | NSString *os = device.systemVersion; 41 | 42 | fileName = [NSString stringWithFormat:@"%@_%@%@_%.0fx%.0f", fileName, device.model, os, screenSize.width, screenSize.height]; 43 | 44 | NSMutableCharacterSet *invalidCharacters = [NSMutableCharacterSet new]; 45 | [invalidCharacters formUnionWithCharacterSet:[NSCharacterSet whitespaceCharacterSet]]; 46 | [invalidCharacters formUnionWithCharacterSet:[NSCharacterSet punctuationCharacterSet]]; 47 | NSArray *validComponents = [fileName componentsSeparatedByCharactersInSet:invalidCharacters]; 48 | fileName = [validComponents componentsJoinedByString:@"_"]; 49 | 50 | return fileName; 51 | } -------------------------------------------------------------------------------- /Example/Pods/FBSnapshotTestCase/FBSnapshotTestCase/SwiftSupport.swift: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | public extension FBSnapshotTestCase { 12 | public func FBSnapshotVerifyView(view: UIView, identifier: String = "", suffixes: NSOrderedSet = FBSnapshotTestCaseDefaultSuffixes(), tolerance: CGFloat = 0, file: StaticString = #file, line: UInt = #line) { 13 | FBSnapshotVerifyViewOrLayer(view, identifier: identifier, suffixes: suffixes, tolerance: tolerance, file: file, line: line) 14 | } 15 | 16 | public func FBSnapshotVerifyLayer(layer: CALayer, identifier: String = "", suffixes: NSOrderedSet = FBSnapshotTestCaseDefaultSuffixes(), tolerance: CGFloat = 0, file: StaticString = #file, line: UInt = #line) { 17 | FBSnapshotVerifyViewOrLayer(layer, identifier: identifier, suffixes: suffixes, tolerance: tolerance, file: file, line: line) 18 | } 19 | 20 | private func FBSnapshotVerifyViewOrLayer(viewOrLayer: AnyObject, identifier: String = "", suffixes: NSOrderedSet = FBSnapshotTestCaseDefaultSuffixes(), tolerance: CGFloat = 0, file: StaticString = #file, line: UInt = #line) { 21 | let envReferenceImageDirectory = self.getReferenceImageDirectoryWithDefault(FB_REFERENCE_IMAGE_DIR) 22 | var error: NSError? 23 | var comparisonSuccess = false 24 | 25 | if let envReferenceImageDirectory = envReferenceImageDirectory { 26 | for suffix in suffixes { 27 | let referenceImagesDirectory = "\(envReferenceImageDirectory)\(suffix)" 28 | if viewOrLayer.isKindOfClass(UIView) { 29 | do { 30 | try compareSnapshotOfView(viewOrLayer as! UIView, referenceImagesDirectory: referenceImagesDirectory, identifier: identifier, tolerance: tolerance) 31 | comparisonSuccess = true 32 | } catch let error1 as NSError { 33 | error = error1 34 | comparisonSuccess = false 35 | } 36 | } else if viewOrLayer.isKindOfClass(CALayer) { 37 | do { 38 | try compareSnapshotOfLayer(viewOrLayer as! CALayer, referenceImagesDirectory: referenceImagesDirectory, identifier: identifier, tolerance: tolerance) 39 | comparisonSuccess = true 40 | } catch let error1 as NSError { 41 | error = error1 42 | comparisonSuccess = false 43 | } 44 | } else { 45 | assertionFailure("Only UIView and CALayer classes can be snapshotted") 46 | } 47 | 48 | assert(recordMode == false, message: "Test ran in record mode. Reference image is now saved. Disable record mode to perform an actual snapshot comparison!", file: file, line: line) 49 | 50 | if comparisonSuccess || recordMode { 51 | break 52 | } 53 | 54 | assert(comparisonSuccess, message: "Snapshot comparison failed: \(error)", file: file, line: line) 55 | } 56 | } else { 57 | XCTFail("Missing value for referenceImagesDirectory - Set FB_REFERENCE_IMAGE_DIR as Environment variable in your scheme.") 58 | } 59 | } 60 | 61 | func assert(assertion: Bool, message: String, file: StaticString, line: UInt) { 62 | if !assertion { 63 | XCTFail(message, file: file, line: line) 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /Example/Pods/FBSnapshotTestCase/LICENSE: -------------------------------------------------------------------------------- 1 | BSD License 2 | 3 | For the FBSnapshotTestCase software 4 | 5 | Copyright (c) 2013, Facebook, Inc. 6 | All rights reserved. 7 | 8 | Redistribution and use in source and binary forms, with or without 9 | modification, are permitted provided that the following conditions are met: 10 | 11 | * Redistributions of source code must retain the above copyright notice, 12 | this list of conditions and the following disclaimer. 13 | * Redistributions in binary form must reproduce the above copyright notice, 14 | this list of conditions and the following disclaimer in the documentation 15 | and/or other materials provided with the distribution. 16 | * Neither the name Facebook nor the names of its contributors may be used to 17 | endorse or promote products derived from this software without specific 18 | prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /Example/Pods/FDWaveformViewForked/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015 William Entriken 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Example/Pods/FDWaveformViewForked/Pod/Classes/FDWaveformView.h: -------------------------------------------------------------------------------- 1 | // 2 | // FDWaveformView 3 | // 4 | // Created by William Entriken on 10/6/13. 5 | // Copyright (c) 2013 William Entriken. All rights reserved. 6 | // 7 | 8 | #import 9 | #import 10 | #import 11 | 12 | @protocol FDWaveformViewDelegate; 13 | 14 | /// A view for rendering audio waveforms 15 | @interface FDWaveformView : UIView 16 | 17 | /// A delegate to accept progress reporting 18 | @property (nonatomic, weak) id delegate; 19 | 20 | /// The audio file to render 21 | @property (nonatomic, strong) NSURL *audioURL; 22 | 23 | /// The total number of audio samples in the file 24 | @property (nonatomic, assign, readonly) long int totalSamples; 25 | 26 | /// A portion of the waveform rendering to be highlighted 27 | @property (nonatomic, assign) long int progressSamples; 28 | 29 | /// The first sample to render 30 | @property (nonatomic, assign) long int zoomStartSamples; 31 | 32 | /// The last sample to render 33 | @property (nonatomic, assign) long int zoomEndSamples; 34 | 35 | /// Whether to all the scrub gesture 36 | @property (nonatomic) BOOL doesAllowScrubbing; 37 | 38 | /// Whether to allow the stretch gesture 39 | @property (nonatomic) BOOL doesAllowStretch; 40 | 41 | /// Whether to allow the scroll gesture 42 | @property (nonatomic) BOOL doesAllowScroll; 43 | 44 | /// The color of the waveform 45 | @property (nonatomic, copy) UIColor *wavesColor; 46 | 47 | /// The corol of the highlighted waveform (see `progressSamples` 48 | @property (nonatomic, copy) UIColor *progressColor; 49 | @end 50 | 51 | /// To receive progress updates from FDWaveformView 52 | @protocol FDWaveformViewDelegate 53 | @optional 54 | 55 | /// Rendering will begin 56 | - (void)waveformViewWillRender:(FDWaveformView *)waveformView; 57 | 58 | /// Rendering did complete 59 | - (void)waveformViewDidRender:(FDWaveformView *)waveformView; 60 | 61 | /// An audio file will be loaded 62 | - (void)waveformViewWillLoad:(FDWaveformView *)waveformView; 63 | 64 | /// An audio file was loaded 65 | - (void)waveformViewDidLoad:(FDWaveformView *)waveformView; 66 | 67 | /// The panning gesture did begin 68 | - (void)waveformDidBeginPanning:(FDWaveformView *)waveformView; 69 | 70 | /// The panning gesture did end 71 | - (void)waveformDidEndPanning:(FDWaveformView *)waveformView; 72 | @end -------------------------------------------------------------------------------- /Example/Pods/FDWaveformViewForked/README.md: -------------------------------------------------------------------------------- 1 | # FDWaveformView 2 | 3 | [![CI Status](http://img.shields.io/travis/fulldecent/FDWaveformView.svg?style=flat)](https://travis-ci.org/fulldecent/FDWaveformView) 4 | [![Version](https://img.shields.io/cocoapods/v/FDWaveformView.svg?style=flat)](http://cocoadocs.org/docsets/FDWaveformView) 5 | [![License](https://img.shields.io/cocoapods/l/FDWaveformView.svg?style=flat)](http://cocoadocs.org/docsets/FDWaveformView) 6 | [![Platform](https://img.shields.io/cocoapods/p/FDWaveformView.svg?style=flat)](http://cocoadocs.org/docsets/FDWaveformView) 7 | [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) 8 | 9 | 10 | FDWaveformView is an easy way to display an audio waveform in your app. It is a nice visualization to show a playing audio file or to select a position in a file. 11 | 12 | Usage 13 | ----- 14 | 15 | To use it, add an `FDWaveformView` using Interface Builder or programmatically and then just load your audio as per this example. Note: if your audio file does not have file extension, see this SO question. 16 | 17 | ```objective-c 18 | NSBundle *thisBundle = [NSBundle bundleForClass:[self class]]; 19 | NSString *filePath = [thisBundle pathForResource:@"Submarine" ofType:@"aiff"]; 20 | NSURL *url = [NSURL fileURLWithPath:filePath]; 21 | self.waveform.audioURL = url; 22 | ``` 23 | 24 |

25 | 26 |

27 | 28 | Features 29 | -------- 30 | 31 | **Set play progress** to highlight part of the waveform: 32 | 33 | ```objective-c 34 | self.waveform.progressSamples = self.waveform.totalSamples / 2; 35 | ``` 36 | 37 |

38 | 39 |

40 | 41 | **Zoom in** to show only part of the waveform, of course, zooming in will smoothly rerender to show progressively more detail: 42 | 43 | ```objective-c 44 | self.waveform.zoomStartSamples = 0; 45 | self.waveform.zoomEndSamples = self.waveform.totalSamples / 4; 46 | ``` 47 | 48 |

49 | 50 |

51 | 52 | **Enable gestures** for zooming in, panning around or scrubbing: 53 | 54 | ```objective-c 55 | self.waveform.doesAllowScrubbing = YES; 56 | self.waveform.doesAllowStretch = YES; 57 | self.waveform.doesAllowScroll = YES; 58 | ``` 59 | 60 |

61 | 62 |

63 | 64 | **Supports animation** for changing properties: 65 | 66 | ```objective-c 67 | [UIView animateWithDuration:0.3 animations:^{ 68 | NSInteger randomNumber = arc4random() % self.waveform.totalSamples; 69 | self.waveform.progressSamples = randomNumber; 70 | }]; 71 | ``` 72 | 73 |

74 | 75 |

76 | 77 | 78 | Creates **antialiased waveforms** by drawing more pixels than are seen on screen. Also, if you resize me (autolayout) I will render more detail if necessary to avoid pixelation. 79 | 80 | **Supports ARC** and **iOS7+**. 81 | 82 | **Includes unit tests** which run successfully using Travis CI. 83 | 84 | Installation 85 | ------------ 86 | 87 | 1. Add `pod 'FDWaveformView'` to your Podfile 88 | 2. The the API documentation under "Class Reference" at http://cocoadocs.org/docsets/FDWaveformView/ 89 | 3. Please add your project to "I USE THIS" at https://www.cocoacontrols.com/controls/fdwaveformview 90 | -------------------------------------------------------------------------------- /Example/Pods/Local Podspecs/SwiftySoundRecorder.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "SwiftySoundRecorder", 3 | "version": "0.0.1", 4 | "summary": "A Swift ySound Recorder with Sound Wave Views.", 5 | "homepage": "https://github.com/rcholic/SwiftySoundRecorder", 6 | "license": { 7 | "type": "MIT", 8 | "file": "LICENSE" 9 | }, 10 | "authors": { 11 | "rcholic": "ivytony@gmail.com" 12 | }, 13 | "source": { 14 | "git": "https://github.com/rcholic/SwiftySoundRecorder.git", 15 | "tag": "0.0.1" 16 | }, 17 | "platforms": { 18 | "ios": "8.0" 19 | }, 20 | "requires_arc": true, 21 | "source_files": "Source/**/*", 22 | "resource_bundles": { 23 | "SwiftySoundRecorder": [ 24 | "Images/*.{png}" 25 | ] 26 | }, 27 | "frameworks": [ 28 | "UIKit", 29 | "AVFoundation" 30 | ], 31 | "dependencies": { 32 | "SCSiriWaveformView": [ 33 | 34 | ], 35 | "FDWaveformViewForked": [ 36 | "~> 0.5.0" 37 | ] 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Example/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - FBSnapshotTestCase (2.1.2): 3 | - FBSnapshotTestCase/SwiftSupport (= 2.1.2) 4 | - FBSnapshotTestCase/Core (2.1.2) 5 | - FBSnapshotTestCase/SwiftSupport (2.1.2): 6 | - FBSnapshotTestCase/Core 7 | - FDWaveformViewForked (0.5.0) 8 | - Nimble (3.2.0) 9 | - Nimble-Snapshots (4.1.0): 10 | - FBSnapshotTestCase (~> 2.0) 11 | - Nimble 12 | - Quick 13 | - Quick (0.9.3) 14 | - SCSiriWaveformView (1.0.3) 15 | - SwiftySoundRecorder (0.0.1): 16 | - FDWaveformViewForked (~> 0.5.0) 17 | - SCSiriWaveformView 18 | 19 | DEPENDENCIES: 20 | - FBSnapshotTestCase 21 | - FDWaveformViewForked 22 | - Nimble (~> 3.0) 23 | - Nimble-Snapshots 24 | - Quick (~> 0.8) 25 | - SCSiriWaveformView 26 | - SwiftySoundRecorder (from `../`) 27 | 28 | EXTERNAL SOURCES: 29 | SwiftySoundRecorder: 30 | :path: "../" 31 | 32 | SPEC CHECKSUMS: 33 | FBSnapshotTestCase: 918c55861356ee83aee7843d759f55a18ff6982b 34 | FDWaveformViewForked: eaf260646d5e2ac3c3d3b8e44730fe47590d8755 35 | Nimble: 703854335d181df169bbca9c97117b5cf8c47c1d 36 | Nimble-Snapshots: 2da4d2ec829b458d6886c06812c52493fce284c9 37 | Quick: 13a2a2b19a5d8e3ed4fd0c36ee46597fd77ebf71 38 | SCSiriWaveformView: b8b2756af42addcd31900c3945f24edafefb5395 39 | SwiftySoundRecorder: 528d34e9643d184e3bc2fa78a283adaea31fbe07 40 | 41 | PODFILE CHECKSUM: fb658aa28f8ff10aad0fb7e0e76213b0b0c4de87 42 | 43 | COCOAPODS: 1.1.0.beta.1 44 | -------------------------------------------------------------------------------- /Example/Pods/Nimble-Snapshots/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Artsy, Ash Furrow 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Example/Pods/Nimble-Snapshots/NimbleSnapshotsConfiguration.swift: -------------------------------------------------------------------------------- 1 | import Quick 2 | 3 | class FBSnapshotTestConfiguration: QuickConfiguration { 4 | 5 | override class func configure(configuration: Configuration) { 6 | configuration.beforeEach { (exampleMetadata: ExampleMetadata) -> () in 7 | FBSnapshotTest.sharedInstance.currentExampleMetadata = exampleMetadata 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Example/Pods/Nimble-Snapshots/PrettySyntax.swift: -------------------------------------------------------------------------------- 1 | import Nimble 2 | 3 | // MARK: - Nicer syntax using == operator 4 | 5 | public struct Snapshot { 6 | let name: String? 7 | let record: Bool 8 | 9 | init(name: String?, record: Bool) { 10 | self.name = name 11 | self.record = record 12 | } 13 | } 14 | 15 | public func snapshot(name: String? = nil) -> Snapshot { 16 | return Snapshot(name: name, record: false) 17 | } 18 | 19 | public func recordSnapshot(name: String? = nil) -> Snapshot { 20 | return Snapshot(name: name, record: true) 21 | } 22 | 23 | public func ==(lhs: Expectation, rhs: Snapshot) { 24 | if let name = rhs.name { 25 | if rhs.record { 26 | lhs.to(recordSnapshot(named: name)) 27 | } else { 28 | lhs.to(haveValidSnapshot(named: name)) 29 | } 30 | 31 | } else { 32 | if rhs.record { 33 | lhs.to(recordSnapshot()) 34 | } else { 35 | lhs.to(haveValidSnapshot()) 36 | } 37 | } 38 | } 39 | 40 | // MARK: - Nicer syntax using emoji 41 | 42 | public func 📷(snapshottable: Snapshotable, file: FileString = #file, line: UInt = #line) { 43 | expect(snapshottable, file: file, line: line).to(recordSnapshot()) 44 | } 45 | 46 | public func 📷(snapshottable: Snapshotable, named name: String, file: FileString = #file, line: UInt = #line) { 47 | expect(snapshottable, file: file, line: line).to(recordSnapshot(named: name)) 48 | } 49 | -------------------------------------------------------------------------------- /Example/Pods/Nimble-Snapshots/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | Nimble-Snapshots [![Build Status](https://travis-ci.org/Moya/Moya.svg?branch=master)](https://travis-ci.org/Moya/Moya) 4 | ============================= 5 | 6 | [Nimble](https://github.com/Quick/Nimble) matchers for [FBSnapshotTestCase](https://github.com/facebook/ios-snapshot-test-case). 7 | Highly derivative of [Expecta Matchers for FBSnapshotTestCase](https://github.com/dblock/ios-snapshot-test-case-expecta). 8 | 9 |

10 | 11 |

12 | 13 | Installing 14 | ---------- 15 | 16 | You need to be using CocoaPods 0.36 Beta 1 or higher. Your podfile should look 17 | something like the following. 18 | 19 | ```rb 20 | platform :ios, '8.0' 21 | 22 | source 'https://github.com/CocoaPods/Specs.git' 23 | 24 | # Whichever pods you need for your app go here. 25 | 26 | target 'YOUR_APP_NAME_HERE_Tests', :exclusive => true do 27 | pod 'Nimble-Snapshots' 28 | end 29 | ``` 30 | 31 | Then run `pod install`. 32 | 33 | Use 34 | --- 35 | 36 | Your tests will look something like the following. 37 | 38 | ```swift 39 | import Quick 40 | import Nimble 41 | import Nimble_Snapshots 42 | import UIKit 43 | 44 | class MySpec: QuickSpec { 45 | override func spec() { 46 | describe("in some context", { () -> () in 47 | it("has valid snapshot") { 48 | let view = ... // some view you want to test 49 | expect(view).to( haveValidSnapshot() ) 50 | } 51 | }); 52 | } 53 | } 54 | ``` 55 | 56 | There are some options for testing the validity of snapshots. Snapshots can be 57 | given a name: 58 | 59 | ```swift 60 | expect(view).to( haveValidSnapshot(named: "some custom name") ) 61 | ``` 62 | 63 | We also have a prettier syntax for custom-named snapshots: 64 | 65 | ```swift 66 | expect(view) == snapshot("some custom name") 67 | ``` 68 | 69 | To record snapshots, just replace `haveValidSnapshot()` with `recordSnapshot()` 70 | and `haveValidSnapshot(named:)` with `recordSnapshot(named:)`. We also have a 71 | handy emoji operator. 72 | 73 | ```swift 74 | 📷(view) 75 | 📷(view, "some custom name") 76 | ``` 77 | 78 | By default, this pod will put the reference images inside a `ReferenceImages` 79 | directory; we try to put this in a place that makes sense (inside your unit 80 | tests directory). If we can't figure it out, or if you want to use your own 81 | directory instead, call `setNimbleTestFolder()` with the name of the directory 82 | in your unit test's path that we should use. For example, if the tests are in 83 | `App/AppTesting/`, you can call it with `AppTesting`. 84 | 85 | If you have any questions or run into any trouble, feel free to open an issue 86 | on this repo. 87 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Adapters/AdapterProtocols.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// Protocol for the assertion handler that Nimble uses for all expectations. 4 | public protocol AssertionHandler { 5 | func assert(assertion: Bool, message: FailureMessage, location: SourceLocation) 6 | } 7 | 8 | /// Global backing interface for assertions that Nimble creates. 9 | /// Defaults to a private test handler that passes through to XCTest. 10 | /// 11 | /// If XCTest is not available, you must assign your own assertion handler 12 | /// before using any matchers, otherwise Nimble will abort the program. 13 | /// 14 | /// @see AssertionHandler 15 | public var NimbleAssertionHandler: AssertionHandler = { () -> AssertionHandler in 16 | return isXCTestAvailable() ? NimbleXCTestHandler() : NimbleXCTestUnavailableHandler() 17 | }() 18 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Adapters/AssertionDispatcher.swift: -------------------------------------------------------------------------------- 1 | 2 | /// AssertionDispatcher allows multiple AssertionHandlers to receive 3 | /// assertion messages. 4 | /// 5 | /// @warning Does not fully dispatch if one of the handlers raises an exception. 6 | /// This is possible with XCTest-based assertion handlers. 7 | /// 8 | public class AssertionDispatcher: AssertionHandler { 9 | let handlers: [AssertionHandler] 10 | 11 | public init(handlers: [AssertionHandler]) { 12 | self.handlers = handlers 13 | } 14 | 15 | public func assert(assertion: Bool, message: FailureMessage, location: SourceLocation) { 16 | for handler in handlers { 17 | handler.assert(assertion, message: message, location: location) 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Adapters/NimbleEnvironment.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// "Global" state of Nimble is stored here. Only DSL functions should access / be aware of this 4 | /// class' existance 5 | internal class NimbleEnvironment { 6 | static var activeInstance: NimbleEnvironment { 7 | get { 8 | let env = NSThread.currentThread().threadDictionary["NimbleEnvironment"] 9 | if let env = env as? NimbleEnvironment { 10 | return env 11 | } else { 12 | let newEnv = NimbleEnvironment() 13 | self.activeInstance = newEnv 14 | return newEnv 15 | } 16 | } 17 | set { 18 | NSThread.currentThread().threadDictionary["NimbleEnvironment"] = newValue 19 | } 20 | } 21 | 22 | // TODO: eventually migrate the global to this environment value 23 | var assertionHandler: AssertionHandler { 24 | get { return NimbleAssertionHandler } 25 | set { NimbleAssertionHandler = newValue } 26 | } 27 | 28 | #if _runtime(_ObjC) 29 | var awaiter: Awaiter 30 | 31 | init() { 32 | awaiter = Awaiter( 33 | waitLock: AssertionWaitLock(), 34 | asyncQueue: dispatch_get_main_queue(), 35 | timeoutQueue: dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0)) 36 | } 37 | #endif 38 | } 39 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Adapters/NimbleXCTestHandler.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import XCTest 3 | 4 | /// Default handler for Nimble. This assertion handler passes failures along to 5 | /// XCTest. 6 | public class NimbleXCTestHandler : AssertionHandler { 7 | public func assert(assertion: Bool, message: FailureMessage, location: SourceLocation) { 8 | if !assertion { 9 | recordFailure("\(message.stringValue)\n", location: location) 10 | } 11 | } 12 | } 13 | 14 | /// Alternative handler for Nimble. This assertion handler passes failures along 15 | /// to XCTest by attempting to reduce the failure message size. 16 | public class NimbleShortXCTestHandler: AssertionHandler { 17 | public func assert(assertion: Bool, message: FailureMessage, location: SourceLocation) { 18 | if !assertion { 19 | let msg: String 20 | if let actual = message.actualValue { 21 | msg = "got: \(actual) \(message.postfixActual)" 22 | } else { 23 | msg = "expected \(message.to) \(message.postfixMessage)" 24 | } 25 | recordFailure("\(msg)\n", location: location) 26 | } 27 | } 28 | } 29 | 30 | /// Fallback handler in case XCTest is unavailable. This assertion handler will abort 31 | /// the program if it is invoked. 32 | class NimbleXCTestUnavailableHandler : AssertionHandler { 33 | func assert(assertion: Bool, message: FailureMessage, location: SourceLocation) { 34 | fatalError("XCTest is not available and no custom assertion handler was configured. Aborting.") 35 | } 36 | } 37 | 38 | #if _runtime(_ObjC) 39 | /// Helper class providing access to the currently executing XCTestCase instance, if any 40 | @objc final internal class CurrentTestCaseTracker: NSObject, XCTestObservation { 41 | @objc static let sharedInstance = CurrentTestCaseTracker() 42 | 43 | private(set) var currentTestCase: XCTestCase? 44 | 45 | @objc func testCaseWillStart(testCase: XCTestCase) { 46 | currentTestCase = testCase 47 | } 48 | 49 | @objc func testCaseDidFinish(testCase: XCTestCase) { 50 | currentTestCase = nil 51 | } 52 | } 53 | #endif 54 | 55 | 56 | func isXCTestAvailable() -> Bool { 57 | #if _runtime(_ObjC) 58 | // XCTest is weakly linked and so may not be present 59 | return NSClassFromString("XCTestCase") != nil 60 | #else 61 | return true 62 | #endif 63 | } 64 | 65 | private func recordFailure(message: String, location: SourceLocation) { 66 | #if _runtime(_ObjC) 67 | if let testCase = CurrentTestCaseTracker.sharedInstance.currentTestCase { 68 | testCase.recordFailureWithDescription(message, inFile: location.file, atLine: location.line, expected: true) 69 | } else { 70 | let msg = "Attempted to report a test failure to XCTest while no test case was running. " + 71 | "The failure was:\n\"\(message)\"\nIt occurred at: \(location.file):\(location.line)" 72 | NSException(name: NSInternalInconsistencyException, reason: msg, userInfo: nil).raise() 73 | } 74 | #else 75 | XCTFail("\(message)\n", file: location.file, line: location.line) 76 | #endif 77 | } 78 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/DSL.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// Make an expectation on a given actual value. The value given is lazily evaluated. 4 | @warn_unused_result(message="Follow 'expect(…)' with '.to(…)', '.toNot(…)', 'toEventually(…)', '==', etc.") 5 | public func expect(@autoclosure(escaping) expression: () throws -> T?, file: FileString = __FILE__, line: UInt = __LINE__) -> Expectation { 6 | return Expectation( 7 | expression: Expression( 8 | expression: expression, 9 | location: SourceLocation(file: file, line: line), 10 | isClosure: true)) 11 | } 12 | 13 | /// Make an expectation on a given actual value. The closure is lazily invoked. 14 | @warn_unused_result(message="Follow 'expect(…)' with '.to(…)', '.toNot(…)', 'toEventually(…)', '==', etc.") 15 | public func expect(file: FileString = __FILE__, line: UInt = __LINE__, expression: () throws -> T?) -> Expectation { 16 | return Expectation( 17 | expression: Expression( 18 | expression: expression, 19 | location: SourceLocation(file: file, line: line), 20 | isClosure: true)) 21 | } 22 | 23 | /// Always fails the test with a message and a specified location. 24 | public func fail(message: String, location: SourceLocation) { 25 | let handler = NimbleEnvironment.activeInstance.assertionHandler 26 | handler.assert(false, message: FailureMessage(stringValue: message), location: location) 27 | } 28 | 29 | /// Always fails the test with a message. 30 | public func fail(message: String, file: FileString = __FILE__, line: UInt = __LINE__) { 31 | fail(message, location: SourceLocation(file: file, line: line)) 32 | } 33 | 34 | /// Always fails the test. 35 | public func fail(file: FileString = __FILE__, line: UInt = __LINE__) { 36 | fail("fail() always fails", file: file, line: line) 37 | } 38 | 39 | /// Like Swift's precondition(), but raises NSExceptions instead of sigaborts 40 | internal func nimblePrecondition( 41 | @autoclosure expr: () -> Bool, 42 | @autoclosure _ name: () -> String, 43 | @autoclosure _ message: () -> String, 44 | file: StaticString = __FILE__, 45 | line: UInt = __LINE__) -> Bool { 46 | let result = expr() 47 | if !result { 48 | #if _runtime(_ObjC) 49 | let e = NSException( 50 | name: name(), 51 | reason: message(), 52 | userInfo: nil) 53 | e.raise() 54 | #else 55 | preconditionFailure("\(name()) - \(message())", file: file, line: line) 56 | #endif 57 | } 58 | return result 59 | } 60 | 61 | @noreturn 62 | internal func internalError(msg: String, file: FileString = __FILE__, line: UInt = __LINE__) { 63 | fatalError( 64 | "Nimble Bug Found: \(msg) at \(file):\(line).\n" + 65 | "Please file a bug to Nimble: https://github.com/Quick/Nimble/issues with the " + 66 | "code snippet that caused this error." 67 | ) 68 | } -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Expectation.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | internal func expressionMatches(expression: Expression, matcher: U, to: String, description: String?) -> (Bool, FailureMessage) { 4 | let msg = FailureMessage() 5 | msg.userDescription = description 6 | msg.to = to 7 | do { 8 | let pass = try matcher.matches(expression, failureMessage: msg) 9 | if msg.actualValue == "" { 10 | msg.actualValue = "<\(stringify(try expression.evaluate()))>" 11 | } 12 | return (pass, msg) 13 | } catch let error { 14 | msg.actualValue = "an unexpected error thrown: <\(error)>" 15 | return (false, msg) 16 | } 17 | } 18 | 19 | internal func expressionDoesNotMatch(expression: Expression, matcher: U, toNot: String, description: String?) -> (Bool, FailureMessage) { 20 | let msg = FailureMessage() 21 | msg.userDescription = description 22 | msg.to = toNot 23 | do { 24 | let pass = try matcher.doesNotMatch(expression, failureMessage: msg) 25 | if msg.actualValue == "" { 26 | msg.actualValue = "<\(stringify(try expression.evaluate()))>" 27 | } 28 | return (pass, msg) 29 | } catch let error { 30 | msg.actualValue = "an unexpected error thrown: <\(error)>" 31 | return (false, msg) 32 | } 33 | } 34 | 35 | public struct Expectation { 36 | let expression: Expression 37 | 38 | public func verify(pass: Bool, _ message: FailureMessage) { 39 | let handler = NimbleEnvironment.activeInstance.assertionHandler 40 | handler.assert(pass, message: message, location: expression.location) 41 | } 42 | 43 | /// Tests the actual value using a matcher to match. 44 | public func to(matcher: U, description: String? = nil) { 45 | let (pass, msg) = expressionMatches(expression, matcher: matcher, to: "to", description: description) 46 | verify(pass, msg) 47 | } 48 | 49 | /// Tests the actual value using a matcher to not match. 50 | public func toNot(matcher: U, description: String? = nil) { 51 | let (pass, msg) = expressionDoesNotMatch(expression, matcher: matcher, toNot: "to not", description: description) 52 | verify(pass, msg) 53 | } 54 | 55 | /// Tests the actual value using a matcher to not match. 56 | /// 57 | /// Alias to toNot(). 58 | public func notTo(matcher: U, description: String? = nil) { 59 | toNot(matcher, description: description) 60 | } 61 | 62 | // see: 63 | // - AsyncMatcherWrapper for extension 64 | // - NMBExpectation for Objective-C interface 65 | } 66 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/FailureMessage.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// Encapsulates the failure message that matchers can report to the end user. 4 | /// 5 | /// This is shared state between Nimble and matchers that mutate this value. 6 | public class FailureMessage: NSObject { 7 | public var expected: String = "expected" 8 | public var actualValue: String? = "" // empty string -> use default; nil -> exclude 9 | public var to: String = "to" 10 | public var postfixMessage: String = "match" 11 | public var postfixActual: String = "" 12 | public var userDescription: String? = nil 13 | 14 | public var stringValue: String { 15 | get { 16 | if let value = _stringValueOverride { 17 | return value 18 | } else { 19 | return computeStringValue() 20 | } 21 | } 22 | set { 23 | _stringValueOverride = newValue 24 | } 25 | } 26 | 27 | internal var _stringValueOverride: String? 28 | 29 | public override init() { 30 | } 31 | 32 | public init(stringValue: String) { 33 | _stringValueOverride = stringValue 34 | } 35 | 36 | internal func stripNewlines(str: String) -> String { 37 | var lines: [String] = NSString(string: str).componentsSeparatedByString("\n") as [String] 38 | let whitespace = NSCharacterSet.whitespaceAndNewlineCharacterSet() 39 | lines = lines.map { line in NSString(string: line).stringByTrimmingCharactersInSet(whitespace) } 40 | return lines.joinWithSeparator("") 41 | } 42 | 43 | internal func computeStringValue() -> String { 44 | var value = "\(expected) \(to) \(postfixMessage)" 45 | if let actualValue = actualValue { 46 | value = "\(expected) \(to) \(postfixMessage), got \(actualValue)\(postfixActual)" 47 | } 48 | value = stripNewlines(value) 49 | 50 | if let userDescription = userDescription { 51 | return "\(userDescription)\n\(value)" 52 | } 53 | 54 | return value 55 | } 56 | } -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Matchers/BeAKindOf.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | #if _runtime(_ObjC) 4 | 5 | // A Nimble matcher that catches attempts to use beAKindOf with non Objective-C types 6 | public func beAKindOf(expectedClass: Any) -> NonNilMatcherFunc { 7 | return NonNilMatcherFunc {actualExpression, failureMessage in 8 | failureMessage.stringValue = "beAKindOf only works on Objective-C types since" 9 | + " the Swift compiler will automatically type check Swift-only types." 10 | + " This expectation is redundant." 11 | return false 12 | } 13 | } 14 | 15 | /// A Nimble matcher that succeeds when the actual value is an instance of the given class. 16 | /// @see beAnInstanceOf if you want to match against the exact class 17 | public func beAKindOf(expectedClass: AnyClass) -> NonNilMatcherFunc { 18 | return NonNilMatcherFunc { actualExpression, failureMessage in 19 | let instance = try actualExpression.evaluate() 20 | if let validInstance = instance { 21 | failureMessage.actualValue = "<\(classAsString(validInstance.dynamicType)) instance>" 22 | } else { 23 | failureMessage.actualValue = "" 24 | } 25 | failureMessage.postfixMessage = "be a kind of \(classAsString(expectedClass))" 26 | return instance != nil && instance!.isKindOfClass(expectedClass) 27 | } 28 | } 29 | 30 | extension NMBObjCMatcher { 31 | public class func beAKindOfMatcher(expected: AnyClass) -> NMBMatcher { 32 | return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in 33 | return try! beAKindOf(expected).matches(actualExpression, failureMessage: failureMessage) 34 | } 35 | } 36 | } 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Matchers/BeAnInstanceOf.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | // A Nimble matcher that catches attempts to use beAnInstanceOf with non Objective-C types 4 | public func beAnInstanceOf(expectedClass: Any) -> NonNilMatcherFunc { 5 | return NonNilMatcherFunc {actualExpression, failureMessage in 6 | failureMessage.stringValue = "beAnInstanceOf only works on Objective-C types since" 7 | + " the Swift compiler will automatically type check Swift-only types." 8 | + " This expectation is redundant." 9 | return false 10 | } 11 | } 12 | 13 | /// A Nimble matcher that succeeds when the actual value is an instance of the given class. 14 | /// @see beAKindOf if you want to match against subclasses 15 | public func beAnInstanceOf(expectedClass: AnyClass) -> NonNilMatcherFunc { 16 | return NonNilMatcherFunc { actualExpression, failureMessage in 17 | let instance = try actualExpression.evaluate() 18 | if let validInstance = instance { 19 | failureMessage.actualValue = "<\(classAsString(validInstance.dynamicType)) instance>" 20 | } else { 21 | failureMessage.actualValue = "" 22 | } 23 | failureMessage.postfixMessage = "be an instance of \(classAsString(expectedClass))" 24 | #if _runtime(_ObjC) 25 | return instance != nil && instance!.isMemberOfClass(expectedClass) 26 | #else 27 | return instance != nil && instance!.dynamicType == expectedClass 28 | #endif 29 | } 30 | } 31 | 32 | #if _runtime(_ObjC) 33 | extension NMBObjCMatcher { 34 | public class func beAnInstanceOfMatcher(expected: AnyClass) -> NMBMatcher { 35 | return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in 36 | return try! beAnInstanceOf(expected).matches(actualExpression, failureMessage: failureMessage) 37 | } 38 | } 39 | } 40 | #endif 41 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThan.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | 4 | /// A Nimble matcher that succeeds when the actual value is greater than the expected value. 5 | public func beGreaterThan(expectedValue: T?) -> NonNilMatcherFunc { 6 | return NonNilMatcherFunc { actualExpression, failureMessage in 7 | failureMessage.postfixMessage = "be greater than <\(stringify(expectedValue))>" 8 | return try actualExpression.evaluate() > expectedValue 9 | } 10 | } 11 | 12 | /// A Nimble matcher that succeeds when the actual value is greater than the expected value. 13 | public func beGreaterThan(expectedValue: NMBComparable?) -> NonNilMatcherFunc { 14 | return NonNilMatcherFunc { actualExpression, failureMessage in 15 | failureMessage.postfixMessage = "be greater than <\(stringify(expectedValue))>" 16 | let actualValue = try actualExpression.evaluate() 17 | let matches = actualValue != nil && actualValue!.NMB_compare(expectedValue) == NSComparisonResult.OrderedDescending 18 | return matches 19 | } 20 | } 21 | 22 | public func >(lhs: Expectation, rhs: T) { 23 | lhs.to(beGreaterThan(rhs)) 24 | } 25 | 26 | public func >(lhs: Expectation, rhs: NMBComparable?) { 27 | lhs.to(beGreaterThan(rhs)) 28 | } 29 | 30 | #if _runtime(_ObjC) 31 | extension NMBObjCMatcher { 32 | public class func beGreaterThanMatcher(expected: NMBComparable?) -> NMBObjCMatcher { 33 | return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in 34 | let expr = actualExpression.cast { $0 as? NMBComparable } 35 | return try! beGreaterThan(expected).matches(expr, failureMessage: failureMessage) 36 | } 37 | } 38 | } 39 | #endif 40 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// A Nimble matcher that succeeds when the actual value is greater than 4 | /// or equal to the expected value. 5 | public func beGreaterThanOrEqualTo(expectedValue: T?) -> NonNilMatcherFunc { 6 | return NonNilMatcherFunc { actualExpression, failureMessage in 7 | failureMessage.postfixMessage = "be greater than or equal to <\(stringify(expectedValue))>" 8 | let actualValue = try actualExpression.evaluate() 9 | return actualValue >= expectedValue 10 | } 11 | } 12 | 13 | /// A Nimble matcher that succeeds when the actual value is greater than 14 | /// or equal to the expected value. 15 | public func beGreaterThanOrEqualTo(expectedValue: T?) -> NonNilMatcherFunc { 16 | return NonNilMatcherFunc { actualExpression, failureMessage in 17 | failureMessage.postfixMessage = "be greater than or equal to <\(stringify(expectedValue))>" 18 | let actualValue = try actualExpression.evaluate() 19 | let matches = actualValue != nil && actualValue!.NMB_compare(expectedValue) != NSComparisonResult.OrderedAscending 20 | return matches 21 | } 22 | } 23 | 24 | public func >=(lhs: Expectation, rhs: T) { 25 | lhs.to(beGreaterThanOrEqualTo(rhs)) 26 | } 27 | 28 | public func >=(lhs: Expectation, rhs: T) { 29 | lhs.to(beGreaterThanOrEqualTo(rhs)) 30 | } 31 | 32 | #if _runtime(_ObjC) 33 | extension NMBObjCMatcher { 34 | public class func beGreaterThanOrEqualToMatcher(expected: NMBComparable?) -> NMBObjCMatcher { 35 | return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in 36 | let expr = actualExpression.cast { $0 as? NMBComparable } 37 | return try! beGreaterThanOrEqualTo(expected).matches(expr, failureMessage: failureMessage) 38 | } 39 | } 40 | } 41 | #endif 42 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Matchers/BeIdenticalTo.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | 4 | /// A Nimble matcher that succeeds when the actual value is the same instance 5 | /// as the expected instance. 6 | public func beIdenticalTo(expected: AnyObject?) -> NonNilMatcherFunc { 7 | return NonNilMatcherFunc { actualExpression, failureMessage in 8 | let actual = try actualExpression.evaluate() 9 | failureMessage.actualValue = "\(identityAsString(actual))" 10 | failureMessage.postfixMessage = "be identical to \(identityAsString(expected))" 11 | return actual === expected && actual !== nil 12 | } 13 | } 14 | 15 | public func ===(lhs: Expectation, rhs: AnyObject?) { 16 | lhs.to(beIdenticalTo(rhs)) 17 | } 18 | public func !==(lhs: Expectation, rhs: AnyObject?) { 19 | lhs.toNot(beIdenticalTo(rhs)) 20 | } 21 | 22 | /// A Nimble matcher that succeeds when the actual value is the same instance 23 | /// as the expected instance. 24 | /// 25 | /// Alias for "beIdenticalTo". 26 | public func be(expected: AnyObject?) -> NonNilMatcherFunc { 27 | return beIdenticalTo(expected) 28 | } 29 | 30 | #if _runtime(_ObjC) 31 | extension NMBObjCMatcher { 32 | public class func beIdenticalToMatcher(expected: NSObject?) -> NMBObjCMatcher { 33 | return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in 34 | let aExpr = actualExpression.cast { $0 as AnyObject? } 35 | return try! beIdenticalTo(expected).matches(aExpr, failureMessage: failureMessage) 36 | } 37 | } 38 | } 39 | #endif 40 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Matchers/BeLessThan.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// A Nimble matcher that succeeds when the actual value is less than the expected value. 4 | public func beLessThan(expectedValue: T?) -> NonNilMatcherFunc { 5 | return NonNilMatcherFunc { actualExpression, failureMessage in 6 | failureMessage.postfixMessage = "be less than <\(stringify(expectedValue))>" 7 | return try actualExpression.evaluate() < expectedValue 8 | } 9 | } 10 | 11 | /// A Nimble matcher that succeeds when the actual value is less than the expected value. 12 | public func beLessThan(expectedValue: NMBComparable?) -> NonNilMatcherFunc { 13 | return NonNilMatcherFunc { actualExpression, failureMessage in 14 | failureMessage.postfixMessage = "be less than <\(stringify(expectedValue))>" 15 | let actualValue = try actualExpression.evaluate() 16 | let matches = actualValue != nil && actualValue!.NMB_compare(expectedValue) == NSComparisonResult.OrderedAscending 17 | return matches 18 | } 19 | } 20 | 21 | public func <(lhs: Expectation, rhs: T) { 22 | lhs.to(beLessThan(rhs)) 23 | } 24 | 25 | public func <(lhs: Expectation, rhs: NMBComparable?) { 26 | lhs.to(beLessThan(rhs)) 27 | } 28 | 29 | #if _runtime(_ObjC) 30 | extension NMBObjCMatcher { 31 | public class func beLessThanMatcher(expected: NMBComparable?) -> NMBObjCMatcher { 32 | return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in 33 | let expr = actualExpression.cast { $0 as! NMBComparable? } 34 | return try! beLessThan(expected).matches(expr, failureMessage: failureMessage) 35 | } 36 | } 37 | } 38 | #endif 39 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Matchers/BeLessThanOrEqual.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// A Nimble matcher that succeeds when the actual value is less than 4 | /// or equal to the expected value. 5 | public func beLessThanOrEqualTo(expectedValue: T?) -> NonNilMatcherFunc { 6 | return NonNilMatcherFunc { actualExpression, failureMessage in 7 | failureMessage.postfixMessage = "be less than or equal to <\(stringify(expectedValue))>" 8 | return try actualExpression.evaluate() <= expectedValue 9 | } 10 | } 11 | 12 | /// A Nimble matcher that succeeds when the actual value is less than 13 | /// or equal to the expected value. 14 | public func beLessThanOrEqualTo(expectedValue: T?) -> NonNilMatcherFunc { 15 | return NonNilMatcherFunc { actualExpression, failureMessage in 16 | failureMessage.postfixMessage = "be less than or equal to <\(stringify(expectedValue))>" 17 | let actualValue = try actualExpression.evaluate() 18 | return actualValue != nil && actualValue!.NMB_compare(expectedValue) != NSComparisonResult.OrderedDescending 19 | } 20 | } 21 | 22 | public func <=(lhs: Expectation, rhs: T) { 23 | lhs.to(beLessThanOrEqualTo(rhs)) 24 | } 25 | 26 | public func <=(lhs: Expectation, rhs: T) { 27 | lhs.to(beLessThanOrEqualTo(rhs)) 28 | } 29 | 30 | #if _runtime(_ObjC) 31 | extension NMBObjCMatcher { 32 | public class func beLessThanOrEqualToMatcher(expected: NMBComparable?) -> NMBObjCMatcher { 33 | return NMBObjCMatcher(canMatchNil:false) { actualExpression, failureMessage in 34 | let expr = actualExpression.cast { $0 as? NMBComparable } 35 | return try! beLessThanOrEqualTo(expected).matches(expr, failureMessage: failureMessage) 36 | } 37 | } 38 | } 39 | #endif 40 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Matchers/BeNil.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// A Nimble matcher that succeeds when the actual value is nil. 4 | public func beNil() -> MatcherFunc { 5 | return MatcherFunc { actualExpression, failureMessage in 6 | failureMessage.postfixMessage = "be nil" 7 | let actualValue = try actualExpression.evaluate() 8 | return actualValue == nil 9 | } 10 | } 11 | 12 | #if _runtime(_ObjC) 13 | extension NMBObjCMatcher { 14 | public class func beNilMatcher() -> NMBObjCMatcher { 15 | return NMBObjCMatcher { actualExpression, failureMessage in 16 | return try! beNil().matches(actualExpression, failureMessage: failureMessage) 17 | } 18 | } 19 | } 20 | #endif 21 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Matchers/BeVoid.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// A Nimble matcher that succeeds when the actual value is Void. 4 | public func beVoid() -> MatcherFunc<()> { 5 | return MatcherFunc { actualExpression, failureMessage in 6 | failureMessage.postfixMessage = "be void" 7 | let actualValue: ()? = try actualExpression.evaluate() 8 | return actualValue != nil 9 | } 10 | } 11 | 12 | public func ==(lhs: Expectation<()>, rhs: ()) { 13 | lhs.to(beVoid()) 14 | } 15 | 16 | public func !=(lhs: Expectation<()>, rhs: ()) { 17 | lhs.toNot(beVoid()) 18 | } -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Matchers/BeginWith.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | 4 | /// A Nimble matcher that succeeds when the actual sequence's first element 5 | /// is equal to the expected value. 6 | public func beginWith(startingElement: T) -> NonNilMatcherFunc { 7 | return NonNilMatcherFunc { actualExpression, failureMessage in 8 | failureMessage.postfixMessage = "begin with <\(startingElement)>" 9 | if let actualValue = try actualExpression.evaluate() { 10 | var actualGenerator = actualValue.generate() 11 | return actualGenerator.next() == startingElement 12 | } 13 | return false 14 | } 15 | } 16 | 17 | /// A Nimble matcher that succeeds when the actual collection's first element 18 | /// is equal to the expected object. 19 | public func beginWith(startingElement: AnyObject) -> NonNilMatcherFunc { 20 | return NonNilMatcherFunc { actualExpression, failureMessage in 21 | failureMessage.postfixMessage = "begin with <\(startingElement)>" 22 | let collection = try actualExpression.evaluate() 23 | return collection != nil && collection!.indexOfObject(startingElement) == 0 24 | } 25 | } 26 | 27 | /// A Nimble matcher that succeeds when the actual string contains expected substring 28 | /// where the expected substring's location is zero. 29 | public func beginWith(startingSubstring: String) -> NonNilMatcherFunc { 30 | return NonNilMatcherFunc { actualExpression, failureMessage in 31 | failureMessage.postfixMessage = "begin with <\(startingSubstring)>" 32 | if let actual = try actualExpression.evaluate() { 33 | let range = actual.rangeOfString(startingSubstring) 34 | return range != nil && range!.startIndex == actual.startIndex 35 | } 36 | return false 37 | } 38 | } 39 | 40 | #if _runtime(_ObjC) 41 | extension NMBObjCMatcher { 42 | public class func beginWithMatcher(expected: AnyObject) -> NMBObjCMatcher { 43 | return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in 44 | let actual = try! actualExpression.evaluate() 45 | if let _ = actual as? String { 46 | let expr = actualExpression.cast { $0 as? String } 47 | return try! beginWith(expected as! String).matches(expr, failureMessage: failureMessage) 48 | } else { 49 | let expr = actualExpression.cast { $0 as? NMBOrderedCollection } 50 | return try! beginWith(expected).matches(expr, failureMessage: failureMessage) 51 | } 52 | } 53 | } 54 | } 55 | #endif 56 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Matchers/EndWith.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | 4 | /// A Nimble matcher that succeeds when the actual sequence's last element 5 | /// is equal to the expected value. 6 | public func endWith(endingElement: T) -> NonNilMatcherFunc { 7 | return NonNilMatcherFunc { actualExpression, failureMessage in 8 | failureMessage.postfixMessage = "end with <\(endingElement)>" 9 | 10 | if let actualValue = try actualExpression.evaluate() { 11 | var actualGenerator = actualValue.generate() 12 | var lastItem: T? 13 | var item: T? 14 | repeat { 15 | lastItem = item 16 | item = actualGenerator.next() 17 | } while(item != nil) 18 | 19 | return lastItem == endingElement 20 | } 21 | return false 22 | } 23 | } 24 | 25 | /// A Nimble matcher that succeeds when the actual collection's last element 26 | /// is equal to the expected object. 27 | public func endWith(endingElement: AnyObject) -> NonNilMatcherFunc { 28 | return NonNilMatcherFunc { actualExpression, failureMessage in 29 | failureMessage.postfixMessage = "end with <\(endingElement)>" 30 | let collection = try actualExpression.evaluate() 31 | return collection != nil && collection!.indexOfObject(endingElement) == collection!.count - 1 32 | } 33 | } 34 | 35 | 36 | /// A Nimble matcher that succeeds when the actual string contains the expected substring 37 | /// where the expected substring's location is the actual string's length minus the 38 | /// expected substring's length. 39 | public func endWith(endingSubstring: String) -> NonNilMatcherFunc { 40 | return NonNilMatcherFunc { actualExpression, failureMessage in 41 | failureMessage.postfixMessage = "end with <\(endingSubstring)>" 42 | if let collection = try actualExpression.evaluate() { 43 | let range = collection.rangeOfString(endingSubstring) 44 | return range != nil && range!.endIndex == collection.endIndex 45 | } 46 | return false 47 | } 48 | } 49 | 50 | #if _runtime(_ObjC) 51 | extension NMBObjCMatcher { 52 | public class func endWithMatcher(expected: AnyObject) -> NMBObjCMatcher { 53 | return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in 54 | let actual = try! actualExpression.evaluate() 55 | if let _ = actual as? String { 56 | let expr = actualExpression.cast { $0 as? String } 57 | return try! endWith(expected as! String).matches(expr, failureMessage: failureMessage) 58 | } else { 59 | let expr = actualExpression.cast { $0 as? NMBOrderedCollection } 60 | return try! endWith(expected).matches(expr, failureMessage: failureMessage) 61 | } 62 | } 63 | } 64 | } 65 | #endif 66 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Matchers/HaveCount.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// A Nimble matcher that succeeds when the actual CollectionType's count equals 4 | /// the expected value 5 | public func haveCount(expectedValue: T.Index.Distance) -> NonNilMatcherFunc { 6 | return NonNilMatcherFunc { actualExpression, failureMessage in 7 | if let actualValue = try actualExpression.evaluate() { 8 | failureMessage.postfixMessage = "have \(actualValue) with count \(expectedValue)" 9 | let result = expectedValue == actualValue.count 10 | failureMessage.actualValue = "\(actualValue.count)" 11 | return result 12 | } else { 13 | return false 14 | } 15 | } 16 | } 17 | 18 | /// A Nimble matcher that succeeds when the actual collection's count equals 19 | /// the expected value 20 | public func haveCount(expectedValue: Int) -> MatcherFunc { 21 | return MatcherFunc { actualExpression, failureMessage in 22 | if let actualValue = try actualExpression.evaluate() { 23 | failureMessage.postfixMessage = "have \(actualValue) with count \(expectedValue)" 24 | let result = expectedValue == actualValue.count 25 | failureMessage.actualValue = "\(actualValue.count)" 26 | return result 27 | } else { 28 | return false 29 | } 30 | } 31 | } 32 | 33 | #if _runtime(_ObjC) 34 | extension NMBObjCMatcher { 35 | public class func haveCountMatcher(expected: NSNumber) -> NMBObjCMatcher { 36 | return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in 37 | let location = actualExpression.location 38 | let actualValue = try! actualExpression.evaluate() 39 | if let value = actualValue as? NMBCollection { 40 | let expr = Expression(expression: ({ value as NMBCollection}), location: location) 41 | return try! haveCount(expected.integerValue).matches(expr, failureMessage: failureMessage) 42 | } else if let actualValue = actualValue { 43 | failureMessage.postfixMessage = "get type of NSArray, NSSet, NSDictionary, or NSHashTable" 44 | failureMessage.actualValue = "\(classAsString(actualValue.dynamicType))" 45 | } 46 | return false 47 | } 48 | } 49 | } 50 | #endif 51 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Matchers/Match.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | #if _runtime(_ObjC) 4 | 5 | /// A Nimble matcher that succeeds when the actual string satisfies the regular expression 6 | /// described by the expected string. 7 | public func match(expectedValue: String?) -> NonNilMatcherFunc { 8 | return NonNilMatcherFunc { actualExpression, failureMessage in 9 | failureMessage.postfixMessage = "match <\(stringify(expectedValue))>" 10 | 11 | if let actual = try actualExpression.evaluate() { 12 | if let regexp = expectedValue { 13 | return actual.rangeOfString(regexp, options: .RegularExpressionSearch) != nil 14 | } 15 | } 16 | 17 | return false 18 | } 19 | } 20 | 21 | extension NMBObjCMatcher { 22 | public class func matchMatcher(expected: NSString) -> NMBMatcher { 23 | return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in 24 | let actual = actualExpression.cast { $0 as? String } 25 | return try! match(expected.description).matches(actual, failureMessage: failureMessage) 26 | } 27 | } 28 | } 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Matchers/PostNotification.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | internal class NotificationCollector { 4 | private(set) var observedNotifications: [NSNotification] 5 | private let notificationCenter: NSNotificationCenter 6 | #if _runtime(_ObjC) 7 | private var token: AnyObject? 8 | #else 9 | private var token: NSObjectProtocol? 10 | #endif 11 | 12 | required init(notificationCenter: NSNotificationCenter) { 13 | self.notificationCenter = notificationCenter 14 | self.observedNotifications = [] 15 | } 16 | 17 | func startObserving() { 18 | self.token = self.notificationCenter.addObserverForName(nil, object: nil, queue: nil) { 19 | // linux-swift gets confused by .append(n) 20 | [weak self] n in self?.observedNotifications += [n] 21 | } 22 | } 23 | 24 | deinit { 25 | #if _runtime(_ObjC) 26 | if let token = self.token { 27 | self.notificationCenter.removeObserver(token) 28 | } 29 | #else 30 | if let token = self.token as? AnyObject { 31 | self.notificationCenter.removeObserver(token) 32 | } 33 | #endif 34 | } 35 | } 36 | 37 | private let mainThread = pthread_self() 38 | 39 | public func postNotifications( 40 | notificationsMatcher: T, 41 | fromNotificationCenter center: NSNotificationCenter = NSNotificationCenter.defaultCenter()) 42 | -> MatcherFunc { 43 | let _ = mainThread // Force lazy-loading of this value 44 | let collector = NotificationCollector(notificationCenter: center) 45 | collector.startObserving() 46 | var once: Bool = false 47 | return MatcherFunc { actualExpression, failureMessage in 48 | let collectorNotificationsExpression = Expression(memoizedExpression: { _ in 49 | return collector.observedNotifications 50 | }, location: actualExpression.location, withoutCaching: true) 51 | 52 | assert(pthread_equal(mainThread, pthread_self()) != 0, "Only expecting closure to be evaluated on main thread.") 53 | if !once { 54 | once = true 55 | try actualExpression.evaluate() 56 | } 57 | 58 | let match = try notificationsMatcher.matches(collectorNotificationsExpression, failureMessage: failureMessage) 59 | if collector.observedNotifications.isEmpty { 60 | failureMessage.actualValue = "no notifications" 61 | } else { 62 | failureMessage.actualValue = "<\(stringify(collector.observedNotifications))>" 63 | } 64 | return match 65 | } 66 | } -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAnyOf.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// A Nimble matcher that succeeds when the actual value matches with any of the matchers 4 | /// provided in the variable list of matchers. 5 | public func satisfyAnyOf(matchers: U...) -> NonNilMatcherFunc { 6 | return satisfyAnyOf(matchers) 7 | } 8 | 9 | internal func satisfyAnyOf(matchers: [U]) -> NonNilMatcherFunc { 10 | return NonNilMatcherFunc { actualExpression, failureMessage in 11 | let postfixMessages = NSMutableArray() 12 | var matches = false 13 | for matcher in matchers { 14 | if try matcher.matches(actualExpression, failureMessage: failureMessage) { 15 | matches = true 16 | } 17 | postfixMessages.addObject(NSString(string: "{\(failureMessage.postfixMessage)}")) 18 | } 19 | 20 | failureMessage.postfixMessage = "match one of: " + postfixMessages.componentsJoinedByString(", or ") 21 | if let actualValue = try actualExpression.evaluate() { 22 | failureMessage.actualValue = "\(actualValue)" 23 | } 24 | 25 | return matches 26 | } 27 | } 28 | 29 | public func ||(left: NonNilMatcherFunc, right: NonNilMatcherFunc) -> NonNilMatcherFunc { 30 | return satisfyAnyOf(left, right) 31 | } 32 | 33 | public func ||(left: FullMatcherFunc, right: FullMatcherFunc) -> NonNilMatcherFunc { 34 | return satisfyAnyOf(left, right) 35 | } 36 | 37 | public func ||(left: MatcherFunc, right: MatcherFunc) -> NonNilMatcherFunc { 38 | return satisfyAnyOf(left, right) 39 | } 40 | 41 | #if _runtime(_ObjC) 42 | extension NMBObjCMatcher { 43 | public class func satisfyAnyOfMatcher(matchers: [NMBObjCMatcher]) -> NMBObjCMatcher { 44 | return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in 45 | if matchers.isEmpty { 46 | failureMessage.stringValue = "satisfyAnyOf must be called with at least one matcher" 47 | return false 48 | } 49 | 50 | var elementEvaluators = [NonNilMatcherFunc]() 51 | for matcher in matchers { 52 | let elementEvaluator: (Expression, FailureMessage) -> Bool = { 53 | expression, failureMessage in 54 | return matcher.matches( 55 | {try! expression.evaluate()}, failureMessage: failureMessage, location: actualExpression.location) 56 | } 57 | 58 | elementEvaluators.append(NonNilMatcherFunc(elementEvaluator)) 59 | } 60 | 61 | return try! satisfyAnyOf(elementEvaluators).matches(actualExpression, failureMessage: failureMessage) 62 | } 63 | } 64 | } 65 | #endif 66 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Nimble.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NMBExceptionCapture.h" 3 | #import "DSL.h" 4 | 5 | FOUNDATION_EXPORT double NimbleVersionNumber; 6 | FOUNDATION_EXPORT const unsigned char NimbleVersionString[]; -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Utils/ExceptionCapture.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | #if !_runtime(_ObjC) 4 | // swift-corelibs-foundation doesn't provide NSException at all, so provide a dummy 5 | class NSException {} 6 | #endif 7 | 8 | // NOTE: This file is not intended to be included in the Xcode project. It 9 | // is picked up by the Swift Package Manager during its build process. 10 | 11 | /// A dummy reimplementation of the `NMBExceptionCapture` class to serve 12 | /// as a stand-in for build and runtime environments that don't support 13 | /// Objective C. 14 | internal class ExceptionCapture { 15 | let finally: (() -> Void)? 16 | 17 | init(handler: ((NSException!) -> Void)?, finally: (() -> Void)?) { 18 | self.finally = finally 19 | } 20 | 21 | func tryBlock(unsafeBlock: (() -> Void)) { 22 | // We have no way of handling Objective C exceptions in Swift, 23 | // so we just go ahead and run the unsafeBlock as-is 24 | unsafeBlock() 25 | 26 | finally?() 27 | } 28 | } 29 | 30 | /// Compatibility with the actual Objective-C implementation 31 | typealias NMBExceptionCapture = ExceptionCapture 32 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Utils/Functional.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | extension SequenceType { 4 | internal func all(fn: Generator.Element -> Bool) -> Bool { 5 | for item in self { 6 | if !fn(item) { 7 | return false 8 | } 9 | } 10 | return true 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Utils/SourceLocation.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | // Ideally we would always use `StaticString` as the type for tracking the file name 4 | // that expectations originate from, for consistency with `assert` etc. from the 5 | // stdlib, and because recent versions of the XCTest overlay require `StaticString` 6 | // when calling `XCTFail`. Under the Objective-C runtime (i.e. building on Mac), we 7 | // have to use `String` instead because StaticString can't be generated from Objective-C 8 | #if _runtime(_ObjC) 9 | public typealias FileString = String 10 | #else 11 | public typealias FileString = StaticString 12 | #endif 13 | 14 | public final class SourceLocation : NSObject { 15 | public let file: FileString 16 | public let line: UInt 17 | 18 | override init() { 19 | file = "Unknown File" 20 | line = 0 21 | } 22 | 23 | init(file: FileString, line: UInt) { 24 | self.file = file 25 | self.line = line 26 | } 27 | 28 | override public var description: String { 29 | return "\(file):\(line)" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Utils/Stringers.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | 4 | internal func identityAsString(value: AnyObject?) -> String { 5 | if let value = value { 6 | return NSString(format: "<%p>", unsafeBitCast(value, Int.self)).description 7 | } else { 8 | return "nil" 9 | } 10 | } 11 | 12 | internal func classAsString(cls: AnyClass) -> String { 13 | #if _runtime(_ObjC) 14 | return NSStringFromClass(cls) 15 | #else 16 | return String(cls) 17 | #endif 18 | } 19 | 20 | internal func arrayAsString(items: [T], joiner: String = ", ") -> String { 21 | return items.reduce("") { accum, item in 22 | let prefix = (accum.isEmpty ? "" : joiner) 23 | return accum + prefix + "\(stringify(item))" 24 | } 25 | } 26 | 27 | #if _runtime(_ObjC) 28 | @objc internal protocol NMBStringer { 29 | func NMB_stringify() -> String 30 | } 31 | 32 | extension NSArray : NMBStringer { 33 | func NMB_stringify() -> String { 34 | let str = self.componentsJoinedByString(", ") 35 | return "[\(str)]" 36 | } 37 | } 38 | #endif 39 | 40 | internal func stringify(value: S) -> String { 41 | var generator = value.generate() 42 | var strings = [String]() 43 | var value: S.Generator.Element? 44 | repeat { 45 | value = generator.next() 46 | if value != nil { 47 | strings.append(stringify(value)) 48 | } 49 | } while value != nil 50 | let str = strings.joinWithSeparator(", ") 51 | return "[\(str)]" 52 | } 53 | 54 | internal func stringify(value: T) -> String { 55 | if let value = value as? Double { 56 | return NSString(format: "%.4f", (value)).description 57 | } else if let value = value as? NSData { 58 | #if os(Linux) 59 | // FIXME: Swift on Linux triggers a segfault when calling NSData's hash() (last checked on 03-11) 60 | return "NSData" 61 | #else 62 | return "NSData" 63 | #endif 64 | } 65 | return String(value) 66 | } 67 | 68 | internal func stringify(value: NMBDoubleConvertible) -> String { 69 | if let value = value as? Double { 70 | return NSString(format: "%.4f", (value)).description 71 | } 72 | return value.stringRepresentation 73 | } 74 | 75 | internal func stringify(value: T?) -> String { 76 | if let unboxed = value { 77 | return stringify(unboxed) 78 | } 79 | return "nil" 80 | } 81 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Wrappers/ObjCMatcher.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | #if _runtime(_ObjC) 4 | 5 | public typealias MatcherBlock = (actualExpression: Expression, failureMessage: FailureMessage) -> Bool 6 | public typealias FullMatcherBlock = (actualExpression: Expression, failureMessage: FailureMessage, shouldNotMatch: Bool) -> Bool 7 | 8 | public class NMBObjCMatcher : NSObject, NMBMatcher { 9 | let _match: MatcherBlock 10 | let _doesNotMatch: MatcherBlock 11 | let canMatchNil: Bool 12 | 13 | public init(canMatchNil: Bool, matcher: MatcherBlock, notMatcher: MatcherBlock) { 14 | self.canMatchNil = canMatchNil 15 | self._match = matcher 16 | self._doesNotMatch = notMatcher 17 | } 18 | 19 | public convenience init(matcher: MatcherBlock) { 20 | self.init(canMatchNil: true, matcher: matcher) 21 | } 22 | 23 | public convenience init(canMatchNil: Bool, matcher: MatcherBlock) { 24 | self.init(canMatchNil: canMatchNil, matcher: matcher, notMatcher: ({ actualExpression, failureMessage in 25 | return !matcher(actualExpression: actualExpression, failureMessage: failureMessage) 26 | })) 27 | } 28 | 29 | public convenience init(matcher: FullMatcherBlock) { 30 | self.init(canMatchNil: true, matcher: matcher) 31 | } 32 | 33 | public convenience init(canMatchNil: Bool, matcher: FullMatcherBlock) { 34 | self.init(canMatchNil: canMatchNil, matcher: ({ actualExpression, failureMessage in 35 | return matcher(actualExpression: actualExpression, failureMessage: failureMessage, shouldNotMatch: false) 36 | }), notMatcher: ({ actualExpression, failureMessage in 37 | return matcher(actualExpression: actualExpression, failureMessage: failureMessage, shouldNotMatch: true) 38 | })) 39 | } 40 | 41 | private func canMatch(actualExpression: Expression, failureMessage: FailureMessage) -> Bool { 42 | do { 43 | if !canMatchNil { 44 | if try actualExpression.evaluate() == nil { 45 | failureMessage.postfixActual = " (use beNil() to match nils)" 46 | return false 47 | } 48 | } 49 | } catch let error { 50 | failureMessage.actualValue = "an unexpected error thrown: \(error)" 51 | return false 52 | } 53 | return true 54 | } 55 | 56 | public func matches(actualBlock: () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { 57 | let expr = Expression(expression: actualBlock, location: location) 58 | let result = _match( 59 | actualExpression: expr, 60 | failureMessage: failureMessage) 61 | if self.canMatch(Expression(expression: actualBlock, location: location), failureMessage: failureMessage) { 62 | return result 63 | } else { 64 | return false 65 | } 66 | } 67 | 68 | public func doesNotMatch(actualBlock: () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { 69 | let expr = Expression(expression: actualBlock, location: location) 70 | let result = _doesNotMatch( 71 | actualExpression: expr, 72 | failureMessage: failureMessage) 73 | if self.canMatch(Expression(expression: actualBlock, location: location), failureMessage: failureMessage) { 74 | return result 75 | } else { 76 | return false 77 | } 78 | } 79 | } 80 | 81 | #endif 82 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/objc/CurrentTestCaseTracker.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | SWIFT_CLASS("_TtC6Nimble22CurrentTestCaseTracker") 5 | @interface CurrentTestCaseTracker : NSObject 6 | + (CurrentTestCaseTracker *)sharedInstance; 7 | @end 8 | 9 | @interface CurrentTestCaseTracker (Register) @end 10 | 11 | @implementation CurrentTestCaseTracker (Register) 12 | 13 | + (void)load { 14 | CurrentTestCaseTracker *tracker = [CurrentTestCaseTracker sharedInstance]; 15 | [[XCTestObservationCenter sharedTestObservationCenter] addTestObserver:tracker]; 16 | } 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/objc/NMBExceptionCapture.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface NMBExceptionCapture : NSObject 5 | 6 | - (id)initWithHandler:(void(^)(NSException *))handler finally:(void(^)())finally; 7 | - (void)tryBlock:(void(^)())unsafeBlock; 8 | 9 | @end 10 | 11 | typedef void(^NMBSourceCallbackBlock)(BOOL successful); 12 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/objc/NMBExceptionCapture.m: -------------------------------------------------------------------------------- 1 | #import "NMBExceptionCapture.h" 2 | 3 | @interface NMBExceptionCapture () 4 | @property (nonatomic, copy) void(^handler)(NSException *exception); 5 | @property (nonatomic, copy) void(^finally)(); 6 | @end 7 | 8 | @implementation NMBExceptionCapture 9 | 10 | - (id)initWithHandler:(void(^)(NSException *))handler finally:(void(^)())finally { 11 | self = [super init]; 12 | if (self) { 13 | self.handler = handler; 14 | self.finally = finally; 15 | } 16 | return self; 17 | } 18 | 19 | - (void)tryBlock:(void(^)())unsafeBlock { 20 | @try { 21 | unsafeBlock(); 22 | } 23 | @catch (NSException *exception) { 24 | if (self.handler) { 25 | self.handler(exception); 26 | } 27 | } 28 | @finally { 29 | if (self.finally) { 30 | self.finally(); 31 | } 32 | } 33 | } 34 | 35 | @end -------------------------------------------------------------------------------- /Example/Pods/Quick/README.md: -------------------------------------------------------------------------------- 1 | ![](http://f.cl.ly/items/0r1E192C1R0b2g2Q3h2w/QuickLogo_Color.png) 2 | 3 | Quick is a behavior-driven development framework for Swift and Objective-C. 4 | Inspired by [RSpec](https://github.com/rspec/rspec), [Specta](https://github.com/specta/specta), and [Ginkgo](https://github.com/onsi/ginkgo). 5 | 6 | ![](https://raw.githubusercontent.com/Quick/Assets/master/Screenshots/QuickSpec%20screenshot.png) 7 | 8 | ```swift 9 | // Swift 10 | 11 | import Quick 12 | import Nimble 13 | 14 | class TableOfContentsSpec: QuickSpec { 15 | override func spec() { 16 | describe("the 'Documentation' directory") { 17 | it("has everything you need to get started") { 18 | let sections = Directory("Documentation").sections 19 | expect(sections).to(contain("Organized Tests with Quick Examples and Example Groups")) 20 | expect(sections).to(contain("Installing Quick")) 21 | } 22 | 23 | context("if it doesn't have what you're looking for") { 24 | it("needs to be updated") { 25 | let you = You(awesome: true) 26 | expect{you.submittedAnIssue}.toEventually(beTruthy()) 27 | } 28 | } 29 | } 30 | } 31 | } 32 | ``` 33 | #### Nimble 34 | Quick comes together with [Nimble](https://github.com/Quick/Nimble) — a matcher framework for your tests. You can learn why `XCTAssert()` statements make your expectations unclear and how to fix that using Nimble assertions [here](./Documentation/en-us/NimbleAssertions.md). 35 | 36 | ## Documentation 37 | 38 | All documentation can be found in the [Documentation folder](./Documentation), including [detailed installation instructions](./Documentation/en-us/InstallingQuick.md) for CocoaPods, Carthage, Git submodules, and more. For example, you can install Quick and [Nimble](https://github.com/Quick/Nimble) using CocoaPods by adding the following to your Podfile: 39 | 40 | ```rb 41 | # Podfile 42 | 43 | use_frameworks! 44 | 45 | def testing_pods 46 | pod 'Quick' 47 | pod 'Nimble' 48 | end 49 | 50 | target 'MyTests' do 51 | testing_pods 52 | end 53 | 54 | target 'MyUITests' do 55 | testing_pods 56 | end 57 | ``` 58 | 59 | ## License 60 | 61 | Apache 2.0 license. See the `LICENSE` file for details. 62 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/Callsite.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /** 4 | An object encapsulating the file and line number at which 5 | a particular example is defined. 6 | */ 7 | final public class Callsite: NSObject { 8 | /** 9 | The absolute path of the file in which an example is defined. 10 | */ 11 | public let file: String 12 | 13 | /** 14 | The line number on which an example is defined. 15 | */ 16 | public let line: UInt 17 | 18 | internal init(file: String, line: UInt) { 19 | self.file = file 20 | self.line = line 21 | } 22 | } 23 | 24 | /** 25 | Returns a boolean indicating whether two Callsite objects are equal. 26 | If two callsites are in the same file and on the same line, they must be equal. 27 | */ 28 | public func ==(lhs: Callsite, rhs: Callsite) -> Bool { 29 | return lhs.file == rhs.file && lhs.line == rhs.line 30 | } 31 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/Configuration/QuickConfiguration.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class Configuration; 4 | 5 | /** 6 | Subclass QuickConfiguration and override the +[QuickConfiguration configure:] 7 | method in order to configure how Quick behaves when running specs, or to define 8 | shared examples that are used across spec files. 9 | */ 10 | @interface QuickConfiguration : NSObject 11 | 12 | /** 13 | This method is executed on each subclass of this class before Quick runs 14 | any examples. You may override this method on as many subclasses as you like, but 15 | there is no guarantee as to the order in which these methods are executed. 16 | 17 | You can override this method in order to: 18 | 19 | 1. Configure how Quick behaves, by modifying properties on the Configuration object. 20 | Setting the same properties in several methods has undefined behavior. 21 | 22 | 2. Define shared examples using `sharedExamples`. 23 | 24 | @param configuration A mutable object that is used to configure how Quick behaves on 25 | a framework level. For details on all the options, see the 26 | documentation in Configuration.swift. 27 | */ 28 | + (void)configure:(Configuration *)configuration; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/Configuration/QuickConfiguration.m: -------------------------------------------------------------------------------- 1 | #import "QuickConfiguration.h" 2 | #import "World.h" 3 | #import 4 | 5 | typedef void (^QCKClassEnumerationBlock)(Class klass); 6 | 7 | /** 8 | Finds all direct subclasses of the given class and passes them to the block provided. 9 | The classes are iterated over in the order that objc_getClassList returns them. 10 | 11 | @param klass The base class to find subclasses of. 12 | @param block A block that takes a Class. This block will be executed once for each subclass of klass. 13 | */ 14 | void qck_enumerateSubclasses(Class klass, QCKClassEnumerationBlock block) { 15 | Class *classes = NULL; 16 | int classesCount = objc_getClassList(NULL, 0); 17 | 18 | if (classesCount > 0) { 19 | classes = (Class *)calloc(sizeof(Class), classesCount); 20 | classesCount = objc_getClassList(classes, classesCount); 21 | 22 | Class subclass, superclass; 23 | for(int i = 0; i < classesCount; i++) { 24 | subclass = classes[i]; 25 | superclass = class_getSuperclass(subclass); 26 | if (superclass == klass && block) { 27 | block(subclass); 28 | } 29 | } 30 | 31 | free(classes); 32 | } 33 | } 34 | 35 | @implementation QuickConfiguration 36 | 37 | #pragma mark - Object Lifecycle 38 | 39 | /** 40 | QuickConfiguration is not meant to be instantiated; it merely provides a hook 41 | for users to configure how Quick behaves. Raise an exception if an instance of 42 | QuickConfiguration is created. 43 | */ 44 | - (instancetype)init { 45 | NSString *className = NSStringFromClass([self class]); 46 | NSString *selectorName = NSStringFromSelector(@selector(configure:)); 47 | [NSException raise:NSInternalInconsistencyException 48 | format:@"%@ is not meant to be instantiated; " 49 | @"subclass %@ and override %@ to configure Quick.", 50 | className, className, selectorName]; 51 | return nil; 52 | } 53 | 54 | #pragma mark - NSObject Overrides 55 | 56 | /** 57 | Hook into when QuickConfiguration is initialized in the runtime in order to 58 | call +[QuickConfiguration configure:] on each of its subclasses. 59 | */ 60 | + (void)initialize { 61 | // Only enumerate over the subclasses of QuickConfiguration, not any of its subclasses. 62 | if ([self class] == [QuickConfiguration class]) { 63 | 64 | // Only enumerate over subclasses once, even if +[QuickConfiguration initialize] 65 | // were to be called several times. This is necessary because +[QuickSpec initialize] 66 | // manually calls +[QuickConfiguration initialize]. 67 | static dispatch_once_t onceToken; 68 | dispatch_once(&onceToken, ^{ 69 | qck_enumerateSubclasses([QuickConfiguration class], ^(__unsafe_unretained Class klass) { 70 | [[World sharedWorld] configure:^(Configuration *configuration) { 71 | [klass configure:configuration]; 72 | }]; 73 | }); 74 | [[World sharedWorld] finalizeConfiguration]; 75 | }); 76 | } 77 | } 78 | 79 | #pragma mark - Public Interface 80 | 81 | + (void)configure:(Configuration *)configuration { } 82 | 83 | @end 84 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/DSL/QCKDSL.m: -------------------------------------------------------------------------------- 1 | #import "QCKDSL.h" 2 | #import "World.h" 3 | #import "World+DSL.h" 4 | 5 | void qck_beforeSuite(QCKDSLEmptyBlock closure) { 6 | [[World sharedWorld] beforeSuite:closure]; 7 | } 8 | 9 | void qck_afterSuite(QCKDSLEmptyBlock closure) { 10 | [[World sharedWorld] afterSuite:closure]; 11 | } 12 | 13 | void qck_sharedExamples(NSString *name, QCKDSLSharedExampleBlock closure) { 14 | [[World sharedWorld] sharedExamples:name closure:closure]; 15 | } 16 | 17 | void qck_describe(NSString *description, QCKDSLEmptyBlock closure) { 18 | [[World sharedWorld] describe:description flags:@{} closure:closure]; 19 | } 20 | 21 | void qck_context(NSString *description, QCKDSLEmptyBlock closure) { 22 | qck_describe(description, closure); 23 | } 24 | 25 | void qck_beforeEach(QCKDSLEmptyBlock closure) { 26 | [[World sharedWorld] beforeEach:closure]; 27 | } 28 | 29 | void qck_beforeEachWithMetadata(QCKDSLExampleMetadataBlock closure) { 30 | [[World sharedWorld] beforeEachWithMetadata:closure]; 31 | } 32 | 33 | void qck_afterEach(QCKDSLEmptyBlock closure) { 34 | [[World sharedWorld] afterEach:closure]; 35 | } 36 | 37 | void qck_afterEachWithMetadata(QCKDSLExampleMetadataBlock closure) { 38 | [[World sharedWorld] afterEachWithMetadata:closure]; 39 | } 40 | 41 | QCKItBlock qck_it_builder(NSDictionary *flags, NSString *file, NSUInteger line) { 42 | return ^(NSString *description, QCKDSLEmptyBlock closure) { 43 | [[World sharedWorld] itWithDescription:description 44 | flags:flags 45 | file:file 46 | line:line 47 | closure:closure]; 48 | }; 49 | } 50 | 51 | QCKItBehavesLikeBlock qck_itBehavesLike_builder(NSDictionary *flags, NSString *file, NSUInteger line) { 52 | return ^(NSString *name, QCKDSLSharedExampleContext context) { 53 | [[World sharedWorld] itBehavesLikeSharedExampleNamed:name 54 | sharedExampleContext:context 55 | flags:flags 56 | file:file 57 | line:line]; 58 | }; 59 | } 60 | 61 | void qck_pending(NSString *description, QCKDSLEmptyBlock closure) { 62 | [[World sharedWorld] pending:description closure:closure]; 63 | } 64 | 65 | void qck_xdescribe(NSString *description, QCKDSLEmptyBlock closure) { 66 | [[World sharedWorld] xdescribe:description flags:@{} closure:closure]; 67 | } 68 | 69 | void qck_xcontext(NSString *description, QCKDSLEmptyBlock closure) { 70 | qck_xdescribe(description, closure); 71 | } 72 | 73 | void qck_fdescribe(NSString *description, QCKDSLEmptyBlock closure) { 74 | [[World sharedWorld] fdescribe:description flags:@{} closure:closure]; 75 | } 76 | 77 | void qck_fcontext(NSString *description, QCKDSLEmptyBlock closure) { 78 | qck_fdescribe(description, closure); 79 | } 80 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/DSL/World+DSL.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface World (SWIFT_EXTENSION(Quick)) 4 | - (void)beforeSuite:(void (^ __nonnull)(void))closure; 5 | - (void)afterSuite:(void (^ __nonnull)(void))closure; 6 | - (void)sharedExamples:(NSString * __nonnull)name closure:(void (^ __nonnull)(NSDictionary * __nonnull (^ __nonnull)(void)))closure; 7 | - (void)describe:(NSString * __nonnull)description flags:(NSDictionary * __nonnull)flags closure:(void (^ __nonnull)(void))closure; 8 | - (void)context:(NSString * __nonnull)description flags:(NSDictionary * __nonnull)flags closure:(void (^ __nonnull)(void))closure; 9 | - (void)fdescribe:(NSString * __nonnull)description flags:(NSDictionary * __nonnull)flags closure:(void (^ __nonnull)(void))closure; 10 | - (void)xdescribe:(NSString * __nonnull)description flags:(NSDictionary * __nonnull)flags closure:(void (^ __nonnull)(void))closure; 11 | - (void)beforeEach:(void (^ __nonnull)(void))closure; 12 | - (void)beforeEachWithMetadata:(void (^ __nonnull)(ExampleMetadata * __nonnull))closure; 13 | - (void)afterEach:(void (^ __nonnull)(void))closure; 14 | - (void)afterEachWithMetadata:(void (^ __nonnull)(ExampleMetadata * __nonnull))closure; 15 | - (void)itWithDescription:(NSString * __nonnull)description flags:(NSDictionary * __nonnull)flags file:(NSString * __nonnull)file line:(NSUInteger)line closure:(void (^ __nonnull)(void))closure; 16 | - (void)fitWithDescription:(NSString * __nonnull)description flags:(NSDictionary * __nonnull)flags file:(NSString * __nonnull)file line:(NSUInteger)line closure:(void (^ __nonnull)(void))closure; 17 | - (void)xitWithDescription:(NSString * __nonnull)description flags:(NSDictionary * __nonnull)flags file:(NSString * __nonnull)file line:(NSUInteger)line closure:(void (^ __nonnull)(void))closure; 18 | - (void)itBehavesLikeSharedExampleNamed:(NSString * __nonnull)name sharedExampleContext:(NSDictionary * __nonnull (^ __nonnull)(void))sharedExampleContext flags:(NSDictionary * __nonnull)flags file:(NSString * __nonnull)file line:(NSUInteger)line; 19 | - (void)pending:(NSString * __nonnull)description closure:(void (^ __nonnull)(void))closure; 20 | @end 21 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/ErrorUtility.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | @noreturn internal func raiseError(message: String) { 4 | #if _runtime(_ObjC) 5 | NSException(name: NSInternalInconsistencyException, reason: message, userInfo: nil).raise() 6 | #endif 7 | 8 | // This won't be reached when ObjC is available and the exception above is raisd 9 | fatalError(message) 10 | } 11 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/ExampleGroup.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /** 4 | Example groups are logical groupings of examples, defined with 5 | the `describe` and `context` functions. Example groups can share 6 | setup and teardown code. 7 | */ 8 | final public class ExampleGroup: NSObject { 9 | weak internal var parent: ExampleGroup? 10 | internal let hooks = ExampleHooks() 11 | 12 | internal var phase: HooksPhase = .NothingExecuted 13 | 14 | private let internalDescription: String 15 | private let flags: FilterFlags 16 | private let isInternalRootExampleGroup: Bool 17 | private var childGroups = [ExampleGroup]() 18 | private var childExamples = [Example]() 19 | 20 | internal init(description: String, flags: FilterFlags, isInternalRootExampleGroup: Bool = false) { 21 | self.internalDescription = description 22 | self.flags = flags 23 | self.isInternalRootExampleGroup = isInternalRootExampleGroup 24 | } 25 | 26 | public override var description: String { 27 | return internalDescription 28 | } 29 | 30 | /** 31 | Returns a list of examples that belong to this example group, 32 | or to any of its descendant example groups. 33 | */ 34 | public var examples: [Example] { 35 | var examples = childExamples 36 | for group in childGroups { 37 | examples.appendContentsOf(group.examples) 38 | } 39 | return examples 40 | } 41 | 42 | internal var name: String? { 43 | if let parent = parent { 44 | switch(parent.name) { 45 | case .Some(let name): return "\(name), \(description)" 46 | case .None: return description 47 | } 48 | } else { 49 | return isInternalRootExampleGroup ? nil : description 50 | } 51 | } 52 | 53 | internal var filterFlags: FilterFlags { 54 | var aggregateFlags = flags 55 | walkUp() { (group: ExampleGroup) -> () in 56 | for (key, value) in group.flags { 57 | aggregateFlags[key] = value 58 | } 59 | } 60 | return aggregateFlags 61 | } 62 | 63 | internal var befores: [BeforeExampleWithMetadataClosure] { 64 | var closures = Array(hooks.befores.reverse()) 65 | walkUp() { (group: ExampleGroup) -> () in 66 | closures.appendContentsOf(Array(group.hooks.befores.reverse())) 67 | } 68 | return Array(closures.reverse()) 69 | } 70 | 71 | internal var afters: [AfterExampleWithMetadataClosure] { 72 | var closures = hooks.afters 73 | walkUp() { (group: ExampleGroup) -> () in 74 | closures.appendContentsOf(group.hooks.afters) 75 | } 76 | return closures 77 | } 78 | 79 | internal func walkDownExamples(callback: (example: Example) -> ()) { 80 | for example in childExamples { 81 | callback(example: example) 82 | } 83 | for group in childGroups { 84 | group.walkDownExamples(callback) 85 | } 86 | } 87 | 88 | internal func appendExampleGroup(group: ExampleGroup) { 89 | group.parent = self 90 | childGroups.append(group) 91 | } 92 | 93 | internal func appendExample(example: Example) { 94 | example.group = self 95 | childExamples.append(example) 96 | } 97 | 98 | private func walkUp(callback: (group: ExampleGroup) -> ()) { 99 | var group = self 100 | while let parent = group.parent { 101 | callback(group: parent) 102 | group = parent 103 | } 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/ExampleMetadata.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /** 4 | A class that encapsulates information about an example, 5 | including the index at which the example was executed, as 6 | well as the example itself. 7 | */ 8 | final public class ExampleMetadata: NSObject { 9 | /** 10 | The example for which this metadata was collected. 11 | */ 12 | public let example: Example 13 | 14 | /** 15 | The index at which this example was executed in the 16 | test suite. 17 | */ 18 | public let exampleIndex: Int 19 | 20 | internal init(example: Example, exampleIndex: Int) { 21 | self.example = example 22 | self.exampleIndex = exampleIndex 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/Filter.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /** 4 | A mapping of string keys to booleans that can be used to 5 | filter examples or example groups. For example, a "focused" 6 | example would have the flags [Focused: true]. 7 | */ 8 | public typealias FilterFlags = [String: Bool] 9 | 10 | /** 11 | A namespace for filter flag keys, defined primarily to make the 12 | keys available in Objective-C. 13 | */ 14 | final public class Filter: NSObject { 15 | /** 16 | Example and example groups with [Focused: true] are included in test runs, 17 | excluding all other examples without this flag. Use this to only run one or 18 | two tests that you're currently focusing on. 19 | */ 20 | public class var focused: String { 21 | return "focused" 22 | } 23 | 24 | /** 25 | Example and example groups with [Pending: true] are excluded from test runs. 26 | Use this to temporarily suspend examples that you know do not pass yet. 27 | */ 28 | public class var pending: String { 29 | return "pending" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/Hooks/Closures.swift: -------------------------------------------------------------------------------- 1 | // MARK: Example Hooks 2 | 3 | /** 4 | A closure executed before an example is run. 5 | */ 6 | public typealias BeforeExampleClosure = () -> () 7 | 8 | /** 9 | A closure executed before an example is run. The closure is given example metadata, 10 | which contains information about the example that is about to be run. 11 | */ 12 | public typealias BeforeExampleWithMetadataClosure = (exampleMetadata: ExampleMetadata) -> () 13 | 14 | /** 15 | A closure executed after an example is run. 16 | */ 17 | public typealias AfterExampleClosure = BeforeExampleClosure 18 | 19 | /** 20 | A closure executed after an example is run. The closure is given example metadata, 21 | which contains information about the example that has just finished running. 22 | */ 23 | public typealias AfterExampleWithMetadataClosure = BeforeExampleWithMetadataClosure 24 | 25 | // MARK: Suite Hooks 26 | 27 | /** 28 | A closure executed before any examples are run. 29 | */ 30 | public typealias BeforeSuiteClosure = () -> () 31 | 32 | /** 33 | A closure executed after all examples have finished running. 34 | */ 35 | public typealias AfterSuiteClosure = BeforeSuiteClosure 36 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/Hooks/ExampleHooks.swift: -------------------------------------------------------------------------------- 1 | /** 2 | A container for closures to be executed before and after each example. 3 | */ 4 | final internal class ExampleHooks { 5 | internal var befores: [BeforeExampleWithMetadataClosure] = [] 6 | internal var afters: [AfterExampleWithMetadataClosure] = [] 7 | internal var phase: HooksPhase = .NothingExecuted 8 | 9 | internal func appendBefore(closure: BeforeExampleWithMetadataClosure) { 10 | befores.append(closure) 11 | } 12 | 13 | internal func appendBefore(closure: BeforeExampleClosure) { 14 | befores.append { (exampleMetadata: ExampleMetadata) in closure() } 15 | } 16 | 17 | internal func appendAfter(closure: AfterExampleWithMetadataClosure) { 18 | afters.append(closure) 19 | } 20 | 21 | internal func appendAfter(closure: AfterExampleClosure) { 22 | afters.append { (exampleMetadata: ExampleMetadata) in closure() } 23 | } 24 | 25 | internal func executeBefores(exampleMetadata: ExampleMetadata) { 26 | phase = .BeforesExecuting 27 | for before in befores { 28 | before(exampleMetadata: exampleMetadata) 29 | } 30 | 31 | phase = .BeforesFinished 32 | } 33 | 34 | internal func executeAfters(exampleMetadata: ExampleMetadata) { 35 | phase = .AftersExecuting 36 | for after in afters { 37 | after(exampleMetadata: exampleMetadata) 38 | } 39 | 40 | phase = .AftersFinished 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/Hooks/HooksPhase.swift: -------------------------------------------------------------------------------- 1 | /** 2 | A description of the execution cycle of the current example with 3 | respect to the hooks of that example. 4 | */ 5 | internal enum HooksPhase: Int { 6 | case NothingExecuted = 0 7 | case BeforesExecuting 8 | case BeforesFinished 9 | case AftersExecuting 10 | case AftersFinished 11 | } 12 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/Hooks/SuiteHooks.swift: -------------------------------------------------------------------------------- 1 | /** 2 | A container for closures to be executed before and after all examples. 3 | */ 4 | final internal class SuiteHooks { 5 | internal var befores: [BeforeSuiteClosure] = [] 6 | internal var afters: [AfterSuiteClosure] = [] 7 | internal var phase: HooksPhase = .NothingExecuted 8 | 9 | internal func appendBefore(closure: BeforeSuiteClosure) { 10 | befores.append(closure) 11 | } 12 | 13 | internal func appendAfter(closure: AfterSuiteClosure) { 14 | afters.append(closure) 15 | } 16 | 17 | internal func executeBefores() { 18 | phase = .BeforesExecuting 19 | for before in befores { 20 | before() 21 | } 22 | phase = .BeforesFinished 23 | } 24 | 25 | internal func executeAfters() { 26 | phase = .AftersExecuting 27 | for after in afters { 28 | after() 29 | } 30 | phase = .AftersFinished 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/NSBundle+CurrentTestBundle.swift: -------------------------------------------------------------------------------- 1 | #if os(OSX) || os(iOS) || os(watchOS) || os(tvOS) 2 | 3 | import Foundation 4 | 5 | extension NSBundle { 6 | 7 | /** 8 | Locates the first bundle with a '.xctest' file extension. 9 | */ 10 | internal static var currentTestBundle: NSBundle? { 11 | return allBundles().lazy 12 | .filter { 13 | $0.bundlePath.hasSuffix(".xctest") 14 | } 15 | .first 16 | } 17 | 18 | } 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/NSString+QCKSelectorName.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | /** 4 | QuickSpec converts example names into test methods. 5 | Those test methods need valid selector names, which means no whitespace, 6 | control characters, etc. This category gives NSString objects an easy way 7 | to replace those illegal characters with underscores. 8 | */ 9 | @interface NSString (QCKSelectorName) 10 | 11 | /** 12 | Returns a string with underscores in place of all characters that cannot 13 | be included in a selector (SEL) name. 14 | */ 15 | @property (nonatomic, readonly) NSString *qck_selectorName; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/NSString+QCKSelectorName.m: -------------------------------------------------------------------------------- 1 | #import "NSString+QCKSelectorName.h" 2 | 3 | @implementation NSString (QCKSelectorName) 4 | 5 | - (NSString *)qck_selectorName { 6 | static NSMutableCharacterSet *invalidCharacters = nil; 7 | static dispatch_once_t onceToken; 8 | dispatch_once(&onceToken, ^{ 9 | invalidCharacters = [NSMutableCharacterSet new]; 10 | 11 | NSCharacterSet *whitespaceCharacterSet = [NSCharacterSet whitespaceCharacterSet]; 12 | NSCharacterSet *newlineCharacterSet = [NSCharacterSet newlineCharacterSet]; 13 | NSCharacterSet *illegalCharacterSet = [NSCharacterSet illegalCharacterSet]; 14 | NSCharacterSet *controlCharacterSet = [NSCharacterSet controlCharacterSet]; 15 | NSCharacterSet *punctuationCharacterSet = [NSCharacterSet punctuationCharacterSet]; 16 | NSCharacterSet *nonBaseCharacterSet = [NSCharacterSet nonBaseCharacterSet]; 17 | NSCharacterSet *symbolCharacterSet = [NSCharacterSet symbolCharacterSet]; 18 | 19 | [invalidCharacters formUnionWithCharacterSet:whitespaceCharacterSet]; 20 | [invalidCharacters formUnionWithCharacterSet:newlineCharacterSet]; 21 | [invalidCharacters formUnionWithCharacterSet:illegalCharacterSet]; 22 | [invalidCharacters formUnionWithCharacterSet:controlCharacterSet]; 23 | [invalidCharacters formUnionWithCharacterSet:punctuationCharacterSet]; 24 | [invalidCharacters formUnionWithCharacterSet:nonBaseCharacterSet]; 25 | [invalidCharacters formUnionWithCharacterSet:symbolCharacterSet]; 26 | }); 27 | 28 | NSArray *validComponents = [self componentsSeparatedByCharactersInSet:invalidCharacters]; 29 | 30 | NSString *result = [validComponents componentsJoinedByString:@"_"]; 31 | 32 | return ([result length] == 0 33 | ? @"_" 34 | : result); 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/Quick.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | //! Project version number for Quick. 4 | FOUNDATION_EXPORT double QuickVersionNumber; 5 | 6 | //! Project version string for Quick. 7 | FOUNDATION_EXPORT const unsigned char QuickVersionString[]; 8 | 9 | #import "QuickSpec.h" 10 | #import "QCKDSL.h" 11 | #import "QuickConfiguration.h" 12 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/QuickSelectedTestSuiteBuilder.swift: -------------------------------------------------------------------------------- 1 | #if os(OSX) || os(iOS) || os(watchOS) || os(tvOS) 2 | 3 | /** 4 | Responsible for building a "Selected tests" suite. This corresponds to a single 5 | spec, and all its examples. 6 | */ 7 | internal class QuickSelectedTestSuiteBuilder: QuickTestSuiteBuilder { 8 | 9 | /** 10 | The test spec class to run. 11 | */ 12 | let testCaseClass: AnyClass! 13 | 14 | /** 15 | For Objective-C classes, returns the class name. For Swift classes without, 16 | an explicit Objective-C name, returns a module-namespaced class name 17 | (e.g., "FooTests.FooSpec"). 18 | */ 19 | var testSuiteClassName: String { 20 | return NSStringFromClass(testCaseClass) 21 | } 22 | 23 | /** 24 | Given a test case name: 25 | 26 | FooSpec/testFoo 27 | 28 | Optionally constructs a test suite builder for the named test case class 29 | in the running test bundle. 30 | 31 | If no test bundle can be found, or the test case class can't be found, 32 | initialization fails and returns `nil`. 33 | */ 34 | init?(forTestCaseWithName name: String) { 35 | guard let testCaseClass = testCaseClassForTestCaseWithName(name) else { 36 | self.testCaseClass = nil 37 | return nil 38 | } 39 | 40 | self.testCaseClass = testCaseClass 41 | } 42 | 43 | /** 44 | Returns a `QuickTestSuite` that runs the associated test case class. 45 | */ 46 | func buildTestSuite() -> QuickTestSuite { 47 | return QuickTestSuite(forTestCaseClass: testCaseClass) 48 | } 49 | 50 | } 51 | 52 | /** 53 | Searches `NSBundle.allBundles()` for an xctest bundle, then looks up the named 54 | test case class in that bundle. 55 | 56 | Returns `nil` if a bundle or test case class cannot be found. 57 | */ 58 | private func testCaseClassForTestCaseWithName(name: String) -> AnyClass? { 59 | func extractClassName(name: String) -> String? { 60 | return name.characters.split("/").first.map(String.init) 61 | } 62 | 63 | guard let className = extractClassName(name) else { return nil } 64 | guard let bundle = NSBundle.currentTestBundle else { return nil } 65 | 66 | if let testCaseClass = bundle.classNamed(className) { return testCaseClass } 67 | 68 | guard let moduleName = bundle.bundlePath.fileName else { return nil } 69 | 70 | return NSClassFromString("\(moduleName).\(className)") 71 | } 72 | 73 | #endif 74 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/QuickSpec.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | /** 4 | QuickSpec is a base class all specs written in Quick inherit from. 5 | They need to inherit from QuickSpec, a subclass of XCTestCase, in 6 | order to be discovered by the XCTest framework. 7 | 8 | XCTest automatically compiles a list of XCTestCase subclasses included 9 | in the test target. It iterates over each class in that list, and creates 10 | a new instance of that class for each test method. It then creates an 11 | "invocation" to execute that test method. The invocation is an instance of 12 | NSInvocation, which represents a single message send in Objective-C. 13 | The invocation is set on the XCTestCase instance, and the test is run. 14 | 15 | Most of the code in QuickSpec is dedicated to hooking into XCTest events. 16 | First, when the spec is first loaded and before it is sent any messages, 17 | the +[NSObject initialize] method is called. QuickSpec overrides this method 18 | to call +[QuickSpec spec]. This builds the example group stacks and 19 | registers them with Quick.World, a global register of examples. 20 | 21 | Then, XCTest queries QuickSpec for a list of test methods. Normally, XCTest 22 | automatically finds all methods whose selectors begin with the string "test". 23 | However, QuickSpec overrides this default behavior by implementing the 24 | +[XCTestCase testInvocations] method. This method iterates over each example 25 | registered in Quick.World, defines a new method for that example, and 26 | returns an invocation to call that method to XCTest. Those invocations are 27 | the tests that are run by XCTest. Their selector names are displayed in 28 | the Xcode test navigation bar. 29 | */ 30 | @interface QuickSpec : XCTestCase 31 | 32 | /** 33 | Override this method in your spec to define a set of example groups 34 | and examples. 35 | 36 | @code 37 | override func spec() { 38 | describe("winter") { 39 | it("is coming") { 40 | // ... 41 | } 42 | } 43 | } 44 | @endcode 45 | 46 | See DSL.swift for more information on what syntax is available. 47 | */ 48 | - (void)spec; 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/QuickTestSuite.swift: -------------------------------------------------------------------------------- 1 | #if os(OSX) || os(iOS) || os(watchOS) || os(tvOS) 2 | 3 | import XCTest 4 | 5 | /** 6 | This protocol defines the role of an object that builds test suites. 7 | */ 8 | internal protocol QuickTestSuiteBuilder { 9 | 10 | /** 11 | Construct a `QuickTestSuite` instance with the appropriate test cases added as tests. 12 | 13 | Subsequent calls to this method should return equivalent test suites. 14 | */ 15 | func buildTestSuite() -> QuickTestSuite 16 | 17 | } 18 | 19 | /** 20 | A base class for a class cluster of Quick test suites, that should correctly 21 | build dynamic test suites for XCTest to execute. 22 | */ 23 | public class QuickTestSuite: XCTestSuite { 24 | 25 | private static var builtTestSuites: Set = Set() 26 | 27 | /** 28 | Construct a test suite for a specific, selected subset of test cases (rather 29 | than the default, which as all test cases). 30 | 31 | If this method is called multiple times for the same test case class, e.g.. 32 | 33 | FooSpec/testFoo 34 | FooSpec/testBar 35 | 36 | It is expected that the first call should return a valid test suite, and 37 | all subsequent calls should return `nil`. 38 | */ 39 | public static func selectedTestSuite(forTestCaseWithName name: String) -> QuickTestSuite? { 40 | guard let builder = QuickSelectedTestSuiteBuilder(forTestCaseWithName: name) else { return nil } 41 | 42 | if builtTestSuites.contains(builder.testSuiteClassName) { 43 | return nil 44 | } else { 45 | builtTestSuites.insert(builder.testSuiteClassName) 46 | return builder.buildTestSuite() 47 | } 48 | } 49 | 50 | } 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/String+FileName.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | extension String { 4 | 5 | /** 6 | If the receiver represents a path, returns its file name with a file extension. 7 | */ 8 | var fileName: String? { 9 | return NSURL(string: self)?.URLByDeletingPathExtension?.lastPathComponent 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/World.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class ExampleGroup; 4 | @class ExampleMetadata; 5 | 6 | SWIFT_CLASS("_TtC5Quick5World") 7 | @interface World 8 | 9 | @property (nonatomic) ExampleGroup * __nullable currentExampleGroup; 10 | @property (nonatomic) ExampleMetadata * __nullable currentExampleMetadata; 11 | @property (nonatomic) BOOL isRunningAdditionalSuites; 12 | + (World * __nonnull)sharedWorld; 13 | - (void)configure:(void (^ __nonnull)(Configuration * __nonnull))closure; 14 | - (void)finalizeConfiguration; 15 | - (ExampleGroup * __nonnull)rootExampleGroupForSpecClass:(Class __nonnull)cls; 16 | - (NSArray * __nonnull)examplesForSpecClass:(Class __nonnull)specClass; 17 | - (void)performWithCurrentExampleGroup:(ExampleGroup * __nonnull)group closure:(void (^ __nonnull)(void))closure; 18 | @end 19 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/XCTestSuite+QuickTestSuiteBuilder.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import 4 | 5 | @interface XCTestSuite (QuickTestSuiteBuilder) 6 | @end 7 | 8 | @implementation XCTestSuite (QuickTestSuiteBuilder) 9 | 10 | /** 11 | In order to ensure we can correctly build dynamic test suites, we need to 12 | replace some of the default test suite constructors. 13 | */ 14 | + (void)load { 15 | Method testCaseWithName = class_getClassMethod(self, @selector(testSuiteForTestCaseWithName:)); 16 | Method hooked_testCaseWithName = class_getClassMethod(self, @selector(qck_hooked_testSuiteForTestCaseWithName:)); 17 | method_exchangeImplementations(testCaseWithName, hooked_testCaseWithName); 18 | } 19 | 20 | /** 21 | The `+testSuiteForTestCaseWithName:` method is called when a specific test case 22 | class is run from the Xcode test navigator. If the built test suite is `nil`, 23 | Xcode will not run any tests for that test case. 24 | 25 | Given if the following test case class is run from the Xcode test navigator: 26 | 27 | FooSpec 28 | testFoo 29 | testBar 30 | 31 | XCTest will invoke this once per test case, with test case names following this format: 32 | 33 | FooSpec/testFoo 34 | FooSpec/testBar 35 | */ 36 | + (nullable instancetype)qck_hooked_testSuiteForTestCaseWithName:(nonnull NSString *)name { 37 | return [QuickTestSuite selectedTestSuiteForTestCaseWithName:name]; 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /Example/Pods/SCSiriWaveformView/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | The MIT License (MIT) 3 | 4 | Copyright (c) [2013] [Stefan Ceriu] 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | this software and associated documentation files (the "Software"), to deal in 8 | the Software without restriction, including without limitation the rights to 9 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | the Software, and to permit persons to whom the Software is furnished to do so, 11 | subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | 24 | -------------------------------------------------------------------------------- /Example/Pods/SCSiriWaveformView/README.md: -------------------------------------------------------------------------------- 1 | ## SCSiriWaveformView 2 | 3 | UIView subclass that reproduces the waveform effect seen in Siri on iOS 7. 4 | 5 | ##### Screenshots 6 | 7 | ![SCSiriWaveformView](https://dl.dropboxusercontent.com/u/12748201/SCSiriWaveformView/SCSiriWaveformView.gif) 8 | 9 | ### Usage 10 | 11 | Check out the demo project for details. 12 | 13 | ### Attributions 14 | A big thanks goes out to [Raffael Hannemann](https://twitter.com/raffael_me/) for his [SISinusWaveView](https://github.com/raffael/SISinusWaveView) 15 | 16 | ### License 17 | SCSiriWaveformView is released under the MIT License (MIT) (see the LICENSE file) 18 | 19 | ### Contact 20 | Any suggestions or improvements are more than welcome.
21 | Feel free to contact me at [stefan.ceriu@yahoo.com](mailto:stefan.ceriu@yahoo.com) or [@stefanceriu](https://twitter.com/stefanceriu). 22 | -------------------------------------------------------------------------------- /Example/Pods/SCSiriWaveformView/SCSiriWaveformView/SCSiriWaveformView.h: -------------------------------------------------------------------------------- 1 | // 2 | // SCSiriWaveformView.h 3 | // SCSiriWaveformView 4 | // 5 | // Created by Stefan Ceriu on 12/04/2014. 6 | // Copyright (c) 2014 Stefan Ceriu. All rights reserved. 7 | // 8 | 9 | @import UIKit; 10 | 11 | IB_DESIGNABLE 12 | @interface SCSiriWaveformView : UIView 13 | 14 | /* 15 | * Tells the waveform to redraw itself using the given level (normalized value) 16 | */ 17 | - (void)updateWithLevel:(CGFloat)level; 18 | 19 | /* 20 | * The total number of waves 21 | * Default: 5 22 | */ 23 | @property (nonatomic, assign) NSUInteger numberOfWaves; 24 | 25 | /* 26 | * Color to use when drawing the waves 27 | * Default: white 28 | */ 29 | @property (nonatomic, strong) IBInspectable UIColor *waveColor; 30 | 31 | /* 32 | * Line width used for the proeminent wave 33 | * Default: 3.0f 34 | */ 35 | @property (nonatomic, assign) IBInspectable CGFloat primaryWaveLineWidth; 36 | 37 | /* 38 | * Line width used for all secondary waves 39 | * Default: 1.0f 40 | */ 41 | @property (nonatomic, assign) IBInspectable CGFloat secondaryWaveLineWidth; 42 | 43 | /* 44 | * The amplitude that is used when the incoming amplitude is near zero. 45 | * Setting a value greater 0 provides a more vivid visualization. 46 | * Default: 0.01 47 | */ 48 | @property (nonatomic, assign) IBInspectable CGFloat idleAmplitude; 49 | 50 | /* 51 | * The frequency of the sinus wave. The higher the value, the more sinus wave peaks you will have. 52 | * Default: 1.5 53 | */ 54 | @property (nonatomic, assign) IBInspectable CGFloat frequency; 55 | 56 | /* 57 | * The current amplitude 58 | */ 59 | @property (nonatomic, assign, readonly) IBInspectable CGFloat amplitude; 60 | 61 | /* 62 | * The lines are joined stepwise, the more dense you draw, the more CPU power is used. 63 | * Default: 5 64 | */ 65 | @property (nonatomic, assign) IBInspectable CGFloat density; 66 | 67 | /* 68 | * The phase shift that will be applied with each level setting 69 | * Change this to modify the animation speed or direction 70 | * Default: -0.15 71 | */ 72 | @property (nonatomic, assign) IBInspectable CGFloat phaseShift; 73 | 74 | @end 75 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/FBSnapshotTestCase/FBSnapshotTestCase-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_FBSnapshotTestCase : NSObject 3 | @end 4 | @implementation PodsDummy_FBSnapshotTestCase 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/FBSnapshotTestCase/FBSnapshotTestCase-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/FBSnapshotTestCase/FBSnapshotTestCase-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "FBSnapshotTestCase.h" 4 | #import "FBSnapshotTestCasePlatform.h" 5 | #import "FBSnapshotTestController.h" 6 | 7 | FOUNDATION_EXPORT double FBSnapshotTestCaseVersionNumber; 8 | FOUNDATION_EXPORT const unsigned char FBSnapshotTestCaseVersionString[]; 9 | 10 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/FBSnapshotTestCase/FBSnapshotTestCase.modulemap: -------------------------------------------------------------------------------- 1 | framework module FBSnapshotTestCase { 2 | umbrella header "FBSnapshotTestCase-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/FBSnapshotTestCase/FBSnapshotTestCase.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/FBSnapshotTestCase 2 | ENABLE_BITCODE = NO 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 6 | OTHER_LDFLAGS = -framework "Foundation" -framework "QuartzCore" -framework "UIKit" -framework "XCTest" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = $BUILD_DIR 9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_ROOT = ${SRCROOT} 11 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 12 | SKIP_INSTALL = YES 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/FBSnapshotTestCase/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 2.1.2 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/FDWaveformViewForked/FDWaveformViewForked-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_FDWaveformViewForked : NSObject 3 | @end 4 | @implementation PodsDummy_FDWaveformViewForked 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/FDWaveformViewForked/FDWaveformViewForked-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/FDWaveformViewForked/FDWaveformViewForked-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "FDWaveformView.h" 4 | 5 | FOUNDATION_EXPORT double FDWaveformViewForkedVersionNumber; 6 | FOUNDATION_EXPORT const unsigned char FDWaveformViewForkedVersionString[]; 7 | 8 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/FDWaveformViewForked/FDWaveformViewForked.modulemap: -------------------------------------------------------------------------------- 1 | framework module FDWaveformViewForked { 2 | umbrella header "FDWaveformViewForked-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/FDWaveformViewForked/FDWaveformViewForked.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/FDWaveformViewForked 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 4 | OTHER_LDFLAGS = -framework "AVFoundation" -framework "CoreGraphics" -framework "MediaPlayer" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/FDWaveformViewForked/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 0.5.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Nimble-Snapshots/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 4.1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Nimble-Snapshots/Nimble-Snapshots-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Nimble_Snapshots : NSObject 3 | @end 4 | @implementation PodsDummy_Nimble_Snapshots 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Nimble-Snapshots/Nimble-Snapshots-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Nimble-Snapshots/Nimble-Snapshots-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | FOUNDATION_EXPORT double Nimble_SnapshotsVersionNumber; 5 | FOUNDATION_EXPORT const unsigned char Nimble_SnapshotsVersionString[]; 6 | 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Nimble-Snapshots/Nimble-Snapshots.modulemap: -------------------------------------------------------------------------------- 1 | framework module Nimble_Snapshots { 2 | umbrella header "Nimble-Snapshots-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Nimble-Snapshots/Nimble-Snapshots.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Nimble-Snapshots 2 | ENABLE_BITCODE = NO 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" "$PODS_CONFIGURATION_BUILD_DIR/FBSnapshotTestCase" "$PODS_CONFIGURATION_BUILD_DIR/Nimble" "$PODS_CONFIGURATION_BUILD_DIR/Quick" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 6 | OTHER_LDFLAGS = -framework "Foundation" -framework "XCTest" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = $BUILD_DIR 9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_ROOT = ${SRCROOT} 11 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 12 | SKIP_INSTALL = YES 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Nimble/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 3.2.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Nimble/Nimble-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Nimble : NSObject 3 | @end 4 | @implementation PodsDummy_Nimble 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Nimble/Nimble-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Nimble/Nimble-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "Nimble.h" 4 | #import "DSL.h" 5 | #import "NMBExceptionCapture.h" 6 | 7 | FOUNDATION_EXPORT double NimbleVersionNumber; 8 | FOUNDATION_EXPORT const unsigned char NimbleVersionString[]; 9 | 10 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Nimble/Nimble.modulemap: -------------------------------------------------------------------------------- 1 | framework module Nimble { 2 | umbrella header "Nimble-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Nimble/Nimble.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Nimble 2 | ENABLE_BITCODE = NO 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 6 | OTHER_LDFLAGS = -weak-lswiftXCTest -weak_framework "XCTest" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = $BUILD_DIR 9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_ROOT = ${SRCROOT} 11 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 12 | SKIP_INSTALL = YES 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-SwiftySoundRecorder_Example/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-SwiftySoundRecorder_Example/Pods-SwiftySoundRecorder_Example-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_SwiftySoundRecorder_Example : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_SwiftySoundRecorder_Example 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-SwiftySoundRecorder_Example/Pods-SwiftySoundRecorder_Example-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | FOUNDATION_EXPORT double Pods_SwiftySoundRecorder_ExampleVersionNumber; 5 | FOUNDATION_EXPORT const unsigned char Pods_SwiftySoundRecorder_ExampleVersionString[]; 6 | 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-SwiftySoundRecorder_Example/Pods-SwiftySoundRecorder_Example.debug.xcconfig: -------------------------------------------------------------------------------- 1 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/FDWaveformViewForked" "$PODS_CONFIGURATION_BUILD_DIR/SCSiriWaveformView" "$PODS_CONFIGURATION_BUILD_DIR/SwiftySoundRecorder" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/FDWaveformViewForked/FDWaveformViewForked.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/SCSiriWaveformView/SCSiriWaveformView.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/SwiftySoundRecorder/SwiftySoundRecorder.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "FDWaveformViewForked" -framework "SCSiriWaveformView" -framework "SwiftySoundRecorder" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = $BUILD_DIR 9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_ROOT = ${SRCROOT}/Pods 11 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-SwiftySoundRecorder_Example/Pods-SwiftySoundRecorder_Example.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_SwiftySoundRecorder_Example { 2 | umbrella header "Pods-SwiftySoundRecorder_Example-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-SwiftySoundRecorder_Example/Pods-SwiftySoundRecorder_Example.release.xcconfig: -------------------------------------------------------------------------------- 1 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/FDWaveformViewForked" "$PODS_CONFIGURATION_BUILD_DIR/SCSiriWaveformView" "$PODS_CONFIGURATION_BUILD_DIR/SwiftySoundRecorder" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/FDWaveformViewForked/FDWaveformViewForked.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/SCSiriWaveformView/SCSiriWaveformView.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/SwiftySoundRecorder/SwiftySoundRecorder.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "FDWaveformViewForked" -framework "SCSiriWaveformView" -framework "SwiftySoundRecorder" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = $BUILD_DIR 9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_ROOT = ${SRCROOT}/Pods 11 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-SwiftySoundRecorder_Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-SwiftySoundRecorder_Tests/Pods-SwiftySoundRecorder_Tests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_SwiftySoundRecorder_Tests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_SwiftySoundRecorder_Tests 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-SwiftySoundRecorder_Tests/Pods-SwiftySoundRecorder_Tests-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | FOUNDATION_EXPORT double Pods_SwiftySoundRecorder_TestsVersionNumber; 5 | FOUNDATION_EXPORT const unsigned char Pods_SwiftySoundRecorder_TestsVersionString[]; 6 | 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-SwiftySoundRecorder_Tests/Pods-SwiftySoundRecorder_Tests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) $(PLATFORM_DIR)/Developer/Library/Frameworks "$PODS_CONFIGURATION_BUILD_DIR/FBSnapshotTestCase" "$PODS_CONFIGURATION_BUILD_DIR/Nimble" "$PODS_CONFIGURATION_BUILD_DIR/Nimble-Snapshots" "$PODS_CONFIGURATION_BUILD_DIR/Quick" "$PODS_CONFIGURATION_BUILD_DIR/FDWaveformViewForked" "$PODS_CONFIGURATION_BUILD_DIR/SCSiriWaveformView" "$PODS_CONFIGURATION_BUILD_DIR/SwiftySoundRecorder" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/FBSnapshotTestCase/FBSnapshotTestCase.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Nimble-Snapshots/Nimble_Snapshots.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Nimble/Nimble.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Quick/Quick.framework/Headers" $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/FDWaveformViewForked/FDWaveformViewForked.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/SCSiriWaveformView/SCSiriWaveformView.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/SwiftySoundRecorder/SwiftySoundRecorder.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "FBSnapshotTestCase" -framework "Nimble" -framework "Nimble_Snapshots" -framework "Quick" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = $BUILD_DIR 9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_ROOT = ${SRCROOT}/Pods 11 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-SwiftySoundRecorder_Tests/Pods-SwiftySoundRecorder_Tests.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_SwiftySoundRecorder_Tests { 2 | umbrella header "Pods-SwiftySoundRecorder_Tests-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-SwiftySoundRecorder_Tests/Pods-SwiftySoundRecorder_Tests.release.xcconfig: -------------------------------------------------------------------------------- 1 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) $(PLATFORM_DIR)/Developer/Library/Frameworks "$PODS_CONFIGURATION_BUILD_DIR/FBSnapshotTestCase" "$PODS_CONFIGURATION_BUILD_DIR/Nimble" "$PODS_CONFIGURATION_BUILD_DIR/Nimble-Snapshots" "$PODS_CONFIGURATION_BUILD_DIR/Quick" "$PODS_CONFIGURATION_BUILD_DIR/FDWaveformViewForked" "$PODS_CONFIGURATION_BUILD_DIR/SCSiriWaveformView" "$PODS_CONFIGURATION_BUILD_DIR/SwiftySoundRecorder" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/FBSnapshotTestCase/FBSnapshotTestCase.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Nimble-Snapshots/Nimble_Snapshots.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Nimble/Nimble.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Quick/Quick.framework/Headers" $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/FDWaveformViewForked/FDWaveformViewForked.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/SCSiriWaveformView/SCSiriWaveformView.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/SwiftySoundRecorder/SwiftySoundRecorder.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "FBSnapshotTestCase" -framework "Nimble" -framework "Nimble_Snapshots" -framework "Quick" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = $BUILD_DIR 9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_ROOT = ${SRCROOT}/Pods 11 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Quick/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 0.9.3 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Quick/Quick-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Quick : NSObject 3 | @end 4 | @implementation PodsDummy_Quick 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Quick/Quick-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Quick/Quick-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "QuickConfiguration.h" 4 | #import "QCKDSL.h" 5 | #import "Quick.h" 6 | #import "QuickSpec.h" 7 | 8 | FOUNDATION_EXPORT double QuickVersionNumber; 9 | FOUNDATION_EXPORT const unsigned char QuickVersionString[]; 10 | 11 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Quick/Quick.modulemap: -------------------------------------------------------------------------------- 1 | framework module Quick { 2 | umbrella header "Quick-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Quick/Quick.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Quick 2 | ENABLE_BITCODE = NO 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 6 | OTHER_LDFLAGS = -framework "XCTest" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = $BUILD_DIR 9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_ROOT = ${SRCROOT} 11 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 12 | SKIP_INSTALL = YES 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SCSiriWaveformView/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.3 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SCSiriWaveformView/SCSiriWaveformView-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_SCSiriWaveformView : NSObject 3 | @end 4 | @implementation PodsDummy_SCSiriWaveformView 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SCSiriWaveformView/SCSiriWaveformView-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SCSiriWaveformView/SCSiriWaveformView-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "SCSiriWaveformView.h" 4 | 5 | FOUNDATION_EXPORT double SCSiriWaveformViewVersionNumber; 6 | FOUNDATION_EXPORT const unsigned char SCSiriWaveformViewVersionString[]; 7 | 8 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SCSiriWaveformView/SCSiriWaveformView.modulemap: -------------------------------------------------------------------------------- 1 | framework module SCSiriWaveformView { 2 | umbrella header "SCSiriWaveformView-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SCSiriWaveformView/SCSiriWaveformView.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/SCSiriWaveformView 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 4 | OTHER_LDFLAGS = -framework "AVFoundation" -framework "CoreGraphics" -framework "Foundation" -framework "QuartzCore" -framework "UIKit" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SwiftySoundRecorder/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 0.0.1 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SwiftySoundRecorder/ResourceBundle-SwiftySoundRecorder-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleIdentifier 8 | ${PRODUCT_BUNDLE_IDENTIFIER} 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundleName 12 | ${PRODUCT_NAME} 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 0.0.1 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SwiftySoundRecorder/SwiftySoundRecorder-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_SwiftySoundRecorder : NSObject 3 | @end 4 | @implementation PodsDummy_SwiftySoundRecorder 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SwiftySoundRecorder/SwiftySoundRecorder-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SwiftySoundRecorder/SwiftySoundRecorder-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | FOUNDATION_EXPORT double SwiftySoundRecorderVersionNumber; 5 | FOUNDATION_EXPORT const unsigned char SwiftySoundRecorderVersionString[]; 6 | 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SwiftySoundRecorder/SwiftySoundRecorder.modulemap: -------------------------------------------------------------------------------- 1 | framework module SwiftySoundRecorder { 2 | umbrella header "SwiftySoundRecorder-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SwiftySoundRecorder/SwiftySoundRecorder.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/SwiftySoundRecorder 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/FDWaveformViewForked" "$PODS_CONFIGURATION_BUILD_DIR/SCSiriWaveformView" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 5 | OTHER_LDFLAGS = -framework "AVFoundation" -framework "UIKit" 6 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 7 | PODS_BUILD_DIR = $BUILD_DIR 8 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 9 | PODS_ROOT = ${SRCROOT} 10 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | SKIP_INSTALL = YES 12 | -------------------------------------------------------------------------------- /Example/Source/Themes.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Foundation 3 | 4 | public protocol ThemeColor { 5 | var backgroundColor: UIColor { get } 6 | var btnTintColor: UIColor { get set } 7 | var iconBtnTintColor: UIColor { get set } 8 | var normalIconBtnTitleColor: UIColor { get set } 9 | var highlightedIconBtnTitleColor: UIColor { get set } 10 | var normalTextBtnTitleColor: UIColor { get set } 11 | var highlightedTextBtnTitleColor: UIColor { get set } 12 | var waveViewBackgroundColor: UIColor { get set } 13 | var waveNormalColor: UIColor { get set } 14 | var waveHighlightedColor: UIColor { get set } 15 | } 16 | 17 | public struct DarkTheme: ThemeColor { 18 | public var backgroundColor: UIColor = UIColor.clearColor() 19 | public var btnTintColor: UIColor = UIColor(white: 1, alpha: 0.9) // Configuration.defaultBlueTintColor 20 | public var iconBtnTintColor: UIColor = Configuration.defaultBlueTintColor 21 | public var normalIconBtnTitleColor: UIColor = UIColor(red: 255, green: 0, blue: 0, alpha: 0.9) 22 | public var highlightedIconBtnTitleColor: UIColor = UIColor.grayColor() 23 | public var normalTextBtnTitleColor: UIColor = UIColor(white: 1, alpha: 0.9) 24 | public var highlightedTextBtnTitleColor: UIColor = UIColor.grayColor() 25 | public var waveViewBackgroundColor: UIColor = UIColor.clearColor() 26 | public var waveNormalColor: UIColor = UIColor(red: 0, green: 118, blue: 255, alpha: 1) 27 | public var waveHighlightedColor: UIColor = Configuration.defaultBlueTintColor 28 | } 29 | 30 | public struct LightTheme: ThemeColor { 31 | public var backgroundColor: UIColor = UIColor.whiteColor() 32 | public var btnTintColor: UIColor = Configuration.defaultBlueTintColor 33 | public var iconBtnTintColor: UIColor = Configuration.defaultBlueTintColor 34 | public var normalIconBtnTitleColor: UIColor = UIColor(red: 255, green: 0, blue: 0, alpha: 0.9) 35 | public var highlightedIconBtnTitleColor: UIColor = UIColor.grayColor() 36 | public var normalTextBtnTitleColor: UIColor = Configuration.defaultBlueTintColor 37 | public var highlightedTextBtnTitleColor: UIColor = UIColor.grayColor() 38 | public var waveViewBackgroundColor: UIColor = UIColor.darkGrayColor() 39 | public var waveNormalColor: UIColor = UIColor(red: 0, green: 118, blue: 255, alpha: 1) 40 | public var waveHighlightedColor: UIColor = Configuration.defaultBlueTintColor 41 | } 42 | 43 | -------------------------------------------------------------------------------- /Example/SwiftySoundRecorder-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // SwiftySoundRecorder-Bridging-Header.h 3 | // SwiftySoundRecorder 4 | // 5 | // Created by Guoliang Wang on 8/14/16. 6 | // Copyright © 2016 CocoaPods. All rights reserved. 7 | // 8 | 9 | #ifndef SwiftySoundRecorder_Bridging_Header_h 10 | #define SwiftySoundRecorder_Bridging_Header_h 11 | 12 | 13 | #endif /* SwiftySoundRecorder_Bridging_Header_h */ 14 | -------------------------------------------------------------------------------- /Example/SwiftySoundRecorder.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/SwiftySoundRecorder.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/SwiftySoundRecorder/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // SwiftySoundRecorder 4 | // 5 | // Created by rcholic on 08/13/2016. 6 | // Copyright (c) 2016 rcholic. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(application: UIApplication) { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /Example/SwiftySoundRecorder/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /Example/SwiftySoundRecorder/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Example/SwiftySoundRecorder/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /Example/SwiftySoundRecorder/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // SwiftySoundRecorder 4 | // 5 | // Created by rcholic on 08/13/2016. 6 | // Copyright (c) 2016 rcholic. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import SwiftySoundRecorder 11 | 12 | 13 | class ViewController: UIViewController { 14 | 15 | override func viewDidLoad() { 16 | super.viewDidLoad() 17 | // Do any additional setup after loading the view, typically from a nib. 18 | print("loaded example vC!") 19 | } 20 | 21 | @IBAction func didTapRecordButton(sender: AnyObject) { 22 | 23 | let recordRC = SwiftySoundRecorder() 24 | recordRC.maxDuration = 7 25 | recordRC.themeType = .Light 26 | recordRC.delegate = self 27 | presentViewController(recordRC, animated: true, completion: nil) 28 | } 29 | } 30 | 31 | extension ViewController: SwiftySoundRecorderDelegate { 32 | func doneRecordingDidPress(soundRecorder: SwiftySoundRecorder, audioFilePath: String) { 33 | print("done recording button tapped, audioFilePath: \(audioFilePath)") 34 | soundRecorder.dismissViewControllerAnimated(true, completion: nil) 35 | } 36 | 37 | func cancelRecordingDidPress(soundRecorder: SwiftySoundRecorder) { 38 | print("cancelled!") 39 | soundRecorder.dismissViewControllerAnimated(true, completion: nil) 40 | } 41 | } 42 | 43 | -------------------------------------------------------------------------------- /Example/Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Example/Tests/Tests.swift: -------------------------------------------------------------------------------- 1 | // https://github.com/Quick/Quick 2 | 3 | import Quick 4 | import Nimble 5 | import SwiftySoundRecorder 6 | 7 | class TableOfContentsSpec: QuickSpec { 8 | override func spec() { 9 | describe("these will fail") { 10 | 11 | it("can do maths") { 12 | expect(1) == 2 13 | } 14 | 15 | it("can read") { 16 | expect("number") == "string" 17 | } 18 | 19 | it("will eventually fail") { 20 | expect("time").toEventually( equal("done") ) 21 | } 22 | 23 | context("these will pass") { 24 | 25 | it("can do maths") { 26 | expect(23) == 23 27 | } 28 | 29 | it("can read") { 30 | expect("🐮") == "🐮" 31 | } 32 | 33 | it("will eventually pass") { 34 | var time = "passing" 35 | 36 | dispatch_async(dispatch_get_main_queue()) { 37 | time = "done" 38 | } 39 | 40 | waitUntil { done in 41 | NSThread.sleepForTimeInterval(0.5) 42 | expect(time) == "done" 43 | 44 | done() 45 | } 46 | } 47 | } 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Images/ic_av_timer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Images/ic_av_timer.png -------------------------------------------------------------------------------- /Images/ic_av_timer_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Images/ic_av_timer_2x.png -------------------------------------------------------------------------------- /Images/ic_av_timer_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Images/ic_av_timer_3x.png -------------------------------------------------------------------------------- /Images/ic_content_cut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Images/ic_content_cut.png -------------------------------------------------------------------------------- /Images/ic_content_cut_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Images/ic_content_cut_2x.png -------------------------------------------------------------------------------- /Images/ic_content_cut_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Images/ic_content_cut_3x.png -------------------------------------------------------------------------------- /Images/ic_fiber_manual_record.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Images/ic_fiber_manual_record.png -------------------------------------------------------------------------------- /Images/ic_fiber_manual_record_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Images/ic_fiber_manual_record_2x.png -------------------------------------------------------------------------------- /Images/ic_fiber_manual_record_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Images/ic_fiber_manual_record_3x.png -------------------------------------------------------------------------------- /Images/ic_mic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Images/ic_mic.png -------------------------------------------------------------------------------- /Images/ic_mic_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Images/ic_mic_2x.png -------------------------------------------------------------------------------- /Images/ic_mic_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Images/ic_mic_3x.png -------------------------------------------------------------------------------- /Images/ic_mic_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Images/ic_mic_off.png -------------------------------------------------------------------------------- /Images/ic_mic_off_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Images/ic_mic_off_2x.png -------------------------------------------------------------------------------- /Images/ic_mic_off_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Images/ic_mic_off_3x.png -------------------------------------------------------------------------------- /Images/ic_pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Images/ic_pause.png -------------------------------------------------------------------------------- /Images/ic_pause_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Images/ic_pause_2x.png -------------------------------------------------------------------------------- /Images/ic_pause_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Images/ic_pause_3x.png -------------------------------------------------------------------------------- /Images/ic_play_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Images/ic_play_arrow.png -------------------------------------------------------------------------------- /Images/ic_play_arrow_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Images/ic_play_arrow_2x.png -------------------------------------------------------------------------------- /Images/ic_play_arrow_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Images/ic_play_arrow_3x.png -------------------------------------------------------------------------------- /Images/ic_stop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Images/ic_stop.png -------------------------------------------------------------------------------- /Images/ic_stop_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Images/ic_stop_2x.png -------------------------------------------------------------------------------- /Images/ic_stop_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Images/ic_stop_3x.png -------------------------------------------------------------------------------- /Images/ic_undo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Images/ic_undo.png -------------------------------------------------------------------------------- /Images/ic_undo_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Images/ic_undo_2x.png -------------------------------------------------------------------------------- /Images/ic_undo_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Images/ic_undo_3x.png -------------------------------------------------------------------------------- /Images/milkyway.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Images/milkyway.png -------------------------------------------------------------------------------- /Images/scissor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Images/scissor.png -------------------------------------------------------------------------------- /Images/scissor@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Images/scissor@2x.png -------------------------------------------------------------------------------- /Images/scissor@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/Images/scissor@3x.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 rcholic 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SwiftySoundRecorder 2 | 3 | [![CI Status](http://img.shields.io/travis/rcholic/SwiftySoundRecorder.svg?style=flat)](https://travis-ci.org/rcholic/SwiftySoundRecorder) 4 | [![Version](https://img.shields.io/cocoapods/v/SwiftySoundRecorder.svg?style=flat)](http://cocoapods.org/pods/SwiftySoundRecorder) 5 | [![License](https://img.shields.io/cocoapods/l/SwiftySoundRecorder.svg?style=flat)](http://cocoapods.org/pods/SwiftySoundRecorder) 6 | [![Platform](https://img.shields.io/cocoapods/p/SwiftySoundRecorder.svg?style=flat)](http://cocoapods.org/pods/SwiftySoundRecorder) 7 | 8 | ## Screenshots 9 | ![Light Color Theme] 10 | (https://s3.postimg.org/j9nktqoyb/Screen_Shot_2016_08_20_at_11_57_53_PM.png) 11 | ![Dark Color Theme] 12 | (https://s9.postimg.org/osiodktdb/Screen_Shot_2016_08_20_at_11_58_36_PM.png) 13 | ![Trimming Audio Clip] 14 | (https://s13.postimg.org/6l0g3rop3/Screen_Shot_2016_08_20_at_11_58_57_PM.png) 15 | 16 | ## Example 17 | 18 | To run the example project, clone the repo, and run `pod install` from the Example directory first. 19 | 20 | ## Requirements 21 | 22 | ## Installation 23 | 24 | SwiftySoundRecorder is available through [CocoaPods](http://cocoapods.org). To install 25 | it, simply add the following line to your Podfile: 26 | 27 | ```ruby 28 | pod "SwiftySoundRecorder" 29 | ``` 30 | 31 | ## Usage Example 32 | To use the recorder, you need to: 33 | 1. Create an instance of `SwiftySoundRecorder`: 34 | ``` 35 | let recorder = SwiftySoundRecorder() 36 | ``` 37 | 2. Options of the recorder: 38 | * Allow cropping: `recorder.allowCropping = true // or false to disallow` 39 | * Set maximum length of duration (in seconds): `recorder.maxDuration = 10 // 10 seconds`; If not set, the recorder will run forever until user stops it 40 | * Use the theme colors (.Dark and .Light): `recorder.themeType = .Dark` // 41 | 42 | 3. Implement the delegate methods: 43 | - doneRecordingDidPress(soundRecorder: SwiftySoundRecorder, audioFilePath: String) 44 | - cancelRecordingDidPress(soundRecorder: SwiftySoundRecorder) 45 | 46 | 4. Present the recorder: `presentViewController(recorder, animated: true, completion: nil)` 47 | 48 | 49 | ## Author 50 | 51 | rcholic, ivytony@gmail.com 52 | 53 | ## License 54 | 55 | SwiftySoundRecorder is available under the MIT license. See the LICENSE file for more info. 56 | -------------------------------------------------------------------------------- /Source/Configuration.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Configuration.swift 3 | // SwiftySoundRecorder 4 | // 5 | // Created by Guoliang Wang on 8/13/16. 6 | // Copyright © 2016 CocoaPods. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | /* 13 | typealias ThemeColors = (text: UIColor, background: UIColor, siriWaveView: [UIColor], flowWaveView: [UIColor]) 14 | 15 | internal enum Theme: ThemeColors { 16 | case Dark = (text: UIColor(white: 1, alpha: 0.9), background: UIColor.clear, siriWaveView: [UIColor.clearColor(), Configuration.defaultBlueTintColor], flowWaveView: [UIColor.redColor(), UIColor.blueColor()]) 17 | case Default = (text: UIColor(white: 1, alpha: 0.9), background: UIColor.clear, siriWaveView: [UIColor.clearColor(), Configuration.defaultBlueTintColor], flowWaveView: [UIColor.redColor(), UIColor.blueColor()]) // light color 18 | } 19 | */ 20 | 21 | public struct Configuration { 22 | // MARK Colors 23 | public static var defaultBlueTintColor = UIColor(red: 14.0/255, green: 122.0/255, blue: 254.0/255, alpha: 1.0) 24 | public static var recorderWaveNormalTintColor = defaultBlueTintColor 25 | public static var darkOrangeColor = UIColor(red: 255, green: 140, blue: 0, alpha: 1) 26 | public static var recorderWaveHighlightedTintColor = darkOrangeColor 27 | public static var cropperLineColor = UIColor.redColor() 28 | 29 | public static var darkThemeTextAndGraphicColor = UIColor(white: 1, alpha: 0.9) 30 | // MARK Fonts 31 | 32 | 33 | // MARK Titles 34 | public static var navBarButtonLabelsDict: [String : String ] = ["Cancel": "Cancel", "Done": "Done"] 35 | 36 | public static var originalRecordingFileName: String = "recording." // to be appended by file type 37 | public static var trimmedRecordingFileName: String = "recording_trimmed." 38 | 39 | // MARK Dimensions 40 | public static var cropperLineThickness: CGFloat = 2 41 | public static var navBarHeight: CGFloat = 45 42 | 43 | 44 | // MARK images 45 | public static var milkyWayImage: UIImage = AssetManager.getImage("milkyway") // UIImage(named: "milkyway.jpg") 46 | } 47 | -------------------------------------------------------------------------------- /Source/Number+String.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Number+String.swift 3 | // SwiftySoundRecorder 4 | // 5 | // Created by Guoliang Wang on 8/13/16. 6 | // Copyright © 2016 CocoaPods. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | extension Int { 12 | func addLeadingZeroAsString() -> String { 13 | return String(format: "%02d", self) // add leading zero to single digit 14 | } 15 | } 16 | 17 | extension Double { 18 | 19 | func stripDecimalZeroAsString() -> String? { 20 | if self >= 1 || self == 0 { 21 | return nil 22 | } 23 | let formatter = NSNumberFormatter() 24 | formatter.positiveFormat = ".###" // decimal without decimal 0 25 | 26 | return formatter.stringFromNumber(self) // 0.333454 becomes ".333" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Source/Themes.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Foundation 3 | 4 | public protocol ThemeColor { 5 | var backgroundColor: UIColor { get } 6 | var btnTintColor: UIColor { get set } 7 | var iconBtnTintColor: UIColor { get set } 8 | var normalIconBtnTitleColor: UIColor { get set } 9 | var highlightedIconBtnTitleColor: UIColor { get set } 10 | var normalTextBtnTitleColor: UIColor { get set } 11 | var highlightedTextBtnTitleColor: UIColor { get set } 12 | var waveViewBackgroundColor: UIColor { get set } 13 | var waveNormalColor: UIColor { get set } 14 | var waveHighlightedColor: UIColor { get set } 15 | } 16 | 17 | public struct DarkTheme: ThemeColor { 18 | public var backgroundColor: UIColor = UIColor.clearColor() 19 | public var btnTintColor: UIColor = UIColor(white: 1, alpha: 0.9) // Configuration.defaultBlueTintColor 20 | public var iconBtnTintColor: UIColor = Configuration.defaultBlueTintColor 21 | public var normalIconBtnTitleColor: UIColor = UIColor(red: 255, green: 0, blue: 0, alpha: 0.9) 22 | public var highlightedIconBtnTitleColor: UIColor = UIColor.grayColor() 23 | public var normalTextBtnTitleColor: UIColor = UIColor(white: 1, alpha: 0.9) 24 | public var highlightedTextBtnTitleColor: UIColor = UIColor.grayColor() 25 | public var waveViewBackgroundColor: UIColor = UIColor.clearColor() 26 | public var waveNormalColor: UIColor = UIColor(red: 0, green: 118, blue: 255, alpha: 1) 27 | public var waveHighlightedColor: UIColor = Configuration.defaultBlueTintColor 28 | } 29 | 30 | public struct LightTheme: ThemeColor { 31 | public var backgroundColor: UIColor = UIColor.whiteColor() 32 | public var btnTintColor: UIColor = Configuration.defaultBlueTintColor 33 | public var iconBtnTintColor: UIColor = Configuration.defaultBlueTintColor 34 | public var normalIconBtnTitleColor: UIColor = UIColor(red: 255, green: 0, blue: 0, alpha: 0.9) 35 | public var highlightedIconBtnTitleColor: UIColor = UIColor.grayColor() 36 | public var normalTextBtnTitleColor: UIColor = Configuration.defaultBlueTintColor 37 | public var highlightedTextBtnTitleColor: UIColor = UIColor.grayColor() 38 | public var waveViewBackgroundColor: UIColor = UIColor.darkGrayColor() 39 | public var waveNormalColor: UIColor = UIColor(red: 0, green: 118, blue: 255, alpha: 1) 40 | public var waveHighlightedColor: UIColor = Configuration.defaultBlueTintColor 41 | } 42 | 43 | -------------------------------------------------------------------------------- /SwiftySoundRecorder.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = 'SwiftySoundRecorder' 3 | s.version = '0.1.0' 4 | s.summary = 'A Swift ySound Recorder with Sound Wave Views.' 5 | s.homepage = 'https://github.com/rcholic/SwiftySoundRecorder' 6 | s.license = { :type => 'MIT', :file => 'LICENSE' } 7 | s.author = { 'rcholic' => 'ivytony@gmail.com' } 8 | s.source = { :git => 'https://github.com/rcholic/SwiftySoundRecorder.git', :tag => s.version.to_s } 9 | # s.social_media_url = 'https://twitter.com/' 10 | s.platform = :ios, '8.0' 11 | s.requires_arc = true 12 | s.source_files = 'Source/**/*' 13 | 14 | s.ios.deployment_target = '8.0' 15 | 16 | 17 | s.resource_bundles = { 18 | 'SwiftySoundRecorder' => ['Images/*.{png}'] 19 | } 20 | 21 | # s.source_files = 'SwiftySoundRecorder/Classes/**/*' 22 | 23 | # s.resource_bundles = { 24 | # 'SwiftySoundRecorder' => ['SwiftySoundRecorder/Assets/*.png'] 25 | # } 26 | 27 | s.frameworks = 'UIKit', 'AVFoundation' 28 | s.dependency 'SCSiriWaveformView' 29 | s.dependency 'FDWaveformViewForked', '~> 0.5.0' 30 | # s.dependency 'FDWaveformView', '~> 1.0.1' 31 | # s.dependency 'FDWaveformView', :git => 'https://github.com/hackiftekhar/FDWaveformView.git', :commit => '65369f6729bec964db984b7f7439a915342237de' 32 | end 33 | -------------------------------------------------------------------------------- /SwiftySoundRecorder.podspec.bak: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod lib lint SwiftySoundRecorder.podspec' to ensure this is a 3 | # valid spec before submitting. 4 | # 5 | # Any lines starting with a # are optional, but their use is encouraged 6 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | s.name = 'SwiftySoundRecorder' 11 | s.version = '0.1.0' 12 | s.summary = 'A short description of SwiftySoundRecorder.' 13 | 14 | # This description is used to generate tags and improve search results. 15 | # * Think: What does it do? Why did you write it? What is the focus? 16 | # * Try to keep it short, snappy and to the point. 17 | # * Write the description between the DESC delimiters below. 18 | # * Finally, don't worry about the indent, CocoaPods strips it! 19 | 20 | s.description = <<-DESC 21 | TODO: Add long description of the pod here. 22 | DESC 23 | 24 | s.homepage = 'https://github.com//SwiftySoundRecorder' 25 | # s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2' 26 | s.license = { :type => 'MIT', :file => 'LICENSE' } 27 | s.author = { 'rcholic' => 'ivytony@gmail.com' } 28 | s.source = { :git => 'https://github.com//SwiftySoundRecorder.git', :tag => s.version.to_s } 29 | # s.social_media_url = 'https://twitter.com/' 30 | 31 | s.ios.deployment_target = '8.0' 32 | 33 | s.source_files = 'SwiftySoundRecorder/Classes/**/*' 34 | 35 | # s.resource_bundles = { 36 | # 'SwiftySoundRecorder' => ['SwiftySoundRecorder/Assets/*.png'] 37 | # } 38 | 39 | # s.public_header_files = 'Pod/Classes/**/*.h' 40 | # s.frameworks = 'UIKit', 'MapKit' 41 | # s.dependency 'AFNetworking', '~> 2.3' 42 | end 43 | -------------------------------------------------------------------------------- /SwiftySoundRecorder/Assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/SwiftySoundRecorder/Assets/.gitkeep -------------------------------------------------------------------------------- /SwiftySoundRecorder/Classes/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcholic/SwiftySoundRecorder/954c4d3beace17ec0b6fc170cd5249e3180a8bd1/SwiftySoundRecorder/Classes/.gitkeep -------------------------------------------------------------------------------- /_Pods.xcodeproj: -------------------------------------------------------------------------------- 1 | Example/Pods/Pods.xcodeproj --------------------------------------------------------------------------------