├── .gitignore ├── .travis.yml ├── Data └── test.png ├── JPSimulatorHacks.podspec ├── JPSimulatorHacks.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcshareddata │ └── xcschemes │ └── JPSimulatorHacks.xcscheme ├── JPSimulatorHacks ├── Info.plist ├── JPSimulatorHacks.h ├── JPSimulatorHacks.m ├── JPSimulatorHacksDB.h └── JPSimulatorHacksDB.m ├── JPSimulatorHacksSample.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcshareddata │ └── xcschemes │ └── JPSimulatorHacksSample.xcscheme ├── JPSimulatorHacksSample.xcworkspace └── contents.xcworkspacedata ├── JPSimulatorHacksSample ├── Images.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── LaunchImage.launchimage │ │ └── Contents.json ├── JPAppDelegate.h ├── JPAppDelegate.m ├── JPSimulatorHacksSample-Info.plist ├── JPSimulatorHacksSample-Prefix.pch ├── JPSimulatorHacksSample.entitlements ├── Storyboard.storyboard ├── en.lproj │ └── InfoPlist.strings └── main.m ├── JPSimulatorHacksSampleTests ├── JPSimulatorHacksSampleTests-Info.plist ├── JPSimulatorHacksSampleTests.m └── en.lproj │ └── InfoPlist.strings ├── LICENSE ├── Podfile ├── Podfile.lock ├── Pods ├── Expecta │ ├── Expecta │ │ ├── EXPBlockDefinedMatcher.h │ │ ├── EXPBlockDefinedMatcher.m │ │ ├── EXPDefines.h │ │ ├── EXPDoubleTuple.h │ │ ├── EXPDoubleTuple.m │ │ ├── EXPExpect.h │ │ ├── EXPExpect.m │ │ ├── EXPFloatTuple.h │ │ ├── EXPFloatTuple.m │ │ ├── EXPMatcher.h │ │ ├── EXPUnsupportedObject.h │ │ ├── EXPUnsupportedObject.m │ │ ├── Expecta.h │ │ ├── ExpectaObject.h │ │ ├── ExpectaObject.m │ │ ├── ExpectaSupport.h │ │ ├── ExpectaSupport.m │ │ ├── Matchers │ │ │ ├── EXPMatcherHelpers.h │ │ │ ├── EXPMatcherHelpers.m │ │ │ ├── EXPMatchers+beCloseTo.h │ │ │ ├── EXPMatchers+beCloseTo.m │ │ │ ├── EXPMatchers+beFalsy.h │ │ │ ├── EXPMatchers+beFalsy.m │ │ │ ├── EXPMatchers+beGreaterThan.h │ │ │ ├── EXPMatchers+beGreaterThan.m │ │ │ ├── EXPMatchers+beGreaterThanOrEqualTo.h │ │ │ ├── EXPMatchers+beGreaterThanOrEqualTo.m │ │ │ ├── EXPMatchers+beIdenticalTo.h │ │ │ ├── EXPMatchers+beIdenticalTo.m │ │ │ ├── EXPMatchers+beInTheRangeOf.h │ │ │ ├── EXPMatchers+beInTheRangeOf.m │ │ │ ├── EXPMatchers+beInstanceOf.h │ │ │ ├── EXPMatchers+beInstanceOf.m │ │ │ ├── EXPMatchers+beKindOf.h │ │ │ ├── EXPMatchers+beKindOf.m │ │ │ ├── EXPMatchers+beLessThan.h │ │ │ ├── EXPMatchers+beLessThan.m │ │ │ ├── EXPMatchers+beLessThanOrEqualTo.h │ │ │ ├── EXPMatchers+beLessThanOrEqualTo.m │ │ │ ├── EXPMatchers+beNil.h │ │ │ ├── EXPMatchers+beNil.m │ │ │ ├── EXPMatchers+beSubclassOf.h │ │ │ ├── EXPMatchers+beSubclassOf.m │ │ │ ├── EXPMatchers+beSupersetOf.h │ │ │ ├── EXPMatchers+beSupersetOf.m │ │ │ ├── EXPMatchers+beTruthy.h │ │ │ ├── EXPMatchers+beTruthy.m │ │ │ ├── EXPMatchers+beginWith.h │ │ │ ├── EXPMatchers+beginWith.m │ │ │ ├── EXPMatchers+conformTo.h │ │ │ ├── EXPMatchers+conformTo.m │ │ │ ├── EXPMatchers+contain.h │ │ │ ├── EXPMatchers+contain.m │ │ │ ├── EXPMatchers+endWith.h │ │ │ ├── EXPMatchers+endWith.m │ │ │ ├── EXPMatchers+equal.h │ │ │ ├── EXPMatchers+equal.m │ │ │ ├── EXPMatchers+haveCountOf.h │ │ │ ├── EXPMatchers+haveCountOf.m │ │ │ ├── EXPMatchers+match.h │ │ │ ├── EXPMatchers+match.m │ │ │ ├── EXPMatchers+postNotification.h │ │ │ ├── EXPMatchers+postNotification.m │ │ │ ├── EXPMatchers+raise.h │ │ │ ├── EXPMatchers+raise.m │ │ │ ├── EXPMatchers+raiseWithReason.h │ │ │ ├── EXPMatchers+raiseWithReason.m │ │ │ ├── EXPMatchers+respondTo.h │ │ │ ├── EXPMatchers+respondTo.m │ │ │ └── EXPMatchers.h │ │ ├── NSObject+Expecta.h │ │ ├── NSValue+Expecta.h │ │ └── NSValue+Expecta.m │ ├── LICENSE │ └── README.md ├── Headers │ ├── Private │ │ ├── Expecta │ │ │ ├── EXPBlockDefinedMatcher.h │ │ │ ├── EXPDefines.h │ │ │ ├── EXPDoubleTuple.h │ │ │ ├── EXPExpect.h │ │ │ ├── EXPFloatTuple.h │ │ │ ├── EXPMatcher.h │ │ │ ├── EXPMatcherHelpers.h │ │ │ ├── EXPMatchers+beCloseTo.h │ │ │ ├── EXPMatchers+beFalsy.h │ │ │ ├── EXPMatchers+beGreaterThan.h │ │ │ ├── EXPMatchers+beGreaterThanOrEqualTo.h │ │ │ ├── EXPMatchers+beIdenticalTo.h │ │ │ ├── EXPMatchers+beInTheRangeOf.h │ │ │ ├── EXPMatchers+beInstanceOf.h │ │ │ ├── EXPMatchers+beKindOf.h │ │ │ ├── EXPMatchers+beLessThan.h │ │ │ ├── EXPMatchers+beLessThanOrEqualTo.h │ │ │ ├── EXPMatchers+beNil.h │ │ │ ├── EXPMatchers+beSubclassOf.h │ │ │ ├── EXPMatchers+beSupersetOf.h │ │ │ ├── EXPMatchers+beTruthy.h │ │ │ ├── EXPMatchers+beginWith.h │ │ │ ├── EXPMatchers+conformTo.h │ │ │ ├── EXPMatchers+contain.h │ │ │ ├── EXPMatchers+endWith.h │ │ │ ├── EXPMatchers+equal.h │ │ │ ├── EXPMatchers+haveCountOf.h │ │ │ ├── EXPMatchers+match.h │ │ │ ├── EXPMatchers+postNotification.h │ │ │ ├── EXPMatchers+raise.h │ │ │ ├── EXPMatchers+raiseWithReason.h │ │ │ ├── EXPMatchers+respondTo.h │ │ │ ├── EXPMatchers.h │ │ │ ├── EXPUnsupportedObject.h │ │ │ ├── Expecta.h │ │ │ ├── ExpectaObject.h │ │ │ ├── ExpectaSupport.h │ │ │ ├── NSObject+Expecta.h │ │ │ └── NSValue+Expecta.h │ │ ├── JPSimulatorHacks │ │ │ ├── JPSimulatorHacks.h │ │ │ └── JPSimulatorHacksDB.h │ │ └── KIF │ │ │ ├── CALayer-KIFAdditions.h │ │ │ ├── CGGeometry-KIFAdditions.h │ │ │ ├── IOHIDEvent+KIF.h │ │ │ ├── KIF.h │ │ │ ├── KIFAccessibilityEnabler.h │ │ │ ├── KIFSystemTestActor.h │ │ │ ├── KIFTestActor.h │ │ │ ├── KIFTestCase.h │ │ │ ├── KIFTestStepValidation.h │ │ │ ├── KIFTypist.h │ │ │ ├── KIFUIObject.h │ │ │ ├── KIFUITestActor-ConditionalTests.h │ │ │ ├── KIFUITestActor.h │ │ │ ├── KIFUIViewTestActor.h │ │ │ ├── LoadableCategory.h │ │ │ ├── NSBundle-KIFAdditions.h │ │ │ ├── NSError-KIFAdditions.h │ │ │ ├── NSException-KIFAdditions.h │ │ │ ├── NSFileManager-KIFAdditions.h │ │ │ ├── NSPredicate+KIFAdditions.h │ │ │ ├── NSString+KIFAdditions.h │ │ │ ├── UIAccessibilityElement-KIFAdditions.h │ │ │ ├── UIApplication-KIFAdditions.h │ │ │ ├── UIAutomationHelper.h │ │ │ ├── UIEvent+KIFAdditions.h │ │ │ ├── UIScreen+KIFAdditions.h │ │ │ ├── UIScrollView-KIFAdditions.h │ │ │ ├── UITableView-KIFAdditions.h │ │ │ ├── UITouch-KIFAdditions.h │ │ │ ├── UIView-Debugging.h │ │ │ ├── UIView-KIFAdditions.h │ │ │ ├── UIWindow-KIFAdditions.h │ │ │ └── XCTestCase-KIFAdditions.h │ └── Public │ │ ├── Expecta │ │ ├── EXPBlockDefinedMatcher.h │ │ ├── EXPDefines.h │ │ ├── EXPDoubleTuple.h │ │ ├── EXPExpect.h │ │ ├── EXPFloatTuple.h │ │ ├── EXPMatcher.h │ │ ├── EXPMatcherHelpers.h │ │ ├── EXPMatchers+beCloseTo.h │ │ ├── EXPMatchers+beFalsy.h │ │ ├── EXPMatchers+beGreaterThan.h │ │ ├── EXPMatchers+beGreaterThanOrEqualTo.h │ │ ├── EXPMatchers+beIdenticalTo.h │ │ ├── EXPMatchers+beInTheRangeOf.h │ │ ├── EXPMatchers+beInstanceOf.h │ │ ├── EXPMatchers+beKindOf.h │ │ ├── EXPMatchers+beLessThan.h │ │ ├── EXPMatchers+beLessThanOrEqualTo.h │ │ ├── EXPMatchers+beNil.h │ │ ├── EXPMatchers+beSubclassOf.h │ │ ├── EXPMatchers+beSupersetOf.h │ │ ├── EXPMatchers+beTruthy.h │ │ ├── EXPMatchers+beginWith.h │ │ ├── EXPMatchers+conformTo.h │ │ ├── EXPMatchers+contain.h │ │ ├── EXPMatchers+endWith.h │ │ ├── EXPMatchers+equal.h │ │ ├── EXPMatchers+haveCountOf.h │ │ ├── EXPMatchers+match.h │ │ ├── EXPMatchers+postNotification.h │ │ ├── EXPMatchers+raise.h │ │ ├── EXPMatchers+raiseWithReason.h │ │ ├── EXPMatchers+respondTo.h │ │ ├── EXPMatchers.h │ │ ├── EXPUnsupportedObject.h │ │ ├── Expecta.h │ │ ├── ExpectaObject.h │ │ ├── ExpectaSupport.h │ │ ├── NSObject+Expecta.h │ │ └── NSValue+Expecta.h │ │ ├── JPSimulatorHacks │ │ ├── JPSimulatorHacks.h │ │ └── JPSimulatorHacksDB.h │ │ └── KIF │ │ ├── CALayer-KIFAdditions.h │ │ ├── CGGeometry-KIFAdditions.h │ │ ├── IOHIDEvent+KIF.h │ │ ├── KIF.h │ │ ├── KIFAccessibilityEnabler.h │ │ ├── KIFSystemTestActor.h │ │ ├── KIFTestActor.h │ │ ├── KIFTestCase.h │ │ ├── KIFTestStepValidation.h │ │ ├── KIFTypist.h │ │ ├── KIFUIObject.h │ │ ├── KIFUITestActor-ConditionalTests.h │ │ ├── KIFUITestActor.h │ │ ├── KIFUIViewTestActor.h │ │ ├── NSBundle-KIFAdditions.h │ │ ├── NSError-KIFAdditions.h │ │ ├── NSException-KIFAdditions.h │ │ ├── NSFileManager-KIFAdditions.h │ │ ├── UIAccessibilityElement-KIFAdditions.h │ │ ├── UIApplication-KIFAdditions.h │ │ ├── UIAutomationHelper.h │ │ ├── UIScrollView-KIFAdditions.h │ │ ├── UITableView-KIFAdditions.h │ │ ├── UITouch-KIFAdditions.h │ │ ├── UIView-Debugging.h │ │ ├── UIView-KIFAdditions.h │ │ ├── UIWindow-KIFAdditions.h │ │ └── XCTestCase-KIFAdditions.h ├── KIF │ ├── Additions │ │ ├── CALayer-KIFAdditions.h │ │ ├── CALayer-KIFAdditions.m │ │ ├── CGGeometry-KIFAdditions.h │ │ ├── CGGeometry-KIFAdditions.m │ │ ├── LoadableCategory.h │ │ ├── NSBundle-KIFAdditions.h │ │ ├── NSBundle-KIFAdditions.m │ │ ├── NSError-KIFAdditions.h │ │ ├── NSError-KIFAdditions.m │ │ ├── NSException-KIFAdditions.h │ │ ├── NSException-KIFAdditions.m │ │ ├── NSFileManager-KIFAdditions.h │ │ ├── NSFileManager-KIFAdditions.m │ │ ├── NSPredicate+KIFAdditions.h │ │ ├── NSPredicate+KIFAdditions.m │ │ ├── NSString+KIFAdditions.h │ │ ├── NSString+KIFAdditions.m │ │ ├── UIAccessibilityElement-KIFAdditions.h │ │ ├── UIAccessibilityElement-KIFAdditions.m │ │ ├── UIApplication-KIFAdditions.h │ │ ├── UIApplication-KIFAdditions.m │ │ ├── UIEvent+KIFAdditions.h │ │ ├── UIEvent+KIFAdditions.m │ │ ├── UIScreen+KIFAdditions.h │ │ ├── UIScreen+KIFAdditions.m │ │ ├── UIScrollView-KIFAdditions.h │ │ ├── UIScrollView-KIFAdditions.m │ │ ├── UITableView-KIFAdditions.h │ │ ├── UITableView-KIFAdditions.m │ │ ├── UITouch-KIFAdditions.h │ │ ├── UITouch-KIFAdditions.m │ │ ├── UIView-Debugging.h │ │ ├── UIView-Debugging.m │ │ ├── UIView-KIFAdditions.h │ │ ├── UIView-KIFAdditions.m │ │ ├── UIWindow-KIFAdditions.h │ │ ├── UIWindow-KIFAdditions.m │ │ ├── XCTestCase-KIFAdditions.h │ │ └── XCTestCase-KIFAdditions.m │ ├── Classes │ │ ├── IOHIDEvent+KIF.h │ │ ├── IOHIDEvent+KIF.m │ │ ├── KIF.h │ │ ├── KIFAccessibilityEnabler.h │ │ ├── KIFAccessibilityEnabler.m │ │ ├── KIFSystemTestActor.h │ │ ├── KIFSystemTestActor.m │ │ ├── KIFTestActor.h │ │ ├── KIFTestActor.m │ │ ├── KIFTestCase.h │ │ ├── KIFTestCase.m │ │ ├── KIFTestStepValidation.h │ │ ├── KIFTestStepValidation.m │ │ ├── KIFTypist.h │ │ ├── KIFTypist.m │ │ ├── KIFUIObject.h │ │ ├── KIFUIObject.m │ │ ├── KIFUITestActor-ConditionalTests.h │ │ ├── KIFUITestActor-ConditionalTests.m │ │ ├── KIFUITestActor.h │ │ ├── KIFUITestActor.m │ │ ├── KIFUIViewTestActor.h │ │ ├── KIFUIViewTestActor.m │ │ ├── UIAutomationHelper.h │ │ └── UIAutomationHelper.m │ ├── LICENSE │ └── README.md ├── Local Podspecs │ └── JPSimulatorHacks.podspec.json ├── Manifest.lock ├── Pods.xcodeproj │ └── project.pbxproj └── Target Support Files │ ├── Expecta │ ├── Expecta-dummy.m │ ├── Expecta-prefix.pch │ └── Expecta.xcconfig │ ├── JPSimulatorHacks │ ├── JPSimulatorHacks-dummy.m │ ├── JPSimulatorHacks-prefix.pch │ └── JPSimulatorHacks.xcconfig │ ├── KIF │ ├── KIF-dummy.m │ ├── KIF-prefix.pch │ └── KIF.xcconfig │ └── Pods-JPSimulatorHacksSampleTests │ ├── Pods-JPSimulatorHacksSampleTests-acknowledgements.markdown │ ├── Pods-JPSimulatorHacksSampleTests-acknowledgements.plist │ ├── Pods-JPSimulatorHacksSampleTests-dummy.m │ ├── Pods-JPSimulatorHacksSampleTests-frameworks.sh │ ├── Pods-JPSimulatorHacksSampleTests-resources.sh │ ├── Pods-JPSimulatorHacksSampleTests.debug.xcconfig │ └── Pods-JPSimulatorHacksSampleTests.release.xcconfig ├── README.md └── Scripts └── diff_plists.sh /.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 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: objective-c 2 | before_install: 3 | - gem install xcpretty 4 | before_script: 5 | - export LANG=en_US.UTF-8 6 | install: echo 7 | script: 8 | - rm -rf /Users/travis/Library/Developer/Xcode/DerivedData/JPSimulatorHacksSample-*/ 9 | - set -o pipefail 10 | - xcodebuild -workspace JPSimulatorHacksSample.xcworkspace -scheme 'JPSimulatorHacksSample' -sdk iphonesimulator -configuration Debug test | xcpretty -c 11 | -------------------------------------------------------------------------------- /Data/test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plu/JPSimulatorHacks/f9621e30ac4d54deb1f5675e97ddb9bf881bd588/Data/test.png -------------------------------------------------------------------------------- /JPSimulatorHacks.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = 'JPSimulatorHacks' 3 | s.version = '1.4.2' 4 | s.license = 'MIT' 5 | s.summary = 'Hack the Simulator in your tests (grant access to photos, contacts, ...)' 6 | s.homepage = 'https://github.com/plu/JPSimulatorHacks' 7 | s.authors = { 'Johannes Plunien' => 'plu@pqpq.de' } 8 | s.source = { :git => 'https://github.com/plu/JPSimulatorHacks.git', :tag => s.version.to_s } 9 | s.requires_arc = true 10 | s.ios.deployment_target = '7.0' 11 | s.default_subspec = 'standard' 12 | 13 | s.subspec 'standard' do |ss| 14 | ss.source_files = 'JPSimulatorHacks/*.{h,m}' 15 | ss.library = 'sqlite3' 16 | end 17 | 18 | s.subspec 'standalone' do |ss| 19 | ss.xcconfig = { 'OTHER_CFLAGS' => '$(inherited) -DJPSH_SQLITE_STANDALONE' } 20 | ss.source_files = 'JPSimulatorHacks/*.{h,m}' 21 | ss.dependency 'sqlite3' 22 | end 23 | 24 | end 25 | -------------------------------------------------------------------------------- /JPSimulatorHacks.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /JPSimulatorHacks.xcodeproj/xcshareddata/xcschemes/JPSimulatorHacks.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /JPSimulatorHacks/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 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /JPSimulatorHacks/JPSimulatorHacks.h: -------------------------------------------------------------------------------- 1 | // 2 | // JPSimulatorHacks.h 3 | // JPSimulatorHacks 4 | // 5 | // Created by Johannes Plunien on 04/06/14. 6 | // Copyright (C) 2014 Johannes Plunien 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files (the "Software"), to deal 10 | // in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | // copies of the Software, and to permit persons to whom the Software is 13 | // furnished to do so, subject to the following conditions: 14 | // 15 | // The above copyright notice and this permission notice shall be included in 16 | // all copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | // THE SOFTWARE. 25 | // 26 | 27 | #import 28 | 29 | //! Project version number for JPSimulatorHacks. 30 | FOUNDATION_EXPORT double JPSimulatorHacksVersionNumber; 31 | 32 | //! Project version string for JPSimulatorHacks. 33 | FOUNDATION_EXPORT const unsigned char JPSimulatorHacksVersionString[]; 34 | 35 | 36 | @class ALAsset; 37 | 38 | @interface JPSimulatorHacks : NSObject 39 | 40 | // This is blocking, on purpose! 41 | + (ALAsset *)addAssetWithURL:(NSURL *)imageURL; 42 | 43 | + (void)editApplicationPreferences:(void (^)(NSMutableDictionary *preferences))block; 44 | + (void)editGlobalPreferences:(void (^)(NSMutableDictionary *preferences))block; 45 | + (void)editPreferences:(void (^)(NSMutableDictionary *preferences))block; 46 | 47 | + (BOOL)grantAccessToAddressBook; 48 | + (BOOL)grantAccessToAddressBookForBundleIdentifier:(NSString *)bundleIdentifier; 49 | 50 | + (BOOL)grantAccessToPhotos; 51 | + (BOOL)grantAccessToPhotosForBundleIdentifier:(NSString *)bundleIdentifier; 52 | 53 | + (BOOL)grantAccessToCalendar; 54 | + (BOOL)grantAccessToCalendarForBundleIdentifier:(NSString *)bundleIdentifier; 55 | 56 | + (BOOL)grantAccessToHomeKit; 57 | + (BOOL)grantAccessToHomeKitForBundleIdentifier:(NSString *)bundleIdentifier; 58 | 59 | + (BOOL)grantAccessToContacts; 60 | + (BOOL)grantAccessToContactsForBundleIdentifier:(NSString *)bundleIdentifier; 61 | 62 | + (BOOL)grantAccessToCamera; 63 | + (BOOL)grantAccessToCameraForBundleIdentifier:(NSString *)bundleIdentifier; 64 | 65 | + (BOOL)grantAccessToMicrophone; 66 | + (BOOL)grantAccessToMicrophoneForBundleIdentifier:(NSString *)bundleIdentifier; 67 | 68 | + (BOOL)grantAccessToReminders; 69 | + (BOOL)grantAccessToRemindersForBundleIdentifier:(NSString *)bundleIdentifier; 70 | 71 | + (BOOL)grantAccessToTwitter; 72 | + (BOOL)grantAccessToTwitterForBundleIdentifier:(NSString *)bundleIdentifier; 73 | 74 | + (void)setTimeout:(NSTimeInterval)timeout; 75 | 76 | @end 77 | -------------------------------------------------------------------------------- /JPSimulatorHacks/JPSimulatorHacksDB.h: -------------------------------------------------------------------------------- 1 | // 2 | // JPSimulatorHacksDB.h 3 | // JPSimulatorHacks 4 | // 5 | // Created by Johannes Plunien on 25/01/15. 6 | // Copyright (C) 2015 Johannes Plunien 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files (the "Software"), to deal 10 | // in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | // copies of the Software, and to permit persons to whom the Software is 13 | // furnished to do so, subject to the following conditions: 14 | // 15 | // The above copyright notice and this permission notice shall be included in 16 | // all copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | // THE SOFTWARE. 25 | // 26 | 27 | #import 28 | 29 | @interface JPSimulatorHacksDB : NSObject 30 | 31 | + (instancetype)databaseWithPath:(NSString *)path; 32 | - (BOOL)close; 33 | - (BOOL)executeUpdate:(NSString*)sql withArgumentsInArray:(NSArray *)arguments; 34 | - (NSString *)lastErrorMessage; 35 | - (BOOL)open; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /JPSimulatorHacksSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /JPSimulatorHacksSample.xcodeproj/xcshareddata/xcschemes/JPSimulatorHacksSample.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 43 | 44 | 45 | 46 | 47 | 48 | 54 | 55 | 56 | 57 | 58 | 59 | 69 | 71 | 77 | 78 | 79 | 80 | 81 | 82 | 88 | 90 | 96 | 97 | 98 | 99 | 101 | 102 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /JPSimulatorHacksSample.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /JPSimulatorHacksSample/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" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "60x60", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "ipad", 25 | "size" : "29x29", 26 | "scale" : "1x" 27 | }, 28 | { 29 | "idiom" : "ipad", 30 | "size" : "29x29", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "40x40", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "40x40", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "76x76", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "76x76", 51 | "scale" : "2x" 52 | } 53 | ], 54 | "info" : { 55 | "version" : 1, 56 | "author" : "xcode" 57 | } 58 | } -------------------------------------------------------------------------------- /JPSimulatorHacksSample/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "orientation" : "portrait", 20 | "idiom" : "ipad", 21 | "extent" : "full-screen", 22 | "minimum-system-version" : "7.0", 23 | "scale" : "1x" 24 | }, 25 | { 26 | "orientation" : "landscape", 27 | "idiom" : "ipad", 28 | "extent" : "full-screen", 29 | "minimum-system-version" : "7.0", 30 | "scale" : "1x" 31 | }, 32 | { 33 | "orientation" : "portrait", 34 | "idiom" : "ipad", 35 | "extent" : "full-screen", 36 | "minimum-system-version" : "7.0", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "orientation" : "landscape", 41 | "idiom" : "ipad", 42 | "extent" : "full-screen", 43 | "minimum-system-version" : "7.0", 44 | "scale" : "2x" 45 | } 46 | ], 47 | "info" : { 48 | "version" : 1, 49 | "author" : "xcode" 50 | } 51 | } -------------------------------------------------------------------------------- /JPSimulatorHacksSample/JPAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // JPAppDelegate.h 3 | // JPSimulatorHacksSample 4 | // 5 | // Created by Johannes Plunien on 04/06/14. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface JPAppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /JPSimulatorHacksSample/JPAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // JPAppDelegate.m 3 | // JPSimulatorHacksSample 4 | // 5 | // Created by Johannes Plunien on 04/06/14. 6 | // 7 | // 8 | 9 | #import "JPAppDelegate.h" 10 | 11 | @implementation JPAppDelegate 12 | 13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 14 | { 15 | return YES; 16 | } 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /JPSimulatorHacksSample/JPSimulatorHacksSample-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIMainStoryboardFile 28 | Storyboard 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /JPSimulatorHacksSample/JPSimulatorHacksSample-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_3_0 10 | #warning "This project uses features only available in iOS SDK 3.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | #import 16 | #endif 17 | -------------------------------------------------------------------------------- /JPSimulatorHacksSample/JPSimulatorHacksSample.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /JPSimulatorHacksSample/Storyboard.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /JPSimulatorHacksSample/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /JPSimulatorHacksSample/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // JPSimulatorHacksSample 4 | // 5 | // Created by Johannes Plunien on 04/06/14. 6 | // 7 | // 8 | 9 | #import 10 | 11 | #import "JPAppDelegate.h" 12 | 13 | int main(int argc, char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([JPAppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /JPSimulatorHacksSampleTests/JPSimulatorHacksSampleTests-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 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /JPSimulatorHacksSampleTests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Johannes Plunien 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | 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, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | project 'JPSimulatorHacksSample.xcodeproj' 2 | 3 | target 'JPSimulatorHacksSampleTests' do 4 | pod 'JPSimulatorHacks', :path => '.' 5 | pod 'Expecta', '~> 0.3' 6 | pod 'KIF' 7 | end 8 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Expecta (0.4.2) 3 | - JPSimulatorHacks (1.4.2): 4 | - JPSimulatorHacks/standard (= 1.4.2) 5 | - JPSimulatorHacks/standard (1.4.2) 6 | - KIF (3.4.2): 7 | - KIF/Core (= 3.4.2) 8 | - KIF/Core (3.4.2) 9 | 10 | DEPENDENCIES: 11 | - Expecta (~> 0.3) 12 | - JPSimulatorHacks (from `.`) 13 | - KIF 14 | 15 | EXTERNAL SOURCES: 16 | JPSimulatorHacks: 17 | :path: "." 18 | 19 | SPEC CHECKSUMS: 20 | Expecta: 78b4e8b0c8291fa4524d7f74016b6065c2e391ec 21 | JPSimulatorHacks: 28428b30259eb93ad558ac3f2c608acd2133a14b 22 | KIF: b518c9831453abea5afdbbde3908ec47832d6d56 23 | 24 | PODFILE CHECKSUM: ac57d2de111a2bdf8077628fc091ddf13a7356a3 25 | 26 | COCOAPODS: 1.2.1 27 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/EXPBlockDefinedMatcher.h: -------------------------------------------------------------------------------- 1 | // 2 | // EXPRuntimeMatcher.h 3 | // Expecta 4 | // 5 | // Created by Luke Redpath on 26/03/2012. 6 | // Copyright (c) 2012 Peter Jihoon Kim. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "EXPMatcher.h" 11 | #import "EXPDefines.h" 12 | 13 | @interface EXPBlockDefinedMatcher : NSObject { 14 | EXPBoolBlock prerequisiteBlock; 15 | EXPBoolBlock matchBlock; 16 | EXPStringBlock failureMessageForToBlock; 17 | EXPStringBlock failureMessageForNotToBlock; 18 | } 19 | 20 | @property(nonatomic, copy) EXPBoolBlock prerequisiteBlock; 21 | @property(nonatomic, copy) EXPBoolBlock matchBlock; 22 | @property(nonatomic, copy) EXPStringBlock failureMessageForToBlock; 23 | @property(nonatomic, copy) EXPStringBlock failureMessageForNotToBlock; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/EXPBlockDefinedMatcher.m: -------------------------------------------------------------------------------- 1 | // 2 | // EXPRuntimeMatcher.m 3 | // Expecta 4 | // 5 | // Created by Luke Redpath on 26/03/2012. 6 | // Copyright (c) 2012 Peter Jihoon Kim. All rights reserved. 7 | // 8 | 9 | #import "EXPBlockDefinedMatcher.h" 10 | 11 | @implementation EXPBlockDefinedMatcher 12 | 13 | - (void)dealloc 14 | { 15 | self.prerequisiteBlock = nil; 16 | self.matchBlock = nil; 17 | self.failureMessageForToBlock = nil; 18 | self.failureMessageForNotToBlock = nil; 19 | 20 | [super dealloc]; 21 | } 22 | 23 | @synthesize prerequisiteBlock; 24 | @synthesize matchBlock; 25 | @synthesize failureMessageForToBlock; 26 | @synthesize failureMessageForNotToBlock; 27 | 28 | - (BOOL)meetsPrerequesiteFor:(id)actual 29 | { 30 | if (self.prerequisiteBlock) { 31 | return self.prerequisiteBlock(); 32 | } 33 | return YES; 34 | } 35 | 36 | - (BOOL)matches:(id)actual 37 | { 38 | if (self.matchBlock) { 39 | return self.matchBlock(); 40 | } 41 | return YES; 42 | } 43 | 44 | - (NSString *)failureMessageForTo:(id)actual 45 | { 46 | if (self.failureMessageForToBlock) { 47 | return self.failureMessageForToBlock(); 48 | } 49 | return nil; 50 | } 51 | 52 | - (NSString *)failureMessageForNotTo:(id)actual 53 | { 54 | if (self.failureMessageForNotToBlock) { 55 | return self.failureMessageForNotToBlock(); 56 | } 57 | return nil; 58 | } 59 | 60 | @end 61 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/EXPDefines.h: -------------------------------------------------------------------------------- 1 | // 2 | // EXPDefines.h 3 | // Expecta 4 | // 5 | // Created by Luke Redpath on 26/03/2012. 6 | // Copyright (c) 2012 Peter Jihoon Kim. All rights reserved. 7 | // 8 | 9 | #ifndef Expecta_EXPDefines_h 10 | #define Expecta_EXPDefines_h 11 | 12 | typedef void (^EXPBasicBlock)(); 13 | typedef id (^EXPIdBlock)(); 14 | typedef BOOL (^EXPBoolBlock)(); 15 | typedef NSString *(^EXPStringBlock)(); 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/EXPDoubleTuple.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface EXPDoubleTuple : NSObject { 4 | double *_values; 5 | size_t _size; 6 | } 7 | 8 | @property (nonatomic, assign) double *values; 9 | @property (nonatomic, assign) size_t size; 10 | 11 | - (instancetype)initWithDoubleValues:(double *)values size:(size_t)size NS_DESIGNATED_INITIALIZER; 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/EXPDoubleTuple.m: -------------------------------------------------------------------------------- 1 | #import "EXPDoubleTuple.h" 2 | 3 | @implementation EXPDoubleTuple 4 | 5 | @synthesize values = _values, size = _size; 6 | 7 | - (instancetype)initWithDoubleValues:(double *)values size:(size_t)size { 8 | if ((self = [super init])) { 9 | self.values = malloc(sizeof(double) * size); 10 | memcpy(self.values, values, sizeof(double) * size); 11 | self.size = size; 12 | } 13 | return self; 14 | } 15 | 16 | - (void)dealloc { 17 | free(self.values); 18 | [super dealloc]; 19 | } 20 | 21 | - (BOOL)isEqual:(id)object { 22 | if (![object isKindOfClass:[EXPDoubleTuple class]]) return NO; 23 | EXPDoubleTuple *other = (EXPDoubleTuple *)object; 24 | if (self.size == other.size) { 25 | for (int i = 0; i < self.size; ++i) { 26 | if (self.values[i] != other.values[i]) return NO; 27 | } 28 | return YES; 29 | } 30 | return NO; 31 | } 32 | 33 | - (NSString *)description { 34 | if (self.size == 2) { 35 | return [NSString stringWithFormat:@"Double tuple: {%f, %f}", self.values[0], self.values[1]]; 36 | } else if (self.size == 4) { 37 | return [NSString stringWithFormat:@"Double tuple: {%f, %f, %f, %f}", self.values[0], self.values[1], self.values[2], self.values[3]]; 38 | } 39 | return [NSString stringWithFormat:@"Double tuple of unexpected size %zd, sadly", self.size]; 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/EXPExpect.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "EXPMatcher.h" 3 | #import "EXPDefines.h" 4 | 5 | @interface EXPExpect : NSObject { 6 | EXPIdBlock _actualBlock; 7 | id _testCase; 8 | int _lineNumber; 9 | char *_fileName; 10 | BOOL _negative; 11 | BOOL _asynchronous; 12 | NSTimeInterval _timeout; 13 | } 14 | 15 | @property(nonatomic, copy) EXPIdBlock actualBlock; 16 | @property(nonatomic, readonly) id actual; 17 | @property(nonatomic, assign) id testCase; 18 | @property(nonatomic) int lineNumber; 19 | @property(nonatomic) const char *fileName; 20 | @property(nonatomic) BOOL negative; 21 | @property(nonatomic) BOOL asynchronous; 22 | @property(nonatomic) NSTimeInterval timeout; 23 | 24 | @property(nonatomic, readonly) EXPExpect *to; 25 | @property(nonatomic, readonly) EXPExpect *toNot; 26 | @property(nonatomic, readonly) EXPExpect *notTo; 27 | @property(nonatomic, readonly) EXPExpect *will; 28 | @property(nonatomic, readonly) EXPExpect *willNot; 29 | @property(nonatomic, readonly) EXPExpect *(^after)(NSTimeInterval timeInterval); 30 | 31 | - (instancetype)initWithActualBlock:(id)actualBlock testCase:(id)testCase lineNumber:(int)lineNumber fileName:(const char *)fileName NS_DESIGNATED_INITIALIZER; 32 | + (EXPExpect *)expectWithActualBlock:(id)actualBlock testCase:(id)testCase lineNumber:(int)lineNumber fileName:(const char *)fileName; 33 | 34 | - (void)applyMatcher:(id)matcher; 35 | - (void)applyMatcher:(id)matcher to:(NSObject **)actual; 36 | 37 | @end 38 | 39 | @interface EXPDynamicPredicateMatcher : NSObject { 40 | EXPExpect *_expectation; 41 | SEL _selector; 42 | } 43 | - (instancetype)initWithExpectation:(EXPExpect *)expectation selector:(SEL)selector NS_DESIGNATED_INITIALIZER; 44 | @property (nonatomic, readonly, copy) void (^dispatch)(void); 45 | @end 46 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/EXPFloatTuple.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface EXPFloatTuple : NSObject { 4 | float *_values; 5 | size_t _size; 6 | } 7 | 8 | @property (nonatomic, assign) float *values; 9 | @property (nonatomic, assign) size_t size; 10 | 11 | - (instancetype)initWithFloatValues:(float *)values size:(size_t)size NS_DESIGNATED_INITIALIZER; 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/EXPFloatTuple.m: -------------------------------------------------------------------------------- 1 | #import "EXPFloatTuple.h" 2 | 3 | @implementation EXPFloatTuple 4 | 5 | @synthesize values = _values, size = _size; 6 | 7 | - (instancetype)initWithFloatValues:(float *)values size:(size_t)size { 8 | if ((self = [super init])) { 9 | self.values = malloc(sizeof(float) * size); 10 | memcpy(self.values, values, sizeof(float) * size); 11 | self.size = size; 12 | } 13 | return self; 14 | } 15 | 16 | - (void)dealloc { 17 | free(self.values); 18 | [super dealloc]; 19 | } 20 | 21 | - (BOOL)isEqual:(id)object { 22 | if (![object isKindOfClass:[EXPFloatTuple class]]) return NO; 23 | EXPFloatTuple *other = (EXPFloatTuple *)object; 24 | if (self.size == other.size) { 25 | for (int i = 0; i < self.size; ++i) { 26 | if (self.values[i] != other.values[i]) return NO; 27 | } 28 | return YES; 29 | } 30 | return NO; 31 | } 32 | 33 | - (NSUInteger)hash 34 | { 35 | NSUInteger prime = 31; 36 | NSUInteger hash = 0; 37 | for (int i=0; i 10 | 11 | @protocol EXPMatcher 12 | 13 | - (BOOL)matches:(id)actual; 14 | 15 | @optional 16 | - (BOOL)meetsPrerequesiteFor:(id)actual; 17 | - (NSString *)failureMessageForTo:(id)actual; 18 | - (NSString *)failureMessageForNotTo:(id)actual; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/EXPUnsupportedObject.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface EXPUnsupportedObject : NSObject { 4 | NSString *_type; 5 | } 6 | 7 | @property (nonatomic, retain) NSString *type; 8 | 9 | - (instancetype)initWithType:(NSString *)type NS_DESIGNATED_INITIALIZER; 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/EXPUnsupportedObject.m: -------------------------------------------------------------------------------- 1 | #import "EXPUnsupportedObject.h" 2 | 3 | @implementation EXPUnsupportedObject 4 | 5 | @synthesize type=_type; 6 | 7 | - (instancetype)initWithType:(NSString *)type { 8 | self = [super init]; 9 | if(self) { 10 | self.type = type; 11 | } 12 | return self; 13 | } 14 | 15 | - (void)dealloc { 16 | self.type = nil; 17 | [super dealloc]; 18 | } 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Expecta.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | //! Project version number for Expecta. 4 | FOUNDATION_EXPORT double ExpectaVersionNumber; 5 | 6 | //! Project version string for Expecta. 7 | FOUNDATION_EXPORT const unsigned char ExpectaVersionString[]; 8 | 9 | #import 10 | #import 11 | #import 12 | 13 | // Enable shorthand by default 14 | #define expect(...) EXP_expect((__VA_ARGS__)) 15 | #define failure(...) EXP_failure((__VA_ARGS__)) -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/ExpectaObject.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #define EXPObjectify(value) _EXPObjectify(@encode(__typeof__((value))), (value)) 4 | #define EXP_expect(actual) _EXP_expect(self, __LINE__, __FILE__, ^id{ return EXPObjectify((actual)); }) 5 | #define EXPMatcherInterface(matcherName, matcherArguments) _EXPMatcherInterface(matcherName, matcherArguments) 6 | #define EXPMatcherImplementationBegin(matcherName, matcherArguments) _EXPMatcherImplementationBegin(matcherName, matcherArguments) 7 | #define EXPMatcherImplementationEnd _EXPMatcherImplementationEnd 8 | #define EXPMatcherAliasImplementation(newMatcherName, oldMatcherName, matcherArguments) _EXPMatcherAliasImplementation(newMatcherName, oldMatcherName, matcherArguments) 9 | 10 | #define EXP_failure(message) EXPFail(self, __LINE__, __FILE__, message) 11 | 12 | 13 | @interface Expecta : NSObject 14 | 15 | + (NSTimeInterval)asynchronousTestTimeout; 16 | + (void)setAsynchronousTestTimeout:(NSTimeInterval)timeout; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/ExpectaObject.m: -------------------------------------------------------------------------------- 1 | #import "ExpectaObject.h" 2 | 3 | @implementation Expecta 4 | 5 | static NSTimeInterval _asynchronousTestTimeout = 1.0; 6 | 7 | + (NSTimeInterval)asynchronousTestTimeout { 8 | return _asynchronousTestTimeout; 9 | } 10 | 11 | + (void)setAsynchronousTestTimeout:(NSTimeInterval)timeout { 12 | _asynchronousTestTimeout = timeout; 13 | } 14 | 15 | @end -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/ExpectaSupport.h: -------------------------------------------------------------------------------- 1 | #import "EXPExpect.h" 2 | #import "EXPBlockDefinedMatcher.h" 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | id _EXPObjectify(const char *type, ...); 9 | EXPExpect *_EXP_expect(id testCase, int lineNumber, const char *fileName, EXPIdBlock actualBlock); 10 | 11 | void EXPFail(id testCase, int lineNumber, const char *fileName, NSString *message); 12 | NSString *EXPDescribeObject(id obj); 13 | 14 | void EXP_prerequisite(EXPBoolBlock block); 15 | void EXP_match(EXPBoolBlock block); 16 | void EXP_failureMessageForTo(EXPStringBlock block); 17 | void EXP_failureMessageForNotTo(EXPStringBlock block); 18 | 19 | #if __has_feature(objc_arc) 20 | #define _EXP_release(x) 21 | #define _EXP_autorelease(x) (x) 22 | 23 | #else 24 | #define _EXP_release(x) [x release] 25 | #define _EXP_autorelease(x) [x autorelease] 26 | #endif 27 | 28 | // workaround for the categories bug: http://developer.apple.com/library/mac/#qa/qa1490/_index.html 29 | #define EXPFixCategoriesBug(name) \ 30 | __attribute__((constructor)) static void EXPFixCategoriesBug##name() {} 31 | 32 | #define _EXPMatcherInterface(matcherName, matcherArguments) \ 33 | @interface EXPExpect (matcherName##Matcher) \ 34 | @property (nonatomic, readonly) void(^ matcherName) matcherArguments; \ 35 | @end 36 | 37 | #define _EXPMatcherImplementationBegin(matcherName, matcherArguments) \ 38 | EXPFixCategoriesBug(EXPMatcher##matcherName##Matcher); \ 39 | @implementation EXPExpect (matcherName##Matcher) \ 40 | @dynamic matcherName;\ 41 | - (void(^) matcherArguments) matcherName { \ 42 | EXPBlockDefinedMatcher *matcher = [[EXPBlockDefinedMatcher alloc] init]; \ 43 | [[[NSThread currentThread] threadDictionary] setObject:matcher forKey:@"EXP_currentMatcher"]; \ 44 | __block id actual = self.actual; \ 45 | __block void (^prerequisite)(EXPBoolBlock block) = ^(EXPBoolBlock block) { EXP_prerequisite(block); }; \ 46 | __block void (^match)(EXPBoolBlock block) = ^(EXPBoolBlock block) { EXP_match(block); }; \ 47 | __block void (^failureMessageForTo)(EXPStringBlock block) = ^(EXPStringBlock block) { EXP_failureMessageForTo(block); }; \ 48 | __block void (^failureMessageForNotTo)(EXPStringBlock block) = ^(EXPStringBlock block) { EXP_failureMessageForNotTo(block); }; \ 49 | prerequisite(nil); match(nil); failureMessageForTo(nil); failureMessageForNotTo(nil); \ 50 | void (^matcherBlock) matcherArguments = [^ matcherArguments { \ 51 | { 52 | 53 | #define _EXPMatcherImplementationEnd \ 54 | } \ 55 | [self applyMatcher:matcher to:&actual]; \ 56 | } copy]; \ 57 | _EXP_release(matcher); \ 58 | return _EXP_autorelease(matcherBlock); \ 59 | } \ 60 | @end 61 | 62 | #define _EXPMatcherAliasImplementation(newMatcherName, oldMatcherName, matcherArguments) \ 63 | EXPFixCategoriesBug(EXPMatcher##newMatcherName##Matcher); \ 64 | @implementation EXPExpect (newMatcherName##Matcher) \ 65 | @dynamic newMatcherName;\ 66 | - (void(^) matcherArguments) newMatcherName { \ 67 | return [self oldMatcherName]; \ 68 | }\ 69 | @end 70 | 71 | #ifdef __cplusplus 72 | } 73 | #endif 74 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatcherHelpers.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | BOOL EXPIsValuePointer(NSValue *value); 4 | BOOL EXPIsNumberFloat(NSNumber *number); 5 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatcherHelpers.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatcherHelpers.h" 2 | 3 | BOOL EXPIsValuePointer(NSValue *value) { 4 | return [value objCType][0] == @encode(void *)[0]; 5 | } 6 | 7 | BOOL EXPIsNumberFloat(NSNumber *number) { 8 | return strcmp([number objCType], @encode(float)) == 0; 9 | } 10 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+beCloseTo.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(_beCloseToWithin, (id expected, id within)); 4 | EXPMatcherInterface(beCloseToWithin, (id expected, id within)); 5 | 6 | #define beCloseTo(expected) _beCloseToWithin(EXPObjectify((expected)), nil) 7 | #define beCloseToWithin(expected, range) _beCloseToWithin(EXPObjectify((expected)), EXPObjectify((range))) 8 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+beCloseTo.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+beCloseTo.h" 2 | #import "EXPMatcherHelpers.h" 3 | 4 | EXPMatcherImplementationBegin(_beCloseToWithin, (id expected, id within)) { 5 | prerequisite(^BOOL{ 6 | return [actual isKindOfClass:[NSNumber class]] && 7 | [expected isKindOfClass:[NSNumber class]] && 8 | ([within isKindOfClass:[NSNumber class]] || (within == nil)); 9 | }); 10 | 11 | match(^BOOL{ 12 | double actualValue = [actual doubleValue]; 13 | double expectedValue = [expected doubleValue]; 14 | 15 | if (within != nil) { 16 | double withinValue = [within doubleValue]; 17 | double lowerBound = expectedValue - withinValue; 18 | double upperBound = expectedValue + withinValue; 19 | return (actualValue >= lowerBound) && (actualValue <= upperBound); 20 | } else { 21 | double diff = fabs(actualValue - expectedValue); 22 | actualValue = fabs(actualValue); 23 | expectedValue = fabs(expectedValue); 24 | double largest = (expectedValue > actualValue) ? expectedValue : actualValue; 25 | return (diff <= largest * FLT_EPSILON); 26 | } 27 | }); 28 | 29 | failureMessageForTo(^NSString *{ 30 | if (within) { 31 | return [NSString stringWithFormat:@"expected %@ to be close to %@ within %@", 32 | EXPDescribeObject(actual), EXPDescribeObject(expected), EXPDescribeObject(within)]; 33 | } else { 34 | return [NSString stringWithFormat:@"expected %@ to be close to %@", 35 | EXPDescribeObject(actual), EXPDescribeObject(expected)]; 36 | } 37 | }); 38 | 39 | failureMessageForNotTo(^NSString *{ 40 | if (within) { 41 | return [NSString stringWithFormat:@"expected %@ not to be close to %@ within %@", 42 | EXPDescribeObject(actual), EXPDescribeObject(expected), EXPDescribeObject(within)]; 43 | } else { 44 | return [NSString stringWithFormat:@"expected %@ not to be close to %@", 45 | EXPDescribeObject(actual), EXPDescribeObject(expected)]; 46 | } 47 | }); 48 | } 49 | EXPMatcherImplementationEnd -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+beFalsy.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(beFalsy, (void)); 4 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+beFalsy.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+beFalsy.h" 2 | #import "EXPMatcherHelpers.h" 3 | 4 | EXPMatcherImplementationBegin(beFalsy, (void)) { 5 | match(^BOOL{ 6 | if([actual isKindOfClass:[NSNumber class]]) { 7 | return ![(NSNumber *)actual boolValue]; 8 | } else if([actual isKindOfClass:[NSValue class]]) { 9 | if(EXPIsValuePointer((NSValue *)actual)) { 10 | return ![(NSValue *)actual pointerValue]; 11 | } 12 | } 13 | return !actual; 14 | }); 15 | 16 | failureMessageForTo(^NSString *{ 17 | return [NSString stringWithFormat:@"expected: a falsy value, got: %@, which is truthy", EXPDescribeObject(actual)]; 18 | }); 19 | 20 | failureMessageForNotTo(^NSString *{ 21 | return [NSString stringWithFormat:@"expected: a non-falsy value, got: %@, which is falsy", EXPDescribeObject(actual)]; 22 | }); 23 | } 24 | EXPMatcherImplementationEnd 25 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+beGreaterThan.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(_beGreaterThan, (id expected)); 4 | EXPMatcherInterface(beGreaterThan, (id expected)); 5 | 6 | #define beGreaterThan(expected) _beGreaterThan(EXPObjectify((expected))) 7 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+beGreaterThan.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+beGreaterThan.h" 2 | #import "EXPMatcherHelpers.h" 3 | 4 | EXPMatcherImplementationBegin(_beGreaterThan, (id expected)) { 5 | match(^BOOL{ 6 | if ([actual respondsToSelector:@selector(compare:)]) { 7 | return [actual compare:expected] == NSOrderedDescending; 8 | } 9 | return NO; 10 | }); 11 | 12 | failureMessageForTo(^NSString *{ 13 | return [NSString stringWithFormat:@"expected: %@ to be greater than %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; 14 | }); 15 | 16 | failureMessageForNotTo(^NSString *{ 17 | return [NSString stringWithFormat:@"expected: %@ not to be greater than %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; 18 | }); 19 | } 20 | EXPMatcherImplementationEnd -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+beGreaterThanOrEqualTo.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(_beGreaterThanOrEqualTo, (id expected)); 4 | EXPMatcherInterface(beGreaterThanOrEqualTo, (id expected)); 5 | 6 | #define beGreaterThanOrEqualTo(expected) _beGreaterThanOrEqualTo(EXPObjectify((expected))) 7 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+beGreaterThanOrEqualTo.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+beGreaterThanOrEqualTo.h" 2 | #import "EXPMatcherHelpers.h" 3 | 4 | EXPMatcherImplementationBegin(_beGreaterThanOrEqualTo, (id expected)) { 5 | match(^BOOL{ 6 | if ([actual respondsToSelector:@selector(compare:)]) { 7 | return [actual compare:expected] != NSOrderedAscending; 8 | } 9 | return NO; 10 | }); 11 | 12 | failureMessageForTo(^NSString *{ 13 | return [NSString stringWithFormat:@"expected: %@ to be greater than or equal to %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; 14 | }); 15 | 16 | failureMessageForNotTo(^NSString *{ 17 | return [NSString stringWithFormat:@"expected: %@ not to be greater than or equal to %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; 18 | }); 19 | } 20 | EXPMatcherImplementationEnd -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+beIdenticalTo.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(_beIdenticalTo, (void *expected)); 4 | EXPMatcherInterface(beIdenticalTo, (void *expected)); // to aid code completion 5 | 6 | #if __has_feature(objc_arc) 7 | #define beIdenticalTo(expected) _beIdenticalTo((__bridge void*)expected) 8 | #else 9 | #define beIdenticalTo(expected) _beIdenticalTo(expected) 10 | #endif 11 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+beIdenticalTo.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+equal.h" 2 | #import "EXPMatcherHelpers.h" 3 | 4 | EXPMatcherImplementationBegin(_beIdenticalTo, (void *expected)) { 5 | match(^BOOL{ 6 | if(actual == expected) { 7 | return YES; 8 | } else if([actual isKindOfClass:[NSValue class]] && EXPIsValuePointer((NSValue *)actual)) { 9 | if([(NSValue *)actual pointerValue] == expected) { 10 | return YES; 11 | } 12 | } 13 | return NO; 14 | }); 15 | 16 | failureMessageForTo(^NSString *{ 17 | return [NSString stringWithFormat:@"expected: <%p>, got: <%p>", expected, actual]; 18 | }); 19 | 20 | failureMessageForNotTo(^NSString *{ 21 | return [NSString stringWithFormat:@"expected: not <%p>, got: <%p>", expected, actual]; 22 | }); 23 | } 24 | EXPMatcherImplementationEnd 25 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+beInTheRangeOf.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(_beInTheRangeOf, (id expectedLowerBound, id expectedUpperBound)); 4 | EXPMatcherInterface(beInTheRangeOf, (id expectedLowerBound, id expectedUpperBound)); 5 | 6 | #define beInTheRangeOf(expectedLowerBound, expectedUpperBound) _beInTheRangeOf(EXPObjectify((expectedLowerBound)), EXPObjectify((expectedUpperBound))) 7 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+beInTheRangeOf.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+beInTheRangeOf.h" 2 | #import "EXPMatcherHelpers.h" 3 | 4 | EXPMatcherImplementationBegin(_beInTheRangeOf, (id expectedLowerBound, id expectedUpperBound)) { 5 | match(^BOOL{ 6 | if ([actual respondsToSelector:@selector(compare:)]) { 7 | NSComparisonResult compareLowerBound = [expectedLowerBound compare: actual]; 8 | NSComparisonResult compareUpperBound = [expectedUpperBound compare: actual]; 9 | if (compareLowerBound == NSOrderedSame) { 10 | return YES; 11 | } 12 | if (compareUpperBound == NSOrderedSame) { 13 | return YES; 14 | } 15 | if ((compareLowerBound == NSOrderedAscending) && (compareUpperBound == NSOrderedDescending)) { 16 | return YES; 17 | } 18 | } 19 | return NO; 20 | }); 21 | 22 | failureMessageForTo(^NSString *{ 23 | return [NSString stringWithFormat:@"expected: %@ to be in the range [%@, %@] (inclusive)", EXPDescribeObject(actual), EXPDescribeObject(expectedLowerBound), EXPDescribeObject(expectedUpperBound)]; 24 | }); 25 | 26 | failureMessageForNotTo(^NSString *{ 27 | return [NSString stringWithFormat:@"expected: %@ not to be in the range [%@, %@] (inclusive)", EXPDescribeObject(actual), EXPDescribeObject(expectedLowerBound), EXPDescribeObject(expectedUpperBound)]; 28 | }); 29 | } 30 | EXPMatcherImplementationEnd -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+beInstanceOf.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(beInstanceOf, (Class expected)); 4 | EXPMatcherInterface(beAnInstanceOf, (Class expected)); 5 | EXPMatcherInterface(beMemberOf, (Class expected)); 6 | EXPMatcherInterface(beAMemberOf, (Class expected)); 7 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+beInstanceOf.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+beInstanceOf.h" 2 | 3 | EXPMatcherImplementationBegin(beInstanceOf, (Class expected)) { 4 | BOOL actualIsNil = (actual == nil); 5 | BOOL expectedIsNil = (expected == nil); 6 | 7 | prerequisite(^BOOL{ 8 | return !(actualIsNil || expectedIsNil); 9 | }); 10 | 11 | match(^BOOL{ 12 | return [actual isMemberOfClass:expected]; 13 | }); 14 | 15 | failureMessageForTo(^NSString *{ 16 | if(actualIsNil) return @"the actual value is nil/null"; 17 | if(expectedIsNil) return @"the expected value is nil/null"; 18 | return [NSString stringWithFormat:@"expected: an instance of %@, got: an instance of %@", [expected class], [actual class]]; 19 | }); 20 | 21 | failureMessageForNotTo(^NSString *{ 22 | if(actualIsNil) return @"the actual value is nil/null"; 23 | if(expectedIsNil) return @"the expected value is nil/null"; 24 | return [NSString stringWithFormat:@"expected: not an instance of %@, got: an instance of %@", [expected class], [actual class]]; 25 | }); 26 | } 27 | EXPMatcherImplementationEnd 28 | 29 | EXPMatcherAliasImplementation(beAnInstanceOf, beInstanceOf, (Class expected)); 30 | EXPMatcherAliasImplementation(beMemberOf, beInstanceOf, (Class expected)); 31 | EXPMatcherAliasImplementation(beAMemberOf, beInstanceOf, (Class expected)); 32 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+beKindOf.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(beKindOf, (Class expected)); 4 | EXPMatcherInterface(beAKindOf, (Class expected)); 5 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+beKindOf.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+beKindOf.h" 2 | 3 | EXPMatcherImplementationBegin(beKindOf, (Class expected)) { 4 | BOOL actualIsNil = (actual == nil); 5 | BOOL expectedIsNil = (expected == nil); 6 | 7 | prerequisite(^BOOL{ 8 | return !(actualIsNil || expectedIsNil); 9 | }); 10 | 11 | match(^BOOL{ 12 | return [actual isKindOfClass:expected]; 13 | }); 14 | 15 | failureMessageForTo(^NSString *{ 16 | if(actualIsNil) return @"the actual value is nil/null"; 17 | if(expectedIsNil) return @"the expected value is nil/null"; 18 | return [NSString stringWithFormat:@"expected: a kind of %@, got: an instance of %@, which is not a kind of %@", [expected class], [actual class], [expected class]]; 19 | }); 20 | 21 | failureMessageForNotTo(^NSString *{ 22 | if(actualIsNil) return @"the actual value is nil/null"; 23 | if(expectedIsNil) return @"the expected value is nil/null"; 24 | return [NSString stringWithFormat:@"expected: not a kind of %@, got: an instance of %@, which is a kind of %@", [expected class], [actual class], [expected class]]; 25 | }); 26 | } 27 | EXPMatcherImplementationEnd 28 | 29 | EXPMatcherAliasImplementation(beAKindOf, beKindOf, (Class expected)); 30 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+beLessThan.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(_beLessThan, (id expected)); 4 | EXPMatcherInterface(beLessThan, (id expected)); 5 | 6 | #define beLessThan(expected) _beLessThan(EXPObjectify((expected))) 7 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+beLessThan.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+beLessThan.h" 2 | #import "EXPMatcherHelpers.h" 3 | 4 | EXPMatcherImplementationBegin(_beLessThan, (id expected)) { 5 | match(^BOOL{ 6 | if ([actual respondsToSelector:@selector(compare:)]) { 7 | return [actual compare:expected] == NSOrderedAscending; 8 | } 9 | return NO; 10 | }); 11 | 12 | failureMessageForTo(^NSString *{ 13 | return [NSString stringWithFormat:@"expected: %@ to be less than %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; 14 | }); 15 | 16 | failureMessageForNotTo(^NSString *{ 17 | return [NSString stringWithFormat:@"expected: %@ not to be less than %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; 18 | }); 19 | } 20 | EXPMatcherImplementationEnd -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+beLessThanOrEqualTo.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(_beLessThanOrEqualTo, (id expected)); 4 | EXPMatcherInterface(beLessThanOrEqualTo, (id expected)); 5 | 6 | #define beLessThanOrEqualTo(expected) _beLessThanOrEqualTo(EXPObjectify((expected))) 7 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+beLessThanOrEqualTo.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+beLessThanOrEqualTo.h" 2 | #import "EXPMatcherHelpers.h" 3 | 4 | EXPMatcherImplementationBegin(_beLessThanOrEqualTo, (id expected)) { 5 | match(^BOOL{ 6 | if ([actual respondsToSelector:@selector(compare:)]) { 7 | return [actual compare:expected] != NSOrderedDescending; 8 | } 9 | return NO; 10 | }); 11 | 12 | failureMessageForTo(^NSString *{ 13 | return [NSString stringWithFormat:@"expected: %@ to be less than or equal to %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; 14 | }); 15 | 16 | failureMessageForNotTo(^NSString *{ 17 | return [NSString stringWithFormat:@"expected: %@ not to be less than or equal to %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; 18 | }); 19 | } 20 | EXPMatcherImplementationEnd -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+beNil.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(beNil, (void)); 4 | EXPMatcherInterface(beNull, (void)); 5 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+beNil.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+beNil.h" 2 | 3 | EXPMatcherImplementationBegin(beNil, (void)) { 4 | match(^BOOL{ 5 | return actual == nil; 6 | }); 7 | 8 | failureMessageForTo(^NSString *{ 9 | return [NSString stringWithFormat:@"expected: nil/null, got: %@", EXPDescribeObject(actual)]; 10 | }); 11 | 12 | failureMessageForNotTo(^NSString *{ 13 | return [NSString stringWithFormat:@"expected: not nil/null, got: %@", EXPDescribeObject(actual)]; 14 | }); 15 | } 16 | EXPMatcherImplementationEnd 17 | 18 | EXPMatcherAliasImplementation(beNull, beNil, (void)); 19 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+beSubclassOf.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(beSubclassOf, (Class expected)); 4 | EXPMatcherInterface(beASubclassOf, (Class expected)); 5 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+beSubclassOf.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+beSubclassOf.h" 2 | #import "NSValue+Expecta.h" 3 | #import 4 | 5 | EXPMatcherImplementationBegin(beSubclassOf, (Class expected)) { 6 | __block BOOL actualIsClass = YES; 7 | 8 | prerequisite(^BOOL { 9 | actualIsClass = class_isMetaClass(object_getClass(actual)); 10 | return actualIsClass; 11 | }); 12 | 13 | match(^BOOL{ 14 | return [actual isSubclassOfClass:expected]; 15 | }); 16 | 17 | failureMessageForTo(^NSString *{ 18 | if(!actualIsClass) return @"the actual value is not a Class"; 19 | return [NSString stringWithFormat:@"expected: a subclass of %@, got: a class %@, which is not a subclass of %@", [expected class], actual, [expected class]]; 20 | }); 21 | 22 | failureMessageForNotTo(^NSString *{ 23 | if(!actualIsClass) return @"the actual value is not a Class"; 24 | return [NSString stringWithFormat:@"expected: not a subclass of %@, got: a class %@, which is a subclass of %@", [expected class], actual, [expected class]]; 25 | }); 26 | } 27 | EXPMatcherImplementationEnd 28 | 29 | EXPMatcherAliasImplementation(beASubclassOf, beSubclassOf, (Class expected)); 30 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+beSupersetOf.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(beSupersetOf, (id subset)); 4 | 5 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+beSupersetOf.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+contain.h" 2 | 3 | EXPMatcherImplementationBegin(beSupersetOf, (id subset)) { 4 | BOOL actualIsCompatible = [actual isKindOfClass:[NSDictionary class]] || [actual respondsToSelector:@selector(containsObject:)]; 5 | BOOL subsetIsNil = (subset == nil); 6 | 7 | // For some instances the isKindOfClass: method returns false, even though 8 | // they are both actually dictionaries. e.g. Comparing a NSCFDictionary and a 9 | // NSDictionary. 10 | // Or in cases when you compare NSMutableArray (which implementation is __NSArrayM:NSMutableArray:NSArray) 11 | // and NSArray (which implementation is __NSArrayI:NSArray) 12 | BOOL bothAreIdenticalCollectionClasses = ([actual isKindOfClass:[NSDictionary class]] && [subset isKindOfClass:[NSDictionary class]]) || 13 | ([actual isKindOfClass:[NSArray class]] && [subset isKindOfClass:[NSArray class]]) || 14 | ([actual isKindOfClass:[NSSet class]] && [subset isKindOfClass:[NSSet class]]) || 15 | ([actual isKindOfClass:[NSOrderedSet class]] && [subset isKindOfClass:[NSOrderedSet class]]); 16 | 17 | BOOL classMatches = bothAreIdenticalCollectionClasses || [subset isKindOfClass:[actual class]]; 18 | 19 | prerequisite(^BOOL{ 20 | return actualIsCompatible && !subsetIsNil && classMatches; 21 | }); 22 | 23 | match(^BOOL{ 24 | if(!actualIsCompatible) return NO; 25 | 26 | if([actual isKindOfClass:[NSDictionary class]]) { 27 | for (id key in subset) { 28 | id actualValue = [actual valueForKey:key]; 29 | id subsetValue = [subset valueForKey:key]; 30 | 31 | if (![subsetValue isEqual:actualValue]) return NO; 32 | } 33 | } else { 34 | for (id object in subset) { 35 | if (![actual containsObject:object]) return NO; 36 | } 37 | } 38 | 39 | return YES; 40 | }); 41 | 42 | failureMessageForTo(^NSString *{ 43 | if(!actualIsCompatible) return [NSString stringWithFormat:@"%@ is not an instance of NSDictionary and does not implement -containsObject:", EXPDescribeObject(actual)]; 44 | 45 | if(subsetIsNil) return @"the expected value is nil/null"; 46 | 47 | if(!classMatches) return [NSString stringWithFormat:@"%@ does not match the class of %@", EXPDescribeObject(subset), EXPDescribeObject(actual)]; 48 | 49 | return [NSString stringWithFormat:@"expected %@ to be a superset of %@", EXPDescribeObject(actual), EXPDescribeObject(subset)]; 50 | }); 51 | 52 | failureMessageForNotTo(^NSString *{ 53 | if(!actualIsCompatible) return [NSString stringWithFormat:@"%@ is not an instance of NSDictionary and does not implement -containsObject:", EXPDescribeObject(actual)]; 54 | 55 | if(subsetIsNil) return @"the expected value is nil/null"; 56 | 57 | if(!classMatches) return [NSString stringWithFormat:@"%@ does not match the class of %@", EXPDescribeObject(subset), EXPDescribeObject(actual)]; 58 | 59 | return [NSString stringWithFormat:@"expected %@ not to be a superset of %@", EXPDescribeObject(actual), EXPDescribeObject(subset)]; 60 | }); 61 | } 62 | EXPMatcherImplementationEnd 63 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+beTruthy.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(beTruthy, (void)); 4 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+beTruthy.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+beTruthy.h" 2 | #import "EXPMatcherHelpers.h" 3 | 4 | EXPMatcherImplementationBegin(beTruthy, (void)) { 5 | match(^BOOL{ 6 | if([actual isKindOfClass:[NSNumber class]]) { 7 | return !![(NSNumber *)actual boolValue]; 8 | } else if([actual isKindOfClass:[NSValue class]]) { 9 | if(EXPIsValuePointer((NSValue *)actual)) { 10 | return !![(NSValue *)actual pointerValue]; 11 | } 12 | } 13 | return !!actual; 14 | }); 15 | 16 | failureMessageForTo(^NSString *{ 17 | return [NSString stringWithFormat:@"expected: a truthy value, got: %@, which is falsy", EXPDescribeObject(actual)]; 18 | }); 19 | 20 | failureMessageForNotTo(^NSString *{ 21 | return [NSString stringWithFormat:@"expected: a non-truthy value, got: %@, which is truthy", EXPDescribeObject(actual)]; 22 | }); 23 | } 24 | EXPMatcherImplementationEnd 25 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+beginWith.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(beginWith, (id expected)); 4 | EXPMatcherInterface(startWith, (id expected)); 5 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+beginWith.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+beginWith.h" 2 | 3 | EXPMatcherImplementationBegin(beginWith, (id expected)) { 4 | BOOL actualIsNil = (actual == nil); 5 | BOOL expectedIsNil = (expected == nil); 6 | //This condition allows the comparison of an immutable string or ordered collection to the mutable type of the same 7 | BOOL actualAndExpectedAreCompatible = (([actual isKindOfClass:[NSString class]] && [expected isKindOfClass:[NSString class]]) 8 | || ([actual isKindOfClass:[NSArray class]] && [expected isKindOfClass:[NSArray class]]) 9 | || ([actual isKindOfClass:[NSOrderedSet class]] && [expected isKindOfClass:[NSOrderedSet class]])); 10 | 11 | prerequisite(^BOOL { 12 | return actualAndExpectedAreCompatible; 13 | }); 14 | 15 | match(^BOOL { 16 | if ([actual isKindOfClass:[NSString class]]) { 17 | return [actual hasPrefix:expected]; 18 | } else if ([actual isKindOfClass:[NSArray class]]) { 19 | if ([expected count] > [actual count] || [expected count] == 0) { 20 | return NO; 21 | } 22 | NSArray *subArray = [actual subarrayWithRange:NSMakeRange(0, [expected count])]; 23 | return [subArray isEqualToArray:expected]; 24 | } else { 25 | if ([expected count] > [actual count] || [expected count] == 0) { 26 | return NO; 27 | } 28 | 29 | NSOrderedSet *subset = [NSOrderedSet orderedSetWithOrderedSet:actual range:NSMakeRange(0, [expected count]) copyItems:NO]; 30 | return [subset isEqualToOrderedSet:expected]; 31 | } 32 | }); 33 | 34 | failureMessageForTo(^NSString *{ 35 | if (actualIsNil) return @"the object is nil/null"; 36 | if (expectedIsNil) return @"the expected value is nil/null"; 37 | if (!actualAndExpectedAreCompatible) return [NSString stringWithFormat:@"%@ and %@ are not instances of one of %@, %@, or %@", EXPDescribeObject(actual), EXPDescribeObject(expected), [NSString class], [NSArray class], [NSOrderedSet class]]; 38 | return [NSString stringWithFormat:@"expected: %@ to begin with %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; 39 | }); 40 | 41 | failureMessageForNotTo(^NSString *{ 42 | if (actualIsNil) return @"the object is nil/null"; 43 | if (expectedIsNil) return @"the expected value is nil/null"; 44 | if (!actualAndExpectedAreCompatible) return [NSString stringWithFormat:@"%@ and %@ are not instances of one of %@, %@, or %@", EXPDescribeObject(actual), EXPDescribeObject(expected), [NSString class], [NSArray class], [NSOrderedSet class]]; 45 | 46 | return [NSString stringWithFormat:@"expected: %@ not to begin with %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; 47 | }); 48 | } 49 | EXPMatcherImplementationEnd 50 | 51 | EXPMatcherAliasImplementation(startWith, beginWith, (id expected)); 52 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+conformTo.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(conformTo, (Protocol *expected)); 4 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+conformTo.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+conformTo.h" 2 | #import "NSValue+Expecta.h" 3 | #import 4 | 5 | EXPMatcherImplementationBegin(conformTo, (Protocol *expected)) { 6 | BOOL actualIsNil = (actual == nil); 7 | BOOL expectedIsNil = (expected == nil); 8 | 9 | prerequisite(^BOOL{ 10 | return !(actualIsNil || expectedIsNil); 11 | }); 12 | 13 | match(^BOOL{ 14 | return [actual conformsToProtocol:expected]; 15 | }); 16 | 17 | failureMessageForTo(^NSString *{ 18 | if(actualIsNil) return @"the object is nil/null"; 19 | if(expectedIsNil) return @"the protocol is nil/null"; 20 | 21 | NSString *name = NSStringFromProtocol(expected); 22 | return [NSString stringWithFormat:@"expected: %@ to conform to %@", actual, name]; 23 | }); 24 | 25 | failureMessageForNotTo(^NSString *{ 26 | if(actualIsNil) return @"the object is nil/null"; 27 | if(expectedIsNil) return @"the protocol is nil/null"; 28 | 29 | NSString *name = NSStringFromProtocol(expected); 30 | return [NSString stringWithFormat:@"expected: %@ not to conform to %@", actual, name]; 31 | }); 32 | } 33 | EXPMatcherImplementationEnd 34 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+contain.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(_contain, (id expected)); 4 | EXPMatcherInterface(contain, (id expected)); // to aid code completion 5 | #define contain(expected) _contain(EXPObjectify((expected))) 6 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+contain.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+contain.h" 2 | 3 | EXPMatcherImplementationBegin(_contain, (id expected)) { 4 | BOOL actualIsCompatible = [actual isKindOfClass:[NSString class]] || [actual conformsToProtocol:@protocol(NSFastEnumeration)]; 5 | BOOL expectedIsNil = (expected == nil); 6 | 7 | prerequisite(^BOOL{ 8 | return actualIsCompatible && !expectedIsNil; 9 | }); 10 | 11 | match(^BOOL{ 12 | if(actualIsCompatible) { 13 | if([actual isKindOfClass:[NSString class]]) { 14 | return [(NSString *)actual rangeOfString:[expected description]].location != NSNotFound; 15 | } else { 16 | for (id object in actual) { 17 | if ([object isEqual:expected]) { 18 | return YES; 19 | } 20 | } 21 | } 22 | } 23 | return NO; 24 | }); 25 | 26 | failureMessageForTo(^NSString *{ 27 | if(!actualIsCompatible) return [NSString stringWithFormat:@"%@ is not an instance of NSString or NSFastEnumeration", EXPDescribeObject(actual)]; 28 | if(expectedIsNil) return @"the expected value is nil/null"; 29 | return [NSString stringWithFormat:@"expected %@ to contain %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; 30 | }); 31 | 32 | failureMessageForNotTo(^NSString *{ 33 | if(!actualIsCompatible) return [NSString stringWithFormat:@"%@ is not an instance of NSString or NSFastEnumeration", EXPDescribeObject(actual)]; 34 | if(expectedIsNil) return @"the expected value is nil/null"; 35 | return [NSString stringWithFormat:@"expected %@ not to contain %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; 36 | }); 37 | } 38 | EXPMatcherImplementationEnd 39 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+endWith.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(endWith, (id expected)); 4 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+endWith.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+endWith.h" 2 | 3 | EXPMatcherImplementationBegin(endWith, (id expected)) { 4 | BOOL actualIsNil = (actual == nil); 5 | BOOL expectedIsNil = (expected == nil); 6 | //This condition allows the comparison of an immutable string or ordered collection to the mutable type of the same 7 | BOOL actualAndExpectedAreCompatible = (([actual isKindOfClass:[NSString class]] && [expected isKindOfClass:[NSString class]]) 8 | || ([actual isKindOfClass:[NSArray class]] && [expected isKindOfClass:[NSArray class]]) 9 | || ([actual isKindOfClass:[NSOrderedSet class]] && [expected isKindOfClass:[NSOrderedSet class]])); 10 | 11 | prerequisite(^BOOL { 12 | return actualAndExpectedAreCompatible; 13 | }); 14 | 15 | match(^BOOL { 16 | if ([actual isKindOfClass:[NSString class]]) { 17 | return [actual hasSuffix:expected]; 18 | } else if ([actual isKindOfClass:[NSArray class]]) { 19 | if ([expected count] > [actual count] || [expected count] == 0) { 20 | return NO; 21 | } 22 | NSArray *subArray = [actual subarrayWithRange:NSMakeRange([actual count] - [expected count], [expected count])]; 23 | return [subArray isEqualToArray:expected]; 24 | } else { 25 | if ([expected count] > [actual count] || [expected count] == 0) { 26 | return NO; 27 | } 28 | 29 | NSOrderedSet *subset = [NSOrderedSet orderedSetWithOrderedSet:actual range:NSMakeRange([actual count] - [expected count], [expected count]) copyItems:NO]; 30 | return [subset isEqualToOrderedSet:expected]; 31 | } 32 | }); 33 | 34 | failureMessageForTo(^NSString *{ 35 | if (actualIsNil) return @"the object is nil/null"; 36 | if (expectedIsNil) return @"the expected value is nil/null"; 37 | if (!actualAndExpectedAreCompatible) return [NSString stringWithFormat:@"%@ and %@ are not instances of one of %@, %@, or %@", EXPDescribeObject(actual), EXPDescribeObject(expected), [NSString class], [NSArray class], [NSOrderedSet class]]; 38 | return [NSString stringWithFormat:@"expected: %@ to end with %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; 39 | }); 40 | 41 | failureMessageForNotTo(^NSString *{ 42 | if (actualIsNil) return @"the object is nil/null"; 43 | if (expectedIsNil) return @"the expected value is nil/null"; 44 | if (!actualAndExpectedAreCompatible) return [NSString stringWithFormat:@"%@ and %@ are not instances of one of %@, %@, or %@", EXPDescribeObject(actual), EXPDescribeObject(expected), [NSString class], [NSArray class], [NSOrderedSet class]]; 45 | 46 | return [NSString stringWithFormat:@"expected: %@ not to end with %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; 47 | }); 48 | } 49 | EXPMatcherImplementationEnd 50 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+equal.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(_equal, (id expected)); 4 | EXPMatcherInterface(equal, (id expected)); // to aid code completion 5 | #define equal(...) _equal(EXPObjectify((__VA_ARGS__))) 6 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+equal.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+equal.h" 2 | #import "EXPMatcherHelpers.h" 3 | 4 | EXPMatcherImplementationBegin(_equal, (id expected)) { 5 | match(^BOOL{ 6 | if((actual == expected) || [actual isEqual:expected]) { 7 | return YES; 8 | } else if([actual isKindOfClass:[NSNumber class]] && [expected isKindOfClass:[NSNumber class]]) { 9 | if([actual isKindOfClass:[NSDecimalNumber class]] || [expected isKindOfClass:[NSDecimalNumber class]]) { 10 | NSDecimalNumber *actualDecimalNumber = [NSDecimalNumber decimalNumberWithDecimal:[(NSNumber *) actual decimalValue]]; 11 | NSDecimalNumber *expectedDecimalNumber = [NSDecimalNumber decimalNumberWithDecimal:[(NSNumber *) expected decimalValue]]; 12 | return [actualDecimalNumber isEqualToNumber:expectedDecimalNumber]; 13 | } 14 | else { 15 | if(EXPIsNumberFloat((NSNumber *)actual) || EXPIsNumberFloat((NSNumber *)expected)) { 16 | return [(NSNumber *)actual floatValue] == [(NSNumber *)expected floatValue]; 17 | } 18 | } 19 | } 20 | return NO; 21 | }); 22 | 23 | failureMessageForTo(^NSString *{ 24 | return [NSString stringWithFormat:@"expected: %@, got: %@", EXPDescribeObject(expected), EXPDescribeObject(actual)]; 25 | }); 26 | 27 | failureMessageForNotTo(^NSString *{ 28 | return [NSString stringWithFormat:@"expected: not %@, got: %@", EXPDescribeObject(expected), EXPDescribeObject(actual)]; 29 | }); 30 | } 31 | EXPMatcherImplementationEnd 32 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+haveCountOf.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(haveCountOf, (NSUInteger expected)); 4 | EXPMatcherInterface(haveCount, (NSUInteger expected)); 5 | EXPMatcherInterface(haveACountOf, (NSUInteger expected)); 6 | EXPMatcherInterface(haveLength, (NSUInteger expected)); 7 | EXPMatcherInterface(haveLengthOf, (NSUInteger expected)); 8 | EXPMatcherInterface(haveALengthOf, (NSUInteger expected)); 9 | 10 | #define beEmpty() haveCountOf(0) 11 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+haveCountOf.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+haveCountOf.h" 2 | 3 | EXPMatcherImplementationBegin(haveCountOf, (NSUInteger expected)) { 4 | BOOL actualIsStringy = [actual isKindOfClass:[NSString class]] || [actual isKindOfClass:[NSAttributedString class]]; 5 | BOOL actualIsCompatible = actualIsStringy || [actual respondsToSelector:@selector(count)]; 6 | 7 | prerequisite(^BOOL{ 8 | return actualIsCompatible; 9 | }); 10 | 11 | NSUInteger (^count)(id) = ^(id actual) { 12 | if(actualIsStringy) { 13 | return [actual length]; 14 | } else { 15 | return [actual count]; 16 | } 17 | }; 18 | 19 | match(^BOOL{ 20 | if(actualIsCompatible) { 21 | return count(actual) == expected; 22 | } 23 | return NO; 24 | }); 25 | 26 | failureMessageForTo(^NSString *{ 27 | if(!actualIsCompatible) return [NSString stringWithFormat:@"%@ is not an instance of NSString, NSAttributedString, NSArray, NSSet, NSOrderedSet, or NSDictionary", EXPDescribeObject(actual)]; 28 | return [NSString stringWithFormat:@"expected %@ to have a count of %zi but got %zi", EXPDescribeObject(actual), expected, count(actual)]; 29 | }); 30 | 31 | failureMessageForNotTo(^NSString *{ 32 | if(!actualIsCompatible) return [NSString stringWithFormat:@"%@ is not an instance of NSString, NSAttributedString, NSArray, NSSet, NSOrderedSet, or NSDictionary", EXPDescribeObject(actual)]; 33 | return [NSString stringWithFormat:@"expected %@ not to have a count of %zi", EXPDescribeObject(actual), expected]; 34 | }); 35 | } 36 | EXPMatcherImplementationEnd 37 | 38 | EXPMatcherAliasImplementation(haveCount, haveCountOf, (NSUInteger expected)); 39 | EXPMatcherAliasImplementation(haveACountOf, haveCountOf, (NSUInteger expected)); 40 | EXPMatcherAliasImplementation(haveLength, haveCountOf, (NSUInteger expected)); 41 | EXPMatcherAliasImplementation(haveLengthOf, haveCountOf, (NSUInteger expected)); 42 | EXPMatcherAliasImplementation(haveALengthOf, haveCountOf, (NSUInteger expected)); 43 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+match.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(match, (NSString *expected)); 4 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+match.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+match.h" 2 | #import "EXPMatcherHelpers.h" 3 | 4 | EXPMatcherImplementationBegin(match, (NSString *expected)) { 5 | BOOL actualIsNil = (actual == nil); 6 | BOOL expectedIsNil = (expected == nil); 7 | 8 | __block NSRegularExpression *regex = nil; 9 | __block NSError *regexError = nil; 10 | 11 | prerequisite (^BOOL { 12 | BOOL nilInput = (actualIsNil || expectedIsNil); 13 | if (!nilInput) { 14 | regex = [NSRegularExpression regularExpressionWithPattern:expected options:0 error:®exError]; 15 | } 16 | return !nilInput && regex; 17 | }); 18 | 19 | match(^BOOL { 20 | NSRange range = [regex rangeOfFirstMatchInString:actual options:0 range:NSMakeRange(0, [actual length])]; 21 | return !NSEqualRanges(range, NSMakeRange(NSNotFound, 0)); 22 | }); 23 | 24 | failureMessageForTo(^NSString *{ 25 | if (actualIsNil) return @"the object is nil/null"; 26 | if (expectedIsNil) return @"the expression is nil/null"; 27 | if (regexError) return [NSString stringWithFormat:@"unable to create regular expression from given parameter: %@", [regexError localizedDescription]]; 28 | return [NSString stringWithFormat:@"expected: %@ to match to %@", EXPDescribeObject(actual), expected]; 29 | }); 30 | 31 | failureMessageForNotTo(^NSString *{ 32 | if (actualIsNil) return @"the object is nil/null"; 33 | if (expectedIsNil) return @"the expression is nil/null"; 34 | if (regexError) return [NSString stringWithFormat:@"unable to create regular expression from given parameter: %@", [regexError localizedDescription]]; 35 | return [NSString stringWithFormat:@"expected: %@ not to match to %@", EXPDescribeObject(actual), expected]; 36 | }); 37 | } 38 | EXPMatcherImplementationEnd 39 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+postNotification.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(postNotification, (id expectedNotification)); 4 | EXPMatcherInterface(notify, (id expectedNotification)); 5 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+postNotification.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+postNotification.h" 2 | 3 | @implementation NSNotification (EXPEquality) 4 | 5 | - (BOOL)exp_isFunctionallyEqualTo:(NSNotification *)otherNotification 6 | { 7 | if (![otherNotification isKindOfClass:[NSNotification class]]) return NO; 8 | 9 | BOOL namesMatch = [otherNotification.name isEqualToString:self.name]; 10 | 11 | BOOL objectsMatch = YES; 12 | if (otherNotification.object || self.object) { 13 | objectsMatch = [otherNotification.object isEqual:self.object]; 14 | } 15 | 16 | BOOL userInfoMatches = YES; 17 | if (otherNotification.userInfo || self.userInfo) { 18 | userInfoMatches = [otherNotification.userInfo isEqual:self.userInfo]; 19 | } 20 | 21 | return (namesMatch && objectsMatch && userInfoMatches); 22 | } 23 | 24 | @end 25 | 26 | EXPMatcherImplementationBegin(postNotification, (id expected)){ 27 | BOOL actualIsNil = (actual == nil); 28 | BOOL expectedIsNil = (expected == nil); 29 | BOOL isNotification = [expected isKindOfClass:[NSNotification class]]; 30 | BOOL isName = [expected isKindOfClass:[NSString class]]; 31 | 32 | __block NSString *expectedName; 33 | __block BOOL expectedNotificationOccurred = NO; 34 | __block id observer; 35 | 36 | prerequisite(^BOOL{ 37 | expectedNotificationOccurred = NO; 38 | if (actualIsNil || expectedIsNil) return NO; 39 | if (isNotification) { 40 | expectedName = [expected name]; 41 | }else if(isName) { 42 | expectedName = expected; 43 | }else{ 44 | return NO; 45 | } 46 | 47 | observer = [[NSNotificationCenter defaultCenter] addObserverForName:expectedName object:nil queue:nil usingBlock:^(NSNotification *note){ 48 | if (isNotification) { 49 | expectedNotificationOccurred |= [expected exp_isFunctionallyEqualTo:note]; 50 | }else{ 51 | expectedNotificationOccurred = YES; 52 | } 53 | }]; 54 | ((EXPBasicBlock)actual)(); 55 | return YES; 56 | }); 57 | 58 | match(^BOOL{ 59 | if(expectedNotificationOccurred) { 60 | [[NSNotificationCenter defaultCenter] removeObserver:observer]; 61 | } 62 | return expectedNotificationOccurred; 63 | }); 64 | 65 | failureMessageForTo(^NSString *{ 66 | if (observer) { 67 | [[NSNotificationCenter defaultCenter] removeObserver:observer]; 68 | } 69 | if(actualIsNil) return @"the actual value is nil/null"; 70 | if(expectedIsNil) return @"the expected value is nil/null"; 71 | if(!(isNotification || isName)) return @"the actual value is not a notification or string"; 72 | return [NSString stringWithFormat:@"expected: %@, got: none",expectedName]; 73 | }); 74 | 75 | failureMessageForNotTo(^NSString *{ 76 | if (observer) { 77 | [[NSNotificationCenter defaultCenter] removeObserver:observer]; 78 | } 79 | if(actualIsNil) return @"the actual value is nil/null"; 80 | if(expectedIsNil) return @"the expected value is nil/null"; 81 | if(!(isNotification || isName)) return @"the actual value is not a notification or string"; 82 | return [NSString stringWithFormat:@"expected: none, got: %@", expectedName]; 83 | }); 84 | } 85 | 86 | EXPMatcherImplementationEnd 87 | 88 | EXPMatcherAliasImplementation(notify, postNotification, (id expectedNotification)) 89 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+raise.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(raise, (NSString *expectedExceptionName)); 4 | #define raiseAny() raise(nil) 5 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+raise.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+raise.h" 2 | #import "EXPDefines.h" 3 | 4 | EXPMatcherImplementationBegin(raise, (NSString *expectedExceptionName)) { 5 | __block NSException *exceptionCaught = nil; 6 | 7 | match(^BOOL{ 8 | BOOL expectedExceptionCaught = NO; 9 | @try { 10 | ((EXPBasicBlock)actual)(); 11 | } @catch(NSException *e) { 12 | exceptionCaught = e; 13 | expectedExceptionCaught = (expectedExceptionName == nil) || [[exceptionCaught name] isEqualToString:expectedExceptionName]; 14 | } 15 | return expectedExceptionCaught; 16 | }); 17 | 18 | failureMessageForTo(^NSString *{ 19 | return [NSString stringWithFormat:@"expected: %@, got: %@", 20 | expectedExceptionName ? expectedExceptionName : @"any exception", 21 | exceptionCaught ? [exceptionCaught name] : @"no exception"]; 22 | }); 23 | 24 | failureMessageForNotTo(^NSString *{ 25 | return [NSString stringWithFormat:@"expected: %@, got: %@", 26 | expectedExceptionName ? [NSString stringWithFormat:@"not %@", expectedExceptionName] : @"no exception", 27 | exceptionCaught ? [exceptionCaught name] : @"no exception"]; 28 | }); 29 | } 30 | EXPMatcherImplementationEnd 31 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+raiseWithReason.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(raiseWithReason, (NSString *expectedExceptionName, NSString *expectedReason)); 4 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+raiseWithReason.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+raiseWithReason.h" 2 | #import "EXPDefines.h" 3 | 4 | EXPMatcherImplementationBegin(raiseWithReason, (NSString *expectedExceptionName, NSString *expectedReason)) { 5 | __block NSException *exceptionCaught = nil; 6 | 7 | match(^BOOL{ 8 | BOOL expectedExceptionCaught = NO; 9 | @try { 10 | ((EXPBasicBlock)actual)(); 11 | } @catch(NSException *e) { 12 | exceptionCaught = e; 13 | expectedExceptionCaught = (((expectedExceptionName == nil) || [[exceptionCaught name] isEqualToString:expectedExceptionName]) && 14 | ((expectedReason == nil) || ([[exceptionCaught reason] isEqualToString:expectedReason]))); 15 | } 16 | return expectedExceptionCaught; 17 | }); 18 | 19 | failureMessageForTo(^NSString *{ 20 | return [NSString stringWithFormat:@"expected: %@ (%@), got: %@ (%@)", 21 | expectedExceptionName ?: @"any exception", 22 | expectedReason ?: @"any reason", 23 | exceptionCaught ? [exceptionCaught name] : @"no exception", 24 | exceptionCaught ? [exceptionCaught reason] : @""]; 25 | }); 26 | 27 | failureMessageForNotTo(^NSString *{ 28 | return [NSString stringWithFormat:@"expected: %@ (%@), got: %@ (%@)", 29 | expectedExceptionName ? [NSString stringWithFormat:@"not %@", expectedExceptionName] : @"no exception", 30 | expectedReason ? [NSString stringWithFormat:@"not '%@'", expectedReason] : @"no reason", 31 | exceptionCaught ? [exceptionCaught name] : @"no exception", 32 | exceptionCaught ? [exceptionCaught reason] : @"no reason"]; 33 | }); 34 | } 35 | EXPMatcherImplementationEnd 36 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+respondTo.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(respondTo, (SEL expected)); 4 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers+respondTo.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+respondTo.h" 2 | #import "EXPMatcherHelpers.h" 3 | 4 | EXPMatcherImplementationBegin(respondTo, (SEL expected)) { 5 | BOOL actualIsNil = (actual == nil); 6 | BOOL expectedIsNull = (expected == NULL); 7 | 8 | prerequisite (^BOOL { 9 | return !(actualIsNil || expectedIsNull); 10 | }); 11 | 12 | match(^BOOL { 13 | return [actual respondsToSelector:expected]; 14 | }); 15 | 16 | failureMessageForTo(^NSString *{ 17 | if (actualIsNil) return @"the object is nil/null"; 18 | if (expectedIsNull) return @"the selector is null"; 19 | return [NSString stringWithFormat:@"expected: %@ to respond to %@", EXPDescribeObject(actual), NSStringFromSelector(expected)]; 20 | }); 21 | 22 | failureMessageForNotTo(^NSString *{ 23 | if (actualIsNil) return @"the object is nil/null"; 24 | if (expectedIsNull) return @"the selector is null"; 25 | return [NSString stringWithFormat:@"expected: %@ not to respond to %@", EXPDescribeObject(actual), NSStringFromSelector(expected)]; 26 | }); 27 | } 28 | EXPMatcherImplementationEnd 29 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/Matchers/EXPMatchers.h: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+beNil.h" 2 | #import "EXPMatchers+equal.h" 3 | #import "EXPMatchers+beInstanceOf.h" 4 | #import "EXPMatchers+beKindOf.h" 5 | #import "EXPMatchers+beSubclassOf.h" 6 | #import "EXPMatchers+conformTo.h" 7 | #import "EXPMatchers+beTruthy.h" 8 | #import "EXPMatchers+beFalsy.h" 9 | #import "EXPMatchers+contain.h" 10 | #import "EXPMatchers+beSupersetOf.h" 11 | #import "EXPMatchers+haveCountOf.h" 12 | #import "EXPMatchers+beIdenticalTo.h" 13 | #import "EXPMatchers+beGreaterThan.h" 14 | #import "EXPMatchers+beGreaterThanOrEqualTo.h" 15 | #import "EXPMatchers+beLessThan.h" 16 | #import "EXPMatchers+beLessThanOrEqualTo.h" 17 | #import "EXPMatchers+beInTheRangeOf.h" 18 | #import "EXPMatchers+beCloseTo.h" 19 | #import "EXPMatchers+raise.h" 20 | #import "EXPMatchers+raiseWithReason.h" 21 | #import "EXPMatchers+respondTo.h" 22 | #import "EXPMatchers+postNotification.h" 23 | #import "EXPMatchers+beginWith.h" 24 | #import "EXPMatchers+endWith.h" 25 | #import "EXPMatchers+match.h" 26 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/NSObject+Expecta.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface NSObject (Expecta) 4 | 5 | - (void)recordFailureWithDescription:(NSString *)description 6 | inFile:(NSString *)filename 7 | atLine:(NSUInteger)lineNumber 8 | expected:(BOOL)expected; 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/NSValue+Expecta.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface NSValue (Expecta) 4 | 5 | @property (nonatomic) const char *_EXP_objCType; 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /Pods/Expecta/Expecta/NSValue+Expecta.m: -------------------------------------------------------------------------------- 1 | #import "NSValue+Expecta.h" 2 | #import 3 | #import "Expecta.h" 4 | 5 | EXPFixCategoriesBug(NSValue_Expecta); 6 | 7 | @implementation NSValue (Expecta) 8 | 9 | static char _EXP_typeKey; 10 | 11 | - (const char *)_EXP_objCType { 12 | return [(NSString *)objc_getAssociatedObject(self, &_EXP_typeKey) cStringUsingEncoding:NSASCIIStringEncoding]; 13 | } 14 | 15 | - (void)set_EXP_objCType:(const char *)_EXP_objCType { 16 | objc_setAssociatedObject(self, &_EXP_typeKey, 17 | @(_EXP_objCType), 18 | OBJC_ASSOCIATION_COPY_NONATOMIC); 19 | } 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Pods/Expecta/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011-2015 Specta Team - https://github.com/specta 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 | -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPBlockDefinedMatcher.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/EXPBlockDefinedMatcher.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPDefines.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/EXPDefines.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPDoubleTuple.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/EXPDoubleTuple.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPExpect.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/EXPExpect.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPFloatTuple.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/EXPFloatTuple.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatcher.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/EXPMatcher.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatcherHelpers.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatcherHelpers.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+beCloseTo.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+beCloseTo.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+beFalsy.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+beFalsy.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+beGreaterThan.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+beGreaterThan.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+beGreaterThanOrEqualTo.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+beGreaterThanOrEqualTo.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+beIdenticalTo.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+beIdenticalTo.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+beInTheRangeOf.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+beInTheRangeOf.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+beInstanceOf.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+beInstanceOf.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+beKindOf.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+beKindOf.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+beLessThan.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+beLessThan.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+beLessThanOrEqualTo.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+beLessThanOrEqualTo.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+beNil.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+beNil.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+beSubclassOf.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+beSubclassOf.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+beSupersetOf.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+beSupersetOf.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+beTruthy.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+beTruthy.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+beginWith.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+beginWith.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+conformTo.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+conformTo.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+contain.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+contain.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+endWith.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+endWith.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+equal.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+equal.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+haveCountOf.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+haveCountOf.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+match.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+match.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+postNotification.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+postNotification.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+raise.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+raise.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+raiseWithReason.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+raiseWithReason.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+respondTo.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+respondTo.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPUnsupportedObject.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/EXPUnsupportedObject.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/Expecta.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Expecta.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/ExpectaObject.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/ExpectaObject.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/ExpectaSupport.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/ExpectaSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/NSObject+Expecta.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/NSObject+Expecta.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/NSValue+Expecta.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/NSValue+Expecta.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JPSimulatorHacks/JPSimulatorHacks.h: -------------------------------------------------------------------------------- 1 | ../../../../JPSimulatorHacks/JPSimulatorHacks.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JPSimulatorHacks/JPSimulatorHacksDB.h: -------------------------------------------------------------------------------- 1 | ../../../../JPSimulatorHacks/JPSimulatorHacksDB.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/CALayer-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/CALayer-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/CGGeometry-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/CGGeometry-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/IOHIDEvent+KIF.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Classes/IOHIDEvent+KIF.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/KIF.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Classes/KIF.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/KIFAccessibilityEnabler.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Classes/KIFAccessibilityEnabler.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/KIFSystemTestActor.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Classes/KIFSystemTestActor.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/KIFTestActor.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Classes/KIFTestActor.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/KIFTestCase.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Classes/KIFTestCase.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/KIFTestStepValidation.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Classes/KIFTestStepValidation.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/KIFTypist.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Classes/KIFTypist.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/KIFUIObject.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Classes/KIFUIObject.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/KIFUITestActor-ConditionalTests.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Classes/KIFUITestActor-ConditionalTests.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/KIFUITestActor.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Classes/KIFUITestActor.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/KIFUIViewTestActor.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Classes/KIFUIViewTestActor.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/LoadableCategory.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/LoadableCategory.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/NSBundle-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/NSBundle-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/NSError-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/NSError-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/NSException-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/NSException-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/NSFileManager-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/NSFileManager-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/NSPredicate+KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/NSPredicate+KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/NSString+KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/NSString+KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/UIAccessibilityElement-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/UIAccessibilityElement-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/UIApplication-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/UIApplication-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/UIAutomationHelper.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Classes/UIAutomationHelper.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/UIEvent+KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/UIEvent+KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/UIScreen+KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/UIScreen+KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/UIScrollView-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/UIScrollView-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/UITableView-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/UITableView-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/UITouch-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/UITouch-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/UIView-Debugging.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/UIView-Debugging.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/UIView-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/UIView-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/UIWindow-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/UIWindow-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/XCTestCase-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/XCTestCase-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPBlockDefinedMatcher.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/EXPBlockDefinedMatcher.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPDefines.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/EXPDefines.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPDoubleTuple.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/EXPDoubleTuple.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPExpect.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/EXPExpect.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPFloatTuple.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/EXPFloatTuple.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatcher.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/EXPMatcher.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatcherHelpers.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatcherHelpers.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+beCloseTo.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+beCloseTo.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+beFalsy.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+beFalsy.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+beGreaterThan.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+beGreaterThan.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+beGreaterThanOrEqualTo.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+beGreaterThanOrEqualTo.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+beIdenticalTo.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+beIdenticalTo.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+beInTheRangeOf.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+beInTheRangeOf.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+beInstanceOf.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+beInstanceOf.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+beKindOf.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+beKindOf.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+beLessThan.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+beLessThan.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+beLessThanOrEqualTo.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+beLessThanOrEqualTo.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+beNil.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+beNil.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+beSubclassOf.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+beSubclassOf.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+beSupersetOf.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+beSupersetOf.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+beTruthy.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+beTruthy.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+beginWith.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+beginWith.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+conformTo.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+conformTo.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+contain.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+contain.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+endWith.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+endWith.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+equal.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+equal.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+haveCountOf.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+haveCountOf.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+match.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+match.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+postNotification.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+postNotification.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+raise.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+raise.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+raiseWithReason.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+raiseWithReason.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+respondTo.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers+respondTo.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Matchers/EXPMatchers.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPUnsupportedObject.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/EXPUnsupportedObject.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/Expecta.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/Expecta.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/ExpectaObject.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/ExpectaObject.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/ExpectaSupport.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/ExpectaSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/NSObject+Expecta.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/NSObject+Expecta.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/NSValue+Expecta.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/Expecta/NSValue+Expecta.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JPSimulatorHacks/JPSimulatorHacks.h: -------------------------------------------------------------------------------- 1 | ../../../../JPSimulatorHacks/JPSimulatorHacks.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JPSimulatorHacks/JPSimulatorHacksDB.h: -------------------------------------------------------------------------------- 1 | ../../../../JPSimulatorHacks/JPSimulatorHacksDB.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/CALayer-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/CALayer-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/CGGeometry-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/CGGeometry-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/IOHIDEvent+KIF.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Classes/IOHIDEvent+KIF.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/KIF.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Classes/KIF.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/KIFAccessibilityEnabler.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Classes/KIFAccessibilityEnabler.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/KIFSystemTestActor.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Classes/KIFSystemTestActor.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/KIFTestActor.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Classes/KIFTestActor.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/KIFTestCase.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Classes/KIFTestCase.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/KIFTestStepValidation.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Classes/KIFTestStepValidation.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/KIFTypist.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Classes/KIFTypist.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/KIFUIObject.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Classes/KIFUIObject.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/KIFUITestActor-ConditionalTests.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Classes/KIFUITestActor-ConditionalTests.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/KIFUITestActor.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Classes/KIFUITestActor.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/KIFUIViewTestActor.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Classes/KIFUIViewTestActor.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/NSBundle-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/NSBundle-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/NSError-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/NSError-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/NSException-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/NSException-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/NSFileManager-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/NSFileManager-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/UIAccessibilityElement-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/UIAccessibilityElement-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/UIApplication-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/UIApplication-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/UIAutomationHelper.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Classes/UIAutomationHelper.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/UIScrollView-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/UIScrollView-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/UITableView-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/UITableView-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/UITouch-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/UITouch-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/UIView-Debugging.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/UIView-Debugging.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/UIView-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/UIView-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/UIWindow-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/UIWindow-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/XCTestCase-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/XCTestCase-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/KIF/Additions/CALayer-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // CALayer-KIFAdditions.h 3 | // Pods 4 | // 5 | // Created by Radu Ciobanu on 28/01/2016. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | // 10 | 11 | #import 12 | 13 | @interface CALayer (KIFAdditions) 14 | 15 | /** 16 | * @method hasAnimations 17 | * @abstract Traverses self's hierarchy of layers and checks whether any 18 | * visible sublayers or self have ongoing anymations. 19 | * @return YES if an animated layer has been found, NO otherwise. 20 | */ 21 | - (BOOL)hasAnimations; 22 | 23 | /*! 24 | @method performBlockOnDescendentLayers: 25 | @abstract Calls a block on the layer itself and on all its descendent layers. 26 | @param block The block that will be called on the layers. Stop the traversation 27 | of the layers by assigning YES to the stop-parameter of the block. 28 | */ 29 | - (void)performBlockOnDescendentLayers:(void (^)(CALayer *layer, BOOL *stop))block; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/CALayer-KIFAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // CALayer-KIFAdditions.m 3 | // Pods 4 | // 5 | // Created by Radu Ciobanu on 28/01/2016. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | // 10 | 11 | #import "CALayer-KIFAdditions.h" 12 | 13 | @implementation CALayer (KIFAdditions) 14 | 15 | - (BOOL)hasAnimations 16 | { 17 | __block BOOL result = NO; 18 | [self performBlockOnDescendentLayers:^(CALayer *layer, BOOL *stop) { 19 | // explicitly exclude _UIParallaxMotionEffect as it is used in alertviews, and we don't want every alertview to be paused) 20 | BOOL hasAnimation = layer.animationKeys.count != 0 && ![layer.animationKeys isEqualToArray:@[@"_UIParallaxMotionEffect"]]; 21 | if (hasAnimation && !layer.hidden) { 22 | result = YES; 23 | if (stop != NULL) { 24 | *stop = YES; 25 | } 26 | } 27 | }]; 28 | return result; 29 | } 30 | 31 | - (void)performBlockOnDescendentLayers:(void (^)(CALayer *layer, BOOL *stop))block 32 | { 33 | BOOL stop = NO; 34 | [self performBlockOnDescendentLayers:block stop:&stop]; 35 | } 36 | 37 | - (void)performBlockOnDescendentLayers:(void (^)(CALayer *, BOOL *))block stop:(BOOL *)stop 38 | { 39 | block(self, stop); 40 | if (*stop) { 41 | return; 42 | } 43 | 44 | for (CALayer *layer in self.sublayers) { 45 | [layer performBlockOnDescendentLayers:block stop:stop]; 46 | if (*stop) { 47 | return; 48 | } 49 | } 50 | } 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/CGGeometry-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // CGGeometry-KIFAdditions.h 3 | // KIF 4 | // 5 | // Created by Eric Firestone on 5/22/11. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import 11 | 12 | CG_INLINE CGPoint CGPointCenteredInRect(CGRect bounds) { 13 | return CGPointMake(bounds.origin.x + bounds.size.width * 0.5f, bounds.origin.y + bounds.size.height * 0.5f); 14 | } 15 | 16 | CG_INLINE CGPoint CGPointMidPoint(CGPoint point1, CGPoint point2) { 17 | return CGPointMake((point1.x + point2.x) / 2.0f, (point1.y + point2.y) / 2.0f); 18 | } 19 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/CGGeometry-KIFAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // CGGeometry-KIFAdditions.m 3 | // KIF 4 | // 5 | // Created by Eric Firestone on 5/22/11. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import "CGGeometry-KIFAdditions.h" 11 | 12 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/LoadableCategory.h: -------------------------------------------------------------------------------- 1 | // 2 | // LoadableCategory.h 3 | // KIF 4 | // 5 | // Created by Karl Stenerud on 7/16/11. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | /** Make all categories in the current file loadable without using -load-all. 11 | * 12 | * Normally, compilers will skip linking files that contain only categories. 13 | * Adding a call to this macro adds a dummy class, which causes the linker 14 | * to add the file. 15 | * 16 | * @param UNIQUE_NAME A globally unique name. 17 | */ 18 | #define MAKE_CATEGORIES_LOADABLE(UNIQUE_NAME) @interface FORCELOAD_##UNIQUE_NAME : NSObject @end @implementation FORCELOAD_##UNIQUE_NAME @end 19 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/NSBundle-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSBundle+KIFAdditions.h 3 | // KIF 4 | // 5 | // Created by Brian Nickel on 7/27/13. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface NSBundle (KIFAdditions) 12 | 13 | + (NSBundle *)KIFTestBundle; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/NSBundle-KIFAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSBundle+KIFAdditions.m 3 | // KIF 4 | // 5 | // Created by Brian Nickel on 7/27/13. 6 | // 7 | // 8 | 9 | #import "NSBundle-KIFAdditions.h" 10 | #import "KIFTestCase.h" 11 | #import "LoadableCategory.h" 12 | 13 | MAKE_CATEGORIES_LOADABLE(NSBundle_KIFAdditions) 14 | 15 | @implementation NSBundle (KIFAdditions) 16 | 17 | + (NSBundle *)KIFTestBundle 18 | { 19 | static NSBundle *bundle; 20 | static dispatch_once_t onceToken; 21 | dispatch_once(&onceToken, ^{ 22 | bundle = [self bundleForClass:[KIFTestCase class]]; 23 | }); 24 | return bundle; 25 | } 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/NSError-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSError+KIFAdditions.h 3 | // KIF 4 | // 5 | // Created by Brian Nickel on 7/27/13. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface NSError (KIFAdditions) 12 | 13 | + (instancetype)KIFErrorWithUnderlyingError:(NSError *)underlyingError format:(NSString *)format, ... NS_FORMAT_FUNCTION(2,3); 14 | + (instancetype)KIFErrorWithFormat:(NSString *)format, ... NS_FORMAT_FUNCTION(1,2); 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/NSError-KIFAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSError+KIFAdditions.m 3 | // KIF 4 | // 5 | // Created by Brian Nickel on 7/27/13. 6 | // 7 | // 8 | 9 | #import "NSError-KIFAdditions.h" 10 | #import "LoadableCategory.h" 11 | #import "KIFTestActor.h" 12 | 13 | MAKE_CATEGORIES_LOADABLE(NSError_KIFAdditions) 14 | 15 | @implementation NSError (KIFAdditions) 16 | 17 | + (instancetype)KIFErrorWithFormat:(NSString *)format, ... 18 | { 19 | va_list args; 20 | va_start(args, format); 21 | NSString *description = [[NSString alloc] initWithFormat:format arguments:args]; 22 | va_end(args); 23 | 24 | return [self errorWithDomain:@"KIFTest" code:KIFTestStepResultFailure userInfo:@{NSLocalizedDescriptionKey: description}]; 25 | } 26 | 27 | + (instancetype)KIFErrorWithUnderlyingError:(NSError *)underlyingError format:(NSString *)format, ... 28 | { 29 | va_list args; 30 | va_start(args, format); 31 | NSString *description = [[NSString alloc] initWithFormat:format arguments:args]; 32 | va_end(args); 33 | 34 | NSDictionary *userInfo = [[NSDictionary alloc] initWithObjectsAndKeys:description, NSLocalizedDescriptionKey, underlyingError, NSUnderlyingErrorKey, nil]; 35 | 36 | return [self errorWithDomain:@"KIFTest" code:KIFTestStepResultFailure userInfo:userInfo]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/NSException-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSException-KIFAdditions.h 3 | // KIF 4 | // 5 | // Created by Tony DiPasquale on 12/20/13. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface NSException (KIFAdditions) 12 | 13 | + (NSException *)failureInFile:(NSString *)file atLine:(NSInteger)line withDescription:(NSString *)formatString, ...; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/NSException-KIFAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSException-KIFAdditions.m 3 | // KIF 4 | // 5 | // Created by Tony DiPasquale on 12/20/13. 6 | // 7 | // 8 | 9 | #import "NSException-KIFAdditions.h" 10 | 11 | @implementation NSException (KIFAdditions) 12 | 13 | + (NSException *)failureInFile:(NSString *)file atLine:(NSInteger)line withDescription:(NSString *)formatString, ... 14 | { 15 | va_list argumentList; 16 | va_start(argumentList, formatString); 17 | 18 | NSString *reason = [[NSString alloc] initWithFormat:formatString arguments:argumentList]; 19 | 20 | va_end(argumentList); 21 | 22 | return [NSException exceptionWithName:@"KIFFailureException" 23 | reason: reason 24 | userInfo:@{@"FilenameKey": file, 25 | @"LineNumberKey": @(line)}]; 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/NSFileManager-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSFileManager-KIFAdditions.h 3 | // KIF 4 | // 5 | // Created by Michael Thole on 6/1/11. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import 11 | 12 | 13 | @interface NSFileManager (KIFAdditions) 14 | 15 | - (NSString *)createUserDirectory:(NSSearchPathDirectory)searchPath; 16 | - (BOOL)recursivelyCreateDirectory:(NSString *)path; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/NSFileManager-KIFAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSFileManager-KIFAdditions.m 3 | // KIF 4 | // 5 | // Created by Michael Thole on 6/1/11. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import "NSFileManager-KIFAdditions.h" 11 | #import "LoadableCategory.h" 12 | 13 | 14 | MAKE_CATEGORIES_LOADABLE(NSFileManager_KIFAdditions) 15 | 16 | 17 | @implementation NSFileManager (KIFAdditions) 18 | 19 | #pragma mark Public Methods 20 | 21 | - (NSString *)createUserDirectory:(NSSearchPathDirectory)searchPath; 22 | { 23 | NSArray *paths = NSSearchPathForDirectoriesInDomains(searchPath, NSUserDomainMask, YES); 24 | if (!paths.count) { 25 | return nil; 26 | } 27 | 28 | NSString *rootDirectory = paths[0]; 29 | 30 | BOOL isDir; 31 | BOOL created = NO; 32 | if ([self fileExistsAtPath:rootDirectory isDirectory:&isDir] && isDir) { 33 | created = YES; 34 | } else { 35 | created = [self recursivelyCreateDirectory:rootDirectory]; 36 | } 37 | 38 | return created ? rootDirectory : nil; 39 | } 40 | 41 | - (BOOL)recursivelyCreateDirectory:(NSString *)path; 42 | { 43 | BOOL isDir = NO; 44 | BOOL isParentADir = NO; 45 | NSString *parentDir = nil; 46 | 47 | if (![self fileExistsAtPath:path isDirectory:&isDir]) { 48 | // if file doesn't exist, first create parent 49 | parentDir = [path stringByDeletingLastPathComponent]; 50 | 51 | if (!parentDir.length || [parentDir isEqualToString:@"/"]) { 52 | isParentADir = YES; 53 | } else { 54 | isParentADir = [self recursivelyCreateDirectory:parentDir]; 55 | } 56 | 57 | if (isParentADir) { 58 | isDir = [self createDirectoryAtPath:path withIntermediateDirectories:NO attributes:nil error:nil]; 59 | } else { 60 | return NO; 61 | } 62 | } 63 | 64 | return isDir; 65 | } 66 | 67 | @end 68 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/NSPredicate+KIFAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSPredicate+KIFAdditions.h 3 | // KIF 4 | // 5 | // Created by Alex Odawa on 2/3/15. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface NSPredicate (KIFAdditions) 12 | 13 | @property NSString *kifPredicateDescription; 14 | 15 | - (NSArray *)flatten; 16 | - (NSCompoundPredicate *)minusSubpredicatesFrom:(NSPredicate *)otherPredicate; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/NSPredicate+KIFAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSPredicate+KIFAdditions.m 3 | // KIF 4 | // 5 | // Created by Alex Odawa on 2/3/15. 6 | // 7 | // 8 | 9 | #import 10 | #import "NSPredicate+KIFAdditions.h" 11 | 12 | @implementation NSPredicate (KIFAdditions) 13 | 14 | - (NSArray *)flatten 15 | { 16 | NSMutableArray *result = [[NSMutableArray alloc] init]; 17 | 18 | if ([self isKindOfClass:[NSCompoundPredicate class]]) { 19 | for (NSPredicate *predicate in ((NSCompoundPredicate *)self).subpredicates) { 20 | [result addObjectsFromArray:[predicate flatten]]; 21 | } 22 | } else { 23 | [result addObject:self]; 24 | } 25 | 26 | return result; 27 | } 28 | 29 | - (NSCompoundPredicate *)minusSubpredicatesFrom:(NSPredicate *)otherPredicate; 30 | { 31 | if (self == otherPredicate) { 32 | return nil; 33 | } 34 | NSMutableSet *subpredicates = [NSMutableSet setWithArray:[self flatten]]; 35 | NSMutableSet *otherSubpredicates = [NSMutableSet setWithArray:[otherPredicate flatten]]; 36 | [subpredicates minusSet:otherSubpredicates]; 37 | return [[NSCompoundPredicate alloc] initWithType:NSAndPredicateType 38 | subpredicates:[subpredicates allObjects]]; 39 | } 40 | 41 | - (void)setKifPredicateDescription:(NSString *)description; 42 | { 43 | NSString *desc = description.copy; 44 | objc_setAssociatedObject(self, @selector(kifPredicateDescription), desc, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 45 | } 46 | 47 | - (NSString *)kifPredicateDescription; 48 | { 49 | id object = objc_getAssociatedObject(self, @selector(kifPredicateDescription)); 50 | if (object) { 51 | return object; 52 | } 53 | // Compound predicates containing subpredicates with the kifPredicateDescription set should still get our pretty formatting. 54 | if ([self isKindOfClass:[NSCompoundPredicate class]]) { 55 | NSArray *subpredicates = [self flatten]; 56 | NSString *description = @""; 57 | 58 | for (NSPredicate *predicate in subpredicates) { 59 | if (description.length > 0) { 60 | description = [description stringByAppendingString:@", "]; 61 | } 62 | description = [description stringByAppendingString:predicate.kifPredicateDescription]; 63 | } 64 | if (description.length > 0) { 65 | return description; 66 | } 67 | } 68 | 69 | return self.description; 70 | } 71 | 72 | @end 73 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/NSString+KIFAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+KIFAdditions.h 3 | // KIF 4 | // 5 | // Created by Alex Odawa on 1/28/16. 6 | // 7 | // 8 | 9 | #import 10 | 11 | #pragma mark - NSString 12 | @interface NSString (KIFAdditions) 13 | 14 | - (BOOL)KIF_isEqualToStringOrAttributedString:(id)aString; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/NSString+KIFAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+KIFAdditions.m 3 | // KIF 4 | // 5 | // Created by Alex Odawa on 1/28/16. 6 | // 7 | // 8 | 9 | #import "NSString+KIFAdditions.h" 10 | 11 | #pragma mark - NSString 12 | @implementation NSString (KIFAdditions) 13 | 14 | - (BOOL)KIF_isEqualToStringOrAttributedString:(id)aString; 15 | { 16 | // Somtimes Accessibility Elements will return an AXAttributedString. 17 | // This compares the raw backing string against a vanilla NSString, ignoring any attributes. 18 | if ([aString respondsToSelector:@selector(string)]) { 19 | return [self isEqualToString:[(id)aString string]]; 20 | } 21 | return [self isEqualToString:aString]; 22 | } 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/UIEvent+KIFAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIEvent+KIFAdditions.h 3 | // KIF 4 | // 5 | // Created by Thomas on 3/1/15. 6 | // 7 | // 8 | 9 | #import 10 | 11 | // Exposes methods of UITouchesEvent so that the compiler doesn't complain 12 | @interface UIEvent (KIFAdditionsPrivateHeaders) 13 | - (void)_addTouch:(UITouch *)touch forDelayedDelivery:(BOOL)arg2; 14 | - (void)_clearTouches; 15 | @end 16 | 17 | @interface UIEvent (KIFAdditions) 18 | - (void)kif_setEventWithTouches:(NSArray *)touches; 19 | @end -------------------------------------------------------------------------------- /Pods/KIF/Additions/UIEvent+KIFAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIEvent+KIFAdditions.m 3 | // KIF 4 | // 5 | // Created by Thomas on 3/1/15. 6 | // 7 | // 8 | 9 | #import "UIEvent+KIFAdditions.h" 10 | #import "LoadableCategory.h" 11 | #import "IOHIDEvent+KIF.h" 12 | 13 | MAKE_CATEGORIES_LOADABLE(UIEvent_KIFAdditions) 14 | 15 | // 16 | // GSEvent is an undeclared object. We don't need to use it ourselves but some 17 | // Apple APIs (UIScrollView in particular) require the x and y fields to be present. 18 | // 19 | @interface KIFGSEventProxy : NSObject 20 | { 21 | @public 22 | unsigned int flags; 23 | unsigned int type; 24 | unsigned int ignored1; 25 | float x1; 26 | float y1; 27 | float x2; 28 | float y2; 29 | unsigned int ignored2[10]; 30 | unsigned int ignored3[7]; 31 | float sizeX; 32 | float sizeY; 33 | float x3; 34 | float y3; 35 | unsigned int ignored4[3]; 36 | } 37 | @end 38 | 39 | @implementation KIFGSEventProxy 40 | @end 41 | 42 | typedef struct __GSEvent * GSEventRef; 43 | 44 | @interface UIEvent (KIFAdditionsMorePrivateHeaders) 45 | - (void)_setGSEvent:(GSEventRef)event; 46 | - (void)_setHIDEvent:(IOHIDEventRef)event; 47 | - (void)_setTimestamp:(NSTimeInterval)timestemp; 48 | @end 49 | 50 | @implementation UIEvent (KIFAdditions) 51 | 52 | - (void)kif_setEventWithTouches:(NSArray *)touches 53 | { 54 | NSOperatingSystemVersion iOS8 = {8, 0, 0}; 55 | if ([NSProcessInfo instancesRespondToSelector:@selector(isOperatingSystemAtLeastVersion:)] 56 | && [[NSProcessInfo new] isOperatingSystemAtLeastVersion:iOS8]) { 57 | [self kif_setIOHIDEventWithTouches:touches]; 58 | } else { 59 | [self kif_setGSEventWithTouches:touches]; 60 | } 61 | } 62 | 63 | - (void)kif_setGSEventWithTouches:(NSArray *)touches 64 | { 65 | UITouch *touch = touches[0]; 66 | CGPoint location = [touch locationInView:touch.window]; 67 | KIFGSEventProxy *gsEventProxy = [[KIFGSEventProxy alloc] init]; 68 | gsEventProxy->x1 = location.x; 69 | gsEventProxy->y1 = location.y; 70 | gsEventProxy->x2 = location.x; 71 | gsEventProxy->y2 = location.y; 72 | gsEventProxy->x3 = location.x; 73 | gsEventProxy->y3 = location.y; 74 | gsEventProxy->sizeX = 1.0; 75 | gsEventProxy->sizeY = 1.0; 76 | gsEventProxy->flags = ([touch phase] == UITouchPhaseEnded) ? 0x1010180 : 0x3010180; 77 | gsEventProxy->type = 3001; 78 | 79 | [self _setGSEvent:(GSEventRef)gsEventProxy]; 80 | 81 | [self _setTimestamp:(((UITouch*)touches[0]).timestamp)]; 82 | } 83 | 84 | - (void)kif_setIOHIDEventWithTouches:(NSArray *)touches 85 | { 86 | IOHIDEventRef event = kif_IOHIDEventWithTouches(touches); 87 | [self _setHIDEvent:event]; 88 | CFRelease(event); 89 | } 90 | 91 | @end -------------------------------------------------------------------------------- /Pods/KIF/Additions/UIScreen+KIFAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIScreen+KIFAdditions.h 3 | // KIF 4 | // 5 | // Created by Steven King on 25/02/2016. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface UIScreen (KIFAdditions) 12 | 13 | @property (nonatomic, readonly) CGFloat majorSwipeDisplacement; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/UIScreen+KIFAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIScreen+KIFAdditions.m 3 | // KIF 4 | // 5 | // Created by Steven King on 25/02/2016. 6 | // 7 | // 8 | 9 | #import "UIScreen+KIFAdditions.h" 10 | 11 | @implementation UIScreen (KIFAdditions) 12 | 13 | - (CGFloat)majorSwipeDisplacement { 14 | return self.bounds.size.width * 0.625; 15 | } 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/UIScrollView-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIScrollView-KIFAdditions.h 3 | // KIF 4 | // 5 | // Created by Eric Firestone on 5/22/11. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import 11 | 12 | 13 | @interface UIScrollView (KIFAdditions) 14 | 15 | - (void)scrollViewToVisible:(UIView *)view animated:(BOOL)animated; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/UIScrollView-KIFAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIScrollView-KIFAdditions.m 3 | // KIF 4 | // 5 | // Created by Eric Firestone on 5/22/11. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import "UIScrollView-KIFAdditions.h" 11 | #import "LoadableCategory.h" 12 | #import "UIApplication-KIFAdditions.h" 13 | #import "UIView-KIFAdditions.h" 14 | 15 | 16 | MAKE_CATEGORIES_LOADABLE(UIScrollView_KIFAdditions) 17 | 18 | 19 | @implementation UIScrollView (KIFAdditions) 20 | 21 | - (void)scrollViewToVisible:(UIView *)view animated:(BOOL)animated; 22 | { 23 | CGRect viewFrame = [self convertRect:view.bounds fromView:view]; 24 | CGPoint contentOffset = self.contentOffset; 25 | 26 | if (CGRectGetMaxX(viewFrame) > self.contentOffset.x + CGRectGetWidth(self.bounds)) { 27 | contentOffset.x = MIN(CGRectGetMaxX(viewFrame) - CGRectGetWidth(self.bounds), CGRectGetMinX(viewFrame)); 28 | } else if (CGRectGetMinX(viewFrame) < self.contentOffset.x) { 29 | contentOffset.x = MAX(CGRectGetMaxX(viewFrame) - CGRectGetWidth(self.bounds), CGRectGetMinX(viewFrame)); 30 | } 31 | 32 | if (CGRectGetMaxY(viewFrame) > self.contentOffset.y + CGRectGetHeight(self.bounds)) { 33 | contentOffset.y = MIN(CGRectGetMaxY(viewFrame) - CGRectGetHeight(self.bounds), CGRectGetMinY(viewFrame)); 34 | } else if (CGRectGetMinY(viewFrame) < self.contentOffset.y) { 35 | contentOffset.y = MAX(CGRectGetMaxY(viewFrame) - CGRectGetHeight(self.bounds), CGRectGetMinY(viewFrame)); 36 | } 37 | 38 | if (!CGPointEqualToPoint(contentOffset, self.contentOffset)) { 39 | [self setContentOffset:contentOffset animated:animated]; 40 | CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.2, false); 41 | } 42 | } 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/UITableView-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UITableView-KIFAdditions.h 3 | // KIF 4 | // 5 | // Created by Hilton Campbell on 4/12/14. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import 11 | 12 | @interface UITableView (KIFAdditions) 13 | 14 | - (BOOL)dragCell:(UITableViewCell *)cell toIndexPath:(NSIndexPath *)indexPath error:(NSError **)error; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/UITableView-KIFAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // UITableView-KIFAdditions.m 3 | // KIF 4 | // 5 | // Created by Hilton Campbell on 4/12/14. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import "UITableView-KIFAdditions.h" 11 | #import "UIView-KIFAdditions.h" 12 | #import "UIApplication-KIFAdditions.h" 13 | #import "UITouch-KIFAdditions.h" 14 | #import "CGGeometry-KIFAdditions.h" 15 | #import "NSError-KIFAdditions.h" 16 | 17 | @implementation UITableView (KIFAdditions) 18 | 19 | #define DRAG_STEP_DISTANCE 5 20 | 21 | - (BOOL)dragCell:(UITableViewCell *)cell toIndexPath:(NSIndexPath *)indexPath error:(NSError **)error; 22 | { 23 | UIView *sourceReorderControl = [[cell subviewsWithClassNameOrSuperClassNamePrefix:@"UITableViewCellReorderControl"] lastObject]; 24 | if (!sourceReorderControl) { 25 | if (error) { 26 | *error = [NSError KIFErrorWithFormat:@"Failed to find reorder control for cell"]; 27 | } 28 | return NO; 29 | } 30 | 31 | CGPoint sourcePoint = [self convertPoint:CGPointCenteredInRect(sourceReorderControl.bounds) fromView:sourceReorderControl]; 32 | 33 | // If section < 0, search from the end of the table. 34 | if (indexPath.section < 0) { 35 | indexPath = [NSIndexPath indexPathForRow:indexPath.row inSection:self.numberOfSections + indexPath.section]; 36 | } 37 | 38 | // If row < 0, search from the end of the section. 39 | if (indexPath.row < 0) { 40 | indexPath = [NSIndexPath indexPathForRow:[self numberOfRowsInSection:indexPath.section] + indexPath.row inSection:indexPath.section]; 41 | } 42 | 43 | CGPoint destinationPoint = CGPointMake(sourcePoint.x, CGPointCenteredInRect([self rectForRowAtIndexPath:indexPath]).y); 44 | 45 | // Create the touch (there should only be one touch object for the whole drag) 46 | UITouch *touch = [[UITouch alloc] initAtPoint:sourcePoint inView:self]; 47 | [touch setPhaseAndUpdateTimestamp:UITouchPhaseBegan]; 48 | 49 | UIEvent *eventDown = [self eventWithTouch:touch]; 50 | [[UIApplication sharedApplication] sendEvent:eventDown]; 51 | 52 | // Hold long enough to enter reordering mode 53 | CFRunLoopRunInMode(UIApplicationCurrentRunMode, 0.2, false); 54 | 55 | CGPoint currentLocation = sourcePoint; 56 | while (currentLocation.y < destinationPoint.y - DRAG_STEP_DISTANCE || currentLocation.y > destinationPoint.y + DRAG_STEP_DISTANCE) { 57 | if (currentLocation.y < destinationPoint.y) { 58 | currentLocation.y += DRAG_STEP_DISTANCE; 59 | } else { 60 | currentLocation.y -= DRAG_STEP_DISTANCE; 61 | } 62 | 63 | [touch setLocationInWindow:[self.window convertPoint:currentLocation fromView:self]]; 64 | [touch setPhaseAndUpdateTimestamp:UITouchPhaseMoved]; 65 | 66 | UIEvent *eventDrag = [self eventWithTouch:touch]; 67 | [[UIApplication sharedApplication] sendEvent:eventDrag]; 68 | 69 | CFRunLoopRunInMode(UIApplicationCurrentRunMode, 0.01, false); 70 | } 71 | 72 | // Hold long enough for the animations to catch up 73 | CFRunLoopRunInMode(UIApplicationCurrentRunMode, 0.2, false); 74 | 75 | [touch setPhaseAndUpdateTimestamp:UITouchPhaseEnded]; 76 | 77 | UIEvent *eventUp = [self eventWithTouch:touch]; 78 | [[UIApplication sharedApplication] sendEvent:eventUp]; 79 | 80 | // Dispatching the event doesn't actually update the first responder, so fake it 81 | if (touch.view == self && [self canBecomeFirstResponder]) { 82 | [self becomeFirstResponder]; 83 | } 84 | return YES; 85 | } 86 | 87 | @end 88 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/UITouch-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UITouch-KIFAdditions.h 3 | // KIF 4 | // 5 | // Created by Eric Firestone on 5/20/11. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import 11 | 12 | 13 | @interface UITouch (KIFAdditions) 14 | 15 | - (id)initInView:(UIView *)view; 16 | - (id)initAtPoint:(CGPoint)point inView:(UIView *)view; 17 | 18 | - (void)setLocationInWindow:(CGPoint)location; 19 | - (void)setPhaseAndUpdateTimestamp:(UITouchPhase)phase; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/UITouch-KIFAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // UITouch-KIFAdditions.m 3 | // KIF 4 | // 5 | // Created by Eric Firestone on 5/20/11. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import "UITouch-KIFAdditions.h" 11 | #import "LoadableCategory.h" 12 | #import 13 | #import "IOHIDEvent+KIF.h" 14 | 15 | MAKE_CATEGORIES_LOADABLE(UITouch_KIFAdditions) 16 | 17 | typedef struct { 18 | unsigned int _firstTouchForView:1; 19 | unsigned int _isTap:1; 20 | unsigned int _isDelayed:1; 21 | unsigned int _sentTouchesEnded:1; 22 | unsigned int _abandonForwardingRecord:1; 23 | } UITouchFlags; 24 | 25 | @interface UITouch () 26 | 27 | 28 | - (void)setWindow:(UIWindow *)window; 29 | - (void)setView:(UIView *)view; 30 | - (void)setTapCount:(NSUInteger)tapCount; 31 | - (void)setIsTap:(BOOL)isTap; 32 | - (void)setTimestamp:(NSTimeInterval)timestamp; 33 | - (void)setPhase:(UITouchPhase)touchPhase; 34 | - (void)setGestureView:(UIView *)view; 35 | - (void)_setLocationInWindow:(CGPoint)location resetPrevious:(BOOL)resetPrevious; 36 | - (void)_setIsFirstTouchForView:(BOOL)firstTouchForView; 37 | 38 | - (void)_setHidEvent:(IOHIDEventRef)event; 39 | 40 | @end 41 | 42 | @implementation UITouch (KIFAdditions) 43 | 44 | - (id)initInView:(UIView *)view; 45 | { 46 | CGRect frame = view.frame; 47 | CGPoint centerPoint = CGPointMake(frame.size.width * 0.5f, frame.size.height * 0.5f); 48 | return [self initAtPoint:centerPoint inView:view]; 49 | } 50 | 51 | - (id)initAtPoint:(CGPoint)point inWindow:(UIWindow *)window; 52 | { 53 | self = [super init]; 54 | if (self == nil) { 55 | return nil; 56 | } 57 | 58 | // Create a fake tap touch 59 | [self setWindow:window]; // Wipes out some values. Needs to be first. 60 | 61 | [self setTapCount:1]; 62 | [self _setLocationInWindow:point resetPrevious:YES]; 63 | 64 | UIView *hitTestView = [window hitTest:point withEvent:nil]; 65 | 66 | [self setView:hitTestView]; 67 | [self setPhase:UITouchPhaseBegan]; 68 | [self _setIsFirstTouchForView:YES]; 69 | [self setIsTap:YES]; 70 | [self setTimestamp:[[NSProcessInfo processInfo] systemUptime]]; 71 | 72 | if ([self respondsToSelector:@selector(setGestureView:)]) { 73 | [self setGestureView:hitTestView]; 74 | } 75 | 76 | // Starting with iOS 9, internal IOHIDEvent must be set for UITouch object 77 | NSOperatingSystemVersion iOS9 = {9, 0, 0}; 78 | if ([NSProcessInfo instancesRespondToSelector:@selector(isOperatingSystemAtLeastVersion:)] && [[NSProcessInfo new] isOperatingSystemAtLeastVersion:iOS9]) { 79 | [self kif_setHidEvent]; 80 | } 81 | 82 | return self; 83 | } 84 | 85 | - (id)initAtPoint:(CGPoint)point inView:(UIView *)view; 86 | { 87 | return [self initAtPoint:[view.window convertPoint:point fromView:view] inWindow:view.window]; 88 | } 89 | 90 | // 91 | // setLocationInWindow: 92 | // 93 | // Setter to allow access to the _locationInWindow member. 94 | // 95 | - (void)setLocationInWindow:(CGPoint)location 96 | { 97 | [self setTimestamp:[[NSProcessInfo processInfo] systemUptime]]; 98 | [self _setLocationInWindow:location resetPrevious:NO]; 99 | } 100 | 101 | - (void)setPhaseAndUpdateTimestamp:(UITouchPhase)phase 102 | { 103 | [self setTimestamp:[[NSProcessInfo processInfo] systemUptime]]; 104 | [self setPhase:phase]; 105 | } 106 | 107 | - (void)kif_setHidEvent { 108 | IOHIDEventRef event = kif_IOHIDEventWithTouches(@[self]); 109 | [self _setHidEvent:event]; 110 | CFRelease(event); 111 | } 112 | 113 | @end 114 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/UIView-Debugging.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+Debugging.h 3 | // KIF 4 | // 5 | // Created by Graeme Arthur on 02/05/15. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | @interface UIView (Debugging) 12 | /*! 13 | @abstract Prints the view hiererchy, starting from the top window(s), along with accessibility information, which is more related to KIF than the usual information given by the 'description' method. 14 | */ 15 | +(void)printViewHierarchy; 16 | 17 | /*! 18 | @abstract Prints the view hiererchy, starting from this view, along with accessibility information, which is more related to KIF than the usual information given by the 'description' method. 19 | */ 20 | -(void)printViewHierarchy; 21 | 22 | @end -------------------------------------------------------------------------------- /Pods/KIF/Additions/UIWindow-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIWindow-KIFAdditions.h 3 | // KIF 4 | // 5 | // Created by Eric Firestone on 5/20/11. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import 11 | 12 | 13 | @interface UIWindow (KIFAdditions) 14 | 15 | - (UIResponder *)firstResponder; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/UIWindow-KIFAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIWindow-KIFAdditions.m 3 | // KIF 4 | // 5 | // Created by Eric Firestone on 5/20/11. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import "UIWindow-KIFAdditions.h" 11 | 12 | 13 | //@implementation UIWindow (KIFAdditions) 14 | // 15 | //@end 16 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/XCTestCase-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // XCTestCase-KIFAdditions.h 3 | // KIF 4 | // 5 | // Created by Tony DiPasquale on 12/9/13. 6 | // 7 | // 8 | 9 | #import 10 | #import "KIFTestActor.h" 11 | 12 | @interface XCTestCase (KIFAdditions) 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/XCTestCase-KIFAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // XCTestCase-KIFAdditions.m 3 | // KIF 4 | // 5 | // Created by Tony DiPasquale on 12/9/13. 6 | // 7 | // 8 | 9 | #import "XCTestCase-KIFAdditions.h" 10 | #import "LoadableCategory.h" 11 | #import "UIApplication-KIFAdditions.h" 12 | #import 13 | 14 | MAKE_CATEGORIES_LOADABLE(TestCase_KIFAdditions) 15 | 16 | static inline void Swizzle(Class c, SEL orig, SEL new) 17 | { 18 | Method origMethod = class_getInstanceMethod(c, orig); 19 | Method newMethod = class_getInstanceMethod(c, new); 20 | if(class_addMethod(c, orig, method_getImplementation(newMethod), method_getTypeEncoding(newMethod))) 21 | class_replaceMethod(c, new, method_getImplementation(origMethod), method_getTypeEncoding(origMethod)); 22 | else 23 | method_exchangeImplementations(origMethod, newMethod); 24 | } 25 | 26 | @interface XCTestCase () 27 | - (void)_recordUnexpectedFailureWithDescription:(id)arg1 exception:(id)arg2; 28 | @end 29 | 30 | @implementation XCTestCase (KIFAdditions) 31 | 32 | - (void)failWithException:(NSException *)exception stopTest:(BOOL)stop 33 | { 34 | self.continueAfterFailure = YES; 35 | 36 | [self recordFailureWithDescription:exception.description inFile:exception.userInfo[@"FilenameKey"] atLine:[exception.userInfo[@"LineNumberKey"] unsignedIntegerValue] expected:NO]; 37 | 38 | if (stop) { 39 | [self writeScreenshotForException:exception]; 40 | static dispatch_once_t onceToken; 41 | dispatch_once(&onceToken, ^{ 42 | Swizzle([XCTestCase class], @selector(_recordUnexpectedFailureWithDescription:exception:), @selector(KIF_recordUnexpectedFailureWithDescription:exception:)); 43 | }); 44 | [exception raise]; 45 | } 46 | } 47 | 48 | - (void)failWithExceptions:(NSArray *)exceptions stopTest:(BOOL)stop 49 | { 50 | NSException *lastException = exceptions.lastObject; 51 | for (NSException *exception in exceptions) { 52 | [self failWithException:exception stopTest:(exception == lastException ? stop : NO)]; 53 | } 54 | } 55 | 56 | - (void)KIF_recordUnexpectedFailureWithDescription:(id)arg1 exception:(NSException *)arg2 57 | { 58 | if (![[arg2 name] isEqualToString:@"KIFFailureException"]) { 59 | [self KIF_recordUnexpectedFailureWithDescription:arg1 exception:arg2]; 60 | } 61 | } 62 | 63 | - (void)writeScreenshotForException:(NSException *)exception; 64 | { 65 | [[UIApplication sharedApplication] writeScreenshotForLine:[exception.userInfo[@"LineNumberKey"] unsignedIntegerValue] inFile:exception.userInfo[@"FilenameKey"] description:nil error:NULL]; 66 | } 67 | 68 | @end 69 | 70 | #ifdef __IPHONE_8_0 71 | 72 | @interface XCTestSuite () 73 | - (void)_recordUnexpectedFailureForTestRun:(id)arg1 description:(id)arg2 exception:(id)arg3; 74 | @end 75 | 76 | @implementation XCTestSuite (KIFAdditions) 77 | 78 | + (void)load 79 | { 80 | Swizzle([XCTestSuite class], @selector(_recordUnexpectedFailureForTestRun:description:exception:), @selector(KIF_recordUnexpectedFailureForTestRun:description:exception:)); 81 | } 82 | 83 | - (void)KIF_recordUnexpectedFailureForTestRun:(XCTestSuiteRun *)arg1 description:(id)arg2 exception:(NSException *)arg3 84 | { 85 | if (![[arg3 name] isEqualToString:@"KIFFailureException"]) { 86 | [self KIF_recordUnexpectedFailureForTestRun:arg1 description:arg2 exception:arg3]; 87 | } else { 88 | [arg1 recordFailureWithDescription:[NSString stringWithFormat:@"Test suite stopped on fatal error: %@", arg3.description] inFile:arg3.userInfo[@"FilenameKey"] atLine:[arg3.userInfo[@"LineNumberKey"] unsignedIntegerValue] expected:NO]; 89 | } 90 | } 91 | 92 | @end 93 | 94 | #endif 95 | -------------------------------------------------------------------------------- /Pods/KIF/Classes/IOHIDEvent+KIF.h: -------------------------------------------------------------------------------- 1 | // 2 | // IOHIDEvent+KIF.h 3 | // KIF 4 | // 5 | // Created by Thomas Bonnin on 7/6/15. 6 | // 7 | // 8 | 9 | typedef struct __IOHIDEvent * IOHIDEventRef; 10 | IOHIDEventRef kif_IOHIDEventWithTouches(NSArray *touches) CF_RETURNS_RETAINED; 11 | 12 | -------------------------------------------------------------------------------- /Pods/KIF/Classes/KIF.h: -------------------------------------------------------------------------------- 1 | // 2 | // KIF.h 3 | // KIF 4 | // 5 | // Created by Jim Puls on 12/21/12. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import "KIFTestActor.h" 11 | #import "KIFTestCase.h" 12 | #import "KIFSystemTestActor.h" 13 | #import "KIFUITestActor.h" 14 | #import "KIFUITestActor-ConditionalTests.h" 15 | 16 | #import "KIFUIViewTestActor.h" 17 | #import "KIFUIObject.h" 18 | 19 | #import "XCTestCase-KIFAdditions.h" 20 | -------------------------------------------------------------------------------- /Pods/KIF/Classes/KIFAccessibilityEnabler.h: -------------------------------------------------------------------------------- 1 | // 2 | // KIFAccessibilityEnabler.h 3 | // KIF 4 | // 5 | // Created by Timothy Clem on 10/11/15. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface KIFAccessibilityEnabler : NSObject 12 | 13 | + (instancetype)sharedAccessibilityEnabler; 14 | - (void)enableAccessibility; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Pods/KIF/Classes/KIFAccessibilityEnabler.m: -------------------------------------------------------------------------------- 1 | // 2 | // KIFAccessibilityEnabler.m 3 | // KIF 4 | // 5 | // Created by Timothy Clem on 10/11/15. 6 | // 7 | // 8 | 9 | #import "KIFAccessibilityEnabler.h" 10 | #import 11 | #import 12 | 13 | 14 | @interface AccessibilitySettingsController 15 | - (void)setAXInspectorEnabled:(NSNumber*)enabled specifier:(id)specifier; 16 | - (NSNumber *)AXInspectorEnabled:(id)specifier; 17 | @end 18 | 19 | 20 | @interface KIFAccessibilityEnabler () 21 | 22 | @property (nonatomic, strong) id axSettingPrefController; 23 | @property (nonatomic, strong) NSNumber *initialAccessibilityInspectorSetting; 24 | 25 | @end 26 | 27 | 28 | @implementation KIFAccessibilityEnabler 29 | 30 | + (instancetype)sharedAccessibilityEnabler 31 | { 32 | static dispatch_once_t onceToken; 33 | static KIFAccessibilityEnabler *_sharedAccessibilityEnabler; 34 | dispatch_once(&onceToken, ^{ 35 | _sharedAccessibilityEnabler = [[self alloc] init]; 36 | }); 37 | 38 | return _sharedAccessibilityEnabler; 39 | } 40 | 41 | - (void)enableAccessibility 42 | { 43 | NSDictionary *environment = [[NSProcessInfo processInfo] environment]; 44 | NSString *simulatorRoot = [environment objectForKey:@"IPHONE_SIMULATOR_ROOT"]; 45 | 46 | NSString *appSupportLocation = @"/System/Library/PrivateFrameworks/AppSupport.framework/AppSupport"; 47 | if (simulatorRoot) { 48 | appSupportLocation = [simulatorRoot stringByAppendingString:appSupportLocation]; 49 | } 50 | 51 | void *appSupportLibrary = dlopen([appSupportLocation fileSystemRepresentation], RTLD_LAZY); 52 | 53 | CFStringRef (*copySharedResourcesPreferencesDomainForDomain)(CFStringRef domain) = dlsym(appSupportLibrary, "CPCopySharedResourcesPreferencesDomainForDomain"); 54 | 55 | if (copySharedResourcesPreferencesDomainForDomain) { 56 | CFStringRef accessibilityDomain = copySharedResourcesPreferencesDomainForDomain(CFSTR("com.apple.Accessibility")); 57 | 58 | if (accessibilityDomain) { 59 | CFPreferencesSetValue(CFSTR("ApplicationAccessibilityEnabled"), kCFBooleanTrue, accessibilityDomain, kCFPreferencesAnyUser, kCFPreferencesAnyHost); 60 | CFRelease(accessibilityDomain); 61 | } 62 | } 63 | 64 | NSString* accessibilitySettingsBundleLocation = @"/System/Library/PreferenceBundles/AccessibilitySettings.bundle/AccessibilitySettings"; 65 | if (simulatorRoot) { 66 | accessibilitySettingsBundleLocation = [simulatorRoot stringByAppendingString:accessibilitySettingsBundleLocation]; 67 | } 68 | const char *accessibilitySettingsBundlePath = [accessibilitySettingsBundleLocation fileSystemRepresentation]; 69 | void* accessibilitySettingsBundle = dlopen(accessibilitySettingsBundlePath, RTLD_LAZY); 70 | if (accessibilitySettingsBundle) { 71 | Class axSettingsPrefControllerClass = NSClassFromString(@"AccessibilitySettingsController"); 72 | self.axSettingPrefController = [[axSettingsPrefControllerClass alloc] init]; 73 | 74 | self.initialAccessibilityInspectorSetting = [self.axSettingPrefController AXInspectorEnabled:nil]; 75 | [self.axSettingPrefController setAXInspectorEnabled:@(YES) specifier:nil]; 76 | } 77 | } 78 | 79 | - (void)_resetAccessibilityInspector 80 | { 81 | [self.axSettingPrefController setAXInspectorEnabled:self.initialAccessibilityInspectorSetting specifier:nil]; 82 | } 83 | 84 | @end 85 | 86 | void ResetAccessibilityInspector(void); 87 | 88 | // It appears that if you register as a test observer too late, then you don't get the testBundleDidFinish: method called, so instead we use this is a workaround. This is also works well for test envs that don't have XCTestObservation 89 | __attribute__((destructor)) 90 | void ResetAccessibilityInspector() { 91 | [[KIFAccessibilityEnabler sharedAccessibilityEnabler] _resetAccessibilityInspector]; 92 | } 93 | -------------------------------------------------------------------------------- /Pods/KIF/Classes/KIFSystemTestActor.h: -------------------------------------------------------------------------------- 1 | // 2 | // KIFTester+Generic.h 3 | // KIF 4 | // 5 | // Created by Brian Nickel on 12/14/12. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import "KIFTestActor.h" 11 | #import 12 | 13 | #define system KIFActorWithClass(KIFSystemTestActor) 14 | 15 | @interface KIFSystemTestActor : KIFTestActor 16 | 17 | /*! 18 | @abstract Waits for a specific NSNotification. 19 | @discussion Useful when a test requires an asynchronous task to complete, especially when that task does not trigger a visible change in the view hierarchy. 20 | @param name The name of the NSNotification. 21 | @param object The object to which the step should listen. Nil value will listen to all objects. 22 | @return The detected NSNotification. 23 | */ 24 | - (NSNotification *)waitForNotificationName:(NSString*)name object:(id)object; 25 | 26 | /*! 27 | @abstract Waits for a specific NSNotification, emitted during or after execution of a block. 28 | @discussion Useful when step execution causes a notification to be emitted, but executes too quickly for waitForNotificationName: to observe it. 29 | An observer will be registered for the notification before the block is executed. 30 | @param name The name of the NSNotification. 31 | @param object The object to which the step should listen. Nil value will listen to all objects. 32 | @param block The block of code to be executed. 33 | @return The detected NSNotification. 34 | */ 35 | - (NSNotification *)waitForNotificationName:(NSString *)name object:(id)object whileExecutingBlock:(void(^)())block; 36 | 37 | /*! 38 | @abstract Simulates a memory warning. 39 | */ 40 | - (void)simulateMemoryWarning; 41 | 42 | /*! 43 | @abstract Simulates a device rotation to a specific orentation from its last set orientation. 44 | @discussion The first time this method is called, it will be from the device's natural orientation to the orientation described. 45 | @param orientation The desired orientation. 46 | */ 47 | - (void)simulateDeviceRotationToOrientation:(UIDeviceOrientation)orientation; 48 | 49 | /*! 50 | @abstract Waits for the application to request a specific URL while executing a block. 51 | @param URLString The absolute string representation of the URL to detect. 52 | @param block The block of code to be executed. 53 | @param returnValue The value to return from @c +[UIApplication openURL:]. 54 | */ 55 | - (void)waitForApplicationToOpenURL:(NSString *)URLString whileExecutingBlock:(void(^)())block returning:(BOOL)returnValue; 56 | 57 | /*! 58 | @abstract Waits for the application to request any URL while executing a block. 59 | @param block The block of code to be executed. 60 | @param returnValue The value to return from @c +[UIApplication openURL:]. 61 | */ 62 | - (void)waitForApplicationToOpenAnyURLWhileExecutingBlock:(void(^)())block returning:(BOOL)returnValue; 63 | 64 | /*! 65 | @abstract Waits for the application to request any URL with the given URL Scheme while executing a block. 66 | @param URLScheme The scheme component of the URL to detect. 67 | @param block The block of code to be executed. 68 | @param returnValue The value to return from @c +[UIApplication openURL:]. 69 | */ 70 | - (void)waitForApplicationToOpenURLWithScheme:(NSString *)URLScheme whileExecutingBlock:(void (^)())block returning:(BOOL)returnValue; 71 | 72 | /*! 73 | @abstract Captured a screenshot of the current screen and writes it to disk with an optional description. 74 | @discussion This step will fail if the @c KIF_SCREENSHOTS environment variable is not set or if the screenshot cannot be written to disk. 75 | @param description A description to use when writing the file to disk. 76 | */ 77 | - (void)captureScreenshotWithDescription:(NSString *)description; 78 | 79 | /*! 80 | @abstract Backgrounds app using UIAutomation command, simulating pressing the Home button 81 | @param duration Amount of time for a background event before the app becomes active again 82 | */ 83 | - (void)deactivateAppForDuration:(NSTimeInterval)duration; 84 | 85 | @end 86 | -------------------------------------------------------------------------------- /Pods/KIF/Classes/KIFTestCase.h: -------------------------------------------------------------------------------- 1 | // 2 | // KIFTestCase.h 3 | // KIF 4 | // 5 | // Created by Brian Nickel on 12/14/12. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | /*! 11 | * @abstract @c KIFTestCase subclasses @c XCTestCase to add setup and teardown steps that can be used to execute KIF test steps. 12 | * @discussion This class provides four new methods: @c beforeAll and @c afterAll which run once before and after all tests and @c beforeEach and @c afterEach which run before and after every test. @c beforeEach and @c afterEach are guaranteed to run in the same instance as each test, but @c beforeAll and @c afterAll are not. As such, @c beforeEach can be used to set up instance variables while @c beforeAll can only be used to set up static variables. 13 | */ 14 | #import 15 | #import "XCTestCase-KIFAdditions.h" 16 | @interface KIFTestCase : XCTestCase 17 | 18 | /*! 19 | * @abstract This method runs once before executing the first test in the class. 20 | * @discussion This should be used for navigating to the starting point in the app where all tests will start from. Because this method is not guaranteed to run in the same instance as tests, it should not be used for setting up instance variables but can be used for setting up static variables. 21 | */ 22 | - (void)beforeAll; 23 | 24 | /*! 25 | * @abstract This method runs before each test. 26 | * @discussion This should be used for any common tasks required before each test. Because this method is guaranteed to run in the same instance as tests, it can be used for setting up instance variables. 27 | */ 28 | - (void)beforeEach; 29 | 30 | /*! 31 | * @abstract This method runs after each test. 32 | * @discussion This should be used for restoring the app to the state it was in before the test. This could include conditional logic to recover from failed tests. 33 | */ 34 | - (void)afterEach; 35 | 36 | /*! 37 | * @abstract This method runs once after executing the last test in the class. 38 | * @discussion This should be used for navigating back to the initial state of the app, where it was before @c beforeAll. This should also be used for tearing down any static methods created by @c beforeAll. 39 | */ 40 | - (void)afterAll; 41 | 42 | /*! 43 | * @discussion When @c YES, rather than failing the test and advancing on the first failure, KIF will stop executing tests and begin spinning the run loop. This provides an opportunity for inspecting the state of the app when the failure occurred. 44 | */ 45 | @property (nonatomic, assign) BOOL stopTestsOnFirstBigFailure; 46 | 47 | @end 48 | 49 | -------------------------------------------------------------------------------- /Pods/KIF/Classes/KIFTestCase.m: -------------------------------------------------------------------------------- 1 | // 2 | // KIFTestCase.m 3 | // KIF 4 | // 5 | // Created by Brian Nickel on 12/14/12. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import "KIFTestCase.h" 11 | #import 12 | #import "UIApplication-KIFAdditions.h" 13 | #import "KIFTestActor.h" 14 | #import "KIFAccessibilityEnabler.h" 15 | 16 | #define SIG(class, selector) [class instanceMethodSignatureForSelector:selector] 17 | 18 | @implementation KIFTestCase 19 | { 20 | NSException *_stoppingException; 21 | } 22 | 23 | NSComparisonResult selectorSort(NSInvocation *invocOne, NSInvocation *invocTwo, void *reverse); 24 | 25 | + (id)defaultTestSuite 26 | { 27 | if (self == [KIFTestCase class]) { 28 | // Don't run KIFTestCase "tests" 29 | return nil; 30 | } 31 | 32 | return [super defaultTestSuite]; 33 | } 34 | 35 | - (id)initWithInvocation:(NSInvocation *)anInvocation; 36 | { 37 | self = [super initWithInvocation:anInvocation]; 38 | if (!self) { 39 | return nil; 40 | } 41 | 42 | self.continueAfterFailure = NO; 43 | return self; 44 | } 45 | 46 | - (void)beforeEach { } 47 | - (void)afterEach { } 48 | - (void)beforeAll { } 49 | - (void)afterAll { } 50 | 51 | NSComparisonResult selectorSort(NSInvocation *invocOne, NSInvocation *invocTwo, void *reverse) { 52 | 53 | NSString *selectorOne = NSStringFromSelector([invocOne selector]); 54 | NSString *selectorTwo = NSStringFromSelector([invocTwo selector]); 55 | return [selectorOne compare:selectorTwo options:NSCaseInsensitiveSearch]; 56 | } 57 | 58 | + (NSArray *)testInvocations 59 | { 60 | NSArray *disorderedInvoc = [super testInvocations]; 61 | NSArray *newArray = [disorderedInvoc sortedArrayUsingFunction:selectorSort context:NULL]; 62 | return newArray; 63 | } 64 | 65 | + (void)setUp 66 | { 67 | static dispatch_once_t onceToken; 68 | dispatch_once(&onceToken, ^{ 69 | [[KIFAccessibilityEnabler sharedAccessibilityEnabler] enableAccessibility]; 70 | }); 71 | [self performSetupTearDownWithSelector:@selector(beforeAll)]; 72 | } 73 | 74 | + (void)tearDown 75 | { 76 | [self performSetupTearDownWithSelector:@selector(afterAll)]; 77 | } 78 | 79 | + (void)performSetupTearDownWithSelector:(SEL)selector 80 | { 81 | KIFTestCase *testCase = [self testCaseWithSelector:selector]; 82 | if ([testCase respondsToSelector:selector]) { 83 | #pragma clang diagnostic push 84 | #pragma clang diagnostic ignored "-Warc-performSelector-leaks" 85 | [testCase performSelector:selector]; 86 | #pragma clang diagnostic pop 87 | } 88 | 89 | if (testCase->_stoppingException) { 90 | [testCase->_stoppingException raise]; 91 | } 92 | } 93 | 94 | - (void)setUp; 95 | { 96 | [super setUp]; 97 | 98 | if ([self isNotBeforeOrAfter]) { 99 | [self beforeEach]; 100 | } 101 | } 102 | 103 | - (void)tearDown; 104 | { 105 | if ([self isNotBeforeOrAfter]) { 106 | [self afterEach]; 107 | } 108 | 109 | [super tearDown]; 110 | } 111 | 112 | - (BOOL)isNotBeforeOrAfter; 113 | { 114 | SEL selector = self.invocation.selector; 115 | return selector != @selector(beforeAll) && selector != @selector(afterAll); 116 | } 117 | 118 | - (void)failWithException:(NSException *)exception stopTest:(BOOL)stop 119 | { 120 | if (stop) { 121 | _stoppingException = exception; 122 | } 123 | 124 | if (stop && self.stopTestsOnFirstBigFailure) { 125 | NSLog(@"Fatal failure encountered: %@", exception.description); 126 | NSLog(@"Stopping tests since stopTestsOnFirstBigFailure = YES"); 127 | 128 | KIFTestActor *waiter = [[KIFTestActor alloc] init]; 129 | [waiter waitForTimeInterval:[[NSDate distantFuture] timeIntervalSinceNow]]; 130 | 131 | return; 132 | } else { 133 | [super failWithException:exception stopTest:stop]; 134 | } 135 | } 136 | 137 | @end 138 | -------------------------------------------------------------------------------- /Pods/KIF/Classes/KIFTestStepValidation.h: -------------------------------------------------------------------------------- 1 | // 2 | // KIFTestStepValidation.h 3 | // KIF 4 | // 5 | // Created by Brian Nickel on 7/27/13. 6 | // 7 | // 8 | 9 | #import 10 | #import "KIFTestCase.h" 11 | 12 | #define __KIFFail XCTFail 13 | #define __KIFAssertEqual XCTAssertEqual 14 | #define __KIFAssertEqualObjects XCTAssertEqualObjects 15 | 16 | #define KIFExpectFailure(stmt) \ 17 | {\ 18 | _MockKIFTestActorDelegate *mockDelegate = [_MockKIFTestActorDelegate mockDelegate];\ 19 | {\ 20 | _MockKIFTestActorDelegate *self = mockDelegate;\ 21 | @try { stmt; }\ 22 | @catch (NSException *exception) { }\ 23 | }\ 24 | if (!mockDelegate.failed) {\ 25 | __KIFFail(@"%s should have failed.", #stmt);\ 26 | }\ 27 | } 28 | 29 | #define KIFExpectFailureWithCount(stmt, cnt) \ 30 | {\ 31 | _MockKIFTestActorDelegate *mockDelegate = [_MockKIFTestActorDelegate mockDelegate];\ 32 | {\ 33 | _MockKIFTestActorDelegate *self = mockDelegate;\ 34 | @try { stmt; }\ 35 | @catch (NSException *exception) { }\ 36 | }\ 37 | if (!mockDelegate.failed) {\ 38 | __KIFFail(@"%s should have failed.", #stmt);\ 39 | }\ 40 | __KIFAssertEqual((NSUInteger)cnt, mockDelegate.exceptions.count, @"Expected a different number of exceptions.");\ 41 | } 42 | 43 | 44 | @interface _MockKIFTestActorDelegate : NSObject 45 | @property (nonatomic, assign) BOOL failed; 46 | @property (nonatomic, strong) NSArray *exceptions; 47 | @property (nonatomic, assign) BOOL stopped; 48 | 49 | + (instancetype)mockDelegate; 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /Pods/KIF/Classes/KIFTestStepValidation.m: -------------------------------------------------------------------------------- 1 | // 2 | // KIFTestStepValidation.m 3 | // KIF 4 | // 5 | // Created by Brian Nickel on 7/27/13. 6 | // 7 | // 8 | 9 | #import "KIFTestStepValidation.h" 10 | 11 | @implementation _MockKIFTestActorDelegate 12 | 13 | - (void)failWithException:(NSException *)exception stopTest:(BOOL)stop 14 | { 15 | [self failWithExceptions:@[exception] stopTest:stop]; 16 | } 17 | 18 | - (void)failWithExceptions:(NSArray *)exceptions stopTest:(BOOL)stop 19 | { 20 | self.failed = YES; 21 | self.exceptions = exceptions; 22 | self.stopped = stop; 23 | if (stop) { 24 | [[exceptions objectAtIndex:0] raise]; 25 | } 26 | } 27 | 28 | + (instancetype)mockDelegate 29 | { 30 | return [[self alloc] init]; 31 | } 32 | 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /Pods/KIF/Classes/KIFTypist.h: -------------------------------------------------------------------------------- 1 | // 2 | // KIFTypist.h 3 | // KIF 4 | // 5 | // Created by Pete Hodgson on 8/12/12. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | 11 | @interface KIFTypist : NSObject 12 | 13 | + (void)registerForNotifications; 14 | + (BOOL)keyboardHidden; 15 | + (BOOL)enterCharacter:(NSString *)characterString; 16 | + (void)setKeystrokeDelay:(NSTimeInterval)delay; 17 | + (BOOL)hasHardwareKeyboard; 18 | + (BOOL)hasKeyInputResponder; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Pods/KIF/Classes/KIFTypist.m: -------------------------------------------------------------------------------- 1 | // 2 | // KIFTypist.m 3 | // KIF 4 | // 5 | // Created by Pete Hodgson on 8/12/12. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import "KIFTypist.h" 11 | #import "UIApplication-KIFAdditions.h" 12 | #import "UIView-KIFAdditions.h" 13 | #import "CGGeometry-KIFAdditions.h" 14 | #import "UIAccessibilityElement-KIFAdditions.h" 15 | 16 | @interface UIKeyboardImpl : NSObject 17 | + (UIKeyboardImpl *)sharedInstance; 18 | - (void)addInputString:(NSString *)string; 19 | - (void)deleteFromInput; 20 | @property(getter=isInHardwareKeyboardMode) BOOL inHardwareKeyboardMode; 21 | @property(retain) UIResponder * delegate; 22 | @end 23 | 24 | static NSTimeInterval keystrokeDelay = 0.01f; 25 | 26 | @interface KIFTypist() 27 | @property (nonatomic, assign) BOOL keyboardHidden; 28 | @end 29 | 30 | @implementation KIFTypist 31 | 32 | + (KIFTypist *)sharedTypist 33 | { 34 | static dispatch_once_t once; 35 | static KIFTypist *sharedObserver = nil; 36 | dispatch_once(&once, ^{ 37 | sharedObserver = [[self alloc] init]; 38 | }); 39 | return sharedObserver; 40 | } 41 | 42 | + (void)registerForNotifications { 43 | [[self sharedTypist] registerForNotifications]; 44 | } 45 | 46 | - (instancetype)init 47 | { 48 | if ((self = [super init])) { 49 | self.keyboardHidden = YES; 50 | } 51 | return self; 52 | } 53 | 54 | - (void)registerForNotifications 55 | { 56 | // Instead of listening to keyboard will show/hide notifications, this is more robust. When keyboard is split 57 | // on a physical device, keyboard will show/hide notifications does not get fired, whereas this does. 58 | __weak KIFTypist *weakSelf = self; 59 | [[NSNotificationCenter defaultCenter] addObserverForName:UIKeyboardDidChangeFrameNotification 60 | object:nil 61 | queue:[NSOperationQueue mainQueue] 62 | usingBlock:^(NSNotification *note) { 63 | CGRect keyboardEndFrame = 64 | [[note.userInfo objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue]; 65 | 66 | CGRect screenRect = [[UIScreen mainScreen] bounds]; 67 | 68 | if (CGRectIntersectsRect(keyboardEndFrame, screenRect)) 69 | { 70 | weakSelf.keyboardHidden = NO; 71 | } 72 | else 73 | { 74 | weakSelf.keyboardHidden = YES; 75 | } 76 | }]; 77 | } 78 | 79 | + (BOOL)keyboardHidden 80 | { 81 | return [self sharedTypist].keyboardHidden; 82 | } 83 | 84 | + (BOOL)enterCharacter:(NSString *)characterString; 85 | { 86 | if ([characterString isEqualToString:@"\b"]) { 87 | [[UIKeyboardImpl sharedInstance] deleteFromInput]; 88 | } else { 89 | [[UIKeyboardImpl sharedInstance] addInputString:characterString]; 90 | } 91 | 92 | CFRunLoopRunInMode(kCFRunLoopDefaultMode, keystrokeDelay, false); 93 | return YES; 94 | } 95 | 96 | + (void)setKeystrokeDelay:(NSTimeInterval)delay 97 | { 98 | keystrokeDelay = delay; 99 | } 100 | 101 | + (BOOL)hasHardwareKeyboard 102 | { 103 | return [UIKeyboardImpl sharedInstance].inHardwareKeyboardMode; 104 | } 105 | 106 | + (BOOL)hasKeyInputResponder 107 | { 108 | return [UIKeyboardImpl sharedInstance].delegate != nil; 109 | } 110 | 111 | 112 | @end 113 | -------------------------------------------------------------------------------- /Pods/KIF/Classes/KIFUIObject.h: -------------------------------------------------------------------------------- 1 | // 2 | // KIFUIObject.h 3 | // KIF 4 | // 5 | // Created by Alex Odawa on 1/26/15. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface KIFUIObject : NSObject 12 | 13 | @property (nonatomic, weak, readonly) UIView *view; 14 | @property (nonatomic, weak, readonly) UIAccessibilityElement *element; 15 | 16 | - (instancetype)initWithElement:(UIAccessibilityElement *)element view:(UIView *)view; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Pods/KIF/Classes/KIFUIObject.m: -------------------------------------------------------------------------------- 1 | // 2 | // KIFUIObject.m 3 | // KIF 4 | // 5 | // Created by Alex Odawa on 1/26/15. 6 | // 7 | // 8 | 9 | #import "KIFUIObject.h" 10 | 11 | 12 | @implementation KIFUIObject 13 | 14 | - (instancetype)initWithElement:(UIAccessibilityElement *)element view:(UIView *)view; 15 | { 16 | self = [super init]; 17 | if (self) { 18 | _element = element; 19 | _view = view; 20 | } 21 | return self; 22 | } 23 | 24 | - (NSString *)description; 25 | { 26 | return [NSString stringWithFormat:@"<%@;\n| element=%@;\n| | view=%@>", [super description], self.element, self.view]; 27 | } 28 | @end 29 | -------------------------------------------------------------------------------- /Pods/KIF/Classes/KIFUITestActor-ConditionalTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // KIFUITestActor-ConditionalTests.m 3 | // KIF 4 | // 5 | // Created by Brian Nickel on 7/24/14. 6 | // 7 | // 8 | 9 | #import "KIFUITestActor-ConditionalTests.h" 10 | #import "UIAccessibilityElement-KIFAdditions.h" 11 | #import "NSError-KIFAdditions.h" 12 | 13 | @implementation KIFUITestActor (ConditionalTests) 14 | 15 | - (BOOL)tryFindingViewWithAccessibilityLabel:(NSString *)label error:(out NSError **)error 16 | { 17 | return [self tryFindingViewWithAccessibilityLabel:label value:nil traits:UIAccessibilityTraitNone tappable:NO error:error]; 18 | } 19 | 20 | - (BOOL)tryFindingViewWithAccessibilityLabel:(NSString *)label traits:(UIAccessibilityTraits)traits error:(out NSError **)error 21 | { 22 | return [self tryFindingViewWithAccessibilityLabel:label value:nil traits:traits tappable:NO error:error]; 23 | } 24 | 25 | - (BOOL)tryFindingViewWithAccessibilityLabel:(NSString *)label value:(NSString *)value traits:(UIAccessibilityTraits)traits error:(out NSError **)error 26 | { 27 | return [self tryFindingViewWithAccessibilityLabel:label value:value traits:traits tappable:NO error:error]; 28 | } 29 | 30 | - (BOOL)tryFindingTappableViewWithAccessibilityLabel:(NSString *)label error:(out NSError **)error 31 | { 32 | return [self tryFindingViewWithAccessibilityLabel:label value:nil traits:UIAccessibilityTraitNone tappable:YES error:error]; 33 | } 34 | 35 | - (BOOL)tryFindingTappableViewWithAccessibilityLabel:(NSString *)label traits:(UIAccessibilityTraits)traits error:(out NSError **)error 36 | { 37 | return [self tryFindingViewWithAccessibilityLabel:label value:nil traits:traits tappable:YES error:error]; 38 | } 39 | 40 | - (BOOL)tryFindingTappableViewWithAccessibilityLabel:(NSString *)label value:(NSString *)value traits:(UIAccessibilityTraits)traits error:(out NSError **)error 41 | { 42 | return [self tryFindingViewWithAccessibilityLabel:label value:value traits:traits tappable:YES error:error]; 43 | } 44 | 45 | - (BOOL)tryFindingViewWithAccessibilityLabel:(NSString *)label value:(NSString *)value traits:(UIAccessibilityTraits)traits tappable:(BOOL)mustBeTappable error:(out NSError **)error 46 | { 47 | return [self tryFindingAccessibilityElement:NULL view:NULL withLabel:label value:value traits:traits tappable:mustBeTappable error:error]; 48 | } 49 | 50 | - (BOOL)tryFindingAccessibilityElement:(out UIAccessibilityElement **)element view:(out UIView **)view withLabel:(NSString *)label value:(NSString *)value traits:(UIAccessibilityTraits)traits tappable:(BOOL)mustBeTappable error:(out NSError **)error 51 | { 52 | return [self tryRunningBlock:^KIFTestStepResult(NSError *__autoreleasing *error) { 53 | return [UIAccessibilityElement accessibilityElement:element view:view withLabel:label value:value traits:traits tappable:mustBeTappable error:error] ? KIFTestStepResultSuccess : KIFTestStepResultWait; 54 | } complete:nil timeout:1.0 error:error]; 55 | } 56 | 57 | - (BOOL)tryFindingAccessibilityElement:(out UIAccessibilityElement **)element view:(out UIView **)view withIdentifier:(NSString *)identifier tappable:(BOOL)mustBeTappable error:(out NSError **)error 58 | { 59 | if (![UIAccessibilityElement instancesRespondToSelector:@selector(accessibilityIdentifier)]) { 60 | [self failWithError:[NSError KIFErrorWithFormat:@"Running test on platform that does not support accessibilityIdentifier"] stopTest:YES]; 61 | } 62 | 63 | return [self tryFindingAccessibilityElement:element view:view withElementMatchingPredicate:[NSPredicate predicateWithFormat:@"accessibilityIdentifier = %@", identifier] tappable:mustBeTappable error:error]; 64 | } 65 | 66 | - (BOOL)tryFindingAccessibilityElement:(out UIAccessibilityElement **)element view:(out UIView **)view withElementMatchingPredicate:(NSPredicate *)predicate tappable:(BOOL)mustBeTappable error:(out NSError **)error 67 | { 68 | return [self tryRunningBlock:^KIFTestStepResult(NSError *__autoreleasing *error) { 69 | return [UIAccessibilityElement accessibilityElement:element view:view withElementMatchingPredicate:predicate tappable:mustBeTappable error:error] ? KIFTestStepResultSuccess : KIFTestStepResultWait; 70 | } complete:nil timeout:1.0 error:error]; 71 | } 72 | 73 | @end 74 | -------------------------------------------------------------------------------- /Pods/KIF/Classes/UIAutomationHelper.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIAutomationHelper.h 3 | // KIF 4 | // 5 | // Created by Joe Masilotti on 12/1/14. 6 | // 7 | // 8 | 9 | #import 10 | 11 | 12 | @class KIFTestActor; 13 | 14 | @interface UIAutomationHelper : NSObject 15 | 16 | + (BOOL)acknowledgeSystemAlert; 17 | 18 | + (void)deactivateAppForDuration:(NSNumber *)duration; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Pods/KIF/LICENSE: -------------------------------------------------------------------------------- 1 | KIF 2 | Copyright 2011-2016 Square, Inc. 3 | A full list of contributors is available at https://github.com/square/KIF/contributors 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | -------------------------------------------------------------------------------- /Pods/Local Podspecs/JPSimulatorHacks.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "JPSimulatorHacks", 3 | "version": "1.4.2", 4 | "license": "MIT", 5 | "summary": "Hack the Simulator in your tests (grant access to photos, contacts, ...)", 6 | "homepage": "https://github.com/plu/JPSimulatorHacks", 7 | "authors": { 8 | "Johannes Plunien": "plu@pqpq.de" 9 | }, 10 | "source": { 11 | "git": "https://github.com/plu/JPSimulatorHacks.git", 12 | "tag": "1.4.2" 13 | }, 14 | "requires_arc": true, 15 | "platforms": { 16 | "ios": "7.0" 17 | }, 18 | "default_subspecs": "standard", 19 | "subspecs": [ 20 | { 21 | "name": "standard", 22 | "source_files": "JPSimulatorHacks/*.{h,m}", 23 | "libraries": "sqlite3" 24 | }, 25 | { 26 | "name": "standalone", 27 | "xcconfig": { 28 | "OTHER_CFLAGS": "$(inherited) -DJPSH_SQLITE_STANDALONE" 29 | }, 30 | "source_files": "JPSimulatorHacks/*.{h,m}", 31 | "dependencies": { 32 | "sqlite3": [ 33 | 34 | ] 35 | } 36 | } 37 | ] 38 | } 39 | -------------------------------------------------------------------------------- /Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Expecta (0.4.2) 3 | - JPSimulatorHacks (1.4.2): 4 | - JPSimulatorHacks/standard (= 1.4.2) 5 | - JPSimulatorHacks/standard (1.4.2) 6 | - KIF (3.4.2): 7 | - KIF/Core (= 3.4.2) 8 | - KIF/Core (3.4.2) 9 | 10 | DEPENDENCIES: 11 | - Expecta (~> 0.3) 12 | - JPSimulatorHacks (from `.`) 13 | - KIF 14 | 15 | EXTERNAL SOURCES: 16 | JPSimulatorHacks: 17 | :path: "." 18 | 19 | SPEC CHECKSUMS: 20 | Expecta: 78b4e8b0c8291fa4524d7f74016b6065c2e391ec 21 | JPSimulatorHacks: 28428b30259eb93ad558ac3f2c608acd2133a14b 22 | KIF: b518c9831453abea5afdbbde3908ec47832d6d56 23 | 24 | PODFILE CHECKSUM: ac57d2de111a2bdf8077628fc091ddf13a7356a3 25 | 26 | COCOAPODS: 1.2.1 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Expecta/Expecta-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Expecta : NSObject 3 | @end 4 | @implementation PodsDummy_Expecta 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Expecta/Expecta-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Expecta/Expecta.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Expecta 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" $(inherited) $(DEVELOPER_FRAMEWORKS_DIR) "$(PLATFORM_DIR)/Developer/Library/Frameworks" "$(DEVELOPER_DIR)/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Expecta" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/JPSimulatorHacks" "${PODS_ROOT}/Headers/Public/KIF" 5 | OTHER_LDFLAGS = -framework "Foundation" -framework "XCTest" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT} 9 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/Expecta 10 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | SKIP_INSTALL = YES 12 | -------------------------------------------------------------------------------- /Pods/Target Support Files/JPSimulatorHacks/JPSimulatorHacks-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_JPSimulatorHacks : NSObject 3 | @end 4 | @implementation PodsDummy_JPSimulatorHacks 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/JPSimulatorHacks/JPSimulatorHacks-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Pods/Target Support Files/JPSimulatorHacks/JPSimulatorHacks.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/JPSimulatorHacks 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/JPSimulatorHacks" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/JPSimulatorHacks" "${PODS_ROOT}/Headers/Public/KIF" 4 | OTHER_LDFLAGS = -l"sqlite3" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/.. 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | -------------------------------------------------------------------------------- /Pods/Target Support Files/KIF/KIF-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_KIF : NSObject 3 | @end 4 | @implementation PodsDummy_KIF 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/KIF/KIF-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | #import 14 | -------------------------------------------------------------------------------- /Pods/Target Support Files/KIF/KIF.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/KIF 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/KIF" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/JPSimulatorHacks" "${PODS_ROOT}/Headers/Public/KIF" 5 | OTHER_LDFLAGS = -framework "CoreGraphics" -framework "IOKit" -framework "QuartzCore" -framework "XCTest" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT} 9 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/KIF 10 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | SKIP_INSTALL = YES 12 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-JPSimulatorHacksSampleTests/Pods-JPSimulatorHacksSampleTests-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## Expecta 5 | 6 | Copyright (c) 2011-2015 Specta Team - https://github.com/specta 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | 26 | 27 | ## JPSimulatorHacks 28 | 29 | The MIT License (MIT) 30 | 31 | Copyright (c) 2014 Johannes Plunien 32 | 33 | Permission is hereby granted, free of charge, to any person obtaining a copy of 34 | this software and associated documentation files (the "Software"), to deal in 35 | the Software without restriction, including without limitation the rights to 36 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 37 | the Software, and to permit persons to whom the Software is furnished to do so, 38 | subject to the following conditions: 39 | 40 | The above copyright notice and this permission notice shall be included in all 41 | copies or substantial portions of the Software. 42 | 43 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 44 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 45 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 46 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 47 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 48 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 49 | 50 | 51 | ## KIF 52 | 53 | KIF 54 | Copyright 2011-2016 Square, Inc. 55 | A full list of contributors is available at https://github.com/square/KIF/contributors 56 | 57 | Licensed under the Apache License, Version 2.0 (the "License"); 58 | you may not use this file except in compliance with the License. 59 | You may obtain a copy of the License at 60 | 61 | http://www.apache.org/licenses/LICENSE-2.0 62 | 63 | Unless required by applicable law or agreed to in writing, software 64 | distributed under the License is distributed on an "AS IS" BASIS, 65 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 66 | See the License for the specific language governing permissions and 67 | limitations under the License. 68 | 69 | Generated by CocoaPods - https://cocoapods.org 70 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-JPSimulatorHacksSampleTests/Pods-JPSimulatorHacksSampleTests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_JPSimulatorHacksSampleTests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_JPSimulatorHacksSampleTests 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-JPSimulatorHacksSampleTests/Pods-JPSimulatorHacksSampleTests-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | install_framework() 10 | { 11 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 12 | local source="${BUILT_PRODUCTS_DIR}/$1" 13 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 15 | elif [ -r "$1" ]; then 16 | local source="$1" 17 | fi 18 | 19 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 20 | 21 | if [ -L "${source}" ]; then 22 | echo "Symlinked..." 23 | source="$(readlink "${source}")" 24 | fi 25 | 26 | # use filter instead of exclude so missing patterns dont' throw errors 27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 29 | 30 | local basename 31 | basename="$(basename -s .framework "$1")" 32 | binary="${destination}/${basename}.framework/${basename}" 33 | if ! [ -r "$binary" ]; then 34 | binary="${destination}/${basename}" 35 | fi 36 | 37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 39 | strip_invalid_archs "$binary" 40 | fi 41 | 42 | # Resign the code if required by the build settings to avoid unstable apps 43 | code_sign_if_enabled "${destination}/$(basename "$1")" 44 | 45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 47 | local swift_runtime_libs 48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 49 | for lib in $swift_runtime_libs; do 50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 52 | code_sign_if_enabled "${destination}/${lib}" 53 | done 54 | fi 55 | } 56 | 57 | # Signs a framework with the provided identity 58 | code_sign_if_enabled() { 59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 60 | # Use the current code_sign_identitiy 61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 62 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'" 63 | 64 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 65 | code_sign_cmd="$code_sign_cmd &" 66 | fi 67 | echo "$code_sign_cmd" 68 | eval "$code_sign_cmd" 69 | fi 70 | } 71 | 72 | # Strip invalid architectures 73 | strip_invalid_archs() { 74 | binary="$1" 75 | # Get architectures for current file 76 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 77 | stripped="" 78 | for arch in $archs; do 79 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 80 | # Strip non-valid architectures in-place 81 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 82 | stripped="$stripped $arch" 83 | fi 84 | done 85 | if [[ "$stripped" ]]; then 86 | echo "Stripped $binary of architectures:$stripped" 87 | fi 88 | } 89 | 90 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 91 | wait 92 | fi 93 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-JPSimulatorHacksSampleTests/Pods-JPSimulatorHacksSampleTests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) $(DEVELOPER_FRAMEWORKS_DIR) "$(PLATFORM_DIR)/Developer/Library/Frameworks" "$(DEVELOPER_DIR)/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks" $(PLATFORM_DIR)/Developer/Library/Frameworks 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/JPSimulatorHacks" "${PODS_ROOT}/Headers/Public/KIF" 4 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Expecta" "$PODS_CONFIGURATION_BUILD_DIR/JPSimulatorHacks" "$PODS_CONFIGURATION_BUILD_DIR/KIF" 5 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/Expecta" -isystem "${PODS_ROOT}/Headers/Public/JPSimulatorHacks" -isystem "${PODS_ROOT}/Headers/Public/KIF" 6 | OTHER_LDFLAGS = $(inherited) -ObjC -l"Expecta" -l"JPSimulatorHacks" -l"KIF" -l"sqlite3" -framework "CoreGraphics" -framework "Foundation" -framework "IOKit" -framework "QuartzCore" -framework "XCTest" 7 | PODS_BUILD_DIR = $BUILD_DIR 8 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 9 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 10 | PODS_ROOT = ${SRCROOT}/Pods 11 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-JPSimulatorHacksSampleTests/Pods-JPSimulatorHacksSampleTests.release.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) $(DEVELOPER_FRAMEWORKS_DIR) "$(PLATFORM_DIR)/Developer/Library/Frameworks" "$(DEVELOPER_DIR)/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks" $(PLATFORM_DIR)/Developer/Library/Frameworks 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/JPSimulatorHacks" "${PODS_ROOT}/Headers/Public/KIF" 4 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Expecta" "$PODS_CONFIGURATION_BUILD_DIR/JPSimulatorHacks" "$PODS_CONFIGURATION_BUILD_DIR/KIF" 5 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/Expecta" -isystem "${PODS_ROOT}/Headers/Public/JPSimulatorHacks" -isystem "${PODS_ROOT}/Headers/Public/KIF" 6 | OTHER_LDFLAGS = $(inherited) -ObjC -l"Expecta" -l"JPSimulatorHacks" -l"KIF" -l"sqlite3" -framework "CoreGraphics" -framework "Foundation" -framework "IOKit" -framework "QuartzCore" -framework "XCTest" 7 | PODS_BUILD_DIR = $BUILD_DIR 8 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 9 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 10 | PODS_ROOT = ${SRCROOT}/Pods 11 | -------------------------------------------------------------------------------- /Scripts/diff_plists.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | deviceid="DC033DFD-A918-4A18-B390-3C1822E37498" 4 | 5 | 6 | basedir="/tmp/JPSimulatorHacksDiff" 7 | olddir=$(ls -1dt $basedir/* | head -n1) 8 | newdir="$basedir/$(date +%s)" 9 | mkdir -p $newdir 10 | 11 | SAVEIFS=$IFS 12 | IFS=$(echo -en "\n\b") 13 | 14 | for plist in $(find ~/Library/Developer/CoreSimulator/Devices/$deviceid -name "*.plist"); do 15 | dirname=$(dirname $plist) 16 | mkdir -p $newdir/$dirname 17 | plutil -convert xml1 -o - $plist | xmllint -format - > $newdir/$plist.xml 18 | if [ $? -ne 0 ]; then 19 | echo "Processing $plist failed" 20 | fi 21 | done 22 | 23 | IFS=$SAVEIFS 24 | 25 | diff -Nuarbwr $olddir $newdir 26 | --------------------------------------------------------------------------------