diff --git a/.codecov.yml b/.codecov.yml index e9e391fa..e6271a2a 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -7,11 +7,15 @@ coverage: round: down # round down coverage range: "70...100" # visual color range in codecov status: - project: yes # measures the overall project coverage and compares it against the base of the pull request or parent commit + project: # measures the overall project coverage and compares it against the base of the pull request or parent commit. + default: + informational: true # non-blocking patch: # measures only the lines adjusted in the pull request or single commit, if the commit is not in a pull request default: - target: 100% # all new code should have 100% coverage - changes: yes # detect changes in coverage that are NOT included in the commit/pull diff, and report these changes as a commit status + informational: true # non-blocking + changes: # detect changes in coverage that are NOT included in the commit/pull diff, and report these changes as a commit status + default: + informational: true # non-blocking parsers: gcov: diff --git a/.gitignore b/.gitignore index 1cf1f6bf..bd4ba833 100644 --- a/.gitignore +++ b/.gitignore @@ -28,9 +28,10 @@ xcuserdata/ # We recommend against adding the Pods directory to your .gitignore. However # you should judge for yourself, the pros and cons are mentioned at: # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control -# -# Pods/ -# + +Example/Pods/ +Example/Podfile.lock + # Add this line if you want to avoid checking in source code from the Xcode workspace # *.xcworkspace diff --git a/.travis.yml b/.travis.yml index 7540fca2..2edc39d5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,9 +6,9 @@ matrix: - name: "Run SwiftLint" script: xcodebuild -workspace Example/Shuffle.xcworkspace -scheme SwiftLint -sdk iphonesimulator -destination platform="iOS Simulator,name=iPhone 11 Pro Max,OS=14.4" - name: "Build Framework & Example Project" - script: xcodebuild -workspace Example/Shuffle.xcworkspace -scheme ShuffleExample -sdk iphonesimulator -destination platform="iOS Simulator,name=iPhone 11 Pro Max,OS=14.4" + script: cd Example/ && pod install && xcodebuild -workspace Shuffle.xcworkspace -scheme ShuffleExample -sdk iphonesimulator -destination platform="iOS Simulator,name=iPhone 11 Pro Max,OS=14.4" - name: "Run Unit Tests" - script: xcodebuild test -workspace Example/Shuffle.xcworkspace -scheme ShuffleTests -sdk iphonesimulator -destination platform="iOS Simulator,name=iPhone 11 Pro Max,OS=14.4" + script: cd Example/ && pod install && xcodebuild test -workspace Shuffle.xcworkspace -scheme ShuffleTests -sdk iphonesimulator -destination platform="iOS Simulator,name=iPhone 11 Pro Max,OS=14.4" # upload codecov report after_success: bash <(curl -s https://codecov.io/bash) -J 'Shuffle' diff --git a/Example/Podfile.lock b/Example/Podfile.lock deleted file mode 100644 index 0ac7eb60..00000000 --- a/Example/Podfile.lock +++ /dev/null @@ -1,35 +0,0 @@ -PODS: - - Nimble (8.0.9) - - pop (1.0.12) - - PopBounceButton (1.2.2): - - pop (~> 1.0) - - Quick (2.2.1) - - Shuffle-iOS (0.4.0) - -DEPENDENCIES: - - Nimble - - PopBounceButton - - Quick - - Shuffle-iOS (from `../`) - -SPEC REPOS: - trunk: - - Nimble - - pop - - PopBounceButton - - Quick - -EXTERNAL SOURCES: - Shuffle-iOS: - :path: "../" - -SPEC CHECKSUMS: - Nimble: 98b888285a615fd34f20e61753cf58ea1402bde4 - pop: d582054913807fd11fd50bfe6a539d91c7e1a55a - PopBounceButton: 34105a012678222f058f8d2621672724a3d5c9fb - Quick: f5754d69b7013f5864c29aab9ae6f0c79c5bc200 - Shuffle-iOS: 6614f087f323da1164735a6e1c5b9a723ac8fcd0 - -PODFILE CHECKSUM: f1c123b227b9b7503226150362bd2af781c1069d - -COCOAPODS: 1.9.1 diff --git a/Example/Pods/Local Podspecs/Shuffle-iOS.podspec.json b/Example/Pods/Local Podspecs/Shuffle-iOS.podspec.json deleted file mode 100644 index 10f4df22..00000000 --- a/Example/Pods/Local Podspecs/Shuffle-iOS.podspec.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "Shuffle-iOS", - "version": "0.4.0", - "platforms": { - "ios": "9.0" - }, - "summary": "A multi-directional card swiping library inspired by Tinder", - "description": "A multi-directional card swiping library inspired by Tinder.", - "homepage": "https://github.com/mac-gallagher/Shuffle", - "documentation_url": "https://github.com/mac-gallagher/Shuffle/tree/master/README.md", - "license": { - "type": "MIT", - "file": "LICENSE" - }, - "authors": { - "Mac Gallagher": "jmgallagher36@gmail.com" - }, - "source": { - "git": "https://github.com/mac-gallagher/Shuffle.git", - "tag": "v0.4.0" - }, - "swift_versions": "5.0", - "source_files": "Sources/Shuffle/Classes/**/*.{h,swift}", - "swift_version": "5.0" -} diff --git a/Example/Pods/Manifest.lock b/Example/Pods/Manifest.lock deleted file mode 100644 index 0ac7eb60..00000000 --- a/Example/Pods/Manifest.lock +++ /dev/null @@ -1,35 +0,0 @@ -PODS: - - Nimble (8.0.9) - - pop (1.0.12) - - PopBounceButton (1.2.2): - - pop (~> 1.0) - - Quick (2.2.1) - - Shuffle-iOS (0.4.0) - -DEPENDENCIES: - - Nimble - - PopBounceButton - - Quick - - Shuffle-iOS (from `../`) - -SPEC REPOS: - trunk: - - Nimble - - pop - - PopBounceButton - - Quick - -EXTERNAL SOURCES: - Shuffle-iOS: - :path: "../" - -SPEC CHECKSUMS: - Nimble: 98b888285a615fd34f20e61753cf58ea1402bde4 - pop: d582054913807fd11fd50bfe6a539d91c7e1a55a - PopBounceButton: 34105a012678222f058f8d2621672724a3d5c9fb - Quick: f5754d69b7013f5864c29aab9ae6f0c79c5bc200 - Shuffle-iOS: 6614f087f323da1164735a6e1c5b9a723ac8fcd0 - -PODFILE CHECKSUM: f1c123b227b9b7503226150362bd2af781c1069d - -COCOAPODS: 1.9.1 diff --git a/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Dependencies/CwlCatchException/Sources/CwlCatchException/CwlCatchException.swift b/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Dependencies/CwlCatchException/Sources/CwlCatchException/CwlCatchException.swift deleted file mode 100644 index 3eb17cdc..00000000 --- a/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Dependencies/CwlCatchException/Sources/CwlCatchException/CwlCatchException.swift +++ /dev/null @@ -1,35 +0,0 @@ -// -// CwlCatchException.swift -// CwlAssertionTesting -// -// Created by Matt Gallagher on 2016/01/10. -// Copyright © 2016 Matt Gallagher ( https://www.cocoawithlove.com ). All rights reserved. -// -// Permission to use, copy, modify, and/or distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. -// -// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -// IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -// - -import Foundation - -#if canImport(NimbleCwlCatchExceptionSupport) -import NimbleCwlCatchExceptionSupport -#endif - -private func catchReturnTypeConverter(_ type: T.Type, block: @escaping () -> Void) -> T? { - return catchExceptionOfKind(type, block) as? T -} - -extension NSException { - public static func catchException(in block: @escaping () -> Void) -> Self? { - return catchReturnTypeConverter(self, block: block) - } -} diff --git a/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Dependencies/CwlCatchException/Sources/CwlCatchExceptionSupport/CwlCatchException.m b/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Dependencies/CwlCatchException/Sources/CwlCatchExceptionSupport/CwlCatchException.m deleted file mode 100644 index ff35465d..00000000 --- a/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Dependencies/CwlCatchException/Sources/CwlCatchExceptionSupport/CwlCatchException.m +++ /dev/null @@ -1,34 +0,0 @@ -// -// CwlCatchException.m -// CwlAssertionTesting -// -// Created by Matt Gallagher on 2016/01/10. -// Copyright © 2016 Matt Gallagher ( https://www.cocoawithlove.com ). All rights reserved. -// -// Permission to use, copy, modify, and/or distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. -// -// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -// IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -// - -#import "CwlCatchException.h" - -NSException* __nullable catchExceptionOfKind(Class __nonnull type, void (^ __nonnull inBlock)(void)) { - @try { - inBlock(); - } @catch (NSException *exception) { - if ([exception isKindOfClass:type]) { - return exception; - } else { - @throw; - } - } - return nil; -} diff --git a/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Dependencies/CwlCatchException/Sources/CwlCatchExceptionSupport/include/CwlCatchException.h b/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Dependencies/CwlCatchException/Sources/CwlCatchExceptionSupport/include/CwlCatchException.h deleted file mode 100644 index 47b06bf2..00000000 --- a/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Dependencies/CwlCatchException/Sources/CwlCatchExceptionSupport/include/CwlCatchException.h +++ /dev/null @@ -1,29 +0,0 @@ -// -// CwlCatchException.h -// CwlCatchException -// -// Created by Matt Gallagher on 2016/01/10. -// Copyright © 2016 Matt Gallagher ( https://www.cocoawithlove.com ). All rights reserved. -// -// Permission to use, copy, modify, and/or distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. -// -// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -// IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -// - -#import - -//! Project version number for CwlCatchException. -FOUNDATION_EXPORT double CwlCatchExceptionVersionNumber; - -//! Project version string for CwlCatchException. -FOUNDATION_EXPORT const unsigned char CwlCatchExceptionVersionString[]; - -NSException* __nullable catchExceptionOfKind(Class __nonnull type, void (^ __nonnull inBlock)(void)); diff --git a/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler.m b/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler.m deleted file mode 100644 index 2ab0ea5e..00000000 --- a/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler.m +++ /dev/null @@ -1,53 +0,0 @@ -// -// CwlMachBadExceptionHandler.m -// CwlPreconditionTesting -// -// Created by Matt Gallagher on 2016/01/10. -// Copyright © 2016 Matt Gallagher ( https://www.cocoawithlove.com ). All rights reserved. -// -// Permission to use, copy, modify, and/or distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. -// -// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -// IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -// - -#ifdef __APPLE__ -#import "TargetConditionals.h" -#if TARGET_OS_OSX || TARGET_OS_IOS - -#import "mach_excServer.h" -#import "CwlMachBadInstructionHandler.h" - -@protocol BadInstructionReply -+(NSNumber *)receiveReply:(NSValue *)value; -@end - -/// A basic function that receives callbacks from mach_exc_server and relays them to the Swift implemented BadInstructionException.catch_mach_exception_raise_state. -kern_return_t catch_mach_exception_raise_state(mach_port_t exception_port, exception_type_t exception, const mach_exception_data_t code, mach_msg_type_number_t codeCnt, int *flavor, const thread_state_t old_state, mach_msg_type_number_t old_stateCnt, thread_state_t new_state, mach_msg_type_number_t *new_stateCnt) { - bad_instruction_exception_reply_t reply = { exception_port, exception, code, codeCnt, flavor, old_state, old_stateCnt, new_state, new_stateCnt }; - Class badInstructionClass = NSClassFromString(@"BadInstructionException"); - NSValue *value = [NSValue valueWithBytes: &reply objCType: @encode(bad_instruction_exception_reply_t)]; - return [[badInstructionClass performSelector: @selector(receiveReply:) withObject: value] intValue]; -} - -// The mach port should be configured so that this function is never used. -kern_return_t catch_mach_exception_raise(mach_port_t exception_port, mach_port_t thread, mach_port_t task, exception_type_t exception, mach_exception_data_t code, mach_msg_type_number_t codeCnt) { - assert(false); - return KERN_FAILURE; -} - -// The mach port should be configured so that this function is never used. -kern_return_t catch_mach_exception_raise_state_identity(mach_port_t exception_port, mach_port_t thread, mach_port_t task, exception_type_t exception, mach_exception_data_t code, mach_msg_type_number_t codeCnt, int *flavor, thread_state_t old_state, mach_msg_type_number_t old_stateCnt, thread_state_t new_state, mach_msg_type_number_t *new_stateCnt) { - assert(false); - return KERN_FAILURE; -} - -#endif /* TARGET_OS_OSX || TARGET_OS_IOS */ -#endif /* __APPLE__ */ diff --git a/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/include/CwlMachBadInstructionHandler.h b/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/include/CwlMachBadInstructionHandler.h deleted file mode 100644 index 3fbd5a40..00000000 --- a/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/include/CwlMachBadInstructionHandler.h +++ /dev/null @@ -1,78 +0,0 @@ -// -// CwlMachBadInstructionHandler.h -// CwlPreconditionTesting -// -// Created by Matt Gallagher on 2016/01/10. -// Copyright © 2016 Matt Gallagher ( https://www.cocoawithlove.com ). All rights reserved. -// -// Permission to use, copy, modify, and/or distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. -// -// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -// IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -// - -#import - -#if TARGET_OS_OSX || TARGET_OS_IOS - -#import - -extern bool _swift_disableExclusivityChecking; -extern bool _swift_reportFatalErrorsToDebugger; - -NS_ASSUME_NONNULL_BEGIN - -extern boolean_t mach_exc_server(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); - -// The request_mach_exception_raise_t struct is passed to mach_msg which assumes its exact layout. To avoid problems with different layouts, we keep the definition in C rather than Swift. -typedef struct -{ - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t thread; - mach_msg_port_descriptor_t task; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_type_t exception; - mach_msg_type_number_t codeCnt; - int64_t code[2]; - int flavor; - mach_msg_type_number_t old_stateCnt; - natural_t old_state[224]; -} request_mach_exception_raise_t; - -// The reply_mach_exception_raise_state_t struct is passed to mach_msg which assumes its exact layout. To avoid problems with different layouts, we keep the definition in C rather than Swift. -typedef struct -{ - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - int flavor; - mach_msg_type_number_t new_stateCnt; - natural_t new_state[224]; -} reply_mach_exception_raise_state_t; - -typedef struct -{ - mach_port_t exception_port; - exception_type_t exception; - mach_exception_data_type_t const * _Nullable code; - mach_msg_type_number_t codeCnt; - int32_t * _Nullable flavor; - natural_t const * _Nullable old_state; - mach_msg_type_number_t old_stateCnt; - thread_state_t _Nullable new_state; - mach_msg_type_number_t * _Nullable new_stateCnt; -} bad_instruction_exception_reply_t; - -NS_ASSUME_NONNULL_END - -#endif diff --git a/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/mach_excServer.c b/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/mach_excServer.c deleted file mode 100644 index ccd8f84b..00000000 --- a/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/mach_excServer.c +++ /dev/null @@ -1,536 +0,0 @@ -/* - * IDENTIFICATION: - * stub generated Sun Jan 29 19:05:29 2017 - * with a MiG generated by bootstrap_cmds-96.20.2 - * OPTIONS: - */ - -/* Module mach_exc */ - -#define __MIG_check__Request__mach_exc_subsystem__ 1 - -#import "mach_excServer.h" -#if TARGET_OS_OSX || TARGET_OS_IOS - -#ifndef mig_internal -#define mig_internal static __inline__ -#endif /* mig_internal */ - -#ifndef mig_external -#define mig_external -#endif /* mig_external */ - -#if !defined(__MigTypeCheck) && defined(TypeCheck) -#define __MigTypeCheck TypeCheck /* Legacy setting */ -#endif /* !defined(__MigTypeCheck) */ - -#if !defined(__MigKernelSpecificCode) && defined(_MIG_KERNEL_SPECIFIC_CODE_) -#define __MigKernelSpecificCode _MIG_KERNEL_SPECIFIC_CODE_ /* Legacy setting */ -#endif /* !defined(__MigKernelSpecificCode) */ - -#ifndef LimitCheck -#define LimitCheck 0 -#endif /* LimitCheck */ - -#ifndef min -#define min(a,b) ( ((a) < (b))? (a): (b) ) -#endif /* min */ - -#if !defined(_WALIGN_) -#define _WALIGN_(x) (((x) + 3) & ~3) -#endif /* !defined(_WALIGN_) */ - -#if !defined(_WALIGNSZ_) -#define _WALIGNSZ_(x) _WALIGN_(sizeof(x)) -#endif /* !defined(_WALIGNSZ_) */ - -#ifndef UseStaticTemplates -#define UseStaticTemplates 0 -#endif /* UseStaticTemplates */ - -#ifndef __DeclareRcvRpc -#define __DeclareRcvRpc(_NUM_, _NAME_) -#endif /* __DeclareRcvRpc */ - -#ifndef __BeforeRcvRpc -#define __BeforeRcvRpc(_NUM_, _NAME_) -#endif /* __BeforeRcvRpc */ - -#ifndef __AfterRcvRpc -#define __AfterRcvRpc(_NUM_, _NAME_) -#endif /* __AfterRcvRpc */ - -#ifndef __DeclareRcvSimple -#define __DeclareRcvSimple(_NUM_, _NAME_) -#endif /* __DeclareRcvSimple */ - -#ifndef __BeforeRcvSimple -#define __BeforeRcvSimple(_NUM_, _NAME_) -#endif /* __BeforeRcvSimple */ - -#ifndef __AfterRcvSimple -#define __AfterRcvSimple(_NUM_, _NAME_) -#endif /* __AfterRcvSimple */ - -#define novalue void - -#define msgh_request_port msgh_local_port -#define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_LOCAL(bits) -#define msgh_reply_port msgh_remote_port -#define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_REMOTE(bits) - -#define MIG_RETURN_ERROR(X, code) {\ - ((mig_reply_error_t *)X)->RetCode = code;\ - ((mig_reply_error_t *)X)->NDR = NDR_record;\ - return;\ - } - -/* Forward Declarations */ - - -mig_internal novalue _Xmach_exception_raise - (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); - -mig_internal novalue _Xmach_exception_raise_state - (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); - -mig_internal novalue _Xmach_exception_raise_state_identity - (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); - - -#if ( __MigTypeCheck ) -#if __MIG_check__Request__mach_exc_subsystem__ -#if !defined(__MIG_check__Request__mach_exception_raise_t__defined) -#define __MIG_check__Request__mach_exception_raise_t__defined - -mig_internal kern_return_t __MIG_check__Request__mach_exception_raise_t(__attribute__((__unused__)) __Request__mach_exception_raise_t *In0P) -{ - - typedef __Request__mach_exception_raise_t __Request; -#if __MigTypeCheck - unsigned int msgh_size; -#endif /* __MigTypeCheck */ - -#if __MigTypeCheck - msgh_size = In0P->Head.msgh_size; - if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || - (In0P->msgh_body.msgh_descriptor_count != 2) || - (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 16)) || (msgh_size > (mach_msg_size_t)sizeof(__Request))) - return MIG_BAD_ARGUMENTS; -#endif /* __MigTypeCheck */ - -#if __MigTypeCheck - if (In0P->thread.type != MACH_MSG_PORT_DESCRIPTOR || - In0P->thread.disposition != 17) - return MIG_TYPE_ERROR; -#endif /* __MigTypeCheck */ - -#if __MigTypeCheck - if (In0P->task.type != MACH_MSG_PORT_DESCRIPTOR || - In0P->task.disposition != 17) - return MIG_TYPE_ERROR; -#endif /* __MigTypeCheck */ - -#if defined(__NDR_convert__int_rep__Request__mach_exception_raise_t__codeCnt__defined) - if (In0P->NDR.int_rep != NDR_record.int_rep) - __NDR_convert__int_rep__Request__mach_exception_raise_t__codeCnt(&In0P->codeCnt, In0P->NDR.int_rep); -#endif /* __NDR_convert__int_rep__Request__mach_exception_raise_t__codeCnt__defined */ -#if __MigTypeCheck - if ( In0P->codeCnt > 2 ) - return MIG_BAD_ARGUMENTS; - if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 16)) / 8 < In0P->codeCnt) || - (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 16) + (8 * In0P->codeCnt))) - return MIG_BAD_ARGUMENTS; -#endif /* __MigTypeCheck */ - - return MACH_MSG_SUCCESS; -} -#endif /* !defined(__MIG_check__Request__mach_exception_raise_t__defined) */ -#endif /* __MIG_check__Request__mach_exc_subsystem__ */ -#endif /* ( __MigTypeCheck ) */ - - -/* Routine mach_exception_raise */ -mig_internal novalue _Xmach_exception_raise - (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) -{ - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t thread; - mach_msg_port_descriptor_t task; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_type_t exception; - mach_msg_type_number_t codeCnt; - int64_t code[2]; - mach_msg_trailer_t trailer; - } Request __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack() -#endif - typedef __Request__mach_exception_raise_t __Request; - typedef __Reply__mach_exception_raise_t Reply __attribute__((unused)); - - /* - * typedef struct { - * mach_msg_header_t Head; - * NDR_record_t NDR; - * kern_return_t RetCode; - * } mig_reply_error_t; - */ - - Request *In0P = (Request *) InHeadP; - Reply *OutP = (Reply *) OutHeadP; -#ifdef __MIG_check__Request__mach_exception_raise_t__defined - kern_return_t check_result; -#endif /* __MIG_check__Request__mach_exception_raise_t__defined */ - - __DeclareRcvRpc(2405, "mach_exception_raise") - __BeforeRcvRpc(2405, "mach_exception_raise") - -#if defined(__MIG_check__Request__mach_exception_raise_t__defined) - check_result = __MIG_check__Request__mach_exception_raise_t((__Request *)In0P); - if (check_result != MACH_MSG_SUCCESS) - { MIG_RETURN_ERROR(OutP, check_result); } -#endif /* defined(__MIG_check__Request__mach_exception_raise_t__defined) */ - - OutP->RetCode = catch_mach_exception_raise(In0P->Head.msgh_request_port, In0P->thread.name, In0P->task.name, In0P->exception, In0P->code, In0P->codeCnt); - - OutP->NDR = NDR_record; - - - __AfterRcvRpc(2405, "mach_exception_raise") -} - -#if ( __MigTypeCheck ) -#if __MIG_check__Request__mach_exc_subsystem__ -#if !defined(__MIG_check__Request__mach_exception_raise_state_t__defined) -#define __MIG_check__Request__mach_exception_raise_state_t__defined - -mig_internal kern_return_t __MIG_check__Request__mach_exception_raise_state_t(__attribute__((__unused__)) __Request__mach_exception_raise_state_t *In0P, __attribute__((__unused__)) __Request__mach_exception_raise_state_t **In1PP) -{ - - typedef __Request__mach_exception_raise_state_t __Request; - __Request *In1P; -#if __MigTypeCheck - unsigned int msgh_size; -#endif /* __MigTypeCheck */ - unsigned int msgh_size_delta; - -#if __MigTypeCheck - msgh_size = In0P->Head.msgh_size; - if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || - (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 912)) || (msgh_size > (mach_msg_size_t)sizeof(__Request))) - return MIG_BAD_ARGUMENTS; -#endif /* __MigTypeCheck */ - -#if defined(__NDR_convert__int_rep__Request__mach_exception_raise_state_t__codeCnt__defined) - if (In0P->NDR.int_rep != NDR_record.int_rep) - __NDR_convert__int_rep__Request__mach_exception_raise_state_t__codeCnt(&In0P->codeCnt, In0P->NDR.int_rep); -#endif /* __NDR_convert__int_rep__Request__mach_exception_raise_state_t__codeCnt__defined */ - msgh_size_delta = (8 * In0P->codeCnt); -#if __MigTypeCheck - if ( In0P->codeCnt > 2 ) - return MIG_BAD_ARGUMENTS; - if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 912)) / 8 < In0P->codeCnt) || - (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 912) + (8 * In0P->codeCnt))) - return MIG_BAD_ARGUMENTS; - msgh_size -= msgh_size_delta; -#endif /* __MigTypeCheck */ - - *In1PP = In1P = (__Request *) ((pointer_t) In0P + msgh_size_delta - 16); - -#if defined(__NDR_convert__int_rep__Request__mach_exception_raise_state_t__old_stateCnt__defined) - if (In0P->NDR.int_rep != NDR_record.int_rep) - __NDR_convert__int_rep__Request__mach_exception_raise_state_t__old_stateCnt(&In1P->old_stateCnt, In1P->NDR.int_rep); -#endif /* __NDR_convert__int_rep__Request__mach_exception_raise_state_t__old_stateCnt__defined */ -#if __MigTypeCheck - if ( In1P->old_stateCnt > 224 ) - return MIG_BAD_ARGUMENTS; - if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 912)) / 4 < In1P->old_stateCnt) || - (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 912) + (4 * In1P->old_stateCnt))) - return MIG_BAD_ARGUMENTS; -#endif /* __MigTypeCheck */ - - return MACH_MSG_SUCCESS; -} -#endif /* !defined(__MIG_check__Request__mach_exception_raise_state_t__defined) */ -#endif /* __MIG_check__Request__mach_exc_subsystem__ */ -#endif /* ( __MigTypeCheck ) */ - - -/* Routine mach_exception_raise_state */ -mig_internal novalue _Xmach_exception_raise_state - (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) -{ - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - exception_type_t exception; - mach_msg_type_number_t codeCnt; - int64_t code[2]; - int flavor; - mach_msg_type_number_t old_stateCnt; - natural_t old_state[224]; - mach_msg_trailer_t trailer; - } Request __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack() -#endif - typedef __Request__mach_exception_raise_state_t __Request; - typedef __Reply__mach_exception_raise_state_t Reply __attribute__((unused)); - - /* - * typedef struct { - * mach_msg_header_t Head; - * NDR_record_t NDR; - * kern_return_t RetCode; - * } mig_reply_error_t; - */ - - Request *In0P = (Request *) InHeadP; - Request *In1P; - Reply *OutP = (Reply *) OutHeadP; -#ifdef __MIG_check__Request__mach_exception_raise_state_t__defined - kern_return_t check_result; -#endif /* __MIG_check__Request__mach_exception_raise_state_t__defined */ - - __DeclareRcvRpc(2406, "mach_exception_raise_state") - __BeforeRcvRpc(2406, "mach_exception_raise_state") - -#if defined(__MIG_check__Request__mach_exception_raise_state_t__defined) - check_result = __MIG_check__Request__mach_exception_raise_state_t((__Request *)In0P, (__Request **)&In1P); - if (check_result != MACH_MSG_SUCCESS) - { MIG_RETURN_ERROR(OutP, check_result); } -#endif /* defined(__MIG_check__Request__mach_exception_raise_state_t__defined) */ - - OutP->new_stateCnt = 224; - - OutP->RetCode = catch_mach_exception_raise_state(In0P->Head.msgh_request_port, In0P->exception, In0P->code, In0P->codeCnt, &In1P->flavor, In1P->old_state, In1P->old_stateCnt, OutP->new_state, &OutP->new_stateCnt); - if (OutP->RetCode != KERN_SUCCESS) { - MIG_RETURN_ERROR(OutP, OutP->RetCode); - } - - OutP->NDR = NDR_record; - - - OutP->flavor = In1P->flavor; - OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 896) + (((4 * OutP->new_stateCnt))); - - __AfterRcvRpc(2406, "mach_exception_raise_state") -} - -#if ( __MigTypeCheck ) -#if __MIG_check__Request__mach_exc_subsystem__ -#if !defined(__MIG_check__Request__mach_exception_raise_state_identity_t__defined) -#define __MIG_check__Request__mach_exception_raise_state_identity_t__defined - -mig_internal kern_return_t __MIG_check__Request__mach_exception_raise_state_identity_t(__attribute__((__unused__)) __Request__mach_exception_raise_state_identity_t *In0P, __attribute__((__unused__)) __Request__mach_exception_raise_state_identity_t **In1PP) -{ - - typedef __Request__mach_exception_raise_state_identity_t __Request; - __Request *In1P; -#if __MigTypeCheck - unsigned int msgh_size; -#endif /* __MigTypeCheck */ - unsigned int msgh_size_delta; - -#if __MigTypeCheck - msgh_size = In0P->Head.msgh_size; - if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || - (In0P->msgh_body.msgh_descriptor_count != 2) || - (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 912)) || (msgh_size > (mach_msg_size_t)sizeof(__Request))) - return MIG_BAD_ARGUMENTS; -#endif /* __MigTypeCheck */ - -#if __MigTypeCheck - if (In0P->thread.type != MACH_MSG_PORT_DESCRIPTOR || - In0P->thread.disposition != 17) - return MIG_TYPE_ERROR; -#endif /* __MigTypeCheck */ - -#if __MigTypeCheck - if (In0P->task.type != MACH_MSG_PORT_DESCRIPTOR || - In0P->task.disposition != 17) - return MIG_TYPE_ERROR; -#endif /* __MigTypeCheck */ - -#if defined(__NDR_convert__int_rep__Request__mach_exception_raise_state_identity_t__codeCnt__defined) - if (In0P->NDR.int_rep != NDR_record.int_rep) - __NDR_convert__int_rep__Request__mach_exception_raise_state_identity_t__codeCnt(&In0P->codeCnt, In0P->NDR.int_rep); -#endif /* __NDR_convert__int_rep__Request__mach_exception_raise_state_identity_t__codeCnt__defined */ - msgh_size_delta = (8 * In0P->codeCnt); -#if __MigTypeCheck - if ( In0P->codeCnt > 2 ) - return MIG_BAD_ARGUMENTS; - if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 912)) / 8 < In0P->codeCnt) || - (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 912) + (8 * In0P->codeCnt))) - return MIG_BAD_ARGUMENTS; - msgh_size -= msgh_size_delta; -#endif /* __MigTypeCheck */ - - *In1PP = In1P = (__Request *) ((pointer_t) In0P + msgh_size_delta - 16); - -#if defined(__NDR_convert__int_rep__Request__mach_exception_raise_state_identity_t__old_stateCnt__defined) - if (In0P->NDR.int_rep != NDR_record.int_rep) - __NDR_convert__int_rep__Request__mach_exception_raise_state_identity_t__old_stateCnt(&In1P->old_stateCnt, In1P->NDR.int_rep); -#endif /* __NDR_convert__int_rep__Request__mach_exception_raise_state_identity_t__old_stateCnt__defined */ -#if __MigTypeCheck - if ( In1P->old_stateCnt > 224 ) - return MIG_BAD_ARGUMENTS; - if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 912)) / 4 < In1P->old_stateCnt) || - (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 912) + (4 * In1P->old_stateCnt))) - return MIG_BAD_ARGUMENTS; -#endif /* __MigTypeCheck */ - - return MACH_MSG_SUCCESS; -} -#endif /* !defined(__MIG_check__Request__mach_exception_raise_state_identity_t__defined) */ -#endif /* __MIG_check__Request__mach_exc_subsystem__ */ -#endif /* ( __MigTypeCheck ) */ - - -/* Routine mach_exception_raise_state_identity */ -mig_internal novalue _Xmach_exception_raise_state_identity - (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) -{ - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t thread; - mach_msg_port_descriptor_t task; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_type_t exception; - mach_msg_type_number_t codeCnt; - int64_t code[2]; - int flavor; - mach_msg_type_number_t old_stateCnt; - natural_t old_state[224]; - mach_msg_trailer_t trailer; - } Request __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack() -#endif - typedef __Request__mach_exception_raise_state_identity_t __Request; - typedef __Reply__mach_exception_raise_state_identity_t Reply __attribute__((unused)); - - /* - * typedef struct { - * mach_msg_header_t Head; - * NDR_record_t NDR; - * kern_return_t RetCode; - * } mig_reply_error_t; - */ - - Request *In0P = (Request *) InHeadP; - Request *In1P; - Reply *OutP = (Reply *) OutHeadP; -#ifdef __MIG_check__Request__mach_exception_raise_state_identity_t__defined - kern_return_t check_result; -#endif /* __MIG_check__Request__mach_exception_raise_state_identity_t__defined */ - - __DeclareRcvRpc(2407, "mach_exception_raise_state_identity") - __BeforeRcvRpc(2407, "mach_exception_raise_state_identity") - -#if defined(__MIG_check__Request__mach_exception_raise_state_identity_t__defined) - check_result = __MIG_check__Request__mach_exception_raise_state_identity_t((__Request *)In0P, (__Request **)&In1P); - if (check_result != MACH_MSG_SUCCESS) - { MIG_RETURN_ERROR(OutP, check_result); } -#endif /* defined(__MIG_check__Request__mach_exception_raise_state_identity_t__defined) */ - - OutP->new_stateCnt = 224; - - OutP->RetCode = catch_mach_exception_raise_state_identity(In0P->Head.msgh_request_port, In0P->thread.name, In0P->task.name, In0P->exception, In0P->code, In0P->codeCnt, &In1P->flavor, In1P->old_state, In1P->old_stateCnt, OutP->new_state, &OutP->new_stateCnt); - if (OutP->RetCode != KERN_SUCCESS) { - MIG_RETURN_ERROR(OutP, OutP->RetCode); - } - - OutP->NDR = NDR_record; - - - OutP->flavor = In1P->flavor; - OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 896) + (((4 * OutP->new_stateCnt))); - - __AfterRcvRpc(2407, "mach_exception_raise_state_identity") -} - - - -/* Description of this subsystem, for use in direct RPC */ -const struct catch_mach_exc_subsystem catch_mach_exc_subsystem = { - mach_exc_server_routine, - 2405, - 2408, - (mach_msg_size_t)sizeof(union __ReplyUnion__catch_mach_exc_subsystem), - (vm_address_t)0, - { - { (mig_impl_routine_t) 0, - (mig_stub_routine_t) _Xmach_exception_raise, 6, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_exception_raise_t)}, - { (mig_impl_routine_t) 0, - (mig_stub_routine_t) _Xmach_exception_raise_state, 9, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_exception_raise_state_t)}, - { (mig_impl_routine_t) 0, - (mig_stub_routine_t) _Xmach_exception_raise_state_identity, 11, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_exception_raise_state_identity_t)}, - } -}; - -mig_external boolean_t mach_exc_server - (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) -{ - /* - * typedef struct { - * mach_msg_header_t Head; - * NDR_record_t NDR; - * kern_return_t RetCode; - * } mig_reply_error_t; - */ - - register mig_routine_t routine; - - OutHeadP->msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REPLY(InHeadP->msgh_bits), 0); - OutHeadP->msgh_remote_port = InHeadP->msgh_reply_port; - /* Minimal size: routine() will update it if different */ - OutHeadP->msgh_size = (mach_msg_size_t)sizeof(mig_reply_error_t); - OutHeadP->msgh_local_port = MACH_PORT_NULL; - OutHeadP->msgh_id = InHeadP->msgh_id + 100; - OutHeadP->msgh_reserved = 0; - - if ((InHeadP->msgh_id > 2407) || (InHeadP->msgh_id < 2405) || - ((routine = catch_mach_exc_subsystem.routine[InHeadP->msgh_id - 2405].stub_routine) == 0)) { - ((mig_reply_error_t *)OutHeadP)->NDR = NDR_record; - ((mig_reply_error_t *)OutHeadP)->RetCode = MIG_BAD_ID; - return FALSE; - } - (*routine) (InHeadP, OutHeadP); - return TRUE; -} - -mig_external mig_routine_t mach_exc_server_routine - (mach_msg_header_t *InHeadP) -{ - register int msgh_id; - - msgh_id = InHeadP->msgh_id - 2405; - - if ((msgh_id > 2) || (msgh_id < 0)) - return 0; - - return catch_mach_exc_subsystem.routine[msgh_id].stub_routine; -} - -#endif /* TARGET_OS_OSX || TARGET_OS_IOS */ diff --git a/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/mach_excServer.h b/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/mach_excServer.h deleted file mode 100644 index 1f03d66c..00000000 --- a/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/mach_excServer.h +++ /dev/null @@ -1,329 +0,0 @@ -#ifdef __APPLE__ -#import "TargetConditionals.h" -#if TARGET_OS_OSX || TARGET_OS_IOS - -#ifndef _mach_exc_server_ -#define _mach_exc_server_ - -/* Module mach_exc */ - -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -/* BEGIN VOUCHER CODE */ - -#ifndef KERNEL -#if defined(__has_include) -#if __has_include() -#ifndef USING_VOUCHERS -#define USING_VOUCHERS -#endif -#ifndef __VOUCHER_FORWARD_TYPE_DECLS__ -#define __VOUCHER_FORWARD_TYPE_DECLS__ -#ifdef __cplusplus -extern "C" { -#endif - extern boolean_t voucher_mach_msg_set(mach_msg_header_t *msg) __attribute__((weak_import)); -#ifdef __cplusplus -} -#endif -#endif // __VOUCHER_FORWARD_TYPE_DECLS__ -#endif // __has_include() -#endif // __has_include -#endif // !KERNEL - -/* END VOUCHER CODE */ - - -/* BEGIN MIG_STRNCPY_ZEROFILL CODE */ - -#if defined(__has_include) -#if __has_include() -#ifndef USING_MIG_STRNCPY_ZEROFILL -#define USING_MIG_STRNCPY_ZEROFILL -#endif -#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ -#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ -#ifdef __cplusplus -extern "C" { -#endif - extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import)); -#ifdef __cplusplus -} -#endif -#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */ -#endif /* __has_include() */ -#endif /* __has_include */ - -/* END MIG_STRNCPY_ZEROFILL CODE */ - - -#ifdef AUTOTEST -#ifndef FUNCTION_PTR_T -#define FUNCTION_PTR_T -typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); -typedef struct { - char *name; - function_ptr_t function; -} function_table_entry; -typedef function_table_entry *function_table_t; -#endif /* FUNCTION_PTR_T */ -#endif /* AUTOTEST */ - -#ifndef mach_exc_MSG_COUNT -#define mach_exc_MSG_COUNT 3 -#endif /* mach_exc_MSG_COUNT */ - -#include -#include -#include -#include - -#ifdef __BeforeMigServerHeader -__BeforeMigServerHeader -#endif /* __BeforeMigServerHeader */ - - -/* Routine mach_exception_raise */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t catch_mach_exception_raise -( - mach_port_t exception_port, - mach_port_t thread, - mach_port_t task, - exception_type_t exception, - mach_exception_data_t code, - mach_msg_type_number_t codeCnt -); - -/* Routine mach_exception_raise_state */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t catch_mach_exception_raise_state -( - mach_port_t exception_port, - exception_type_t exception, - const mach_exception_data_t code, - mach_msg_type_number_t codeCnt, - int *flavor, - const thread_state_t old_state, - mach_msg_type_number_t old_stateCnt, - thread_state_t new_state, - mach_msg_type_number_t *new_stateCnt -); - -/* Routine mach_exception_raise_state_identity */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t catch_mach_exception_raise_state_identity -( - mach_port_t exception_port, - mach_port_t thread, - mach_port_t task, - exception_type_t exception, - mach_exception_data_t code, - mach_msg_type_number_t codeCnt, - int *flavor, - thread_state_t old_state, - mach_msg_type_number_t old_stateCnt, - thread_state_t new_state, - mach_msg_type_number_t *new_stateCnt -); - -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -boolean_t mach_exc_server( - mach_msg_header_t *InHeadP, - mach_msg_header_t *OutHeadP); - -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -mig_routine_t mach_exc_server_routine( - mach_msg_header_t *InHeadP); - - -/* Description of this subsystem, for use in direct RPC */ -extern const struct catch_mach_exc_subsystem { - mig_server_routine_t server; /* Server routine */ - mach_msg_id_t start; /* Min routine number */ - mach_msg_id_t end; /* Max routine number + 1 */ - unsigned int maxsize; /* Max msg size */ - vm_address_t reserved; /* Reserved */ - struct routine_descriptor /*Array of routine descriptors */ - routine[3]; -} catch_mach_exc_subsystem; - -/* typedefs for all requests */ - -#ifndef __Request__mach_exc_subsystem__defined -#define __Request__mach_exc_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t thread; - mach_msg_port_descriptor_t task; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_type_t exception; - mach_msg_type_number_t codeCnt; - int64_t code[2]; - } __Request__mach_exception_raise_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - exception_type_t exception; - mach_msg_type_number_t codeCnt; - int64_t code[2]; - int flavor; - mach_msg_type_number_t old_stateCnt; - natural_t old_state[224]; - } __Request__mach_exception_raise_state_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t thread; - mach_msg_port_descriptor_t task; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_type_t exception; - mach_msg_type_number_t codeCnt; - int64_t code[2]; - int flavor; - mach_msg_type_number_t old_stateCnt; - natural_t old_state[224]; - } __Request__mach_exception_raise_state_identity_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Request__mach_exc_subsystem__defined */ - - -/* union of all requests */ - -#ifndef __RequestUnion__catch_mach_exc_subsystem__defined -#define __RequestUnion__catch_mach_exc_subsystem__defined -union __RequestUnion__catch_mach_exc_subsystem { - __Request__mach_exception_raise_t Request_mach_exception_raise; - __Request__mach_exception_raise_state_t Request_mach_exception_raise_state; - __Request__mach_exception_raise_state_identity_t Request_mach_exception_raise_state_identity; -}; -#endif /* __RequestUnion__catch_mach_exc_subsystem__defined */ -/* typedefs for all replies */ - -#ifndef __Reply__mach_exc_subsystem__defined -#define __Reply__mach_exc_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__mach_exception_raise_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - int flavor; - mach_msg_type_number_t new_stateCnt; - natural_t new_state[224]; - } __Reply__mach_exception_raise_state_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - int flavor; - mach_msg_type_number_t new_stateCnt; - natural_t new_state[224]; - } __Reply__mach_exception_raise_state_identity_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Reply__mach_exc_subsystem__defined */ - - -/* union of all replies */ - -#ifndef __ReplyUnion__catch_mach_exc_subsystem__defined -#define __ReplyUnion__catch_mach_exc_subsystem__defined -union __ReplyUnion__catch_mach_exc_subsystem { - __Reply__mach_exception_raise_t Reply_mach_exception_raise; - __Reply__mach_exception_raise_state_t Reply_mach_exception_raise_state; - __Reply__mach_exception_raise_state_identity_t Reply_mach_exception_raise_state_identity; -}; -#endif /* __RequestUnion__catch_mach_exc_subsystem__defined */ - -#ifndef subsystem_to_name_map_mach_exc -#define subsystem_to_name_map_mach_exc \ - { "mach_exception_raise", 2405 },\ - { "mach_exception_raise_state", 2406 },\ - { "mach_exception_raise_state_identity", 2407 } -#endif - -#ifdef __AfterMigServerHeader -__AfterMigServerHeader -#endif /* __AfterMigServerHeader */ - -#endif /* _mach_exc_server_ */ - -#endif /* TARGET_OS_OSX || TARGET_OS_IOS */ -#endif /* __APPLE__ */ diff --git a/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlBadInstructionException.swift b/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlBadInstructionException.swift deleted file mode 100644 index 82890980..00000000 --- a/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlBadInstructionException.swift +++ /dev/null @@ -1,89 +0,0 @@ -// -// CwlBadInstructionException.swift -// CwlPreconditionTesting -// -// Created by Matt Gallagher on 2016/01/10. -// Copyright © 2016 Matt Gallagher ( https://www.cocoawithlove.com ). All rights reserved. -// -// Permission to use, copy, modify, and/or distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. -// -// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -// IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -// - -#if (os(macOS) || os(iOS)) && arch(x86_64) - -import Foundation - -#if canImport(NimbleCwlMachBadInstructionHandler) -import NimbleCwlMachBadInstructionHandler -#endif - -private func raiseBadInstructionException() { - BadInstructionException().raise() -} - -/// A simple NSException subclass. It's not required to subclass NSException (since the exception type is represented in the name) but this helps for identifying the exception through runtime type. -@objc(BadInstructionException) -public class BadInstructionException: NSException { - static var name: String = "com.cocoawithlove.BadInstruction" - - init() { - super.init(name: NSExceptionName(rawValue: BadInstructionException.name), reason: nil, userInfo: nil) - } - - required public init?(coder aDecoder: NSCoder) { - super.init(coder: aDecoder) - } - - /// An Objective-C callable function, invoked from the `mach_exc_server` callback function `catch_mach_exception_raise_state` to push the `raiseBadInstructionException` function onto the stack. - @objc(receiveReply:) - public class func receiveReply(_ value: NSValue) -> NSNumber { - var reply = bad_instruction_exception_reply_t(exception_port: 0, exception: 0, code: nil, codeCnt: 0, flavor: nil, old_state: nil, old_stateCnt: 0, new_state: nil, new_stateCnt: nil) - withUnsafeMutablePointer(to: &reply) { value.getValue(UnsafeMutableRawPointer($0)) } - - let old_state: UnsafePointer = reply.old_state! - let old_stateCnt: mach_msg_type_number_t = reply.old_stateCnt - let new_state: thread_state_t = reply.new_state! - let new_stateCnt: UnsafeMutablePointer = reply.new_stateCnt! - - // Make sure we've been given enough memory - if old_stateCnt != x86_THREAD_STATE64_COUNT || new_stateCnt.pointee < x86_THREAD_STATE64_COUNT { - return NSNumber(value: KERN_INVALID_ARGUMENT) - } - - // Read the old thread state - var state = old_state.withMemoryRebound(to: x86_thread_state64_t.self, capacity: 1) { return $0.pointee } - - // 1. Decrement the stack pointer - state.__rsp -= __uint64_t(MemoryLayout.size) - - // 2. Save the old Instruction Pointer to the stack. - if let pointer = UnsafeMutablePointer<__uint64_t>(bitPattern: UInt(state.__rsp)) { - pointer.pointee = state.__rip - } else { - return NSNumber(value: KERN_INVALID_ARGUMENT) - } - - // 3. Set the Instruction Pointer to the new function's address - var f: @convention(c) () -> Void = raiseBadInstructionException - withUnsafePointer(to: &f) { - state.__rip = $0.withMemoryRebound(to: __uint64_t.self, capacity: 1) { return $0.pointee } - } - - // Write the new thread state - new_state.withMemoryRebound(to: x86_thread_state64_t.self, capacity: 1) { $0.pointee = state } - new_stateCnt.pointee = x86_THREAD_STATE64_COUNT - - return NSNumber(value: KERN_SUCCESS) - } -} - -#endif diff --git a/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlCatchBadInstruction.swift b/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlCatchBadInstruction.swift deleted file mode 100644 index 560e523d..00000000 --- a/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlCatchBadInstruction.swift +++ /dev/null @@ -1,210 +0,0 @@ -// -// CwlCatchBadInstruction.swift -// CwlPreconditionTesting -// -// Created by Matt Gallagher on 2016/01/10. -// Copyright © 2016 Matt Gallagher ( https://www.cocoawithlove.com ). All rights reserved. -// -// Permission to use, copy, modify, and/or distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. -// -// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -// IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -// - -#if (os(macOS) || os(iOS)) && arch(x86_64) - -import Foundation -import Swift - -#if canImport(NimbleCwlCatchException) && canImport(NimbleCwlMachBadInstructionHandler) -import NimbleCwlCatchException -import NimbleCwlMachBadInstructionHandler -#endif - -private enum PthreadError: Error { case code(Int32) } -private enum MachExcServer: Error { case code(kern_return_t) } - -/// A quick function for converting Mach error results into Swift errors -private func kernCheck(_ f: () -> Int32) throws { - let r = f() - guard r == KERN_SUCCESS else { - throw NSError(domain: NSMachErrorDomain, code: Int(r), userInfo: nil) - } -} - -extension request_mach_exception_raise_t { - mutating func withMsgHeaderPointer(in block: (UnsafeMutablePointer) -> R) -> R { - return withUnsafeMutablePointer(to: &self) { p -> R in - return p.withMemoryRebound(to: mach_msg_header_t.self, capacity: 1) { ptr -> R in - return block(ptr) - } - } - } -} - -extension reply_mach_exception_raise_state_t { - mutating func withMsgHeaderPointer(in block: (UnsafeMutablePointer) -> R) -> R { - return withUnsafeMutablePointer(to: &self) { p -> R in - return p.withMemoryRebound(to: mach_msg_header_t.self, capacity: 1) { ptr -> R in - return block(ptr) - } - } - } -} - -/// A structure used to store context associated with the Mach message port -private struct MachContext { - var masks = execTypesCountTuple() - var count: mach_msg_type_number_t = 0 - var ports = execTypesCountTuple() - var behaviors = execTypesCountTuple() - var flavors = execTypesCountTuple() - var currentExceptionPort: mach_port_t = 0 - var handlerThread: pthread_t? = nil - - static func internalMutablePointers(_ m: UnsafeMutablePointer>, _ c: UnsafeMutablePointer, _ p: UnsafeMutablePointer>, _ b: UnsafeMutablePointer>, _ f: UnsafeMutablePointer>, _ block: (UnsafeMutablePointer, UnsafeMutablePointer, UnsafeMutablePointer, UnsafeMutablePointer, UnsafeMutablePointer) -> R) -> R { - return m.withMemoryRebound(to: exception_mask_t.self, capacity: 1) { masksPtr in - return c.withMemoryRebound(to: mach_msg_type_number_t.self, capacity: 1) { countPtr in - return p.withMemoryRebound(to: mach_port_t.self, capacity: 1) { portsPtr in - return b.withMemoryRebound(to: exception_behavior_t.self, capacity: 1) { behaviorsPtr in - return f.withMemoryRebound(to: thread_state_flavor_t.self, capacity: 1) { flavorsPtr in - return block(masksPtr, countPtr, portsPtr, behaviorsPtr, flavorsPtr) - } - } - } - } - } - } - - mutating func withUnsafeMutablePointers(in block: @escaping (UnsafeMutablePointer, UnsafeMutablePointer, UnsafeMutablePointer, UnsafeMutablePointer, UnsafeMutablePointer) -> R) -> R { - return MachContext.internalMutablePointers(&masks, &count, &ports, &behaviors, &flavors, block) - } -} - -/// A function for receiving mach messages and parsing the first with mach_exc_server (and if any others are received, throwing them away). -private func machMessageHandler(_ arg: UnsafeMutableRawPointer) -> UnsafeMutableRawPointer? { - let context = arg.assumingMemoryBound(to: MachContext.self).pointee - var request = request_mach_exception_raise_t() - var reply = reply_mach_exception_raise_state_t() - - var handledfirstException = false - repeat { do { - // Request the next mach message from the port - request.Head.msgh_local_port = context.currentExceptionPort - request.Head.msgh_size = UInt32(MemoryLayout.size) - let requestSize = request.Head.msgh_size - try kernCheck { request.withMsgHeaderPointer { requestPtr in - mach_msg(requestPtr, MACH_RCV_MSG | MACH_RCV_INTERRUPT, 0, requestSize, context.currentExceptionPort, 0, UInt32(MACH_PORT_NULL)) - } } - - // Prepare the reply structure - reply.Head.msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REMOTE(request.Head.msgh_bits), 0) - reply.Head.msgh_local_port = UInt32(MACH_PORT_NULL) - reply.Head.msgh_remote_port = request.Head.msgh_remote_port - reply.Head.msgh_size = UInt32(MemoryLayout.size) - reply.NDR = NDR_record - - if !handledfirstException { - // Use the MiG generated server to invoke our handler for the request and fill in the rest of the reply structure - guard request.withMsgHeaderPointer(in: { requestPtr in reply.withMsgHeaderPointer { replyPtr in - mach_exc_server(requestPtr, replyPtr) - } }) != 0 else { throw MachExcServer.code(reply.RetCode) } - - handledfirstException = true - } else { - // If multiple fatal errors occur, don't handle subsquent errors (let the program crash) - reply.RetCode = KERN_FAILURE - } - - // Send the reply - let replySize = reply.Head.msgh_size - try kernCheck { reply.withMsgHeaderPointer { replyPtr in - mach_msg(replyPtr, MACH_SEND_MSG, replySize, 0, UInt32(MACH_PORT_NULL), 0, UInt32(MACH_PORT_NULL)) - } } - } catch let error as NSError where (error.domain == NSMachErrorDomain && (error.code == Int(MACH_RCV_PORT_CHANGED) || error.code == Int(MACH_RCV_INVALID_NAME))) { - // Port was already closed before we started or closed while we were listening. - // This means the controlling thread shut down. - return nil - } catch { - // Should never be reached but this is testing code, don't try to recover, just abort - fatalError("Mach message error: \(error)") - } } while true -} - -/// Run the provided block. If a mach "BAD_INSTRUCTION" exception is raised, catch it and return a BadInstructionException (which captures stack information about the throw site, if desired). Otherwise return nil. -/// NOTE: This function is only intended for use in test harnesses – use in a distributed build is almost certainly a bad choice. If a "BAD_INSTRUCTION" exception is raised, the block will be exited before completion via Objective-C exception. The risks associated with an Objective-C exception apply here: most Swift/Objective-C functions are *not* exception-safe. Memory may be leaked and the program will not necessarily be left in a safe state. -/// - parameter block: a function without parameters that will be run -/// - returns: if an EXC_BAD_INSTRUCTION is raised during the execution of `block` then a BadInstructionException will be returned, otherwise `nil`. -public func catchBadInstruction(in block: @escaping () -> Void) -> BadInstructionException? { - // Suppress Swift runtime's direct triggering of the debugger and exclusivity checking which crashes when we throw past it - let previousExclusivity = _swift_disableExclusivityChecking - let previousReporting = _swift_reportFatalErrorsToDebugger - _swift_disableExclusivityChecking = true - _swift_reportFatalErrorsToDebugger = false - defer { - _swift_reportFatalErrorsToDebugger = previousReporting - _swift_disableExclusivityChecking = previousExclusivity - } - - var context = MachContext() - var result: BadInstructionException? = nil - do { - var handlerThread: pthread_t? = nil - defer { - // 8. Wait for the thread to terminate *if* we actually made it to the creation point - // The mach port should be destroyed *before* calling pthread_join to avoid a deadlock. - if handlerThread != nil { - pthread_join(handlerThread!, nil) - } - } - - try kernCheck { - // 1. Create the mach port - mach_port_allocate(mach_task_self_, MACH_PORT_RIGHT_RECEIVE, &context.currentExceptionPort) - } - defer { - // 7. Cleanup the mach port - mach_port_destroy(mach_task_self_, context.currentExceptionPort) - } - - try kernCheck { - // 2. Configure the mach port - mach_port_insert_right(mach_task_self_, context.currentExceptionPort, context.currentExceptionPort, MACH_MSG_TYPE_MAKE_SEND) - } - - let currentExceptionPtr = context.currentExceptionPort - try kernCheck { context.withUnsafeMutablePointers { masksPtr, countPtr, portsPtr, behaviorsPtr, flavorsPtr in - // 3. Apply the mach port as the handler for this thread - thread_swap_exception_ports(mach_thread_self(), EXC_MASK_BAD_INSTRUCTION, currentExceptionPtr, Int32(bitPattern: UInt32(EXCEPTION_STATE) | MACH_EXCEPTION_CODES), x86_THREAD_STATE64, masksPtr, countPtr, portsPtr, behaviorsPtr, flavorsPtr) - } } - - defer { context.withUnsafeMutablePointers { masksPtr, countPtr, portsPtr, behaviorsPtr, flavorsPtr in - // 6. Unapply the mach port - _ = thread_swap_exception_ports(mach_thread_self(), EXC_MASK_BAD_INSTRUCTION, 0, EXCEPTION_DEFAULT, THREAD_STATE_NONE, masksPtr, countPtr, portsPtr, behaviorsPtr, flavorsPtr) - } } - - try withUnsafeMutablePointer(to: &context) { c throws in - // 4. Create the thread - let e = pthread_create(&handlerThread, nil, machMessageHandler, c) - guard e == 0 else { throw PthreadError.code(e) } - - // 5. Run the block - result = BadInstructionException.catchException(in: block) - } - } catch { - // Should never be reached but this is testing code, don't try to recover, just abort - fatalError("Mach port error: \(error)") - } - - return result -} - -#endif - diff --git a/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlDarwinDefinitions.swift b/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlDarwinDefinitions.swift deleted file mode 100644 index f22ed1f1..00000000 --- a/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlDarwinDefinitions.swift +++ /dev/null @@ -1,55 +0,0 @@ -// -// CwlDarwinDefinitions.swift -// CwlPreconditionTesting -// -// Created by Matt Gallagher on 2016/01/10. -// Copyright © 2016 Matt Gallagher ( https://www.cocoawithlove.com ). All rights reserved. -// -// Permission to use, copy, modify, and/or distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. -// -// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -// IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -// - -#if (os(macOS) || os(iOS)) && arch(x86_64) - -import Darwin - -// From /usr/include/mach/message.h -// #define MACH_MSG_TYPE_MAKE_SEND 20 /* Must hold receive right */ -// #define MACH_MSGH_BITS_REMOTE(bits) \ -// ((bits) & MACH_MSGH_BITS_REMOTE_MASK) -// #define MACH_MSGH_BITS(remote, local) /* legacy */ \ -// ((remote) | ((local) << 8)) -public let MACH_MSG_TYPE_MAKE_SEND: UInt32 = 20 -public func MACH_MSGH_BITS_REMOTE(_ bits: UInt32) -> UInt32 { return bits & UInt32(MACH_MSGH_BITS_REMOTE_MASK) } -public func MACH_MSGH_BITS(_ remote: UInt32, _ local: UInt32) -> UInt32 { return ((remote) | ((local) << 8)) } - -// From /usr/include/mach/exception_types.h -// #define EXC_BAD_INSTRUCTION 2 /* Instruction failed */ -// #define EXC_MASK_BAD_INSTRUCTION (1 << EXC_BAD_INSTRUCTION) -public let EXC_BAD_INSTRUCTION: UInt32 = 2 -public let EXC_MASK_BAD_INSTRUCTION: UInt32 = 1 << EXC_BAD_INSTRUCTION - -// From /usr/include/mach/i386/thread_status.h -// #define x86_THREAD_STATE64_COUNT ((mach_msg_type_number_t) \ -// ( sizeof (x86_thread_state64_t) / sizeof (int) )) -public let x86_THREAD_STATE64_COUNT = UInt32(MemoryLayout.size / MemoryLayout.size) - -public let EXC_TYPES_COUNT = 14 -public struct execTypesCountTuple { - // From /usr/include/mach/i386/exception.h - // #define EXC_TYPES_COUNT 14 /* incl. illegal exception 0 */ - public var value: (T, T, T, T, T, T, T, T, T, T, T, T, T, T) = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) - public init() { - } -} - -#endif diff --git a/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/include/CwlPreconditionTesting.h b/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/include/CwlPreconditionTesting.h deleted file mode 100644 index 93a0e610..00000000 --- a/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/include/CwlPreconditionTesting.h +++ /dev/null @@ -1,35 +0,0 @@ -// -// CwlPreconditionTesting.h -// CwlPreconditionTesting -// -// Created by Matt Gallagher on 2016/01/10. -// Copyright © 2016 Matt Gallagher ( https://www.cocoawithlove.com ). All rights reserved. -// -// Permission to use, copy, modify, and/or distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. -// -// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -// IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -// - -#import - -//! Project version number for CwlUtils. -FOUNDATION_EXPORT double CwlPreconditionTestingVersionNumber; - -//! Project version string for CwlUtils. -FOUNDATION_EXPORT const unsigned char CwlAssertingTestingVersionString[]; - -#import "CwlMachBadInstructionHandler.h" - -#if TARGET_OS_OSX || TARGET_OS_IOS - #import "CwlCatchException.h" -#elif !TARGET_OS_TV - #error Unsupported platform. -#endif diff --git a/Example/Pods/Nimble/LICENSE b/Example/Pods/Nimble/LICENSE deleted file mode 100644 index 82b84bf1..00000000 --- a/Example/Pods/Nimble/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2016 Quick Team - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Example/Pods/Nimble/README.md b/Example/Pods/Nimble/README.md deleted file mode 100644 index 4f7f89bc..00000000 --- a/Example/Pods/Nimble/README.md +++ /dev/null @@ -1,1772 +0,0 @@ -# Nimble - -[![Build Status](https://travis-ci.org/Quick/Nimble.svg?branch=master)](https://travis-ci.org/Quick/Nimble) -[![CocoaPods](https://img.shields.io/cocoapods/v/Nimble.svg)](https://cocoapods.org/pods/Nimble) -[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) -[![Accio supported](https://img.shields.io/badge/Accio-supported-0A7CF5.svg?style=flat)](https://github.com/JamitLabs/Accio) -[![Platforms](https://img.shields.io/cocoapods/p/Nimble.svg)](https://cocoapods.org/pods/Nimble) -[![Reviewed by Hound](https://img.shields.io/badge/Reviewed_by-Hound-8E64B0.svg)](https://houndci.com) - -Use Nimble to express the expected outcomes of Swift -or Objective-C expressions. Inspired by -[Cedar](https://github.com/pivotal/cedar). - -```swift -// Swift -expect(1 + 1).to(equal(2)) -expect(1.2).to(beCloseTo(1.1, within: 0.1)) -expect(3) > 2 -expect("seahorse").to(contain("sea")) -expect(["Atlantic", "Pacific"]).toNot(contain("Mississippi")) -expect(ocean.isClean).toEventually(beTruthy()) -``` - -# How to Use Nimble - - - -**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)* - -- [Some Background: Expressing Outcomes Using Assertions in XCTest](#some-background-expressing-outcomes-using-assertions-in-xctest) -- [Nimble: Expectations Using `expect(...).to`](#nimble-expectations-using-expectto) - - [Custom Failure Messages](#custom-failure-messages) - - [Type Safety](#type-safety) - - [Operator Overloads](#operator-overloads) - - [Lazily Computed Values](#lazily-computed-values) - - [C Primitives](#c-primitives) - - [Asynchronous Expectations](#asynchronous-expectations) - - [Objective-C Support](#objective-c-support) - - [Disabling Objective-C Shorthand](#disabling-objective-c-shorthand) -- [Built-in Matcher Functions](#built-in-matcher-functions) - - [Type Checking](#type-checking) - - [Equivalence](#equivalence) - - [Identity](#identity) - - [Comparisons](#comparisons) - - [Types/Classes](#typesclasses) - - [Truthiness](#truthiness) - - [Swift Assertions](#swift-assertions) - - [Swift Error Handling](#swift-error-handling) - - [Exceptions](#exceptions) - - [Collection Membership](#collection-membership) - - [Strings](#strings) - - [Collection Elements](#collection-elements) - - [Collection Count](#collection-count) - - [Notifications](#notifications) - - [Matching a value to any of a group of matchers](#matching-a-value-to-any-of-a-group-of-matchers) - - [Custom Validation](#custom-validation) -- [Writing Your Own Matchers](#writing-your-own-matchers) - - [PredicateResult](#predicateresult) - - [Lazy Evaluation](#lazy-evaluation) - - [Type Checking via Swift Generics](#type-checking-via-swift-generics) - - [Customizing Failure Messages](#customizing-failure-messages) - - [Basic Customization](#basic-customization) - - [Full Customization](#full-customization) - - [Supporting Objective-C](#supporting-objective-c) - - [Properly Handling `nil` in Objective-C Matchers](#properly-handling-nil-in-objective-c-matchers) - - [Migrating from the Old Matcher API](#migrating-from-the-old-matcher-api) - - [Minimal Step - Use `.predicate`](#minimal-step---use-predicate) - - [Convert to use `Predicate` Type with Old Matcher Constructor](#convert-to-use-predicate-type-with-old-matcher-constructor) - - [Convert to `Predicate` Type with Preferred Constructor](#convert-to-predicate-type-with-preferred-constructor) - - [Deprecation Roadmap](#deprecation-roadmap) -- [Installing Nimble](#installing-nimble) - - [Installing Nimble as a Submodule](#installing-nimble-as-a-submodule) - - [Installing Nimble via CocoaPods](#installing-nimble-via-cocoapods) - - [Installing Nimble via Accio](#installing-nimble-via-accio) - - [Using Nimble without XCTest](#using-nimble-without-xctest) - - - -# Some Background: Expressing Outcomes Using Assertions in XCTest - -Apple's Xcode includes the XCTest framework, which provides -assertion macros to test whether code behaves properly. -For example, to assert that `1 + 1 = 2`, XCTest has you write: - -```swift -// Swift - -XCTAssertEqual(1 + 1, 2, "expected one plus one to equal two") -``` - -Or, in Objective-C: - -```objc -// Objective-C - -XCTAssertEqual(1 + 1, 2, @"expected one plus one to equal two"); -``` - -XCTest assertions have a couple of drawbacks: - -1. **Not enough macros.** There's no easy way to assert that a string - contains a particular substring, or that a number is less than or - equal to another. -2. **It's hard to write asynchronous tests.** XCTest forces you to write - a lot of boilerplate code. - -Nimble addresses these concerns. - -# Nimble: Expectations Using `expect(...).to` - -Nimble allows you to express expectations using a natural, -easily understood language: - -```swift -// Swift - -import Nimble - -expect(seagull.squawk).to(equal("Squee!")) -``` - -```objc -// Objective-C - -@import Nimble; - -expect(seagull.squawk).to(equal(@"Squee!")); -``` - -> The `expect` function autocompletes to include `file:` and `line:`, - but these parameters are optional. Use the default values to have - Xcode highlight the correct line when an expectation is not met. - -To perform the opposite expectation--to assert something is *not* -equal--use `toNot` or `notTo`: - -```swift -// Swift - -import Nimble - -expect(seagull.squawk).toNot(equal("Oh, hello there!")) -expect(seagull.squawk).notTo(equal("Oh, hello there!")) -``` - -```objc -// Objective-C - -@import Nimble; - -expect(seagull.squawk).toNot(equal(@"Oh, hello there!")); -expect(seagull.squawk).notTo(equal(@"Oh, hello there!")); -``` - -## Custom Failure Messages - -Would you like to add more information to the test's failure messages? Use the `description` optional argument to add your own text: - -```swift -// Swift - -expect(1 + 1).to(equal(3)) -// failed - expected to equal <3>, got <2> - -expect(1 + 1).to(equal(3), description: "Make sure libKindergartenMath is loaded") -// failed - Make sure libKindergartenMath is loaded -// expected to equal <3>, got <2> -``` - -Or the *WithDescription version in Objective-C: - -```objc -// Objective-C - -@import Nimble; - -expect(@(1+1)).to(equal(@3)); -// failed - expected to equal <3.0000>, got <2.0000> - -expect(@(1+1)).toWithDescription(equal(@3), @"Make sure libKindergartenMath is loaded"); -// failed - Make sure libKindergartenMath is loaded -// expected to equal <3.0000>, got <2.0000> -``` - -## Type Safety - -Nimble makes sure you don't compare two types that don't match: - -```swift -// Swift - -// Does not compile: -expect(1 + 1).to(equal("Squee!")) -``` - -> Nimble uses generics--only available in Swift--to ensure - type correctness. That means type checking is - not available when using Nimble in Objective-C. :sob: - -## Operator Overloads - -Tired of so much typing? With Nimble, you can use overloaded operators -like `==` for equivalence, or `>` for comparisons: - -```swift -// Swift - -// Passes if squawk does not equal "Hi!": -expect(seagull.squawk) != "Hi!" - -// Passes if 10 is greater than 2: -expect(10) > 2 -``` - -> Operator overloads are only available in Swift, so you won't be able - to use this syntax in Objective-C. :broken_heart: - -## Lazily Computed Values - -The `expect` function doesn't evaluate the value it's given until it's -time to match. So Nimble can test whether an expression raises an -exception once evaluated: - -```swift -// Swift - -// Note: Swift currently doesn't have exceptions. -// Only Objective-C code can raise exceptions -// that Nimble will catch. -// (see https://github.com/Quick/Nimble/issues/220#issuecomment-172667064) -let exception = NSException( - name: NSInternalInconsistencyException, - reason: "Not enough fish in the sea.", - userInfo: ["something": "is fishy"]) -expect { exception.raise() }.to(raiseException()) - -// Also, you can customize raiseException to be more specific -expect { exception.raise() }.to(raiseException(named: NSInternalInconsistencyException)) -expect { exception.raise() }.to(raiseException( - named: NSInternalInconsistencyException, - reason: "Not enough fish in the sea")) -expect { exception.raise() }.to(raiseException( - named: NSInternalInconsistencyException, - reason: "Not enough fish in the sea", - userInfo: ["something": "is fishy"])) -``` - -Objective-C works the same way, but you must use the `expectAction` -macro when making an expectation on an expression that has no return -value: - -```objc -// Objective-C - -NSException *exception = [NSException exceptionWithName:NSInternalInconsistencyException - reason:@"Not enough fish in the sea." - userInfo:nil]; -expectAction(^{ [exception raise]; }).to(raiseException()); - -// Use the property-block syntax to be more specific. -expectAction(^{ [exception raise]; }).to(raiseException().named(NSInternalInconsistencyException)); -expectAction(^{ [exception raise]; }).to(raiseException(). - named(NSInternalInconsistencyException). - reason("Not enough fish in the sea")); -expectAction(^{ [exception raise]; }).to(raiseException(). - named(NSInternalInconsistencyException). - reason("Not enough fish in the sea"). - userInfo(@{@"something": @"is fishy"})); - -// You can also pass a block for custom matching of the raised exception -expectAction(exception.raise()).to(raiseException().satisfyingBlock(^(NSException *exception) { - expect(exception.name).to(beginWith(NSInternalInconsistencyException)); -})); -``` - -## C Primitives - -Some testing frameworks make it hard to test primitive C values. -In Nimble, it just works: - -```swift -// Swift - -let actual: CInt = 1 -let expectedValue: CInt = 1 -expect(actual).to(equal(expectedValue)) -``` - -In fact, Nimble uses type inference, so you can write the above -without explicitly specifying both types: - -```swift -// Swift - -expect(1 as CInt).to(equal(1)) -``` - -> In Objective-C, Nimble only supports Objective-C objects. To - make expectations on primitive C values, wrap then in an object - literal: - -```objc -expect(@(1 + 1)).to(equal(@2)); -``` - -## Asynchronous Expectations - -In Nimble, it's easy to make expectations on values that are updated -asynchronously. Just use `toEventually` or `toEventuallyNot`: - -```swift -// Swift -DispatchQueue.main.async { - ocean.add("dolphins") - ocean.add("whales") -} -expect(ocean).toEventually(contain("dolphins", "whales")) -``` - - -```objc -// Objective-C - -dispatch_async(dispatch_get_main_queue(), ^{ - [ocean add:@"dolphins"]; - [ocean add:@"whales"]; -}); -expect(ocean).toEventually(contain(@"dolphins", @"whales")); -``` - -Note: toEventually triggers its polls on the main thread. Blocking the main -thread will cause Nimble to stop the run loop. This can cause test pollution -for whatever incomplete code that was running on the main thread. Blocking the -main thread can be caused by blocking IO, calls to sleep(), deadlocks, and -synchronous IPC. - -In the above example, `ocean` is constantly re-evaluated. If it ever -contains dolphins and whales, the expectation passes. If `ocean` still -doesn't contain them, even after being continuously re-evaluated for one -whole second, the expectation fails. - -Sometimes it takes more than a second for a value to update. In those -cases, use the `timeout` parameter: - -```swift -// Swift - -// Waits three seconds for ocean to contain "starfish": -expect(ocean).toEventually(contain("starfish"), timeout: 3) - -// Evaluate someValue every 0.2 seconds repeatedly until it equals 100, or fails if it timeouts after 5.5 seconds. -expect(someValue).toEventually(equal(100), timeout: 5.5, pollInterval: 0.2) -``` - -```objc -// Objective-C - -// Waits three seconds for ocean to contain "starfish": -expect(ocean).withTimeout(3).toEventually(contain(@"starfish")); -``` - -You can also provide a callback by using the `waitUntil` function: - -```swift -// Swift - -waitUntil { done in - ocean.goFish { success in - expect(success).to(beTrue()) - done() - } -} -``` - -```objc -// Objective-C - -waitUntil(^(void (^done)(void)){ - [ocean goFishWithHandler:^(BOOL success){ - expect(success).to(beTrue()); - done(); - }]; -}); -``` - -`waitUntil` also optionally takes a timeout parameter: - -```swift -// Swift - -waitUntil(timeout: 10) { done in - ocean.goFish { success in - expect(success).to(beTrue()) - done() - } -} -``` - -```objc -// Objective-C - -waitUntilTimeout(10, ^(void (^done)(void)){ - [ocean goFishWithHandler:^(BOOL success){ - expect(success).to(beTrue()); - done(); - }]; -}); -``` - -Note: `waitUntil` triggers its timeout code on the main thread. Blocking the main -thread will cause Nimble to stop the run loop to continue. This can cause test -pollution for whatever incomplete code that was running on the main thread. -Blocking the main thread can be caused by blocking IO, calls to sleep(), -deadlocks, and synchronous IPC. - -In some cases (e.g. when running on slower machines) it can be useful to modify -the default timeout and poll interval values. This can be done as follows: - -```swift -// Swift - -// Increase the global timeout to 5 seconds: -Nimble.AsyncDefaults.Timeout = 5 - -// Slow the polling interval to 0.1 seconds: -Nimble.AsyncDefaults.PollInterval = 0.1 -``` - -## Objective-C Support - -Nimble has full support for Objective-C. However, there are two things -to keep in mind when using Nimble in Objective-C: - -1. All parameters passed to the `expect` function, as well as matcher - functions like `equal`, must be Objective-C objects or can be converted into - an `NSObject` equivalent: - - ```objc - // Objective-C - - @import Nimble; - - expect(@(1 + 1)).to(equal(@2)); - expect(@"Hello world").to(contain(@"world")); - - // Boxed as NSNumber * - expect(2).to(equal(2)); - expect(1.2).to(beLessThan(2.0)); - expect(true).to(beTruthy()); - - // Boxed as NSString * - expect("Hello world").to(equal("Hello world")); - - // Boxed as NSRange - expect(NSMakeRange(1, 10)).to(equal(NSMakeRange(1, 10))); - ``` - -2. To make an expectation on an expression that does not return a value, - such as `-[NSException raise]`, use `expectAction` instead of - `expect`: - - ```objc - // Objective-C - - expectAction(^{ [exception raise]; }).to(raiseException()); - ``` - -The following types are currently converted to an `NSObject` type: - - - **C Numeric types** are converted to `NSNumber *` - - `NSRange` is converted to `NSValue *` - - `char *` is converted to `NSString *` - -For the following matchers: - -- `equal` -- `beGreaterThan` -- `beGreaterThanOrEqual` -- `beLessThan` -- `beLessThanOrEqual` -- `beCloseTo` -- `beTrue` -- `beFalse` -- `beTruthy` -- `beFalsy` -- `haveCount` - -If you would like to see more, [file an issue](https://github.com/Quick/Nimble/issues). - -## Disabling Objective-C Shorthand - -Nimble provides a shorthand for expressing expectations using the -`expect` function. To disable this shorthand in Objective-C, define the -`NIMBLE_DISABLE_SHORT_SYNTAX` macro somewhere in your code before -importing Nimble: - -```objc -#define NIMBLE_DISABLE_SHORT_SYNTAX 1 - -@import Nimble; - -NMB_expect(^{ return seagull.squawk; }, __FILE__, __LINE__).to(NMB_equal(@"Squee!")); -``` - -> Disabling the shorthand is useful if you're testing functions with - names that conflict with Nimble functions, such as `expect` or - `equal`. If that's not the case, there's no point in disabling the - shorthand. - -# Built-in Matcher Functions - -Nimble includes a wide variety of matcher functions. - -## Type Checking - -Nimble supports checking the type membership of any kind of object, whether -Objective-C conformant or not: - -```swift -// Swift - -protocol SomeProtocol{} -class SomeClassConformingToProtocol: SomeProtocol{} -struct SomeStructConformingToProtocol: SomeProtocol{} - -// The following tests pass -expect(1).to(beAKindOf(Int.self)) -expect("turtle").to(beAKindOf(String.self)) - -let classObject = SomeClassConformingToProtocol() -expect(classObject).to(beAKindOf(SomeProtocol.self)) -expect(classObject).to(beAKindOf(SomeClassConformingToProtocol.self)) -expect(classObject).toNot(beAKindOf(SomeStructConformingToProtocol.self)) - -let structObject = SomeStructConformingToProtocol() -expect(structObject).to(beAKindOf(SomeProtocol.self)) -expect(structObject).to(beAKindOf(SomeStructConformingToProtocol.self)) -expect(structObject).toNot(beAKindOf(SomeClassConformingToProtocol.self)) -``` - -```objc -// Objective-C - -// The following tests pass -NSMutableArray *array = [NSMutableArray array]; -expect(array).to(beAKindOf([NSArray class])); -expect(@1).toNot(beAKindOf([NSNull class])); -``` - -Objects can be tested for their exact types using the `beAnInstanceOf` matcher: - -```swift -// Swift - -protocol SomeProtocol{} -class SomeClassConformingToProtocol: SomeProtocol{} -struct SomeStructConformingToProtocol: SomeProtocol{} - -// Unlike the 'beKindOf' matcher, the 'beAnInstanceOf' matcher only -// passes if the object is the EXACT type requested. The following -// tests pass -- note its behavior when working in an inheritance hierarchy. -expect(1).to(beAnInstanceOf(Int.self)) -expect("turtle").to(beAnInstanceOf(String.self)) - -let classObject = SomeClassConformingToProtocol() -expect(classObject).toNot(beAnInstanceOf(SomeProtocol.self)) -expect(classObject).to(beAnInstanceOf(SomeClassConformingToProtocol.self)) -expect(classObject).toNot(beAnInstanceOf(SomeStructConformingToProtocol.self)) - -let structObject = SomeStructConformingToProtocol() -expect(structObject).toNot(beAnInstanceOf(SomeProtocol.self)) -expect(structObject).to(beAnInstanceOf(SomeStructConformingToProtocol.self)) -expect(structObject).toNot(beAnInstanceOf(SomeClassConformingToProtocol.self)) -``` - -## Equivalence - -```swift -// Swift - -// Passes if 'actual' is equivalent to 'expected': -expect(actual).to(equal(expected)) -expect(actual) == expected - -// Passes if 'actual' is not equivalent to 'expected': -expect(actual).toNot(equal(expected)) -expect(actual) != expected -``` - -```objc -// Objective-C - -// Passes if 'actual' is equivalent to 'expected': -expect(actual).to(equal(expected)) - -// Passes if 'actual' is not equivalent to 'expected': -expect(actual).toNot(equal(expected)) -``` - -Values must be `Equatable`, `Comparable`, or subclasses of `NSObject`. -`equal` will always fail when used to compare one or more `nil` values. - -## Identity - -```swift -// Swift - -// Passes if 'actual' has the same pointer address as 'expected': -expect(actual).to(beIdenticalTo(expected)) -expect(actual) === expected - -// Passes if 'actual' does not have the same pointer address as 'expected': -expect(actual).toNot(beIdenticalTo(expected)) -expect(actual) !== expected -``` - -It is important to remember that `beIdenticalTo` only makes sense when comparing -types with reference semantics, which have a notion of identity. In Swift, -that means types that are defined as a `class`. - -This matcher will not work when comparing types with value semantics such as -those defined as a `struct` or `enum`. If you need to compare two value types, -consider what it means for instances of your type to be identical. This may mean -comparing individual properties or, if it makes sense to do so, conforming your type -to `Equatable` and using Nimble's equivalence matchers instead. - - -```objc -// Objective-C - -// Passes if 'actual' has the same pointer address as 'expected': -expect(actual).to(beIdenticalTo(expected)); - -// Passes if 'actual' does not have the same pointer address as 'expected': -expect(actual).toNot(beIdenticalTo(expected)); -``` - -## Comparisons - -```swift -// Swift - -expect(actual).to(beLessThan(expected)) -expect(actual) < expected - -expect(actual).to(beLessThanOrEqualTo(expected)) -expect(actual) <= expected - -expect(actual).to(beGreaterThan(expected)) -expect(actual) > expected - -expect(actual).to(beGreaterThanOrEqualTo(expected)) -expect(actual) >= expected -``` - -```objc -// Objective-C - -expect(actual).to(beLessThan(expected)); -expect(actual).to(beLessThanOrEqualTo(expected)); -expect(actual).to(beGreaterThan(expected)); -expect(actual).to(beGreaterThanOrEqualTo(expected)); -``` - -> Values given to the comparison matchers above must implement - `Comparable`. - -Because of how computers represent floating point numbers, assertions -that two floating point numbers be equal will sometimes fail. To express -that two numbers should be close to one another within a certain margin -of error, use `beCloseTo`: - -```swift -// Swift - -expect(actual).to(beCloseTo(expected, within: delta)) -``` - -```objc -// Objective-C - -expect(actual).to(beCloseTo(expected).within(delta)); -``` - -For example, to assert that `10.01` is close to `10`, you can write: - -```swift -// Swift - -expect(10.01).to(beCloseTo(10, within: 0.1)) -``` - -```objc -// Objective-C - -expect(@(10.01)).to(beCloseTo(@10).within(0.1)); -``` - -There is also an operator shortcut available in Swift: - -```swift -// Swift - -expect(actual) ≈ expected -expect(actual) ≈ (expected, delta) - -``` -(Type option+x to get `≈` on a U.S. keyboard) - -The former version uses the default delta of 0.0001. Here is yet another way to do this: - -```swift -// Swift - -expect(actual) ≈ expected ± delta -expect(actual) == expected ± delta - -``` -(Type option+shift+= to get `±` on a U.S. keyboard) - -If you are comparing arrays of floating point numbers, you'll find the following useful: - -```swift -// Swift - -expect([0.0, 2.0]) ≈ [0.0001, 2.0001] -expect([0.0, 2.0]).to(beCloseTo([0.1, 2.1], within: 0.1)) - -``` - -> Values given to the `beCloseTo` matcher must be coercable into a - `Double`. - -## Types/Classes - -```swift -// Swift - -// Passes if 'instance' is an instance of 'aClass': -expect(instance).to(beAnInstanceOf(aClass)) - -// Passes if 'instance' is an instance of 'aClass' or any of its subclasses: -expect(instance).to(beAKindOf(aClass)) -``` - -```objc -// Objective-C - -// Passes if 'instance' is an instance of 'aClass': -expect(instance).to(beAnInstanceOf(aClass)); - -// Passes if 'instance' is an instance of 'aClass' or any of its subclasses: -expect(instance).to(beAKindOf(aClass)); -``` - -> Instances must be Objective-C objects: subclasses of `NSObject`, - or Swift objects bridged to Objective-C with the `@objc` prefix. - -For example, to assert that `dolphin` is a kind of `Mammal`: - -```swift -// Swift - -expect(dolphin).to(beAKindOf(Mammal)) -``` - -```objc -// Objective-C - -expect(dolphin).to(beAKindOf([Mammal class])); -``` - -> `beAnInstanceOf` uses the `-[NSObject isMemberOfClass:]` method to - test membership. `beAKindOf` uses `-[NSObject isKindOfClass:]`. - -## Truthiness - -```swift -// Passes if 'actual' is not nil, true, or an object with a boolean value of true: -expect(actual).to(beTruthy()) - -// Passes if 'actual' is only true (not nil or an object conforming to Boolean true): -expect(actual).to(beTrue()) - -// Passes if 'actual' is nil, false, or an object with a boolean value of false: -expect(actual).to(beFalsy()) - -// Passes if 'actual' is only false (not nil or an object conforming to Boolean false): -expect(actual).to(beFalse()) - -// Passes if 'actual' is nil: -expect(actual).to(beNil()) -``` - -```objc -// Objective-C - -// Passes if 'actual' is not nil, true, or an object with a boolean value of true: -expect(actual).to(beTruthy()); - -// Passes if 'actual' is only true (not nil or an object conforming to Boolean true): -expect(actual).to(beTrue()); - -// Passes if 'actual' is nil, false, or an object with a boolean value of false: -expect(actual).to(beFalsy()); - -// Passes if 'actual' is only false (not nil or an object conforming to Boolean false): -expect(actual).to(beFalse()); - -// Passes if 'actual' is nil: -expect(actual).to(beNil()); -``` - -## Swift Assertions - -If you're using Swift, you can use the `throwAssertion` matcher to check if an assertion is thrown (e.g. `fatalError()`). This is made possible by [@mattgallagher](https://github.com/mattgallagher)'s [CwlPreconditionTesting](https://github.com/mattgallagher/CwlPreconditionTesting) library. - -```swift -// Swift - -// Passes if 'somethingThatThrows()' throws an assertion, -// such as by calling 'fatalError()' or if a precondition fails: -expect { try somethingThatThrows() }.to(throwAssertion()) -expect { () -> Void in fatalError() }.to(throwAssertion()) -expect { precondition(false) }.to(throwAssertion()) - -// Passes if throwing an NSError is not equal to throwing an assertion: -expect { throw NSError(domain: "test", code: 0, userInfo: nil) }.toNot(throwAssertion()) - -// Passes if the code after the precondition check is not run: -var reachedPoint1 = false -var reachedPoint2 = false -expect { - reachedPoint1 = true - precondition(false, "condition message") - reachedPoint2 = true -}.to(throwAssertion()) - -expect(reachedPoint1) == true -expect(reachedPoint2) == false -``` - -Notes: - -* This feature is only available in Swift. -* It is only supported for `x86_64` binaries, meaning _you cannot run this matcher on iOS devices, only simulators_. -* The tvOS simulator is supported, but using a different mechanism, requiring you to turn off the `Debug executable` scheme setting for your tvOS scheme's Test configuration. - -## Swift Error Handling - -You can use the `throwError` matcher to check if an error is thrown. - -```swift -// Swift - -// Passes if 'somethingThatThrows()' throws an 'Error': -expect { try somethingThatThrows() }.to(throwError()) - -// Passes if 'somethingThatThrows()' throws an error within a particular domain: -expect { try somethingThatThrows() }.to(throwError { (error: Error) in - expect(error._domain).to(equal(NSCocoaErrorDomain)) -}) - -// Passes if 'somethingThatThrows()' throws a particular error enum case: -expect { try somethingThatThrows() }.to(throwError(NSCocoaError.PropertyListReadCorruptError)) - -// Passes if 'somethingThatThrows()' throws an error of a particular type: -expect { try somethingThatThrows() }.to(throwError(errorType: NimbleError.self)) -``` - -When working directly with `Error` values, using the `matchError` matcher -allows you to perform certain checks on the error itself without having to -explicitly cast the error. - -The `matchError` matcher allows you to check whether or not the error: - -- is the same _type_ of error you are expecting. -- represents a particular error value that you are expecting. - -This can be useful when using `Result` or `Promise` types, for example. - -```swift -// Swift - -let actual: Error = ... - -// Passes if 'actual' represents any error value from the NimbleErrorEnum type: -expect(actual).to(matchError(NimbleErrorEnum.self)) - -// Passes if 'actual' represents the case 'timeout' from the NimbleErrorEnum type: -expect(actual).to(matchError(NimbleErrorEnum.timeout)) - -// Passes if 'actual' contains an NSError equal to the one provided: -expect(actual).to(matchError(NSError(domain: "err", code: 123, userInfo: nil))) -``` - -Note: This feature is only available in Swift. - -## Exceptions - -```swift -// Swift - -// Passes if 'actual', when evaluated, raises an exception: -expect(actual).to(raiseException()) - -// Passes if 'actual' raises an exception with the given name: -expect(actual).to(raiseException(named: name)) - -// Passes if 'actual' raises an exception with the given name and reason: -expect(actual).to(raiseException(named: name, reason: reason)) - -// Passes if 'actual' raises an exception which passes expectations defined in the given closure: -// (in this case, if the exception's name begins with "a r") -expect { exception.raise() }.to(raiseException { (exception: NSException) in - expect(exception.name).to(beginWith("a r")) -}) -``` - -```objc -// Objective-C - -// Passes if 'actual', when evaluated, raises an exception: -expect(actual).to(raiseException()) - -// Passes if 'actual' raises an exception with the given name -expect(actual).to(raiseException().named(name)) - -// Passes if 'actual' raises an exception with the given name and reason: -expect(actual).to(raiseException().named(name).reason(reason)) - -// Passes if 'actual' raises an exception and it passes expectations defined in the given block: -// (in this case, if name begins with "a r") -expect(actual).to(raiseException().satisfyingBlock(^(NSException *exception) { - expect(exception.name).to(beginWith(@"a r")); -})); -``` - -Note: Swift currently doesn't have exceptions (see [#220](https://github.com/Quick/Nimble/issues/220#issuecomment-172667064)). -Only Objective-C code can raise exceptions that Nimble will catch. - -## Collection Membership - -```swift -// Swift - -// Passes if all of the expected values are members of 'actual': -expect(actual).to(contain(expected...)) - -// Passes if 'actual' is empty (i.e. it contains no elements): -expect(actual).to(beEmpty()) -``` - -```objc -// Objective-C - -// Passes if expected is a member of 'actual': -expect(actual).to(contain(expected)); - -// Passes if 'actual' is empty (i.e. it contains no elements): -expect(actual).to(beEmpty()); -``` - -> In Swift `contain` takes any number of arguments. The expectation - passes if all of them are members of the collection. In Objective-C, - `contain` only takes one argument [for now](https://github.com/Quick/Nimble/issues/27). - -For example, to assert that a list of sea creature names contains -"dolphin" and "starfish": - -```swift -// Swift - -expect(["whale", "dolphin", "starfish"]).to(contain("dolphin", "starfish")) -``` - -```objc -// Objective-C - -expect(@[@"whale", @"dolphin", @"starfish"]).to(contain(@"dolphin")); -expect(@[@"whale", @"dolphin", @"starfish"]).to(contain(@"starfish")); -``` - -> `contain` and `beEmpty` expect collections to be instances of - `NSArray`, `NSSet`, or a Swift collection composed of `Equatable` elements. - -To test whether a set of elements is present at the beginning or end of -an ordered collection, use `beginWith` and `endWith`: - -```swift -// Swift - -// Passes if the elements in expected appear at the beginning of 'actual': -expect(actual).to(beginWith(expected...)) - -// Passes if the the elements in expected come at the end of 'actual': -expect(actual).to(endWith(expected...)) -``` - -```objc -// Objective-C - -// Passes if the elements in expected appear at the beginning of 'actual': -expect(actual).to(beginWith(expected)); - -// Passes if the the elements in expected come at the end of 'actual': -expect(actual).to(endWith(expected)); -``` - -> `beginWith` and `endWith` expect collections to be instances of - `NSArray`, or ordered Swift collections composed of `Equatable` - elements. - - Like `contain`, in Objective-C `beginWith` and `endWith` only support - a single argument [for now](https://github.com/Quick/Nimble/issues/27). - -For code that returns collections of complex objects without a strict -ordering, there is the `containElementSatisfying` matcher: - -```swift -// Swift - -struct Turtle { - let color: String -} - -let turtles: [Turtle] = functionThatReturnsSomeTurtlesInAnyOrder() - -// This set of matchers passes regardless of whether the array is -// [{color: "blue"}, {color: "green"}] or [{color: "green"}, {color: "blue"}]: - -expect(turtles).to(containElementSatisfying({ turtle in - return turtle.color == "green" -})) -expect(turtles).to(containElementSatisfying({ turtle in - return turtle.color == "blue" -}, "that is a turtle with color 'blue'")) - -// The second matcher will incorporate the provided string in the error message -// should it fail -``` - -```objc -// Objective-C - -@interface Turtle : NSObject -@property (nonatomic, readonly, nonnull) NSString *color; -@end - -@implementation Turtle -@end - -NSArray * __nonnull turtles = functionThatReturnsSomeTurtlesInAnyOrder(); - -// This set of matchers passes regardless of whether the array is -// [{color: "blue"}, {color: "green"}] or [{color: "green"}, {color: "blue"}]: - -expect(turtles).to(containElementSatisfying(^BOOL(id __nonnull object) { - return [[turtle color] isEqualToString:@"green"]; -})); -expect(turtles).to(containElementSatisfying(^BOOL(id __nonnull object) { - return [[turtle color] isEqualToString:@"blue"]; -})); -``` - -## Strings - -```swift -// Swift - -// Passes if 'actual' contains 'substring': -expect(actual).to(contain(substring)) - -// Passes if 'actual' begins with 'prefix': -expect(actual).to(beginWith(prefix)) - -// Passes if 'actual' ends with 'suffix': -expect(actual).to(endWith(suffix)) - -// Passes if 'actual' represents the empty string, "": -expect(actual).to(beEmpty()) - -// Passes if 'actual' matches the regular expression defined in 'expected': -expect(actual).to(match(expected)) -``` - -```objc -// Objective-C - -// Passes if 'actual' contains 'substring': -expect(actual).to(contain(expected)); - -// Passes if 'actual' begins with 'prefix': -expect(actual).to(beginWith(prefix)); - -// Passes if 'actual' ends with 'suffix': -expect(actual).to(endWith(suffix)); - -// Passes if 'actual' represents the empty string, "": -expect(actual).to(beEmpty()); - -// Passes if 'actual' matches the regular expression defined in 'expected': -expect(actual).to(match(expected)) -``` - -## Collection Elements - -Nimble provides a means to check that all elements of a collection pass a given expectation. - -### Swift - -In Swift, the collection must be an instance of a type conforming to -`Sequence`. - -```swift -// Swift - -// Providing a custom function: -expect([1, 2, 3, 4]).to(allPass { $0! < 5 }) - -// Composing the expectation with another matcher: -expect([1, 2, 3, 4]).to(allPass(beLessThan(5))) -``` - -### Objective-C - -In Objective-C, the collection must be an instance of a type which implements -the `NSFastEnumeration` protocol, and whose elements are instances of a type -which subclasses `NSObject`. - -Additionally, unlike in Swift, there is no override to specify a custom -matcher function. - -```objc -// Objective-C - -expect(@[@1, @2, @3, @4]).to(allPass(beLessThan(@5))); -``` - -## Collection Count - -```swift -// Swift - -// Passes if 'actual' contains the 'expected' number of elements: -expect(actual).to(haveCount(expected)) - -// Passes if 'actual' does _not_ contain the 'expected' number of elements: -expect(actual).notTo(haveCount(expected)) -``` - -```objc -// Objective-C - -// Passes if 'actual' contains the 'expected' number of elements: -expect(actual).to(haveCount(expected)) - -// Passes if 'actual' does _not_ contain the 'expected' number of elements: -expect(actual).notTo(haveCount(expected)) -``` - -For Swift, the actual value must be an instance of a type conforming to `Collection`. -For example, instances of `Array`, `Dictionary`, or `Set`. - -For Objective-C, the actual value must be one of the following classes, or their subclasses: - - - `NSArray`, - - `NSDictionary`, - - `NSSet`, or - - `NSHashTable`. - -## Notifications - -```swift -// Swift -let testNotification = Notification(name: "Foo", object: nil) - -// passes if the closure in expect { ... } posts a notification to the default -// notification center. -expect { - NotificationCenter.default.postNotification(testNotification) -}.to(postNotifications(equal([testNotification])) - -// passes if the closure in expect { ... } posts a notification to a given -// notification center -let notificationCenter = NotificationCenter() -expect { - notificationCenter.postNotification(testNotification) -}.to(postNotifications(equal([testNotification]), fromNotificationCenter: notificationCenter)) -``` - -> This matcher is only available in Swift. - -## Matching a value to any of a group of matchers - -```swift -// Swift - -// passes if actual is either less than 10 or greater than 20 -expect(actual).to(satisfyAnyOf(beLessThan(10), beGreaterThan(20))) - -// can include any number of matchers -- the following will pass -// **be careful** -- too many matchers can be the sign of an unfocused test -expect(6).to(satisfyAnyOf(equal(2), equal(3), equal(4), equal(5), equal(6), equal(7))) - -// in Swift you also have the option to use the || operator to achieve a similar function -expect(82).to(beLessThan(50) || beGreaterThan(80)) -``` - -```objc -// Objective-C - -// passes if actual is either less than 10 or greater than 20 -expect(actual).to(satisfyAnyOf(beLessThan(@10), beGreaterThan(@20))) - -// can include any number of matchers -- the following will pass -// **be careful** -- too many matchers can be the sign of an unfocused test -expect(@6).to(satisfyAnyOf(equal(@2), equal(@3), equal(@4), equal(@5), equal(@6), equal(@7))) -``` - -Note: This matcher allows you to chain any number of matchers together. This provides flexibility, - but if you find yourself chaining many matchers together in one test, consider whether you - could instead refactor that single test into multiple, more precisely focused tests for - better coverage. - -## Custom Validation - -```swift -// Swift - -// passes if .succeeded is returned from the closure -expect({ - guard case .enumCaseWithAssociatedValueThatIDontCareAbout = actual else { - return .failed(reason: "wrong enum case") - } - - return .succeeded -}).to(succeed()) - -// passes if .failed is returned from the closure -expect({ - guard case .enumCaseWithAssociatedValueThatIDontCareAbout = actual else { - return .failed(reason: "wrong enum case") - } - - return .succeeded -}).notTo(succeed()) -``` - -The `String` provided with `.failed()` is shown when the test fails. - -When using `toEventually()` be careful not to make state changes or run process intensive code since this closure will be ran many times. - -# Writing Your Own Matchers - -In Nimble, matchers are Swift functions that take an expected -value and return a `Predicate` closure. Take `equal`, for example: - -```swift -// Swift - -public func equal(expectedValue: T?) -> Predicate { - // Can be shortened to: - // Predicate { actual in ... } - // - // But shown with types here for clarity. - return Predicate { (actualExpression: Expression) throws -> PredicateResult in - let msg = ExpectationMessage.expectedActualValueTo("equal <\(expectedValue)>") - if let actualValue = try actualExpression.evaluate() { - return PredicateResult( - bool: actualValue == expectedValue!, - message: msg - ) - } else { - return PredicateResult( - status: .fail, - message: msg.appendedBeNilHint() - ) - } - } -} -``` - -The return value of a `Predicate` closure is a `PredicateResult` that indicates -whether the actual value matches the expectation and what error message to -display on failure. - -> The actual `equal` matcher function does not match when - `expected` are nil; the example above has been edited for brevity. - -Since matchers are just Swift functions, you can define them anywhere: -at the top of your test file, in a file shared by all of your tests, or -in an Xcode project you distribute to others. - -> If you write a matcher you think everyone can use, consider adding it - to Nimble's built-in set of matchers by sending a pull request! Or - distribute it yourself via GitHub. - -For examples of how to write your own matchers, just check out the -[`Matchers` directory](https://github.com/Quick/Nimble/tree/master/Sources/Nimble/Matchers) -to see how Nimble's built-in set of matchers are implemented. You can -also check out the tips below. - -## PredicateResult - -`PredicateResult` is the return struct that `Predicate` return to indicate -success and failure. A `PredicateResult` is made up of two values: -`PredicateStatus` and `ExpectationMessage`. - -Instead of a boolean, `PredicateStatus` captures a trinary set of values: - -```swift -// Swift - -public enum PredicateStatus { -// The predicate "passes" with the given expression -// eg - expect(1).to(equal(1)) -case matches - -// The predicate "fails" with the given expression -// eg - expect(1).toNot(equal(1)) -case doesNotMatch - -// The predicate never "passes" with the given expression, even if negated -// eg - expect(nil as Int?).toNot(equal(1)) -case fail - -// ... -} -``` - -Meanwhile, `ExpectationMessage` provides messaging semantics for error reporting. - -```swift -// Swift - -public indirect enum ExpectationMessage { -// Emits standard error message: -// eg - "expected to , got " -case expectedActualValueTo(/* message: */ String) - -// Allows any free-form message -// eg - "" -case fail(/* message: */ String) - -// ... -} -``` - -Predicates should usually depend on either `.expectedActualValueTo(..)` or -`.fail(..)` when reporting errors. Special cases can be used for the other enum -cases. - -Finally, if your Predicate utilizes other Predicates, you can utilize -`.appended(details:)` and `.appended(message:)` methods to annotate an existing -error with more details. - -A common message to append is failing on nils. For that, `.appendedBeNilHint()` -can be used. - -## Lazy Evaluation - -`actualExpression` is a lazy, memoized closure around the value provided to the -`expect` function. The expression can either be a closure or a value directly -passed to `expect(...)`. In order to determine whether that value matches, -custom matchers should call `actualExpression.evaluate()`: - -```swift -// Swift - -public func beNil() -> Predicate { - // Predicate.simpleNilable(..) automatically generates ExpectationMessage for - // us based on the string we provide to it. Also, the 'Nilable' postfix indicates - // that this Predicate supports matching against nil actualExpressions, instead of - // always resulting in a PredicateStatus.fail result -- which is true for - // Predicate.simple(..) - return Predicate.simpleNilable("be nil") { actualExpression in - let actualValue = try actualExpression.evaluate() - return PredicateStatus(bool: actualValue == nil) - } -} -``` - -In the above example, `actualExpression` is not `nil` -- it is a closure -that returns a value. The value it returns, which is accessed via the -`evaluate()` method, may be `nil`. If that value is `nil`, the `beNil` -matcher function returns `true`, indicating that the expectation passed. - -## Type Checking via Swift Generics - -Using Swift's generics, matchers can constrain the type of the actual value -passed to the `expect` function by modifying the return type. - -For example, the following matcher, `haveDescription`, only accepts actual -values that implement the `Printable` protocol. It checks their `description` -against the one provided to the matcher function, and passes if they are the same: - -```swift -// Swift - -public func haveDescription(description: String) -> Predicate { - return Predicate.simple("have description") { actual in - return PredicateStatus(bool: actual.evaluate().description == description) - } -} -``` - -## Customizing Failure Messages - -When using `Predicate.simple(..)` or `Predicate.simpleNilable(..)`, Nimble -outputs the following failure message when an expectation fails: - -```swift -// where `message` is the first string argument and -// `actual` is the actual value received in `expect(..)` -"expected to \(message), got <\(actual)>" -``` - -You can customize this message by modifying the way you create a `Predicate`. - -### Basic Customization - -For slightly more complex error messaging, receive the created failure message -with `Predicate.define(..)`: - -```swift -// Swift - -public func equal(_ expectedValue: T?) -> Predicate { - return Predicate.define("equal <\(stringify(expectedValue))>") { actualExpression, msg in - let actualValue = try actualExpression.evaluate() - let matches = actualValue == expectedValue && expectedValue != nil - if expectedValue == nil || actualValue == nil { - if expectedValue == nil && actualValue != nil { - return PredicateResult( - status: .fail, - message: msg.appendedBeNilHint() - ) - } - return PredicateResult(status: .fail, message: msg) - } - return PredicateResult(bool: matches, message: msg) - } -} -``` - -In the example above, `msg` is defined based on the string given to -`Predicate.define`. The code looks akin to: - -```swift -// Swift - -let msg = ExpectationMessage.expectedActualValueTo("equal <\(stringify(expectedValue))>") -``` - -### Full Customization - -To fully customize the behavior of the Predicate, use the overload that expects -a `PredicateResult` to be returned. - -Along with `PredicateResult`, there are other `ExpectationMessage` enum values you can use: - -```swift -public indirect enum ExpectationMessage { -// Emits standard error message: -// eg - "expected to , got " -case expectedActualValueTo(/* message: */ String) - -// Allows any free-form message -// eg - "" -case fail(/* message: */ String) - -// Emits standard error message with a custom actual value instead of the default. -// eg - "expected to , got " -case expectedCustomValueTo(/* message: */ String, /* actual: */ String) - -// Emits standard error message without mentioning the actual value -// eg - "expected to " -case expectedTo(/* message: */ String) - -// ... -} -``` - -For matchers that compose other matchers, there are a handful of helper -functions to annotate messages. - -`appended(message: String)` is used to append to the original failure message: - -```swift -// produces "expected to be true, got (use beFalse() for inverse)" -// appended message do show up inline in Xcode. -.expectedActualValueTo("be true").appended(message: " (use beFalse() for inverse)") -``` - -For a more comprehensive message that spans multiple lines, use -`appended(details: String)` instead: - -```swift -// produces "expected to be true, got \n\nuse beFalse() for inverse\nor use beNil()" -// details do not show inline in Xcode, but do show up in test logs. -.expectedActualValueTo("be true").appended(details: "use beFalse() for inverse\nor use beNil()") -``` - -## Supporting Objective-C - -To use a custom matcher written in Swift from Objective-C, you'll have -to extend the `NMBObjCMatcher` class, adding a new class method for your -custom matcher. The example below defines the class method -`+[NMBObjCMatcher beNilMatcher]`: - -```swift -// Swift - -extension NMBObjCMatcher { - public class func beNilMatcher() -> NMBObjCMatcher { - return NMBObjCMatcher { actualBlock, failureMessage, location in - let block = ({ actualBlock() as NSObject? }) - let expr = Expression(expression: block, location: location) - return beNil().matches(expr, failureMessage: failureMessage) - } - } -} -``` - -The above allows you to use the matcher from Objective-C: - -```objc -// Objective-C - -expect(actual).to([NMBObjCMatcher beNilMatcher]()); -``` - -To make the syntax easier to use, define a C function that calls the -class method: - -```objc -// Objective-C - -FOUNDATION_EXPORT id beNil() { - return [NMBObjCMatcher beNilMatcher]; -} -``` - -### Properly Handling `nil` in Objective-C Matchers - -When supporting Objective-C, make sure you handle `nil` appropriately. -Like [Cedar](https://github.com/pivotal/cedar/issues/100), -**most matchers do not match with nil**. This is to bring prevent test -writers from being surprised by `nil` values where they did not expect -them. - -Nimble provides the `beNil` matcher function for test writer that want -to make expectations on `nil` objects: - -```objc -// Objective-C - -expect(nil).to(equal(nil)); // fails -expect(nil).to(beNil()); // passes -``` - -If your matcher does not want to match with nil, you use `NonNilMatcherFunc` -and the `canMatchNil` constructor on `NMBObjCMatcher`. Using both types will -automatically generate expected value failure messages when they're nil. - -```swift - -public func beginWith(startingElement: T) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "begin with <\(startingElement)>" - if let actualValue = actualExpression.evaluate() { - var actualGenerator = actualValue.makeIterator() - return actualGenerator.next() == startingElement - } - return false - } -} - -extension NMBObjCMatcher { - public class func beginWithMatcher(expected: AnyObject) -> NMBObjCMatcher { - return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in - let actual = actualExpression.evaluate() - let expr = actualExpression.cast { $0 as? NMBOrderedCollection } - return beginWith(expected).matches(expr, failureMessage: failureMessage) - } - } -} -``` - -## Migrating from the Old Matcher API - -Previously (`<7.0.0`), Nimble supported matchers via the following types: - -- `Matcher` -- `NonNilMatcherFunc` -- `MatcherFunc` - -All of those types have been replaced by `Predicate`. While migrating can be a -lot of work, Nimble currently provides several steps to aid migration of your -custom matchers: - -### Minimal Step - Use `.predicate` - -Nimble provides an extension to the old types that automatically naively -converts those types to the newer `Predicate`. - -```swift -// Swift -public func beginWith(startingElement: T) -> Predicate { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "begin with <\(startingElement)>" - if let actualValue = actualExpression.evaluate() { - var actualGenerator = actualValue.makeIterator() - return actualGenerator.next() == startingElement - } - return false - }.predicate -} -``` - -This is the simpliest way to externally support `Predicate` which allows easier -composition than the old Nimble matcher interface, with minimal effort to change. - -### Convert to use `Predicate` Type with Old Matcher Constructor - -The second most convenient step is to utilize special constructors that -`Predicate` supports that closely align to the constructors of the old Nimble -matcher types. - -```swift -// Swift -public func beginWith(startingElement: T) -> Predicate { - return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in - failureMessage.postfixMessage = "begin with <\(startingElement)>" - if let actualValue = actualExpression.evaluate() { - var actualGenerator = actualValue.makeIterator() - return actualGenerator.next() == startingElement - } - return false - } -} -``` - -This allows you to completely drop the old types from your code, although the -intended behavior may alter slightly to what is desired. - -### Convert to `Predicate` Type with Preferred Constructor - -Finally, you can convert to the native `Predicate` format using one of the -constructors not used to assist in the migration. - -### Deprecation Roadmap - -Nimble 7 introduces `Predicate` but will support the old types with warning -deprecations. A couple major releases of Nimble will remain backwards -compatible with the old matcher api, although new features may not be -backported. - -The deprecating plan is a 3 major versions removal. Which is as follows: - - 1. Introduce new `Predicate` API, deprecation warning for old matcher APIs. - (Nimble `v7.x.x` and `v8.x.x`) - 2. Introduce warnings on migration-path features (`.predicate`, - `Predicate`-constructors with similar arguments to old API). (Nimble - `v9.x.x`) - 3. Remove old API. (Nimble `v10.x.x`) - - -# Installing Nimble - -> Nimble can be used on its own, or in conjunction with its sister - project, [Quick](https://github.com/Quick/Quick). To install both - Quick and Nimble, follow [the installation instructions in the Quick - Documentation](https://github.com/Quick/Quick/blob/master/Documentation/en-us/InstallingQuick.md). - -Nimble can currently be installed in one of two ways: using CocoaPods, or with -git submodules. - -## Installing Nimble as a Submodule - -To use Nimble as a submodule to test your macOS, iOS or tvOS applications, follow -these 4 easy steps: - -1. Clone the Nimble repository -2. Add Nimble.xcodeproj to the Xcode workspace for your project -3. Link Nimble.framework to your test target -4. Start writing expectations! - -For more detailed instructions on each of these steps, -read [How to Install Quick](https://github.com/Quick/Quick#how-to-install-quick). -Ignore the steps involving adding Quick to your project in order to -install just Nimble. - -## Installing Nimble via CocoaPods - -To use Nimble in CocoaPods to test your macOS, iOS or tvOS applications, add -Nimble to your podfile and add the ```use_frameworks!``` line to enable Swift -support for CocoaPods. - -```ruby -platform :ios, '8.0' - -source 'https://github.com/CocoaPods/Specs.git' - -# Whatever pods you need for your app go here - -target 'YOUR_APP_NAME_HERE_Tests', :exclusive => true do - use_frameworks! - pod 'Nimble', '~> 6.0.0' -end -``` - -Finally run `pod install`. - -## Installing Nimble via Accio - -Add the following to your Package.swift: - -```swift -.package(url: "https://github.com/Quick/Nimble.git", .upToNextMajor(from: "8.0.1")), -``` - -Next, add `Nimble` to your App targets dependencies like so: - -```swift -.testTarget( - name: "AppTests", - dependencies: [ - "Nimble", - ] -), -``` - -Then run `accio update`. - -## Using Nimble without XCTest - -Nimble is integrated with XCTest to allow it work well when used in Xcode test -bundles, however it can also be used in a standalone app. After installing -Nimble using one of the above methods, there are two additional steps required -to make this work. - -1. Create a custom assertion handler and assign an instance of it to the - global `NimbleAssertionHandler` variable. For example: - -```swift -class MyAssertionHandler : AssertionHandler { - func assert(assertion: Bool, message: FailureMessage, location: SourceLocation) { - if (!assertion) { - print("Expectation failed: \(message.stringValue)") - } - } -} -``` -```swift -// Somewhere before you use any assertions -NimbleAssertionHandler = MyAssertionHandler() -``` - -2. Add a post-build action to fix an issue with the Swift XCTest support - library being unnecessarily copied into your app - * Edit your scheme in Xcode, and navigate to Build -> Post-actions - * Click the "+" icon and select "New Run Script Action" - * Open the "Provide build settings from" dropdown and select your target - * Enter the following script contents: -``` -rm "${SWIFT_STDLIB_TOOL_DESTINATION_DIR}/libswiftXCTest.dylib" -``` - -You can now use Nimble assertions in your code and handle failures as you see -fit. diff --git a/Example/Pods/Nimble/Sources/Nimble/Adapters/AdapterProtocols.swift b/Example/Pods/Nimble/Sources/Nimble/Adapters/AdapterProtocols.swift deleted file mode 100644 index abaf5328..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Adapters/AdapterProtocols.swift +++ /dev/null @@ -1,18 +0,0 @@ -import Foundation - -/// Protocol for the assertion handler that Nimble uses for all expectations. -public protocol AssertionHandler { - func assert(_ assertion: Bool, message: FailureMessage, location: SourceLocation) -} - -/// Global backing interface for assertions that Nimble creates. -/// Defaults to a private test handler that passes through to XCTest. -/// -/// If XCTest is not available, you must assign your own assertion handler -/// before using any matchers, otherwise Nimble will abort the program. -/// -/// @see AssertionHandler -public var NimbleAssertionHandler: AssertionHandler = { () -> AssertionHandler in - // swiftlint:disable:previous identifier_name - return isXCTestAvailable() ? NimbleXCTestHandler() : NimbleXCTestUnavailableHandler() -}() diff --git a/Example/Pods/Nimble/Sources/Nimble/Adapters/AssertionDispatcher.swift b/Example/Pods/Nimble/Sources/Nimble/Adapters/AssertionDispatcher.swift deleted file mode 100644 index 94a9030e..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Adapters/AssertionDispatcher.swift +++ /dev/null @@ -1,19 +0,0 @@ -/// AssertionDispatcher allows multiple AssertionHandlers to receive -/// assertion messages. -/// -/// @warning Does not fully dispatch if one of the handlers raises an exception. -/// This is possible with XCTest-based assertion handlers. -/// -public class AssertionDispatcher: AssertionHandler { - let handlers: [AssertionHandler] - - public init(handlers: [AssertionHandler]) { - self.handlers = handlers - } - - public func assert(_ assertion: Bool, message: FailureMessage, location: SourceLocation) { - for handler in handlers { - handler.assert(assertion, message: message, location: location) - } - } -} diff --git a/Example/Pods/Nimble/Sources/Nimble/Adapters/AssertionRecorder.swift b/Example/Pods/Nimble/Sources/Nimble/Adapters/AssertionRecorder.swift deleted file mode 100644 index 0f5df599..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Adapters/AssertionRecorder.swift +++ /dev/null @@ -1,127 +0,0 @@ -import Foundation - -/// A data structure that stores information about an assertion when -/// AssertionRecorder is set as the Nimble assertion handler. -/// -/// @see AssertionRecorder -/// @see AssertionHandler -public struct AssertionRecord: CustomStringConvertible { - /// Whether the assertion succeeded or failed - public let success: Bool - /// The failure message the assertion would display on failure. - public let message: FailureMessage - /// The source location the expectation occurred on. - public let location: SourceLocation - - public var description: String { - return "AssertionRecord { success=\(success), message='\(message.stringValue)', location=\(location) }" - } -} - -/// An AssertionHandler that silently records assertions that Nimble makes. -/// This is useful for testing failure messages for matchers. -/// -/// @see AssertionHandler -public class AssertionRecorder: AssertionHandler { - /// All the assertions that were captured by this recorder - public var assertions = [AssertionRecord]() - - public init() {} - - public func assert(_ assertion: Bool, message: FailureMessage, location: SourceLocation) { - assertions.append( - AssertionRecord( - success: assertion, - message: message, - location: location)) - } -} - -extension NMBExceptionCapture { - internal func tryBlockThrows(_ unsafeBlock: () throws -> Void) throws { - var catchedError: Error? - tryBlock { - do { - try unsafeBlock() - } catch { - catchedError = error - } - } - if let error = catchedError { - throw error - } - } -} - -/// Allows you to temporarily replace the current Nimble assertion handler with -/// the one provided for the scope of the closure. -/// -/// Once the closure finishes, then the original Nimble assertion handler is restored. -/// -/// @see AssertionHandler -public func withAssertionHandler(_ tempAssertionHandler: AssertionHandler, - file: FileString = #file, - line: UInt = #line, - closure: () throws -> Void) { - let environment = NimbleEnvironment.activeInstance - let oldRecorder = environment.assertionHandler - let capturer = NMBExceptionCapture(handler: nil, finally: ({ - environment.assertionHandler = oldRecorder - })) - environment.assertionHandler = tempAssertionHandler - - do { - try capturer.tryBlockThrows { - try closure() - } - } catch { - let failureMessage = FailureMessage() - failureMessage.stringValue = "unexpected error thrown: <\(error)>" - let location = SourceLocation(file: file, line: line) - tempAssertionHandler.assert(false, message: failureMessage, location: location) - } -} - -/// Captures expectations that occur in the given closure. Note that all -/// expectations will still go through to the default Nimble handler. -/// -/// This can be useful if you want to gather information about expectations -/// that occur within a closure. -/// -/// @param silently expectations are no longer send to the default Nimble -/// assertion handler when this is true. Defaults to false. -/// -/// @see gatherFailingExpectations -public func gatherExpectations(silently: Bool = false, closure: () -> Void) -> [AssertionRecord] { - let previousRecorder = NimbleEnvironment.activeInstance.assertionHandler - let recorder = AssertionRecorder() - let handlers: [AssertionHandler] - - if silently { - handlers = [recorder] - } else { - handlers = [recorder, previousRecorder] - } - - let dispatcher = AssertionDispatcher(handlers: handlers) - withAssertionHandler(dispatcher, closure: closure) - return recorder.assertions -} - -/// Captures failed expectations that occur in the given closure. Note that all -/// expectations will still go through to the default Nimble handler. -/// -/// This can be useful if you want to gather information about failed -/// expectations that occur within a closure. -/// -/// @param silently expectations are no longer send to the default Nimble -/// assertion handler when this is true. Defaults to false. -/// -/// @see gatherExpectations -/// @see raiseException source for an example use case. -public func gatherFailingExpectations(silently: Bool = false, closure: () -> Void) -> [AssertionRecord] { - let assertions = gatherExpectations(silently: silently, closure: closure) - return assertions.filter { assertion in - !assertion.success - } -} diff --git a/Example/Pods/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift b/Example/Pods/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift deleted file mode 100644 index 5338a465..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift +++ /dev/null @@ -1,191 +0,0 @@ -import Foundation - -#if canImport(Darwin) && !SWIFT_PACKAGE - -private func from(objcPredicate: NMBPredicate) -> Predicate { - return Predicate { actualExpression in - let result = objcPredicate.satisfies(({ try actualExpression.evaluate() }), - location: actualExpression.location) - return result.toSwift() - } -} - -internal struct ObjCMatcherWrapper: Matcher { - let matcher: NMBMatcher - - func matches(_ actualExpression: Expression, failureMessage: FailureMessage) -> Bool { - return matcher.matches( - // swiftlint:disable:next force_try - ({ try! actualExpression.evaluate() }), - failureMessage: failureMessage, - location: actualExpression.location) - } - - func doesNotMatch(_ actualExpression: Expression, failureMessage: FailureMessage) -> Bool { - return matcher.doesNotMatch( - // swiftlint:disable:next force_try - ({ try! actualExpression.evaluate() }), - failureMessage: failureMessage, - location: actualExpression.location) - } -} - -// Equivalent to Expectation, but for Nimble's Objective-C interface -public class NMBExpectation: NSObject { - // swiftlint:disable identifier_name - internal let _actualBlock: () -> NSObject? - internal var _negative: Bool - internal let _file: FileString - internal let _line: UInt - internal var _timeout: TimeInterval = 1.0 - // swiftlint:enable identifier_name - - @objc public init(actualBlock: @escaping () -> NSObject?, negative: Bool, file: FileString, line: UInt) { - self._actualBlock = actualBlock - self._negative = negative - self._file = file - self._line = line - } - - private var expectValue: Expectation { - return expect(_file, line: _line) { - self._actualBlock() as NSObject? - } - } - - @objc public var withTimeout: (TimeInterval) -> NMBExpectation { - return { timeout in self._timeout = timeout - return self - } - } - - @objc public var to: (NMBMatcher) -> Void { - return { matcher in - if let pred = matcher as? NMBPredicate { - self.expectValue.to(from(objcPredicate: pred)) - } else { - self.expectValue.to(ObjCMatcherWrapper(matcher: matcher)) - } - } - } - - @objc public var toWithDescription: (NMBMatcher, String) -> Void { - return { matcher, description in - if let pred = matcher as? NMBPredicate { - self.expectValue.to(from(objcPredicate: pred), description: description) - } else { - self.expectValue.to(ObjCMatcherWrapper(matcher: matcher), description: description) - } - } - } - - @objc public var toNot: (NMBMatcher) -> Void { - return { matcher in - if let pred = matcher as? NMBPredicate { - self.expectValue.toNot(from(objcPredicate: pred)) - } else { - self.expectValue.toNot(ObjCMatcherWrapper(matcher: matcher)) - } - } - } - - @objc public var toNotWithDescription: (NMBMatcher, String) -> Void { - return { matcher, description in - if let pred = matcher as? NMBPredicate { - self.expectValue.toNot(from(objcPredicate: pred), description: description) - } else { - self.expectValue.toNot(ObjCMatcherWrapper(matcher: matcher), description: description) - } - } - } - - @objc public var notTo: (NMBMatcher) -> Void { return toNot } - - @objc public var notToWithDescription: (NMBMatcher, String) -> Void { return toNotWithDescription } - - @objc public var toEventually: (NMBMatcher) -> Void { - return { matcher in - if let pred = matcher as? NMBPredicate { - self.expectValue.toEventually( - from(objcPredicate: pred), - timeout: self._timeout, - description: nil - ) - } else { - self.expectValue.toEventually( - ObjCMatcherWrapper(matcher: matcher), - timeout: self._timeout, - description: nil - ) - } - } - } - - @objc public var toEventuallyWithDescription: (NMBMatcher, String) -> Void { - return { matcher, description in - if let pred = matcher as? NMBPredicate { - self.expectValue.toEventually( - from(objcPredicate: pred), - timeout: self._timeout, - description: description - ) - } else { - self.expectValue.toEventually( - ObjCMatcherWrapper(matcher: matcher), - timeout: self._timeout, - description: description - ) - } - } - } - - @objc public var toEventuallyNot: (NMBMatcher) -> Void { - return { matcher in - if let pred = matcher as? NMBPredicate { - self.expectValue.toEventuallyNot( - from(objcPredicate: pred), - timeout: self._timeout, - description: nil - ) - } else { - self.expectValue.toEventuallyNot( - ObjCMatcherWrapper(matcher: matcher), - timeout: self._timeout, - description: nil - ) - } - } - } - - @objc public var toEventuallyNotWithDescription: (NMBMatcher, String) -> Void { - return { matcher, description in - if let pred = matcher as? NMBPredicate { - self.expectValue.toEventuallyNot( - from(objcPredicate: pred), - timeout: self._timeout, - description: description - ) - } else { - self.expectValue.toEventuallyNot( - ObjCMatcherWrapper(matcher: matcher), - timeout: self._timeout, - description: description - ) - } - } - } - - @objc public var toNotEventually: (NMBMatcher) -> Void { - return toEventuallyNot - } - - @objc public var toNotEventuallyWithDescription: (NMBMatcher, String) -> Void { - return toEventuallyNotWithDescription - } - - @objc public class func failWithMessage(_ message: String, file: FileString, line: UInt) { - fail(message, location: SourceLocation(file: file, line: line)) - } -} - -#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Adapters/NMBObjCMatcher.swift b/Example/Pods/Nimble/Sources/Nimble/Adapters/NMBObjCMatcher.swift deleted file mode 100644 index a91efe33..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Adapters/NMBObjCMatcher.swift +++ /dev/null @@ -1,95 +0,0 @@ -import Foundation - -#if canImport(Darwin) - -// swiftlint:disable line_length -public typealias MatcherBlock = (_ actualExpression: Expression, _ failureMessage: FailureMessage) throws -> Bool -public typealias FullMatcherBlock = (_ actualExpression: Expression, _ failureMessage: FailureMessage, _ shouldNotMatch: Bool) throws -> Bool -// swiftlint:enable line_length - -public class NMBObjCMatcher: NSObject, NMBMatcher { - // swiftlint:disable identifier_name - let _match: MatcherBlock - let _doesNotMatch: MatcherBlock - // swiftlint:enable identifier_name - let canMatchNil: Bool - - public init(canMatchNil: Bool, matcher: @escaping MatcherBlock, notMatcher: @escaping MatcherBlock) { - self.canMatchNil = canMatchNil - self._match = matcher - self._doesNotMatch = notMatcher - } - - public convenience init(matcher: @escaping MatcherBlock) { - self.init(canMatchNil: true, matcher: matcher) - } - - public convenience init(canMatchNil: Bool, matcher: @escaping MatcherBlock) { - self.init(canMatchNil: canMatchNil, matcher: matcher, notMatcher: ({ actualExpression, failureMessage in - return try !matcher(actualExpression, failureMessage) - })) - } - - public convenience init(matcher: @escaping FullMatcherBlock) { - self.init(canMatchNil: true, matcher: matcher) - } - - public convenience init(canMatchNil: Bool, matcher: @escaping FullMatcherBlock) { - self.init(canMatchNil: canMatchNil, matcher: ({ actualExpression, failureMessage in - return try matcher(actualExpression, failureMessage, false) - }), notMatcher: ({ actualExpression, failureMessage in - return try matcher(actualExpression, failureMessage, true) - })) - } - - private func canMatch(_ actualExpression: Expression, failureMessage: FailureMessage) -> Bool { - do { - if !canMatchNil { - if try actualExpression.evaluate() == nil { - failureMessage.postfixActual = " (use beNil() to match nils)" - return false - } - } - } catch let error { - failureMessage.actualValue = "an unexpected error thrown: \(error)" - return false - } - return true - } - - public func matches(_ actualBlock: @escaping () -> NSObject?, failureMessage: FailureMessage, location: SourceLocation) -> Bool { - let expr = Expression(expression: actualBlock, location: location) - let result: Bool - do { - result = try _match(expr, failureMessage) - } catch let error { - failureMessage.stringValue = "unexpected error thrown: <\(error)>" - return false - } - - if self.canMatch(Expression(expression: actualBlock, location: location), failureMessage: failureMessage) { - return result - } else { - return false - } - } - - public func doesNotMatch(_ actualBlock: @escaping () -> NSObject?, failureMessage: FailureMessage, location: SourceLocation) -> Bool { - let expr = Expression(expression: actualBlock, location: location) - let result: Bool - do { - result = try _doesNotMatch(expr, failureMessage) - } catch let error { - failureMessage.stringValue = "unexpected error thrown: <\(error)>" - return false - } - - if self.canMatch(Expression(expression: actualBlock, location: location), failureMessage: failureMessage) { - return result - } else { - return false - } - } -} - -#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Adapters/NimbleEnvironment.swift b/Example/Pods/Nimble/Sources/Nimble/Adapters/NimbleEnvironment.swift deleted file mode 100644 index 1b2e8c0b..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Adapters/NimbleEnvironment.swift +++ /dev/null @@ -1,43 +0,0 @@ -import Dispatch -import Foundation - -/// "Global" state of Nimble is stored here. Only DSL functions should access / be aware of this -/// class' existence -internal class NimbleEnvironment: NSObject { - static var activeInstance: NimbleEnvironment { - get { - let env = Thread.current.threadDictionary["NimbleEnvironment"] - if let env = env as? NimbleEnvironment { - return env - } else { - let newEnv = NimbleEnvironment() - self.activeInstance = newEnv - return newEnv - } - } - set { - Thread.current.threadDictionary["NimbleEnvironment"] = newValue - } - } - - // swiftlint:disable:next todo - // TODO: eventually migrate the global to this environment value - var assertionHandler: AssertionHandler { - get { return NimbleAssertionHandler } - set { NimbleAssertionHandler = newValue } - } - - var suppressTVOSAssertionWarning: Bool = false - var awaiter: Awaiter - - override init() { - let timeoutQueue = DispatchQueue.global(qos: .userInitiated) - awaiter = Awaiter( - waitLock: AssertionWaitLock(), - asyncQueue: .main, - timeoutQueue: timeoutQueue - ) - - super.init() - } -} diff --git a/Example/Pods/Nimble/Sources/Nimble/Adapters/NimbleXCTestHandler.swift b/Example/Pods/Nimble/Sources/Nimble/Adapters/NimbleXCTestHandler.swift deleted file mode 100644 index cd3b4760..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Adapters/NimbleXCTestHandler.swift +++ /dev/null @@ -1,91 +0,0 @@ -import Foundation -import XCTest - -/// Default handler for Nimble. This assertion handler passes failures along to -/// XCTest. -public class NimbleXCTestHandler: AssertionHandler { - public func assert(_ assertion: Bool, message: FailureMessage, location: SourceLocation) { - if !assertion { - recordFailure("\(message.stringValue)\n", location: location) - } - } -} - -/// Alternative handler for Nimble. This assertion handler passes failures along -/// to XCTest by attempting to reduce the failure message size. -public class NimbleShortXCTestHandler: AssertionHandler { - public func assert(_ assertion: Bool, message: FailureMessage, location: SourceLocation) { - if !assertion { - let msg: String - if let actual = message.actualValue { - msg = "got: \(actual) \(message.postfixActual)" - } else { - msg = "expected \(message.to) \(message.postfixMessage)" - } - recordFailure("\(msg)\n", location: location) - } - } -} - -/// Fallback handler in case XCTest is unavailable. This assertion handler will abort -/// the program if it is invoked. -class NimbleXCTestUnavailableHandler: AssertionHandler { - func assert(_ assertion: Bool, message: FailureMessage, location: SourceLocation) { - fatalError("XCTest is not available and no custom assertion handler was configured. Aborting.") - } -} - -#if !SWIFT_PACKAGE -/// Helper class providing access to the currently executing XCTestCase instance, if any -@objc final internal class CurrentTestCaseTracker: NSObject, XCTestObservation { - @objc static let sharedInstance = CurrentTestCaseTracker() - - private(set) var currentTestCase: XCTestCase? - - private var stashed_swift_reportFatalErrorsToDebugger: Bool = false - - @objc func testCaseWillStart(_ testCase: XCTestCase) { - #if swift(>=3.2) && !os(tvOS) - stashed_swift_reportFatalErrorsToDebugger = _swift_reportFatalErrorsToDebugger - _swift_reportFatalErrorsToDebugger = false - #endif - - currentTestCase = testCase - } - - @objc func testCaseDidFinish(_ testCase: XCTestCase) { - currentTestCase = nil - - #if swift(>=3.2) && !os(tvOS) - _swift_reportFatalErrorsToDebugger = stashed_swift_reportFatalErrorsToDebugger - #endif - } -} -#endif - -func isXCTestAvailable() -> Bool { -#if canImport(Darwin) - // XCTest is weakly linked and so may not be present - return NSClassFromString("XCTestCase") != nil -#else - return true -#endif -} - -public func recordFailure(_ message: String, location: SourceLocation) { -#if SWIFT_PACKAGE - XCTFail("\(message)", file: location.file, line: location.line) -#else - if let testCase = CurrentTestCaseTracker.sharedInstance.currentTestCase { - let line = Int(location.line) - testCase.recordFailure(withDescription: message, inFile: location.file, atLine: line, expected: true) - } else { - let msg = """ - Attempted to report a test failure to XCTest while no test case was running. The failure was: - \"\(message)\" - It occurred at: \(location.file):\(location.line) - """ - NSException(name: .internalInconsistencyException, reason: msg, userInfo: nil).raise() - } -#endif -} diff --git a/Example/Pods/Nimble/Sources/Nimble/DSL+Wait.swift b/Example/Pods/Nimble/Sources/Nimble/DSL+Wait.swift deleted file mode 100644 index c049417a..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/DSL+Wait.swift +++ /dev/null @@ -1,122 +0,0 @@ -import Dispatch -import Foundation - -private enum ErrorResult { - case exception(NSException) - case error(Error) - case none -} - -/// Only classes, protocols, methods, properties, and subscript declarations can be -/// bridges to Objective-C via the @objc keyword. This class encapsulates callback-style -/// asynchronous waiting logic so that it may be called from Objective-C and Swift. -internal class NMBWait: NSObject { -// About these kind of lines, `@objc` attributes are only required for Objective-C -// support, so that should be conditional on Darwin platforms and normal Xcode builds -// (non-SwiftPM builds). -#if canImport(Darwin) && !SWIFT_PACKAGE - @objc - internal class func until( - timeout: TimeInterval, - file: FileString = #file, - line: UInt = #line, - action: @escaping (@escaping () -> Void) -> Void) { - return throwableUntil(timeout: timeout, file: file, line: line) { done in - action(done) - } - } -#else - internal class func until( - timeout: TimeInterval, - file: FileString = #file, - line: UInt = #line, - action: @escaping (@escaping () -> Void) -> Void) { - return throwableUntil(timeout: timeout, file: file, line: line) { done in - action(done) - } - } -#endif - - // Using a throwable closure makes this method not objc compatible. - internal class func throwableUntil( - timeout: TimeInterval, - file: FileString = #file, - line: UInt = #line, - action: @escaping (@escaping () -> Void) throws -> Void) { - let awaiter = NimbleEnvironment.activeInstance.awaiter - let leeway = timeout / 2.0 - // swiftlint:disable:next line_length - let result = awaiter.performBlock(file: file, line: line) { (done: @escaping (ErrorResult) -> Void) throws -> Void in - DispatchQueue.main.async { - let capture = NMBExceptionCapture( - handler: ({ exception in - done(.exception(exception)) - }), - finally: ({ }) - ) - capture.tryBlock { - do { - try action { - done(.none) - } - } catch let e { - done(.error(e)) - } - } - } - }.timeout(timeout, forcefullyAbortTimeout: leeway).wait("waitUntil(...)", file: file, line: line) - - switch result { - case .incomplete: internalError("Reached .incomplete state for waitUntil(...).") - case .blockedRunLoop: - fail(blockedRunLoopErrorMessageFor("-waitUntil()", leeway: leeway), - file: file, line: line) - case .timedOut: - let pluralize = (timeout == 1 ? "" : "s") - fail("Waited more than \(timeout) second\(pluralize)", file: file, line: line) - case let .raisedException(exception): - fail("Unexpected exception raised: \(exception)") - case let .errorThrown(error): - fail("Unexpected error thrown: \(error)") - case .completed(.exception(let exception)): - fail("Unexpected exception raised: \(exception)") - case .completed(.error(let error)): - fail("Unexpected error thrown: \(error)") - case .completed(.none): // success - break - } - } - -#if canImport(Darwin) && !SWIFT_PACKAGE - @objc(untilFile:line:action:) - internal class func until( - _ file: FileString = #file, - line: UInt = #line, - action: @escaping (@escaping () -> Void) -> Void) { - until(timeout: 1, file: file, line: line, action: action) - } -#else - internal class func until( - _ file: FileString = #file, - line: UInt = #line, - action: @escaping (@escaping () -> Void) -> Void) { - until(timeout: 1, file: file, line: line, action: action) - } -#endif -} - -internal func blockedRunLoopErrorMessageFor(_ fnName: String, leeway: TimeInterval) -> String { - // swiftlint:disable:next line_length - return "\(fnName) timed out but was unable to run the timeout handler because the main thread is unresponsive (\(leeway) seconds is allow after the wait times out). Conditions that may cause this include processing blocking IO on the main thread, calls to sleep(), deadlocks, and synchronous IPC. Nimble forcefully stopped run loop which may cause future failures in test run." -} - -/// Wait asynchronously until the done closure is called or the timeout has been reached. -/// -/// @discussion -/// Call the done() closure to indicate the waiting has completed. -/// -/// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function -/// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. -public func waitUntil(timeout: TimeInterval = AsyncDefaults.Timeout, file: FileString = #file, line: UInt = #line, action: @escaping (@escaping () -> Void) -> Void) { - NMBWait.until(timeout: timeout, file: file, line: line, action: action) -} diff --git a/Example/Pods/Nimble/Sources/Nimble/DSL.swift b/Example/Pods/Nimble/Sources/Nimble/DSL.swift deleted file mode 100644 index d6dc9cc4..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/DSL.swift +++ /dev/null @@ -1,68 +0,0 @@ -import Foundation - -/// Make an expectation on a given actual value. The value given is lazily evaluated. -public func expect(_ expression: @autoclosure @escaping () throws -> T?, file: FileString = #file, line: UInt = #line) -> Expectation { - return Expectation( - expression: Expression( - expression: expression, - location: SourceLocation(file: file, line: line), - isClosure: true)) -} - -/// Make an expectation on a given actual value. The closure is lazily invoked. -public func expect(_ file: FileString = #file, line: UInt = #line, expression: @escaping () throws -> T?) -> Expectation { - return Expectation( - expression: Expression( - expression: expression, - location: SourceLocation(file: file, line: line), - isClosure: true)) -} - -/// Always fails the test with a message and a specified location. -public func fail(_ message: String, location: SourceLocation) { - let handler = NimbleEnvironment.activeInstance.assertionHandler - handler.assert(false, message: FailureMessage(stringValue: message), location: location) -} - -/// Always fails the test with a message. -public func fail(_ message: String, file: FileString = #file, line: UInt = #line) { - fail(message, location: SourceLocation(file: file, line: line)) -} - -/// Always fails the test. -public func fail(_ file: FileString = #file, line: UInt = #line) { - fail("fail() always fails", file: file, line: line) -} - -/// Like Swift's precondition(), but raises NSExceptions instead of sigaborts -internal func nimblePrecondition( - _ expr: @autoclosure() -> Bool, - _ name: @autoclosure() -> String, - _ message: @autoclosure() -> String, - file: StaticString = #file, - line: UInt = #line) { - let result = expr() - if !result { -#if canImport(Darwin) - let exception = NSException( - name: NSExceptionName(name()), - reason: message(), - userInfo: nil - ) - exception.raise() -#else - preconditionFailure("\(name()) - \(message())", file: file, line: line) -#endif - } -} - -internal func internalError(_ msg: String, file: FileString = #file, line: UInt = #line) -> Never { - // swiftlint:disable line_length - fatalError( - """ - Nimble Bug Found: \(msg) at \(file):\(line). - Please file a bug to Nimble: https://github.com/Quick/Nimble/issues with the code snippet that caused this error. - """ - ) - // swiftlint:enable line_length -} diff --git a/Example/Pods/Nimble/Sources/Nimble/Expectation.swift b/Example/Pods/Nimble/Sources/Nimble/Expectation.swift deleted file mode 100644 index 41625a12..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Expectation.swift +++ /dev/null @@ -1,125 +0,0 @@ -import Foundation - -// Deprecated -internal func expressionDoesNotMatch(_ expression: Expression, matcher: U, toNot: String, description: String?) -> (Bool, FailureMessage) - where U: Matcher, U.ValueType == T { - let msg = FailureMessage() - msg.userDescription = description - msg.to = toNot - do { - let pass = try matcher.doesNotMatch(expression, failureMessage: msg) - if msg.actualValue == "" { - msg.actualValue = "<\(stringify(try expression.evaluate()))>" - } - return (pass, msg) - } catch let error { - msg.stringValue = "unexpected error thrown: <\(error)>" - return (false, msg) - } -} - -internal func execute(_ expression: Expression, _ style: ExpectationStyle, _ predicate: Predicate, to: String, description: String?, captureExceptions: Bool = true) -> (Bool, FailureMessage) { - func run() -> (Bool, FailureMessage) { - let msg = FailureMessage() - msg.userDescription = description - msg.to = to - do { - let result = try predicate.satisfies(expression) - result.message.update(failureMessage: msg) - if msg.actualValue == "" { - msg.actualValue = "<\(stringify(try expression.evaluate()))>" - } - return (result.toBoolean(expectation: style), msg) - } catch let error { - msg.stringValue = "unexpected error thrown: <\(error)>" - return (false, msg) - } - } - - var result: (Bool, FailureMessage) = (false, FailureMessage()) - if captureExceptions { - let capture = NMBExceptionCapture(handler: ({ exception -> Void in - let msg = FailureMessage() - msg.stringValue = "unexpected exception raised: \(exception)" - result = (false, msg) - }), finally: nil) - capture.tryBlock { - result = run() - } - } else { - result = run() - } - - return result -} - -public struct Expectation { - - public let expression: Expression - - public init(expression: Expression) { - self.expression = expression - } - - public func verify(_ pass: Bool, _ message: FailureMessage) { - let handler = NimbleEnvironment.activeInstance.assertionHandler - handler.assert(pass, message: message, location: expression.location) - } - - ////////////////// OLD API ///////////////////// - - /// DEPRECATED: Tests the actual value using a matcher to match. - public func to(_ matcher: U, description: String? = nil) - where U: Matcher, U.ValueType == T { - let (pass, msg) = execute( - expression, - .toMatch, - matcher.predicate, - to: "to", - description: description, - captureExceptions: false - ) - verify(pass, msg) - } - - /// DEPRECATED: Tests the actual value using a matcher to not match. - public func toNot(_ matcher: U, description: String? = nil) - where U: Matcher, U.ValueType == T { - // swiftlint:disable:next line_length - let (pass, msg) = expressionDoesNotMatch(expression, matcher: matcher, toNot: "to not", description: description) - verify(pass, msg) - } - - /// DEPRECATED: Tests the actual value using a matcher to not match. - /// - /// Alias to toNot(). - public func notTo(_ matcher: U, description: String? = nil) - where U: Matcher, U.ValueType == T { - toNot(matcher, description: description) - } - - ////////////////// NEW API ///////////////////// - - /// Tests the actual value using a matcher to match. - public func to(_ predicate: Predicate, description: String? = nil) { - let (pass, msg) = execute(expression, .toMatch, predicate, to: "to", description: description) - verify(pass, msg) - } - - /// Tests the actual value using a matcher to not match. - public func toNot(_ predicate: Predicate, description: String? = nil) { - let (pass, msg) = execute(expression, .toNotMatch, predicate, to: "to not", description: description) - verify(pass, msg) - } - - /// Tests the actual value using a matcher to not match. - /// - /// Alias to toNot(). - public func notTo(_ predicate: Predicate, description: String? = nil) { - toNot(predicate, description: description) - } - - // see: - // - `async` for extension - // - NMBExpectation for Objective-C interface -} diff --git a/Example/Pods/Nimble/Sources/Nimble/ExpectationMessage.swift b/Example/Pods/Nimble/Sources/Nimble/ExpectationMessage.swift deleted file mode 100644 index b0cbcc32..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/ExpectationMessage.swift +++ /dev/null @@ -1,267 +0,0 @@ -import Foundation - -public indirect enum ExpectationMessage { - // --- Primary Expectations --- - /// includes actual value in output ("expected to , got ") - case expectedActualValueTo(/* message: */ String) - /// uses a custom actual value string in output ("expected to , got ") - case expectedCustomValueTo(/* message: */ String, /* actual: */ String) - /// excludes actual value in output ("expected to ") - case expectedTo(/* message: */ String) - /// allows any free-form message ("") - case fail(/* message: */ String) - - // --- Composite Expectations --- - // Generally, you'll want the methods, appended(message:) and appended(details:) instead. - - /// Not Fully Implemented Yet. - case prepends(/* Prepended Message */ String, ExpectationMessage) - - /// appends after an existing message (" (use beNil() to match nils)") - case appends(ExpectationMessage, /* Appended Message */ String) - - /// provides long-form multi-line explainations ("\n\n") - case details(ExpectationMessage, String) - - internal var sampleMessage: String { - let asStr = toString(actual: "", expected: "expected", to: "to") - let asFailureMessage = FailureMessage() - update(failureMessage: asFailureMessage) - // swiftlint:disable:next line_length - return "(toString(actual:expected:to:) -> \(asStr) || update(failureMessage:) -> \(asFailureMessage.stringValue))" - } - - /// Returns the smallest message after the "expected to" string that summarizes the error. - /// - /// Returns the message part from ExpectationMessage, ignoring all .appends and .details. - public var expectedMessage: String { - switch self { - case let .fail(msg): - return msg - case let .expectedTo(msg): - return msg - case let .expectedActualValueTo(msg): - return msg - case let .expectedCustomValueTo(msg, _): - return msg - case let .prepends(_, expectation): - return expectation.expectedMessage - case let .appends(expectation, msg): - return "\(expectation.expectedMessage)\(msg)" - case let .details(expectation, _): - return expectation.expectedMessage - } - } - - /// Appends a message after the primary expectation message - public func appended(message: String) -> ExpectationMessage { - switch self { - case .fail, .expectedTo, .expectedActualValueTo, .expectedCustomValueTo, .appends, .prepends: - return .appends(self, message) - case let .details(expectation, msg): - return .details(expectation.appended(message: message), msg) - } - } - - /// Appends a message hinting to use beNil() for when the actual value given was nil. - public func appendedBeNilHint() -> ExpectationMessage { - return appended(message: " (use beNil() to match nils)") - } - - /// Appends a detailed (aka - multiline) message after the primary expectation message - /// Detailed messages will be placed after .appended(message:) calls. - public func appended(details: String) -> ExpectationMessage { - return .details(self, details) - } - - internal func visitLeafs(_ f: (ExpectationMessage) -> ExpectationMessage) -> ExpectationMessage { - // swiftlint:disable:previous identifier_name - switch self { - case .fail, .expectedTo, .expectedActualValueTo, .expectedCustomValueTo: - return f(self) - case let .prepends(msg, expectation): - return .prepends(msg, expectation.visitLeafs(f)) - case let .appends(expectation, msg): - return .appends(expectation.visitLeafs(f), msg) - case let .details(expectation, msg): - return .details(expectation.visitLeafs(f), msg) - } - } - - /// Replaces a primary expectation with one returned by f. Preserves all composite expectations - /// that were built upon it (aka - all appended(message:) and appended(details:). - public func replacedExpectation(_ f: @escaping (ExpectationMessage) -> ExpectationMessage) -> ExpectationMessage { - // swiftlint:disable:previous identifier_name - func walk(_ msg: ExpectationMessage) -> ExpectationMessage { - switch msg { - case .fail, .expectedTo, .expectedActualValueTo, .expectedCustomValueTo: - return f(msg) - default: - return msg - } - } - return visitLeafs(walk) - } - - /// Wraps a primary expectation with text before and after it. - /// Alias to prepended(message: before).appended(message: after) - public func wrappedExpectation(before: String, after: String) -> ExpectationMessage { - return prepended(expectation: before).appended(message: after) - } - - /// Prepends a message by modifying the primary expectation - public func prepended(expectation message: String) -> ExpectationMessage { - func walk(_ msg: ExpectationMessage) -> ExpectationMessage { - switch msg { - case let .expectedTo(msg): - return .expectedTo(message + msg) - case let .expectedActualValueTo(msg): - return .expectedActualValueTo(message + msg) - case let .expectedCustomValueTo(msg, actual): - return .expectedCustomValueTo(message + msg, actual) - default: - return msg.visitLeafs(walk) - } - } - return visitLeafs(walk) - } - - // swiftlint:disable:next todo - // TODO: test & verify correct behavior - internal func prepended(message: String) -> ExpectationMessage { - return .prepends(message, self) - } - - /// Converts the tree of ExpectationMessages into a final built string. - public func toString(actual: String, expected: String = "expected", to: String = "to") -> String { - switch self { - case let .fail(msg): - return msg - case let .expectedTo(msg): - return "\(expected) \(to) \(msg)" - case let .expectedActualValueTo(msg): - return "\(expected) \(to) \(msg), got \(actual)" - case let .expectedCustomValueTo(msg, actual): - return "\(expected) \(to) \(msg), got \(actual)" - case let .prepends(msg, expectation): - return "\(msg)\(expectation.toString(actual: actual, expected: expected, to: to))" - case let .appends(expectation, msg): - return "\(expectation.toString(actual: actual, expected: expected, to: to))\(msg)" - case let .details(expectation, msg): - return "\(expectation.toString(actual: actual, expected: expected, to: to))\n\n\(msg)" - } - } - - // Backwards compatibility: converts ExpectationMessage tree to FailureMessage - internal func update(failureMessage: FailureMessage) { - switch self { - case let .fail(msg) where !msg.isEmpty: - failureMessage.stringValue = msg - case .fail: - break - case let .expectedTo(msg): - failureMessage.actualValue = nil - failureMessage.postfixMessage = msg - case let .expectedActualValueTo(msg): - failureMessage.postfixMessage = msg - case let .expectedCustomValueTo(msg, actual): - failureMessage.postfixMessage = msg - failureMessage.actualValue = actual - case let .prepends(msg, expectation): - expectation.update(failureMessage: failureMessage) - if let desc = failureMessage.userDescription { - failureMessage.userDescription = "\(msg)\(desc)" - } else { - failureMessage.userDescription = msg - } - case let .appends(expectation, msg): - expectation.update(failureMessage: failureMessage) - failureMessage.appendMessage(msg) - case let .details(expectation, msg): - expectation.update(failureMessage: failureMessage) - failureMessage.appendDetails(msg) - } - } -} - -extension FailureMessage { - internal func toExpectationMessage() -> ExpectationMessage { - let defaultMessage = FailureMessage() - if expected != defaultMessage.expected || _stringValueOverride != nil { - return .fail(stringValue) - } - - var message: ExpectationMessage = .fail(userDescription ?? "") - if actualValue != "" && actualValue != nil { - message = .expectedCustomValueTo(postfixMessage, actualValue ?? "") - } else if postfixMessage != defaultMessage.postfixMessage { - if actualValue == nil { - message = .expectedTo(postfixMessage) - } else { - message = .expectedActualValueTo(postfixMessage) - } - } - if postfixActual != defaultMessage.postfixActual { - message = .appends(message, postfixActual) - } - if let extended = extendedMessage { - message = .details(message, extended) - } - return message - } -} - -#if canImport(Darwin) - -public class NMBExpectationMessage: NSObject { - private let msg: ExpectationMessage - - internal init(swift msg: ExpectationMessage) { - self.msg = msg - } - - public init(expectedTo message: String) { - self.msg = .expectedTo(message) - } - public init(expectedActualValueTo message: String) { - self.msg = .expectedActualValueTo(message) - } - - public init(expectedActualValueTo message: String, customActualValue actual: String) { - self.msg = .expectedCustomValueTo(message, actual) - } - - public init(fail message: String) { - self.msg = .fail(message) - } - - public init(prepend message: String, child: NMBExpectationMessage) { - self.msg = .prepends(message, child.msg) - } - - public init(appendedMessage message: String, child: NMBExpectationMessage) { - self.msg = .appends(child.msg, message) - } - - public init(prependedMessage message: String, child: NMBExpectationMessage) { - self.msg = .prepends(message, child.msg) - } - - public init(details message: String, child: NMBExpectationMessage) { - self.msg = .details(child.msg, message) - } - - public func appendedBeNilHint() -> NMBExpectationMessage { - return NMBExpectationMessage(swift: msg.appendedBeNilHint()) - } - - public func toSwift() -> ExpectationMessage { return self.msg } -} - -extension ExpectationMessage { - func toObjectiveC() -> NMBExpectationMessage { - return NMBExpectationMessage(swift: self) - } -} - -#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Expression.swift b/Example/Pods/Nimble/Sources/Nimble/Expression.swift deleted file mode 100644 index dcc42e4e..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Expression.swift +++ /dev/null @@ -1,101 +0,0 @@ -import Foundation - -// Memoizes the given closure, only calling the passed -// closure once; even if repeat calls to the returned closure -internal func memoizedClosure(_ closure: @escaping () throws -> T) -> (Bool) throws -> T { - var cache: T? - return { withoutCaching in - if withoutCaching || cache == nil { - cache = try closure() - } - return cache! - } -} - -/// Expression represents the closure of the value inside expect(...). -/// Expressions are memoized by default. This makes them safe to call -/// evaluate() multiple times without causing a re-evaluation of the underlying -/// closure. -/// -/// @warning Since the closure can be any code, Objective-C code may choose -/// to raise an exception. Currently, Expression does not memoize -/// exception raising. -/// -/// This provides a common consumable API for matchers to utilize to allow -/// Nimble to change internals to how the captured closure is managed. -public struct Expression { - // swiftlint:disable identifier_name - internal let _expression: (Bool) throws -> T? - internal let _withoutCaching: Bool - // swiftlint:enable identifier_name - public let location: SourceLocation - public let isClosure: Bool - - /// Creates a new expression struct. Normally, expect(...) will manage this - /// creation process. The expression is memoized. - /// - /// @param expression The closure that produces a given value. - /// @param location The source location that this closure originates from. - /// @param isClosure A bool indicating if the captured expression is a - /// closure or internally produced closure. Some matchers - /// may require closures. For example, toEventually() - /// requires an explicit closure. This gives Nimble - /// flexibility if @autoclosure behavior changes between - /// Swift versions. Nimble internals always sets this true. - public init(expression: @escaping () throws -> T?, location: SourceLocation, isClosure: Bool = true) { - self._expression = memoizedClosure(expression) - self.location = location - self._withoutCaching = false - self.isClosure = isClosure - } - - /// Creates a new expression struct. Normally, expect(...) will manage this - /// creation process. - /// - /// @param expression The closure that produces a given value. - /// @param location The source location that this closure originates from. - /// @param withoutCaching Indicates if the struct should memoize the given - /// closure's result. Subsequent evaluate() calls will - /// not call the given closure if this is true. - /// @param isClosure A bool indicating if the captured expression is a - /// closure or internally produced closure. Some matchers - /// may require closures. For example, toEventually() - /// requires an explicit closure. This gives Nimble - /// flexibility if @autoclosure behavior changes between - /// Swift versions. Nimble internals always sets this true. - public init(memoizedExpression: @escaping (Bool) throws -> T?, location: SourceLocation, withoutCaching: Bool, isClosure: Bool = true) { - self._expression = memoizedExpression - self.location = location - self._withoutCaching = withoutCaching - self.isClosure = isClosure - } - - /// Returns a new Expression from the given expression. Identical to a map() - /// on this type. This should be used only to typecast the Expression's - /// closure value. - /// - /// The returned expression will preserve location and isClosure. - /// - /// @param block The block that can cast the current Expression value to a - /// new type. - public func cast(_ block: @escaping (T?) throws -> U?) -> Expression { - return Expression( - expression: ({ try block(self.evaluate()) }), - location: self.location, - isClosure: self.isClosure - ) - } - - public func evaluate() throws -> T? { - return try self._expression(_withoutCaching) - } - - public func withoutCaching() -> Expression { - return Expression( - memoizedExpression: self._expression, - location: location, - withoutCaching: true, - isClosure: isClosure - ) - } -} diff --git a/Example/Pods/Nimble/Sources/Nimble/FailureMessage.swift b/Example/Pods/Nimble/Sources/Nimble/FailureMessage.swift deleted file mode 100644 index 503b540e..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/FailureMessage.swift +++ /dev/null @@ -1,93 +0,0 @@ -import Foundation - -/// Encapsulates the failure message that matchers can report to the end user. -/// -/// This is shared state between Nimble and matchers that mutate this value. -public class FailureMessage: NSObject { - public var expected: String = "expected" - public var actualValue: String? = "" // empty string -> use default; nil -> exclude - public var to: String = "to" - public var postfixMessage: String = "match" - public var postfixActual: String = "" - /// An optional message that will be appended as a new line and provides additional details - /// about the failure. This message will only be visible in the issue navigator / in logs but - /// not directly in the source editor since only a single line is presented there. - public var extendedMessage: String? - public var userDescription: String? - - public var stringValue: String { - get { - if let value = _stringValueOverride { - return value - } else { - return computeStringValue() - } - } - set { - _stringValueOverride = newValue - } - } - - // swiftlint:disable:next identifier_name - internal var _stringValueOverride: String? - internal var hasOverriddenStringValue: Bool { - return _stringValueOverride != nil - } - - public override init() { - } - - public init(stringValue: String) { - _stringValueOverride = stringValue - } - - internal func stripNewlines(_ str: String) -> String { - let whitespaces = CharacterSet.whitespacesAndNewlines - return str - .components(separatedBy: "\n") - .map { line in line.trimmingCharacters(in: whitespaces) } - .joined(separator: "") - } - - internal func computeStringValue() -> String { - var value = "\(expected) \(to) \(postfixMessage)" - if let actualValue = actualValue { - value = "\(expected) \(to) \(postfixMessage), got \(actualValue)\(postfixActual)" - } - value = stripNewlines(value) - - if let extendedMessage = extendedMessage { - value += "\n\(stripNewlines(extendedMessage))" - } - - if let userDescription = userDescription { - return "\(userDescription)\n\(value)" - } - - return value - } - - internal func appendMessage(_ msg: String) { - if hasOverriddenStringValue { - stringValue += "\(msg)" - } else if actualValue != nil { - postfixActual += msg - } else { - postfixMessage += msg - } - } - - internal func appendDetails(_ msg: String) { - if hasOverriddenStringValue { - if let desc = userDescription { - stringValue = "\(desc)\n\(stringValue)" - } - stringValue += "\n\(msg)" - } else { - if let desc = userDescription { - userDescription = desc - } - extendedMessage = msg - } - } -} diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/AllPass.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/AllPass.swift deleted file mode 100644 index dbbccb9c..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/AllPass.swift +++ /dev/null @@ -1,122 +0,0 @@ -import Foundation - -public func allPass - (_ passFunc: @escaping (T?) throws -> Bool) -> Predicate - where U: Sequence, T == U.Iterator.Element { - let matcher = Predicate.simpleNilable("pass a condition") { actualExpression in - return PredicateStatus(bool: try passFunc(try actualExpression.evaluate())) - } - return createPredicate(matcher) -} - -public func allPass - (_ passName: String, _ passFunc: @escaping (T?) throws -> Bool) -> Predicate - where U: Sequence, T == U.Iterator.Element { - let matcher = Predicate.simpleNilable(passName) { actualExpression in - return PredicateStatus(bool: try passFunc(try actualExpression.evaluate())) - } - return createPredicate(matcher) -} - -public func allPass(_ elementMatcher: M) -> Predicate - where S: Sequence, M: Matcher, S.Iterator.Element == M.ValueType { - return createPredicate(elementMatcher.predicate) -} - -public func allPass(_ elementPredicate: Predicate) -> Predicate - where S: Sequence { - return createPredicate(elementPredicate) -} - -private func createPredicate(_ elementMatcher: Predicate) -> Predicate - where S: Sequence { - return Predicate { actualExpression in - guard let actualValue = try actualExpression.evaluate() else { - return PredicateResult( - status: .fail, - message: .appends(.expectedTo("all pass"), " (use beNil() to match nils)") - ) - } - - var failure: ExpectationMessage = .expectedTo("all pass") - for currentElement in actualValue { - let exp = Expression( - expression: {currentElement}, location: actualExpression.location) - let predicateResult = try elementMatcher.satisfies(exp) - if predicateResult.status == .matches { - failure = predicateResult.message.prepended(expectation: "all ") - } else { - failure = predicateResult.message - .replacedExpectation({ .expectedTo($0.expectedMessage) }) - .wrappedExpectation( - before: "all ", - after: ", but failed first at element <\(stringify(currentElement))>" - + " in <\(stringify(actualValue))>" - ) - return PredicateResult(status: .doesNotMatch, message: failure) - } - } - failure = failure.replacedExpectation({ expectation in - return .expectedTo(expectation.expectedMessage) - }) - return PredicateResult(status: .matches, message: failure) - } -} - -#if canImport(Darwin) -extension NMBObjCMatcher { - @objc public class func allPassMatcher(_ matcher: NMBMatcher) -> NMBPredicate { - return NMBPredicate { actualExpression in - let location = actualExpression.location - let actualValue = try actualExpression.evaluate() - var nsObjects = [NSObject]() - - var collectionIsUsable = true - if let value = actualValue as? NSFastEnumeration { - var generator = NSFastEnumerationIterator(value) - while let obj = generator.next() { - if let nsObject = obj as? NSObject { - nsObjects.append(nsObject) - } else { - collectionIsUsable = false - break - } - } - } else { - collectionIsUsable = false - } - - if !collectionIsUsable { - return NMBPredicateResult( - status: NMBPredicateStatus.fail, - message: NMBExpectationMessage( - // swiftlint:disable:next line_length - fail: "allPass can only be used with types which implement NSFastEnumeration (NSArray, NSSet, ...), and whose elements subclass NSObject, got <\(actualValue?.description ?? "nil")>" - ) - ) - } - - let expr = Expression(expression: ({ nsObjects }), location: location) - let pred: Predicate<[NSObject]> = createPredicate(Predicate { expr in - if let predicate = matcher as? NMBPredicate { - return predicate.satisfies(({ try expr.evaluate() }), location: expr.location).toSwift() - } else { - let failureMessage = FailureMessage() - let result = matcher.matches( - // swiftlint:disable:next force_try - ({ try! expr.evaluate() }), - failureMessage: failureMessage, - location: expr.location - ) - let expectationMsg = failureMessage.toExpectationMessage() - return PredicateResult( - bool: result, - message: expectationMsg - ) - } - }) - return try pred.satisfies(expr).toObjectiveC() - } - } -} -#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/Async.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/Async.swift deleted file mode 100644 index 5022fe21..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/Async.swift +++ /dev/null @@ -1,181 +0,0 @@ -import Foundation - -/// If you are running on a slower machine, it could be useful to increase the default timeout value -/// or slow down poll interval. Default timeout interval is 1, and poll interval is 0.01. -public struct AsyncDefaults { - public static var Timeout: TimeInterval = 1 - public static var PollInterval: TimeInterval = 0.01 -} - -private func async(style: ExpectationStyle, predicate: Predicate, timeout: TimeInterval, poll: TimeInterval, fnName: String) -> Predicate { - return Predicate { actualExpression in - let uncachedExpression = actualExpression.withoutCaching() - let fnName = "expect(...).\(fnName)(...)" - var lastPredicateResult: PredicateResult? - let result = pollBlock( - pollInterval: poll, - timeoutInterval: timeout, - file: actualExpression.location.file, - line: actualExpression.location.line, - fnName: fnName) { - lastPredicateResult = try predicate.satisfies(uncachedExpression) - return lastPredicateResult!.toBoolean(expectation: style) - } - switch result { - case .completed: return lastPredicateResult! - case .timedOut: - let message = lastPredicateResult?.message ?? .fail("timed out before returning a value") - return PredicateResult(status: .fail, message: message) - case let .errorThrown(error): - return PredicateResult(status: .fail, message: .fail("unexpected error thrown: <\(error)>")) - case let .raisedException(exception): - return PredicateResult(status: .fail, message: .fail("unexpected exception raised: \(exception)")) - case .blockedRunLoop: - // swiftlint:disable:next line_length - let message = lastPredicateResult?.message.appended(message: " (timed out, but main run loop was unresponsive).") ?? - .fail("main run loop was unresponsive") - return PredicateResult(status: .fail, message: message) - case .incomplete: - internalError("Reached .incomplete state for \(fnName)(...).") - } - } -} - -private let toEventuallyRequiresClosureError = FailureMessage( - stringValue: """ - expect(...).toEventually(...) requires an explicit closure (eg - expect { ... }.toEventually(...) ) - Swift 1.2 @autoclosure behavior has changed in an incompatible way for Nimble to function - """ -) - -extension Expectation { - /// Tests the actual value using a matcher to match by checking continuously - /// at each pollInterval until the timeout is reached. - /// - /// @discussion - /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function - /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. - public func toEventually(_ predicate: Predicate, timeout: TimeInterval = AsyncDefaults.Timeout, pollInterval: TimeInterval = AsyncDefaults.PollInterval, description: String? = nil) { - nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) - - let (pass, msg) = execute( - expression, - .toMatch, - async(style: .toMatch, predicate: predicate, timeout: timeout, poll: pollInterval, fnName: "toEventually"), - to: "to eventually", - description: description, - captureExceptions: false - ) - verify(pass, msg) - } - - /// Tests the actual value using a matcher to not match by checking - /// continuously at each pollInterval until the timeout is reached. - /// - /// @discussion - /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function - /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. - public func toEventuallyNot(_ predicate: Predicate, timeout: TimeInterval = AsyncDefaults.Timeout, pollInterval: TimeInterval = AsyncDefaults.PollInterval, description: String? = nil) { - nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) - - let (pass, msg) = execute( - expression, - .toNotMatch, - async( - style: .toNotMatch, - predicate: predicate, - timeout: timeout, - poll: pollInterval, - fnName: "toEventuallyNot" - ), - to: "to eventually not", - description: description, - captureExceptions: false - ) - verify(pass, msg) - } - - /// Tests the actual value using a matcher to not match by checking - /// continuously at each pollInterval until the timeout is reached. - /// - /// Alias of toEventuallyNot() - /// - /// @discussion - /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function - /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. - public func toNotEventually(_ predicate: Predicate, timeout: TimeInterval = AsyncDefaults.Timeout, pollInterval: TimeInterval = AsyncDefaults.PollInterval, description: String? = nil) { - return toEventuallyNot(predicate, timeout: timeout, pollInterval: pollInterval, description: description) - } -} - -// Deprecated -extension Expectation { - /// Tests the actual value using a matcher to match by checking continuously - /// at each pollInterval until the timeout is reached. - /// - /// @discussion - /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function - /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. - public func toEventually(_ matcher: U, timeout: TimeInterval = AsyncDefaults.Timeout, pollInterval: TimeInterval = AsyncDefaults.PollInterval, description: String? = nil) - where U: Matcher, U.ValueType == T { - if expression.isClosure { - let (pass, msg) = execute( - expression, - .toMatch, - async( - style: .toMatch, - predicate: matcher.predicate, - timeout: timeout, - poll: pollInterval, - fnName: "toEventually" - ), - to: "to eventually", - description: description, - captureExceptions: false - ) - verify(pass, msg) - } else { - verify(false, toEventuallyRequiresClosureError) - } - } - - /// Tests the actual value using a matcher to not match by checking - /// continuously at each pollInterval until the timeout is reached. - /// - /// @discussion - /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function - /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. - public func toEventuallyNot(_ matcher: U, timeout: TimeInterval = AsyncDefaults.Timeout, pollInterval: TimeInterval = AsyncDefaults.PollInterval, description: String? = nil) - where U: Matcher, U.ValueType == T { - if expression.isClosure { - let (pass, msg) = expressionDoesNotMatch( - expression, - matcher: async( - style: .toNotMatch, - predicate: matcher.predicate, - timeout: timeout, - poll: pollInterval, - fnName: "toEventuallyNot" - ), - toNot: "to eventually not", - description: description - ) - verify(pass, msg) - } else { - verify(false, toEventuallyRequiresClosureError) - } - } - - /// Tests the actual value using a matcher to not match by checking - /// continuously at each pollInterval until the timeout is reached. - /// - /// Alias of toEventuallyNot() - /// - /// @discussion - /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function - /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. - public func toNotEventually(_ matcher: U, timeout: TimeInterval = AsyncDefaults.Timeout, pollInterval: TimeInterval = AsyncDefaults.PollInterval, description: String? = nil) - where U: Matcher, U.ValueType == T { - return toEventuallyNot(matcher, timeout: timeout, pollInterval: pollInterval, description: description) - } -} diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeAKindOf.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeAKindOf.swift deleted file mode 100644 index 3a68b09c..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeAKindOf.swift +++ /dev/null @@ -1,68 +0,0 @@ -import Foundation - -private func matcherMessage(forType expectedType: T.Type) -> String { - return "be a kind of \(String(describing: expectedType))" -} -private func matcherMessage(forClass expectedClass: AnyClass) -> String { - return "be a kind of \(String(describing: expectedClass))" -} - -/// A Nimble matcher that succeeds when the actual value is an instance of the given class. -public func beAKindOf(_ expectedType: T.Type) -> Predicate { - return Predicate.define { actualExpression in - let message: ExpectationMessage - - let instance = try actualExpression.evaluate() - guard let validInstance = instance else { - message = .expectedCustomValueTo(matcherMessage(forType: expectedType), "") - return PredicateResult(status: .fail, message: message) - } - message = .expectedCustomValueTo( - "be a kind of \(String(describing: expectedType))", - "<\(String(describing: type(of: validInstance))) instance>" - ) - - return PredicateResult( - bool: validInstance is T, - message: message - ) - } -} - -#if canImport(Darwin) - -/// A Nimble matcher that succeeds when the actual value is an instance of the given class. -/// @see beAnInstanceOf if you want to match against the exact class -public func beAKindOf(_ expectedClass: AnyClass) -> Predicate { - return Predicate.define { actualExpression in - let message: ExpectationMessage - let status: PredicateStatus - - let instance = try actualExpression.evaluate() - if let validInstance = instance { - status = PredicateStatus(bool: instance != nil && instance!.isKind(of: expectedClass)) - message = .expectedCustomValueTo( - matcherMessage(forClass: expectedClass), - "<\(String(describing: type(of: validInstance))) instance>" - ) - } else { - status = .fail - message = .expectedCustomValueTo( - matcherMessage(forClass: expectedClass), - "" - ) - } - - return PredicateResult(status: status, message: message) - } -} - -extension NMBObjCMatcher { - @objc public class func beAKindOfMatcher(_ expected: AnyClass) -> NMBMatcher { - return NMBPredicate { actualExpression in - return try beAKindOf(expected).satisfies(actualExpression).toObjectiveC() - } - } -} - -#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeAnInstanceOf.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeAnInstanceOf.swift deleted file mode 100644 index 3cef3a7b..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeAnInstanceOf.swift +++ /dev/null @@ -1,56 +0,0 @@ -import Foundation - -/// A Nimble matcher that succeeds when the actual value is an _exact_ instance of the given class. -public func beAnInstanceOf(_ expectedType: T.Type) -> Predicate { - let errorMessage = "be an instance of \(String(describing: expectedType))" - return Predicate.define { actualExpression in - let instance = try actualExpression.evaluate() - guard let validInstance = instance else { - return PredicateResult( - status: .doesNotMatch, - message: .expectedActualValueTo(errorMessage) - ) - } - - let actualString = "<\(String(describing: type(of: validInstance))) instance>" - - return PredicateResult( - status: PredicateStatus(bool: type(of: validInstance) == expectedType), - message: .expectedCustomValueTo(errorMessage, actualString) - ) - } -} - -/// A Nimble matcher that succeeds when the actual value is an instance of the given class. -/// @see beAKindOf if you want to match against subclasses -public func beAnInstanceOf(_ expectedClass: AnyClass) -> Predicate { - let errorMessage = "be an instance of \(String(describing: expectedClass))" - return Predicate.define { actualExpression in - let instance = try actualExpression.evaluate() - let actualString: String - if let validInstance = instance { - actualString = "<\(String(describing: type(of: validInstance))) instance>" - } else { - actualString = "" - } - #if canImport(Darwin) - let matches = instance != nil && instance!.isMember(of: expectedClass) - #else - let matches = instance != nil && type(of: instance!) == expectedClass - #endif - return PredicateResult( - status: PredicateStatus(bool: matches), - message: .expectedCustomValueTo(errorMessage, actualString) - ) - } -} - -#if canImport(Darwin) -extension NMBObjCMatcher { - @objc public class func beAnInstanceOfMatcher(_ expected: AnyClass) -> NMBMatcher { - return NMBPredicate { actualExpression in - return try beAnInstanceOf(expected).satisfies(actualExpression).toObjectiveC() - } - } -} -#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeCloseTo.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeCloseTo.swift deleted file mode 100644 index 4396180a..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeCloseTo.swift +++ /dev/null @@ -1,149 +0,0 @@ -import Foundation - -// swiftlint:disable:next identifier_name -public let DefaultDelta = 0.0001 - -internal func isCloseTo(_ actualValue: NMBDoubleConvertible?, - expectedValue: NMBDoubleConvertible, - delta: Double) - -> PredicateResult { - let errorMessage = "be close to <\(stringify(expectedValue))> (within \(stringify(delta)))" - return PredicateResult( - bool: actualValue != nil && - abs(actualValue!.doubleValue - expectedValue.doubleValue) < delta, - message: .expectedCustomValueTo(errorMessage, "<\(stringify(actualValue))>") - ) -} - -/// A Nimble matcher that succeeds when a value is close to another. This is used for floating -/// point values which can have imprecise results when doing arithmetic on them. -/// -/// @see equal -public func beCloseTo(_ expectedValue: Double, within delta: Double = DefaultDelta) -> Predicate { - return Predicate.define { actualExpression in - return isCloseTo(try actualExpression.evaluate(), expectedValue: expectedValue, delta: delta) - } -} - -/// A Nimble matcher that succeeds when a value is close to another. This is used for floating -/// point values which can have imprecise results when doing arithmetic on them. -/// -/// @see equal -public func beCloseTo(_ expectedValue: NMBDoubleConvertible, within delta: Double = DefaultDelta) -> Predicate { - return Predicate.define { actualExpression in - return isCloseTo(try actualExpression.evaluate(), expectedValue: expectedValue, delta: delta) - } -} - -#if canImport(Darwin) -public class NMBObjCBeCloseToMatcher: NSObject, NMBMatcher { - // swiftlint:disable identifier_name - var _expected: NSNumber - var _delta: CDouble - // swiftlint:enable identifier_name - init(expected: NSNumber, within: CDouble) { - _expected = expected - _delta = within - } - - @objc public func matches(_ actualExpression: @escaping () -> NSObject?, failureMessage: FailureMessage, location: SourceLocation) -> Bool { - let actualBlock: () -> NMBDoubleConvertible? = ({ - return actualExpression() as? NMBDoubleConvertible - }) - let expr = Expression(expression: actualBlock, location: location) - let predicate = beCloseTo(self._expected, within: self._delta) - - do { - let result = try predicate.satisfies(expr) - result.message.update(failureMessage: failureMessage) - return result.toBoolean(expectation: .toMatch) - } catch let error { - failureMessage.stringValue = "unexpected error thrown: <\(error)>" - return false - } - } - - @objc public func doesNotMatch(_ actualExpression: @escaping () -> NSObject?, failureMessage: FailureMessage, location: SourceLocation) -> Bool { - let actualBlock: () -> NMBDoubleConvertible? = ({ - return actualExpression() as? NMBDoubleConvertible - }) - let expr = Expression(expression: actualBlock, location: location) - let predicate = beCloseTo(self._expected, within: self._delta) - - do { - let result = try predicate.satisfies(expr) - result.message.update(failureMessage: failureMessage) - return result.toBoolean(expectation: .toNotMatch) - } catch let error { - failureMessage.stringValue = "unexpected error thrown: <\(error)>" - return false - } - } - - @objc public var within: (CDouble) -> NMBObjCBeCloseToMatcher { - return { delta in - return NMBObjCBeCloseToMatcher(expected: self._expected, within: delta) - } - } -} - -extension NMBObjCMatcher { - @objc public class func beCloseToMatcher(_ expected: NSNumber, within: CDouble) -> NMBObjCBeCloseToMatcher { - return NMBObjCBeCloseToMatcher(expected: expected, within: within) - } -} -#endif - -public func beCloseTo(_ expectedValues: [Double], within delta: Double = DefaultDelta) -> Predicate<[Double]> { - let errorMessage = "be close to <\(stringify(expectedValues))> (each within \(stringify(delta)))" - return Predicate.simple(errorMessage) { actualExpression in - if let actual = try actualExpression.evaluate() { - if actual.count != expectedValues.count { - return .doesNotMatch - } else { - for (index, actualItem) in actual.enumerated() { - if fabs(actualItem - expectedValues[index]) > delta { - return .doesNotMatch - } - } - return .matches - } - } - return .doesNotMatch - } -} - -// MARK: - Operators - -infix operator ≈ : ComparisonPrecedence - -// swiftlint:disable:next identifier_name -public func ≈(lhs: Expectation<[Double]>, rhs: [Double]) { - lhs.to(beCloseTo(rhs)) -} - -// swiftlint:disable:next identifier_name -public func ≈(lhs: Expectation, rhs: NMBDoubleConvertible) { - lhs.to(beCloseTo(rhs)) -} - -// swiftlint:disable:next identifier_name -public func ≈(lhs: Expectation, rhs: (expected: NMBDoubleConvertible, delta: Double)) { - lhs.to(beCloseTo(rhs.expected, within: rhs.delta)) -} - -public func == (lhs: Expectation, rhs: (expected: NMBDoubleConvertible, delta: Double)) { - lhs.to(beCloseTo(rhs.expected, within: rhs.delta)) -} - -// make this higher precedence than exponents so the Doubles either end aren't pulled in -// unexpectantly -precedencegroup PlusMinusOperatorPrecedence { - higherThan: BitwiseShiftPrecedence -} - -infix operator ± : PlusMinusOperatorPrecedence -// swiftlint:disable:next identifier_name -public func ±(lhs: NMBDoubleConvertible, rhs: Double) -> (expected: NMBDoubleConvertible, delta: Double) { - return (expected: lhs, delta: rhs) -} diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeEmpty.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeEmpty.swift deleted file mode 100644 index 860287f0..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeEmpty.swift +++ /dev/null @@ -1,116 +0,0 @@ -import Foundation - -/// A Nimble matcher that succeeds when a value is "empty". For collections, this -/// means the are no items in that collection. For strings, it is an empty string. -public func beEmpty() -> Predicate { - return Predicate.simple("be empty") { actualExpression in - guard let actual = try actualExpression.evaluate() else { - return .fail - } - var generator = actual.makeIterator() - return PredicateStatus(bool: generator.next() == nil) - } -} - -/// A Nimble matcher that succeeds when a value is "empty". For collections, this -/// means the are no items in that collection. For strings, it is an empty string. -public func beEmpty() -> Predicate { - return Predicate.simple("be empty") { actualExpression in - guard let actual = try actualExpression.evaluate() else { - return .fail - } - return PredicateStatus(bool: actual.isEmpty) - } -} - -/// A Nimble matcher that succeeds when a value is "empty". For collections, this -/// means the are no items in that collection. For strings, it is an empty string. -public func beEmpty() -> Predicate { - return Predicate.simple("be empty") { actualExpression in - guard let actual = try actualExpression.evaluate() else { - return .fail - } - return PredicateStatus(bool: actual.isEmpty) - } -} - -/// A Nimble matcher that succeeds when a value is "empty". For collections, this -/// means the are no items in that collection. For strings, it is an empty string. -public func beEmpty() -> Predicate { - return Predicate.simple("be empty") { actualExpression in - let actualString = try actualExpression.evaluate() - return PredicateStatus(bool: actualString == nil || NSString(string: actualString!).length == 0) - } -} - -/// A Nimble matcher that succeeds when a value is "empty". For collections, this -/// means the are no items in that collection. For NSString instances, it is an empty string. -public func beEmpty() -> Predicate { - return Predicate.simple("be empty") { actualExpression in - let actualString = try actualExpression.evaluate() - return PredicateStatus(bool: actualString == nil || actualString!.length == 0) - } -} - -// Without specific overrides, beEmpty() is ambiguous for NSDictionary, NSArray, -// etc, since they conform to Sequence as well as NMBCollection. - -/// A Nimble matcher that succeeds when a value is "empty". For collections, this -/// means the are no items in that collection. For strings, it is an empty string. -public func beEmpty() -> Predicate { - return Predicate.simple("be empty") { actualExpression in - let actualDictionary = try actualExpression.evaluate() - return PredicateStatus(bool: actualDictionary == nil || actualDictionary!.count == 0) - } -} - -/// A Nimble matcher that succeeds when a value is "empty". For collections, this -/// means the are no items in that collection. For strings, it is an empty string. -public func beEmpty() -> Predicate { - return Predicate.simple("be empty") { actualExpression in - let actualArray = try actualExpression.evaluate() - return PredicateStatus(bool: actualArray == nil || actualArray!.count == 0) - } -} - -/// A Nimble matcher that succeeds when a value is "empty". For collections, this -/// means the are no items in that collection. For strings, it is an empty string. -public func beEmpty() -> Predicate { - return Predicate.simple("be empty") { actualExpression in - let actual = try actualExpression.evaluate() - return PredicateStatus(bool: actual == nil || actual!.count == 0) - } -} - -#if canImport(Darwin) -extension NMBObjCMatcher { - @objc public class func beEmptyMatcher() -> NMBPredicate { - return NMBPredicate { actualExpression in - let location = actualExpression.location - let actualValue = try actualExpression.evaluate() - - if let value = actualValue as? NMBCollection { - let expr = Expression(expression: ({ value as NMBCollection }), location: location) - return try beEmpty().satisfies(expr).toObjectiveC() - } else if let value = actualValue as? NSString { - let expr = Expression(expression: ({ value as String }), location: location) - return try beEmpty().satisfies(expr).toObjectiveC() - } else if let actualValue = actualValue { - // swiftlint:disable:next line_length - let badTypeErrorMsg = "be empty (only works for NSArrays, NSSets, NSIndexSets, NSDictionaries, NSHashTables, and NSStrings)" - return NMBPredicateResult( - status: NMBPredicateStatus.fail, - message: NMBExpectationMessage( - expectedActualValueTo: badTypeErrorMsg, - customActualValue: "\(String(describing: type(of: actualValue))) type" - ) - ) - } - return NMBPredicateResult( - status: NMBPredicateStatus.fail, - message: NMBExpectationMessage(expectedActualValueTo: "be empty").appendedBeNilHint() - ) - } - } -} -#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThan.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThan.swift deleted file mode 100644 index 782c771c..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThan.swift +++ /dev/null @@ -1,44 +0,0 @@ -import Foundation - -/// A Nimble matcher that succeeds when the actual value is greater than the expected value. -public func beGreaterThan(_ expectedValue: T?) -> Predicate { - let errorMessage = "be greater than <\(stringify(expectedValue))>" - return Predicate.simple(errorMessage) { actualExpression in - if let actual = try actualExpression.evaluate(), let expected = expectedValue { - return PredicateStatus(bool: actual > expected) - } - return .fail - } -} - -public func >(lhs: Expectation, rhs: T) { - lhs.to(beGreaterThan(rhs)) -} - -#if canImport(Darwin) || !compiler(>=5.1) -/// A Nimble matcher that succeeds when the actual value is greater than the expected value. -public func beGreaterThan(_ expectedValue: NMBComparable?) -> Predicate { - let errorMessage = "be greater than <\(stringify(expectedValue))>" - return Predicate.simple(errorMessage) { actualExpression in - let actualValue = try actualExpression.evaluate() - let matches = actualValue != nil - && actualValue!.NMB_compare(expectedValue) == ComparisonResult.orderedDescending - return PredicateStatus(bool: matches) - } -} - -public func > (lhs: Expectation, rhs: NMBComparable?) { - lhs.to(beGreaterThan(rhs)) -} -#endif - -#if canImport(Darwin) -extension NMBObjCMatcher { - @objc public class func beGreaterThanMatcher(_ expected: NMBComparable?) -> NMBMatcher { - return NMBPredicate { actualExpression in - let expr = actualExpression.cast { $0 as? NMBComparable } - return try beGreaterThan(expected).satisfies(expr).toObjectiveC() - } - } -} -#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift deleted file mode 100644 index c3fc5238..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift +++ /dev/null @@ -1,46 +0,0 @@ -import Foundation - -/// A Nimble matcher that succeeds when the actual value is greater than -/// or equal to the expected value. -public func beGreaterThanOrEqualTo(_ expectedValue: T?) -> Predicate { - let message = "be greater than or equal to <\(stringify(expectedValue))>" - return Predicate.simple(message) { actualExpression in - let actualValue = try actualExpression.evaluate() - if let actual = actualValue, let expected = expectedValue { - return PredicateStatus(bool: actual >= expected) - } - return .fail - } -} - -public func >=(lhs: Expectation, rhs: T) { - lhs.to(beGreaterThanOrEqualTo(rhs)) -} - -#if canImport(Darwin) || !compiler(>=5.1) -/// A Nimble matcher that succeeds when the actual value is greater than -/// or equal to the expected value. -public func beGreaterThanOrEqualTo(_ expectedValue: T?) -> Predicate { - let message = "be greater than or equal to <\(stringify(expectedValue))>" - return Predicate.simple(message) { actualExpression in - let actualValue = try actualExpression.evaluate() - let matches = actualValue != nil && actualValue!.NMB_compare(expectedValue) != ComparisonResult.orderedAscending - return PredicateStatus(bool: matches) - } -} - -public func >=(lhs: Expectation, rhs: T) { - lhs.to(beGreaterThanOrEqualTo(rhs)) -} -#endif - -#if canImport(Darwin) -extension NMBObjCMatcher { - @objc public class func beGreaterThanOrEqualToMatcher(_ expected: NMBComparable?) -> NMBMatcher { - return NMBPredicate { actualExpression in - let expr = actualExpression.cast { $0 as? NMBComparable } - return try beGreaterThanOrEqualTo(expected).satisfies(expr).toObjectiveC() - } - } -} -#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeIdenticalTo.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeIdenticalTo.swift deleted file mode 100644 index 7644b4c4..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeIdenticalTo.swift +++ /dev/null @@ -1,44 +0,0 @@ -import Foundation - -/// A Nimble matcher that succeeds when the actual value is the same instance -/// as the expected instance. -public func beIdenticalTo(_ expected: Any?) -> Predicate { - return Predicate.define { actualExpression in - let actual = try actualExpression.evaluate() as AnyObject? - - let bool = actual === (expected as AnyObject?) && actual !== nil - return PredicateResult( - bool: bool, - message: .expectedCustomValueTo( - "be identical to \(identityAsString(expected))", - "\(identityAsString(actual))" - ) - ) - } -} - -public func === (lhs: Expectation, rhs: Any?) { - lhs.to(beIdenticalTo(rhs)) -} -public func !== (lhs: Expectation, rhs: Any?) { - lhs.toNot(beIdenticalTo(rhs)) -} - -/// A Nimble matcher that succeeds when the actual value is the same instance -/// as the expected instance. -/// -/// Alias for "beIdenticalTo". -public func be(_ expected: Any?) -> Predicate { - return beIdenticalTo(expected) -} - -#if canImport(Darwin) -extension NMBObjCMatcher { - @objc public class func beIdenticalToMatcher(_ expected: NSObject?) -> NMBMatcher { - return NMBPredicate { actualExpression in - let aExpr = actualExpression.cast { $0 as Any? } - return try beIdenticalTo(expected).satisfies(aExpr).toObjectiveC() - } - } -} -#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeLessThan.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeLessThan.swift deleted file mode 100644 index 12fc9c20..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeLessThan.swift +++ /dev/null @@ -1,43 +0,0 @@ -import Foundation - -/// A Nimble matcher that succeeds when the actual value is less than the expected value. -public func beLessThan(_ expectedValue: T?) -> Predicate { - let message = "be less than <\(stringify(expectedValue))>" - return Predicate.simple(message) { actualExpression in - if let actual = try actualExpression.evaluate(), let expected = expectedValue { - return PredicateStatus(bool: actual < expected) - } - return .fail - } -} - -public func <(lhs: Expectation, rhs: T) { - lhs.to(beLessThan(rhs)) -} - -#if canImport(Darwin) || !compiler(>=5.1) -/// A Nimble matcher that succeeds when the actual value is less than the expected value. -public func beLessThan(_ expectedValue: NMBComparable?) -> Predicate { - let message = "be less than <\(stringify(expectedValue))>" - return Predicate.simple(message) { actualExpression in - let actualValue = try actualExpression.evaluate() - let matches = actualValue != nil && actualValue!.NMB_compare(expectedValue) == ComparisonResult.orderedAscending - return PredicateStatus(bool: matches) - } -} - -public func < (lhs: Expectation, rhs: NMBComparable?) { - lhs.to(beLessThan(rhs)) -} -#endif - -#if canImport(Darwin) -extension NMBObjCMatcher { - @objc public class func beLessThanMatcher(_ expected: NMBComparable?) -> NMBMatcher { - return NMBPredicate { actualExpression in - let expr = actualExpression.cast { $0 as? NMBComparable } - return try beLessThan(expected).satisfies(expr).toObjectiveC() - } - } -} -#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeLessThanOrEqual.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeLessThanOrEqual.swift deleted file mode 100644 index bf6ba164..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeLessThanOrEqual.swift +++ /dev/null @@ -1,43 +0,0 @@ -import Foundation - -/// A Nimble matcher that succeeds when the actual value is less than -/// or equal to the expected value. -public func beLessThanOrEqualTo(_ expectedValue: T?) -> Predicate { - return Predicate.simple("be less than or equal to <\(stringify(expectedValue))>") { actualExpression in - if let actual = try actualExpression.evaluate(), let expected = expectedValue { - return PredicateStatus(bool: actual <= expected) - } - return .fail - } -} - -public func <=(lhs: Expectation, rhs: T) { - lhs.to(beLessThanOrEqualTo(rhs)) -} - -#if canImport(Darwin) || !compiler(>=5.1) -/// A Nimble matcher that succeeds when the actual value is less than -/// or equal to the expected value. -public func beLessThanOrEqualTo(_ expectedValue: T?) -> Predicate { - return Predicate.simple("be less than or equal to <\(stringify(expectedValue))>") { actualExpression in - let actualValue = try actualExpression.evaluate() - let matches = actualValue.map { $0.NMB_compare(expectedValue) != .orderedDescending } ?? false - return PredicateStatus(bool: matches) - } -} - -public func <=(lhs: Expectation, rhs: T) { - lhs.to(beLessThanOrEqualTo(rhs)) -} -#endif - -#if canImport(Darwin) -extension NMBObjCMatcher { - @objc public class func beLessThanOrEqualToMatcher(_ expected: NMBComparable?) -> NMBMatcher { - return NMBPredicate { actualExpression in - let expr = actualExpression.cast { $0 as? NMBComparable } - return try beLessThanOrEqualTo(expected).satisfies(expr).toObjectiveC() - } - } -} -#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeLogical.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeLogical.swift deleted file mode 100644 index 788234b9..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeLogical.swift +++ /dev/null @@ -1,154 +0,0 @@ -import Foundation - -extension Int8: ExpressibleByBooleanLiteral { - public init(booleanLiteral value: Bool) { - self = NSNumber(value: value).int8Value - } -} - -extension UInt8: ExpressibleByBooleanLiteral { - public init(booleanLiteral value: Bool) { - self = NSNumber(value: value).uint8Value - } -} - -extension Int16: ExpressibleByBooleanLiteral { - public init(booleanLiteral value: Bool) { - self = NSNumber(value: value).int16Value - } -} - -extension UInt16: ExpressibleByBooleanLiteral { - public init(booleanLiteral value: Bool) { - self = NSNumber(value: value).uint16Value - } -} - -extension Int32: ExpressibleByBooleanLiteral { - public init(booleanLiteral value: Bool) { - self = NSNumber(value: value).int32Value - } -} - -extension UInt32: ExpressibleByBooleanLiteral { - public init(booleanLiteral value: Bool) { - self = NSNumber(value: value).uint32Value - } -} - -extension Int64: ExpressibleByBooleanLiteral { - public init(booleanLiteral value: Bool) { - self = NSNumber(value: value).int64Value - } -} - -extension UInt64: ExpressibleByBooleanLiteral { - public init(booleanLiteral value: Bool) { - self = NSNumber(value: value).uint64Value - } -} - -extension Float: ExpressibleByBooleanLiteral { - public init(booleanLiteral value: Bool) { - self = NSNumber(value: value).floatValue - } -} - -extension Double: ExpressibleByBooleanLiteral { - public init(booleanLiteral value: Bool) { - self = NSNumber(value: value).doubleValue - } -} - -extension Int: ExpressibleByBooleanLiteral { - public init(booleanLiteral value: Bool) { - self = NSNumber(value: value).intValue - } -} - -extension UInt: ExpressibleByBooleanLiteral { - public init(booleanLiteral value: Bool) { - self = NSNumber(value: value).uintValue - } -} - -internal func rename(_ matcher: Predicate, failureMessage message: ExpectationMessage) -> Predicate { - return Predicate { actualExpression in - let result = try matcher.satisfies(actualExpression) - return PredicateResult(status: result.status, message: message) - }.requireNonNil -} - -// MARK: beTrue() / beFalse() - -/// A Nimble matcher that succeeds when the actual value is exactly true. -/// This matcher will not match against nils. -public func beTrue() -> Predicate { - return rename(equal(true), failureMessage: .expectedActualValueTo("be true")) -} - -/// A Nimble matcher that succeeds when the actual value is exactly false. -/// This matcher will not match against nils. -public func beFalse() -> Predicate { - return rename(equal(false), failureMessage: .expectedActualValueTo("be false")) -} - -// MARK: beTruthy() / beFalsy() - -/// A Nimble matcher that succeeds when the actual value is not logically false. -public func beTruthy() -> Predicate { - return Predicate.simpleNilable("be truthy") { actualExpression in - let actualValue = try actualExpression.evaluate() - if let actualValue = actualValue { - return PredicateStatus(bool: actualValue == (true as T)) - } - return PredicateStatus(bool: actualValue != nil) - } -} - -/// A Nimble matcher that succeeds when the actual value is logically false. -/// This matcher will match against nils. -public func beFalsy() -> Predicate { - return Predicate.simpleNilable("be falsy") { actualExpression in - let actualValue = try actualExpression.evaluate() - if let actualValue = actualValue { - return PredicateStatus(bool: actualValue == (false as T)) - } - return PredicateStatus(bool: actualValue == nil) - } -} - -#if canImport(Darwin) -extension NMBObjCMatcher { - @objc public class func beTruthyMatcher() -> NMBMatcher { - return NMBPredicate { actualExpression in - let expr = actualExpression.cast { ($0 as? NSNumber)?.boolValue ?? false } - return try beTruthy().satisfies(expr).toObjectiveC() - } - } - - @objc public class func beFalsyMatcher() -> NMBMatcher { - return NMBPredicate { actualExpression in - let expr = actualExpression.cast { ($0 as? NSNumber)?.boolValue ?? false } - return try beFalsy().satisfies(expr).toObjectiveC() - } - } - - @objc public class func beTrueMatcher() -> NMBMatcher { - return NMBPredicate { actualExpression in - let expr = actualExpression.cast { ($0 as? NSNumber)?.boolValue ?? false } - return try beTrue().satisfies(expr).toObjectiveC() - } - } - - @objc public class func beFalseMatcher() -> NMBMatcher { - return NMBPredicate { actualExpression in - let expr = actualExpression.cast { value -> Bool? in - guard let value = value else { return nil } - return (value as? NSNumber)?.boolValue ?? false - } - return try beFalse().satisfies(expr).toObjectiveC() - } - } -} -#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeNil.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeNil.swift deleted file mode 100644 index 0f21d418..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeNil.swift +++ /dev/null @@ -1,19 +0,0 @@ -import Foundation - -/// A Nimble matcher that succeeds when the actual value is nil. -public func beNil() -> Predicate { - return Predicate.simpleNilable("be nil") { actualExpression in - let actualValue = try actualExpression.evaluate() - return PredicateStatus(bool: actualValue == nil) - } -} - -#if canImport(Darwin) -extension NMBObjCMatcher { - @objc public class func beNilMatcher() -> NMBMatcher { - return NMBPredicate { actualExpression in - return try beNil().satisfies(actualExpression).toObjectiveC() - } - } -} -#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeVoid.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeVoid.swift deleted file mode 100644 index 9a7eafda..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeVoid.swift +++ /dev/null @@ -1,19 +0,0 @@ -import Foundation - -/// A Nimble matcher that succeeds when the actual value is Void. -public func beVoid() -> Predicate<()> { - return Predicate.simpleNilable("be void") { actualExpression in - let actualValue: ()? = try actualExpression.evaluate() - return PredicateStatus(bool: actualValue != nil) - } -} - -extension Expectation where T == () { - public static func == (lhs: Expectation<()>, rhs: ()) { - lhs.to(beVoid()) - } - - public static func != (lhs: Expectation<()>, rhs: ()) { - lhs.toNot(beVoid()) - } -} diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeginWith.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeginWith.swift deleted file mode 100644 index 3183eb95..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeginWith.swift +++ /dev/null @@ -1,60 +0,0 @@ -import Foundation - -/// A Nimble matcher that succeeds when the actual sequence's first element -/// is equal to the expected value. -public func beginWith(_ startingElement: T) -> Predicate - where S.Iterator.Element == T { - return Predicate.simple("begin with <\(startingElement)>") { actualExpression in - if let actualValue = try actualExpression.evaluate() { - var actualGenerator = actualValue.makeIterator() - return PredicateStatus(bool: actualGenerator.next() == startingElement) - } - return .fail - } -} - -/// A Nimble matcher that succeeds when the actual collection's first element -/// is equal to the expected object. -public func beginWith(_ startingElement: Any) -> Predicate { - return Predicate.simple("begin with <\(startingElement)>") { actualExpression in - guard let collection = try actualExpression.evaluate() else { return .fail } - guard collection.count > 0 else { return .doesNotMatch } - #if os(Linux) - guard let collectionValue = collection.object(at: 0) as? NSObject else { - return .fail - } - #else - let collectionValue = collection.object(at: 0) as AnyObject - #endif - return PredicateStatus(bool: collectionValue.isEqual(startingElement)) - } -} - -/// A Nimble matcher that succeeds when the actual string contains expected substring -/// where the expected substring's location is zero. -public func beginWith(_ startingSubstring: String) -> Predicate { - return Predicate.simple("begin with <\(startingSubstring)>") { actualExpression in - if let actual = try actualExpression.evaluate() { - return PredicateStatus(bool: actual.hasPrefix(startingSubstring)) - } - return .fail - } -} - -#if canImport(Darwin) -extension NMBObjCMatcher { - @objc public class func beginWithMatcher(_ expected: Any) -> NMBMatcher { - return NMBPredicate { actualExpression in - let actual = try actualExpression.evaluate() - if actual is String { - let expr = actualExpression.cast { $0 as? String } - // swiftlint:disable:next force_cast - return try beginWith(expected as! String).satisfies(expr).toObjectiveC() - } else { - let expr = actualExpression.cast { $0 as? NMBOrderedCollection } - return try beginWith(expected).satisfies(expr).toObjectiveC() - } - } - } -} -#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/Contain.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/Contain.swift deleted file mode 100644 index 6974a4d4..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/Contain.swift +++ /dev/null @@ -1,144 +0,0 @@ -import Foundation - -/// A Nimble matcher that succeeds when the actual sequence contains the expected values. -public func contain(_ items: T...) -> Predicate - where S.Element == T { - return contain(items) -} - -/// A Nimble matcher that succeeds when the actual sequence contains the expected values. -public func contain(_ items: [T]) -> Predicate - where S.Element == T { - return Predicate.simple("contain <\(arrayAsString(items))>") { actualExpression in - if let actual = try actualExpression.evaluate() { - let matches = items.allSatisfy { - return actual.contains($0) - } - return PredicateStatus(bool: matches) - } - return .fail - } -} - -/// A Nimble matcher that succeeds when the actual set contains the expected values. -public func contain(_ items: T...) -> Predicate - where S.Element == T { - return contain(items) -} - -/// A Nimble matcher that succeeds when the actual set contains the expected values. -public func contain(_ items: [T]) -> Predicate - where S.Element == T { - return Predicate.simple("contain <\(arrayAsString(items))>") { actualExpression in - if let actual = try actualExpression.evaluate() { - let matches = items.allSatisfy { - return actual.contains($0) - } - return PredicateStatus(bool: matches) - } - return .fail - } -} - -/// A Nimble matcher that succeeds when the actual set contains the expected values. -public func contain(_ items: T...) -> Predicate - where S.Element == T { - return contain(items) -} - -/// A Nimble matcher that succeeds when the actual set contains the expected values. -public func contain(_ items: [T]) -> Predicate - where S.Element == T { - return Predicate.simple("contain <\(arrayAsString(items))>") { actualExpression in - if let actual = try actualExpression.evaluate() { - let matches = items.allSatisfy { - return actual.contains($0) - } - return PredicateStatus(bool: matches) - } - return .fail - } -} - -/// A Nimble matcher that succeeds when the actual string contains the expected substring. -public func contain(_ substrings: String...) -> Predicate { - return contain(substrings) -} - -public func contain(_ substrings: [String]) -> Predicate { - return Predicate.simple("contain <\(arrayAsString(substrings))>") { actualExpression in - if let actual = try actualExpression.evaluate() { - let matches = substrings.allSatisfy { - let range = actual.range(of: $0) - return range != nil && !range!.isEmpty - } - return PredicateStatus(bool: matches) - } - return .fail - } -} - -/// A Nimble matcher that succeeds when the actual string contains the expected substring. -public func contain(_ substrings: NSString...) -> Predicate { - return contain(substrings) -} - -public func contain(_ substrings: [NSString]) -> Predicate { - return Predicate.simple("contain <\(arrayAsString(substrings))>") { actualExpression in - if let actual = try actualExpression.evaluate() { - let matches = substrings.allSatisfy { actual.range(of: $0.description).length != 0 } - return PredicateStatus(bool: matches) - } - return .fail - } -} - -/// A Nimble matcher that succeeds when the actual collection contains the expected object. -public func contain(_ items: Any?...) -> Predicate { - return contain(items) -} - -public func contain(_ items: [Any?]) -> Predicate { - return Predicate.simple("contain <\(arrayAsString(items))>") { actualExpression in - guard let actual = try actualExpression.evaluate() else { return .fail } - let matches = items.allSatisfy { item in - return item.map { actual.contains($0) } ?? false - } - return PredicateStatus(bool: matches) - } -} - -#if canImport(Darwin) -extension NMBObjCMatcher { - @objc public class func containMatcher(_ expected: [NSObject]) -> NMBMatcher { - return NMBPredicate { actualExpression in - let location = actualExpression.location - let actualValue = try actualExpression.evaluate() - if let value = actualValue as? NMBContainer { - let expr = Expression(expression: ({ value as NMBContainer }), location: location) - - // A straightforward cast on the array causes this to crash, so we have to cast the individual items - let expectedOptionals: [Any?] = expected.map({ $0 as Any? }) - return try contain(expectedOptionals).satisfies(expr).toObjectiveC() - } else if let value = actualValue as? NSString { - let expr = Expression(expression: ({ value as String }), location: location) - // swiftlint:disable:next force_cast - return try contain(expected as! [String]).satisfies(expr).toObjectiveC() - } - - let message: ExpectationMessage - if actualValue != nil { - message = ExpectationMessage.expectedActualValueTo( - // swiftlint:disable:next line_length - "contain <\(arrayAsString(expected))> (only works for NSArrays, NSSets, NSHashTables, and NSStrings)" - ) - } else { - message = ExpectationMessage - .expectedActualValueTo("contain <\(arrayAsString(expected))>") - .appendedBeNilHint() - } - return NMBPredicateResult(status: .fail, message: message.toObjectiveC()) - } - } -} -#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/ContainElementSatisfying.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/ContainElementSatisfying.swift deleted file mode 100644 index 331f3bc2..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/ContainElementSatisfying.swift +++ /dev/null @@ -1,58 +0,0 @@ -import Foundation - -public func containElementSatisfying(_ predicate: @escaping ((T) -> Bool), _ predicateDescription: String = "") -> Predicate where S.Iterator.Element == T { - - return Predicate.define { actualExpression in - let message: ExpectationMessage - if predicateDescription == "" { - message = .expectedTo("find object in collection that satisfies predicate") - } else { - message = .expectedTo("find object in collection \(predicateDescription)") - } - - if let sequence = try actualExpression.evaluate() { - for object in sequence { - if predicate(object) { - return PredicateResult(bool: true, message: message) - } - } - - return PredicateResult(bool: false, message: message) - } - - return PredicateResult(status: .fail, message: message) - } -} - -#if canImport(Darwin) - extension NMBObjCMatcher { - @objc public class func containElementSatisfyingMatcher(_ predicate: @escaping ((NSObject) -> Bool)) -> NMBMatcher { - return NMBPredicate { actualExpression in - let value = try actualExpression.evaluate() - guard let enumeration = value as? NSFastEnumeration else { - let message = ExpectationMessage.fail( - "containElementSatisfying must be provided an NSFastEnumeration object" - ) - return NMBPredicateResult(status: .fail, message: message.toObjectiveC()) - } - - let message = ExpectationMessage - .expectedTo("find object in collection that satisfies predicate") - .toObjectiveC() - - var iterator = NSFastEnumerationIterator(enumeration) - while let item = iterator.next() { - guard let object = item as? NSObject else { - continue - } - - if predicate(object) { - return NMBPredicateResult(status: .matches, message: message) - } - } - - return NMBPredicateResult(status: .doesNotMatch, message: message) - } - } - } -#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/ElementsEqual.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/ElementsEqual.swift deleted file mode 100644 index 1704e945..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/ElementsEqual.swift +++ /dev/null @@ -1,16 +0,0 @@ -/// A Nimble matcher that succeeds when the actual sequence contain the same elements in the same order to the exepected sequence. -public func elementsEqual(_ expectedValue: S?) -> Predicate where S.Element: Equatable { - // A matcher abstraction for https://developer.apple.com/documentation/swift/sequence/2949668-elementsequal - return Predicate.define("elementsEqual <\(stringify(expectedValue))>") { (actualExpression, msg) in - let actualValue = try actualExpression.evaluate() - switch (expectedValue, actualValue) { - case (nil, _?): - return PredicateResult(status: .fail, message: msg.appendedBeNilHint()) - case (nil, nil), (_, nil): - return PredicateResult(status: .fail, message: msg) - case (let expected?, let actual?): - let matches = expected.elementsEqual(actual) - return PredicateResult(bool: matches, message: msg) - } - } -} diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/EndWith.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/EndWith.swift deleted file mode 100644 index 13bdb311..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/EndWith.swift +++ /dev/null @@ -1,69 +0,0 @@ -import Foundation - -/// A Nimble matcher that succeeds when the actual sequence's last element -/// is equal to the expected value. -public func endWith(_ endingElement: T) -> Predicate - where S.Iterator.Element == T { - return Predicate.simple("end with <\(endingElement)>") { actualExpression in - if let actualValue = try actualExpression.evaluate() { - var actualGenerator = actualValue.makeIterator() - var lastItem: T? - var item: T? - repeat { - lastItem = item - item = actualGenerator.next() - } while(item != nil) - - return PredicateStatus(bool: lastItem == endingElement) - } - return .fail - } -} - -/// A Nimble matcher that succeeds when the actual collection's last element -/// is equal to the expected object. -public func endWith(_ endingElement: Any) -> Predicate { - return Predicate.simple("end with <\(endingElement)>") { actualExpression in - guard let collection = try actualExpression.evaluate() else { return .fail } - guard collection.count > 0 else { return PredicateStatus(bool: false) } - #if os(Linux) - guard let collectionValue = collection.object(at: collection.count - 1) as? NSObject else { - return .fail - } - #else - let collectionValue = collection.object(at: collection.count - 1) as AnyObject - #endif - - return PredicateStatus(bool: collectionValue.isEqual(endingElement)) - } -} - -/// A Nimble matcher that succeeds when the actual string contains the expected substring -/// where the expected substring's location is the actual string's length minus the -/// expected substring's length. -public func endWith(_ endingSubstring: String) -> Predicate { - return Predicate.simple("end with <\(endingSubstring)>") { actualExpression in - if let collection = try actualExpression.evaluate() { - return PredicateStatus(bool: collection.hasSuffix(endingSubstring)) - } - return .fail - } -} - -#if canImport(Darwin) -extension NMBObjCMatcher { - @objc public class func endWithMatcher(_ expected: Any) -> NMBMatcher { - return NMBPredicate { actualExpression in - let actual = try actualExpression.evaluate() - if actual is String { - let expr = actualExpression.cast { $0 as? String } - // swiftlint:disable:next force_cast - return try endWith(expected as! String).satisfies(expr).toObjectiveC() - } else { - let expr = actualExpression.cast { $0 as? NMBOrderedCollection } - return try endWith(expected).satisfies(expr).toObjectiveC() - } - } - } -} -#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/Equal.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/Equal.swift deleted file mode 100644 index b08d5f67..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/Equal.swift +++ /dev/null @@ -1,148 +0,0 @@ -import Foundation - -/// A Nimble matcher that succeeds when the actual value is equal to the expected value. -/// Values can support equal by supporting the Equatable protocol. -/// -/// @see beCloseTo if you want to match imprecise types (eg - floats, doubles). -public func equal(_ expectedValue: T?) -> Predicate { - return Predicate.define("equal <\(stringify(expectedValue))>") { actualExpression, msg in - let actualValue = try actualExpression.evaluate() - switch (expectedValue, actualValue) { - case (nil, _?): - return PredicateResult(status: .fail, message: msg.appendedBeNilHint()) - case (nil, nil), (_, nil): - return PredicateResult(status: .fail, message: msg) - case (let expected?, let actual?): - let matches = expected == actual - return PredicateResult(bool: matches, message: msg) - } - } -} - -/// A Nimble matcher allowing comparison of collection with optional type -public func equal(_ expectedValue: [T?]) -> Predicate<[T?]> { - return Predicate.define("equal <\(stringify(expectedValue))>") { actualExpression, msg in - guard let actualValue = try actualExpression.evaluate() else { - return PredicateResult( - status: .fail, - message: msg.appendedBeNilHint() - ) - } - - let matches = expectedValue == actualValue - return PredicateResult(bool: matches, message: msg) - } -} - -/// A Nimble matcher that succeeds when the actual set is equal to the expected set. -public func equal(_ expectedValue: Set?) -> Predicate> { - return equal(expectedValue, stringify: { stringify($0) }) -} - -/// A Nimble matcher that succeeds when the actual set is equal to the expected set. -public func equal(_ expectedValue: Set?) -> Predicate> { - return equal(expectedValue, stringify: { - if let set = $0 { - return stringify(Array(set).sorted { $0 < $1 }) - } else { - return "nil" - } - }) -} - -private func equal(_ expectedValue: Set?, stringify: @escaping (Set?) -> String) -> Predicate> { - return Predicate { actualExpression in - var errorMessage: ExpectationMessage = - .expectedActualValueTo("equal <\(stringify(expectedValue))>") - - guard let expectedValue = expectedValue else { - return PredicateResult( - status: .fail, - message: errorMessage.appendedBeNilHint() - ) - } - - guard let actualValue = try actualExpression.evaluate() else { - return PredicateResult( - status: .fail, - message: errorMessage.appendedBeNilHint() - ) - } - - errorMessage = .expectedCustomValueTo( - "equal <\(stringify(expectedValue))>", - "<\(stringify(actualValue))>" - ) - - if expectedValue == actualValue { - return PredicateResult( - status: .matches, - message: errorMessage - ) - } - - let missing = expectedValue.subtracting(actualValue) - if missing.count > 0 { - errorMessage = errorMessage.appended(message: ", missing <\(stringify(missing))>") - } - - let extra = actualValue.subtracting(expectedValue) - if extra.count > 0 { - errorMessage = errorMessage.appended(message: ", extra <\(stringify(extra))>") - } - return PredicateResult( - status: .doesNotMatch, - message: errorMessage - ) - } -} - -public func ==(lhs: Expectation, rhs: T?) { - lhs.to(equal(rhs)) -} - -public func !=(lhs: Expectation, rhs: T?) { - lhs.toNot(equal(rhs)) -} - -public func ==(lhs: Expectation<[T]>, rhs: [T]?) { - lhs.to(equal(rhs)) -} - -public func !=(lhs: Expectation<[T]>, rhs: [T]?) { - lhs.toNot(equal(rhs)) -} - -public func == (lhs: Expectation>, rhs: Set?) { - lhs.to(equal(rhs)) -} - -public func != (lhs: Expectation>, rhs: Set?) { - lhs.toNot(equal(rhs)) -} - -public func ==(lhs: Expectation>, rhs: Set?) { - lhs.to(equal(rhs)) -} - -public func !=(lhs: Expectation>, rhs: Set?) { - lhs.toNot(equal(rhs)) -} - -public func ==(lhs: Expectation<[T: C]>, rhs: [T: C]?) { - lhs.to(equal(rhs)) -} - -public func !=(lhs: Expectation<[T: C]>, rhs: [T: C]?) { - lhs.toNot(equal(rhs)) -} - -#if canImport(Darwin) -extension NMBObjCMatcher { - @objc public class func equalMatcher(_ expected: NSObject) -> NMBMatcher { - return NMBPredicate { actualExpression in - return try equal(expected).satisfies(actualExpression).toObjectiveC() - } - } -} -#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/HaveCount.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/HaveCount.swift deleted file mode 100644 index 984e2d4c..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/HaveCount.swift +++ /dev/null @@ -1,74 +0,0 @@ -import Foundation - -// The `haveCount` matchers do not print the full string representation of the collection value, -// instead they only print the type name and the expected count. This makes it easier to understand -// the reason for failed expectations. See: https://github.com/Quick/Nimble/issues/308. -// The representation of the collection content is provided in a new line as an `extendedMessage`. - -/// A Nimble matcher that succeeds when the actual Collection's count equals -/// the expected value -public func haveCount(_ expectedValue: Int) -> Predicate { - return Predicate.define { actualExpression in - if let actualValue = try actualExpression.evaluate() { - let message = ExpectationMessage - .expectedCustomValueTo( - "have \(prettyCollectionType(actualValue)) with count \(stringify(expectedValue))", - "\(actualValue.count)" - ) - .appended(details: "Actual Value: \(stringify(actualValue))") - - let result = expectedValue == actualValue.count - return PredicateResult(bool: result, message: message) - } else { - return PredicateResult(status: .fail, message: .fail("")) - } - } -} - -/// A Nimble matcher that succeeds when the actual collection's count equals -/// the expected value -public func haveCount(_ expectedValue: Int) -> Predicate { - return Predicate { actualExpression in - if let actualValue = try actualExpression.evaluate() { - let message = ExpectationMessage - .expectedCustomValueTo( - "have \(prettyCollectionType(actualValue)) with count \(stringify(expectedValue))", - "\(actualValue.count)" - ) - .appended(details: "Actual Value: \(stringify(actualValue))") - - let result = expectedValue == actualValue.count - return PredicateResult(bool: result, message: message) - } else { - return PredicateResult(status: .fail, message: .fail("")) - } - } -} - -#if canImport(Darwin) -extension NMBObjCMatcher { - @objc public class func haveCountMatcher(_ expected: NSNumber) -> NMBMatcher { - return NMBPredicate { actualExpression in - let location = actualExpression.location - let actualValue = try actualExpression.evaluate() - if let value = actualValue as? NMBCollection { - let expr = Expression(expression: ({ value as NMBCollection}), location: location) - return try haveCount(expected.intValue).satisfies(expr).toObjectiveC() - } - - let message: ExpectationMessage - if let actualValue = actualValue { - message = ExpectationMessage.expectedCustomValueTo( - "get type of NSArray, NSSet, NSDictionary, or NSHashTable", - "\(String(describing: type(of: actualValue)))" - ) - } else { - message = ExpectationMessage - .expectedActualValueTo("have a collection with count \(stringify(expected.intValue))") - .appendedBeNilHint() - } - return NMBPredicateResult(status: .fail, message: message.toObjectiveC()) - } - } -} -#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/Match.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/Match.swift deleted file mode 100644 index dbcff09e..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/Match.swift +++ /dev/null @@ -1,29 +0,0 @@ -import Foundation - -/// A Nimble matcher that succeeds when the actual string satisfies the regular expression -/// described by the expected string. -public func match(_ expectedValue: String?) -> Predicate { - return Predicate.simple("match <\(stringify(expectedValue))>") { actualExpression in - if let actual = try actualExpression.evaluate() { - if let regexp = expectedValue { - let bool = actual.range(of: regexp, options: .regularExpression) != nil - return PredicateStatus(bool: bool) - } - } - - return .fail - } -} - -#if canImport(Darwin) - -extension NMBObjCMatcher { - @objc public class func matchMatcher(_ expected: NSString) -> NMBMatcher { - return NMBPredicate { actualExpression in - let actual = actualExpression.cast { $0 as? String } - return try match(expected.description).satisfies(actual).toObjectiveC() - } - } -} - -#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/MatchError.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/MatchError.swift deleted file mode 100644 index 4ad71d4f..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/MatchError.swift +++ /dev/null @@ -1,76 +0,0 @@ -import Foundation - -/// A Nimble matcher that succeeds when the actual expression evaluates to an -/// error from the specified case. -/// -/// Errors are tried to be compared by their implementation of Equatable, -/// otherwise they fallback to comparison by _domain and _code. -public func matchError(_ error: T) -> Predicate { - return Predicate.define { actualExpression in - let actualError = try actualExpression.evaluate() - - let failureMessage = FailureMessage() - setFailureMessageForError( - failureMessage, - postfixMessageVerb: "match", - actualError: actualError, - error: error - ) - - var matches = false - if let actualError = actualError, errorMatchesExpectedError(actualError, expectedError: error) { - matches = true - } - - return PredicateResult(bool: matches, message: failureMessage.toExpectationMessage()) - } -} - -/// A Nimble matcher that succeeds when the actual expression evaluates to an -/// error from the specified case. -/// -/// Errors are tried to be compared by their implementation of Equatable, -/// otherwise they fallback to comparision by _domain and _code. -public func matchError(_ error: T) -> Predicate { - return Predicate.define { actualExpression in - let actualError = try actualExpression.evaluate() - - let failureMessage = FailureMessage() - setFailureMessageForError( - failureMessage, - postfixMessageVerb: "match", - actualError: actualError, - error: error - ) - - var matches = false - if let actualError = actualError as? T, error == actualError { - matches = true - } - - return PredicateResult(bool: matches, message: failureMessage.toExpectationMessage()) - } -} - -/// A Nimble matcher that succeeds when the actual expression evaluates to an -/// error of the specified type -public func matchError(_ errorType: T.Type) -> Predicate { - return Predicate.define { actualExpression in - let actualError = try actualExpression.evaluate() - - let failureMessage = FailureMessage() - setFailureMessageForError( - failureMessage, - postfixMessageVerb: "match", - actualError: actualError, - errorType: errorType - ) - - var matches = false - if actualError as? T != nil { - matches = true - } - - return PredicateResult(bool: matches, message: failureMessage.toExpectationMessage()) - } -} diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/MatcherFunc.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/MatcherFunc.swift deleted file mode 100644 index abcafa99..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/MatcherFunc.swift +++ /dev/null @@ -1,85 +0,0 @@ -/// DEPRECATED: A convenience API to build matchers that don't need special negation -/// behavior. The toNot() behavior is the negation of to(). -/// -/// @see NonNilMatcherFunc if you prefer to have this matcher fail when nil -/// values are received in an expectation. -/// -/// You may use this when implementing your own custom matchers. -/// -/// Use the Matcher protocol instead of this type to accept custom matchers as -/// input parameters. -/// @see allPass for an example that uses accepts other matchers as input. -@available(*, deprecated, message: "Use to Predicate instead") -public struct MatcherFunc: Matcher { - public let matcher: (Expression, FailureMessage) throws -> Bool - - public init(_ matcher: @escaping (Expression, FailureMessage) throws -> Bool) { - self.matcher = matcher - } - - public func matches(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { - return try matcher(actualExpression, failureMessage) - } - - public func doesNotMatch(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { - return try !matcher(actualExpression, failureMessage) - } - - /// Compatibility layer to new Matcher API. Converts an old-style matcher to a new one. - /// Note: You should definitely spend the time to convert to the new api as soon as possible - /// since this struct type is deprecated. - public var predicate: Predicate { - return Predicate.fromDeprecatedMatcher(self) - } -} - -/// DEPRECATED: A convenience API to build matchers that don't need special negation -/// behavior. The toNot() behavior is the negation of to(). -/// -/// Unlike MatcherFunc, this will always fail if an expectation contains nil. -/// This applies regardless of using to() or toNot(). -/// -/// You may use this when implementing your own custom matchers. -/// -/// Use the Matcher protocol instead of this type to accept custom matchers as -/// input parameters. -/// @see allPass for an example that uses accepts other matchers as input. -@available(*, deprecated, message: "Use to Predicate instead") -public struct NonNilMatcherFunc: Matcher { - public let matcher: (Expression, FailureMessage) throws -> Bool - - public init(_ matcher: @escaping (Expression, FailureMessage) throws -> Bool) { - self.matcher = matcher - } - - public func matches(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { - let pass = try matcher(actualExpression, failureMessage) - if try attachNilErrorIfNeeded(actualExpression, failureMessage: failureMessage) { - return false - } - return pass - } - - public func doesNotMatch(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { - let pass = try !matcher(actualExpression, failureMessage) - if try attachNilErrorIfNeeded(actualExpression, failureMessage: failureMessage) { - return false - } - return pass - } - - internal func attachNilErrorIfNeeded(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { - if try actualExpression.evaluate() == nil { - failureMessage.postfixActual = " (use beNil() to match nils)" - return true - } - return false - } - - /// Compatibility layer to new Matcher API. Converts an old-style matcher to a new one. - /// Note: You should definitely spend the time to convert to the new api as soon as possible - /// since this struct type is deprecated. - public var predicate: Predicate { - return Predicate.fromDeprecatedMatcher(self) - } -} diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/MatcherProtocols.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/MatcherProtocols.swift deleted file mode 100644 index 21ffd771..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/MatcherProtocols.swift +++ /dev/null @@ -1,159 +0,0 @@ -import Foundation -// `CGFloat` is in Foundation (swift-corelibs-foundation) on Linux. -#if canImport(Darwin) - import CoreGraphics -#endif - -/// Implement this protocol to implement a custom matcher for Swift -@available(*, deprecated, message: "Use Predicate instead") -public protocol Matcher { - associatedtype ValueType - func matches(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool - func doesNotMatch(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool -} - -extension Matcher { - var predicate: Predicate { - return Predicate.fromDeprecatedMatcher(self) - } - - var toClosure: (Expression, FailureMessage, Bool) throws -> Bool { - return { expr, msg, expectedResult in - if expectedResult { - return try self.matches(expr, failureMessage: msg) - } else { - return try self.doesNotMatch(expr, failureMessage: msg) - } - } - } -} - -#if canImport(Darwin) -/// Objective-C interface to the Swift variant of Matcher. -@objc public protocol NMBMatcher { - func matches(_ actualBlock: @escaping () -> NSObject?, failureMessage: FailureMessage, location: SourceLocation) -> Bool - func doesNotMatch(_ actualBlock: @escaping () -> NSObject?, failureMessage: FailureMessage, location: SourceLocation) -> Bool -} -#endif - -/// Protocol for types that support contain() matcher. -public protocol NMBContainer { - func contains(_ anObject: Any) -> Bool -} - -#if canImport(Darwin) -// swiftlint:disable:next todo -// FIXME: NSHashTable can not conform to NMBContainer since swift-DEVELOPMENT-SNAPSHOT-2016-04-25-a -//extension NSHashTable : NMBContainer {} // Corelibs Foundation does not include this class yet -#endif - -extension NSArray: NMBContainer {} -extension NSSet: NMBContainer {} - -/// Protocol for types that support only beEmpty(), haveCount() matchers -public protocol NMBCollection { - var count: Int { get } -} - -#if canImport(Darwin) -extension NSHashTable: NMBCollection {} // Corelibs Foundation does not include these classes yet -extension NSMapTable: NMBCollection {} -#endif - -extension NSSet: NMBCollection {} -extension NSIndexSet: NMBCollection {} -extension NSDictionary: NMBCollection {} - -/// Protocol for types that support beginWith(), endWith(), beEmpty() matchers -public protocol NMBOrderedCollection: NMBCollection { - func object(at index: Int) -> Any -} - -extension NSArray: NMBOrderedCollection {} - -public protocol NMBDoubleConvertible { - var doubleValue: CDouble { get } -} - -extension Double: NMBDoubleConvertible { - public var doubleValue: CDouble { - return self - } -} - -extension Float: NMBDoubleConvertible { - public var doubleValue: CDouble { - return CDouble(self) - } -} - -extension CGFloat: NMBDoubleConvertible { - public var doubleValue: CDouble { - return CDouble(self) - } -} - -extension NSNumber: NMBDoubleConvertible { -} - -private let dateFormatter: DateFormatter = { - let formatter = DateFormatter() - formatter.dateFormat = "yyyy-MM-dd HH:mm:ss.SSSS" - formatter.locale = Locale(identifier: "en_US_POSIX") - - return formatter -}() - -extension Date: NMBDoubleConvertible { - public var doubleValue: CDouble { - return self.timeIntervalSinceReferenceDate - } -} - -extension NSDate: NMBDoubleConvertible { - public var doubleValue: CDouble { - return self.timeIntervalSinceReferenceDate - } -} - -extension Date: TestOutputStringConvertible { - public var testDescription: String { - return dateFormatter.string(from: self) - } -} - -extension NSDate: TestOutputStringConvertible { - public var testDescription: String { - return dateFormatter.string(from: Date(timeIntervalSinceReferenceDate: self.timeIntervalSinceReferenceDate)) - } -} - -/// Protocol for types to support beLessThan(), beLessThanOrEqualTo(), -/// beGreaterThan(), beGreaterThanOrEqualTo(), and equal() matchers. -/// -/// Types that conform to Swift's Comparable protocol will work implicitly too -#if canImport(Darwin) -@objc public protocol NMBComparable { - func NMB_compare(_ otherObject: NMBComparable!) -> ComparisonResult -} -#elseif !compiler(>=5.1) -// This should become obsolete once Corelibs Foundation adds Comparable conformance to NSNumber -public protocol NMBComparable { - func NMB_compare(_ otherObject: NMBComparable!) -> ComparisonResult -} -#endif - -#if canImport(Darwin) || !compiler(>=5.1) -extension NSNumber: NMBComparable { - public func NMB_compare(_ otherObject: NMBComparable!) -> ComparisonResult { - // swiftlint:disable:next force_cast - return compare(otherObject as! NSNumber) - } -} -extension NSString: NMBComparable { - public func NMB_compare(_ otherObject: NMBComparable!) -> ComparisonResult { - // swiftlint:disable:next force_cast - return compare(otherObject as! String) - } -} -#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/PostNotification.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/PostNotification.swift deleted file mode 100644 index 5e8bee3d..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/PostNotification.swift +++ /dev/null @@ -1,100 +0,0 @@ -import Foundation - -internal class NotificationCollector { - private(set) var observedNotifications: [Notification] - private let notificationCenter: NotificationCenter - private var token: NSObjectProtocol? - - required init(notificationCenter: NotificationCenter) { - self.notificationCenter = notificationCenter - self.observedNotifications = [] - } - - func startObserving() { - // swiftlint:disable:next line_length - self.token = self.notificationCenter.addObserver(forName: nil, object: nil, queue: nil) { [weak self] notification in - // linux-swift gets confused by .append(n) - self?.observedNotifications.append(notification) - } - } - - deinit { - if let token = self.token { - self.notificationCenter.removeObserver(token) - } - } -} - -private let mainThread = pthread_self() - -public func postNotifications( - _ predicate: Predicate<[Notification]>, - fromNotificationCenter center: NotificationCenter = .default -) -> Predicate { - _ = mainThread // Force lazy-loading of this value - let collector = NotificationCollector(notificationCenter: center) - collector.startObserving() - var once: Bool = false - - return Predicate { actualExpression in - let collectorNotificationsExpression = Expression( - memoizedExpression: { _ in - return collector.observedNotifications - }, - location: actualExpression.location, - withoutCaching: true - ) - - assert(pthread_equal(mainThread, pthread_self()) != 0, "Only expecting closure to be evaluated on main thread.") - if !once { - once = true - _ = try actualExpression.evaluate() - } - - let actualValue: String - if collector.observedNotifications.isEmpty { - actualValue = "no notifications" - } else { - actualValue = "<\(stringify(collector.observedNotifications))>" - } - - var result = try predicate.satisfies(collectorNotificationsExpression) - result.message = result.message.replacedExpectation { message in - return .expectedCustomValueTo(message.expectedMessage, actualValue) - } - return result - } -} - -public func postNotifications( - _ notificationsMatcher: T, - fromNotificationCenter center: NotificationCenter = .default) - -> Predicate - where T: Matcher, T.ValueType == [Notification] -{ - _ = mainThread // Force lazy-loading of this value - let collector = NotificationCollector(notificationCenter: center) - collector.startObserving() - var once: Bool = false - - return Predicate { actualExpression in - let collectorNotificationsExpression = Expression(memoizedExpression: { _ in - return collector.observedNotifications - }, location: actualExpression.location, withoutCaching: true) - - assert(pthread_equal(mainThread, pthread_self()) != 0, "Only expecting closure to be evaluated on main thread.") - if !once { - once = true - _ = try actualExpression.evaluate() - } - - let failureMessage = FailureMessage() - let match = try notificationsMatcher.matches(collectorNotificationsExpression, failureMessage: failureMessage) - if collector.observedNotifications.isEmpty { - failureMessage.actualValue = "no notifications" - } else { - failureMessage.actualValue = "<\(stringify(collector.observedNotifications))>" - } - return PredicateResult(bool: match, message: failureMessage.toExpectationMessage()) - } -} diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/Predicate.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/Predicate.swift deleted file mode 100644 index 2604411a..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/Predicate.swift +++ /dev/null @@ -1,353 +0,0 @@ -// New Matcher API -// -import Foundation - -/// A Predicate is part of the new matcher API that provides assertions to expectations. -/// -/// Given a code snippet: -/// -/// expect(1).to(equal(2)) -/// ^^^^^^^^ -/// Called a "matcher" -/// -/// A matcher consists of two parts a constructor function and the Predicate. The term Predicate -/// is used as a separate name from Matcher to help transition custom matchers to the new Nimble -/// matcher API. -/// -/// The Predicate provide the heavy lifting on how to assert against a given value. Internally, -/// predicates are simple wrappers around closures to provide static type information and -/// allow composition and wrapping of existing behaviors. -public struct Predicate { - fileprivate var matcher: (Expression) throws -> PredicateResult - - /// Constructs a predicate that knows how take a given value - public init(_ matcher: @escaping (Expression) throws -> PredicateResult) { - self.matcher = matcher - } - - /// Uses a predicate on a given value to see if it passes the predicate. - /// - /// @param expression The value to run the predicate's logic against - /// @returns A predicate result indicate passing or failing and an associated error message. - public func satisfies(_ expression: Expression) throws -> PredicateResult { - return try matcher(expression) - } -} - -/// Provides convenience helpers to defining predicates -extension Predicate { - /// Like Predicate() constructor, but automatically guard against nil (actual) values - public static func define(matcher: @escaping (Expression) throws -> PredicateResult) -> Predicate { - return Predicate { actual in - return try matcher(actual) - }.requireNonNil - } - - /// Defines a predicate with a default message that can be returned in the closure - /// Also ensures the predicate's actual value cannot pass with `nil` given. - public static func define(_ msg: String, matcher: @escaping (Expression, ExpectationMessage) throws -> PredicateResult) -> Predicate { - return Predicate { actual in - return try matcher(actual, .expectedActualValueTo(msg)) - }.requireNonNil - } - - /// Defines a predicate with a default message that can be returned in the closure - /// Unlike `define`, this allows nil values to succeed if the given closure chooses to. - public static func defineNilable(_ msg: String, matcher: @escaping (Expression, ExpectationMessage) throws -> PredicateResult) -> Predicate { - return Predicate { actual in - return try matcher(actual, .expectedActualValueTo(msg)) - } - } -} - -extension Predicate { - /// Provides a simple predicate definition that provides no control over the predefined - /// error message. - /// - /// Also ensures the predicate's actual value cannot pass with `nil` given. - public static func simple(_ msg: String, matcher: @escaping (Expression) throws -> PredicateStatus) -> Predicate { - return Predicate { actual in - return PredicateResult(status: try matcher(actual), message: .expectedActualValueTo(msg)) - }.requireNonNil - } - - /// Provides a simple predicate definition that provides no control over the predefined - /// error message. - /// - /// Unlike `simple`, this allows nil values to succeed if the given closure chooses to. - public static func simpleNilable(_ msg: String, matcher: @escaping (Expression) throws -> PredicateStatus) -> Predicate { - return Predicate { actual in - return PredicateResult(status: try matcher(actual), message: .expectedActualValueTo(msg)) - } - } -} - -// The Expectation style intended for comparison to a PredicateStatus. -public enum ExpectationStyle { - case toMatch, toNotMatch -} - -/// The value that a Predicates return to describe if the given (actual) value matches the -/// predicate. -public struct PredicateResult { - /// Status indicates if the predicate matches, does not match, or fails. - public var status: PredicateStatus - /// The error message that can be displayed if it does not match - public var message: ExpectationMessage - - /// Constructs a new PredicateResult with a given status and error message - public init(status: PredicateStatus, message: ExpectationMessage) { - self.status = status - self.message = message - } - - /// Shorthand to PredicateResult(status: PredicateStatus(bool: bool), message: message) - public init(bool: Bool, message: ExpectationMessage) { - self.status = PredicateStatus(bool: bool) - self.message = message - } - - /// Converts the result to a boolean based on what the expectation intended - public func toBoolean(expectation style: ExpectationStyle) -> Bool { - return status.toBoolean(expectation: style) - } -} - -/// PredicateStatus is a trinary that indicates if a Predicate matches a given value or not -public enum PredicateStatus { - /// Matches indicates if the predicate / matcher passes with the given value - /// - /// For example, `equals(1)` returns `.matches` for `expect(1).to(equal(1))`. - case matches - /// DoesNotMatch indicates if the predicate / matcher fails with the given value, but *would* - /// succeed if the expectation was inverted. - /// - /// For example, `equals(2)` returns `.doesNotMatch` for `expect(1).toNot(equal(2))`. - case doesNotMatch - /// Fail indicates the predicate will never satisfy with the given value in any case. - /// A perfect example is that most matchers fail whenever given `nil`. - /// - /// Using `equal(1)` fails both `expect(nil).to(equal(1))` and `expect(nil).toNot(equal(1))`. - /// Note: Predicate's `requireNonNil` property will also provide this feature mostly for free. - /// Your predicate will still need to guard against nils, but error messaging will be - /// handled for you. - case fail - - /// Converts a boolean to either .matches (if true) or .doesNotMatch (if false). - public init(bool matches: Bool) { - if matches { - self = .matches - } else { - self = .doesNotMatch - } - } - - private func shouldMatch() -> Bool { - switch self { - case .matches: return true - case .doesNotMatch, .fail: return false - } - } - - private func shouldNotMatch() -> Bool { - switch self { - case .doesNotMatch: return true - case .matches, .fail: return false - } - } - - /// Converts the PredicateStatus result to a boolean based on what the expectation intended - internal func toBoolean(expectation style: ExpectationStyle) -> Bool { - if style == .toMatch { - return shouldMatch() - } else { - return shouldNotMatch() - } - } -} - -// Backwards compatibility until Old Matcher API removal -extension Predicate: Matcher { - /// Compatibility layer for old Matcher API, deprecated - public static func fromDeprecatedFullClosure(_ matcher: @escaping (Expression, FailureMessage, Bool) throws -> Bool) -> Predicate { - return Predicate { actual in - let failureMessage = FailureMessage() - let result = try matcher(actual, failureMessage, true) - return PredicateResult( - status: PredicateStatus(bool: result), - message: failureMessage.toExpectationMessage() - ) - } - } - - /// Compatibility layer for old Matcher API, deprecated. - /// Emulates the MatcherFunc API - public static func fromDeprecatedClosure(_ matcher: @escaping (Expression, FailureMessage) throws -> Bool) -> Predicate { - return Predicate { actual in - let failureMessage = FailureMessage() - let result = try matcher(actual, failureMessage) - return PredicateResult( - status: PredicateStatus(bool: result), - message: failureMessage.toExpectationMessage() - ) - } - - } - - /// Compatibility layer for old Matcher API, deprecated. - /// Same as calling .predicate on a MatcherFunc or NonNilMatcherFunc type. - public static func fromDeprecatedMatcher(_ matcher: M) -> Predicate where M: Matcher, M.ValueType == T { - return self.fromDeprecatedFullClosure(matcher.toClosure) - } - - /// Deprecated Matcher API, use satisfies(_:_) instead - public func matches(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { - let result = try satisfies(actualExpression) - result.message.update(failureMessage: failureMessage) - return result.toBoolean(expectation: .toMatch) - } - - /// Deprecated Matcher API, use satisfies(_:_) instead - public func doesNotMatch(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { - let result = try satisfies(actualExpression) - result.message.update(failureMessage: failureMessage) - return result.toBoolean(expectation: .toNotMatch) - } -} - -extension Predicate { - // Someday, make this public? Needs documentation - internal func after(f: @escaping (Expression, PredicateResult) throws -> PredicateResult) -> Predicate { - // swiftlint:disable:previous identifier_name - return Predicate { actual -> PredicateResult in - let result = try self.satisfies(actual) - return try f(actual, result) - } - } - - /// Returns a new Predicate based on the current one that always fails if nil is given as - /// the actual value. - /// - /// This replaces `NonNilMatcherFunc`. - public var requireNonNil: Predicate { - return after { actual, result in - if try actual.evaluate() == nil { - return PredicateResult( - status: .fail, - message: result.message.appendedBeNilHint() - ) - } - return result - } - } -} - -#if canImport(Darwin) -public typealias PredicateBlock = (_ actualExpression: Expression) throws -> NMBPredicateResult - -public class NMBPredicate: NSObject { - private let predicate: PredicateBlock - - public init(predicate: @escaping PredicateBlock) { - self.predicate = predicate - } - - func satisfies(_ expression: @escaping () throws -> NSObject?, location: SourceLocation) -> NMBPredicateResult { - let expr = Expression(expression: expression, location: location) - do { - return try self.predicate(expr) - } catch let error { - return PredicateResult(status: .fail, message: .fail("unexpected error thrown: <\(error)>")).toObjectiveC() - } - } -} - -extension NMBPredicate: NMBMatcher { - public func matches(_ actualBlock: @escaping () -> NSObject?, failureMessage: FailureMessage, location: SourceLocation) -> Bool { - let result = satisfies(actualBlock, location: location).toSwift() - result.message.update(failureMessage: failureMessage) - return result.status.toBoolean(expectation: .toMatch) - } - - public func doesNotMatch(_ actualBlock: @escaping () -> NSObject?, failureMessage: FailureMessage, location: SourceLocation) -> Bool { - let result = satisfies(actualBlock, location: location).toSwift() - result.message.update(failureMessage: failureMessage) - return result.status.toBoolean(expectation: .toNotMatch) - } -} - -final public class NMBPredicateResult: NSObject { - public var status: NMBPredicateStatus - public var message: NMBExpectationMessage - - public init(status: NMBPredicateStatus, message: NMBExpectationMessage) { - self.status = status - self.message = message - } - - public init(bool success: Bool, message: NMBExpectationMessage) { - self.status = NMBPredicateStatus.from(bool: success) - self.message = message - } - - public func toSwift() -> PredicateResult { - return PredicateResult(status: status.toSwift(), - message: message.toSwift()) - } -} - -extension PredicateResult { - public func toObjectiveC() -> NMBPredicateResult { - return NMBPredicateResult(status: status.toObjectiveC(), message: message.toObjectiveC()) - } -} - -final public class NMBPredicateStatus: NSObject { - private let status: Int - private init(status: Int) { - self.status = status - } - - public static let matches: NMBPredicateStatus = NMBPredicateStatus(status: 0) - public static let doesNotMatch: NMBPredicateStatus = NMBPredicateStatus(status: 1) - public static let fail: NMBPredicateStatus = NMBPredicateStatus(status: 2) - - public override var hash: Int { return self.status.hashValue } - - public override func isEqual(_ object: Any?) -> Bool { - guard let otherPredicate = object as? NMBPredicateStatus else { - return false - } - return self.status == otherPredicate.status - } - - public static func from(status: PredicateStatus) -> NMBPredicateStatus { - switch status { - case .matches: return self.matches - case .doesNotMatch: return self.doesNotMatch - case .fail: return self.fail - } - } - - public static func from(bool success: Bool) -> NMBPredicateStatus { - return self.from(status: PredicateStatus(bool: success)) - } - - public func toSwift() -> PredicateStatus { - switch status { - case NMBPredicateStatus.matches.status: return .matches - case NMBPredicateStatus.doesNotMatch.status: return .doesNotMatch - case NMBPredicateStatus.fail.status: return .fail - default: - internalError("Unhandle status for NMBPredicateStatus") - } - } -} - -extension PredicateStatus { - public func toObjectiveC() -> NMBPredicateStatus { - return NMBPredicateStatus.from(status: self) - } -} - -#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/RaisesException.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/RaisesException.swift deleted file mode 100644 index 4dd93044..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/RaisesException.swift +++ /dev/null @@ -1,213 +0,0 @@ -import Foundation - -// This matcher requires the Objective-C, and being built by Xcode rather than the Swift Package Manager -#if canImport(Darwin) && !SWIFT_PACKAGE - -/// A Nimble matcher that succeeds when the actual expression raises an -/// exception with the specified name, reason, and/or userInfo. -/// -/// Alternatively, you can pass a closure to do any arbitrary custom matching -/// to the raised exception. The closure only gets called when an exception -/// is raised. -/// -/// nil arguments indicates that the matcher should not attempt to match against -/// that parameter. -public func raiseException( - named: String? = nil, - reason: String? = nil, - userInfo: NSDictionary? = nil, - closure: ((NSException) -> Void)? = nil) -> Predicate { - return Predicate { actualExpression in - var exception: NSException? - let capture = NMBExceptionCapture(handler: ({ e in - exception = e - }), finally: nil) - - do { - try capture.tryBlockThrows { - _ = try actualExpression.evaluate() - } - } catch { - return PredicateResult(status: .fail, message: .fail("unexpected error thrown: <\(error)>")) - } - - let failureMessage = FailureMessage() - setFailureMessageForException( - failureMessage, - exception: exception, - named: named, - reason: reason, - userInfo: userInfo, - closure: closure - ) - - let matches = exceptionMatchesNonNilFieldsOrClosure( - exception, - named: named, - reason: reason, - userInfo: userInfo, - closure: closure - ) - return PredicateResult(bool: matches, message: failureMessage.toExpectationMessage()) - } -} - -// swiftlint:disable:next function_parameter_count -internal func setFailureMessageForException( - _ failureMessage: FailureMessage, - exception: NSException?, - named: String?, - reason: String?, - userInfo: NSDictionary?, - closure: ((NSException) -> Void)?) { - failureMessage.postfixMessage = "raise exception" - - if let named = named { - failureMessage.postfixMessage += " with name <\(named)>" - } - if let reason = reason { - failureMessage.postfixMessage += " with reason <\(reason)>" - } - if let userInfo = userInfo { - failureMessage.postfixMessage += " with userInfo <\(userInfo)>" - } - if closure != nil { - failureMessage.postfixMessage += " that satisfies block" - } - if named == nil && reason == nil && userInfo == nil && closure == nil { - failureMessage.postfixMessage = "raise any exception" - } - - if let exception = exception { - // swiftlint:disable:next line_length - failureMessage.actualValue = "\(String(describing: type(of: exception))) { name=\(exception.name), reason='\(stringify(exception.reason))', userInfo=\(stringify(exception.userInfo)) }" - } else { - failureMessage.actualValue = "no exception" - } -} - -internal func exceptionMatchesNonNilFieldsOrClosure( - _ exception: NSException?, - named: String?, - reason: String?, - userInfo: NSDictionary?, - closure: ((NSException) -> Void)?) -> Bool { - var matches = false - - if let exception = exception { - matches = true - - if let named = named, exception.name.rawValue != named { - matches = false - } - if reason != nil && exception.reason != reason { - matches = false - } - if let userInfo = userInfo, let exceptionUserInfo = exception.userInfo, - (exceptionUserInfo as NSDictionary) != userInfo { - matches = false - } - if let closure = closure { - let assertions = gatherFailingExpectations { - closure(exception) - } - let messages = assertions.map { $0.message } - if messages.count > 0 { - matches = false - } - } - } - - return matches -} - -public class NMBObjCRaiseExceptionMatcher: NSObject, NMBMatcher { - // swiftlint:disable identifier_name - internal var _name: String? - internal var _reason: String? - internal var _userInfo: NSDictionary? - internal var _block: ((NSException) -> Void)? - // swiftlint:enable identifier_name - - internal init(name: String?, reason: String?, userInfo: NSDictionary?, block: ((NSException) -> Void)?) { - _name = name - _reason = reason - _userInfo = userInfo - _block = block - } - - @objc public func matches(_ actualBlock: @escaping () -> NSObject?, failureMessage: FailureMessage, location: SourceLocation) -> Bool { - let block: () -> Any? = ({ _ = actualBlock(); return nil }) - let expr = Expression(expression: block, location: location) - - do { - let predicate = raiseException( - named: _name, - reason: _reason, - userInfo: _userInfo, - closure: _block - ) - let result = try predicate.satisfies(expr) - result.message.update(failureMessage: failureMessage) - return result.toBoolean(expectation: .toMatch) - } catch let error { - failureMessage.stringValue = "unexpected error thrown: <\(error)>" - return false - } - } - - @objc public func doesNotMatch(_ actualBlock: @escaping () -> NSObject?, failureMessage: FailureMessage, location: SourceLocation) -> Bool { - return !matches(actualBlock, failureMessage: failureMessage, location: location) - } - - @objc public var named: (_ name: String) -> NMBObjCRaiseExceptionMatcher { - return { name in - return NMBObjCRaiseExceptionMatcher( - name: name, - reason: self._reason, - userInfo: self._userInfo, - block: self._block - ) - } - } - - @objc public var reason: (_ reason: String?) -> NMBObjCRaiseExceptionMatcher { - return { reason in - return NMBObjCRaiseExceptionMatcher( - name: self._name, - reason: reason, - userInfo: self._userInfo, - block: self._block - ) - } - } - - @objc public var userInfo: (_ userInfo: NSDictionary?) -> NMBObjCRaiseExceptionMatcher { - return { userInfo in - return NMBObjCRaiseExceptionMatcher( - name: self._name, - reason: self._reason, - userInfo: userInfo, - block: self._block - ) - } - } - - @objc public var satisfyingBlock: (_ block: ((NSException) -> Void)?) -> NMBObjCRaiseExceptionMatcher { - return { block in - return NMBObjCRaiseExceptionMatcher( - name: self._name, - reason: self._reason, - userInfo: self._userInfo, - block: block - ) - } - } -} - -extension NMBObjCMatcher { - @objc public class func raiseExceptionMatcher() -> NMBObjCRaiseExceptionMatcher { - return NMBObjCRaiseExceptionMatcher(name: nil, reason: nil, userInfo: nil, block: nil) - } -} -#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAllOf.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAllOf.swift deleted file mode 100644 index 15de060b..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAllOf.swift +++ /dev/null @@ -1,86 +0,0 @@ -import Foundation - -/// A Nimble matcher that succeeds when the actual value matches with all of the matchers -/// provided in the variable list of matchers. -public func satisfyAllOf(_ predicates: Predicate...) -> Predicate { - return satisfyAllOf(predicates) -} - -/// A Nimble matcher that succeeds when the actual value matches with all of the matchers -/// provided in the variable list of matchers. -public func satisfyAllOf(_ matchers: U...) -> Predicate - where U: Matcher, U.ValueType == T { - return satisfyAllOf(matchers.map { $0.predicate }) -} - -internal func satisfyAllOf(_ predicates: [Predicate]) -> Predicate { - return Predicate.define { actualExpression in - var postfixMessages = [String]() - var matches = true - for predicate in predicates { - let result = try predicate.satisfies(actualExpression) - if result.toBoolean(expectation: .toNotMatch) { - matches = false - } - postfixMessages.append("{\(result.message.expectedMessage)}") - } - - var msg: ExpectationMessage - if let actualValue = try actualExpression.evaluate() { - msg = .expectedCustomValueTo( - "match all of: " + postfixMessages.joined(separator: ", and "), - "\(actualValue)" - ) - } else { - msg = .expectedActualValueTo( - "match all of: " + postfixMessages.joined(separator: ", and ") - ) - } - - return PredicateResult(bool: matches, message: msg) - } -} - -public func && (left: Predicate, right: Predicate) -> Predicate { - return satisfyAllOf(left, right) -} - -#if canImport(Darwin) -extension NMBObjCMatcher { - @objc public class func satisfyAllOfMatcher(_ matchers: [NMBMatcher]) -> NMBPredicate { - return NMBPredicate { actualExpression in - if matchers.isEmpty { - return NMBPredicateResult( - status: NMBPredicateStatus.fail, - message: NMBExpectationMessage( - fail: "satisfyAllOf must be called with at least one matcher" - ) - ) - } - - var elementEvaluators = [Predicate]() - for matcher in matchers { - let elementEvaluator = Predicate { expression in - if let predicate = matcher as? NMBPredicate { - // swiftlint:disable:next line_length - return predicate.satisfies({ try expression.evaluate() }, location: actualExpression.location).toSwift() - } else { - let failureMessage = FailureMessage() - let success = matcher.matches( - // swiftlint:disable:next force_try - { try! expression.evaluate() }, - failureMessage: failureMessage, - location: actualExpression.location - ) - return PredicateResult(bool: success, message: failureMessage.toExpectationMessage()) - } - } - - elementEvaluators.append(elementEvaluator) - } - - return try satisfyAllOf(elementEvaluators).satisfies(actualExpression).toObjectiveC() - } - } -} -#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAnyOf.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAnyOf.swift deleted file mode 100644 index e8b379f1..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAnyOf.swift +++ /dev/null @@ -1,94 +0,0 @@ -import Foundation - -/// A Nimble matcher that succeeds when the actual value matches with any of the matchers -/// provided in the variable list of matchers. -public func satisfyAnyOf(_ predicates: Predicate...) -> Predicate { - return satisfyAnyOf(predicates) -} - -/// A Nimble matcher that succeeds when the actual value matches with any of the matchers -/// provided in the variable list of matchers. -public func satisfyAnyOf(_ matchers: U...) -> Predicate - where U: Matcher, U.ValueType == T { - return satisfyAnyOf(matchers.map { $0.predicate }) -} - -internal func satisfyAnyOf(_ predicates: [Predicate]) -> Predicate { - return Predicate.define { actualExpression in - var postfixMessages = [String]() - var matches = false - for predicate in predicates { - let result = try predicate.satisfies(actualExpression) - if result.toBoolean(expectation: .toMatch) { - matches = true - } - postfixMessages.append("{\(result.message.expectedMessage)}") - } - - var msg: ExpectationMessage - if let actualValue = try actualExpression.evaluate() { - msg = .expectedCustomValueTo( - "match one of: " + postfixMessages.joined(separator: ", or "), - "\(actualValue)" - ) - } else { - msg = .expectedActualValueTo( - "match one of: " + postfixMessages.joined(separator: ", or ") - ) - } - - return PredicateResult(bool: matches, message: msg) - } -} - -public func || (left: Predicate, right: Predicate) -> Predicate { - return satisfyAnyOf(left, right) -} - -public func || (left: NonNilMatcherFunc, right: NonNilMatcherFunc) -> Predicate { - return satisfyAnyOf(left, right) -} - -public func || (left: MatcherFunc, right: MatcherFunc) -> Predicate { - return satisfyAnyOf(left, right) -} - -#if canImport(Darwin) -extension NMBObjCMatcher { - @objc public class func satisfyAnyOfMatcher(_ matchers: [NMBMatcher]) -> NMBPredicate { - return NMBPredicate { actualExpression in - if matchers.isEmpty { - return NMBPredicateResult( - status: NMBPredicateStatus.fail, - message: NMBExpectationMessage( - fail: "satisfyAnyOf must be called with at least one matcher" - ) - ) - } - - var elementEvaluators = [Predicate]() - for matcher in matchers { - let elementEvaluator = Predicate { expression in - if let predicate = matcher as? NMBPredicate { - // swiftlint:disable:next line_length - return predicate.satisfies({ try expression.evaluate() }, location: actualExpression.location).toSwift() - } else { - let failureMessage = FailureMessage() - let success = matcher.matches( - // swiftlint:disable:next force_try - { try! expression.evaluate() }, - failureMessage: failureMessage, - location: actualExpression.location - ) - return PredicateResult(bool: success, message: failureMessage.toExpectationMessage()) - } - } - - elementEvaluators.append(elementEvaluator) - } - - return try satisfyAnyOf(elementEvaluators).satisfies(actualExpression).toObjectiveC() - } - } -} -#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/ThrowAssertion.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/ThrowAssertion.swift deleted file mode 100644 index 0124431a..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/ThrowAssertion.swift +++ /dev/null @@ -1,51 +0,0 @@ -import Foundation - -#if canImport(NimbleCwlPreconditionTesting) -import NimbleCwlPreconditionTesting -#endif - -public func throwAssertion() -> Predicate { - return Predicate { actualExpression in - #if arch(x86_64) && canImport(Darwin) - let message = ExpectationMessage.expectedTo("throw an assertion") - - var actualError: Error? - let caughtException: BadInstructionException? = catchBadInstruction { - #if os(tvOS) - if !NimbleEnvironment.activeInstance.suppressTVOSAssertionWarning { - print() - print("[Nimble Warning]: If you're getting stuck on a debugger breakpoint for a " + - "fatal error while using throwAssertion(), please disable 'Debug Executable' " + - "in your scheme. Go to 'Edit Scheme > Test > Info' and uncheck " + - "'Debug Executable'. If you've already done that, suppress this warning " + - "by setting `NimbleEnvironment.activeInstance.suppressTVOSAssertionWarning = true`. " + - "This is required because the standard methods of catching assertions " + - "(mach APIs) are unavailable for tvOS. Instead, the same mechanism the " + - "debugger uses is the fallback method for tvOS." - ) - print() - NimbleEnvironment.activeInstance.suppressTVOSAssertionWarning = true - } - #endif - do { - try actualExpression.evaluate() - } catch { - actualError = error - } - } - - if let actualError = actualError { - return PredicateResult( - bool: false, - message: message.appended(message: "; threw error instead <\(actualError)>") - ) - } else { - return PredicateResult(bool: caughtException != nil, message: message) - } - #else - fatalError("The throwAssertion Nimble matcher can only run on x86_64 platforms with " + - "Objective-C (e.g. macOS, iPhone 5s or later simulators). You can silence this error " + - "by placing the test case inside an #if arch(x86_64) or canImport(Darwin) conditional statement") - #endif - } -} diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/ThrowError.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/ThrowError.swift deleted file mode 100644 index d294ba39..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/ThrowError.swift +++ /dev/null @@ -1,264 +0,0 @@ -import Foundation - -/// A Nimble matcher that succeeds when the actual expression throws an -/// error of the specified type or from the specified case. -/// -/// Errors are tried to be compared by their implementation of Equatable, -/// otherwise they fallback to comparison by _domain and _code. -/// -/// Alternatively, you can pass a closure to do any arbitrary custom matching -/// to the thrown error. The closure only gets called when an error was thrown. -/// -/// nil arguments indicates that the matcher should not attempt to match against -/// that parameter. -public func throwError() -> Predicate { - return Predicate { actualExpression in - var actualError: Error? - do { - _ = try actualExpression.evaluate() - } catch { - actualError = error - } - - if let actualError = actualError { - return PredicateResult(bool: true, message: .expectedCustomValueTo("throw any error", "<\(actualError)>")) - } else { - return PredicateResult(bool: false, message: .expectedCustomValueTo("throw any error", "no error")) - } - } -} - -/// A Nimble matcher that succeeds when the actual expression throws an -/// error of the specified type or from the specified case. -/// -/// Errors are tried to be compared by their implementation of Equatable, -/// otherwise they fallback to comparision by _domain and _code. -/// -/// Alternatively, you can pass a closure to do any arbitrary custom matching -/// to the thrown error. The closure only gets called when an error was thrown. -/// -/// nil arguments indicates that the matcher should not attempt to match against -/// that parameter. -public func throwError(_ error: T, closure: ((Error) -> Void)? = nil) -> Predicate { - return Predicate { actualExpression in - var actualError: Error? - do { - _ = try actualExpression.evaluate() - } catch { - actualError = error - } - - let failureMessage = FailureMessage() - setFailureMessageForError( - failureMessage, - actualError: actualError, - error: error, - errorType: nil, - closure: closure - ) - - var matches = false - if let actualError = actualError, errorMatchesExpectedError(actualError, expectedError: error) { - matches = true - - if let closure = closure { - let assertions = gatherFailingExpectations { - closure(actualError) - } - let messages = assertions.map { $0.message } - if !messages.isEmpty { - matches = false - } - } - } - - return PredicateResult(bool: matches, message: failureMessage.toExpectationMessage()) - } -} - -/// A Nimble matcher that succeeds when the actual expression throws an -/// error of the specified type or from the specified case. -/// -/// Errors are tried to be compared by their implementation of Equatable, -/// otherwise they fallback to comparision by _domain and _code. -/// -/// Alternatively, you can pass a closure to do any arbitrary custom matching -/// to the thrown error. The closure only gets called when an error was thrown. -/// -/// nil arguments indicates that the matcher should not attempt to match against -/// that parameter. -public func throwError(_ error: T, closure: ((T) -> Void)? = nil) -> Predicate { - return Predicate { actualExpression in - var actualError: Error? - do { - _ = try actualExpression.evaluate() - } catch { - actualError = error - } - - let failureMessage = FailureMessage() - setFailureMessageForError( - failureMessage, - actualError: actualError, - error: error, - errorType: nil, - closure: closure - ) - - var matches = false - if let actualError = actualError as? T, error == actualError { - matches = true - - if let closure = closure { - let assertions = gatherFailingExpectations { - closure(actualError) - } - let messages = assertions.map { $0.message } - if !messages.isEmpty { - matches = false - } - } - } - - return PredicateResult(bool: matches, message: failureMessage.toExpectationMessage()) - } -} - -/// A Nimble matcher that succeeds when the actual expression throws an -/// error of the specified type or from the specified case. -/// -/// Errors are tried to be compared by their implementation of Equatable, -/// otherwise they fallback to comparision by _domain and _code. -/// -/// Alternatively, you can pass a closure to do any arbitrary custom matching -/// to the thrown error. The closure only gets called when an error was thrown. -/// -/// nil arguments indicates that the matcher should not attempt to match against -/// that parameter. -public func throwError( - errorType: T.Type, - closure: ((T) -> Void)? = nil) -> Predicate { - return Predicate { actualExpression in - var actualError: Error? - do { - _ = try actualExpression.evaluate() - } catch { - actualError = error - } - - let failureMessage = FailureMessage() - setFailureMessageForError( - failureMessage, - actualError: actualError, - error: nil, - errorType: errorType, - closure: closure - ) - - var matches = false - if let actualError = actualError { - matches = true - - if let actualError = actualError as? T { - if let closure = closure { - let assertions = gatherFailingExpectations { - closure(actualError) - } - let messages = assertions.map { $0.message } - if !messages.isEmpty { - matches = false - } - } - } else { - matches = (actualError is T) - // The closure expects another ErrorProtocol as argument, so this - // is _supposed_ to fail, so that it becomes more obvious. - if let closure = closure { - let assertions = gatherExpectations { - if let actual = actualError as? T { - closure(actual) - } - } - let messages = assertions.map { $0.message } - if !messages.isEmpty { - matches = false - } - } - } - } - - return PredicateResult(bool: matches, message: failureMessage.toExpectationMessage()) - } -} - -/// A Nimble matcher that succeeds when the actual expression throws any -/// error or when the passed closures' arbitrary custom matching succeeds. -/// -/// This duplication to it's generic adequate is required to allow to receive -/// values of the existential type `Error` in the closure. -/// -/// The closure only gets called when an error was thrown. -public func throwError(closure: @escaping ((Error) -> Void)) -> Predicate { - return Predicate { actualExpression in - var actualError: Error? - do { - _ = try actualExpression.evaluate() - } catch { - actualError = error - } - - let failureMessage = FailureMessage() - setFailureMessageForError(failureMessage, actualError: actualError, closure: closure) - - var matches = false - if let actualError = actualError { - matches = true - - let assertions = gatherFailingExpectations { - closure(actualError) - } - let messages = assertions.map { $0.message } - if !messages.isEmpty { - matches = false - } - } - - return PredicateResult(bool: matches, message: failureMessage.toExpectationMessage()) - } -} - -/// A Nimble matcher that succeeds when the actual expression throws any -/// error or when the passed closures' arbitrary custom matching succeeds. -/// -/// This duplication to it's generic adequate is required to allow to receive -/// values of the existential type `Error` in the closure. -/// -/// The closure only gets called when an error was thrown. -public func throwError(closure: @escaping ((T) -> Void)) -> Predicate { - return Predicate { actualExpression in - var actualError: Error? - do { - _ = try actualExpression.evaluate() - } catch { - actualError = error - } - - let failureMessage = FailureMessage() - setFailureMessageForError(failureMessage, actualError: actualError, closure: closure) - - var matches = false - if let actualError = actualError as? T { - matches = true - - let assertions = gatherFailingExpectations { - closure(actualError) - } - let messages = assertions.map { $0.message } - if !messages.isEmpty { - matches = false - } - } - - return PredicateResult(bool: matches, message: failureMessage.toExpectationMessage()) - } -} diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/ToSucceed.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/ToSucceed.swift deleted file mode 100644 index 01369bb3..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/ToSucceed.swift +++ /dev/null @@ -1,37 +0,0 @@ -/** - Used by the `toSucceed` matcher. - - This is the return type for the closure. - */ -public enum ToSucceedResult { - case succeeded - case failed(reason: String) -} - -/** - A Nimble matcher that takes in a closure for validation. - - Return `.succeeded` when the validation succeeds. - Return `.failed` with a failure reason when the validation fails. - */ -public func succeed() -> Predicate<() -> ToSucceedResult> { - return Predicate.define { actualExpression in - let optActual = try actualExpression.evaluate() - guard let actual = optActual else { - return PredicateResult(status: .fail, message: .fail("expected a closure, got ")) - } - - switch actual() { - case .succeeded: - return PredicateResult( - bool: true, - message: .expectedCustomValueTo("succeed", "") - ) - case .failed(let reason): - return PredicateResult( - bool: false, - message: .expectedCustomValueTo("succeed", " because <\(reason)>") - ) - } - } -} diff --git a/Example/Pods/Nimble/Sources/Nimble/Nimble.h b/Example/Pods/Nimble/Sources/Nimble/Nimble.h deleted file mode 100644 index bd45c5dd..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Nimble.h +++ /dev/null @@ -1,9 +0,0 @@ -#import -#import "NMBExceptionCapture.h" -#import "NMBStringify.h" -#import "DSL.h" - -#import "CwlPreconditionTesting.h" - -FOUNDATION_EXPORT double NimbleVersionNumber; -FOUNDATION_EXPORT const unsigned char NimbleVersionString[]; diff --git a/Example/Pods/Nimble/Sources/Nimble/Utils/Await.swift b/Example/Pods/Nimble/Sources/Nimble/Utils/Await.swift deleted file mode 100644 index ebd81d06..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Utils/Await.swift +++ /dev/null @@ -1,379 +0,0 @@ -import CoreFoundation -import Dispatch -import Foundation - -#if canImport(CDispatch) - import CDispatch -#endif - -private let timeoutLeeway = DispatchTimeInterval.milliseconds(1) -private let pollLeeway = DispatchTimeInterval.milliseconds(1) - -/// Stores debugging information about callers -internal struct WaitingInfo: CustomStringConvertible { - let name: String - let file: FileString - let lineNumber: UInt - - var description: String { - return "\(name) at \(file):\(lineNumber)" - } -} - -internal protocol WaitLock { - func acquireWaitingLock(_ fnName: String, file: FileString, line: UInt) - func releaseWaitingLock() - func isWaitingLocked() -> Bool -} - -internal class AssertionWaitLock: WaitLock { - private var currentWaiter: WaitingInfo? - init() { } - - func acquireWaitingLock(_ fnName: String, file: FileString, line: UInt) { - let info = WaitingInfo(name: fnName, file: file, lineNumber: line) - let isMainThread = Thread.isMainThread - nimblePrecondition( - isMainThread, - "InvalidNimbleAPIUsage", - "\(fnName) can only run on the main thread." - ) - nimblePrecondition( - currentWaiter == nil, - "InvalidNimbleAPIUsage", - """ - Nested async expectations are not allowed to avoid creating flaky tests. - - The call to - \t\(info) - triggered this exception because - \t\(currentWaiter!) - is currently managing the main run loop. - """ - ) - currentWaiter = info - } - - func isWaitingLocked() -> Bool { - return currentWaiter != nil - } - - func releaseWaitingLock() { - currentWaiter = nil - } -} - -internal enum AwaitResult { - /// Incomplete indicates None (aka - this value hasn't been fulfilled yet) - case incomplete - /// TimedOut indicates the result reached its defined timeout limit before returning - case timedOut - /// BlockedRunLoop indicates the main runloop is too busy processing other blocks to trigger - /// the timeout code. - /// - /// This may also mean the async code waiting upon may have never actually ran within the - /// required time because other timers & sources are running on the main run loop. - case blockedRunLoop - /// The async block successfully executed and returned a given result - case completed(T) - /// When a Swift Error is thrown - case errorThrown(Error) - /// When an Objective-C Exception is raised - case raisedException(NSException) - - func isIncomplete() -> Bool { - switch self { - case .incomplete: return true - default: return false - } - } - - func isCompleted() -> Bool { - switch self { - case .completed: return true - default: return false - } - } -} - -/// Holds the resulting value from an asynchronous expectation. -/// This class is thread-safe at receiving an "response" to this promise. -internal final class AwaitPromise { - private(set) internal var asyncResult: AwaitResult = .incomplete - private var signal: DispatchSemaphore - - init() { - signal = DispatchSemaphore(value: 1) - } - - deinit { - signal.signal() - } - - /// Resolves the promise with the given result if it has not been resolved. Repeated calls to - /// this method will resolve in a no-op. - /// - /// @returns a Bool that indicates if the async result was accepted or rejected because another - /// value was received first. - func resolveResult(_ result: AwaitResult) -> Bool { - if signal.wait(timeout: .now()) == .success { - self.asyncResult = result - return true - } else { - return false - } - } -} - -internal struct AwaitTrigger { - let timeoutSource: DispatchSourceTimer - let actionSource: DispatchSourceTimer? - let start: () throws -> Void -} - -/// Factory for building fully configured AwaitPromises and waiting for their results. -/// -/// This factory stores all the state for an async expectation so that Await doesn't -/// doesn't have to manage it. -internal class AwaitPromiseBuilder { - let awaiter: Awaiter - let waitLock: WaitLock - let trigger: AwaitTrigger - let promise: AwaitPromise - - internal init( - awaiter: Awaiter, - waitLock: WaitLock, - promise: AwaitPromise, - trigger: AwaitTrigger) { - self.awaiter = awaiter - self.waitLock = waitLock - self.promise = promise - self.trigger = trigger - } - - func timeout(_ timeoutInterval: TimeInterval, forcefullyAbortTimeout: TimeInterval) -> Self { - // = Discussion = - // - // There's a lot of technical decisions here that is useful to elaborate on. This is - // definitely more lower-level than the previous NSRunLoop based implementation. - // - // - // Why Dispatch Source? - // - // - // We're using a dispatch source to have better control of the run loop behavior. - // A timer source gives us deferred-timing control without having to rely as much on - // a run loop's traditional dispatching machinery (eg - NSTimers, DefaultRunLoopMode, etc.) - // which is ripe for getting corrupted by application code. - // - // And unlike dispatch_async(), we can control how likely our code gets prioritized to - // executed (see leeway parameter) + DISPATCH_TIMER_STRICT. - // - // This timer is assumed to run on the HIGH priority queue to ensure it maintains the - // highest priority over normal application / test code when possible. - // - // - // Run Loop Management - // - // In order to properly interrupt the waiting behavior performed by this factory class, - // this timer stops the main run loop to tell the waiter code that the result should be - // checked. - // - // In addition, stopping the run loop is used to halt code executed on the main run loop. - trigger.timeoutSource.schedule( - deadline: DispatchTime.now() + timeoutInterval, - repeating: .never, - leeway: timeoutLeeway - ) - trigger.timeoutSource.setEventHandler { - guard self.promise.asyncResult.isIncomplete() else { return } - let timedOutSem = DispatchSemaphore(value: 0) - let semTimedOutOrBlocked = DispatchSemaphore(value: 0) - semTimedOutOrBlocked.signal() - let runLoop = CFRunLoopGetMain() - #if canImport(Darwin) - let runLoopMode = CFRunLoopMode.defaultMode.rawValue - #else - let runLoopMode = kCFRunLoopDefaultMode - #endif - CFRunLoopPerformBlock(runLoop, runLoopMode) { - if semTimedOutOrBlocked.wait(timeout: .now()) == .success { - timedOutSem.signal() - semTimedOutOrBlocked.signal() - if self.promise.resolveResult(.timedOut) { - CFRunLoopStop(CFRunLoopGetMain()) - } - } - } - // potentially interrupt blocking code on run loop to let timeout code run - CFRunLoopStop(runLoop) - let now = DispatchTime.now() + forcefullyAbortTimeout - let didNotTimeOut = timedOutSem.wait(timeout: now) != .success - let timeoutWasNotTriggered = semTimedOutOrBlocked.wait(timeout: .now()) == .success - if didNotTimeOut && timeoutWasNotTriggered { - if self.promise.resolveResult(.blockedRunLoop) { - CFRunLoopStop(CFRunLoopGetMain()) - } - } - } - return self - } - - /// Blocks for an asynchronous result. - /// - /// @discussion - /// This function must be executed on the main thread and cannot be nested. This is because - /// this function (and it's related methods) coordinate through the main run loop. Tampering - /// with the run loop can cause undesirable behavior. - /// - /// This method will return an AwaitResult in the following cases: - /// - /// - The main run loop is blocked by other operations and the async expectation cannot be - /// be stopped. - /// - The async expectation timed out - /// - The async expectation succeeded - /// - The async expectation raised an unexpected exception (objc) - /// - The async expectation raised an unexpected error (swift) - /// - /// The returned AwaitResult will NEVER be .incomplete. - func wait(_ fnName: String = #function, file: FileString = #file, line: UInt = #line) -> AwaitResult { - waitLock.acquireWaitingLock( - fnName, - file: file, - line: line) - - let capture = NMBExceptionCapture(handler: ({ exception in - _ = self.promise.resolveResult(.raisedException(exception)) - }), finally: ({ - self.waitLock.releaseWaitingLock() - })) - capture.tryBlock { - do { - try self.trigger.start() - } catch let error { - _ = self.promise.resolveResult(.errorThrown(error)) - } - self.trigger.timeoutSource.resume() - while self.promise.asyncResult.isIncomplete() { - // Stopping the run loop does not work unless we run only 1 mode - #if (swift(>=4.2) && canImport(Darwin)) || compiler(>=5.0) - _ = RunLoop.current.run(mode: .default, before: .distantFuture) - #else - _ = RunLoop.current.run(mode: .defaultRunLoopMode, before: .distantFuture) - #endif - } - - self.trigger.timeoutSource.cancel() - if let asyncSource = self.trigger.actionSource { - asyncSource.cancel() - } - } - - return promise.asyncResult - } -} - -internal class Awaiter { - let waitLock: WaitLock - let timeoutQueue: DispatchQueue - let asyncQueue: DispatchQueue - - internal init( - waitLock: WaitLock, - asyncQueue: DispatchQueue, - timeoutQueue: DispatchQueue) { - self.waitLock = waitLock - self.asyncQueue = asyncQueue - self.timeoutQueue = timeoutQueue - } - - private func createTimerSource(_ queue: DispatchQueue) -> DispatchSourceTimer { - return DispatchSource.makeTimerSource(flags: .strict, queue: queue) - } - - func performBlock( - file: FileString, - line: UInt, - _ closure: @escaping (@escaping (T) -> Void) throws -> Void - ) -> AwaitPromiseBuilder { - let promise = AwaitPromise() - let timeoutSource = createTimerSource(timeoutQueue) - var completionCount = 0 - let trigger = AwaitTrigger(timeoutSource: timeoutSource, actionSource: nil) { - try closure { result in - completionCount += 1 - if completionCount < 2 { - func completeBlock() { - if promise.resolveResult(.completed(result)) { - CFRunLoopStop(CFRunLoopGetMain()) - } - } - - if Thread.isMainThread { - completeBlock() - } else { - DispatchQueue.main.async { completeBlock() } - } - } else { - fail("waitUntil(..) expects its completion closure to be only called once", - file: file, line: line) - } - } - } - - return AwaitPromiseBuilder( - awaiter: self, - waitLock: waitLock, - promise: promise, - trigger: trigger) - } - - func poll(_ pollInterval: TimeInterval, closure: @escaping () throws -> T?) -> AwaitPromiseBuilder { - let promise = AwaitPromise() - let timeoutSource = createTimerSource(timeoutQueue) - let asyncSource = createTimerSource(asyncQueue) - let trigger = AwaitTrigger(timeoutSource: timeoutSource, actionSource: asyncSource) { - let interval = DispatchTimeInterval.nanoseconds(Int(pollInterval * TimeInterval(NSEC_PER_SEC))) - asyncSource.schedule(deadline: .now(), repeating: interval, leeway: pollLeeway) - asyncSource.setEventHandler { - do { - if let result = try closure() { - if promise.resolveResult(.completed(result)) { - CFRunLoopStop(CFRunLoopGetCurrent()) - } - } - } catch let error { - if promise.resolveResult(.errorThrown(error)) { - CFRunLoopStop(CFRunLoopGetCurrent()) - } - } - } - asyncSource.resume() - } - - return AwaitPromiseBuilder( - awaiter: self, - waitLock: waitLock, - promise: promise, - trigger: trigger) - } -} - -internal func pollBlock( - pollInterval: TimeInterval, - timeoutInterval: TimeInterval, - file: FileString, - line: UInt, - fnName: String = #function, - expression: @escaping () throws -> Bool) -> AwaitResult { - let awaiter = NimbleEnvironment.activeInstance.awaiter - let result = awaiter.poll(pollInterval) { () throws -> Bool? in - if try expression() { - return true - } - return nil - }.timeout(timeoutInterval, forcefullyAbortTimeout: timeoutInterval / 2.0).wait(fnName, file: file, line: line) - - return result -} diff --git a/Example/Pods/Nimble/Sources/Nimble/Utils/Errors.swift b/Example/Pods/Nimble/Sources/Nimble/Utils/Errors.swift deleted file mode 100644 index 074cb203..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Utils/Errors.swift +++ /dev/null @@ -1,59 +0,0 @@ -import Foundation - -// Generic - -internal func setFailureMessageForError( - _ failureMessage: FailureMessage, - postfixMessageVerb: String = "throw", - actualError: Error?, - error: T? = nil, - errorType: T.Type? = nil, - closure: ((T) -> Void)? = nil) { - failureMessage.postfixMessage = "\(postfixMessageVerb) error" - - if let error = error { - failureMessage.postfixMessage += " <\(error)>" - } else if errorType != nil || closure != nil { - failureMessage.postfixMessage += " from type <\(T.self)>" - } - if closure != nil { - failureMessage.postfixMessage += " that satisfies block" - } - if error == nil && errorType == nil && closure == nil { - failureMessage.postfixMessage = "\(postfixMessageVerb) any error" - } - - if let actualError = actualError { - failureMessage.actualValue = "<\(actualError)>" - } else { - failureMessage.actualValue = "no error" - } -} - -internal func errorMatchesExpectedError( - _ actualError: Error, - expectedError: T) -> Bool { - return actualError._domain == expectedError._domain - && actualError._code == expectedError._code -} - -// Non-generic - -internal func setFailureMessageForError( - _ failureMessage: FailureMessage, - actualError: Error?, - closure: ((Error) -> Void)?) { - failureMessage.postfixMessage = "throw error" - - if closure != nil { - failureMessage.postfixMessage += " that satisfies block" - } else { - failureMessage.postfixMessage = "throw any error" - } - - if let actualError = actualError { - failureMessage.actualValue = "<\(actualError)>" - } else { - failureMessage.actualValue = "no error" - } -} diff --git a/Example/Pods/Nimble/Sources/Nimble/Utils/Functional.swift b/Example/Pods/Nimble/Sources/Nimble/Utils/Functional.swift deleted file mode 100644 index c87af761..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Utils/Functional.swift +++ /dev/null @@ -1,14 +0,0 @@ -import Foundation - -#if !swift(>=4.2) -extension Sequence { - internal func allSatisfy(_ predicate: (Element) throws -> Bool) rethrows -> Bool { - for item in self { - if try !predicate(item) { - return false - } - } - return true - } -} -#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Utils/SourceLocation.swift b/Example/Pods/Nimble/Sources/Nimble/Utils/SourceLocation.swift deleted file mode 100644 index 4e37aefa..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Utils/SourceLocation.swift +++ /dev/null @@ -1,31 +0,0 @@ -import Foundation - -// Ideally we would always use `StaticString` as the type for tracking the file name -// that expectations originate from, for consistency with `assert` etc. from the -// stdlib, and because recent versions of the XCTest overlay require `StaticString` -// when calling `XCTFail`. Under the Objective-C runtime (i.e. building on Mac), we -// have to use `String` instead because StaticString can't be generated from Objective-C -#if SWIFT_PACKAGE -public typealias FileString = StaticString -#else -public typealias FileString = String -#endif - -public final class SourceLocation: NSObject { - public let file: FileString - public let line: UInt - - override init() { - file = "Unknown File" - line = 0 - } - - init(file: FileString, line: UInt) { - self.file = file - self.line = line - } - - override public var description: String { - return "\(file):\(line)" - } -} diff --git a/Example/Pods/Nimble/Sources/Nimble/Utils/Stringers.swift b/Example/Pods/Nimble/Sources/Nimble/Utils/Stringers.swift deleted file mode 100644 index 7caea26a..00000000 --- a/Example/Pods/Nimble/Sources/Nimble/Utils/Stringers.swift +++ /dev/null @@ -1,196 +0,0 @@ -import Foundation - -internal func identityAsString(_ value: Any?) -> String { - let anyObject = value as AnyObject? - if let value = anyObject { - return NSString(format: "<%p>", unsafeBitCast(value, to: Int.self)).description - } else { - return "nil" - } -} - -internal func arrayAsString(_ items: [T], joiner: String = ", ") -> String { - return items.reduce("") { accum, item in - let prefix = (accum.isEmpty ? "" : joiner) - return accum + prefix + "\(stringify(item))" - } -} - -/// A type with a customized test output text representation. -/// -/// This textual representation is produced when values will be -/// printed in test runs, and may be useful when producing -/// error messages in custom matchers. -/// -/// - SeeAlso: `CustomDebugStringConvertible` -public protocol TestOutputStringConvertible { - var testDescription: String { get } -} - -extension Double: TestOutputStringConvertible { - public var testDescription: String { - return NSNumber(value: self).testDescription - } -} - -extension Float: TestOutputStringConvertible { - public var testDescription: String { - return NSNumber(value: self).testDescription - } -} - -extension NSNumber: TestOutputStringConvertible { - // This is using `NSString(format:)` instead of - // `String(format:)` because the latter somehow breaks - // the travis CI build on linux. - public var testDescription: String { - let description = self.description - - if description.contains(".") { - // Travis linux swiftpm build doesn't like casting String to NSString, - // which is why this annoying nested initializer thing is here. - // Maybe this will change in a future snapshot. - let decimalPlaces = NSString(string: NSString(string: description) - .components(separatedBy: ".")[1]) - - // SeeAlso: https://bugs.swift.org/browse/SR-1464 - switch decimalPlaces.length { - case 1: - return NSString(format: "%0.1f", self.doubleValue).description - case 2: - return NSString(format: "%0.2f", self.doubleValue).description - case 3: - return NSString(format: "%0.3f", self.doubleValue).description - default: - return NSString(format: "%0.4f", self.doubleValue).description - } - } - return self.description - } -} - -extension Array: TestOutputStringConvertible { - public var testDescription: String { - let list = self.map(Nimble.stringify).joined(separator: ", ") - return "[\(list)]" - } -} - -extension AnySequence: TestOutputStringConvertible { - public var testDescription: String { - let generator = self.makeIterator() - var strings = [String]() - var value: AnySequence.Iterator.Element? - - repeat { - value = generator.next() - if let value = value { - strings.append(stringify(value)) - } - } while value != nil - - let list = strings.joined(separator: ", ") - return "[\(list)]" - } -} - -extension NSArray: TestOutputStringConvertible { - public var testDescription: String { - let list = Array(self).map(Nimble.stringify).joined(separator: ", ") - return "(\(list))" - } -} - -extension NSIndexSet: TestOutputStringConvertible { - public var testDescription: String { - let list = Array(self).map(Nimble.stringify).joined(separator: ", ") - return "(\(list))" - } -} - -extension String: TestOutputStringConvertible { - public var testDescription: String { - return self - } -} - -extension Data: TestOutputStringConvertible { - public var testDescription: String { - return "Data" - } -} - -/// -/// Returns a string appropriate for displaying in test output -/// from the provided value. -/// -/// - parameter value: A value that will show up in a test's output. -/// -/// - returns: The string that is returned can be -/// customized per type by conforming a type to the `TestOutputStringConvertible` -/// protocol. When stringifying a non-`TestOutputStringConvertible` type, this -/// function will return the value's debug description and then its -/// normal description if available and in that order. Otherwise it -/// will return the result of constructing a string from the value. -/// -/// - SeeAlso: `TestOutputStringConvertible` -public func stringify(_ value: T?) -> String { - guard let value = value else { return "nil" } - - if let value = value as? TestOutputStringConvertible { - return value.testDescription - } - - if let value = value as? CustomDebugStringConvertible { - return value.debugDescription - } - - return String(describing: value) -} - -#if canImport(Darwin) -@objc public class NMBStringer: NSObject { - @objc public class func stringify(_ obj: Any?) -> String { - return Nimble.stringify(obj) - } -} -#endif - -// MARK: Collection Type Stringers - -/// Attempts to generate a pretty type string for a given value. If the value is of a Objective-C -/// collection type, or a subclass thereof, (e.g. `NSArray`, `NSDictionary`, etc.). -/// This function will return the type name of the root class of the class cluster for better -/// readability (e.g. `NSArray` instead of `__NSArrayI`). -/// -/// For values that don't have a type of an Objective-C collection, this function returns the -/// default type description. -/// -/// - parameter value: A value that will be used to determine a type name. -/// -/// - returns: The name of the class cluster root class for Objective-C collection types, or the -/// the `dynamicType` of the value for values of any other type. -public func prettyCollectionType(_ value: T) -> String { - switch value { - case is NSArray: - return String(describing: NSArray.self) - case is NSDictionary: - return String(describing: NSDictionary.self) - case is NSSet: - return String(describing: NSSet.self) - case is NSIndexSet: - return String(describing: NSIndexSet.self) - default: - return String(describing: value) - } -} - -/// Returns the type name for a given collection type. This overload is used by Swift -/// collection types. -/// -/// - parameter collection: A Swift `CollectionType` value. -/// -/// - returns: A string representing the `dynamicType` of the value. -public func prettyCollectionType(_ collection: T) -> String { - return String(describing: type(of: collection)) -} diff --git a/Example/Pods/Nimble/Sources/NimbleObjectiveC/DSL.h b/Example/Pods/Nimble/Sources/NimbleObjectiveC/DSL.h deleted file mode 100644 index 9170541b..00000000 --- a/Example/Pods/Nimble/Sources/NimbleObjectiveC/DSL.h +++ /dev/null @@ -1,389 +0,0 @@ -#import - -@class NMBExpectation; -@class NMBObjCBeCloseToMatcher; -@class NMBObjCRaiseExceptionMatcher; -@protocol NMBMatcher; - - -NS_ASSUME_NONNULL_BEGIN - - -#define NIMBLE_OVERLOADABLE __attribute__((overloadable)) -#define NIMBLE_EXPORT FOUNDATION_EXPORT -#define NIMBLE_EXPORT_INLINE FOUNDATION_STATIC_INLINE - -#define NIMBLE_VALUE_OF(VAL) ({ \ - __typeof__((VAL)) val = (VAL); \ - [NSValue valueWithBytes:&val objCType:@encode(__typeof__((VAL)))]; \ -}) - -#ifdef NIMBLE_DISABLE_SHORT_SYNTAX -#define NIMBLE_SHORT(PROTO, ORIGINAL) -#define NIMBLE_SHORT_OVERLOADED(PROTO, ORIGINAL) -#else -#define NIMBLE_SHORT(PROTO, ORIGINAL) FOUNDATION_STATIC_INLINE PROTO { return (ORIGINAL); } -#define NIMBLE_SHORT_OVERLOADED(PROTO, ORIGINAL) FOUNDATION_STATIC_INLINE NIMBLE_OVERLOADABLE PROTO { return (ORIGINAL); } -#endif - - - -#define DEFINE_NMB_EXPECT_OVERLOAD(TYPE, EXPR) \ - NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ - NMBExpectation *NMB_expect(TYPE(^actualBlock)(void), NSString *file, NSUInteger line) { \ - return NMB_expect(^id { return EXPR; }, file, line); \ - } - - NIMBLE_EXPORT NIMBLE_OVERLOADABLE - NMBExpectation *NMB_expect(id(^actualBlock)(void), NSString *file, NSUInteger line); - - // overloaded dispatch for nils - expect(nil) - DEFINE_NMB_EXPECT_OVERLOAD(void*, nil) - DEFINE_NMB_EXPECT_OVERLOAD(NSRange, NIMBLE_VALUE_OF(actualBlock())) - DEFINE_NMB_EXPECT_OVERLOAD(long, @(actualBlock())) - DEFINE_NMB_EXPECT_OVERLOAD(unsigned long, @(actualBlock())) - DEFINE_NMB_EXPECT_OVERLOAD(int, @(actualBlock())) - DEFINE_NMB_EXPECT_OVERLOAD(unsigned int, @(actualBlock())) - DEFINE_NMB_EXPECT_OVERLOAD(float, @(actualBlock())) - DEFINE_NMB_EXPECT_OVERLOAD(double, @(actualBlock())) - DEFINE_NMB_EXPECT_OVERLOAD(long long, @(actualBlock())) - DEFINE_NMB_EXPECT_OVERLOAD(unsigned long long, @(actualBlock())) - DEFINE_NMB_EXPECT_OVERLOAD(char, @(actualBlock())) - DEFINE_NMB_EXPECT_OVERLOAD(unsigned char, @(actualBlock())) - // bool doesn't get the compiler to dispatch to BOOL types, but using BOOL here seems to allow - // the compiler to dispatch to bool. - DEFINE_NMB_EXPECT_OVERLOAD(BOOL, @(actualBlock())) - DEFINE_NMB_EXPECT_OVERLOAD(char *, @(actualBlock())) - - -#undef DEFINE_NMB_EXPECT_OVERLOAD - - - -NIMBLE_EXPORT NMBExpectation *NMB_expectAction(void(^actualBlock)(void), NSString *file, NSUInteger line); - - - -#define DEFINE_OVERLOAD(TYPE, EXPR) \ - NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ - id NMB_equal(TYPE expectedValue) { \ - return NMB_equal((EXPR)); \ - } \ - NIMBLE_SHORT_OVERLOADED(id equal(TYPE expectedValue), NMB_equal(expectedValue)); - - - NIMBLE_EXPORT NIMBLE_OVERLOADABLE - id NMB_equal(__nullable id expectedValue); - - NIMBLE_SHORT_OVERLOADED(id equal(__nullable id expectedValue), - NMB_equal(expectedValue)); - - // overloaded dispatch for nils - expect(nil) - DEFINE_OVERLOAD(void*__nullable, (id)nil) - DEFINE_OVERLOAD(NSRange, NIMBLE_VALUE_OF(expectedValue)) - DEFINE_OVERLOAD(long, @(expectedValue)) - DEFINE_OVERLOAD(unsigned long, @(expectedValue)) - DEFINE_OVERLOAD(int, @(expectedValue)) - DEFINE_OVERLOAD(unsigned int, @(expectedValue)) - DEFINE_OVERLOAD(float, @(expectedValue)) - DEFINE_OVERLOAD(double, @(expectedValue)) - DEFINE_OVERLOAD(long long, @(expectedValue)) - DEFINE_OVERLOAD(unsigned long long, @(expectedValue)) - DEFINE_OVERLOAD(char, @(expectedValue)) - DEFINE_OVERLOAD(unsigned char, @(expectedValue)) - // bool doesn't get the compiler to dispatch to BOOL types, but using BOOL here seems to allow - // the compiler to dispatch to bool. - DEFINE_OVERLOAD(BOOL, @(expectedValue)) - DEFINE_OVERLOAD(char *, @(expectedValue)) - -#undef DEFINE_OVERLOAD - - -#define DEFINE_OVERLOAD(TYPE, EXPR) \ - NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ - id NMB_haveCount(TYPE expectedValue) { \ - return NMB_haveCount((EXPR)); \ - } \ - NIMBLE_SHORT_OVERLOADED(id haveCount(TYPE expectedValue), \ - NMB_haveCount(expectedValue)); - - - NIMBLE_EXPORT NIMBLE_OVERLOADABLE - id NMB_haveCount(id expectedValue); - - NIMBLE_SHORT_OVERLOADED(id haveCount(id expectedValue), - NMB_haveCount(expectedValue)); - - DEFINE_OVERLOAD(long, @(expectedValue)) - DEFINE_OVERLOAD(unsigned long, @(expectedValue)) - DEFINE_OVERLOAD(int, @(expectedValue)) - DEFINE_OVERLOAD(unsigned int, @(expectedValue)) - DEFINE_OVERLOAD(long long, @(expectedValue)) - DEFINE_OVERLOAD(unsigned long long, @(expectedValue)) - DEFINE_OVERLOAD(char, @(expectedValue)) - DEFINE_OVERLOAD(unsigned char, @(expectedValue)) - -#undef DEFINE_OVERLOAD - -#define DEFINE_OVERLOAD(TYPE, EXPR) \ - NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ - NMBObjCBeCloseToMatcher *NMB_beCloseTo(TYPE expectedValue) { \ - return NMB_beCloseTo((NSNumber *)(EXPR)); \ - } \ - NIMBLE_SHORT_OVERLOADED(NMBObjCBeCloseToMatcher *beCloseTo(TYPE expectedValue), \ - NMB_beCloseTo(expectedValue)); - - NIMBLE_EXPORT NIMBLE_OVERLOADABLE NMBObjCBeCloseToMatcher *NMB_beCloseTo(NSNumber *expectedValue); - NIMBLE_SHORT_OVERLOADED(NMBObjCBeCloseToMatcher *beCloseTo(NSNumber *expectedValue), - NMB_beCloseTo(expectedValue)); - - // it would be better to only overload float & double, but zero becomes ambigious - - DEFINE_OVERLOAD(long, @(expectedValue)) - DEFINE_OVERLOAD(unsigned long, @(expectedValue)) - DEFINE_OVERLOAD(int, @(expectedValue)) - DEFINE_OVERLOAD(unsigned int, @(expectedValue)) - DEFINE_OVERLOAD(float, @(expectedValue)) - DEFINE_OVERLOAD(double, @(expectedValue)) - DEFINE_OVERLOAD(long long, @(expectedValue)) - DEFINE_OVERLOAD(unsigned long long, @(expectedValue)) - DEFINE_OVERLOAD(char, @(expectedValue)) - DEFINE_OVERLOAD(unsigned char, @(expectedValue)) - -#undef DEFINE_OVERLOAD - -NIMBLE_EXPORT id NMB_beAnInstanceOf(Class expectedClass); -NIMBLE_EXPORT_INLINE id beAnInstanceOf(Class expectedClass) { - return NMB_beAnInstanceOf(expectedClass); -} - -NIMBLE_EXPORT id NMB_beAKindOf(Class expectedClass); -NIMBLE_EXPORT_INLINE id beAKindOf(Class expectedClass) { - return NMB_beAKindOf(expectedClass); -} - -NIMBLE_EXPORT id NMB_beginWith(id itemElementOrSubstring); -NIMBLE_EXPORT_INLINE id beginWith(id itemElementOrSubstring) { - return NMB_beginWith(itemElementOrSubstring); -} - -#define DEFINE_OVERLOAD(TYPE, EXPR) \ - NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ - id NMB_beGreaterThan(TYPE expectedValue) { \ - return NMB_beGreaterThan((EXPR)); \ - } \ - NIMBLE_SHORT_OVERLOADED(id beGreaterThan(TYPE expectedValue), NMB_beGreaterThan(expectedValue)); - - NIMBLE_EXPORT NIMBLE_OVERLOADABLE - id NMB_beGreaterThan(NSNumber *expectedValue); - - NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE - id beGreaterThan(NSNumber *expectedValue) { - return NMB_beGreaterThan(expectedValue); - } - - DEFINE_OVERLOAD(long, @(expectedValue)) - DEFINE_OVERLOAD(unsigned long, @(expectedValue)) - DEFINE_OVERLOAD(int, @(expectedValue)) - DEFINE_OVERLOAD(unsigned int, @(expectedValue)) - DEFINE_OVERLOAD(float, @(expectedValue)) - DEFINE_OVERLOAD(double, @(expectedValue)) - DEFINE_OVERLOAD(long long, @(expectedValue)) - DEFINE_OVERLOAD(unsigned long long, @(expectedValue)) - DEFINE_OVERLOAD(char, @(expectedValue)) - DEFINE_OVERLOAD(unsigned char, @(expectedValue)) - -#undef DEFINE_OVERLOAD - -#define DEFINE_OVERLOAD(TYPE, EXPR) \ - NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ - id NMB_beGreaterThanOrEqualTo(TYPE expectedValue) { \ - return NMB_beGreaterThanOrEqualTo((EXPR)); \ - } \ - NIMBLE_SHORT_OVERLOADED(id beGreaterThanOrEqualTo(TYPE expectedValue), \ - NMB_beGreaterThanOrEqualTo(expectedValue)); - - NIMBLE_EXPORT NIMBLE_OVERLOADABLE - id NMB_beGreaterThanOrEqualTo(NSNumber *expectedValue); - - NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE - id beGreaterThanOrEqualTo(NSNumber *expectedValue) { - return NMB_beGreaterThanOrEqualTo(expectedValue); - } - - DEFINE_OVERLOAD(long, @(expectedValue)) - DEFINE_OVERLOAD(unsigned long, @(expectedValue)) - DEFINE_OVERLOAD(int, @(expectedValue)) - DEFINE_OVERLOAD(unsigned int, @(expectedValue)) - DEFINE_OVERLOAD(float, @(expectedValue)) - DEFINE_OVERLOAD(double, @(expectedValue)) - DEFINE_OVERLOAD(long long, @(expectedValue)) - DEFINE_OVERLOAD(unsigned long long, @(expectedValue)) - DEFINE_OVERLOAD(char, @(expectedValue)) - DEFINE_OVERLOAD(unsigned char, @(expectedValue)) - - -#undef DEFINE_OVERLOAD - -NIMBLE_EXPORT id NMB_beIdenticalTo(id expectedInstance); -NIMBLE_SHORT(id beIdenticalTo(id expectedInstance), - NMB_beIdenticalTo(expectedInstance)); - -NIMBLE_EXPORT id NMB_be(id expectedInstance); -NIMBLE_SHORT(id be(id expectedInstance), - NMB_be(expectedInstance)); - - -#define DEFINE_OVERLOAD(TYPE, EXPR) \ - NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ - id NMB_beLessThan(TYPE expectedValue) { \ - return NMB_beLessThan((EXPR)); \ - } \ - NIMBLE_SHORT_OVERLOADED(id beLessThan(TYPE expectedValue), \ - NMB_beLessThan(expectedValue)); - - NIMBLE_EXPORT NIMBLE_OVERLOADABLE - id NMB_beLessThan(NSNumber *expectedValue); - - NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE - id beLessThan(NSNumber *expectedValue) { - return NMB_beLessThan(expectedValue); - } - - DEFINE_OVERLOAD(long, @(expectedValue)) - DEFINE_OVERLOAD(unsigned long, @(expectedValue)) - DEFINE_OVERLOAD(int, @(expectedValue)) - DEFINE_OVERLOAD(unsigned int, @(expectedValue)) - DEFINE_OVERLOAD(float, @(expectedValue)) - DEFINE_OVERLOAD(double, @(expectedValue)) - DEFINE_OVERLOAD(long long, @(expectedValue)) - DEFINE_OVERLOAD(unsigned long long, @(expectedValue)) - DEFINE_OVERLOAD(char, @(expectedValue)) - DEFINE_OVERLOAD(unsigned char, @(expectedValue)) - -#undef DEFINE_OVERLOAD - - -#define DEFINE_OVERLOAD(TYPE, EXPR) \ - NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ - id NMB_beLessThanOrEqualTo(TYPE expectedValue) { \ - return NMB_beLessThanOrEqualTo((EXPR)); \ - } \ - NIMBLE_SHORT_OVERLOADED(id beLessThanOrEqualTo(TYPE expectedValue), \ - NMB_beLessThanOrEqualTo(expectedValue)); - - - NIMBLE_EXPORT NIMBLE_OVERLOADABLE - id NMB_beLessThanOrEqualTo(NSNumber *expectedValue); - - NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE - id beLessThanOrEqualTo(NSNumber *expectedValue) { - return NMB_beLessThanOrEqualTo(expectedValue); - } - - DEFINE_OVERLOAD(long, @(expectedValue)) - DEFINE_OVERLOAD(unsigned long, @(expectedValue)) - DEFINE_OVERLOAD(int, @(expectedValue)) - DEFINE_OVERLOAD(unsigned int, @(expectedValue)) - DEFINE_OVERLOAD(float, @(expectedValue)) - DEFINE_OVERLOAD(double, @(expectedValue)) - DEFINE_OVERLOAD(long long, @(expectedValue)) - DEFINE_OVERLOAD(unsigned long long, @(expectedValue)) - DEFINE_OVERLOAD(char, @(expectedValue)) - DEFINE_OVERLOAD(unsigned char, @(expectedValue)) - -#undef DEFINE_OVERLOAD - -NIMBLE_EXPORT id NMB_beTruthy(void); -NIMBLE_SHORT(id beTruthy(void), - NMB_beTruthy()); - -NIMBLE_EXPORT id NMB_beFalsy(void); -NIMBLE_SHORT(id beFalsy(void), - NMB_beFalsy()); - -NIMBLE_EXPORT id NMB_beTrue(void); -NIMBLE_SHORT(id beTrue(void), - NMB_beTrue()); - -NIMBLE_EXPORT id NMB_beFalse(void); -NIMBLE_SHORT(id beFalse(void), - NMB_beFalse()); - -NIMBLE_EXPORT id NMB_beNil(void); -NIMBLE_SHORT(id beNil(void), - NMB_beNil()); - -NIMBLE_EXPORT id NMB_beEmpty(void); -NIMBLE_SHORT(id beEmpty(void), - NMB_beEmpty()); - -NIMBLE_EXPORT id NMB_containWithNilTermination(id itemOrSubstring, ...) NS_REQUIRES_NIL_TERMINATION; -#define NMB_contain(...) NMB_containWithNilTermination(__VA_ARGS__, nil) -#ifndef NIMBLE_DISABLE_SHORT_SYNTAX -#define contain(...) NMB_contain(__VA_ARGS__) -#endif - -NIMBLE_EXPORT id NMB_containElementSatisfying(BOOL(^predicate)(id)); -NIMBLE_SHORT(id containElementSatisfying(BOOL(^predicate)(id)), - NMB_containElementSatisfying(predicate)); - -NIMBLE_EXPORT id NMB_endWith(id itemElementOrSubstring); -NIMBLE_SHORT(id endWith(id itemElementOrSubstring), - NMB_endWith(itemElementOrSubstring)); - -NIMBLE_EXPORT NMBObjCRaiseExceptionMatcher *NMB_raiseException(void); -NIMBLE_SHORT(NMBObjCRaiseExceptionMatcher *raiseException(void), - NMB_raiseException()); - -NIMBLE_EXPORT id NMB_match(id expectedValue); -NIMBLE_SHORT(id match(id expectedValue), - NMB_match(expectedValue)); - -NIMBLE_EXPORT id NMB_allPass(id matcher); -NIMBLE_SHORT(id allPass(id matcher), - NMB_allPass(matcher)); - -NIMBLE_EXPORT id NMB_satisfyAnyOfWithMatchers(id matchers); -#define NMB_satisfyAnyOf(...) NMB_satisfyAnyOfWithMatchers(@[__VA_ARGS__]) -#ifndef NIMBLE_DISABLE_SHORT_SYNTAX -#define satisfyAnyOf(...) NMB_satisfyAnyOf(__VA_ARGS__) -#endif - -NIMBLE_EXPORT id NMB_satisfyAllOfWithMatchers(id matchers); -#define NMB_satisfyAllOf(...) NMB_satisfyAllOfWithMatchers(@[__VA_ARGS__]) -#ifndef NIMBLE_DISABLE_SHORT_SYNTAX -#define satisfyAllOf(...) NMB_satisfyAllOf(__VA_ARGS__) -#endif - -// In order to preserve breakpoint behavior despite using macros to fill in __FILE__ and __LINE__, -// define a builder that populates __FILE__ and __LINE__, and returns a block that takes timeout -// and action arguments. See https://github.com/Quick/Quick/pull/185 for details. -typedef void (^NMBWaitUntilTimeoutBlock)(NSTimeInterval timeout, void (^action)(void (^)(void))); -typedef void (^NMBWaitUntilBlock)(void (^action)(void (^)(void))); - -NIMBLE_EXPORT void NMB_failWithMessage(NSString *msg, NSString *file, NSUInteger line); - -NIMBLE_EXPORT NMBWaitUntilTimeoutBlock NMB_waitUntilTimeoutBuilder(NSString *file, NSUInteger line); -NIMBLE_EXPORT NMBWaitUntilBlock NMB_waitUntilBuilder(NSString *file, NSUInteger line); - -NIMBLE_EXPORT void NMB_failWithMessage(NSString *msg, NSString *file, NSUInteger line); - -#define NMB_waitUntilTimeout NMB_waitUntilTimeoutBuilder(@(__FILE__), __LINE__) -#define NMB_waitUntil NMB_waitUntilBuilder(@(__FILE__), __LINE__) - -#ifndef NIMBLE_DISABLE_SHORT_SYNTAX -#define expect(...) NMB_expect(^{ return (__VA_ARGS__); }, @(__FILE__), __LINE__) -#define expectAction(BLOCK) NMB_expectAction((BLOCK), @(__FILE__), __LINE__) -#define failWithMessage(msg) NMB_failWithMessage(msg, @(__FILE__), __LINE__) -#define fail() failWithMessage(@"fail() always fails") - - -#define waitUntilTimeout NMB_waitUntilTimeout -#define waitUntil NMB_waitUntil - -#undef NIMBLE_VALUE_OF - -#endif - -NS_ASSUME_NONNULL_END diff --git a/Example/Pods/Nimble/Sources/NimbleObjectiveC/DSL.m b/Example/Pods/Nimble/Sources/NimbleObjectiveC/DSL.m deleted file mode 100644 index 670415b4..00000000 --- a/Example/Pods/Nimble/Sources/NimbleObjectiveC/DSL.m +++ /dev/null @@ -1,161 +0,0 @@ -#import - -#if __has_include("Nimble-Swift.h") -#import "Nimble-Swift.h" -#else -#import -#endif - - -NS_ASSUME_NONNULL_BEGIN - - -NIMBLE_EXPORT NIMBLE_OVERLOADABLE NMBExpectation *__nonnull NMB_expect(id __nullable(^actualBlock)(void), NSString *__nonnull file, NSUInteger line) { - return [[NMBExpectation alloc] initWithActualBlock:actualBlock - negative:NO - file:file - line:line]; -} - -NIMBLE_EXPORT NMBExpectation *NMB_expectAction(void(^actualBlock)(void), NSString *file, NSUInteger line) { - return NMB_expect(^id{ - actualBlock(); - return nil; - }, file, line); -} - -NIMBLE_EXPORT void NMB_failWithMessage(NSString *msg, NSString *file, NSUInteger line) { - return [NMBExpectation failWithMessage:msg file:file line:line]; -} - -NIMBLE_EXPORT id NMB_beAnInstanceOf(Class expectedClass) { - return [NMBObjCMatcher beAnInstanceOfMatcher:expectedClass]; -} - -NIMBLE_EXPORT id NMB_beAKindOf(Class expectedClass) { - return [NMBObjCMatcher beAKindOfMatcher:expectedClass]; -} - -NIMBLE_EXPORT NIMBLE_OVERLOADABLE NMBObjCBeCloseToMatcher *NMB_beCloseTo(NSNumber *expectedValue) { - return [NMBObjCMatcher beCloseToMatcher:expectedValue within:0.001]; -} - -NIMBLE_EXPORT id NMB_beginWith(id itemElementOrSubstring) { - return [NMBObjCMatcher beginWithMatcher:itemElementOrSubstring]; -} - -NIMBLE_EXPORT NIMBLE_OVERLOADABLE id NMB_beGreaterThan(NSNumber *expectedValue) { - return [NMBObjCMatcher beGreaterThanMatcher:expectedValue]; -} - -NIMBLE_EXPORT NIMBLE_OVERLOADABLE id NMB_beGreaterThanOrEqualTo(NSNumber *expectedValue) { - return [NMBObjCMatcher beGreaterThanOrEqualToMatcher:expectedValue]; -} - -NIMBLE_EXPORT id NMB_beIdenticalTo(id expectedInstance) { - return [NMBObjCMatcher beIdenticalToMatcher:expectedInstance]; -} - -NIMBLE_EXPORT id NMB_be(id expectedInstance) { - return [NMBObjCMatcher beIdenticalToMatcher:expectedInstance]; -} - -NIMBLE_EXPORT NIMBLE_OVERLOADABLE id NMB_beLessThan(NSNumber *expectedValue) { - return [NMBObjCMatcher beLessThanMatcher:expectedValue]; -} - -NIMBLE_EXPORT NIMBLE_OVERLOADABLE id NMB_beLessThanOrEqualTo(NSNumber *expectedValue) { - return [NMBObjCMatcher beLessThanOrEqualToMatcher:expectedValue]; -} - -NIMBLE_EXPORT id NMB_beTruthy() { - return [NMBObjCMatcher beTruthyMatcher]; -} - -NIMBLE_EXPORT id NMB_beFalsy() { - return [NMBObjCMatcher beFalsyMatcher]; -} - -NIMBLE_EXPORT id NMB_beTrue() { - return [NMBObjCMatcher beTrueMatcher]; -} - -NIMBLE_EXPORT id NMB_beFalse() { - return [NMBObjCMatcher beFalseMatcher]; -} - -NIMBLE_EXPORT id NMB_beNil() { - return [NMBObjCMatcher beNilMatcher]; -} - -NIMBLE_EXPORT id NMB_beEmpty() { - return [NMBObjCMatcher beEmptyMatcher]; -} - -NIMBLE_EXPORT id NMB_containWithNilTermination(id itemOrSubstring, ...) { - NSMutableArray *itemOrSubstringArray = [NSMutableArray array]; - - if (itemOrSubstring) { - [itemOrSubstringArray addObject:itemOrSubstring]; - - va_list args; - va_start(args, itemOrSubstring); - id next; - while ((next = va_arg(args, id))) { - [itemOrSubstringArray addObject:next]; - } - va_end(args); - } - - return [NMBObjCMatcher containMatcher:itemOrSubstringArray]; -} - -NIMBLE_EXPORT id NMB_containElementSatisfying(BOOL(^predicate)(id)) { - return [NMBObjCMatcher containElementSatisfyingMatcher:predicate]; -} - -NIMBLE_EXPORT id NMB_endWith(id itemElementOrSubstring) { - return [NMBObjCMatcher endWithMatcher:itemElementOrSubstring]; -} - -NIMBLE_EXPORT NIMBLE_OVERLOADABLE id NMB_equal(__nullable id expectedValue) { - return [NMBObjCMatcher equalMatcher:expectedValue]; -} - -NIMBLE_EXPORT NIMBLE_OVERLOADABLE id NMB_haveCount(id expectedValue) { - return [NMBObjCMatcher haveCountMatcher:expectedValue]; -} - -NIMBLE_EXPORT id NMB_match(id expectedValue) { - return [NMBObjCMatcher matchMatcher:expectedValue]; -} - -NIMBLE_EXPORT id NMB_allPass(id expectedValue) { - return [NMBObjCMatcher allPassMatcher:expectedValue]; -} - -NIMBLE_EXPORT id NMB_satisfyAnyOfWithMatchers(id matchers) { - return [NMBObjCMatcher satisfyAnyOfMatcher:matchers]; -} - -NIMBLE_EXPORT id NMB_satisfyAllOfWithMatchers(id matchers) { - return [NMBObjCMatcher satisfyAllOfMatcher:matchers]; -} - -NIMBLE_EXPORT NMBObjCRaiseExceptionMatcher *NMB_raiseException() { - return [NMBObjCMatcher raiseExceptionMatcher]; -} - -NIMBLE_EXPORT NMBWaitUntilTimeoutBlock NMB_waitUntilTimeoutBuilder(NSString *file, NSUInteger line) { - return ^(NSTimeInterval timeout, void (^ _Nonnull action)(void (^ _Nonnull)(void))) { - [NMBWait untilTimeout:timeout file:file line:line action:action]; - }; -} - -NIMBLE_EXPORT NMBWaitUntilBlock NMB_waitUntilBuilder(NSString *file, NSUInteger line) { - return ^(void (^ _Nonnull action)(void (^ _Nonnull)(void))) { - [NMBWait untilFile:file line:line action:action]; - }; -} - -NS_ASSUME_NONNULL_END diff --git a/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.h b/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.h deleted file mode 100644 index e6e0272a..00000000 --- a/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.h +++ /dev/null @@ -1,11 +0,0 @@ -#import -#import - -@interface NMBExceptionCapture : NSObject - -- (nonnull instancetype)initWithHandler:(void(^ _Nullable)(NSException * _Nonnull))handler finally:(void(^ _Nullable)(void))finally; -- (void)tryBlock:(__attribute__((noescape)) void(^ _Nonnull)(void))unsafeBlock NS_SWIFT_NAME(tryBlock(_:)); - -@end - -typedef void(^NMBSourceCallbackBlock)(BOOL successful); diff --git a/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.m b/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.m deleted file mode 100644 index 52684b70..00000000 --- a/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.m +++ /dev/null @@ -1,35 +0,0 @@ -#import "NMBExceptionCapture.h" - -@interface NMBExceptionCapture () -@property (nonatomic, copy) void(^ _Nullable handler)(NSException * _Nullable); -@property (nonatomic, copy) void(^ _Nullable finally)(void); -@end - -@implementation NMBExceptionCapture - -- (nonnull instancetype)initWithHandler:(void(^ _Nullable)(NSException * _Nonnull))handler finally:(void(^ _Nullable)(void))finally { - self = [super init]; - if (self) { - self.handler = handler; - self.finally = finally; - } - return self; -} - -- (void)tryBlock:(__attribute__((noescape)) void(^ _Nonnull)(void))unsafeBlock { - @try { - unsafeBlock(); - } - @catch (NSException *exception) { - if (self.handler) { - self.handler(exception); - } - } - @finally { - if (self.finally) { - self.finally(); - } - } -} - -@end diff --git a/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.h b/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.h deleted file mode 100644 index 7938bcac..00000000 --- a/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.h +++ /dev/null @@ -1,18 +0,0 @@ -@class NSString; - -/** - * Returns a string appropriate for displaying in test output - * from the provided value. - * - * @param anyObject A value that will show up in a test's output. - * - * @return The string that is returned can be - * customized per type by conforming a type to the `TestOutputStringConvertible` - * protocol. When stringifying a non-`TestOutputStringConvertible` type, this - * function will return the value's debug description and then its - * normal description if available and in that order. Otherwise it - * will return the result of constructing a string from the value. - * - * @see `TestOutputStringConvertible` - */ -extern NSString *_Nonnull NMBStringify(id _Nullable anyObject) __attribute__((warn_unused_result)); diff --git a/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.m b/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.m deleted file mode 100644 index 31a80d6f..00000000 --- a/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.m +++ /dev/null @@ -1,11 +0,0 @@ -#import "NMBStringify.h" - -#if __has_include("Nimble-Swift.h") -#import "Nimble-Swift.h" -#else -#import -#endif - -NSString *_Nonnull NMBStringify(id _Nullable anyObject) { - return [NMBStringer stringify:anyObject]; -} diff --git a/Example/Pods/Nimble/Sources/NimbleObjectiveC/XCTestObservationCenter+Register.m b/Example/Pods/Nimble/Sources/NimbleObjectiveC/XCTestObservationCenter+Register.m deleted file mode 100644 index 8cf73349..00000000 --- a/Example/Pods/Nimble/Sources/NimbleObjectiveC/XCTestObservationCenter+Register.m +++ /dev/null @@ -1,12 +0,0 @@ -#import - -#if __has_include("Nimble-Swift.h") -#import "Nimble-Swift.h" -#else -#import -#endif - -__attribute__((constructor)) -static void registerCurrentTestCaseTracker(void) { - [[XCTestObservationCenter sharedTestObservationCenter] addTestObserver:[CurrentTestCaseTracker sharedInstance]]; -} diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj deleted file mode 100644 index e23f5381..00000000 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ /dev/null @@ -1,2253 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 47; - objects = { - -/* Begin PBXBuildFile section */ - 018228C4760DF4F8B80630BC9ACCB39E /* DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15A4148863C6337262C8CAE75FD59C35 /* DSL.swift */; }; - 02DD7FC6A855D0675EA8B3BE66C99BBB /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C786F4D81BFDC8696BEE509F51CE790B /* XCTest.framework */; }; - 0892D14FE7A3452423E9129D7917664B /* MatchError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9411243F8C70168C7B34DA45A5F3D939 /* MatchError.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 092256E303520E50ADEFF25EEB4E73EE /* CwlCatchException.h in Headers */ = {isa = PBXBuildFile; fileRef = E33FF85FCC3CC911941FDBBD297E6FF4 /* CwlCatchException.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 0A9DFBAC3E90D1E57C7DF4121EC60ED3 /* SwipeCardStackDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BC80F26E0BED95AA5876B825604774E /* SwipeCardStackDelegate.swift */; }; - 0C12779AE31F0F279D29300A53AF01CC /* POPAnimatableProperty.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2969CA988E424CE0769AC1FDBBCB72E1 /* POPAnimatableProperty.mm */; }; - 0D732106730245D699A1EECC6AFA9FF2 /* POPAnimationRuntime.h in Headers */ = {isa = PBXBuildFile; fileRef = DEAF735C1B7417AF21B7A55F4F34197E /* POPAnimationRuntime.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 10C8810E574F925B5CD3449B6DBE6EC0 /* Quick.h in Headers */ = {isa = PBXBuildFile; fileRef = 757B6F7FBA4F707AF09EA1F9BE1011B3 /* Quick.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 123ECD353175877853C989AC2AE47688 /* POPLayerExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = 6759B96170E9E224D8EF0D5073EA6593 /* POPLayerExtras.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 13D2A4D59DD9612E1AA7F3182A342162 /* mach_excServer.c in Sources */ = {isa = PBXBuildFile; fileRef = E572001220E44538015A3D235E7EB569 /* mach_excServer.c */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 14CAA3001D8EB19550AC4A12DB04C2AA /* POPAnimation.mm in Sources */ = {isa = PBXBuildFile; fileRef = D4C58F09E28E0D9A8E3D6533E3D8D482 /* POPAnimation.mm */; }; - 14ECE81218F5F5C9BEF00819A7C078EC /* Closures.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A690810D728B05A92D8B25C8BF96DB9 /* Closures.swift */; }; - 163C2D9C86D8AA40817453CC2F41F5BE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 97E7C2BBDC03530D36F547E7BA4D6D07 /* Foundation.framework */; }; - 188CD5934038B6C774272B091CE2DC4C /* SwipeDirection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92B7D4F962AD94FD25A2AAA1A3A618D4 /* SwipeDirection.swift */; }; - 192A3F8BEC1A99FD8712D3E09724D72C /* FailureMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = D014293D1D3929E34331B0753BCD2889 /* FailureMessage.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 1A8DF79F5EF3D69864A84173E7C9810E /* QCKDSL.h in Headers */ = {isa = PBXBuildFile; fileRef = 8A6395AFC8503CE1FAD07CCF7C277CFA /* QCKDSL.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 209F98BB7B328893FB64BA0393B4BD57 /* HooksPhase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 25FA0E8F3B32783D4C7D8FBEB6BBE2F6 /* HooksPhase.swift */; }; - 228DD1E29C23FEAB8589683315D9D433 /* Array+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74B1B9386B4ED5041228D997DF9FC8CB /* Array+Extensions.swift */; }; - 22B5B4ED0824E7BAF2091AAD6238A73F /* QuickSpecBase.m in Sources */ = {isa = PBXBuildFile; fileRef = 83076FCBAC5076D9630C0B3E0E2B5EBB /* QuickSpecBase.m */; }; - 231DC33B8B061E5938BC71E58927DAB4 /* POPAnimationEvent.mm in Sources */ = {isa = PBXBuildFile; fileRef = 00A289C28309F7F36E2D18BB5679093C /* POPAnimationEvent.mm */; }; - 234849AD309265FD107C74357FC8C0CF /* DSL+Wait.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50418694CF3D6185350F958EE702F26D /* DSL+Wait.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 2391FFD3230B40E2348B5257D6296BBB /* BeGreaterThanOrEqualTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20B08DEFF19890471ED32940B1F5850E /* BeGreaterThanOrEqualTo.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 25086585D6F7FDF186BBAB0D42F2C71B /* UIView+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98E07B1243CE6B8F33D070B1918DB000 /* UIView+Extensions.swift */; }; - 25598B65E6317518D3BAFE22F2C03A25 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 97E7C2BBDC03530D36F547E7BA4D6D07 /* Foundation.framework */; }; - 2586B092457582875C22EBA7CD7C9F34 /* Shuffle-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = FD3A70B1389121F90ABB41926A297166 /* Shuffle-iOS-dummy.m */; }; - 26B9FEAB3DE0C8B91709D53571752A3B /* MatcherFunc.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7278FD8AE169A935FA76652604980CDE /* MatcherFunc.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 2B350015B9F7546D0769649EE12D7D1A /* NimbleXCTestHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D2E579E46132EF944B116BA460D9EFA /* NimbleXCTestHandler.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 2E747E9F97870781B4F06B8D8A9C8BDF /* POPSpringSolver.h in Headers */ = {isa = PBXBuildFile; fileRef = 47500FA586D66688C57B5AC3261A2D96 /* POPSpringSolver.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 2F0B5199CDB717CA9F680579900ABF15 /* QuickSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 5EBC20498EF2DD57FF2A683A5178A734 /* QuickSpec.m */; }; - 313B87900218125C29762421E7A7B58D /* POPMath.h in Headers */ = {isa = PBXBuildFile; fileRef = 8005F8D7F911B58A057AF849B418EB15 /* POPMath.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 3148DDEAC5306EC3C26459B522510727 /* CardAnimator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97776010D63D2FB3E3A8D99D020AA6D3 /* CardAnimator.swift */; }; - 3262B230B938C8D6522790093FEAF69D /* EndWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28009AFC107EC0B43A5635F449BC55BB /* EndWith.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 330E8E4A6596ED625E9B34C94CC4136E /* Await.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4191C7AE33FBBA18FD0481C9D7E9840 /* Await.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 33BA96E9E5C5C2EC400102860291DB45 /* PopBounceButton-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B8F17E8493F00C7C56CE8B4D836622F /* PopBounceButton-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3460FEA0CEADB05D3B56C2E1CAF9590C /* ElementsEqual.swift in Sources */ = {isa = PBXBuildFile; fileRef = A0DE2C3122E5A15043295E3EF83C0E4F /* ElementsEqual.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 39133A7716CEDEB690A7DA9D12C45C4D /* CwlDarwinDefinitions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9EA56B52C7DD84513B4E99CC89DDA087 /* CwlDarwinDefinitions.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 39382B0A1EF090D15BA6C89FC3DCB099 /* QuickTestObservation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AE7B4A36BB40A6285F3623A0D7C0E72 /* QuickTestObservation.swift */; }; - 3997F943F4F53CF6B2FAA748F1C74EF4 /* POPSpringAnimation.mm in Sources */ = {isa = PBXBuildFile; fileRef = 6093B4E6FECC8EE2080F170B2D384CEB /* POPSpringAnimation.mm */; }; - 3BD0C370BBCEBDEA68B8EDBD969370EB /* mach_excServer.h in Headers */ = {isa = PBXBuildFile; fileRef = BBDDC7EA1028311604F2AA27985EDC11 /* mach_excServer.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3D6A581E79FD9EAC1A948D8BC53F1EB0 /* QuickConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B5858ACABE86C57F6A4FECACEEB8967 /* QuickConfiguration.swift */; }; - 406CBDDEF8B2FAE7004BDD58D025F3A4 /* POPAnimationExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FA0EBF5A3C86845B318E861C5A06917 /* POPAnimationExtras.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 41807A7BD6B06CB4FAEE22C0B2915A7E /* POPPropertyAnimation.h in Headers */ = {isa = PBXBuildFile; fileRef = 850D2FF29848ABCF98180248743FA309 /* POPPropertyAnimation.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 4203EF96811AE514D64AE069311B1575 /* AllPass.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3456B6DD7A62FC1742B7572F3C48C0B /* AllPass.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 42F76698690916E0407F51610D829412 /* BeGreaterThan.swift in Sources */ = {isa = PBXBuildFile; fileRef = C52E960D18FF98591C7ECE281266D59C /* BeGreaterThan.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 44C9470137EF941955A1FDCE71D68C26 /* MatcherProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = 663C9D6FC5CCA57FC99A933D7203EC1A /* MatcherProtocols.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 44EF85121CEF7DC475C1B66F9F9D0BD8 /* POPAnimation.h in Headers */ = {isa = PBXBuildFile; fileRef = A8CF19D081ED35089D9644F27A2CDFF9 /* POPAnimation.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 455C842E96C891DDD0F84647305C467F /* POPSpringAnimationInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 228A248B11863AE45AD5A95CD4715929 /* POPSpringAnimationInternal.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 46B90B2CF2EB97B38C43A31E9A5478C2 /* PostNotification.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5ACE9EF501686387C8C8C43174F6BCF3 /* PostNotification.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 46BDEBF35D99D2CC53EF72DFC5BDCDCC /* BeLessThanOrEqual.swift in Sources */ = {isa = PBXBuildFile; fileRef = E978CCCD830A6169A443F3F04E093FE1 /* BeLessThanOrEqual.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 4703D949227D1A13AB4C6D0D98B88906 /* POPAnimatablePropertyTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = C20F1999CCDEC6F2237FAF4D91F27975 /* POPAnimatablePropertyTypes.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 47EFB002105D098DC36579788DA9E8A3 /* Animator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06307B21893A98E3EC429C761F5416B3 /* Animator.swift */; }; - 481FF10DF670C55112D23558C9DFFB10 /* POPBasicAnimation.h in Headers */ = {isa = PBXBuildFile; fileRef = 3340A00160AB91C63359057ED3FB9A6F /* POPBasicAnimation.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 4907BC71DFEB291321FC9D653D7ED0A1 /* POPLayerExtras.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3375AC56A3F32F9EC11822ECD7213780 /* POPLayerExtras.mm */; }; - 4A9E7C1A8B697A1C0B0A1E0DF855A591 /* CwlCatchException.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91C0A3622DF414371983936447EDA0D0 /* CwlCatchException.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 4ADE5FC9505A3BF7DF17AF9756585116 /* QCKDSL.m in Sources */ = {isa = PBXBuildFile; fileRef = FF7319EC302641D1EA137E65DB59767C /* QCKDSL.m */; }; - 4BF9292F03C9D233AAC0D9DAE96DAEB0 /* PopBounceButton-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = FCD5753B01534D6D5AF4831643800789 /* PopBounceButton-dummy.m */; }; - 4E1DBC9FF76D6AD924D1356260438074 /* QuickSelectedTestSuiteBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29F3B54C1639B6936F825D4C25819565 /* QuickSelectedTestSuiteBuilder.swift */; }; - 4FBEBA41A8D24332D598B79A8309918D /* POPVector.h in Headers */ = {isa = PBXBuildFile; fileRef = 0DC131700B7517E0CEAD1E48D830C631 /* POPVector.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 512AAF465EE936155DD9BBA92368928E /* Quick-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = E806FE9FB3DE986C5C1BF6A993ED9361 /* Quick-dummy.m */; }; - 52AB6461CAA9481D24835F3E48301FC6 /* BeIdenticalTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6ACAAAC81A36A9C5265167E7CCE82814 /* BeIdenticalTo.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 54F3FA368C54AEA08DE74D983BAF993C /* POPAnimationPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 39E59404A494087C5607452613BDFC2A /* POPAnimationPrivate.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 5578F928AEFA8B2B7CC542033590DFD6 /* Match.swift in Sources */ = {isa = PBXBuildFile; fileRef = E45B6F4160EF8A2FE7F1EAFB49235EA3 /* Match.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 58A884856B7E64EE3C204D9EDAA14045 /* Behavior.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8317BDAF568B45490C686BA65BA2BCA2 /* Behavior.swift */; }; - 59BF9ABA8BB14E0E4E345D13AB6D49FB /* ExampleMetadata.swift in Sources */ = {isa = PBXBuildFile; fileRef = FBE4A4396B2A910649419C3C1A56B4EB /* ExampleMetadata.swift */; }; - 5A8CFC96AC6A45F06B1B6D03252F4B24 /* PopBounceButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36165C68DC9FB9F32B938B66F20D893B /* PopBounceButton.swift */; }; - 5B6F70DDD4C63CF6ED95291BCB633494 /* ContainElementSatisfying.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDFEB84DACD44FBC397AE3BA0DBB1D1E /* ContainElementSatisfying.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 5C72689270C6FEBE5A7172596909BDD5 /* CardAnimationOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6C4B4F06AD28B94BB3084EFF6467500 /* CardAnimationOptions.swift */; }; - 5D84A98FA7BF6643D510E6FD8369A5FB /* POPPropertyAnimation.mm in Sources */ = {isa = PBXBuildFile; fileRef = ED80E67A748CAD248D479A9208434B3F /* POPPropertyAnimation.mm */; }; - 602E3758C0EF64AF6B7FCEA05BF5B9B9 /* Expectation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 372AF043785A24ACB9926F6BBB693DE9 /* Expectation.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 64E26D7D025AC4462DFA8BA66B38C9D8 /* HaveCount.swift in Sources */ = {isa = PBXBuildFile; fileRef = 423DE89303FCCBF6EBE721BBB75EF60C /* HaveCount.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 6A439A294A99B7A8FD72ABC17778A34A /* SwipeCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9833244AD858F90C7D4EC61F84778CE /* SwipeCard.swift */; }; - 6CA035CFC34D05CFBA5F1F00B9BB1623 /* SwipeCardDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7E6C63322371FD05ACA07BDAF1C743F /* SwipeCardDelegate.swift */; }; - 71CE66C12DFBDEC878B1616F8FAAA9BC /* SwipeCardStack.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D36B72BE48A6EA0C1210B1762C8A8E3 /* SwipeCardStack.swift */; }; - 7235105D3D45158864072A9B4A92508E /* Pods-ShuffleTests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 96B5359B6CCE74BEFFFE2D7A763D01A6 /* Pods-ShuffleTests-dummy.m */; }; - 72F0FC35309BB37B21CE686974567F19 /* CardTransformProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = A69C724401C83AA46F8B3402AB596AA0 /* CardTransformProvider.swift */; }; - 72FB8CEABF346A37D54CC08647489A98 /* ThrowAssertion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CD613B7C21D24569E1AC3AC14600C96 /* ThrowAssertion.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 74DF4D149C6482B9D64212FD741C6F0D /* pop.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 180CC7CECBB75B280ECBFCD59FCB601F /* pop.framework */; }; - 7536DD99ACEDE673713161E597B7B447 /* ExampleHooks.swift in Sources */ = {isa = PBXBuildFile; fileRef = A94616D80E95210BE169DAF696FBA3A8 /* ExampleHooks.swift */; }; - 757FE9A24BA34DFDA0BD76906EFD74CE /* POPAnimationEventInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 36E75FDDA47B7FCEECC731A0BDC78823 /* POPAnimationEventInternal.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 76E7C7CDAA543C791A714B991F595F2B /* QuickSpecBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 05F2A3022D8E641C50D41168E3ECD18C /* QuickSpecBase.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 7844975FC70726A54B3AF7EFFEA8FF24 /* POPCustomAnimation.mm in Sources */ = {isa = PBXBuildFile; fileRef = BCDA26675FE419CF6BD1E7A11E6AC87E /* POPCustomAnimation.mm */; }; - 78A51B7FCC1DFB888AAA254529013C12 /* BeginWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04133DE3FDF336A57763EB6881BE5703 /* BeginWith.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 7AC93EB6DCDA9226165D5BC354FE7BC6 /* DSL.m in Sources */ = {isa = PBXBuildFile; fileRef = FB215A81FA0C1712FC97E95FCF0C2456 /* DSL.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 7CE6049975894E447F2D4071C74F6F8F /* Callsite.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37E051AA471610EA71E9383E5017B420 /* Callsite.swift */; }; - 7DAC86DCBC36C10F43FA5FEB819B7BF1 /* Functional.swift in Sources */ = {isa = PBXBuildFile; fileRef = 008C6CEA31EBC470A6003C55773A1D24 /* Functional.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 7EB28FEC3D0ABA1A2A6CFE57C400F74D /* QuickSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = B878371B4C850847E71F79F23B411EA7 /* QuickSpec.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 806B9040D79A3DC58FB56EAC16FE19BF /* Stringers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F45AFF8F1EDCE1FAF249C17F8F0A62F /* Stringers.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 80DEBE41D84FBA1C4D4FE00C8D797E82 /* CwlPreconditionTesting.h in Headers */ = {isa = PBXBuildFile; fileRef = 934A489AA3B9AE0F9588E52C52D416F6 /* CwlPreconditionTesting.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 819DF6B721CB5B2974E7FDA3389283F3 /* UnitBezier.h in Headers */ = {isa = PBXBuildFile; fileRef = 56CEC8E0A684DBDA773BC9B433E62A03 /* UnitBezier.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 8770C388ABFC14AAF34C5BBD4A13FBDD /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 97E7C2BBDC03530D36F547E7BA4D6D07 /* Foundation.framework */; }; - 887AF8C809D60140319DE71D6427F370 /* NSBundle+CurrentTestBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E1DC9E5B0A1879A55118E60B71DC783 /* NSBundle+CurrentTestBundle.swift */; }; - 89EE4D6DBDB79963D65AA1E67B543B6D /* CwlCatchBadInstruction.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBDD8CDD30F6E0F95188BD3977CE36A4 /* CwlCatchBadInstruction.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 8A0EF19254BAC5DF0885D1FBA345E016 /* CwlMachBadInstructionHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = B44868C563CC516D56574A6FABADC210 /* CwlMachBadInstructionHandler.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 8A9427F2B563BC1DD598A3C08A80B3FF /* POPAnimatorPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 0A2DE2B0E6E9475BF181B9EF695C0AFE /* POPAnimatorPrivate.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 8AE89821346F031A9267420AEB58FAE6 /* POPAnimationRuntime.mm in Sources */ = {isa = PBXBuildFile; fileRef = 04E582A15647B3E1D3816B70D0DD2B32 /* POPAnimationRuntime.mm */; }; - 8D17749611AB0C8BD51C068749D8DF68 /* NMBExceptionCapture.h in Headers */ = {isa = PBXBuildFile; fileRef = 852DF4A5AF2812E2C0872B3EA1AAF0F3 /* NMBExceptionCapture.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 8D543DAD9A6C0B8BF8A5DB38AD876677 /* SatisfyAnyOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 594FA0322852A96B00E77599934B1F80 /* SatisfyAnyOf.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 8D75EC8969EA46FBD6E1BED7791A3C37 /* BeLogical.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB5BD89FBF690373C6E421FC97A47549 /* BeLogical.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 8E4A2F4A1EF16B63817A516CC2743619 /* Quick-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = D2458CF58CB9FFCAF67B9DAFC17DFC3F /* Quick-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 9231B70907F130F31CF5717C502B780C /* ExampleGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDFD21488DD24B65AF8A56AAFB444D10 /* ExampleGroup.swift */; }; - 92440C78B0ACA7C9702BEBDF1B4C89A3 /* TransformationMatrix.h in Headers */ = {isa = PBXBuildFile; fileRef = 2996B747B0A17993EB566DC7B106DEC3 /* TransformationMatrix.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 94B18F2CFF543F6B2E43E84630C337E2 /* SuiteHooks.swift in Sources */ = {isa = PBXBuildFile; fileRef = 134173D039B9027029999BD0E4678308 /* SuiteHooks.swift */; }; - 94DA3131D64B3D904BE28E72F1871065 /* BeAKindOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = C625BE42EE18E23D67BACE655B8573AA /* BeAKindOf.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 976D45B742DE0A04BD79F05F33136E59 /* Pods-ShuffleTests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 977D0C3194E455CB87AA31ED160BCCC9 /* Pods-ShuffleTests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 979CAB7FFA691FA4B926968546667A1F /* CardStackTransformProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F6F555EA30DC22F57960156280C8125 /* CardStackTransformProvider.swift */; }; - 9869CA3C50C141EF67FE31BC54166296 /* CGVector+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD629DAD3401C9EDEB81B0F799462F7D /* CGVector+Extensions.swift */; }; - 99616D2A8513D131CB2F8486716FDCC6 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 97E7C2BBDC03530D36F547E7BA4D6D07 /* Foundation.framework */; }; - 99E8019F4689A514DAC6AA40AFF7352E /* NMBObjCMatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = C409ACAFEE97C354059608061ECF6E0F /* NMBObjCMatcher.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 9B9714C476F416AD7FD803EA1184D113 /* BeLessThan.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BC497D76B0C5F101F7E29EE73802C45 /* BeLessThan.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 9BB5E9B6487FE95C710687B484C17161 /* Nimble.h in Headers */ = {isa = PBXBuildFile; fileRef = BEE17CF75E4B623AC8191B78102854E0 /* Nimble.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 9C460BA614D4B1D314A252C4C5CE1D87 /* BeAnInstanceOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5185F84CF1EAAE4FB975D8EB46F8763 /* BeAnInstanceOf.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 9D0EE1E6390284E8D44BC8DE38D3C16B /* SwipeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44BDE6AC8728C457FE7BC0D2C355A81F /* SwipeView.swift */; }; - 9E0A1F6593FE2CCA70442A6A944F2A25 /* POPCGUtils.mm in Sources */ = {isa = PBXBuildFile; fileRef = 788568F4BFAED0B2B43F051572F4E531 /* POPCGUtils.mm */; }; - 9E874C00792FA983399C03EC00AE326D /* XCTestSuite+QuickTestSuiteBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = 72F6B82E710B5B95F7A2EDCC7ADA2D84 /* XCTestSuite+QuickTestSuiteBuilder.m */; }; - 9EF8F523F081A6E1B570DF681F2C4C67 /* SwipeCardStackDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = B752FD7A5E73E6D2C9BE37D1D97754C5 /* SwipeCardStackDataSource.swift */; }; - 9F70369EF71BD9ABAFF687AF532CC20D /* CwlMachBadInstructionHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = C153FC7D4FD49F41F53E39195A2175C5 /* CwlMachBadInstructionHandler.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 9FB5F3B3AAF3103848313FACD0CACBCD /* QuickConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = DFA7E5E51ABBE8245AC69FA28D33E342 /* QuickConfiguration.m */; }; - A35159AD5A7A49BA9093F29B63DBD30D /* String+C99ExtendedIdentifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = B52F53C780150E3A1CD48359E4D6A759 /* String+C99ExtendedIdentifier.swift */; }; - A3589AED89E7FE4D1347B3CA0C547CD2 /* Pods-ShuffleExample-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 941E9ECE4ED2F54CB80F8097AFF5C007 /* Pods-ShuffleExample-dummy.m */; }; - A6A2BC094D1AE60CA8E8C558682C027F /* POPAnimationEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D9C77F3A130977534095F2D539E47F0 /* POPAnimationEvent.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A6CE2E672C8EB4DF57485428AFD64A3C /* URL+FileName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DEABA48C14889CE0FF325535E970499 /* URL+FileName.swift */; }; - A73416AEE973D1205B7838665787BE92 /* POPGeometry.h in Headers */ = {isa = PBXBuildFile; fileRef = EB2755328542802E735832144CA83D16 /* POPGeometry.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A7F5B07BF96955EFDC9106335235EDB2 /* QuickTestSuite.swift in Sources */ = {isa = PBXBuildFile; fileRef = 121A7B8D5719386A77F71549977F8616 /* QuickTestSuite.swift */; }; - A83F5C1EA64C751BA82DCFCD0B782F0C /* ButtonAnimator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73DCBCC4DC3E13EA84B77096435B0727 /* ButtonAnimator.swift */; }; - A976E66BE29849B96D7C5966E54547F4 /* StringUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8033F99F017428E6631BCA22413C065 /* StringUtils.swift */; }; - A9996A6303084D17B9C439CB132A1F69 /* DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A3B53D6CB21A66C76F5C2AC9DA35400 /* DSL.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - AD2AD9E54497929D8FF0A5F3DC4ED391 /* CardStackStateManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1883734235D16D580CDAFE945901C9B2 /* CardStackStateManager.swift */; }; - AD53F691BC9FF3721E858A626A20E837 /* POPVector.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2325FBF04A651AC01DE73F623999EE7B /* POPVector.mm */; }; - AD69407E2FA1D39A9E09248052F2D81B /* ExpectationMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1815AEFA7B82C4935A9258B6BC75508 /* ExpectationMessage.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - AF60C00928A7AFE04E374B620EEA5F49 /* Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3D40909C6821C6CD17C671C25F43529 /* Filter.swift */; }; - AFA73D4E596249CA02C3C8C0E08EE430 /* POPAnimator.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2BF10946F33EB9F356D6656564C960C3 /* POPAnimator.mm */; }; - B1609DC2BCF22024344B742BB5237EED /* CardLayoutProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C5A50375B590CBA693E21F99334F453 /* CardLayoutProvider.swift */; }; - B2A65EEDB5D5EC246EA68E10964FF7B3 /* ThrowError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03095889244ECA0C3C7DA5ADAECADBF7 /* ThrowError.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - B4058A2AA8486E9879F113E6F67B9679 /* AdapterProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C062F24A95CCD6938E79B1071C979CD /* AdapterProtocols.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - B48508EB39EE315F5A00429EEA69DD63 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = B328B222306FC8BF97D725C695917A4A /* Configuration.swift */; }; - B4CD99504EBBD319C11286F97B4EFBBB /* POPCGUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = E51F7DE0FACAA8B1EFC5CA14D67A3E34 /* POPCGUtils.h */; settings = {ATTRIBUTES = (Project, ); }; }; - B5707247BBFF4C5A2F27F0A8BD3982A3 /* POPMath.mm in Sources */ = {isa = PBXBuildFile; fileRef = 099BA93B6DB8247C0732C9B362E1CB99 /* POPMath.mm */; }; - B593B13D8A364AEA0BC944DEE522B76F /* pop-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 35C92AF7DADB22A7E249DA3015E879C7 /* pop-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B62526577B8B0BB3027AC3832E2D9E51 /* CardStackLayoutProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7AAD39DCD5E643FC1FB13BCD0727679 /* CardStackLayoutProvider.swift */; }; - B6A82DE586A3C8BED44DA8E437387182 /* TransformationMatrix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C02DF97AA4FD033C23B27F76A8919C80 /* TransformationMatrix.cpp */; }; - B6CC23C6C288F4EB9EDD3A06F1F5F094 /* Predicate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A209832A3180FF450468F2402331CDF2 /* Predicate.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - B71070160CF07EFA99ED0445B0D191E7 /* Nimble-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = A957CAF71AF3C6F41A90E26D755C5B7F /* Nimble-dummy.m */; }; - B7662703AF8D3FFFCB0070C50FEDCC58 /* Errors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85174D93725E243B49D9FC7F235C23B7 /* Errors.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - B79FC6E46F642C3FC74B3E6D9175B1AB /* SatisfyAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 60CDEA086D20F66CF20FE8F8C9D24E65 /* SatisfyAllOf.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - BB4E3EF86798EF3814900099C77DEFC1 /* POPBasicAnimationInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = ED1603CCF86B7DC56B6E7D3B8C0C0D66 /* POPBasicAnimationInternal.h */; settings = {ATTRIBUTES = (Project, ); }; }; - BD28AA8454DE7F1BFB991BC4611DEDBD /* POPAnimationInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 27A0D15570634C1F5D3443B885C91F18 /* POPAnimationInternal.h */; settings = {ATTRIBUTES = (Project, ); }; }; - BE1C35EEFB91EEBDA61D3550B2C48B12 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 97E7C2BBDC03530D36F547E7BA4D6D07 /* Foundation.framework */; }; - BE56C54CD29F23A1C631645390E8569D /* ErrorUtility.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFFB89D2FF0A7151B1841B35E102770C /* ErrorUtility.swift */; }; - BF00EC423904650B91B44012ACC2E9DB /* POP.h in Headers */ = {isa = PBXBuildFile; fileRef = 608E3637F989F9BF01ADA02600ACD410 /* POP.h */; settings = {ATTRIBUTES = (Public, ); }; }; - BFEBC90223F66B0FF770B92B1C670BCF /* QuickConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 7855BAE2C842F624B9848B220D953677 /* QuickConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C0435D4C80B83B1169E91969B1956AEA /* POPDecayAnimation.h in Headers */ = {isa = PBXBuildFile; fileRef = D946E020774A4299AEE8D7A35265605B /* POPDecayAnimation.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C051C0411627BD5FCDA031782EB1F716 /* DSL.h in Headers */ = {isa = PBXBuildFile; fileRef = D9F956A185EBCA159139C451FDB7EE68 /* DSL.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C0942CB89FBF05D10D8222230FA3A004 /* POPSpringAnimation.h in Headers */ = {isa = PBXBuildFile; fileRef = DB8720C1AA73064294B032EDBE0AC27A /* POPSpringAnimation.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C0C98C8C7D07E1598F20EE2F0539197D /* NMBExpectation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 741B275117185BE99D5F0FC56B385970 /* NMBExpectation.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - C0DA98F2142F17D818BA59EE7FFEE399 /* POPCustomAnimation.h in Headers */ = {isa = PBXBuildFile; fileRef = E583E2DC47F3FFD77AF0B7ACFFB9F72A /* POPCustomAnimation.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C3A33478A970E6A5891E1C2E2E09B7FF /* POPAnimatableProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = 0572A14FB054BFCD48F2DC989DC9E74A /* POPAnimatableProperty.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C6DF513C3BDE21A16AF8C6EE86E865BE /* FloatConversion.h in Headers */ = {isa = PBXBuildFile; fileRef = 324ADB5897330764CA1B3FFCB4FCD09A /* FloatConversion.h */; settings = {ATTRIBUTES = (Project, ); }; }; - C7F72875803674D5B386468126E4BE19 /* POPDecayAnimationInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A277A105DF04830DD0FD74B6BBE05E0 /* POPDecayAnimationInternal.h */; settings = {ATTRIBUTES = (Project, ); }; }; - C903AEFEEB4E73644A03FB8285543107 /* BeEmpty.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89C43D69AD8983581AB8F5A045C44E07 /* BeEmpty.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - C979EEB0159A65246F6BD2C906A8ADB7 /* BeVoid.swift in Sources */ = {isa = PBXBuildFile; fileRef = 658C6641F4B1EB0954705DE206023E75 /* BeVoid.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - C99BBC3F70E056CB6A3CC0516318939D /* AssertionDispatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 332DA18272875E695BA3A3BB1F07E824 /* AssertionDispatcher.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - C9E716023868A97D2F5B19934D93045E /* World+DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B4DF65560A97399F019A506B8AA9CF5 /* World+DSL.swift */; }; - CA8950235CFF24AB13D3727AA06459FA /* CardStackAnimator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 25B5ECDCC2B3C51F06BDE71377D5160A /* CardStackAnimator.swift */; }; - CD6B1F146B0E157FE5B9CAFFAE77A5B5 /* Nimble-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 46720BE31046DF99425A2A838290DC49 /* Nimble-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - CD98B15C796C815933F990D4CE063D9B /* POPBasicAnimation.mm in Sources */ = {isa = PBXBuildFile; fileRef = C3F0B93E3662CD1DBFB51F7D350EC56A /* POPBasicAnimation.mm */; }; - CDA0E95119A4BE84992BEA0E4C1324BD /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 97E7C2BBDC03530D36F547E7BA4D6D07 /* Foundation.framework */; }; - CEE8D31A4E76BB7B350BF2A7175D4BC2 /* NMBExceptionCapture.m in Sources */ = {isa = PBXBuildFile; fileRef = B0C90BF1AA81E9AF7891FADA59977FC1 /* NMBExceptionCapture.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - CF9218FF56D8EE43681150A3E1635C9A /* ToSucceed.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B4670F589D03B1A727CC982A1BC7115 /* ToSucceed.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - D2270E67AD8F6A72F1582FE8EAC5D06A /* TapGestureRecognizer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97813BF536A6A49DBC18F26B07B4C56B /* TapGestureRecognizer.swift */; }; - D28D4E6F1D4AA00FB8C8B48193D74DC3 /* POPAction.h in Headers */ = {isa = PBXBuildFile; fileRef = 4616165E40CE269EBE7ECEC163B57BEB /* POPAction.h */; settings = {ATTRIBUTES = (Project, ); }; }; - D2C041844A0EB4EB2E8C7B9DAA748EEB /* Example.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE89936FCBA9F0159F1AFABDB2EB5955 /* Example.swift */; }; - D31161348E267789CE83D0F198B1AFC8 /* POPGeometry.mm in Sources */ = {isa = PBXBuildFile; fileRef = 929F917507D9E9F2E33E3CCBEA3BD966 /* POPGeometry.mm */; }; - D34D0540ADCBF163575B6B5444B1AAF6 /* Contain.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D6188DA0D071FDF4AA953AE34F0DE6B /* Contain.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - D42251C6971C97737DC928A6A6B75420 /* POPAnimationTracerInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 7D9860FC3C0D4CC581AB98E15F38A354 /* POPAnimationTracerInternal.h */; settings = {ATTRIBUTES = (Project, ); }; }; - D4DC6D5FE5A1E01D2B29CD89BA5B6548 /* POPAnimationTracer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 88987FB0F003409E01A79927557227E2 /* POPAnimationTracer.mm */; }; - D7A27317F7438E66767C4B68A76ADA48 /* POPPropertyAnimationInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF4D4AC48D706D94CE203132638E7BD /* POPPropertyAnimationInternal.h */; settings = {ATTRIBUTES = (Project, ); }; }; - D9CFB8E5E354D7BE61D092259779F437 /* Equal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F004D9E0A4B78E73B86D8E4DED88088 /* Equal.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - D9D6150D329A87CBB415FD349F0C50FD /* SourceLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 592AF466D706EE52B9C8D110B1ABC684 /* SourceLocation.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - DA3F4C9B26B77936265D5B020A9A4ACC /* Shuffle-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DD8BEE313ED951DBBF76EEADC20EE25 /* Shuffle-iOS-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - DB84342A0C0DEABBF7F729DE55225D82 /* XCTestObservationCenter+Register.m in Sources */ = {isa = PBXBuildFile; fileRef = CDCCA8F23B7AD56F214C6CBB45AA064E /* XCTestObservationCenter+Register.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - DCD198D49C0A198A09525B7688EE3BC9 /* Async.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEDC94ADFF74F349D6BE611EC344BD81 /* Async.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - DD93769DB61E31B191F653ED91DD5149 /* POPAnimationTracer.h in Headers */ = {isa = PBXBuildFile; fileRef = BD2A41698E57A33818927C3C07C4B1C0 /* POPAnimationTracer.h */; settings = {ATTRIBUTES = (Public, ); }; }; - DECBD301220AEF2C1202E55FB79B10EC /* POPDecayAnimation.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5BDDE9FC33ECD05774F8502FD5278C55 /* POPDecayAnimation.mm */; }; - E0EAC85F7ACFAD998B14FCE66144000E /* NMBStringify.h in Headers */ = {isa = PBXBuildFile; fileRef = 2205456CDD851DCE73DD5E24A2E8A637 /* NMBStringify.h */; settings = {ATTRIBUTES = (Public, ); }; }; - E458AAE1AE9E2250F29806E5633B1860 /* Expression.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C137CABAD2DA557118E9EFCB995A183 /* Expression.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - E4DCDD110F04C185E8078EA2A898275F /* Pods-ShuffleExample-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 213017144C9DB9E569FAD6F79CC69F72 /* Pods-ShuffleExample-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - E8FA10B1E698DBEE99BC93C32EB695AE /* pop-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C47BAFE0BFD6C04331422049BC519B9 /* pop-dummy.m */; }; - E9DDD03C1DA612E749FCCE3B465DCBEC /* POPDefines.h in Headers */ = {isa = PBXBuildFile; fileRef = 0496D5E953BA185B6A3483D7E01EAF79 /* POPDefines.h */; settings = {ATTRIBUTES = (Public, ); }; }; - EC7EF3D5778783BD93EBC6F82016ADA9 /* BeNil.swift in Sources */ = {isa = PBXBuildFile; fileRef = A74ECEC4E828D2DA102CC52D35C7B232 /* BeNil.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - ECCA1FA570A912E8CDB54EB843F1D030 /* NimbleEnvironment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92A88A3C045962886BD112745EC8D122 /* NimbleEnvironment.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - EFB9CC9267297D8104141A4046AAD14E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 97E7C2BBDC03530D36F547E7BA4D6D07 /* Foundation.framework */; }; - F01995755687FA91F51A15ED8FD9D125 /* World.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99D6C5E5E999B0B00DE7CF9D7690DC9E /* World.swift */; }; - F128C89D71EF5D06AA25A611902683CF /* PanGestureRecognizer.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAAEA34A073D84548CA2CE62BC8813C7 /* PanGestureRecognizer.swift */; }; - F27A7DE93F66B0C12B4C646D99F5B9F4 /* CwlCatchException.m in Sources */ = {isa = PBXBuildFile; fileRef = 77F73796EBCA55391F250B04CDD075E7 /* CwlCatchException.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - F310B21703A7BC438A09DDB96670583F /* AssertionRecorder.swift in Sources */ = {isa = PBXBuildFile; fileRef = F012973696531939B2B4F57506BD701A /* AssertionRecorder.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - F4877B3857C780DCDB7F413A03F95600 /* BeCloseTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96BDACE861728163353F903E956EE31F /* BeCloseTo.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - F59C80B116A0D53D32C22AA858200F28 /* CGPoint+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = E3A6133FAA364F550DC9E5D637B939A8 /* CGPoint+Extensions.swift */; }; - F78E35D04F09485FA5DFA72FE1AD5AB2 /* NMBStringify.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B2D5B8AD90EC5742DEBB90894AC5273 /* NMBStringify.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - F96ECED3E6F9E53ACCF2A4F3F914C56D /* CardStackAnimationOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C09CEFA9FF50ACD47284DB7EFF501E9 /* CardStackAnimationOptions.swift */; }; - F9E85548BF1EF8C5035BAF92233C34B6 /* RaisesException.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEFEC66BE15BFD414E2FB08F564EDA68 /* RaisesException.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - FC282E98024A52BBAC1504C811FC6D6E /* POPAnimator.h in Headers */ = {isa = PBXBuildFile; fileRef = A78E577B323A0A4AF36AAD65D85442BD /* POPAnimator.h */; settings = {ATTRIBUTES = (Public, ); }; }; - FCABF48EA3AE10E742936B89167D02E6 /* POPAnimationExtras.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3C0479900F20357C36682724A2B50A38 /* POPAnimationExtras.mm */; }; - FF920E965F1CA016FF302DE8C92C5122 /* CwlBadInstructionException.swift in Sources */ = {isa = PBXBuildFile; fileRef = 872D4CA6EF9C38C1A40FC01734C00593 /* CwlBadInstructionException.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 1EC5D1A7A04DA8C506493E0E21B0E618 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = CFC4E89E220B0CDD0D54D035D98BCF83; - remoteInfo = PopBounceButton; - }; - 2DEFC0ECF5FD8B5A0AB198178D317550 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = C82891EAB7293DBEE916B21F57E8474D; - remoteInfo = Quick; - }; - 4081C945B1B12CA66257334C5AB3C44B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 0483D7F620C992E5C4BD62A7266EABB4; - remoteInfo = pop; - }; - 5665007CBEF81662F70BABFCE97B79A2 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 6F13695E06195A78EA8A95F8C7ED0D2F; - remoteInfo = Nimble; - }; - 5A78345CC61FE3FCB2B7875BC67168AC /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 6CE4608D13EB4E75FE6B40D38210294E; - remoteInfo = "Shuffle-iOS"; - }; - CDCB57621FF47DF2AA3A174E571A8ED8 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 6CE4608D13EB4E75FE6B40D38210294E; - remoteInfo = "Shuffle-iOS"; - }; - E6282B10367769978385B5F7CD74A5FF /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 0483D7F620C992E5C4BD62A7266EABB4; - remoteInfo = pop; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 008C6CEA31EBC470A6003C55773A1D24 /* Functional.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Functional.swift; path = Sources/Nimble/Utils/Functional.swift; sourceTree = ""; }; - 00A289C28309F7F36E2D18BB5679093C /* POPAnimationEvent.mm */ = {isa = PBXFileReference; includeInIndex = 1; name = POPAnimationEvent.mm; path = pop/POPAnimationEvent.mm; sourceTree = ""; }; - 03095889244ECA0C3C7DA5ADAECADBF7 /* ThrowError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ThrowError.swift; path = Sources/Nimble/Matchers/ThrowError.swift; sourceTree = ""; }; - 04133DE3FDF336A57763EB6881BE5703 /* BeginWith.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeginWith.swift; path = Sources/Nimble/Matchers/BeginWith.swift; sourceTree = ""; }; - 0496D5E953BA185B6A3483D7E01EAF79 /* POPDefines.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPDefines.h; path = pop/POPDefines.h; sourceTree = ""; }; - 04E582A15647B3E1D3816B70D0DD2B32 /* POPAnimationRuntime.mm */ = {isa = PBXFileReference; includeInIndex = 1; name = POPAnimationRuntime.mm; path = pop/POPAnimationRuntime.mm; sourceTree = ""; }; - 0572A14FB054BFCD48F2DC989DC9E74A /* POPAnimatableProperty.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPAnimatableProperty.h; path = pop/POPAnimatableProperty.h; sourceTree = ""; }; - 0590783DA8C2EF96128FA72629505F9A /* Pods-ShuffleTests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-ShuffleTests.modulemap"; sourceTree = ""; }; - 05B79085638B69ABA0586A32A620EF15 /* Quick.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = Quick.modulemap; sourceTree = ""; }; - 05DAEF690DBDD46D0E1C8BA7A632A60F /* Pods-ShuffleExample-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-ShuffleExample-Info.plist"; sourceTree = ""; }; - 05F2A3022D8E641C50D41168E3ECD18C /* QuickSpecBase.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QuickSpecBase.h; path = Sources/QuickObjCRuntime/include/QuickSpecBase.h; sourceTree = ""; }; - 06307B21893A98E3EC429C761F5416B3 /* Animator.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Animator.swift; sourceTree = ""; }; - 099BA93B6DB8247C0732C9B362E1CB99 /* POPMath.mm */ = {isa = PBXFileReference; includeInIndex = 1; name = POPMath.mm; path = pop/POPMath.mm; sourceTree = ""; }; - 09ECE98E09D4B2289EA74AF7EF3D3C67 /* Quick.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Quick.debug.xcconfig; sourceTree = ""; }; - 0A2DE2B0E6E9475BF181B9EF695C0AFE /* POPAnimatorPrivate.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPAnimatorPrivate.h; path = pop/POPAnimatorPrivate.h; sourceTree = ""; }; - 0D631E9908483F9525A6B3F36F16CC61 /* Quick.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Quick.framework; path = Quick.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 0DC131700B7517E0CEAD1E48D830C631 /* POPVector.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPVector.h; path = pop/POPVector.h; sourceTree = ""; }; - 0DEABA48C14889CE0FF325535E970499 /* URL+FileName.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "URL+FileName.swift"; path = "Sources/Quick/URL+FileName.swift"; sourceTree = ""; }; - 0FA0EBF5A3C86845B318E861C5A06917 /* POPAnimationExtras.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPAnimationExtras.h; path = pop/POPAnimationExtras.h; sourceTree = ""; }; - 121A7B8D5719386A77F71549977F8616 /* QuickTestSuite.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = QuickTestSuite.swift; path = Sources/Quick/QuickTestSuite.swift; sourceTree = ""; }; - 134173D039B9027029999BD0E4678308 /* SuiteHooks.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SuiteHooks.swift; path = Sources/Quick/Hooks/SuiteHooks.swift; sourceTree = ""; }; - 15A4148863C6337262C8CAE75FD59C35 /* DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DSL.swift; path = Sources/Quick/DSL/DSL.swift; sourceTree = ""; }; - 180CC7CECBB75B280ECBFCD59FCB601F /* pop.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = pop.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 1883734235D16D580CDAFE945901C9B2 /* CardStackStateManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = CardStackStateManager.swift; sourceTree = ""; }; - 1C5A50375B590CBA693E21F99334F453 /* CardLayoutProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = CardLayoutProvider.swift; sourceTree = ""; }; - 1C845CB7CCC031D71665FF72B2A664BD /* pop.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = pop.release.xcconfig; sourceTree = ""; }; - 1DC6D986B960C025C1EB941DD87D0EFD /* Pods-ShuffleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-ShuffleTests.release.xcconfig"; sourceTree = ""; }; - 1E1DC9E5B0A1879A55118E60B71DC783 /* NSBundle+CurrentTestBundle.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSBundle+CurrentTestBundle.swift"; path = "Sources/Quick/NSBundle+CurrentTestBundle.swift"; sourceTree = ""; }; - 1FCF97F942388F3E99B24FCA92F2632D /* Pods-ShuffleExample-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-ShuffleExample-acknowledgements.plist"; sourceTree = ""; }; - 20B08DEFF19890471ED32940B1F5850E /* BeGreaterThanOrEqualTo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeGreaterThanOrEqualTo.swift; path = Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift; sourceTree = ""; }; - 213017144C9DB9E569FAD6F79CC69F72 /* Pods-ShuffleExample-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-ShuffleExample-umbrella.h"; sourceTree = ""; }; - 2205456CDD851DCE73DD5E24A2E8A637 /* NMBStringify.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = NMBStringify.h; path = Sources/NimbleObjectiveC/NMBStringify.h; sourceTree = ""; }; - 228A248B11863AE45AD5A95CD4715929 /* POPSpringAnimationInternal.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPSpringAnimationInternal.h; path = pop/POPSpringAnimationInternal.h; sourceTree = ""; }; - 2325FBF04A651AC01DE73F623999EE7B /* POPVector.mm */ = {isa = PBXFileReference; includeInIndex = 1; name = POPVector.mm; path = pop/POPVector.mm; sourceTree = ""; }; - 25B5ECDCC2B3C51F06BDE71377D5160A /* CardStackAnimator.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = CardStackAnimator.swift; sourceTree = ""; }; - 25F37F80F0E84F92AAC368AEB3CFF91B /* pop-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "pop-prefix.pch"; sourceTree = ""; }; - 25FA0E8F3B32783D4C7D8FBEB6BBE2F6 /* HooksPhase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HooksPhase.swift; path = Sources/Quick/Hooks/HooksPhase.swift; sourceTree = ""; }; - 27A0D15570634C1F5D3443B885C91F18 /* POPAnimationInternal.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPAnimationInternal.h; path = pop/POPAnimationInternal.h; sourceTree = ""; }; - 28009AFC107EC0B43A5635F449BC55BB /* EndWith.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EndWith.swift; path = Sources/Nimble/Matchers/EndWith.swift; sourceTree = ""; }; - 2969CA988E424CE0769AC1FDBBCB72E1 /* POPAnimatableProperty.mm */ = {isa = PBXFileReference; includeInIndex = 1; name = POPAnimatableProperty.mm; path = pop/POPAnimatableProperty.mm; sourceTree = ""; }; - 2996B747B0A17993EB566DC7B106DEC3 /* TransformationMatrix.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TransformationMatrix.h; path = pop/WebCore/TransformationMatrix.h; sourceTree = ""; }; - 29F3B54C1639B6936F825D4C25819565 /* QuickSelectedTestSuiteBuilder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = QuickSelectedTestSuiteBuilder.swift; path = Sources/Quick/QuickSelectedTestSuiteBuilder.swift; sourceTree = ""; }; - 2BDD7B20264BEE35518075B17724A662 /* PopBounceButton-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "PopBounceButton-Info.plist"; sourceTree = ""; }; - 2BF10946F33EB9F356D6656564C960C3 /* POPAnimator.mm */ = {isa = PBXFileReference; includeInIndex = 1; name = POPAnimator.mm; path = pop/POPAnimator.mm; sourceTree = ""; }; - 2DD8BEE313ED951DBBF76EEADC20EE25 /* Shuffle-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Shuffle-iOS-umbrella.h"; sourceTree = ""; }; - 2E064129762E283A20DCB7BB5C834E59 /* Pods-ShuffleExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-ShuffleExample.debug.xcconfig"; sourceTree = ""; }; - 2F6F555EA30DC22F57960156280C8125 /* CardStackTransformProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = CardStackTransformProvider.swift; sourceTree = ""; }; - 324ADB5897330764CA1B3FFCB4FCD09A /* FloatConversion.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FloatConversion.h; path = pop/WebCore/FloatConversion.h; sourceTree = ""; }; - 332DA18272875E695BA3A3BB1F07E824 /* AssertionDispatcher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AssertionDispatcher.swift; path = Sources/Nimble/Adapters/AssertionDispatcher.swift; sourceTree = ""; }; - 3340A00160AB91C63359057ED3FB9A6F /* POPBasicAnimation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPBasicAnimation.h; path = pop/POPBasicAnimation.h; sourceTree = ""; }; - 3375AC56A3F32F9EC11822ECD7213780 /* POPLayerExtras.mm */ = {isa = PBXFileReference; includeInIndex = 1; name = POPLayerExtras.mm; path = pop/POPLayerExtras.mm; sourceTree = ""; }; - 35C92AF7DADB22A7E249DA3015E879C7 /* pop-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "pop-umbrella.h"; sourceTree = ""; }; - 36165C68DC9FB9F32B938B66F20D893B /* PopBounceButton.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PopBounceButton.swift; path = PopBounceButton/Classes/PopBounceButton.swift; sourceTree = ""; }; - 368872999D6A3E67E9940111DB6CBB04 /* Pods-ShuffleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-ShuffleTests.debug.xcconfig"; sourceTree = ""; }; - 36E75FDDA47B7FCEECC731A0BDC78823 /* POPAnimationEventInternal.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPAnimationEventInternal.h; path = pop/POPAnimationEventInternal.h; sourceTree = ""; }; - 372AF043785A24ACB9926F6BBB693DE9 /* Expectation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Expectation.swift; path = Sources/Nimble/Expectation.swift; sourceTree = ""; }; - 37E051AA471610EA71E9383E5017B420 /* Callsite.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Callsite.swift; path = Sources/Quick/Callsite.swift; sourceTree = ""; }; - 3876D4392113DDD98429D7F7DE81891B /* PopBounceButton.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = PopBounceButton.debug.xcconfig; sourceTree = ""; }; - 39CE7CA38E5E50E7930AEADE64FFD462 /* PopBounceButton-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PopBounceButton-prefix.pch"; sourceTree = ""; }; - 39E59404A494087C5607452613BDFC2A /* POPAnimationPrivate.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPAnimationPrivate.h; path = pop/POPAnimationPrivate.h; sourceTree = ""; }; - 3A690810D728B05A92D8B25C8BF96DB9 /* Closures.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Closures.swift; path = Sources/Quick/Hooks/Closures.swift; sourceTree = ""; }; - 3B3905EEB5E180399F191DC119D0A25D /* pop-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "pop-Info.plist"; sourceTree = ""; }; - 3B4670F589D03B1A727CC982A1BC7115 /* ToSucceed.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ToSucceed.swift; path = Sources/Nimble/Matchers/ToSucceed.swift; sourceTree = ""; }; - 3B8F17E8493F00C7C56CE8B4D836622F /* PopBounceButton-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PopBounceButton-umbrella.h"; sourceTree = ""; }; - 3C0479900F20357C36682724A2B50A38 /* POPAnimationExtras.mm */ = {isa = PBXFileReference; includeInIndex = 1; name = POPAnimationExtras.mm; path = pop/POPAnimationExtras.mm; sourceTree = ""; }; - 3D6188DA0D071FDF4AA953AE34F0DE6B /* Contain.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Contain.swift; path = Sources/Nimble/Matchers/Contain.swift; sourceTree = ""; }; - 3D9C77F3A130977534095F2D539E47F0 /* POPAnimationEvent.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPAnimationEvent.h; path = pop/POPAnimationEvent.h; sourceTree = ""; }; - 3F665AC0FF0CC1C74FFF55647ABD1ECA /* Shuffle-iOS.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; path = "Shuffle-iOS.podspec"; sourceTree = ""; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - 3FE58EDB307AF03C5501C26D75D53CD0 /* PopBounceButton.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = PopBounceButton.framework; path = PopBounceButton.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 423DE89303FCCBF6EBE721BBB75EF60C /* HaveCount.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HaveCount.swift; path = Sources/Nimble/Matchers/HaveCount.swift; sourceTree = ""; }; - 44BDE6AC8728C457FE7BC0D2C355A81F /* SwipeView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SwipeView.swift; sourceTree = ""; }; - 4616165E40CE269EBE7ECEC163B57BEB /* POPAction.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPAction.h; path = pop/POPAction.h; sourceTree = ""; }; - 46720BE31046DF99425A2A838290DC49 /* Nimble-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Nimble-umbrella.h"; sourceTree = ""; }; - 47500FA586D66688C57B5AC3261A2D96 /* POPSpringSolver.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPSpringSolver.h; path = pop/POPSpringSolver.h; sourceTree = ""; }; - 4A277A105DF04830DD0FD74B6BBE05E0 /* POPDecayAnimationInternal.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPDecayAnimationInternal.h; path = pop/POPDecayAnimationInternal.h; sourceTree = ""; }; - 4BC497D76B0C5F101F7E29EE73802C45 /* BeLessThan.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLessThan.swift; path = Sources/Nimble/Matchers/BeLessThan.swift; sourceTree = ""; }; - 4BF4D4AC48D706D94CE203132638E7BD /* POPPropertyAnimationInternal.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPPropertyAnimationInternal.h; path = pop/POPPropertyAnimationInternal.h; sourceTree = ""; }; - 4C062F24A95CCD6938E79B1071C979CD /* AdapterProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AdapterProtocols.swift; path = Sources/Nimble/Adapters/AdapterProtocols.swift; sourceTree = ""; }; - 4C47BAFE0BFD6C04331422049BC519B9 /* pop-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "pop-dummy.m"; sourceTree = ""; }; - 50418694CF3D6185350F958EE702F26D /* DSL+Wait.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DSL+Wait.swift"; path = "Sources/Nimble/DSL+Wait.swift"; sourceTree = ""; }; - 51305B2D9D8DA36D89CC277D729083D2 /* pop.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = pop.framework; path = pop.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 56CEC8E0A684DBDA773BC9B433E62A03 /* UnitBezier.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = UnitBezier.h; path = pop/WebCore/UnitBezier.h; sourceTree = ""; }; - 592AF466D706EE52B9C8D110B1ABC684 /* SourceLocation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SourceLocation.swift; path = Sources/Nimble/Utils/SourceLocation.swift; sourceTree = ""; }; - 594FA0322852A96B00E77599934B1F80 /* SatisfyAnyOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SatisfyAnyOf.swift; path = Sources/Nimble/Matchers/SatisfyAnyOf.swift; sourceTree = ""; }; - 5ACE9EF501686387C8C8C43174F6BCF3 /* PostNotification.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PostNotification.swift; path = Sources/Nimble/Matchers/PostNotification.swift; sourceTree = ""; }; - 5B4DF65560A97399F019A506B8AA9CF5 /* World+DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "World+DSL.swift"; path = "Sources/Quick/DSL/World+DSL.swift"; sourceTree = ""; }; - 5BDDE9FC33ECD05774F8502FD5278C55 /* POPDecayAnimation.mm */ = {isa = PBXFileReference; includeInIndex = 1; name = POPDecayAnimation.mm; path = pop/POPDecayAnimation.mm; sourceTree = ""; }; - 5EBC20498EF2DD57FF2A683A5178A734 /* QuickSpec.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QuickSpec.m; path = Sources/QuickObjectiveC/QuickSpec.m; sourceTree = ""; }; - 608E3637F989F9BF01ADA02600ACD410 /* POP.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POP.h; path = pop/POP.h; sourceTree = ""; }; - 6093B4E6FECC8EE2080F170B2D384CEB /* POPSpringAnimation.mm */ = {isa = PBXFileReference; includeInIndex = 1; name = POPSpringAnimation.mm; path = pop/POPSpringAnimation.mm; sourceTree = ""; }; - 60CDEA086D20F66CF20FE8F8C9D24E65 /* SatisfyAllOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SatisfyAllOf.swift; path = Sources/Nimble/Matchers/SatisfyAllOf.swift; sourceTree = ""; }; - 63A147D98E6C423CFEE87F5161EB65EC /* Quick-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Quick-Info.plist"; sourceTree = ""; }; - 658C6641F4B1EB0954705DE206023E75 /* BeVoid.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeVoid.swift; path = Sources/Nimble/Matchers/BeVoid.swift; sourceTree = ""; }; - 663C9D6FC5CCA57FC99A933D7203EC1A /* MatcherProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MatcherProtocols.swift; path = Sources/Nimble/Matchers/MatcherProtocols.swift; sourceTree = ""; }; - 66F956AB31FEA9DB3C7FA57A74598DEA /* Pods-ShuffleExample-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-ShuffleExample-acknowledgements.markdown"; sourceTree = ""; }; - 6759B96170E9E224D8EF0D5073EA6593 /* POPLayerExtras.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPLayerExtras.h; path = pop/POPLayerExtras.h; sourceTree = ""; }; - 6ACAAAC81A36A9C5265167E7CCE82814 /* BeIdenticalTo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeIdenticalTo.swift; path = Sources/Nimble/Matchers/BeIdenticalTo.swift; sourceTree = ""; }; - 6AE7B4A36BB40A6285F3623A0D7C0E72 /* QuickTestObservation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = QuickTestObservation.swift; path = Sources/Quick/QuickTestObservation.swift; sourceTree = ""; }; - 6C0D408163ECCC7CA393098DBC951640 /* PopBounceButton.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = PopBounceButton.modulemap; sourceTree = ""; }; - 6D2E579E46132EF944B116BA460D9EFA /* NimbleXCTestHandler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NimbleXCTestHandler.swift; path = Sources/Nimble/Adapters/NimbleXCTestHandler.swift; sourceTree = ""; }; - 6F45AFF8F1EDCE1FAF249C17F8F0A62F /* Stringers.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Stringers.swift; path = Sources/Nimble/Utils/Stringers.swift; sourceTree = ""; }; - 7278FD8AE169A935FA76652604980CDE /* MatcherFunc.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MatcherFunc.swift; path = Sources/Nimble/Matchers/MatcherFunc.swift; sourceTree = ""; }; - 72F6B82E710B5B95F7A2EDCC7ADA2D84 /* XCTestSuite+QuickTestSuiteBuilder.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "XCTestSuite+QuickTestSuiteBuilder.m"; path = "Sources/QuickObjectiveC/XCTestSuite+QuickTestSuiteBuilder.m"; sourceTree = ""; }; - 73DCBCC4DC3E13EA84B77096435B0727 /* ButtonAnimator.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ButtonAnimator.swift; path = PopBounceButton/Classes/ButtonAnimator.swift; sourceTree = ""; }; - 741B275117185BE99D5F0FC56B385970 /* NMBExpectation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NMBExpectation.swift; path = Sources/Nimble/Adapters/NMBExpectation.swift; sourceTree = ""; }; - 74B1B9386B4ED5041228D997DF9FC8CB /* Array+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Array+Extensions.swift"; sourceTree = ""; }; - 7578612C54D3ABD5B144E43D25848D85 /* Pods_ShuffleTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_ShuffleTests.framework; path = "Pods-ShuffleTests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; - 757B6F7FBA4F707AF09EA1F9BE1011B3 /* Quick.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Quick.h; path = Sources/QuickObjectiveC/Quick.h; sourceTree = ""; }; - 75CCEE00A1CB1056726ADB2DCDEEAA71 /* Shuffle-iOS-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Shuffle-iOS-Info.plist"; sourceTree = ""; }; - 77978F08705E2097614DA5FDAA6ECD28 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; path = LICENSE; sourceTree = ""; }; - 77F73796EBCA55391F250B04CDD075E7 /* CwlCatchException.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = CwlCatchException.m; path = Carthage/Checkouts/CwlPreconditionTesting/Dependencies/CwlCatchException/Sources/CwlCatchExceptionSupport/CwlCatchException.m; sourceTree = ""; }; - 7855BAE2C842F624B9848B220D953677 /* QuickConfiguration.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QuickConfiguration.h; path = Sources/QuickObjectiveC/Configuration/QuickConfiguration.h; sourceTree = ""; }; - 788568F4BFAED0B2B43F051572F4E531 /* POPCGUtils.mm */ = {isa = PBXFileReference; includeInIndex = 1; name = POPCGUtils.mm; path = pop/POPCGUtils.mm; sourceTree = ""; }; - 7BC80F26E0BED95AA5876B825604774E /* SwipeCardStackDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SwipeCardStackDelegate.swift; sourceTree = ""; }; - 7CD613B7C21D24569E1AC3AC14600C96 /* ThrowAssertion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ThrowAssertion.swift; path = Sources/Nimble/Matchers/ThrowAssertion.swift; sourceTree = ""; }; - 7D36B72BE48A6EA0C1210B1762C8A8E3 /* SwipeCardStack.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SwipeCardStack.swift; sourceTree = ""; }; - 7D9860FC3C0D4CC581AB98E15F38A354 /* POPAnimationTracerInternal.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPAnimationTracerInternal.h; path = pop/POPAnimationTracerInternal.h; sourceTree = ""; }; - 7DE6B043C6C3A9F980B180DD5A323634 /* pop.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = pop.modulemap; sourceTree = ""; }; - 7E447B5CA052D5603E9A5A8D1DB7859E /* Pods-ShuffleTests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-ShuffleTests-frameworks.sh"; sourceTree = ""; }; - 7E9908B603E199CC77AC2C184AAAA3C5 /* Pods-ShuffleExample-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-ShuffleExample-frameworks.sh"; sourceTree = ""; }; - 8005F8D7F911B58A057AF849B418EB15 /* POPMath.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPMath.h; path = pop/POPMath.h; sourceTree = ""; }; - 80E2E3EDE96B21E4EF9433ACE71A8A44 /* pop.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = pop.debug.xcconfig; sourceTree = ""; }; - 83076FCBAC5076D9630C0B3E0E2B5EBB /* QuickSpecBase.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QuickSpecBase.m; path = Sources/QuickObjCRuntime/QuickSpecBase.m; sourceTree = ""; }; - 8317BDAF568B45490C686BA65BA2BCA2 /* Behavior.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Behavior.swift; path = Sources/Quick/Behavior.swift; sourceTree = ""; }; - 850D2FF29848ABCF98180248743FA309 /* POPPropertyAnimation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPPropertyAnimation.h; path = pop/POPPropertyAnimation.h; sourceTree = ""; }; - 85174D93725E243B49D9FC7F235C23B7 /* Errors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Errors.swift; path = Sources/Nimble/Utils/Errors.swift; sourceTree = ""; }; - 852DF4A5AF2812E2C0872B3EA1AAF0F3 /* NMBExceptionCapture.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = NMBExceptionCapture.h; path = Sources/NimbleObjectiveC/NMBExceptionCapture.h; sourceTree = ""; }; - 864303A298ECF937B032994708C099BC /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; path = README.md; sourceTree = ""; }; - 872D4CA6EF9C38C1A40FC01734C00593 /* CwlBadInstructionException.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CwlBadInstructionException.swift; path = Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlBadInstructionException.swift; sourceTree = ""; }; - 8784B03A2AB33C84070D12CA838FD9CE /* Pods-ShuffleExample.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-ShuffleExample.modulemap"; sourceTree = ""; }; - 88225836FA70FEC28AF8766251BBEF33 /* Shuffle-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Shuffle-iOS-prefix.pch"; sourceTree = ""; }; - 88987FB0F003409E01A79927557227E2 /* POPAnimationTracer.mm */ = {isa = PBXFileReference; includeInIndex = 1; name = POPAnimationTracer.mm; path = pop/POPAnimationTracer.mm; sourceTree = ""; }; - 88A4009D5E68FCAD34A997A5BED5AA3C /* Nimble-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Nimble-prefix.pch"; sourceTree = ""; }; - 89C43D69AD8983581AB8F5A045C44E07 /* BeEmpty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeEmpty.swift; path = Sources/Nimble/Matchers/BeEmpty.swift; sourceTree = ""; }; - 8A3B53D6CB21A66C76F5C2AC9DA35400 /* DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DSL.swift; path = Sources/Nimble/DSL.swift; sourceTree = ""; }; - 8A6395AFC8503CE1FAD07CCF7C277CFA /* QCKDSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QCKDSL.h; path = Sources/QuickObjectiveC/DSL/QCKDSL.h; sourceTree = ""; }; - 8B2D5B8AD90EC5742DEBB90894AC5273 /* NMBStringify.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = NMBStringify.m; path = Sources/NimbleObjectiveC/NMBStringify.m; sourceTree = ""; }; - 8B5858ACABE86C57F6A4FECACEEB8967 /* QuickConfiguration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = QuickConfiguration.swift; path = Sources/Quick/Configuration/QuickConfiguration.swift; sourceTree = ""; }; - 8C09CEFA9FF50ACD47284DB7EFF501E9 /* CardStackAnimationOptions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = CardStackAnimationOptions.swift; sourceTree = ""; }; - 8C137CABAD2DA557118E9EFCB995A183 /* Expression.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Expression.swift; path = Sources/Nimble/Expression.swift; sourceTree = ""; }; - 8E36E4C8AD3762F42D4D8C1DF2F999F2 /* Nimble.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Nimble.release.xcconfig; sourceTree = ""; }; - 919254E1C76487E484A0EED5DB0CF462 /* Pods-ShuffleTests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-ShuffleTests-acknowledgements.markdown"; sourceTree = ""; }; - 91C0A3622DF414371983936447EDA0D0 /* CwlCatchException.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CwlCatchException.swift; path = Carthage/Checkouts/CwlPreconditionTesting/Dependencies/CwlCatchException/Sources/CwlCatchException/CwlCatchException.swift; sourceTree = ""; }; - 929F917507D9E9F2E33E3CCBEA3BD966 /* POPGeometry.mm */ = {isa = PBXFileReference; includeInIndex = 1; name = POPGeometry.mm; path = pop/POPGeometry.mm; sourceTree = ""; }; - 92A88A3C045962886BD112745EC8D122 /* NimbleEnvironment.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NimbleEnvironment.swift; path = Sources/Nimble/Adapters/NimbleEnvironment.swift; sourceTree = ""; }; - 92B7D4F962AD94FD25A2AAA1A3A618D4 /* SwipeDirection.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SwipeDirection.swift; path = Sources/Shuffle/Classes/SwipeDirection.swift; sourceTree = ""; }; - 934A489AA3B9AE0F9588E52C52D416F6 /* CwlPreconditionTesting.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = CwlPreconditionTesting.h; path = Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/include/CwlPreconditionTesting.h; sourceTree = ""; }; - 9411243F8C70168C7B34DA45A5F3D939 /* MatchError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MatchError.swift; path = Sources/Nimble/Matchers/MatchError.swift; sourceTree = ""; }; - 941E9ECE4ED2F54CB80F8097AFF5C007 /* Pods-ShuffleExample-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-ShuffleExample-dummy.m"; sourceTree = ""; }; - 96B5359B6CCE74BEFFFE2D7A763D01A6 /* Pods-ShuffleTests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-ShuffleTests-dummy.m"; sourceTree = ""; }; - 96BDACE861728163353F903E956EE31F /* BeCloseTo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeCloseTo.swift; path = Sources/Nimble/Matchers/BeCloseTo.swift; sourceTree = ""; }; - 97776010D63D2FB3E3A8D99D020AA6D3 /* CardAnimator.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = CardAnimator.swift; sourceTree = ""; }; - 977D0C3194E455CB87AA31ED160BCCC9 /* Pods-ShuffleTests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-ShuffleTests-umbrella.h"; sourceTree = ""; }; - 97813BF536A6A49DBC18F26B07B4C56B /* TapGestureRecognizer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = TapGestureRecognizer.swift; sourceTree = ""; }; - 97E7C2BBDC03530D36F547E7BA4D6D07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; - 98E07B1243CE6B8F33D070B1918DB000 /* UIView+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIView+Extensions.swift"; sourceTree = ""; }; - 99D6C5E5E999B0B00DE7CF9D7690DC9E /* World.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = World.swift; path = Sources/Quick/World.swift; sourceTree = ""; }; - 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - 9EA56B52C7DD84513B4E99CC89DDA087 /* CwlDarwinDefinitions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CwlDarwinDefinitions.swift; path = Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlDarwinDefinitions.swift; sourceTree = ""; }; - 9F004D9E0A4B78E73B86D8E4DED88088 /* Equal.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Equal.swift; path = Sources/Nimble/Matchers/Equal.swift; sourceTree = ""; }; - A0DE2C3122E5A15043295E3EF83C0E4F /* ElementsEqual.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ElementsEqual.swift; path = Sources/Nimble/Matchers/ElementsEqual.swift; sourceTree = ""; }; - A209832A3180FF450468F2402331CDF2 /* Predicate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Predicate.swift; path = Sources/Nimble/Matchers/Predicate.swift; sourceTree = ""; }; - A2107334101F84BBD167838E40B8402B /* Nimble-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Nimble-Info.plist"; sourceTree = ""; }; - A69C724401C83AA46F8B3402AB596AA0 /* CardTransformProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = CardTransformProvider.swift; sourceTree = ""; }; - A74ECEC4E828D2DA102CC52D35C7B232 /* BeNil.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeNil.swift; path = Sources/Nimble/Matchers/BeNil.swift; sourceTree = ""; }; - A78E577B323A0A4AF36AAD65D85442BD /* POPAnimator.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPAnimator.h; path = pop/POPAnimator.h; sourceTree = ""; }; - A7AAD39DCD5E643FC1FB13BCD0727679 /* CardStackLayoutProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = CardStackLayoutProvider.swift; sourceTree = ""; }; - A7E6C63322371FD05ACA07BDAF1C743F /* SwipeCardDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SwipeCardDelegate.swift; sourceTree = ""; }; - A8033F99F017428E6631BCA22413C065 /* StringUtils.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = StringUtils.swift; sourceTree = ""; }; - A8CF19D081ED35089D9644F27A2CDFF9 /* POPAnimation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPAnimation.h; path = pop/POPAnimation.h; sourceTree = ""; }; - A94616D80E95210BE169DAF696FBA3A8 /* ExampleHooks.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleHooks.swift; path = Sources/Quick/Hooks/ExampleHooks.swift; sourceTree = ""; }; - A957CAF71AF3C6F41A90E26D755C5B7F /* Nimble-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Nimble-dummy.m"; sourceTree = ""; }; - B0C90BF1AA81E9AF7891FADA59977FC1 /* NMBExceptionCapture.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = NMBExceptionCapture.m; path = Sources/NimbleObjectiveC/NMBExceptionCapture.m; sourceTree = ""; }; - B21DD6A5A0CACA93CC53B583BEAE3740 /* Shuffle-iOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Shuffle-iOS.release.xcconfig"; sourceTree = ""; }; - B21FEC65D55E818874CE10E5E562D0C5 /* Quick.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Quick.release.xcconfig; sourceTree = ""; }; - B328B222306FC8BF97D725C695917A4A /* Configuration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Configuration.swift; path = Sources/Quick/Configuration/Configuration.swift; sourceTree = ""; }; - B44868C563CC516D56574A6FABADC210 /* CwlMachBadInstructionHandler.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = CwlMachBadInstructionHandler.m; path = Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler.m; sourceTree = ""; }; - B5185F84CF1EAAE4FB975D8EB46F8763 /* BeAnInstanceOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeAnInstanceOf.swift; path = Sources/Nimble/Matchers/BeAnInstanceOf.swift; sourceTree = ""; }; - B52F53C780150E3A1CD48359E4D6A759 /* String+C99ExtendedIdentifier.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+C99ExtendedIdentifier.swift"; path = "Sources/Quick/String+C99ExtendedIdentifier.swift"; sourceTree = ""; }; - B589AF574060FE2F8A65E8DCA127F162 /* Nimble.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Nimble.debug.xcconfig; sourceTree = ""; }; - B6B3F9A82B3123595BD59D83367B9983 /* Nimble.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = Nimble.modulemap; sourceTree = ""; }; - B752FD7A5E73E6D2C9BE37D1D97754C5 /* SwipeCardStackDataSource.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SwipeCardStackDataSource.swift; sourceTree = ""; }; - B878371B4C850847E71F79F23B411EA7 /* QuickSpec.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QuickSpec.h; path = Sources/QuickObjectiveC/QuickSpec.h; sourceTree = ""; }; - B8D115B57C3B95DA5653F36934A53B5A /* Quick-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Quick-prefix.pch"; sourceTree = ""; }; - BAE263041362D074978BB3B577DF0A05 /* Nimble.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Nimble.framework; path = Nimble.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - BBDDC7EA1028311604F2AA27985EDC11 /* mach_excServer.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = mach_excServer.h; path = Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/mach_excServer.h; sourceTree = ""; }; - BCBB288C84A1054AC9CCCAFB90A6DAA0 /* Shuffle-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Shuffle-iOS.modulemap"; sourceTree = ""; }; - BCDA26675FE419CF6BD1E7A11E6AC87E /* POPCustomAnimation.mm */ = {isa = PBXFileReference; includeInIndex = 1; name = POPCustomAnimation.mm; path = pop/POPCustomAnimation.mm; sourceTree = ""; }; - BD2A41698E57A33818927C3C07C4B1C0 /* POPAnimationTracer.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPAnimationTracer.h; path = pop/POPAnimationTracer.h; sourceTree = ""; }; - BD629DAD3401C9EDEB81B0F799462F7D /* CGVector+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "CGVector+Extensions.swift"; sourceTree = ""; }; - BEDC94ADFF74F349D6BE611EC344BD81 /* Async.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Async.swift; path = Sources/Nimble/Matchers/Async.swift; sourceTree = ""; }; - BEE17CF75E4B623AC8191B78102854E0 /* Nimble.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Nimble.h; path = Sources/Nimble/Nimble.h; sourceTree = ""; }; - BEFEC66BE15BFD414E2FB08F564EDA68 /* RaisesException.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RaisesException.swift; path = Sources/Nimble/Matchers/RaisesException.swift; sourceTree = ""; }; - C02DF97AA4FD033C23B27F76A8919C80 /* TransformationMatrix.cpp */ = {isa = PBXFileReference; includeInIndex = 1; name = TransformationMatrix.cpp; path = pop/WebCore/TransformationMatrix.cpp; sourceTree = ""; }; - C153FC7D4FD49F41F53E39195A2175C5 /* CwlMachBadInstructionHandler.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = CwlMachBadInstructionHandler.h; path = Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/include/CwlMachBadInstructionHandler.h; sourceTree = ""; }; - C1E44DABD4EAD33B5FE6488D8315B818 /* Pods_ShuffleExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_ShuffleExample.framework; path = "Pods-ShuffleExample.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; - C20F1999CCDEC6F2237FAF4D91F27975 /* POPAnimatablePropertyTypes.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPAnimatablePropertyTypes.h; path = pop/POPAnimatablePropertyTypes.h; sourceTree = ""; }; - C3F0B93E3662CD1DBFB51F7D350EC56A /* POPBasicAnimation.mm */ = {isa = PBXFileReference; includeInIndex = 1; name = POPBasicAnimation.mm; path = pop/POPBasicAnimation.mm; sourceTree = ""; }; - C409ACAFEE97C354059608061ECF6E0F /* NMBObjCMatcher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NMBObjCMatcher.swift; path = Sources/Nimble/Adapters/NMBObjCMatcher.swift; sourceTree = ""; }; - C45902F4C848F9831A635584FEE98C94 /* PopBounceButton.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = PopBounceButton.release.xcconfig; sourceTree = ""; }; - C52E960D18FF98591C7ECE281266D59C /* BeGreaterThan.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeGreaterThan.swift; path = Sources/Nimble/Matchers/BeGreaterThan.swift; sourceTree = ""; }; - C625BE42EE18E23D67BACE655B8573AA /* BeAKindOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeAKindOf.swift; path = Sources/Nimble/Matchers/BeAKindOf.swift; sourceTree = ""; }; - C786F4D81BFDC8696BEE509F51CE790B /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; - CDCCA8F23B7AD56F214C6CBB45AA064E /* XCTestObservationCenter+Register.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "XCTestObservationCenter+Register.m"; path = "Sources/NimbleObjectiveC/XCTestObservationCenter+Register.m"; sourceTree = ""; }; - D014293D1D3929E34331B0753BCD2889 /* FailureMessage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FailureMessage.swift; path = Sources/Nimble/FailureMessage.swift; sourceTree = ""; }; - D2458CF58CB9FFCAF67B9DAFC17DFC3F /* Quick-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Quick-umbrella.h"; sourceTree = ""; }; - D4C58F09E28E0D9A8E3D6533E3D8D482 /* POPAnimation.mm */ = {isa = PBXFileReference; includeInIndex = 1; name = POPAnimation.mm; path = pop/POPAnimation.mm; sourceTree = ""; }; - D77C5ED4234BBF8FDC667A20FA6427C9 /* Pods-ShuffleExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-ShuffleExample.release.xcconfig"; sourceTree = ""; }; - D946E020774A4299AEE8D7A35265605B /* POPDecayAnimation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPDecayAnimation.h; path = pop/POPDecayAnimation.h; sourceTree = ""; }; - D9F956A185EBCA159139C451FDB7EE68 /* DSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = DSL.h; path = Sources/NimbleObjectiveC/DSL.h; sourceTree = ""; }; - DB5BD89FBF690373C6E421FC97A47549 /* BeLogical.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLogical.swift; path = Sources/Nimble/Matchers/BeLogical.swift; sourceTree = ""; }; - DB8720C1AA73064294B032EDBE0AC27A /* POPSpringAnimation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPSpringAnimation.h; path = pop/POPSpringAnimation.h; sourceTree = ""; }; - DDFD21488DD24B65AF8A56AAFB444D10 /* ExampleGroup.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleGroup.swift; path = Sources/Quick/ExampleGroup.swift; sourceTree = ""; }; - DEAF735C1B7417AF21B7A55F4F34197E /* POPAnimationRuntime.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPAnimationRuntime.h; path = pop/POPAnimationRuntime.h; sourceTree = ""; }; - DFA7E5E51ABBE8245AC69FA28D33E342 /* QuickConfiguration.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QuickConfiguration.m; path = Sources/QuickObjectiveC/Configuration/QuickConfiguration.m; sourceTree = ""; }; - DFFB89D2FF0A7151B1841B35E102770C /* ErrorUtility.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ErrorUtility.swift; path = Sources/Quick/ErrorUtility.swift; sourceTree = ""; }; - E1815AEFA7B82C4935A9258B6BC75508 /* ExpectationMessage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExpectationMessage.swift; path = Sources/Nimble/ExpectationMessage.swift; sourceTree = ""; }; - E33FF85FCC3CC911941FDBBD297E6FF4 /* CwlCatchException.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = CwlCatchException.h; path = Carthage/Checkouts/CwlPreconditionTesting/Dependencies/CwlCatchException/Sources/CwlCatchExceptionSupport/include/CwlCatchException.h; sourceTree = ""; }; - E3A6133FAA364F550DC9E5D637B939A8 /* CGPoint+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "CGPoint+Extensions.swift"; sourceTree = ""; }; - E45B6F4160EF8A2FE7F1EAFB49235EA3 /* Match.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Match.swift; path = Sources/Nimble/Matchers/Match.swift; sourceTree = ""; }; - E51F7DE0FACAA8B1EFC5CA14D67A3E34 /* POPCGUtils.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPCGUtils.h; path = pop/POPCGUtils.h; sourceTree = ""; }; - E572001220E44538015A3D235E7EB569 /* mach_excServer.c */ = {isa = PBXFileReference; includeInIndex = 1; name = mach_excServer.c; path = Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/mach_excServer.c; sourceTree = ""; }; - E583E2DC47F3FFD77AF0B7ACFFB9F72A /* POPCustomAnimation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPCustomAnimation.h; path = pop/POPCustomAnimation.h; sourceTree = ""; }; - E6C4B4F06AD28B94BB3084EFF6467500 /* CardAnimationOptions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = CardAnimationOptions.swift; sourceTree = ""; }; - E806FE9FB3DE986C5C1BF6A993ED9361 /* Quick-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Quick-dummy.m"; sourceTree = ""; }; - E978CCCD830A6169A443F3F04E093FE1 /* BeLessThanOrEqual.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLessThanOrEqual.swift; path = Sources/Nimble/Matchers/BeLessThanOrEqual.swift; sourceTree = ""; }; - E9833244AD858F90C7D4EC61F84778CE /* SwipeCard.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SwipeCard.swift; sourceTree = ""; }; - EAAEA34A073D84548CA2CE62BC8813C7 /* PanGestureRecognizer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PanGestureRecognizer.swift; sourceTree = ""; }; - EB2755328542802E735832144CA83D16 /* POPGeometry.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPGeometry.h; path = pop/POPGeometry.h; sourceTree = ""; }; - EBDD8CDD30F6E0F95188BD3977CE36A4 /* CwlCatchBadInstruction.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CwlCatchBadInstruction.swift; path = Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlCatchBadInstruction.swift; sourceTree = ""; }; - ED1603CCF86B7DC56B6E7D3B8C0C0D66 /* POPBasicAnimationInternal.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPBasicAnimationInternal.h; path = pop/POPBasicAnimationInternal.h; sourceTree = ""; }; - ED80E67A748CAD248D479A9208434B3F /* POPPropertyAnimation.mm */ = {isa = PBXFileReference; includeInIndex = 1; name = POPPropertyAnimation.mm; path = pop/POPPropertyAnimation.mm; sourceTree = ""; }; - EE89936FCBA9F0159F1AFABDB2EB5955 /* Example.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Example.swift; path = Sources/Quick/Example.swift; sourceTree = ""; }; - EF6D82A590C3AFFDB84FB22D5172CC1B /* Shuffle_iOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Shuffle_iOS.framework; path = "Shuffle-iOS.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; - F012973696531939B2B4F57506BD701A /* AssertionRecorder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AssertionRecorder.swift; path = Sources/Nimble/Adapters/AssertionRecorder.swift; sourceTree = ""; }; - F3456B6DD7A62FC1742B7572F3C48C0B /* AllPass.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AllPass.swift; path = Sources/Nimble/Matchers/AllPass.swift; sourceTree = ""; }; - F3D40909C6821C6CD17C671C25F43529 /* Filter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Filter.swift; path = Sources/Quick/Filter.swift; sourceTree = ""; }; - F4191C7AE33FBBA18FD0481C9D7E9840 /* Await.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Await.swift; path = Sources/Nimble/Utils/Await.swift; sourceTree = ""; }; - F66BA4F4B0023CB0FAB1D25DBAF1F685 /* Pods-ShuffleTests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-ShuffleTests-acknowledgements.plist"; sourceTree = ""; }; - F8A77F69610B0DAF50C9D8781C47C1F7 /* Pods-ShuffleTests-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-ShuffleTests-Info.plist"; sourceTree = ""; }; - FB215A81FA0C1712FC97E95FCF0C2456 /* DSL.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = DSL.m; path = Sources/NimbleObjectiveC/DSL.m; sourceTree = ""; }; - FBE4A4396B2A910649419C3C1A56B4EB /* ExampleMetadata.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleMetadata.swift; path = Sources/Quick/ExampleMetadata.swift; sourceTree = ""; }; - FCD5753B01534D6D5AF4831643800789 /* PopBounceButton-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "PopBounceButton-dummy.m"; sourceTree = ""; }; - FCE976B5349CA5EA837CA87C4CCF0635 /* Shuffle-iOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Shuffle-iOS.debug.xcconfig"; sourceTree = ""; }; - FD3A70B1389121F90ABB41926A297166 /* Shuffle-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Shuffle-iOS-dummy.m"; sourceTree = ""; }; - FDFEB84DACD44FBC397AE3BA0DBB1D1E /* ContainElementSatisfying.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ContainElementSatisfying.swift; path = Sources/Nimble/Matchers/ContainElementSatisfying.swift; sourceTree = ""; }; - FF7319EC302641D1EA137E65DB59767C /* QCKDSL.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QCKDSL.m; path = Sources/QuickObjectiveC/DSL/QCKDSL.m; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 1FB41F3B817F50C08A530AB486E92A06 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 163C2D9C86D8AA40817453CC2F41F5BE /* Foundation.framework in Frameworks */, - 02DD7FC6A855D0675EA8B3BE66C99BBB /* XCTest.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 2FC48CC2F9679ED2E6AFC2A3A64BB283 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 25598B65E6317518D3BAFE22F2C03A25 /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 328E40D98CC46B04ED34F1D583477533 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - CDA0E95119A4BE84992BEA0E4C1324BD /* Foundation.framework in Frameworks */, - 74DF4D149C6482B9D64212FD741C6F0D /* pop.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 4384FFEB30103D567D86E76E98568D34 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 8770C388ABFC14AAF34C5BBD4A13FBDD /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 536610B93BC6EC2E0528D0C4EAE31BC0 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - BE1C35EEFB91EEBDA61D3550B2C48B12 /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 55C81EE76C6A69F1F69792A679310C68 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - EFB9CC9267297D8104141A4046AAD14E /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - E7156F4D1001B838F43A7595CD054836 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 99616D2A8513D131CB2F8486716FDCC6 /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 01045D861AD5BF8480587F0C0E16191E /* Support Files */ = { - isa = PBXGroup; - children = ( - BCBB288C84A1054AC9CCCAFB90A6DAA0 /* Shuffle-iOS.modulemap */, - FD3A70B1389121F90ABB41926A297166 /* Shuffle-iOS-dummy.m */, - 75CCEE00A1CB1056726ADB2DCDEEAA71 /* Shuffle-iOS-Info.plist */, - 88225836FA70FEC28AF8766251BBEF33 /* Shuffle-iOS-prefix.pch */, - 2DD8BEE313ED951DBBF76EEADC20EE25 /* Shuffle-iOS-umbrella.h */, - FCE976B5349CA5EA837CA87C4CCF0635 /* Shuffle-iOS.debug.xcconfig */, - B21DD6A5A0CACA93CC53B583BEAE3740 /* Shuffle-iOS.release.xcconfig */, - ); - name = "Support Files"; - path = "Example/Pods/Target Support Files/Shuffle-iOS"; - sourceTree = ""; - }; - 0EB6BC715429D7DA67C21CE97DE6F50E /* Frameworks */ = { - isa = PBXGroup; - children = ( - 180CC7CECBB75B280ECBFCD59FCB601F /* pop.framework */, - F8BEF46E4252EE4ADAFD72447E813444 /* iOS */, - ); - name = Frameworks; - sourceTree = ""; - }; - 0F78902FF7B46D93176424458CFEC731 /* SwipeCard */ = { - isa = PBXGroup; - children = ( - E6C4B4F06AD28B94BB3084EFF6467500 /* CardAnimationOptions.swift */, - 97776010D63D2FB3E3A8D99D020AA6D3 /* CardAnimator.swift */, - 1C5A50375B590CBA693E21F99334F453 /* CardLayoutProvider.swift */, - A69C724401C83AA46F8B3402AB596AA0 /* CardTransformProvider.swift */, - E9833244AD858F90C7D4EC61F84778CE /* SwipeCard.swift */, - A7E6C63322371FD05ACA07BDAF1C743F /* SwipeCardDelegate.swift */, - 44BDE6AC8728C457FE7BC0D2C355A81F /* SwipeView.swift */, - ); - name = SwipeCard; - path = Sources/Shuffle/Classes/SwipeCard; - sourceTree = ""; - }; - 3CE7B4A162AFF8FBB653F12F8E0C737D /* Pods-ShuffleExample */ = { - isa = PBXGroup; - children = ( - 8784B03A2AB33C84070D12CA838FD9CE /* Pods-ShuffleExample.modulemap */, - 66F956AB31FEA9DB3C7FA57A74598DEA /* Pods-ShuffleExample-acknowledgements.markdown */, - 1FCF97F942388F3E99B24FCA92F2632D /* Pods-ShuffleExample-acknowledgements.plist */, - 941E9ECE4ED2F54CB80F8097AFF5C007 /* Pods-ShuffleExample-dummy.m */, - 7E9908B603E199CC77AC2C184AAAA3C5 /* Pods-ShuffleExample-frameworks.sh */, - 05DAEF690DBDD46D0E1C8BA7A632A60F /* Pods-ShuffleExample-Info.plist */, - 213017144C9DB9E569FAD6F79CC69F72 /* Pods-ShuffleExample-umbrella.h */, - 2E064129762E283A20DCB7BB5C834E59 /* Pods-ShuffleExample.debug.xcconfig */, - D77C5ED4234BBF8FDC667A20FA6427C9 /* Pods-ShuffleExample.release.xcconfig */, - ); - name = "Pods-ShuffleExample"; - path = "Target Support Files/Pods-ShuffleExample"; - sourceTree = ""; - }; - 462314563E2C9E87FAD2412E082FF93C /* Pods-ShuffleTests */ = { - isa = PBXGroup; - children = ( - 0590783DA8C2EF96128FA72629505F9A /* Pods-ShuffleTests.modulemap */, - 919254E1C76487E484A0EED5DB0CF462 /* Pods-ShuffleTests-acknowledgements.markdown */, - F66BA4F4B0023CB0FAB1D25DBAF1F685 /* Pods-ShuffleTests-acknowledgements.plist */, - 96B5359B6CCE74BEFFFE2D7A763D01A6 /* Pods-ShuffleTests-dummy.m */, - 7E447B5CA052D5603E9A5A8D1DB7859E /* Pods-ShuffleTests-frameworks.sh */, - F8A77F69610B0DAF50C9D8781C47C1F7 /* Pods-ShuffleTests-Info.plist */, - 977D0C3194E455CB87AA31ED160BCCC9 /* Pods-ShuffleTests-umbrella.h */, - 368872999D6A3E67E9940111DB6CBB04 /* Pods-ShuffleTests.debug.xcconfig */, - 1DC6D986B960C025C1EB941DD87D0EFD /* Pods-ShuffleTests.release.xcconfig */, - ); - name = "Pods-ShuffleTests"; - path = "Target Support Files/Pods-ShuffleTests"; - sourceTree = ""; - }; - 67CA027483B626611D362EAC9ED98492 /* Pods */ = { - isa = PBXGroup; - children = ( - AA1B6C7C7673B668D34ED87FC0AB608C /* Nimble */, - E6FC3DB49B491921F20D821EDB852526 /* pop */, - 95B9467B350D4DEEE32D545F4239B8D1 /* PopBounceButton */, - B2371BAF6746C7EE4C50F750E0B1B6E7 /* Quick */, - ); - name = Pods; - sourceTree = ""; - }; - 72A1386137702A8BA2D9B095063A1700 /* Support Files */ = { - isa = PBXGroup; - children = ( - B6B3F9A82B3123595BD59D83367B9983 /* Nimble.modulemap */, - A957CAF71AF3C6F41A90E26D755C5B7F /* Nimble-dummy.m */, - A2107334101F84BBD167838E40B8402B /* Nimble-Info.plist */, - 88A4009D5E68FCAD34A997A5BED5AA3C /* Nimble-prefix.pch */, - 46720BE31046DF99425A2A838290DC49 /* Nimble-umbrella.h */, - B589AF574060FE2F8A65E8DCA127F162 /* Nimble.debug.xcconfig */, - 8E36E4C8AD3762F42D4D8C1DF2F999F2 /* Nimble.release.xcconfig */, - ); - name = "Support Files"; - path = "../Target Support Files/Nimble"; - sourceTree = ""; - }; - 76A07511D1BA25519D54E8682C329823 /* Pod */ = { - isa = PBXGroup; - children = ( - 77978F08705E2097614DA5FDAA6ECD28 /* LICENSE */, - 864303A298ECF937B032994708C099BC /* README.md */, - 3F665AC0FF0CC1C74FFF55647ABD1ECA /* Shuffle-iOS.podspec */, - ); - name = Pod; - sourceTree = ""; - }; - 791A43CDD25CFF8BB430B7A1A9E3AC87 /* Support Files */ = { - isa = PBXGroup; - children = ( - 6C0D408163ECCC7CA393098DBC951640 /* PopBounceButton.modulemap */, - FCD5753B01534D6D5AF4831643800789 /* PopBounceButton-dummy.m */, - 2BDD7B20264BEE35518075B17724A662 /* PopBounceButton-Info.plist */, - 39CE7CA38E5E50E7930AEADE64FFD462 /* PopBounceButton-prefix.pch */, - 3B8F17E8493F00C7C56CE8B4D836622F /* PopBounceButton-umbrella.h */, - 3876D4392113DDD98429D7F7DE81891B /* PopBounceButton.debug.xcconfig */, - C45902F4C848F9831A635584FEE98C94 /* PopBounceButton.release.xcconfig */, - ); - name = "Support Files"; - path = "../Target Support Files/PopBounceButton"; - sourceTree = ""; - }; - 95B9467B350D4DEEE32D545F4239B8D1 /* PopBounceButton */ = { - isa = PBXGroup; - children = ( - 73DCBCC4DC3E13EA84B77096435B0727 /* ButtonAnimator.swift */, - 36165C68DC9FB9F32B938B66F20D893B /* PopBounceButton.swift */, - 791A43CDD25CFF8BB430B7A1A9E3AC87 /* Support Files */, - ); - name = PopBounceButton; - path = PopBounceButton; - sourceTree = ""; - }; - A28BC9D6F31EA78D87D0D84246B41334 /* Internal */ = { - isa = PBXGroup; - children = ( - 06307B21893A98E3EC429C761F5416B3 /* Animator.swift */, - 74B1B9386B4ED5041228D997DF9FC8CB /* Array+Extensions.swift */, - E3A6133FAA364F550DC9E5D637B939A8 /* CGPoint+Extensions.swift */, - BD629DAD3401C9EDEB81B0F799462F7D /* CGVector+Extensions.swift */, - EAAEA34A073D84548CA2CE62BC8813C7 /* PanGestureRecognizer.swift */, - A8033F99F017428E6631BCA22413C065 /* StringUtils.swift */, - 97813BF536A6A49DBC18F26B07B4C56B /* TapGestureRecognizer.swift */, - 98E07B1243CE6B8F33D070B1918DB000 /* UIView+Extensions.swift */, - ); - name = Internal; - path = Sources/Shuffle/Classes/Internal; - sourceTree = ""; - }; - AA1B6C7C7673B668D34ED87FC0AB608C /* Nimble */ = { - isa = PBXGroup; - children = ( - 4C062F24A95CCD6938E79B1071C979CD /* AdapterProtocols.swift */, - F3456B6DD7A62FC1742B7572F3C48C0B /* AllPass.swift */, - 332DA18272875E695BA3A3BB1F07E824 /* AssertionDispatcher.swift */, - F012973696531939B2B4F57506BD701A /* AssertionRecorder.swift */, - BEDC94ADFF74F349D6BE611EC344BD81 /* Async.swift */, - F4191C7AE33FBBA18FD0481C9D7E9840 /* Await.swift */, - C625BE42EE18E23D67BACE655B8573AA /* BeAKindOf.swift */, - B5185F84CF1EAAE4FB975D8EB46F8763 /* BeAnInstanceOf.swift */, - 96BDACE861728163353F903E956EE31F /* BeCloseTo.swift */, - 89C43D69AD8983581AB8F5A045C44E07 /* BeEmpty.swift */, - 04133DE3FDF336A57763EB6881BE5703 /* BeginWith.swift */, - C52E960D18FF98591C7ECE281266D59C /* BeGreaterThan.swift */, - 20B08DEFF19890471ED32940B1F5850E /* BeGreaterThanOrEqualTo.swift */, - 6ACAAAC81A36A9C5265167E7CCE82814 /* BeIdenticalTo.swift */, - 4BC497D76B0C5F101F7E29EE73802C45 /* BeLessThan.swift */, - E978CCCD830A6169A443F3F04E093FE1 /* BeLessThanOrEqual.swift */, - DB5BD89FBF690373C6E421FC97A47549 /* BeLogical.swift */, - A74ECEC4E828D2DA102CC52D35C7B232 /* BeNil.swift */, - 658C6641F4B1EB0954705DE206023E75 /* BeVoid.swift */, - 3D6188DA0D071FDF4AA953AE34F0DE6B /* Contain.swift */, - FDFEB84DACD44FBC397AE3BA0DBB1D1E /* ContainElementSatisfying.swift */, - 872D4CA6EF9C38C1A40FC01734C00593 /* CwlBadInstructionException.swift */, - EBDD8CDD30F6E0F95188BD3977CE36A4 /* CwlCatchBadInstruction.swift */, - E33FF85FCC3CC911941FDBBD297E6FF4 /* CwlCatchException.h */, - 77F73796EBCA55391F250B04CDD075E7 /* CwlCatchException.m */, - 91C0A3622DF414371983936447EDA0D0 /* CwlCatchException.swift */, - 9EA56B52C7DD84513B4E99CC89DDA087 /* CwlDarwinDefinitions.swift */, - C153FC7D4FD49F41F53E39195A2175C5 /* CwlMachBadInstructionHandler.h */, - B44868C563CC516D56574A6FABADC210 /* CwlMachBadInstructionHandler.m */, - 934A489AA3B9AE0F9588E52C52D416F6 /* CwlPreconditionTesting.h */, - D9F956A185EBCA159139C451FDB7EE68 /* DSL.h */, - FB215A81FA0C1712FC97E95FCF0C2456 /* DSL.m */, - 8A3B53D6CB21A66C76F5C2AC9DA35400 /* DSL.swift */, - 50418694CF3D6185350F958EE702F26D /* DSL+Wait.swift */, - A0DE2C3122E5A15043295E3EF83C0E4F /* ElementsEqual.swift */, - 28009AFC107EC0B43A5635F449BC55BB /* EndWith.swift */, - 9F004D9E0A4B78E73B86D8E4DED88088 /* Equal.swift */, - 85174D93725E243B49D9FC7F235C23B7 /* Errors.swift */, - 372AF043785A24ACB9926F6BBB693DE9 /* Expectation.swift */, - E1815AEFA7B82C4935A9258B6BC75508 /* ExpectationMessage.swift */, - 8C137CABAD2DA557118E9EFCB995A183 /* Expression.swift */, - D014293D1D3929E34331B0753BCD2889 /* FailureMessage.swift */, - 008C6CEA31EBC470A6003C55773A1D24 /* Functional.swift */, - 423DE89303FCCBF6EBE721BBB75EF60C /* HaveCount.swift */, - E572001220E44538015A3D235E7EB569 /* mach_excServer.c */, - BBDDC7EA1028311604F2AA27985EDC11 /* mach_excServer.h */, - E45B6F4160EF8A2FE7F1EAFB49235EA3 /* Match.swift */, - 7278FD8AE169A935FA76652604980CDE /* MatcherFunc.swift */, - 663C9D6FC5CCA57FC99A933D7203EC1A /* MatcherProtocols.swift */, - 9411243F8C70168C7B34DA45A5F3D939 /* MatchError.swift */, - BEE17CF75E4B623AC8191B78102854E0 /* Nimble.h */, - 92A88A3C045962886BD112745EC8D122 /* NimbleEnvironment.swift */, - 6D2E579E46132EF944B116BA460D9EFA /* NimbleXCTestHandler.swift */, - 852DF4A5AF2812E2C0872B3EA1AAF0F3 /* NMBExceptionCapture.h */, - B0C90BF1AA81E9AF7891FADA59977FC1 /* NMBExceptionCapture.m */, - 741B275117185BE99D5F0FC56B385970 /* NMBExpectation.swift */, - C409ACAFEE97C354059608061ECF6E0F /* NMBObjCMatcher.swift */, - 2205456CDD851DCE73DD5E24A2E8A637 /* NMBStringify.h */, - 8B2D5B8AD90EC5742DEBB90894AC5273 /* NMBStringify.m */, - 5ACE9EF501686387C8C8C43174F6BCF3 /* PostNotification.swift */, - A209832A3180FF450468F2402331CDF2 /* Predicate.swift */, - BEFEC66BE15BFD414E2FB08F564EDA68 /* RaisesException.swift */, - 60CDEA086D20F66CF20FE8F8C9D24E65 /* SatisfyAllOf.swift */, - 594FA0322852A96B00E77599934B1F80 /* SatisfyAnyOf.swift */, - 592AF466D706EE52B9C8D110B1ABC684 /* SourceLocation.swift */, - 6F45AFF8F1EDCE1FAF249C17F8F0A62F /* Stringers.swift */, - 7CD613B7C21D24569E1AC3AC14600C96 /* ThrowAssertion.swift */, - 03095889244ECA0C3C7DA5ADAECADBF7 /* ThrowError.swift */, - 3B4670F589D03B1A727CC982A1BC7115 /* ToSucceed.swift */, - CDCCA8F23B7AD56F214C6CBB45AA064E /* XCTestObservationCenter+Register.m */, - 72A1386137702A8BA2D9B095063A1700 /* Support Files */, - ); - name = Nimble; - path = Nimble; - sourceTree = ""; - }; - B2371BAF6746C7EE4C50F750E0B1B6E7 /* Quick */ = { - isa = PBXGroup; - children = ( - 8317BDAF568B45490C686BA65BA2BCA2 /* Behavior.swift */, - 37E051AA471610EA71E9383E5017B420 /* Callsite.swift */, - 3A690810D728B05A92D8B25C8BF96DB9 /* Closures.swift */, - B328B222306FC8BF97D725C695917A4A /* Configuration.swift */, - 15A4148863C6337262C8CAE75FD59C35 /* DSL.swift */, - DFFB89D2FF0A7151B1841B35E102770C /* ErrorUtility.swift */, - EE89936FCBA9F0159F1AFABDB2EB5955 /* Example.swift */, - DDFD21488DD24B65AF8A56AAFB444D10 /* ExampleGroup.swift */, - A94616D80E95210BE169DAF696FBA3A8 /* ExampleHooks.swift */, - FBE4A4396B2A910649419C3C1A56B4EB /* ExampleMetadata.swift */, - F3D40909C6821C6CD17C671C25F43529 /* Filter.swift */, - 25FA0E8F3B32783D4C7D8FBEB6BBE2F6 /* HooksPhase.swift */, - 1E1DC9E5B0A1879A55118E60B71DC783 /* NSBundle+CurrentTestBundle.swift */, - 8A6395AFC8503CE1FAD07CCF7C277CFA /* QCKDSL.h */, - FF7319EC302641D1EA137E65DB59767C /* QCKDSL.m */, - 757B6F7FBA4F707AF09EA1F9BE1011B3 /* Quick.h */, - 7855BAE2C842F624B9848B220D953677 /* QuickConfiguration.h */, - DFA7E5E51ABBE8245AC69FA28D33E342 /* QuickConfiguration.m */, - 8B5858ACABE86C57F6A4FECACEEB8967 /* QuickConfiguration.swift */, - 29F3B54C1639B6936F825D4C25819565 /* QuickSelectedTestSuiteBuilder.swift */, - B878371B4C850847E71F79F23B411EA7 /* QuickSpec.h */, - 5EBC20498EF2DD57FF2A683A5178A734 /* QuickSpec.m */, - 05F2A3022D8E641C50D41168E3ECD18C /* QuickSpecBase.h */, - 83076FCBAC5076D9630C0B3E0E2B5EBB /* QuickSpecBase.m */, - 6AE7B4A36BB40A6285F3623A0D7C0E72 /* QuickTestObservation.swift */, - 121A7B8D5719386A77F71549977F8616 /* QuickTestSuite.swift */, - B52F53C780150E3A1CD48359E4D6A759 /* String+C99ExtendedIdentifier.swift */, - 134173D039B9027029999BD0E4678308 /* SuiteHooks.swift */, - 0DEABA48C14889CE0FF325535E970499 /* URL+FileName.swift */, - 99D6C5E5E999B0B00DE7CF9D7690DC9E /* World.swift */, - 5B4DF65560A97399F019A506B8AA9CF5 /* World+DSL.swift */, - 72F6B82E710B5B95F7A2EDCC7ADA2D84 /* XCTestSuite+QuickTestSuiteBuilder.m */, - CD7E304865FBEDA17A700474F8310D84 /* Support Files */, - ); - name = Quick; - path = Quick; - sourceTree = ""; - }; - B82F1EEBA3FDFAB8FE8BD3EAED26AFEF /* Targets Support Files */ = { - isa = PBXGroup; - children = ( - 3CE7B4A162AFF8FBB653F12F8E0C737D /* Pods-ShuffleExample */, - 462314563E2C9E87FAD2412E082FF93C /* Pods-ShuffleTests */, - ); - name = "Targets Support Files"; - sourceTree = ""; - }; - C5D538BEC0FEE8E5B91BA5B0F333011D /* Shuffle-iOS */ = { - isa = PBXGroup; - children = ( - 92B7D4F962AD94FD25A2AAA1A3A618D4 /* SwipeDirection.swift */, - A28BC9D6F31EA78D87D0D84246B41334 /* Internal */, - 76A07511D1BA25519D54E8682C329823 /* Pod */, - 01045D861AD5BF8480587F0C0E16191E /* Support Files */, - 0F78902FF7B46D93176424458CFEC731 /* SwipeCard */, - EF48FA8D4D8CBCD1B95FFBCF341D4856 /* SwipeCardStack */, - ); - name = "Shuffle-iOS"; - path = ../..; - sourceTree = ""; - }; - CA77F0913B0A933064C68D44E18B6965 /* Products */ = { - isa = PBXGroup; - children = ( - BAE263041362D074978BB3B577DF0A05 /* Nimble.framework */, - C1E44DABD4EAD33B5FE6488D8315B818 /* Pods_ShuffleExample.framework */, - 7578612C54D3ABD5B144E43D25848D85 /* Pods_ShuffleTests.framework */, - 51305B2D9D8DA36D89CC277D729083D2 /* pop.framework */, - 3FE58EDB307AF03C5501C26D75D53CD0 /* PopBounceButton.framework */, - 0D631E9908483F9525A6B3F36F16CC61 /* Quick.framework */, - EF6D82A590C3AFFDB84FB22D5172CC1B /* Shuffle_iOS.framework */, - ); - name = Products; - sourceTree = ""; - }; - CD7E304865FBEDA17A700474F8310D84 /* Support Files */ = { - isa = PBXGroup; - children = ( - 05B79085638B69ABA0586A32A620EF15 /* Quick.modulemap */, - E806FE9FB3DE986C5C1BF6A993ED9361 /* Quick-dummy.m */, - 63A147D98E6C423CFEE87F5161EB65EC /* Quick-Info.plist */, - B8D115B57C3B95DA5653F36934A53B5A /* Quick-prefix.pch */, - D2458CF58CB9FFCAF67B9DAFC17DFC3F /* Quick-umbrella.h */, - 09ECE98E09D4B2289EA74AF7EF3D3C67 /* Quick.debug.xcconfig */, - B21FEC65D55E818874CE10E5E562D0C5 /* Quick.release.xcconfig */, - ); - name = "Support Files"; - path = "../Target Support Files/Quick"; - sourceTree = ""; - }; - CF1408CF629C7361332E53B88F7BD30C = { - isa = PBXGroup; - children = ( - 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */, - F7113F98FAB6871FB9031E0ACF5EE130 /* Development Pods */, - 0EB6BC715429D7DA67C21CE97DE6F50E /* Frameworks */, - 67CA027483B626611D362EAC9ED98492 /* Pods */, - CA77F0913B0A933064C68D44E18B6965 /* Products */, - B82F1EEBA3FDFAB8FE8BD3EAED26AFEF /* Targets Support Files */, - ); - sourceTree = ""; - }; - E6FC3DB49B491921F20D821EDB852526 /* pop */ = { - isa = PBXGroup; - children = ( - 324ADB5897330764CA1B3FFCB4FCD09A /* FloatConversion.h */, - 608E3637F989F9BF01ADA02600ACD410 /* POP.h */, - 4616165E40CE269EBE7ECEC163B57BEB /* POPAction.h */, - 0572A14FB054BFCD48F2DC989DC9E74A /* POPAnimatableProperty.h */, - 2969CA988E424CE0769AC1FDBBCB72E1 /* POPAnimatableProperty.mm */, - C20F1999CCDEC6F2237FAF4D91F27975 /* POPAnimatablePropertyTypes.h */, - A8CF19D081ED35089D9644F27A2CDFF9 /* POPAnimation.h */, - D4C58F09E28E0D9A8E3D6533E3D8D482 /* POPAnimation.mm */, - 3D9C77F3A130977534095F2D539E47F0 /* POPAnimationEvent.h */, - 00A289C28309F7F36E2D18BB5679093C /* POPAnimationEvent.mm */, - 36E75FDDA47B7FCEECC731A0BDC78823 /* POPAnimationEventInternal.h */, - 0FA0EBF5A3C86845B318E861C5A06917 /* POPAnimationExtras.h */, - 3C0479900F20357C36682724A2B50A38 /* POPAnimationExtras.mm */, - 27A0D15570634C1F5D3443B885C91F18 /* POPAnimationInternal.h */, - 39E59404A494087C5607452613BDFC2A /* POPAnimationPrivate.h */, - DEAF735C1B7417AF21B7A55F4F34197E /* POPAnimationRuntime.h */, - 04E582A15647B3E1D3816B70D0DD2B32 /* POPAnimationRuntime.mm */, - BD2A41698E57A33818927C3C07C4B1C0 /* POPAnimationTracer.h */, - 88987FB0F003409E01A79927557227E2 /* POPAnimationTracer.mm */, - 7D9860FC3C0D4CC581AB98E15F38A354 /* POPAnimationTracerInternal.h */, - A78E577B323A0A4AF36AAD65D85442BD /* POPAnimator.h */, - 2BF10946F33EB9F356D6656564C960C3 /* POPAnimator.mm */, - 0A2DE2B0E6E9475BF181B9EF695C0AFE /* POPAnimatorPrivate.h */, - 3340A00160AB91C63359057ED3FB9A6F /* POPBasicAnimation.h */, - C3F0B93E3662CD1DBFB51F7D350EC56A /* POPBasicAnimation.mm */, - ED1603CCF86B7DC56B6E7D3B8C0C0D66 /* POPBasicAnimationInternal.h */, - E51F7DE0FACAA8B1EFC5CA14D67A3E34 /* POPCGUtils.h */, - 788568F4BFAED0B2B43F051572F4E531 /* POPCGUtils.mm */, - E583E2DC47F3FFD77AF0B7ACFFB9F72A /* POPCustomAnimation.h */, - BCDA26675FE419CF6BD1E7A11E6AC87E /* POPCustomAnimation.mm */, - D946E020774A4299AEE8D7A35265605B /* POPDecayAnimation.h */, - 5BDDE9FC33ECD05774F8502FD5278C55 /* POPDecayAnimation.mm */, - 4A277A105DF04830DD0FD74B6BBE05E0 /* POPDecayAnimationInternal.h */, - 0496D5E953BA185B6A3483D7E01EAF79 /* POPDefines.h */, - EB2755328542802E735832144CA83D16 /* POPGeometry.h */, - 929F917507D9E9F2E33E3CCBEA3BD966 /* POPGeometry.mm */, - 6759B96170E9E224D8EF0D5073EA6593 /* POPLayerExtras.h */, - 3375AC56A3F32F9EC11822ECD7213780 /* POPLayerExtras.mm */, - 8005F8D7F911B58A057AF849B418EB15 /* POPMath.h */, - 099BA93B6DB8247C0732C9B362E1CB99 /* POPMath.mm */, - 850D2FF29848ABCF98180248743FA309 /* POPPropertyAnimation.h */, - ED80E67A748CAD248D479A9208434B3F /* POPPropertyAnimation.mm */, - 4BF4D4AC48D706D94CE203132638E7BD /* POPPropertyAnimationInternal.h */, - DB8720C1AA73064294B032EDBE0AC27A /* POPSpringAnimation.h */, - 6093B4E6FECC8EE2080F170B2D384CEB /* POPSpringAnimation.mm */, - 228A248B11863AE45AD5A95CD4715929 /* POPSpringAnimationInternal.h */, - 47500FA586D66688C57B5AC3261A2D96 /* POPSpringSolver.h */, - 0DC131700B7517E0CEAD1E48D830C631 /* POPVector.h */, - 2325FBF04A651AC01DE73F623999EE7B /* POPVector.mm */, - C02DF97AA4FD033C23B27F76A8919C80 /* TransformationMatrix.cpp */, - 2996B747B0A17993EB566DC7B106DEC3 /* TransformationMatrix.h */, - 56CEC8E0A684DBDA773BC9B433E62A03 /* UnitBezier.h */, - F5082E8F26631FB4720B365FEB089632 /* Support Files */, - ); - name = pop; - path = pop; - sourceTree = ""; - }; - EF48FA8D4D8CBCD1B95FFBCF341D4856 /* SwipeCardStack */ = { - isa = PBXGroup; - children = ( - 8C09CEFA9FF50ACD47284DB7EFF501E9 /* CardStackAnimationOptions.swift */, - 25B5ECDCC2B3C51F06BDE71377D5160A /* CardStackAnimator.swift */, - A7AAD39DCD5E643FC1FB13BCD0727679 /* CardStackLayoutProvider.swift */, - 1883734235D16D580CDAFE945901C9B2 /* CardStackStateManager.swift */, - 2F6F555EA30DC22F57960156280C8125 /* CardStackTransformProvider.swift */, - 7D36B72BE48A6EA0C1210B1762C8A8E3 /* SwipeCardStack.swift */, - B752FD7A5E73E6D2C9BE37D1D97754C5 /* SwipeCardStackDataSource.swift */, - 7BC80F26E0BED95AA5876B825604774E /* SwipeCardStackDelegate.swift */, - ); - name = SwipeCardStack; - path = Sources/Shuffle/Classes/SwipeCardStack; - sourceTree = ""; - }; - F5082E8F26631FB4720B365FEB089632 /* Support Files */ = { - isa = PBXGroup; - children = ( - 7DE6B043C6C3A9F980B180DD5A323634 /* pop.modulemap */, - 4C47BAFE0BFD6C04331422049BC519B9 /* pop-dummy.m */, - 3B3905EEB5E180399F191DC119D0A25D /* pop-Info.plist */, - 25F37F80F0E84F92AAC368AEB3CFF91B /* pop-prefix.pch */, - 35C92AF7DADB22A7E249DA3015E879C7 /* pop-umbrella.h */, - 80E2E3EDE96B21E4EF9433ACE71A8A44 /* pop.debug.xcconfig */, - 1C845CB7CCC031D71665FF72B2A664BD /* pop.release.xcconfig */, - ); - name = "Support Files"; - path = "../Target Support Files/pop"; - sourceTree = ""; - }; - F7113F98FAB6871FB9031E0ACF5EE130 /* Development Pods */ = { - isa = PBXGroup; - children = ( - C5D538BEC0FEE8E5B91BA5B0F333011D /* Shuffle-iOS */, - ); - name = "Development Pods"; - sourceTree = ""; - }; - F8BEF46E4252EE4ADAFD72447E813444 /* iOS */ = { - isa = PBXGroup; - children = ( - 97E7C2BBDC03530D36F547E7BA4D6D07 /* Foundation.framework */, - C786F4D81BFDC8696BEE509F51CE790B /* XCTest.framework */, - ); - name = iOS; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 21B41CF90ED7EB974596175550C69B54 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - E4DCDD110F04C185E8078EA2A898275F /* Pods-ShuffleExample-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 37278D2576AFA0EE49C9BDC86A02AAA3 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - DA3F4C9B26B77936265D5B020A9A4ACC /* Shuffle-iOS-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 51A00ABBA2BEF3913A4628399CEBD45B /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 092256E303520E50ADEFF25EEB4E73EE /* CwlCatchException.h in Headers */, - 9F70369EF71BD9ABAFF687AF532CC20D /* CwlMachBadInstructionHandler.h in Headers */, - 80DEBE41D84FBA1C4D4FE00C8D797E82 /* CwlPreconditionTesting.h in Headers */, - C051C0411627BD5FCDA031782EB1F716 /* DSL.h in Headers */, - 3BD0C370BBCEBDEA68B8EDBD969370EB /* mach_excServer.h in Headers */, - CD6B1F146B0E157FE5B9CAFFAE77A5B5 /* Nimble-umbrella.h in Headers */, - 9BB5E9B6487FE95C710687B484C17161 /* Nimble.h in Headers */, - 8D17749611AB0C8BD51C068749D8DF68 /* NMBExceptionCapture.h in Headers */, - E0EAC85F7ACFAD998B14FCE66144000E /* NMBStringify.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 6AE95FE5C93FC0753E3389A12783DF61 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 33BA96E9E5C5C2EC400102860291DB45 /* PopBounceButton-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 789BF2A9515D75DE2B2453A4B5637A9D /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 1A8DF79F5EF3D69864A84173E7C9810E /* QCKDSL.h in Headers */, - 8E4A2F4A1EF16B63817A516CC2743619 /* Quick-umbrella.h in Headers */, - 10C8810E574F925B5CD3449B6DBE6EC0 /* Quick.h in Headers */, - BFEBC90223F66B0FF770B92B1C670BCF /* QuickConfiguration.h in Headers */, - 7EB28FEC3D0ABA1A2A6CFE57C400F74D /* QuickSpec.h in Headers */, - 76E7C7CDAA543C791A714B991F595F2B /* QuickSpecBase.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 7BE344F380051E3F6ED14F46BFAB2A40 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - C6DF513C3BDE21A16AF8C6EE86E865BE /* FloatConversion.h in Headers */, - B593B13D8A364AEA0BC944DEE522B76F /* pop-umbrella.h in Headers */, - BF00EC423904650B91B44012ACC2E9DB /* POP.h in Headers */, - D28D4E6F1D4AA00FB8C8B48193D74DC3 /* POPAction.h in Headers */, - C3A33478A970E6A5891E1C2E2E09B7FF /* POPAnimatableProperty.h in Headers */, - 4703D949227D1A13AB4C6D0D98B88906 /* POPAnimatablePropertyTypes.h in Headers */, - 44EF85121CEF7DC475C1B66F9F9D0BD8 /* POPAnimation.h in Headers */, - A6A2BC094D1AE60CA8E8C558682C027F /* POPAnimationEvent.h in Headers */, - 757FE9A24BA34DFDA0BD76906EFD74CE /* POPAnimationEventInternal.h in Headers */, - 406CBDDEF8B2FAE7004BDD58D025F3A4 /* POPAnimationExtras.h in Headers */, - BD28AA8454DE7F1BFB991BC4611DEDBD /* POPAnimationInternal.h in Headers */, - 54F3FA368C54AEA08DE74D983BAF993C /* POPAnimationPrivate.h in Headers */, - 0D732106730245D699A1EECC6AFA9FF2 /* POPAnimationRuntime.h in Headers */, - DD93769DB61E31B191F653ED91DD5149 /* POPAnimationTracer.h in Headers */, - D42251C6971C97737DC928A6A6B75420 /* POPAnimationTracerInternal.h in Headers */, - FC282E98024A52BBAC1504C811FC6D6E /* POPAnimator.h in Headers */, - 8A9427F2B563BC1DD598A3C08A80B3FF /* POPAnimatorPrivate.h in Headers */, - 481FF10DF670C55112D23558C9DFFB10 /* POPBasicAnimation.h in Headers */, - BB4E3EF86798EF3814900099C77DEFC1 /* POPBasicAnimationInternal.h in Headers */, - B4CD99504EBBD319C11286F97B4EFBBB /* POPCGUtils.h in Headers */, - C0DA98F2142F17D818BA59EE7FFEE399 /* POPCustomAnimation.h in Headers */, - C0435D4C80B83B1169E91969B1956AEA /* POPDecayAnimation.h in Headers */, - C7F72875803674D5B386468126E4BE19 /* POPDecayAnimationInternal.h in Headers */, - E9DDD03C1DA612E749FCCE3B465DCBEC /* POPDefines.h in Headers */, - A73416AEE973D1205B7838665787BE92 /* POPGeometry.h in Headers */, - 123ECD353175877853C989AC2AE47688 /* POPLayerExtras.h in Headers */, - 313B87900218125C29762421E7A7B58D /* POPMath.h in Headers */, - 41807A7BD6B06CB4FAEE22C0B2915A7E /* POPPropertyAnimation.h in Headers */, - D7A27317F7438E66767C4B68A76ADA48 /* POPPropertyAnimationInternal.h in Headers */, - C0942CB89FBF05D10D8222230FA3A004 /* POPSpringAnimation.h in Headers */, - 455C842E96C891DDD0F84647305C467F /* POPSpringAnimationInternal.h in Headers */, - 2E747E9F97870781B4F06B8D8A9C8BDF /* POPSpringSolver.h in Headers */, - 4FBEBA41A8D24332D598B79A8309918D /* POPVector.h in Headers */, - 92440C78B0ACA7C9702BEBDF1B4C89A3 /* TransformationMatrix.h in Headers */, - 819DF6B721CB5B2974E7FDA3389283F3 /* UnitBezier.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A9B06B9F24908D39089A1FDF6E7D3068 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 976D45B742DE0A04BD79F05F33136E59 /* Pods-ShuffleTests-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 0483D7F620C992E5C4BD62A7266EABB4 /* pop */ = { - isa = PBXNativeTarget; - buildConfigurationList = 85CBA54F28081310370301BDE6882B73 /* Build configuration list for PBXNativeTarget "pop" */; - buildPhases = ( - 7BE344F380051E3F6ED14F46BFAB2A40 /* Headers */, - AFBB7C873FF497501009AE6D8C6159C8 /* Sources */, - 536610B93BC6EC2E0528D0C4EAE31BC0 /* Frameworks */, - B58BAEA833D561224ECF254E437A5BCB /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = pop; - productName = pop; - productReference = 51305B2D9D8DA36D89CC277D729083D2 /* pop.framework */; - productType = "com.apple.product-type.framework"; - }; - 6CE4608D13EB4E75FE6B40D38210294E /* Shuffle-iOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = C320A288436273417A5DDB7F5D18E8B8 /* Build configuration list for PBXNativeTarget "Shuffle-iOS" */; - buildPhases = ( - 37278D2576AFA0EE49C9BDC86A02AAA3 /* Headers */, - 16B3C9359C225199D717597B22894F1F /* Sources */, - 2FC48CC2F9679ED2E6AFC2A3A64BB283 /* Frameworks */, - 22162B18C0CDC0B51B6C7B6597BE684E /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "Shuffle-iOS"; - productName = "Shuffle-iOS"; - productReference = EF6D82A590C3AFFDB84FB22D5172CC1B /* Shuffle_iOS.framework */; - productType = "com.apple.product-type.framework"; - }; - 6F13695E06195A78EA8A95F8C7ED0D2F /* Nimble */ = { - isa = PBXNativeTarget; - buildConfigurationList = 9AC65E53333ACA93EEB1D8EBAB58CBB6 /* Build configuration list for PBXNativeTarget "Nimble" */; - buildPhases = ( - 51A00ABBA2BEF3913A4628399CEBD45B /* Headers */, - D399136A0E6FE19CACE7F05143312FB1 /* Sources */, - 55C81EE76C6A69F1F69792A679310C68 /* Frameworks */, - D7EBE1F47ACC336A60ED6056AF3261E1 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Nimble; - productName = Nimble; - productReference = BAE263041362D074978BB3B577DF0A05 /* Nimble.framework */; - productType = "com.apple.product-type.framework"; - }; - B073946653E5FD54EC0DDCF78A8B2638 /* Pods-ShuffleExample */ = { - isa = PBXNativeTarget; - buildConfigurationList = 56D3148C5C4C941267405E8AF472DDA5 /* Build configuration list for PBXNativeTarget "Pods-ShuffleExample" */; - buildPhases = ( - 21B41CF90ED7EB974596175550C69B54 /* Headers */, - 7CF5011373E5A433A2FBBE20A2E6A5B7 /* Sources */, - 4384FFEB30103D567D86E76E98568D34 /* Frameworks */, - 71AC1BD6EF1D37431111386E0B583F17 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 4C39FFA5DC6FFA3E26E065C9E57E8DCE /* PBXTargetDependency */, - 92E4FDA10E7AFC54558DF41BCF4005B4 /* PBXTargetDependency */, - D5BBBBABA4E7B4E825D513205BE58582 /* PBXTargetDependency */, - ); - name = "Pods-ShuffleExample"; - productName = "Pods-ShuffleExample"; - productReference = C1E44DABD4EAD33B5FE6488D8315B818 /* Pods_ShuffleExample.framework */; - productType = "com.apple.product-type.framework"; - }; - B0907D91F907C01AF331F8BAD8FDEB13 /* Pods-ShuffleTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 3EADA14EE1D9CB1A10485D699F3B031F /* Build configuration list for PBXNativeTarget "Pods-ShuffleTests" */; - buildPhases = ( - A9B06B9F24908D39089A1FDF6E7D3068 /* Headers */, - 3A647CABCA29EB94A6639E745A08DC18 /* Sources */, - E7156F4D1001B838F43A7595CD054836 /* Frameworks */, - 79EE277DAAAE75CDED72B66C58DA5D25 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 1A0ECB7DEEFE4AAB3F566D6EA87897E7 /* PBXTargetDependency */, - 27495E42D392C6CBEE38F86DD69D8DF8 /* PBXTargetDependency */, - A4734924D1FBD9B523E801B1AC524AE4 /* PBXTargetDependency */, - ); - name = "Pods-ShuffleTests"; - productName = "Pods-ShuffleTests"; - productReference = 7578612C54D3ABD5B144E43D25848D85 /* Pods_ShuffleTests.framework */; - productType = "com.apple.product-type.framework"; - }; - C82891EAB7293DBEE916B21F57E8474D /* Quick */ = { - isa = PBXNativeTarget; - buildConfigurationList = 189D56F652B0345CC3E1073543C1B391 /* Build configuration list for PBXNativeTarget "Quick" */; - buildPhases = ( - 789BF2A9515D75DE2B2453A4B5637A9D /* Headers */, - 694205E4C1C5652ABC91AB6B8D119A52 /* Sources */, - 1FB41F3B817F50C08A530AB486E92A06 /* Frameworks */, - 295DA4774C40DBFC844D2E7BA312DE5F /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Quick; - productName = Quick; - productReference = 0D631E9908483F9525A6B3F36F16CC61 /* Quick.framework */; - productType = "com.apple.product-type.framework"; - }; - CFC4E89E220B0CDD0D54D035D98BCF83 /* PopBounceButton */ = { - isa = PBXNativeTarget; - buildConfigurationList = A61EE220C55B3725EDD742974A4DA6C2 /* Build configuration list for PBXNativeTarget "PopBounceButton" */; - buildPhases = ( - 6AE95FE5C93FC0753E3389A12783DF61 /* Headers */, - 7906C1661B5C49C1C113C56CE4C71F69 /* Sources */, - 328E40D98CC46B04ED34F1D583477533 /* Frameworks */, - 0F9DDCEB6420EFB1C6440DD32A746999 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 6ED09C31F613893255EA1D1CF7714E25 /* PBXTargetDependency */, - ); - name = PopBounceButton; - productName = PopBounceButton; - productReference = 3FE58EDB307AF03C5501C26D75D53CD0 /* PopBounceButton.framework */; - productType = "com.apple.product-type.framework"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - BFDFE7DC352907FC980B868725387E98 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 1100; - LastUpgradeCheck = 1100; - }; - buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */; - compatibilityVersion = "Xcode 6.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = CF1408CF629C7361332E53B88F7BD30C; - productRefGroup = CA77F0913B0A933064C68D44E18B6965 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 6F13695E06195A78EA8A95F8C7ED0D2F /* Nimble */, - B073946653E5FD54EC0DDCF78A8B2638 /* Pods-ShuffleExample */, - B0907D91F907C01AF331F8BAD8FDEB13 /* Pods-ShuffleTests */, - 0483D7F620C992E5C4BD62A7266EABB4 /* pop */, - CFC4E89E220B0CDD0D54D035D98BCF83 /* PopBounceButton */, - C82891EAB7293DBEE916B21F57E8474D /* Quick */, - 6CE4608D13EB4E75FE6B40D38210294E /* Shuffle-iOS */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 0F9DDCEB6420EFB1C6440DD32A746999 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 22162B18C0CDC0B51B6C7B6597BE684E /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 295DA4774C40DBFC844D2E7BA312DE5F /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 71AC1BD6EF1D37431111386E0B583F17 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 79EE277DAAAE75CDED72B66C58DA5D25 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - B58BAEA833D561224ECF254E437A5BCB /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D7EBE1F47ACC336A60ED6056AF3261E1 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 16B3C9359C225199D717597B22894F1F /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 47EFB002105D098DC36579788DA9E8A3 /* Animator.swift in Sources */, - 228DD1E29C23FEAB8589683315D9D433 /* Array+Extensions.swift in Sources */, - 5C72689270C6FEBE5A7172596909BDD5 /* CardAnimationOptions.swift in Sources */, - 3148DDEAC5306EC3C26459B522510727 /* CardAnimator.swift in Sources */, - B1609DC2BCF22024344B742BB5237EED /* CardLayoutProvider.swift in Sources */, - F96ECED3E6F9E53ACCF2A4F3F914C56D /* CardStackAnimationOptions.swift in Sources */, - CA8950235CFF24AB13D3727AA06459FA /* CardStackAnimator.swift in Sources */, - B62526577B8B0BB3027AC3832E2D9E51 /* CardStackLayoutProvider.swift in Sources */, - AD2AD9E54497929D8FF0A5F3DC4ED391 /* CardStackStateManager.swift in Sources */, - 979CAB7FFA691FA4B926968546667A1F /* CardStackTransformProvider.swift in Sources */, - 72F0FC35309BB37B21CE686974567F19 /* CardTransformProvider.swift in Sources */, - F59C80B116A0D53D32C22AA858200F28 /* CGPoint+Extensions.swift in Sources */, - 9869CA3C50C141EF67FE31BC54166296 /* CGVector+Extensions.swift in Sources */, - F128C89D71EF5D06AA25A611902683CF /* PanGestureRecognizer.swift in Sources */, - 2586B092457582875C22EBA7CD7C9F34 /* Shuffle-iOS-dummy.m in Sources */, - A976E66BE29849B96D7C5966E54547F4 /* StringUtils.swift in Sources */, - 6A439A294A99B7A8FD72ABC17778A34A /* SwipeCard.swift in Sources */, - 6CA035CFC34D05CFBA5F1F00B9BB1623 /* SwipeCardDelegate.swift in Sources */, - 71CE66C12DFBDEC878B1616F8FAAA9BC /* SwipeCardStack.swift in Sources */, - 9EF8F523F081A6E1B570DF681F2C4C67 /* SwipeCardStackDataSource.swift in Sources */, - 0A9DFBAC3E90D1E57C7DF4121EC60ED3 /* SwipeCardStackDelegate.swift in Sources */, - 188CD5934038B6C774272B091CE2DC4C /* SwipeDirection.swift in Sources */, - 9D0EE1E6390284E8D44BC8DE38D3C16B /* SwipeView.swift in Sources */, - D2270E67AD8F6A72F1582FE8EAC5D06A /* TapGestureRecognizer.swift in Sources */, - 25086585D6F7FDF186BBAB0D42F2C71B /* UIView+Extensions.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 3A647CABCA29EB94A6639E745A08DC18 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 7235105D3D45158864072A9B4A92508E /* Pods-ShuffleTests-dummy.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 694205E4C1C5652ABC91AB6B8D119A52 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 58A884856B7E64EE3C204D9EDAA14045 /* Behavior.swift in Sources */, - 7CE6049975894E447F2D4071C74F6F8F /* Callsite.swift in Sources */, - 14ECE81218F5F5C9BEF00819A7C078EC /* Closures.swift in Sources */, - B48508EB39EE315F5A00429EEA69DD63 /* Configuration.swift in Sources */, - 018228C4760DF4F8B80630BC9ACCB39E /* DSL.swift in Sources */, - BE56C54CD29F23A1C631645390E8569D /* ErrorUtility.swift in Sources */, - D2C041844A0EB4EB2E8C7B9DAA748EEB /* Example.swift in Sources */, - 9231B70907F130F31CF5717C502B780C /* ExampleGroup.swift in Sources */, - 7536DD99ACEDE673713161E597B7B447 /* ExampleHooks.swift in Sources */, - 59BF9ABA8BB14E0E4E345D13AB6D49FB /* ExampleMetadata.swift in Sources */, - AF60C00928A7AFE04E374B620EEA5F49 /* Filter.swift in Sources */, - 209F98BB7B328893FB64BA0393B4BD57 /* HooksPhase.swift in Sources */, - 887AF8C809D60140319DE71D6427F370 /* NSBundle+CurrentTestBundle.swift in Sources */, - 4ADE5FC9505A3BF7DF17AF9756585116 /* QCKDSL.m in Sources */, - 512AAF465EE936155DD9BBA92368928E /* Quick-dummy.m in Sources */, - 9FB5F3B3AAF3103848313FACD0CACBCD /* QuickConfiguration.m in Sources */, - 3D6A581E79FD9EAC1A948D8BC53F1EB0 /* QuickConfiguration.swift in Sources */, - 4E1DBC9FF76D6AD924D1356260438074 /* QuickSelectedTestSuiteBuilder.swift in Sources */, - 2F0B5199CDB717CA9F680579900ABF15 /* QuickSpec.m in Sources */, - 22B5B4ED0824E7BAF2091AAD6238A73F /* QuickSpecBase.m in Sources */, - 39382B0A1EF090D15BA6C89FC3DCB099 /* QuickTestObservation.swift in Sources */, - A7F5B07BF96955EFDC9106335235EDB2 /* QuickTestSuite.swift in Sources */, - A35159AD5A7A49BA9093F29B63DBD30D /* String+C99ExtendedIdentifier.swift in Sources */, - 94B18F2CFF543F6B2E43E84630C337E2 /* SuiteHooks.swift in Sources */, - A6CE2E672C8EB4DF57485428AFD64A3C /* URL+FileName.swift in Sources */, - C9E716023868A97D2F5B19934D93045E /* World+DSL.swift in Sources */, - F01995755687FA91F51A15ED8FD9D125 /* World.swift in Sources */, - 9E874C00792FA983399C03EC00AE326D /* XCTestSuite+QuickTestSuiteBuilder.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 7906C1661B5C49C1C113C56CE4C71F69 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - A83F5C1EA64C751BA82DCFCD0B782F0C /* ButtonAnimator.swift in Sources */, - 4BF9292F03C9D233AAC0D9DAE96DAEB0 /* PopBounceButton-dummy.m in Sources */, - 5A8CFC96AC6A45F06B1B6D03252F4B24 /* PopBounceButton.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 7CF5011373E5A433A2FBBE20A2E6A5B7 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - A3589AED89E7FE4D1347B3CA0C547CD2 /* Pods-ShuffleExample-dummy.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - AFBB7C873FF497501009AE6D8C6159C8 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - E8FA10B1E698DBEE99BC93C32EB695AE /* pop-dummy.m in Sources */, - 0C12779AE31F0F279D29300A53AF01CC /* POPAnimatableProperty.mm in Sources */, - 14CAA3001D8EB19550AC4A12DB04C2AA /* POPAnimation.mm in Sources */, - 231DC33B8B061E5938BC71E58927DAB4 /* POPAnimationEvent.mm in Sources */, - FCABF48EA3AE10E742936B89167D02E6 /* POPAnimationExtras.mm in Sources */, - 8AE89821346F031A9267420AEB58FAE6 /* POPAnimationRuntime.mm in Sources */, - D4DC6D5FE5A1E01D2B29CD89BA5B6548 /* POPAnimationTracer.mm in Sources */, - AFA73D4E596249CA02C3C8C0E08EE430 /* POPAnimator.mm in Sources */, - CD98B15C796C815933F990D4CE063D9B /* POPBasicAnimation.mm in Sources */, - 9E0A1F6593FE2CCA70442A6A944F2A25 /* POPCGUtils.mm in Sources */, - 7844975FC70726A54B3AF7EFFEA8FF24 /* POPCustomAnimation.mm in Sources */, - DECBD301220AEF2C1202E55FB79B10EC /* POPDecayAnimation.mm in Sources */, - D31161348E267789CE83D0F198B1AFC8 /* POPGeometry.mm in Sources */, - 4907BC71DFEB291321FC9D653D7ED0A1 /* POPLayerExtras.mm in Sources */, - B5707247BBFF4C5A2F27F0A8BD3982A3 /* POPMath.mm in Sources */, - 5D84A98FA7BF6643D510E6FD8369A5FB /* POPPropertyAnimation.mm in Sources */, - 3997F943F4F53CF6B2FAA748F1C74EF4 /* POPSpringAnimation.mm in Sources */, - AD53F691BC9FF3721E858A626A20E837 /* POPVector.mm in Sources */, - B6A82DE586A3C8BED44DA8E437387182 /* TransformationMatrix.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D399136A0E6FE19CACE7F05143312FB1 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - B4058A2AA8486E9879F113E6F67B9679 /* AdapterProtocols.swift in Sources */, - 4203EF96811AE514D64AE069311B1575 /* AllPass.swift in Sources */, - C99BBC3F70E056CB6A3CC0516318939D /* AssertionDispatcher.swift in Sources */, - F310B21703A7BC438A09DDB96670583F /* AssertionRecorder.swift in Sources */, - DCD198D49C0A198A09525B7688EE3BC9 /* Async.swift in Sources */, - 330E8E4A6596ED625E9B34C94CC4136E /* Await.swift in Sources */, - 94DA3131D64B3D904BE28E72F1871065 /* BeAKindOf.swift in Sources */, - 9C460BA614D4B1D314A252C4C5CE1D87 /* BeAnInstanceOf.swift in Sources */, - F4877B3857C780DCDB7F413A03F95600 /* BeCloseTo.swift in Sources */, - C903AEFEEB4E73644A03FB8285543107 /* BeEmpty.swift in Sources */, - 78A51B7FCC1DFB888AAA254529013C12 /* BeginWith.swift in Sources */, - 42F76698690916E0407F51610D829412 /* BeGreaterThan.swift in Sources */, - 2391FFD3230B40E2348B5257D6296BBB /* BeGreaterThanOrEqualTo.swift in Sources */, - 52AB6461CAA9481D24835F3E48301FC6 /* BeIdenticalTo.swift in Sources */, - 9B9714C476F416AD7FD803EA1184D113 /* BeLessThan.swift in Sources */, - 46BDEBF35D99D2CC53EF72DFC5BDCDCC /* BeLessThanOrEqual.swift in Sources */, - 8D75EC8969EA46FBD6E1BED7791A3C37 /* BeLogical.swift in Sources */, - EC7EF3D5778783BD93EBC6F82016ADA9 /* BeNil.swift in Sources */, - C979EEB0159A65246F6BD2C906A8ADB7 /* BeVoid.swift in Sources */, - D34D0540ADCBF163575B6B5444B1AAF6 /* Contain.swift in Sources */, - 5B6F70DDD4C63CF6ED95291BCB633494 /* ContainElementSatisfying.swift in Sources */, - FF920E965F1CA016FF302DE8C92C5122 /* CwlBadInstructionException.swift in Sources */, - 89EE4D6DBDB79963D65AA1E67B543B6D /* CwlCatchBadInstruction.swift in Sources */, - F27A7DE93F66B0C12B4C646D99F5B9F4 /* CwlCatchException.m in Sources */, - 4A9E7C1A8B697A1C0B0A1E0DF855A591 /* CwlCatchException.swift in Sources */, - 39133A7716CEDEB690A7DA9D12C45C4D /* CwlDarwinDefinitions.swift in Sources */, - 8A0EF19254BAC5DF0885D1FBA345E016 /* CwlMachBadInstructionHandler.m in Sources */, - 234849AD309265FD107C74357FC8C0CF /* DSL+Wait.swift in Sources */, - 7AC93EB6DCDA9226165D5BC354FE7BC6 /* DSL.m in Sources */, - A9996A6303084D17B9C439CB132A1F69 /* DSL.swift in Sources */, - 3460FEA0CEADB05D3B56C2E1CAF9590C /* ElementsEqual.swift in Sources */, - 3262B230B938C8D6522790093FEAF69D /* EndWith.swift in Sources */, - D9CFB8E5E354D7BE61D092259779F437 /* Equal.swift in Sources */, - B7662703AF8D3FFFCB0070C50FEDCC58 /* Errors.swift in Sources */, - 602E3758C0EF64AF6B7FCEA05BF5B9B9 /* Expectation.swift in Sources */, - AD69407E2FA1D39A9E09248052F2D81B /* ExpectationMessage.swift in Sources */, - E458AAE1AE9E2250F29806E5633B1860 /* Expression.swift in Sources */, - 192A3F8BEC1A99FD8712D3E09724D72C /* FailureMessage.swift in Sources */, - 7DAC86DCBC36C10F43FA5FEB819B7BF1 /* Functional.swift in Sources */, - 64E26D7D025AC4462DFA8BA66B38C9D8 /* HaveCount.swift in Sources */, - 13D2A4D59DD9612E1AA7F3182A342162 /* mach_excServer.c in Sources */, - 5578F928AEFA8B2B7CC542033590DFD6 /* Match.swift in Sources */, - 26B9FEAB3DE0C8B91709D53571752A3B /* MatcherFunc.swift in Sources */, - 44C9470137EF941955A1FDCE71D68C26 /* MatcherProtocols.swift in Sources */, - 0892D14FE7A3452423E9129D7917664B /* MatchError.swift in Sources */, - B71070160CF07EFA99ED0445B0D191E7 /* Nimble-dummy.m in Sources */, - ECCA1FA570A912E8CDB54EB843F1D030 /* NimbleEnvironment.swift in Sources */, - 2B350015B9F7546D0769649EE12D7D1A /* NimbleXCTestHandler.swift in Sources */, - CEE8D31A4E76BB7B350BF2A7175D4BC2 /* NMBExceptionCapture.m in Sources */, - C0C98C8C7D07E1598F20EE2F0539197D /* NMBExpectation.swift in Sources */, - 99E8019F4689A514DAC6AA40AFF7352E /* NMBObjCMatcher.swift in Sources */, - F78E35D04F09485FA5DFA72FE1AD5AB2 /* NMBStringify.m in Sources */, - 46B90B2CF2EB97B38C43A31E9A5478C2 /* PostNotification.swift in Sources */, - B6CC23C6C288F4EB9EDD3A06F1F5F094 /* Predicate.swift in Sources */, - F9E85548BF1EF8C5035BAF92233C34B6 /* RaisesException.swift in Sources */, - B79FC6E46F642C3FC74B3E6D9175B1AB /* SatisfyAllOf.swift in Sources */, - 8D543DAD9A6C0B8BF8A5DB38AD876677 /* SatisfyAnyOf.swift in Sources */, - D9D6150D329A87CBB415FD349F0C50FD /* SourceLocation.swift in Sources */, - 806B9040D79A3DC58FB56EAC16FE19BF /* Stringers.swift in Sources */, - 72FB8CEABF346A37D54CC08647489A98 /* ThrowAssertion.swift in Sources */, - B2A65EEDB5D5EC246EA68E10964FF7B3 /* ThrowError.swift in Sources */, - CF9218FF56D8EE43681150A3E1635C9A /* ToSucceed.swift in Sources */, - DB84342A0C0DEABBF7F729DE55225D82 /* XCTestObservationCenter+Register.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 1A0ECB7DEEFE4AAB3F566D6EA87897E7 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Nimble; - target = 6F13695E06195A78EA8A95F8C7ED0D2F /* Nimble */; - targetProxy = 5665007CBEF81662F70BABFCE97B79A2 /* PBXContainerItemProxy */; - }; - 27495E42D392C6CBEE38F86DD69D8DF8 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Quick; - target = C82891EAB7293DBEE916B21F57E8474D /* Quick */; - targetProxy = 2DEFC0ECF5FD8B5A0AB198178D317550 /* PBXContainerItemProxy */; - }; - 4C39FFA5DC6FFA3E26E065C9E57E8DCE /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = PopBounceButton; - target = CFC4E89E220B0CDD0D54D035D98BCF83 /* PopBounceButton */; - targetProxy = 1EC5D1A7A04DA8C506493E0E21B0E618 /* PBXContainerItemProxy */; - }; - 6ED09C31F613893255EA1D1CF7714E25 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = pop; - target = 0483D7F620C992E5C4BD62A7266EABB4 /* pop */; - targetProxy = 4081C945B1B12CA66257334C5AB3C44B /* PBXContainerItemProxy */; - }; - 92E4FDA10E7AFC54558DF41BCF4005B4 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "Shuffle-iOS"; - target = 6CE4608D13EB4E75FE6B40D38210294E /* Shuffle-iOS */; - targetProxy = 5A78345CC61FE3FCB2B7875BC67168AC /* PBXContainerItemProxy */; - }; - A4734924D1FBD9B523E801B1AC524AE4 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "Shuffle-iOS"; - target = 6CE4608D13EB4E75FE6B40D38210294E /* Shuffle-iOS */; - targetProxy = CDCB57621FF47DF2AA3A174E571A8ED8 /* PBXContainerItemProxy */; - }; - D5BBBBABA4E7B4E825D513205BE58582 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = pop; - target = 0483D7F620C992E5C4BD62A7266EABB4 /* pop */; - targetProxy = E6282B10367769978385B5F7CD74A5FF /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 0127AEAE65A61A08DB7333ADC511FF6D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 1DC6D986B960C025C1EB941DD87D0EFD /* Pods-ShuffleTests.release.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CLANG_ENABLE_OBJC_WEAK = NO; - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-ShuffleTests/Pods-ShuffleTests-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 14.4; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-ShuffleTests/Pods-ShuffleTests.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 0C362D60953AB8C3CE6296B04039C734 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_DEBUG=1", - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.4; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - STRIP_INSTALLED_PRODUCT = NO; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - SYMROOT = "${SRCROOT}/../build"; - }; - name = Debug; - }; - 163B49BA2F21A1C5931C2B7AF85AB7D7 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = B21DD6A5A0CACA93CC53B583BEAE3740 /* Shuffle-iOS.release.xcconfig */; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Shuffle-iOS/Shuffle-iOS-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Shuffle-iOS/Shuffle-iOS-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Shuffle-iOS/Shuffle-iOS.modulemap"; - PRODUCT_MODULE_NAME = Shuffle_iOS; - PRODUCT_NAME = Shuffle_iOS; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 5808AB50F21535E10701B82B07F396BE /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 8E36E4C8AD3762F42D4D8C1DF2F999F2 /* Nimble.release.xcconfig */; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Nimble/Nimble-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Nimble/Nimble-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Nimble/Nimble.modulemap"; - PRODUCT_MODULE_NAME = Nimble; - PRODUCT_NAME = Nimble; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 70316595C2F2AE9923F8DA14508E87F3 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_RELEASE=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.4; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - STRIP_INSTALLED_PRODUCT = NO; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 5.0; - SYMROOT = "${SRCROOT}/../build"; - }; - name = Release; - }; - 7A0CC6FADD5E8E416BE47F9A88A6FF58 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 368872999D6A3E67E9940111DB6CBB04 /* Pods-ShuffleTests.debug.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CLANG_ENABLE_OBJC_WEAK = NO; - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-ShuffleTests/Pods-ShuffleTests-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 14.4; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-ShuffleTests/Pods-ShuffleTests.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 87B0528058C0DA92B684FBC34E66E88D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = B21FEC65D55E818874CE10E5E562D0C5 /* Quick.release.xcconfig */; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Quick/Quick-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Quick/Quick-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Quick/Quick.modulemap"; - PRODUCT_MODULE_NAME = Quick; - PRODUCT_NAME = Quick; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 8D1767D08D1F04A2B54F9EF60AD08A6E /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 09ECE98E09D4B2289EA74AF7EF3D3C67 /* Quick.debug.xcconfig */; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Quick/Quick-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Quick/Quick-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Quick/Quick.modulemap"; - PRODUCT_MODULE_NAME = Quick; - PRODUCT_NAME = Quick; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 9122BAB4AD99D7DBDF9DC19904B7D906 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 1C845CB7CCC031D71665FF72B2A664BD /* pop.release.xcconfig */; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/pop/pop-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/pop/pop-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/pop/pop.modulemap"; - PRODUCT_MODULE_NAME = pop; - PRODUCT_NAME = pop; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 9E4B720CAE705558F80172DC55F716F8 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = C45902F4C848F9831A635584FEE98C94 /* PopBounceButton.release.xcconfig */; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/PopBounceButton/PopBounceButton-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/PopBounceButton/PopBounceButton-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/PopBounceButton/PopBounceButton.modulemap"; - PRODUCT_MODULE_NAME = PopBounceButton; - PRODUCT_NAME = PopBounceButton; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.2; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - BCB28DE97357DC449B4A93F411B70DF1 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = D77C5ED4234BBF8FDC667A20FA6427C9 /* Pods-ShuffleExample.release.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CLANG_ENABLE_OBJC_WEAK = NO; - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-ShuffleExample/Pods-ShuffleExample-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 14.4; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-ShuffleExample/Pods-ShuffleExample.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - BF439B4026359158718EE0D4ADD54506 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 3876D4392113DDD98429D7F7DE81891B /* PopBounceButton.debug.xcconfig */; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/PopBounceButton/PopBounceButton-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/PopBounceButton/PopBounceButton-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/PopBounceButton/PopBounceButton.modulemap"; - PRODUCT_MODULE_NAME = PopBounceButton; - PRODUCT_NAME = PopBounceButton; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.2; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - D3A6C80F3FAB2BF6A9626EFEDBA7041A /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = B589AF574060FE2F8A65E8DCA127F162 /* Nimble.debug.xcconfig */; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Nimble/Nimble-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Nimble/Nimble-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Nimble/Nimble.modulemap"; - PRODUCT_MODULE_NAME = Nimble; - PRODUCT_NAME = Nimble; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - DD6DC91A1D09118B6DB0A1DF2710CBF5 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = FCE976B5349CA5EA837CA87C4CCF0635 /* Shuffle-iOS.debug.xcconfig */; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Shuffle-iOS/Shuffle-iOS-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Shuffle-iOS/Shuffle-iOS-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Shuffle-iOS/Shuffle-iOS.modulemap"; - PRODUCT_MODULE_NAME = Shuffle_iOS; - PRODUCT_NAME = Shuffle_iOS; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - E38D7B3E5C913E976164ED0F88D8265A /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 2E064129762E283A20DCB7BB5C834E59 /* Pods-ShuffleExample.debug.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CLANG_ENABLE_OBJC_WEAK = NO; - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-ShuffleExample/Pods-ShuffleExample-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 14.4; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-ShuffleExample/Pods-ShuffleExample.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - EFD11A65852BB075EA1FD0F6BBF992EC /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 80E2E3EDE96B21E4EF9433ACE71A8A44 /* pop.debug.xcconfig */; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/pop/pop-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/pop/pop-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/pop/pop.modulemap"; - PRODUCT_MODULE_NAME = pop; - PRODUCT_NAME = pop; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 189D56F652B0345CC3E1073543C1B391 /* Build configuration list for PBXNativeTarget "Quick" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 8D1767D08D1F04A2B54F9EF60AD08A6E /* Debug */, - 87B0528058C0DA92B684FBC34E66E88D /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 3EADA14EE1D9CB1A10485D699F3B031F /* Build configuration list for PBXNativeTarget "Pods-ShuffleTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 7A0CC6FADD5E8E416BE47F9A88A6FF58 /* Debug */, - 0127AEAE65A61A08DB7333ADC511FF6D /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 0C362D60953AB8C3CE6296B04039C734 /* Debug */, - 70316595C2F2AE9923F8DA14508E87F3 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 56D3148C5C4C941267405E8AF472DDA5 /* Build configuration list for PBXNativeTarget "Pods-ShuffleExample" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - E38D7B3E5C913E976164ED0F88D8265A /* Debug */, - BCB28DE97357DC449B4A93F411B70DF1 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 85CBA54F28081310370301BDE6882B73 /* Build configuration list for PBXNativeTarget "pop" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - EFD11A65852BB075EA1FD0F6BBF992EC /* Debug */, - 9122BAB4AD99D7DBDF9DC19904B7D906 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 9AC65E53333ACA93EEB1D8EBAB58CBB6 /* Build configuration list for PBXNativeTarget "Nimble" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - D3A6C80F3FAB2BF6A9626EFEDBA7041A /* Debug */, - 5808AB50F21535E10701B82B07F396BE /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - A61EE220C55B3725EDD742974A4DA6C2 /* Build configuration list for PBXNativeTarget "PopBounceButton" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - BF439B4026359158718EE0D4ADD54506 /* Debug */, - 9E4B720CAE705558F80172DC55F716F8 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C320A288436273417A5DDB7F5D18E8B8 /* Build configuration list for PBXNativeTarget "Shuffle-iOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - DD6DC91A1D09118B6DB0A1DF2710CBF5 /* Debug */, - 163B49BA2F21A1C5931C2B7AF85AB7D7 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = BFDFE7DC352907FC980B868725387E98 /* Project object */; -} diff --git a/Example/Pods/PopBounceButton/LICENSE b/Example/Pods/PopBounceButton/LICENSE deleted file mode 100644 index 50206935..00000000 --- a/Example/Pods/PopBounceButton/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2018 Mac Gallagher - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/Example/Pods/PopBounceButton/PopBounceButton/Classes/ButtonAnimator.swift b/Example/Pods/PopBounceButton/PopBounceButton/Classes/ButtonAnimator.swift deleted file mode 100644 index a0a845e5..00000000 --- a/Example/Pods/PopBounceButton/PopBounceButton/Classes/ButtonAnimator.swift +++ /dev/null @@ -1,51 +0,0 @@ -// -// ButtonAnimator.swift -// PopBounceButton -// -// Created by Mac Gallagher on 1/11/19. -// - -import pop - -protocol ButtonAnimatable { - func applyScaleAnimation(to view: UIView, toValue: CGPoint, delay: TimeInterval, duration: TimeInterval) - func applySpringScaleAnimation(to view: UIView, - fromValue: CGPoint, - toValue: CGPoint, - springBounciness: CGFloat, - springSpeed: CGFloat, - initialVelocity: CGPoint, - delay: TimeInterval) -} - -class ButtonAnimator: ButtonAnimatable { - func applyScaleAnimation(to view: UIView, toValue: CGPoint, delay: TimeInterval = 0, duration: TimeInterval) { - guard let scaleAnimation = POPBasicAnimation(propertyNamed: kPOPViewScaleXY) else { return } - scaleAnimation.duration = duration - scaleAnimation.toValue = toValue - scaleAnimation.beginTime = CACurrentMediaTime() + delay - view.pop_add(scaleAnimation, forKey: ButtonAnimator.scaleKey) - } - - func applySpringScaleAnimation(to view: UIView, - fromValue: CGPoint, - toValue: CGPoint, - springBounciness: CGFloat, - springSpeed: CGFloat, - initialVelocity: CGPoint, - delay: TimeInterval = 0) { - guard let scaleAnimation = POPSpringAnimation(propertyNamed: kPOPViewScaleXY) else { return } - scaleAnimation.fromValue = fromValue - scaleAnimation.toValue = toValue - scaleAnimation.beginTime = CACurrentMediaTime() + delay - scaleAnimation.springBounciness = springBounciness - scaleAnimation.springSpeed = springSpeed - scaleAnimation.velocity = initialVelocity - view.pop_add(scaleAnimation, forKey: ButtonAnimator.springScaleKey) - } -} - -extension ButtonAnimator { - static var scaleKey = "POPScaleAnimation" - static var springScaleKey = "springScaleAnimation" -} diff --git a/Example/Pods/PopBounceButton/PopBounceButton/Classes/PopBounceButton.swift b/Example/Pods/PopBounceButton/PopBounceButton/Classes/PopBounceButton.swift deleted file mode 100644 index fb81b0a2..00000000 --- a/Example/Pods/PopBounceButton/PopBounceButton/Classes/PopBounceButton.swift +++ /dev/null @@ -1,119 +0,0 @@ -// -// PopBounceButton.swift -// PopBounceButton -// -// Created by Mac Gallagher on 5/25/18. -// Copyright © 2018 Mac Gallagher. All rights reserved. -// - -import UIKit - -open class PopBounceButton: UIButton { - ///The effective bounciness of the spring animation. Higher values increase spring movement range resulting in more oscillations and springiness. Defined as a value in the range [0, 20]. Defaults to 19. - public var springBounciness: CGFloat = 19 - - ///The effective speed of the spring animation. Higher values increase the dampening power of the spring. Defined as a value in the range [0, 20]. Defaults to 10. - public var springSpeed: CGFloat = 10 - - ///The initial velocity of the spring animation. Higher values increase the percieved force from the user's touch. Expressed in scale factor per second. Defaults to 6. - public var springVelocity: CGFloat = 6 - - ///The total duration of the scale animation performed after a touchUpOutside event is recognized. Expressed in seconds. Defaults to 0.3. - public var cancelTapScaleDuration: TimeInterval = 0.3 - - ///The factor by which to scale the button after a long-press has been recognized. Defaults to 0.7. - public var longPressScaleFactor: CGFloat = 0.7 - - ///The total duration of the scale animation performed after a long-press has been recognized. Expressed in seconds. Defaults to 0.1. - public var longPressScaleDuration: TimeInterval = 0.1 - - ///The minimum period fingers must press on the button for a long-press to be recognized. Expressed in seconds. Defaults to 0.2. - public var minimumPressDuration: TimeInterval = 0.2 - - var touchUpInsideScaledDelay: TimeInterval = 0.05 - - var animator: ButtonAnimatable = ButtonAnimator() - var longPressTimer: Timer = Timer() - var isScaled: Bool = false - - private var initialBounds: CGSize = .zero - - public init() { - super.init(frame: .zero) - initialize() - } - - public override init(frame: CGRect) { - super.init(frame: frame) - initialize() - } - - public required init?(coder aDecoder: NSCoder) { - super.init(coder: aDecoder) - initialize() - } - - private func initialize() { - addTarget(self, action: #selector(handleTouchDown), for: .touchDown) - addTarget(self, action: #selector(handleTouchUpInside), for: .touchUpInside) - addTarget(self, action: #selector(handleTouchUpOutside), for: .touchUpOutside) - layer.rasterizationScale = UIScreen.main.scale - layer.shouldRasterize = true - } - - override open func draw(_ rect: CGRect) { - super.draw(rect) - initialBounds = rect.size - } - - @objc private func handleTouchDown() { - longPressTimer = Timer.scheduledTimer(timeInterval: minimumPressDuration, - target: self, - selector: #selector(handleScale), - userInfo: nil, - repeats: false) - } - - @objc private func handleScale() { - pop_removeAllAnimations() - animator.applyScaleAnimation(to: self, - toValue: CGPoint(c: longPressScaleFactor), - delay: 0, - duration: longPressScaleDuration) - isScaled = true - } - - @objc private func handleTouchUpInside() { - pop_removeAllAnimations() - let scaleFactor: CGFloat = min(frame.width / initialBounds.width, 1) - animator.applySpringScaleAnimation(to: self, - fromValue: CGPoint(c: scaleFactor - 0.01), - toValue: .one, - springBounciness: springBounciness, - springSpeed: springSpeed, - initialVelocity: isScaled ? .zero : CGPoint(c: -scaleFactor * springVelocity), - delay: isScaled ? touchUpInsideScaledDelay : 0) - longPressTimer.invalidate() - isScaled = false - } - - @objc private func handleTouchUpOutside() { - pop_removeAllAnimations() - animator.applyScaleAnimation(to: self, - toValue: .one, - delay: 0, - duration: cancelTapScaleDuration) - longPressTimer.invalidate() - isScaled = false - } -} - -extension CGPoint { - static var one = CGPoint(x: 1, y: 1) - - init(c: CGFloat) { - self.init() - self.x = c - self.y = c - } -} diff --git a/Example/Pods/PopBounceButton/README.md b/Example/Pods/PopBounceButton/README.md deleted file mode 100644 index 80723079..00000000 --- a/Example/Pods/PopBounceButton/README.md +++ /dev/null @@ -1,89 +0,0 @@ -# PopBounceButton -![Swift-Version](https://img.shields.io/badge/Swift-4.2-orange.svg) -![CocoaPods](https://img.shields.io/cocoapods/v/PopBounceButton.svg) -![license](https://img.shields.io/cocoapods/l/PopBounceButton.svg) -![CocoaPods](https://img.shields.io/cocoapods/p/PopBounceButton.svg) - -A customizable animated button built with Facebook's Pop animation library. Inspired by the familiar button stack from Tinder. - - -![TinderDemo](https://raw.githubusercontent.com/mac-gallagher/PopBounceButton/master/Images/tinder_demo.gif) - -![MessageButtonExample](https://raw.githubusercontent.com/mac-gallagher/PopBounceButton/master/Images/example.gif) - -# Features -- [x] Lightweight and highly customizable -- [x] Animations for multiple UIControlEvents -- [x] Pure Swift 4 - -# Example -To run the example project, clone the repo and run the `PopBounceButton-Example` target. - -# Requirements -* iOS 9.0+ -* Xcode 9.0+ -* Swift 4.0+ - -# Installation - -### CocoaPods -PopBounceButton is available through [CocoaPods](). To install it, simply add the following line to your `Podfile`: - - pod 'PopBounceButton' - - -### Manual -1. Download and drop the `PopBounceButton` directory into your project. -2. Install Facebook's [Pop]() library. - -# Contributing -- If you **found a bug**, open an issue and tag as bug. -- If you **have a feature request**, open an issue and tag as feature. -- If you **want to contribute**, submit a pull request. - - In order to submit a pull request, please fork this repo and submit a pull request from your forked repo. - - Have a detailed message as to what your pull request fixes/enhances/adds. - -# Quick Start - -1. Add a `PopBounceButton` to your view. - - ```swift - let frame = CGRect(origin: .zero, size: CGSize(width: 100, height: 100)) - let button = PopBounceButton(frame: frame) - view.addSubview(button) - ``` - -2. Attach a target to your button to handle any events. - - ```swift - button.addTarget(self, action: #selector(handleTap), for: .touchUpInside) - ``` - ```swift - @objc func handleTap(_ sender: PopBounceButton) { - //do something - } - ``` - -# Customization -Because PopBounceButton is a subclass of UIButton, it can be customized in the same way. The button's animations can be changed by modifying the following variables exposed by `PopBounceButton`: - -```swift -var springBounciness: CGFloat = 19.0 -var springSpeed: CGFloat = 10.0 -var springVelocity: CGFloat = 6.0 - -var cancelTapScaleDuration: TimeInterval = 0.3 - -var longPressScaleFactor: CGFloat = 0.7 -var longPressScaleDuration: TimeInterval = 0.1 -var minimumPressDuration: TimeInterval = 0.2 -``` - -# Sources -* [Pop](): Facebook's iOS animation framework. - -# Author -Mac Gallagher, jmgallagher36@gmail.com - -# License -PopBounceButton is available under the [MIT License](LICENSE), see LICENSE for more infomation. diff --git a/Example/Pods/Quick/LICENSE b/Example/Pods/Quick/LICENSE deleted file mode 100644 index e9001655..00000000 --- a/Example/Pods/Quick/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2014, Quick Team - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Example/Pods/Quick/README.md b/Example/Pods/Quick/README.md deleted file mode 100644 index b4c6964d..00000000 --- a/Example/Pods/Quick/README.md +++ /dev/null @@ -1,90 +0,0 @@ -![](http://f.cl.ly/items/0r1E192C1R0b2g2Q3h2w/QuickLogo_Color.png) - -[![Build Status](https://travis-ci.org/Quick/Quick.svg?branch=master)](https://travis-ci.org/Quick/Quick) -[![CocoaPods](https://img.shields.io/cocoapods/v/Quick.svg)](https://cocoapods.org/pods/Quick) -[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) -[![Accio supported](https://img.shields.io/badge/Accio-supported-0A7CF5.svg?style=flat)](https://github.com/JamitLabs/Accio) -[![Platforms](https://img.shields.io/cocoapods/p/Quick.svg)](https://cocoapods.org/pods/Quick) - -Quick is a behavior-driven development framework for Swift and Objective-C. -Inspired by [RSpec](https://github.com/rspec/rspec), [Specta](https://github.com/specta/specta), and [Ginkgo](https://github.com/onsi/ginkgo). - -![](https://raw.githubusercontent.com/Quick/Assets/master/Screenshots/QuickSpec%20screenshot.png) - -```swift -// Swift - -import Quick -import Nimble - -class TableOfContentsSpec: QuickSpec { - override func spec() { - describe("the 'Documentation' directory") { - it("has everything you need to get started") { - let sections = Directory("Documentation").sections - expect(sections).to(contain("Organized Tests with Quick Examples and Example Groups")) - expect(sections).to(contain("Installing Quick")) - } - - context("if it doesn't have what you're looking for") { - it("needs to be updated") { - let you = You(awesome: true) - expect{you.submittedAnIssue}.toEventually(beTruthy()) - } - } - } - } -} -``` -#### Nimble -Quick comes together with [Nimble](https://github.com/Quick/Nimble) — a matcher framework for your tests. You can learn why `XCTAssert()` statements make your expectations unclear and how to fix that using Nimble assertions [here](./Documentation/en-us/NimbleAssertions.md). - -## Swift Version - -Certain versions of Quick and Nimble only support certain versions of Swift. Depending on which version of Swift your project uses, you should use specific versions of Quick and Nimble. Use the table below to determine which versions of Quick and Nimble are compatible with your project. - -|Swift version |Quick version |Nimble version | -|:--------------------|:---------------|:--------------| -|Swift 4.2 |v1.3.2 or later |v7.3.2 or later| -|Swift 3 / Swift 4 |v1.0.0 or later |v5.0.0 or later| -|Swift 2.2 / Swift 2.3|v0.9.3 |v4.1.0 | - -## Documentation - -All documentation can be found in the [Documentation folder](./Documentation), including [detailed installation instructions](./Documentation/en-us/InstallingQuick.md) for CocoaPods, Carthage, Git submodules, and more. For example, you can install Quick and [Nimble](https://github.com/Quick/Nimble) using CocoaPods by adding the following to your Podfile: - -```rb -# Podfile - -use_frameworks! - -target "MyApp" do - # Normal libraries - - abstract_target 'Tests' do - inherit! :search_paths - target "MyAppTests" - target "MyAppUITests" - - pod 'Quick' - pod 'Nimble' - end -end -``` - -## Projects using Quick - -Over ten-thousand apps use either Quick and Nimble however, as they are not included in the app binary, neither appear in “Top Used Libraries” blog posts. Therefore, it would be greatly appreciated to remind contributors that their efforts are valued by compiling a list of organizations and projects that use them. - -Does your organization or project use Quick and Nimble? If yes, [please add your project to the list](https://github.com/Quick/Quick/wiki/Projects-using-Quick). - -## Who uses Quick - -Similar to projects using Quick, it would be nice to hear why people use Quick and Nimble. Are there features you love? Are there features that are just okay? Are there some features we have that no one uses? - -Have something positive to say about Quick (or Nimble)? If yes, [provide a testimonial here](https://github.com/Quick/Quick/wiki/Who-uses-Quick). - - -## License - -Apache 2.0 license. See the [`LICENSE`](LICENSE) file for details. diff --git a/Example/Pods/Quick/Sources/Quick/Behavior.swift b/Example/Pods/Quick/Sources/Quick/Behavior.swift deleted file mode 100644 index 7a25a36c..00000000 --- a/Example/Pods/Quick/Sources/Quick/Behavior.swift +++ /dev/null @@ -1,19 +0,0 @@ -/// A `Behavior` encapsulates a set of examples that can be re-used in several locations using the `itBehavesLike` -/// function with a context instance of the generic type. -open class Behavior { - - /** - Override this variable if you want to provide custom name for this example group. - */ - open class var name: String { return String(describing: self) } - - /** - Override this method in your behavior to define a set of reusable examples. - - This behaves just like an example group defines using `describe` or `context`--it may contain any number of `beforeEach` - and `afterEach` closures, as well as any number of examples (defined using `it`). - - - parameter aContext: A closure that, when evaluated, returns a `Context` instance that provide the information on the subject. - */ - open class func spec(_ aContext: @escaping () -> Context) {} -} diff --git a/Example/Pods/Quick/Sources/Quick/Callsite.swift b/Example/Pods/Quick/Sources/Quick/Callsite.swift deleted file mode 100644 index 33e732ca..00000000 --- a/Example/Pods/Quick/Sources/Quick/Callsite.swift +++ /dev/null @@ -1,52 +0,0 @@ -import Foundation - -#if canImport(Darwin) -// swiftlint:disable type_name -@objcMembers -public class _CallsiteBase: NSObject {} -#else -public class _CallsiteBase: NSObject {} -// swiftlint:enable type_name -#endif - -// Ideally we would always use `StaticString` as the type for tracking the file name -// in which an example is defined, for consistency with `assert` etc. from the -// stdlib, and because recent versions of the XCTest overlay require `StaticString` -// when calling `XCTFail`. Under the Objective-C runtime (i.e. building on macOS), we -// have to use `String` instead because StaticString can't be generated from Objective-C -#if SWIFT_PACKAGE -public typealias FileString = StaticString -#else -public typealias FileString = String -#endif - -/** - An object encapsulating the file and line number at which - a particular example is defined. -*/ -final public class Callsite: _CallsiteBase { - /** - The absolute path of the file in which an example is defined. - */ - public let file: FileString - - /** - The line number on which an example is defined. - */ - public let line: UInt - - internal init(file: FileString, line: UInt) { - self.file = file - self.line = line - } -} - -extension Callsite { - /** - Returns a boolean indicating whether two Callsite objects are equal. - If two callsites are in the same file and on the same line, they must be equal. - */ - @nonobjc public static func == (lhs: Callsite, rhs: Callsite) -> Bool { - return String(describing: lhs.file) == String(describing: rhs.file) && lhs.line == rhs.line - } -} diff --git a/Example/Pods/Quick/Sources/Quick/Configuration/Configuration.swift b/Example/Pods/Quick/Sources/Quick/Configuration/Configuration.swift deleted file mode 100644 index 71b263b5..00000000 --- a/Example/Pods/Quick/Sources/Quick/Configuration/Configuration.swift +++ /dev/null @@ -1,165 +0,0 @@ -import Foundation - -/** - A closure that temporarily exposes a Configuration object within - the scope of the closure. -*/ -public typealias QuickConfigurer = (_ configuration: Configuration) -> Void - -/** - A closure that, given metadata about an example, returns a boolean value - indicating whether that example should be run. -*/ -public typealias ExampleFilter = (_ example: Example) -> Bool - -/** - A configuration encapsulates various options you can use - to configure Quick's behavior. -*/ -final public class Configuration: NSObject { - internal let exampleHooks = ExampleHooks() - internal let suiteHooks = SuiteHooks() - internal var exclusionFilters: [ExampleFilter] = [ - { example in // swiftlint:disable:this opening_brace - if let pending = example.filterFlags[Filter.pending] { - return pending - } else { - return false - } - }, - ] - internal var inclusionFilters: [ExampleFilter] = [ - { example in // swiftlint:disable:this opening_brace - if let focused = example.filterFlags[Filter.focused] { - return focused - } else { - return false - } - }, - ] - - /** - Run all examples if none match the configured filters. True by default. - */ - public var runAllWhenEverythingFiltered = true - - /** - Registers an inclusion filter. - - All examples are filtered using all inclusion filters. - The remaining examples are run. If no examples remain, all examples are run. - - - parameter filter: A filter that, given an example, returns a value indicating - whether that example should be included in the examples - that are run. - */ - public func include(_ filter: @escaping ExampleFilter) { - inclusionFilters.append(filter) - } - - /** - Registers an exclusion filter. - - All examples that remain after being filtered by the inclusion filters are - then filtered via all exclusion filters. - - - parameter filter: A filter that, given an example, returns a value indicating - whether that example should be excluded from the examples - that are run. - */ - public func exclude(_ filter: @escaping ExampleFilter) { - exclusionFilters.append(filter) - } - - /** - Identical to Quick.Configuration.beforeEach, except the closure is - provided with metadata on the example that the closure is being run - prior to. - */ -#if canImport(Darwin) - @objc(beforeEachWithMetadata:) - public func beforeEach(_ closure: @escaping BeforeExampleWithMetadataClosure) { - exampleHooks.appendBefore(closure) - } -#else - public func beforeEach(_ closure: @escaping BeforeExampleWithMetadataClosure) { - exampleHooks.appendBefore(closure) - } -#endif - - /** - Like Quick.DSL.beforeEach, this configures Quick to execute the - given closure before each example that is run. The closure - passed to this method is executed before each example Quick runs, - globally across the test suite. You may call this method multiple - times across multiple +[QuickConfigure configure:] methods in order - to define several closures to run before each example. - - Note that, since Quick makes no guarantee as to the order in which - +[QuickConfiguration configure:] methods are evaluated, there is no - guarantee as to the order in which beforeEach closures are evaluated - either. Multiple beforeEach defined on a single configuration, however, - will be executed in the order they're defined. - - - parameter closure: The closure to be executed before each example - in the test suite. - */ - public func beforeEach(_ closure: @escaping BeforeExampleClosure) { - exampleHooks.appendBefore(closure) - } - - /** - Identical to Quick.Configuration.afterEach, except the closure - is provided with metadata on the example that the closure is being - run after. - */ -#if canImport(Darwin) - @objc(afterEachWithMetadata:) - public func afterEach(_ closure: @escaping AfterExampleWithMetadataClosure) { - exampleHooks.appendAfter(closure) - } -#else - public func afterEach(_ closure: @escaping AfterExampleWithMetadataClosure) { - exampleHooks.appendAfter(closure) - } -#endif - - /** - Like Quick.DSL.afterEach, this configures Quick to execute the - given closure after each example that is run. The closure - passed to this method is executed after each example Quick runs, - globally across the test suite. You may call this method multiple - times across multiple +[QuickConfigure configure:] methods in order - to define several closures to run after each example. - - Note that, since Quick makes no guarantee as to the order in which - +[QuickConfiguration configure:] methods are evaluated, there is no - guarantee as to the order in which afterEach closures are evaluated - either. Multiple afterEach defined on a single configuration, however, - will be executed in the order they're defined. - - - parameter closure: The closure to be executed before each example - in the test suite. - */ - public func afterEach(_ closure: @escaping AfterExampleClosure) { - exampleHooks.appendAfter(closure) - } - - /** - Like Quick.DSL.beforeSuite, this configures Quick to execute - the given closure prior to any and all examples that are run. - The two methods are functionally equivalent. - */ - public func beforeSuite(_ closure: @escaping BeforeSuiteClosure) { - suiteHooks.appendBefore(closure) - } - - /** - Like Quick.DSL.afterSuite, this configures Quick to execute - the given closure after all examples have been run. - The two methods are functionally equivalent. - */ - public func afterSuite(_ closure: @escaping AfterSuiteClosure) { - suiteHooks.appendAfter(closure) - } -} diff --git a/Example/Pods/Quick/Sources/Quick/Configuration/QuickConfiguration.swift b/Example/Pods/Quick/Sources/Quick/Configuration/QuickConfiguration.swift deleted file mode 100644 index d807bfee..00000000 --- a/Example/Pods/Quick/Sources/Quick/Configuration/QuickConfiguration.swift +++ /dev/null @@ -1,78 +0,0 @@ -import Foundation -import XCTest - -#if SWIFT_PACKAGE - -open class QuickConfiguration: NSObject { - open class func configure(_ configuration: Configuration) {} -} - -#endif - -extension QuickConfiguration { - #if !canImport(Darwin) - private static var configurationSubclasses: [QuickConfiguration.Type] = [] - #endif - - /// Finds all direct subclasses of QuickConfiguration and passes them to the block provided. - /// The classes are iterated over in the order that objc_getClassList returns them. - /// - /// - parameter block: A block that takes a QuickConfiguration.Type. - /// This block will be executed once for each subclass of QuickConfiguration. - private static func enumerateSubclasses(_ block: (QuickConfiguration.Type) -> Void) { - #if canImport(Darwin) - let classesCount = objc_getClassList(nil, 0) - - guard classesCount > 0 else { - return - } - - let classes = UnsafeMutablePointer.allocate(capacity: Int(classesCount)) - defer { free(classes) } - - objc_getClassList(AutoreleasingUnsafeMutablePointer(classes), classesCount) - - var configurationSubclasses: [QuickConfiguration.Type] = [] - for index in 0.. Void) { - World.sharedWorld.sharedExamples(name) { _ in closure() } -} - -/** - Defines a group of shared examples. These examples can be re-used in several locations - by using the `itBehavesLike` function. - - - parameter name: The name of the shared example group. This must be unique across all shared example - groups defined in a test suite. - - parameter closure: A closure containing the examples. This behaves just like an example group defined - using `describe` or `context`--the closure may contain any number of `beforeEach` - and `afterEach` closures, as well as any number of examples (defined using `it`). - - The closure takes a SharedExampleContext as an argument. This context is a function - that can be executed to retrieve parameters passed in via an `itBehavesLike` function. -*/ -public func sharedExamples(_ name: String, closure: @escaping SharedExampleClosure) { - World.sharedWorld.sharedExamples(name, closure: closure) -} - -/** - Defines an example group. Example groups are logical groupings of examples. - Example groups can share setup and teardown code. - - - parameter description: An arbitrary string describing the example group. - - parameter closure: A closure that can contain other examples. - - parameter flags: A mapping of string keys to booleans that can be used to filter examples or example groups. -*/ -public func describe(_ description: String, flags: FilterFlags = [:], closure: () -> Void) { - World.sharedWorld.describe(description, flags: flags, closure: closure) -} - -/** - Defines an example group. Equivalent to `describe`. -*/ -public func context(_ description: String, flags: FilterFlags = [:], closure: () -> Void) { - World.sharedWorld.context(description, flags: flags, closure: closure) -} - -/** - Defines a closure to be run prior to each example in the current example - group. This closure is not run for pending or otherwise disabled examples. - An example group may contain an unlimited number of beforeEach. They'll be - run in the order they're defined, but you shouldn't rely on that behavior. - - - parameter closure: The closure to be run prior to each example. -*/ -public func beforeEach(_ closure: @escaping BeforeExampleClosure) { - World.sharedWorld.beforeEach(closure) -} - -/** - Identical to Quick.DSL.beforeEach, except the closure is provided with - metadata on the example that the closure is being run prior to. -*/ -public func beforeEach(_ closure: @escaping BeforeExampleWithMetadataClosure) { - World.sharedWorld.beforeEach(closure: closure) -} - -/** - Defines a closure to be run after each example in the current example - group. This closure is not run for pending or otherwise disabled examples. - An example group may contain an unlimited number of afterEach. They'll be - run in the order they're defined, but you shouldn't rely on that behavior. - - - parameter closure: The closure to be run after each example. -*/ -public func afterEach(_ closure: @escaping AfterExampleClosure) { - World.sharedWorld.afterEach(closure) -} - -/** - Identical to Quick.DSL.afterEach, except the closure is provided with - metadata on the example that the closure is being run after. -*/ -public func afterEach(_ closure: @escaping AfterExampleWithMetadataClosure) { - World.sharedWorld.afterEach(closure: closure) -} - -/** - Defines an example. Examples use assertions to demonstrate how code should - behave. These are like "tests" in XCTest. - - - parameter description: An arbitrary string describing what the example is meant to specify. - - parameter closure: A closure that can contain assertions. - - parameter flags: A mapping of string keys to booleans that can be used to filter examples or example groups. - Empty by default. - - parameter file: The absolute path to the file containing the example. A sensible default is provided. - - parameter line: The line containing the example. A sensible default is provided. -*/ -public func it(_ description: String, flags: FilterFlags = [:], file: FileString = #file, line: UInt = #line, closure: @escaping () -> Void) { - World.sharedWorld.it(description, flags: flags, file: file, line: line, closure: closure) -} - -/** - Inserts the examples defined using a `sharedExamples` function into the current example group. - The shared examples are executed at this location, as if they were written out manually. - - - parameter name: The name of the shared examples group to be executed. This must be identical to the - name of a shared examples group defined using `sharedExamples`. If there are no shared - examples that match the name given, an exception is thrown and the test suite will crash. - - parameter flags: A mapping of string keys to booleans that can be used to filter examples or example groups. - Empty by default. - - parameter file: The absolute path to the file containing the current example group. A sensible default is provided. - - parameter line: The line containing the current example group. A sensible default is provided. -*/ -public func itBehavesLike(_ name: String, flags: FilterFlags = [:], file: FileString = #file, line: UInt = #line) { - itBehavesLike(name, flags: flags, file: file, line: line, sharedExampleContext: { return [:] }) -} - -/** - Inserts the examples defined using a `sharedExamples` function into the current example group. - The shared examples are executed at this location, as if they were written out manually. - This function also passes those shared examples a context that can be evaluated to give the shared - examples extra information on the subject of the example. - - - parameter name: The name of the shared examples group to be executed. This must be identical to the - name of a shared examples group defined using `sharedExamples`. If there are no shared - examples that match the name given, an exception is thrown and the test suite will crash. - - parameter sharedExampleContext: A closure that, when evaluated, returns key-value pairs that provide the - shared examples with extra information on the subject of the example. - - parameter flags: A mapping of string keys to booleans that can be used to filter examples or example groups. - Empty by default. - - parameter file: The absolute path to the file containing the current example group. A sensible default is provided. - - parameter line: The line containing the current example group. A sensible default is provided. -*/ -public func itBehavesLike(_ name: String, flags: FilterFlags = [:], file: FileString = #file, line: UInt = #line, sharedExampleContext: @escaping SharedExampleContext) { - World.sharedWorld.itBehavesLike(name, sharedExampleContext: sharedExampleContext, flags: flags, file: file, line: line) -} - -/** - Inserts the examples defined using a `Behavior` into the current example group. - The shared examples are executed at this location, as if they were written out manually. - This function also passes a strongly-typed context that can be evaluated to give the shared examples extra information on the subject of the example. - - - parameter behavior: The type of `Behavior` class defining the example group to be executed. - - parameter context: A closure that, when evaluated, returns an instance of `Behavior`'s context type to provide its example group with extra information on the subject of the example. - - parameter flags: A mapping of string keys to booleans that can be used to filter examples or example groups. - Empty by default. - - parameter file: The absolute path to the file containing the current example group. A sensible default is provided. - - parameter line: The line containing the current example group. A sensible default is provided. - */ -public func itBehavesLike(_ behavior: Behavior.Type, flags: FilterFlags = [:], file: FileString = #file, line: UInt = #line, context: @escaping () -> C) { - World.sharedWorld.itBehavesLike(behavior, context: context, flags: flags, file: file, line: line) -} - -/** - Defines an example or example group that should not be executed. Use `pending` to temporarily disable - examples or groups that should not be run yet. - - - parameter description: An arbitrary string describing the example or example group. - - parameter closure: A closure that will not be evaluated. -*/ -public func pending(_ description: String, closure: () -> Void) { - World.sharedWorld.pending(description, closure: closure) -} - -/** - Use this to quickly mark a `describe` closure as pending. - This disables all examples within the closure. -*/ -public func xdescribe(_ description: String, flags: FilterFlags = [:], closure: () -> Void) { - World.sharedWorld.xdescribe(description, flags: flags, closure: closure) -} - -/** - Use this to quickly mark a `context` closure as pending. - This disables all examples within the closure. -*/ -public func xcontext(_ description: String, flags: FilterFlags = [:], closure: () -> Void) { - xdescribe(description, flags: flags, closure: closure) -} - -/** - Use this to quickly mark an `it` closure as pending. - This disables the example and ensures the code within the closure is never run. -*/ -public func xit(_ description: String, flags: FilterFlags = [:], file: FileString = #file, line: UInt = #line, closure: @escaping () -> Void) { - World.sharedWorld.xit(description, flags: flags, file: file, line: line, closure: closure) -} - -/** - Use this to quicklu mark an `itBehavesLike` closure as pending. - This disables the example group defined by this behavior and ensures the code within is never run. -*/ -public func xitBehavesLike(_ behavior: Behavior.Type, flags: FilterFlags = [:], file: FileString = #file, line: UInt = #line, context: @escaping () -> C) { - World.sharedWorld.xitBehavesLike(behavior, context: context, flags: flags, file: file, line: line) -} -/** - Use this to quickly focus a `describe` closure, focusing the examples in the closure. - If any examples in the test suite are focused, only those examples are executed. - This trumps any explicitly focused or unfocused examples within the closure--they are all treated as focused. -*/ -public func fdescribe(_ description: String, flags: FilterFlags = [:], closure: () -> Void) { - World.sharedWorld.fdescribe(description, flags: flags, closure: closure) -} - -/** - Use this to quickly focus a `context` closure. Equivalent to `fdescribe`. -*/ -public func fcontext(_ description: String, flags: FilterFlags = [:], closure: () -> Void) { - fdescribe(description, flags: flags, closure: closure) -} - -/** - Use this to quickly focus an `it` closure, focusing the example. - If any examples in the test suite are focused, only those examples are executed. -*/ -public func fit(_ description: String, flags: FilterFlags = [:], file: FileString = #file, line: UInt = #line, closure: @escaping () -> Void) { - World.sharedWorld.fit(description, flags: flags, file: file, line: line, closure: closure) -} - -/** - Use this to quickly focus an `itBehavesLike` closure. -*/ -public func fitBehavesLike(_ name: String, flags: FilterFlags = [:], file: FileString = #file, line: UInt = #line) { - fitBehavesLike(name, flags: flags, file: file, line: line, sharedExampleContext: { return [:] }) -} - -/** - Use this to quickly focus an `itBehavesLike` closure. -*/ -public func fitBehavesLike(_ name: String, flags: FilterFlags = [:], file: FileString = #file, line: UInt = #line, sharedExampleContext: @escaping SharedExampleContext) { - World.sharedWorld.fitBehavesLike(name, sharedExampleContext: sharedExampleContext, flags: flags, file: file, line: line) -} - -/** - Use this to quickly focus on `itBehavesLike` closure. - */ -public func fitBehavesLike(_ behavior: Behavior.Type, flags: FilterFlags = [:], file: FileString = #file, line: UInt = #line, context: @escaping () -> C) { - World.sharedWorld.fitBehavesLike(behavior, context: context, flags: flags, file: file, line: line) -} - -// swiftlint:enable line_length diff --git a/Example/Pods/Quick/Sources/Quick/DSL/World+DSL.swift b/Example/Pods/Quick/Sources/Quick/DSL/World+DSL.swift deleted file mode 100644 index 957023ee..00000000 --- a/Example/Pods/Quick/Sources/Quick/DSL/World+DSL.swift +++ /dev/null @@ -1,211 +0,0 @@ -import Foundation - -/** - Adds methods to World to support top-level DSL functions (Swift) and - macros (Objective-C). These functions map directly to the DSL that test - writers use in their specs. -*/ -extension World { - internal func beforeSuite(_ closure: @escaping BeforeSuiteClosure) { - suiteHooks.appendBefore(closure) - } - - internal func afterSuite(_ closure: @escaping AfterSuiteClosure) { - suiteHooks.appendAfter(closure) - } - - internal func sharedExamples(_ name: String, closure: @escaping SharedExampleClosure) { - registerSharedExample(name, closure: closure) - } - - internal func describe(_ description: String, flags: FilterFlags, closure: () -> Void) { - guard currentExampleMetadata == nil else { - raiseError("'describe' cannot be used inside '\(currentPhase)', 'describe' may only be used inside 'context' or 'describe'.") - } - guard currentExampleGroup != nil else { - // swiftlint:disable:next line_length - raiseError("Error: example group was not created by its parent QuickSpec spec. Check that describe() or context() was used in QuickSpec.spec() and not a more general context (i.e. an XCTestCase test)") - } - let group = ExampleGroup(description: description, flags: flags) - currentExampleGroup.appendExampleGroup(group) - performWithCurrentExampleGroup(group, closure: closure) - } - - internal func context(_ description: String, flags: FilterFlags, closure: () -> Void) { - guard currentExampleMetadata == nil else { - raiseError("'context' cannot be used inside '\(currentPhase)', 'context' may only be used inside 'context' or 'describe'.") - } - self.describe(description, flags: flags, closure: closure) - } - - internal func fdescribe(_ description: String, flags: FilterFlags, closure: () -> Void) { - var focusedFlags = flags - focusedFlags[Filter.focused] = true - self.describe(description, flags: focusedFlags, closure: closure) - } - - internal func xdescribe(_ description: String, flags: FilterFlags, closure: () -> Void) { - var pendingFlags = flags - pendingFlags[Filter.pending] = true - self.describe(description, flags: pendingFlags, closure: closure) - } - - internal func beforeEach(_ closure: @escaping BeforeExampleClosure) { - guard currentExampleMetadata == nil else { - raiseError("'beforeEach' cannot be used inside '\(currentPhase)', 'beforeEach' may only be used inside 'context' or 'describe'.") - } - currentExampleGroup.hooks.appendBefore(closure) - } - -#if canImport(Darwin) - @objc(beforeEachWithMetadata:) - internal func beforeEach(closure: @escaping BeforeExampleWithMetadataClosure) { - currentExampleGroup.hooks.appendBefore(closure) - } -#else - internal func beforeEach(closure: @escaping BeforeExampleWithMetadataClosure) { - currentExampleGroup.hooks.appendBefore(closure) - } -#endif - - internal func afterEach(_ closure: @escaping AfterExampleClosure) { - guard currentExampleMetadata == nil else { - raiseError("'afterEach' cannot be used inside '\(currentPhase)', 'afterEach' may only be used inside 'context' or 'describe'.") - } - currentExampleGroup.hooks.appendAfter(closure) - } - -#if canImport(Darwin) - @objc(afterEachWithMetadata:) - internal func afterEach(closure: @escaping AfterExampleWithMetadataClosure) { - currentExampleGroup.hooks.appendAfter(closure) - } -#else - internal func afterEach(closure: @escaping AfterExampleWithMetadataClosure) { - currentExampleGroup.hooks.appendAfter(closure) - } -#endif - - @nonobjc - internal func it(_ description: String, flags: FilterFlags, file: FileString, line: UInt, closure: @escaping () -> Void) { - if beforesCurrentlyExecuting { - raiseError("'it' cannot be used inside 'beforeEach', 'it' may only be used inside 'context' or 'describe'.") - } - if aftersCurrentlyExecuting { - raiseError("'it' cannot be used inside 'afterEach', 'it' may only be used inside 'context' or 'describe'.") - } - guard currentExampleMetadata == nil else { - raiseError("'it' cannot be used inside 'it', 'it' may only be used inside 'context' or 'describe'.") - } - let callsite = Callsite(file: file, line: line) - let example = Example(description: description, callsite: callsite, flags: flags, closure: closure) - currentExampleGroup.appendExample(example) - } - - @nonobjc - internal func fit(_ description: String, flags: FilterFlags, file: FileString, line: UInt, closure: @escaping () -> Void) { - var focusedFlags = flags - focusedFlags[Filter.focused] = true - self.it(description, flags: focusedFlags, file: file, line: line, closure: closure) - } - - @nonobjc - internal func xit(_ description: String, flags: FilterFlags, file: FileString, line: UInt, closure: @escaping () -> Void) { - var pendingFlags = flags - pendingFlags[Filter.pending] = true - self.it(description, flags: pendingFlags, file: file, line: line, closure: closure) - } - - @nonobjc - internal func itBehavesLike(_ name: String, sharedExampleContext: @escaping SharedExampleContext, flags: FilterFlags, file: FileString, line: UInt) { - guard currentExampleMetadata == nil else { - raiseError("'itBehavesLike' cannot be used inside '\(currentPhase)', 'itBehavesLike' may only be used inside 'context' or 'describe'.") - } - let callsite = Callsite(file: file, line: line) - let closure = World.sharedWorld.sharedExample(name) - - let group = ExampleGroup(description: name, flags: flags) - currentExampleGroup.appendExampleGroup(group) - performWithCurrentExampleGroup(group) { - closure(sharedExampleContext) - } - - group.walkDownExamples { (example: Example) in - example.isSharedExample = true - example.callsite = callsite - } - } - - @nonobjc - internal func fitBehavesLike(_ name: String, sharedExampleContext: @escaping SharedExampleContext, flags: FilterFlags, file: FileString, line: UInt) { - var focusedFlags = flags - focusedFlags[Filter.focused] = true - self.itBehavesLike(name, sharedExampleContext: sharedExampleContext, flags: focusedFlags, file: file, line: line) - } - - internal func itBehavesLike(_ behavior: Behavior.Type, context: @escaping () -> C, flags: FilterFlags, file: FileString, line: UInt) { - guard currentExampleMetadata == nil else { - raiseError("'itBehavesLike' cannot be used inside '\(currentPhase)', 'itBehavesLike' may only be used inside 'context' or 'describe'.") - } - let callsite = Callsite(file: file, line: line) - let closure = behavior.spec - let group = ExampleGroup(description: behavior.name, flags: flags) - currentExampleGroup.appendExampleGroup(group) - performWithCurrentExampleGroup(group) { - closure(context) - } - - group.walkDownExamples { (example: Example) in - example.isSharedExample = true - example.callsite = callsite - } - } - - internal func fitBehavesLike(_ behavior: Behavior.Type, context: @escaping () -> C, flags: FilterFlags, file: FileString, line: UInt) { - var focusedFlags = flags - focusedFlags[Filter.focused] = true - self.itBehavesLike(behavior, context: context, flags: focusedFlags, file: file, line: line) - } - - internal func xitBehavesLike(_ behavior: Behavior.Type, context: @escaping () -> C, flags: FilterFlags, file: FileString, line: UInt) { - var pendingFlags = flags - pendingFlags[Filter.pending] = true - self.itBehavesLike(behavior, context: context, flags: pendingFlags, file: file, line: line) - } - -#if canImport(Darwin) && !SWIFT_PACKAGE - @objc(itWithDescription:flags:file:line:closure:) - internal func objc_it(_ description: String, flags: FilterFlags, file: FileString, line: UInt, closure: @escaping () -> Void) { - it(description, flags: flags, file: file, line: line, closure: closure) - } - - @objc(fitWithDescription:flags:file:line:closure:) - internal func objc_fit(_ description: String, flags: FilterFlags, file: FileString, line: UInt, closure: @escaping () -> Void) { - fit(description, flags: flags, file: file, line: line, closure: closure) - } - - @objc(xitWithDescription:flags:file:line:closure:) - internal func objc_xit(_ description: String, flags: FilterFlags, file: FileString, line: UInt, closure: @escaping () -> Void) { - xit(description, flags: flags, file: file, line: line, closure: closure) - } - - @objc(itBehavesLikeSharedExampleNamed:sharedExampleContext:flags:file:line:) - internal func objc_itBehavesLike(_ name: String, sharedExampleContext: @escaping SharedExampleContext, flags: FilterFlags, file: FileString, line: UInt) { - itBehavesLike(name, sharedExampleContext: sharedExampleContext, flags: flags, file: file, line: line) - } -#endif - - internal func pending(_ description: String, closure: () -> Void) { - print("Pending: \(description)") - } - - private var currentPhase: String { - if beforesCurrentlyExecuting { - return "beforeEach" - } else if aftersCurrentlyExecuting { - return "afterEach" - } - - return "it" - } -} diff --git a/Example/Pods/Quick/Sources/Quick/ErrorUtility.swift b/Example/Pods/Quick/Sources/Quick/ErrorUtility.swift deleted file mode 100644 index f13f43aa..00000000 --- a/Example/Pods/Quick/Sources/Quick/ErrorUtility.swift +++ /dev/null @@ -1,10 +0,0 @@ -import Foundation - -internal func raiseError(_ message: String) -> Never { -#if canImport(Darwin) - NSException(name: .internalInconsistencyException, reason: message, userInfo: nil).raise() -#endif - - // This won't be reached when ObjC is available and the exception above is raisd - fatalError(message) -} diff --git a/Example/Pods/Quick/Sources/Quick/Example.swift b/Example/Pods/Quick/Sources/Quick/Example.swift deleted file mode 100644 index b351a228..00000000 --- a/Example/Pods/Quick/Sources/Quick/Example.swift +++ /dev/null @@ -1,123 +0,0 @@ -import Foundation - -#if canImport(Darwin) -// swiftlint:disable type_name -@objcMembers -public class _ExampleBase: NSObject {} -#else -public class _ExampleBase: NSObject {} -// swiftlint:enable type_name -#endif - -/** - Examples, defined with the `it` function, use assertions to - demonstrate how code should behave. These are like "tests" in XCTest. -*/ -final public class Example: _ExampleBase { - /** - A boolean indicating whether the example is a shared example; - i.e.: whether it is an example defined with `itBehavesLike`. - */ - public var isSharedExample = false - - /** - The site at which the example is defined. - This must be set correctly in order for Xcode to highlight - the correct line in red when reporting a failure. - */ - public var callsite: Callsite - - weak internal var group: ExampleGroup? - - private let internalDescription: String - private let closure: () -> Void - private let flags: FilterFlags - - internal init(description: String, callsite: Callsite, flags: FilterFlags, closure: @escaping () -> Void) { - self.internalDescription = description - self.closure = closure - self.callsite = callsite - self.flags = flags - } - - public override var description: String { - return internalDescription - } - - /** - The example name. A name is a concatenation of the name of - the example group the example belongs to, followed by the - description of the example itself. - - The example name is used to generate a test method selector - to be displayed in Xcode's test navigator. - */ - public var name: String { - guard let groupName = group?.name else { return description } - return "\(groupName), \(description)" - } - - /** - Executes the example closure, as well as all before and after - closures defined in the its surrounding example groups. - */ - public func run() { - let world = World.sharedWorld - - if world.numberOfExamplesRun == 0 { - world.suiteHooks.executeBefores() - } - - let exampleMetadata = ExampleMetadata(example: self, exampleIndex: world.numberOfExamplesRun) - world.currentExampleMetadata = exampleMetadata - defer { - world.currentExampleMetadata = nil - } - - world.exampleHooks.executeBefores(exampleMetadata) - group!.phase = .beforesExecuting - for before in group!.befores { - before(exampleMetadata) - } - group!.phase = .beforesFinished - - closure() - - group!.phase = .aftersExecuting - for after in group!.afters { - after(exampleMetadata) - } - group!.phase = .aftersFinished - world.exampleHooks.executeAfters(exampleMetadata) - - world.numberOfExamplesRun += 1 - - if !world.isRunningAdditionalSuites && world.numberOfExamplesRun >= world.cachedIncludedExampleCount { - world.suiteHooks.executeAfters() - } - } - - /** - Evaluates the filter flags set on this example and on the example groups - this example belongs to. Flags set on the example are trumped by flags on - the example group it belongs to. Flags on inner example groups are trumped - by flags on outer example groups. - */ - internal var filterFlags: FilterFlags { - var aggregateFlags = flags - for (key, value) in group!.filterFlags { - aggregateFlags[key] = value - } - return aggregateFlags - } -} - -extension Example { - /** - Returns a boolean indicating whether two Example objects are equal. - If two examples are defined at the exact same callsite, they must be equal. - */ - @nonobjc public static func == (lhs: Example, rhs: Example) -> Bool { - return lhs.callsite == rhs.callsite - } -} diff --git a/Example/Pods/Quick/Sources/Quick/ExampleGroup.swift b/Example/Pods/Quick/Sources/Quick/ExampleGroup.swift deleted file mode 100644 index 5fbfadb4..00000000 --- a/Example/Pods/Quick/Sources/Quick/ExampleGroup.swift +++ /dev/null @@ -1,106 +0,0 @@ -import Foundation - -/** - Example groups are logical groupings of examples, defined with - the `describe` and `context` functions. Example groups can share - setup and teardown code. -*/ -final public class ExampleGroup: NSObject { - weak internal var parent: ExampleGroup? - internal let hooks = ExampleHooks() - - internal var phase: HooksPhase = .nothingExecuted - - private let internalDescription: String - private let flags: FilterFlags - private let isInternalRootExampleGroup: Bool - private var childGroups = [ExampleGroup]() - private var childExamples = [Example]() - - internal init(description: String, flags: FilterFlags, isInternalRootExampleGroup: Bool = false) { - self.internalDescription = description - self.flags = flags - self.isInternalRootExampleGroup = isInternalRootExampleGroup - } - - public override var description: String { - return internalDescription - } - - /** - Returns a list of examples that belong to this example group, - or to any of its descendant example groups. - */ - #if canImport(Darwin) - @objc - public var examples: [Example] { - return childExamples + childGroups.flatMap { $0.examples } - } - #else - public var examples: [Example] { - return childExamples + childGroups.flatMap { $0.examples } - } - #endif - - internal var name: String? { - guard let parent = parent else { - return isInternalRootExampleGroup ? nil : description - } - - guard let name = parent.name else { return description } - return "\(name), \(description)" - } - - internal var filterFlags: FilterFlags { - var aggregateFlags = flags - walkUp { group in - for (key, value) in group.flags { - aggregateFlags[key] = value - } - } - return aggregateFlags - } - - internal var befores: [BeforeExampleWithMetadataClosure] { - var closures = Array(hooks.befores.reversed()) - walkUp { group in - closures.append(contentsOf: Array(group.hooks.befores.reversed())) - } - return Array(closures.reversed()) - } - - internal var afters: [AfterExampleWithMetadataClosure] { - var closures = hooks.afters - walkUp { group in - closures.append(contentsOf: group.hooks.afters) - } - return closures - } - - internal func walkDownExamples(_ callback: (_ example: Example) -> Void) { - for example in childExamples { - callback(example) - } - for group in childGroups { - group.walkDownExamples(callback) - } - } - - internal func appendExampleGroup(_ group: ExampleGroup) { - group.parent = self - childGroups.append(group) - } - - internal func appendExample(_ example: Example) { - example.group = self - childExamples.append(example) - } - - private func walkUp(_ callback: (_ group: ExampleGroup) -> Void) { - var group = self - while let parent = group.parent { - callback(parent) - group = parent - } - } -} diff --git a/Example/Pods/Quick/Sources/Quick/ExampleMetadata.swift b/Example/Pods/Quick/Sources/Quick/ExampleMetadata.swift deleted file mode 100644 index a8f0d776..00000000 --- a/Example/Pods/Quick/Sources/Quick/ExampleMetadata.swift +++ /dev/null @@ -1,33 +0,0 @@ -import Foundation - -#if canImport(Darwin) -// swiftlint:disable type_name -@objcMembers -public class _ExampleMetadataBase: NSObject {} -#else -public class _ExampleMetadataBase: NSObject {} -// swiftlint:enable type_name -#endif - -/** - A class that encapsulates information about an example, - including the index at which the example was executed, as - well as the example itself. -*/ -final public class ExampleMetadata: _ExampleMetadataBase { - /** - The example for which this metadata was collected. - */ - public let example: Example - - /** - The index at which this example was executed in the - test suite. - */ - public let exampleIndex: Int - - internal init(example: Example, exampleIndex: Int) { - self.example = example - self.exampleIndex = exampleIndex - } -} diff --git a/Example/Pods/Quick/Sources/Quick/Filter.swift b/Example/Pods/Quick/Sources/Quick/Filter.swift deleted file mode 100644 index d7fbe8d7..00000000 --- a/Example/Pods/Quick/Sources/Quick/Filter.swift +++ /dev/null @@ -1,40 +0,0 @@ -import Foundation - -#if canImport(Darwin) -// swiftlint:disable type_name -@objcMembers -public class _FilterBase: NSObject {} -#else -public class _FilterBase: NSObject {} -// swiftlint:enable type_name -#endif - -/** - A mapping of string keys to booleans that can be used to - filter examples or example groups. For example, a "focused" - example would have the flags [Focused: true]. -*/ -public typealias FilterFlags = [String: Bool] - -/** - A namespace for filter flag keys, defined primarily to make the - keys available in Objective-C. -*/ -final public class Filter: _FilterBase { - /** - Example and example groups with [Focused: true] are included in test runs, - excluding all other examples without this flag. Use this to only run one or - two tests that you're currently focusing on. - */ - public class var focused: String { - return "focused" - } - - /** - Example and example groups with [Pending: true] are excluded from test runs. - Use this to temporarily suspend examples that you know do not pass yet. - */ - public class var pending: String { - return "pending" - } -} diff --git a/Example/Pods/Quick/Sources/Quick/Hooks/Closures.swift b/Example/Pods/Quick/Sources/Quick/Hooks/Closures.swift deleted file mode 100644 index 9c7d3106..00000000 --- a/Example/Pods/Quick/Sources/Quick/Hooks/Closures.swift +++ /dev/null @@ -1,35 +0,0 @@ -// MARK: Example Hooks - -/** - A closure executed before an example is run. -*/ -public typealias BeforeExampleClosure = () -> Void - -/** - A closure executed before an example is run. The closure is given example metadata, - which contains information about the example that is about to be run. -*/ -public typealias BeforeExampleWithMetadataClosure = (_ exampleMetadata: ExampleMetadata) -> Void - -/** - A closure executed after an example is run. -*/ -public typealias AfterExampleClosure = BeforeExampleClosure - -/** - A closure executed after an example is run. The closure is given example metadata, - which contains information about the example that has just finished running. -*/ -public typealias AfterExampleWithMetadataClosure = BeforeExampleWithMetadataClosure - -// MARK: Suite Hooks - -/** - A closure executed before any examples are run. -*/ -public typealias BeforeSuiteClosure = () -> Void - -/** - A closure executed after all examples have finished running. -*/ -public typealias AfterSuiteClosure = BeforeSuiteClosure diff --git a/Example/Pods/Quick/Sources/Quick/Hooks/ExampleHooks.swift b/Example/Pods/Quick/Sources/Quick/Hooks/ExampleHooks.swift deleted file mode 100644 index 449cbfcc..00000000 --- a/Example/Pods/Quick/Sources/Quick/Hooks/ExampleHooks.swift +++ /dev/null @@ -1,42 +0,0 @@ -/** - A container for closures to be executed before and after each example. -*/ -final internal class ExampleHooks { - internal var befores: [BeforeExampleWithMetadataClosure] = [] - internal var afters: [AfterExampleWithMetadataClosure] = [] - internal var phase: HooksPhase = .nothingExecuted - - internal func appendBefore(_ closure: @escaping BeforeExampleWithMetadataClosure) { - befores.append(closure) - } - - internal func appendBefore(_ closure: @escaping BeforeExampleClosure) { - befores.append { (_: ExampleMetadata) in closure() } - } - - internal func appendAfter(_ closure: @escaping AfterExampleWithMetadataClosure) { - afters.append(closure) - } - - internal func appendAfter(_ closure: @escaping AfterExampleClosure) { - afters.append { (_: ExampleMetadata) in closure() } - } - - internal func executeBefores(_ exampleMetadata: ExampleMetadata) { - phase = .beforesExecuting - for before in befores { - before(exampleMetadata) - } - - phase = .beforesFinished - } - - internal func executeAfters(_ exampleMetadata: ExampleMetadata) { - phase = .aftersExecuting - for after in afters { - after(exampleMetadata) - } - - phase = .aftersFinished - } -} diff --git a/Example/Pods/Quick/Sources/Quick/Hooks/HooksPhase.swift b/Example/Pods/Quick/Sources/Quick/Hooks/HooksPhase.swift deleted file mode 100644 index 24401582..00000000 --- a/Example/Pods/Quick/Sources/Quick/Hooks/HooksPhase.swift +++ /dev/null @@ -1,11 +0,0 @@ -/** - A description of the execution cycle of the current example with - respect to the hooks of that example. - */ -internal enum HooksPhase { - case nothingExecuted - case beforesExecuting - case beforesFinished - case aftersExecuting - case aftersFinished -} diff --git a/Example/Pods/Quick/Sources/Quick/Hooks/SuiteHooks.swift b/Example/Pods/Quick/Sources/Quick/Hooks/SuiteHooks.swift deleted file mode 100644 index b39292b7..00000000 --- a/Example/Pods/Quick/Sources/Quick/Hooks/SuiteHooks.swift +++ /dev/null @@ -1,32 +0,0 @@ -/** - A container for closures to be executed before and after all examples. -*/ -final internal class SuiteHooks { - internal var befores: [BeforeSuiteClosure] = [] - internal var afters: [AfterSuiteClosure] = [] - internal var phase: HooksPhase = .nothingExecuted - - internal func appendBefore(_ closure: @escaping BeforeSuiteClosure) { - befores.append(closure) - } - - internal func appendAfter(_ closure: @escaping AfterSuiteClosure) { - afters.append(closure) - } - - internal func executeBefores() { - phase = .beforesExecuting - for before in befores { - before() - } - phase = .beforesFinished - } - - internal func executeAfters() { - phase = .aftersExecuting - for after in afters { - after() - } - phase = .aftersFinished - } -} diff --git a/Example/Pods/Quick/Sources/Quick/NSBundle+CurrentTestBundle.swift b/Example/Pods/Quick/Sources/Quick/NSBundle+CurrentTestBundle.swift deleted file mode 100644 index f5596cc0..00000000 --- a/Example/Pods/Quick/Sources/Quick/NSBundle+CurrentTestBundle.swift +++ /dev/null @@ -1,25 +0,0 @@ -#if canImport(Darwin) - -import Foundation - -extension Bundle { - - /** - Locates the first bundle with a '.xctest' file extension. - */ - internal static var currentTestBundle: Bundle? { - return allBundles.first { $0.bundlePath.hasSuffix(".xctest") } - } - - /** - Return the module name of the bundle. - Uses the bundle filename and transform it to match Xcode's transformation. - Module name has to be a valid "C99 extended identifier". - */ - internal var moduleName: String { - let fileName = bundleURL.fileName - return fileName.c99ExtendedIdentifier - } -} - -#endif diff --git a/Example/Pods/Quick/Sources/Quick/QuickSelectedTestSuiteBuilder.swift b/Example/Pods/Quick/Sources/Quick/QuickSelectedTestSuiteBuilder.swift deleted file mode 100644 index 865c3ae1..00000000 --- a/Example/Pods/Quick/Sources/Quick/QuickSelectedTestSuiteBuilder.swift +++ /dev/null @@ -1,74 +0,0 @@ -#if canImport(Darwin) -import Foundation - -/** - Responsible for building a "Selected tests" suite. This corresponds to a single - spec, and all its examples. - */ -internal class QuickSelectedTestSuiteBuilder: QuickTestSuiteBuilder { - - /** - The test spec class to run. - */ - let testCaseClass: AnyClass! - - /** - For Objective-C classes, returns the class name. For Swift classes without, - an explicit Objective-C name, returns a module-namespaced class name - (e.g., "FooTests.FooSpec"). - */ - var testSuiteClassName: String { - return NSStringFromClass(testCaseClass) - } - - /** - Given a test case name: - - FooSpec/testFoo - - Optionally constructs a test suite builder for the named test case class - in the running test bundle. - - If no test bundle can be found, or the test case class can't be found, - initialization fails and returns `nil`. - */ - init?(forTestCaseWithName name: String) { - guard let testCaseClass = testCaseClassForTestCaseWithName(name) else { - self.testCaseClass = nil - return nil - } - - self.testCaseClass = testCaseClass - } - - /** - Returns a `QuickTestSuite` that runs the associated test case class. - */ - func buildTestSuite() -> QuickTestSuite { - return QuickTestSuite(forTestCaseClass: testCaseClass) - } - -} - -/** - Searches `Bundle.allBundles()` for an xctest bundle, then looks up the named - test case class in that bundle. - - Returns `nil` if a bundle or test case class cannot be found. - */ -private func testCaseClassForTestCaseWithName(_ name: String) -> AnyClass? { - func extractClassName(_ name: String) -> String? { - return name.components(separatedBy: "/").first - } - - guard let className = extractClassName(name) else { return nil } - guard let bundle = Bundle.currentTestBundle else { return nil } - - if let testCaseClass = bundle.classNamed(className) { return testCaseClass } - - let moduleName = bundle.moduleName - - return NSClassFromString("\(moduleName).\(className)") -} - -#endif diff --git a/Example/Pods/Quick/Sources/Quick/QuickTestObservation.swift b/Example/Pods/Quick/Sources/Quick/QuickTestObservation.swift deleted file mode 100644 index e508566f..00000000 --- a/Example/Pods/Quick/Sources/Quick/QuickTestObservation.swift +++ /dev/null @@ -1,69 +0,0 @@ -#if !SWIFT_PACKAGE - -import Foundation -import XCTest - -/// A dummy protocol for calling the internal `+[QuickSpec buildExamplesIfNeeded]` method -/// which is defined in Objective-C from Swift. -@objc internal protocol _QuickSpecInternal { - static func buildExamplesIfNeeded() -} - -@objc internal final class QuickTestObservation: NSObject, XCTestObservation { - @objc(sharedInstance) - static let shared = QuickTestObservation() - - // Quick hooks into this event to compile example groups for each QuickSpec subclasses. - // - // If an exception occurs when compiling examples, report it to the user. Chances are they - // included an expectation outside of a "it", "describe", or "context" block. - func testBundleWillStart(_ testBundle: Bundle) { - QuickSpec.enumerateSubclasses { specClass in - // This relies on `_QuickSpecInternal`. - (specClass as AnyClass).buildExamplesIfNeeded() - } - } -} - -// swiftlint:disable:next todo -// TODO: Unify this with QuickConfiguration's equivalent -extension QuickSpec { - internal static func enumerateSubclasses( - subclasses: [QuickSpec.Type]? = nil, - _ block: (QuickSpec.Type) -> Void - ) { - let subjects: [QuickSpec.Type] - if let subclasses = subclasses { - subjects = subclasses - } else { - let classesCount = objc_getClassList(nil, 0) - - guard classesCount > 0 else { - return - } - - let classes = UnsafeMutablePointer.allocate(capacity: Int(classesCount)) - defer { free(classes) } - - objc_getClassList(AutoreleasingUnsafeMutablePointer(classes), classesCount) - - var specSubclasses: [QuickSpec.Type] = [] - for index in 0.. QuickTestSuite - -} - -/** - A base class for a class cluster of Quick test suites, that should correctly - build dynamic test suites for XCTest to execute. - */ -public class QuickTestSuite: XCTestSuite { - - private static var builtTestSuites: Set = Set() - - /** - Construct a test suite for a specific, selected subset of test cases (rather - than the default, which as all test cases). - - If this method is called multiple times for the same test case class, e.g.. - - FooSpec/testFoo - FooSpec/testBar - - It is expected that the first call should return a valid test suite, and - all subsequent calls should return `nil`. - */ - @objc - public static func selectedTestSuite(forTestCaseWithName name: String) -> QuickTestSuite? { - guard let builder = QuickSelectedTestSuiteBuilder(forTestCaseWithName: name) else { return nil } - - let (inserted, _) = builtTestSuites.insert(builder.testSuiteClassName) - if inserted { - return builder.buildTestSuite() - } else { - return nil - } - } -} - -#endif diff --git a/Example/Pods/Quick/Sources/Quick/String+C99ExtendedIdentifier.swift b/Example/Pods/Quick/Sources/Quick/String+C99ExtendedIdentifier.swift deleted file mode 100644 index db2fc9db..00000000 --- a/Example/Pods/Quick/Sources/Quick/String+C99ExtendedIdentifier.swift +++ /dev/null @@ -1,46 +0,0 @@ -#if canImport(Darwin) -import Foundation - -extension String { - private static var invalidCharacters: CharacterSet = { - var invalidCharacters = CharacterSet() - - let invalidCharacterSets: [CharacterSet] = [ - .whitespacesAndNewlines, - .illegalCharacters, - .controlCharacters, - .punctuationCharacters, - .nonBaseCharacters, - .symbols, - ] - - for invalidSet in invalidCharacterSets { - invalidCharacters.formUnion(invalidSet) - } - - return invalidCharacters - }() - - internal var c99ExtendedIdentifier: String { - let validComponents = components(separatedBy: String.invalidCharacters) - let result = validComponents.joined(separator: "_") - - return result.isEmpty ? "_" : result - } -} - -/// Extension methods or properties for NSObject subclasses are invisible from -/// the Objective-C runtime on static linking unless the consumers add `-ObjC` -/// linker flag, so let's make a wrapper class to mitigate that situation. -/// -/// See: https://github.com/Quick/Quick/issues/785 and https://github.com/Quick/Quick/pull/803 -@objc -class QCKObjCStringUtils: NSObject { - override private init() {} - - @objc - static func c99ExtendedIdentifier(from string: String) -> String { - return string.c99ExtendedIdentifier - } -} -#endif diff --git a/Example/Pods/Quick/Sources/Quick/URL+FileName.swift b/Example/Pods/Quick/Sources/Quick/URL+FileName.swift deleted file mode 100644 index 23c4781e..00000000 --- a/Example/Pods/Quick/Sources/Quick/URL+FileName.swift +++ /dev/null @@ -1,12 +0,0 @@ -import Foundation - -extension URL { - - /** - Returns the path file name without file extension. - */ - var fileName: String { - return self.deletingPathExtension().lastPathComponent - } - -} diff --git a/Example/Pods/Quick/Sources/Quick/World.swift b/Example/Pods/Quick/Sources/Quick/World.swift deleted file mode 100644 index 5b11436c..00000000 --- a/Example/Pods/Quick/Sources/Quick/World.swift +++ /dev/null @@ -1,263 +0,0 @@ -import Foundation - -/** - A closure that, when evaluated, returns a dictionary of key-value - pairs that can be accessed from within a group of shared examples. -*/ -public typealias SharedExampleContext = () -> [String: Any] - -/** - A closure that is used to define a group of shared examples. This - closure may contain any number of example and example groups. -*/ -public typealias SharedExampleClosure = (@escaping SharedExampleContext) -> Void - -#if canImport(Darwin) -// swiftlint:disable type_name -@objcMembers -internal class _WorldBase: NSObject {} -#else -internal class _WorldBase: NSObject {} -// swiftlint:enable type_name -#endif - -/** - A collection of state Quick builds up in order to work its magic. - World is primarily responsible for maintaining a mapping of QuickSpec - classes to root example groups for those classes. - - It also maintains a mapping of shared example names to shared - example closures. - - You may configure how Quick behaves by calling the -[World configure:] - method from within an overridden +[QuickConfiguration configure:] method. -*/ -final internal class World: _WorldBase { - /** - The example group that is currently being run. - The DSL requires that this group is correctly set in order to build a - correct hierarchy of example groups and their examples. - */ - internal var currentExampleGroup: ExampleGroup! - - /** - The example metadata of the test that is currently being run. - This is useful for using the Quick test metadata (like its name) at - runtime. - */ - - internal var currentExampleMetadata: ExampleMetadata? - - internal var numberOfExamplesRun = 0 - - /** - A flag that indicates whether additional test suites are being run - within this test suite. This is only true within the context of Quick - functional tests. - */ -#if canImport(Darwin) - // Convention of generating Objective-C selector has been changed on Swift 3 - @objc(isRunningAdditionalSuites) - internal var isRunningAdditionalSuites = false -#else - internal var isRunningAdditionalSuites = false -#endif - - private var specs: [String: ExampleGroup] = [:] - private var sharedExamples: [String: SharedExampleClosure] = [:] - private let configuration = Configuration() - - internal private(set) var isConfigurationFinalized = false - - internal var exampleHooks: ExampleHooks {return configuration.exampleHooks } - internal var suiteHooks: SuiteHooks { return configuration.suiteHooks } - - // MARK: Singleton Constructor - - private override init() {} - - static private(set) var sharedWorld = World() - - static func anotherWorld(block: (World) -> T) -> T { - let previous = sharedWorld - defer { sharedWorld = previous } - - let newWorld = World() - sharedWorld = newWorld - return block(newWorld) - } - - // MARK: Public Interface - - /** - Exposes the World's Configuration object within the scope of the closure - so that it may be configured. This method must not be called outside of - an overridden +[QuickConfiguration configure:] method. - - - parameter closure: A closure that takes a Configuration object that can - be mutated to change Quick's behavior. - */ - internal func configure(_ closure: QuickConfigurer) { - assert( - !isConfigurationFinalized, - // swiftlint:disable:next line_length - "Quick cannot be configured outside of a +[QuickConfiguration configure:] method. You should not call -[World configure:] directly. Instead, subclass QuickConfiguration and override the +[QuickConfiguration configure:] method." - ) - closure(configuration) - } - - /** - Finalizes the World's configuration. - Any subsequent calls to World.configure() will raise. - */ - internal func finalizeConfiguration() { - isConfigurationFinalized = true - } - - /** - Returns `true` if the root example group for the given spec class has been already initialized. - - - parameter specClass: The QuickSpec class for which is checked for the existing root example group. - - returns: Whether the root example group for the given spec class has been already initialized or not. - */ - internal func isRootExampleGroupInitialized(forSpecClass specClass: QuickSpec.Type) -> Bool { - let name = String(describing: specClass) - return specs.keys.contains(name) - } - - /** - Returns an internally constructed root example group for the given - QuickSpec class. - - A root example group with the description "root example group" is lazily - initialized for each QuickSpec class. This root example group wraps the - top level of a -[QuickSpec spec] method--it's thanks to this group that - users can define beforeEach and it closures at the top level, like so: - - override func spec() { - // These belong to the root example group - beforeEach {} - it("is at the top level") {} - } - - - parameter specClass: The QuickSpec class for which to retrieve the root example group. - - returns: The root example group for the class. - */ - internal func rootExampleGroup(forSpecClass specClass: QuickSpec.Type) -> ExampleGroup { - let name = String(describing: specClass) - - if let group = specs[name] { - return group - } else { - let group = ExampleGroup( - description: "root example group", - flags: [:], - isInternalRootExampleGroup: true - ) - specs[name] = group - return group - } - } - - /** - Returns all examples that should be run for a given spec class. - There are two filtering passes that occur when determining which examples should be run. - That is, these examples are the ones that are included by inclusion filters, and are - not excluded by exclusion filters. - - - parameter specClass: The QuickSpec subclass for which examples are to be returned. - - returns: A list of examples to be run as test invocations. - */ - internal func examples(forSpecClass specClass: QuickSpec.Type) -> [Example] { - // 1. Grab all included examples. - let included = includedExamples - // 2. Grab the intersection of (a) examples for this spec, and (b) included examples. - let spec = rootExampleGroup(forSpecClass: specClass).examples.filter { included.contains($0) } - // 3. Remove all excluded examples. - return spec.filter { example in - !self.configuration.exclusionFilters.contains { $0(example) } - } - } - - // MARK: Internal - - internal func registerSharedExample(_ name: String, closure: @escaping SharedExampleClosure) { - raiseIfSharedExampleAlreadyRegistered(name) - sharedExamples[name] = closure - } - - internal func sharedExample(_ name: String) -> SharedExampleClosure { - raiseIfSharedExampleNotRegistered(name) - return sharedExamples[name]! - } - - internal var includedExampleCount: Int { - return includedExamples.count - } - - internal lazy var cachedIncludedExampleCount: Int = self.includedExampleCount - - internal var beforesCurrentlyExecuting: Bool { - let suiteBeforesExecuting = suiteHooks.phase == .beforesExecuting - let exampleBeforesExecuting = exampleHooks.phase == .beforesExecuting - var groupBeforesExecuting = false - if let runningExampleGroup = currentExampleMetadata?.example.group { - groupBeforesExecuting = runningExampleGroup.phase == .beforesExecuting - } - - return suiteBeforesExecuting || exampleBeforesExecuting || groupBeforesExecuting - } - - internal var aftersCurrentlyExecuting: Bool { - let suiteAftersExecuting = suiteHooks.phase == .aftersExecuting - let exampleAftersExecuting = exampleHooks.phase == .aftersExecuting - var groupAftersExecuting = false - if let runningExampleGroup = currentExampleMetadata?.example.group { - groupAftersExecuting = runningExampleGroup.phase == .aftersExecuting - } - - return suiteAftersExecuting || exampleAftersExecuting || groupAftersExecuting - } - - internal func performWithCurrentExampleGroup(_ group: ExampleGroup, closure: () -> Void) { - let previousExampleGroup = currentExampleGroup - currentExampleGroup = group - - closure() - - currentExampleGroup = previousExampleGroup - } - - private var allExamples: [Example] { - var all: [Example] = [] - for (_, group) in specs { - group.walkDownExamples { all.append($0) } - } - return all - } - - private var includedExamples: [Example] { - let all = allExamples - let included = all.filter { example in - return self.configuration.inclusionFilters.contains { $0(example) } - } - - if included.isEmpty && configuration.runAllWhenEverythingFiltered { - return all - } else { - return included - } - } - - private func raiseIfSharedExampleAlreadyRegistered(_ name: String) { - if sharedExamples[name] != nil { - raiseError("A shared example named '\(name)' has already been registered.") - } - } - - private func raiseIfSharedExampleNotRegistered(_ name: String) { - if sharedExamples[name] == nil { - raiseError("No shared example named '\(name)' has been registered. Registered shared examples: '\(Array(sharedExamples.keys))'") - } - } -} diff --git a/Example/Pods/Quick/Sources/QuickObjCRuntime/QuickSpecBase.m b/Example/Pods/Quick/Sources/QuickObjCRuntime/QuickSpecBase.m deleted file mode 100644 index e452e658..00000000 --- a/Example/Pods/Quick/Sources/QuickObjCRuntime/QuickSpecBase.m +++ /dev/null @@ -1,38 +0,0 @@ -#import "QuickSpecBase.h" - -#pragma mark - _QuickSpecBase - -@implementation _QuickSpecBase - -- (instancetype)init { - self = [super initWithInvocation: nil]; - return self; -} - -/** - Invocations for each test method in the test case. QuickSpec overrides this method to define a - new method for each example defined in +[QuickSpec spec]. - - @return An array of invocations that execute the newly defined example methods. - */ -+ (NSArray *)testInvocations { - NSArray *selectors = [self _qck_testMethodSelectors]; - NSMutableArray *invocations = [NSMutableArray arrayWithCapacity:selectors.count]; - - for (NSString *selectorString in selectors) { - SEL selector = NSSelectorFromString(selectorString); - NSMethodSignature *signature = [self instanceMethodSignatureForSelector:selector]; - NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature]; - invocation.selector = selector; - - [invocations addObject:invocation]; - } - - return invocations; -} - -+ (NSArray *)_qck_testMethodSelectors { - return @[]; -} - -@end diff --git a/Example/Pods/Quick/Sources/QuickObjCRuntime/include/QuickSpecBase.h b/Example/Pods/Quick/Sources/QuickObjCRuntime/include/QuickSpecBase.h deleted file mode 100644 index 2ee00e73..00000000 --- a/Example/Pods/Quick/Sources/QuickObjCRuntime/include/QuickSpecBase.h +++ /dev/null @@ -1,7 +0,0 @@ -#import -#import - -@interface _QuickSpecBase : XCTestCase -+ (NSArray *)_qck_testMethodSelectors; -- (instancetype)init NS_DESIGNATED_INITIALIZER; -@end diff --git a/Example/Pods/Quick/Sources/QuickObjectiveC/Configuration/QuickConfiguration.h b/Example/Pods/Quick/Sources/QuickObjectiveC/Configuration/QuickConfiguration.h deleted file mode 100644 index 56461993..00000000 --- a/Example/Pods/Quick/Sources/QuickObjectiveC/Configuration/QuickConfiguration.h +++ /dev/null @@ -1,30 +0,0 @@ -#import - -@class Configuration; - -/** - Subclass QuickConfiguration and override the +[QuickConfiguration configure:] - method in order to configure how Quick behaves when running specs, or to define - shared examples that are used across spec files. - */ -@interface QuickConfiguration : NSObject - -/** - This method is executed on each subclass of this class before Quick runs - any examples. You may override this method on as many subclasses as you like, but - there is no guarantee as to the order in which these methods are executed. - - You can override this method in order to: - - 1. Configure how Quick behaves, by modifying properties on the Configuration object. - Setting the same properties in several methods has undefined behavior. - - 2. Define shared examples using `sharedExamples`. - - @param configuration A mutable object that is used to configure how Quick behaves on - a framework level. For details on all the options, see the - documentation in Configuration.swift. - */ -+ (void)configure:(Configuration *)configuration; - -@end diff --git a/Example/Pods/Quick/Sources/QuickObjectiveC/Configuration/QuickConfiguration.m b/Example/Pods/Quick/Sources/QuickObjectiveC/Configuration/QuickConfiguration.m deleted file mode 100644 index a51a8bd0..00000000 --- a/Example/Pods/Quick/Sources/QuickObjectiveC/Configuration/QuickConfiguration.m +++ /dev/null @@ -1,47 +0,0 @@ -#import "QuickConfiguration.h" -#import - -#if __has_include("Quick-Swift.h") -#import "Quick-Swift.h" -#else -#import -#endif - -@implementation QuickConfiguration - -#pragma mark - Object Lifecycle - -/** - QuickConfiguration is not meant to be instantiated; it merely provides a hook - for users to configure how Quick behaves. Raise an exception if an instance of - QuickConfiguration is created. - */ -- (instancetype)init { - NSString *className = NSStringFromClass([self class]); - NSString *selectorName = NSStringFromSelector(@selector(configure:)); - [NSException raise:NSInternalInconsistencyException - format:@"%@ is not meant to be instantiated; " - @"subclass %@ and override %@ to configure Quick.", - className, className, selectorName]; - return nil; -} - -#pragma mark - NSObject Overrides - -/** - Hook into when QuickConfiguration is initialized in the runtime in order to - call +[QuickConfiguration configure:] on each of its subclasses. - */ -+ (void)initialize { - // Only enumerate over the subclasses of QuickConfiguration, not any of its subclasses. - if ([self class] == [QuickConfiguration class]) { - World *world = [World sharedWorld]; - [self configureSubclassesIfNeededWithWorld:world]; - } -} - -#pragma mark - Public Interface - -+ (void)configure:(Configuration *)configuration { } - -@end diff --git a/Example/Pods/Quick/Sources/QuickObjectiveC/DSL/QCKDSL.h b/Example/Pods/Quick/Sources/QuickObjectiveC/DSL/QCKDSL.h deleted file mode 100644 index c5f3152a..00000000 --- a/Example/Pods/Quick/Sources/QuickObjectiveC/DSL/QCKDSL.h +++ /dev/null @@ -1,234 +0,0 @@ -#import - -@class ExampleMetadata; - -/** - Provides a hook for Quick to be configured before any examples are run. - Within this scope, override the +[QuickConfiguration configure:] method - to set properties on a configuration object to customize Quick behavior. - For details, see the documentation for Configuraiton.swift. - - @param name The name of the configuration class. Like any Objective-C - class name, this must be unique to the current runtime - environment. - */ -#define QuickConfigurationBegin(name) \ - @interface name : QuickConfiguration; @end \ - @implementation name \ - - -/** - Marks the end of a Quick configuration. - Make sure you put this after `QuickConfigurationBegin`. - */ -#define QuickConfigurationEnd \ - @end \ - - -/** - Defines a new QuickSpec. Define examples and example groups within the space - between this and `QuickSpecEnd`. - - @param name The name of the spec class. Like any Objective-C class name, this - must be unique to the current runtime environment. - */ -#define QuickSpecBegin(name) \ - @interface name : QuickSpec; @end \ - @implementation name \ - - (void)spec { \ - - -/** - Marks the end of a QuickSpec. Make sure you put this after `QuickSpecBegin`. - */ -#define QuickSpecEnd \ - } \ - @end \ - -typedef NSDictionary *(^QCKDSLSharedExampleContext)(void); -typedef void (^QCKDSLSharedExampleBlock)(QCKDSLSharedExampleContext); -typedef void (^QCKDSLEmptyBlock)(void); -typedef void (^QCKDSLExampleMetadataBlock)(ExampleMetadata *exampleMetadata); - -#define QUICK_EXPORT FOUNDATION_EXPORT - -QUICK_EXPORT void qck_beforeSuite(QCKDSLEmptyBlock closure); -QUICK_EXPORT void qck_afterSuite(QCKDSLEmptyBlock closure); -QUICK_EXPORT void qck_sharedExamples(NSString *name, QCKDSLSharedExampleBlock closure); -QUICK_EXPORT void qck_describe(NSString *description, QCKDSLEmptyBlock closure); -QUICK_EXPORT void qck_context(NSString *description, QCKDSLEmptyBlock closure); -QUICK_EXPORT void qck_beforeEach(QCKDSLEmptyBlock closure); -QUICK_EXPORT void qck_beforeEachWithMetadata(QCKDSLExampleMetadataBlock closure); -QUICK_EXPORT void qck_afterEach(QCKDSLEmptyBlock closure); -QUICK_EXPORT void qck_afterEachWithMetadata(QCKDSLExampleMetadataBlock closure); -QUICK_EXPORT void qck_pending(NSString *description, QCKDSLEmptyBlock closure); -QUICK_EXPORT void qck_xdescribe(NSString *description, QCKDSLEmptyBlock closure); -QUICK_EXPORT void qck_xcontext(NSString *description, QCKDSLEmptyBlock closure); -QUICK_EXPORT void qck_fdescribe(NSString *description, QCKDSLEmptyBlock closure); -QUICK_EXPORT void qck_fcontext(NSString *description, QCKDSLEmptyBlock closure); - -#ifndef QUICK_DISABLE_SHORT_SYNTAX -/** - Defines a closure to be run prior to any examples in the test suite. - You may define an unlimited number of these closures, but there is no - guarantee as to the order in which they're run. - - If the test suite crashes before the first example is run, this closure - will not be executed. - - @param closure The closure to be run prior to any examples in the test suite. - */ -static inline void beforeSuite(QCKDSLEmptyBlock closure) { - qck_beforeSuite(closure); -} - - -/** - Defines a closure to be run after all of the examples in the test suite. - You may define an unlimited number of these closures, but there is no - guarantee as to the order in which they're run. - - If the test suite crashes before all examples are run, this closure - will not be executed. - - @param closure The closure to be run after all of the examples in the test suite. - */ -static inline void afterSuite(QCKDSLEmptyBlock closure) { - qck_afterSuite(closure); -} - -/** - Defines a group of shared examples. These examples can be re-used in several locations - by using the `itBehavesLike` function. - - @param name The name of the shared example group. This must be unique across all shared example - groups defined in a test suite. - @param closure A closure containing the examples. This behaves just like an example group defined - using `describe` or `context`--the closure may contain any number of `beforeEach` - and `afterEach` closures, as well as any number of examples (defined using `it`). - */ -static inline void sharedExamples(NSString *name, QCKDSLSharedExampleBlock closure) { - qck_sharedExamples(name, closure); -} - -/** - Defines an example group. Example groups are logical groupings of examples. - Example groups can share setup and teardown code. - - @param description An arbitrary string describing the example group. - @param closure A closure that can contain other examples. - */ -static inline void describe(NSString *description, QCKDSLEmptyBlock closure) { - qck_describe(description, closure); -} - -/** - Defines an example group. Equivalent to `describe`. - */ -static inline void context(NSString *description, QCKDSLEmptyBlock closure) { - qck_context(description, closure); -} - -/** - Defines a closure to be run prior to each example in the current example - group. This closure is not run for pending or otherwise disabled examples. - An example group may contain an unlimited number of beforeEach. They'll be - run in the order they're defined, but you shouldn't rely on that behavior. - - @param closure The closure to be run prior to each example. - */ -static inline void beforeEach(QCKDSLEmptyBlock closure) { - qck_beforeEach(closure); -} - -/** - Identical to QCKDSL.beforeEach, except the closure is provided with - metadata on the example that the closure is being run prior to. - */ -static inline void beforeEachWithMetadata(QCKDSLExampleMetadataBlock closure) { - qck_beforeEachWithMetadata(closure); -} - -/** - Defines a closure to be run after each example in the current example - group. This closure is not run for pending or otherwise disabled examples. - An example group may contain an unlimited number of afterEach. They'll be - run in the order they're defined, but you shouldn't rely on that behavior. - - @param closure The closure to be run after each example. - */ -static inline void afterEach(QCKDSLEmptyBlock closure) { - qck_afterEach(closure); -} - -/** - Identical to QCKDSL.afterEach, except the closure is provided with - metadata on the example that the closure is being run after. - */ -static inline void afterEachWithMetadata(QCKDSLExampleMetadataBlock closure) { - qck_afterEachWithMetadata(closure); -} - -/** - Defines an example or example group that should not be executed. Use `pending` to temporarily disable - examples or groups that should not be run yet. - - @param description An arbitrary string describing the example or example group. - @param closure A closure that will not be evaluated. - */ -static inline void pending(NSString *description, QCKDSLEmptyBlock closure) { - qck_pending(description, closure); -} - -/** - Use this to quickly mark a `describe` block as pending. - This disables all examples within the block. - */ -static inline void xdescribe(NSString *description, QCKDSLEmptyBlock closure) { - qck_xdescribe(description, closure); -} - -/** - Use this to quickly mark a `context` block as pending. - This disables all examples within the block. - */ -static inline void xcontext(NSString *description, QCKDSLEmptyBlock closure) { - qck_xcontext(description, closure); -} - -/** - Use this to quickly focus a `describe` block, focusing the examples in the block. - If any examples in the test suite are focused, only those examples are executed. - This trumps any explicitly focused or unfocused examples within the block--they are all treated as focused. - */ -static inline void fdescribe(NSString *description, QCKDSLEmptyBlock closure) { - qck_fdescribe(description, closure); -} - -/** - Use this to quickly focus a `context` block. Equivalent to `fdescribe`. - */ -static inline void fcontext(NSString *description, QCKDSLEmptyBlock closure) { - qck_fcontext(description, closure); -} - -#define it qck_it -#define xit qck_xit -#define fit qck_fit -#define itBehavesLike qck_itBehavesLike -#define xitBehavesLike qck_xitBehavesLike -#define fitBehavesLike qck_fitBehavesLike -#endif - -#define qck_it qck_it_builder(@{}, @(__FILE__), __LINE__) -#define qck_xit qck_it_builder(@{Filter.pending: @YES}, @(__FILE__), __LINE__) -#define qck_fit qck_it_builder(@{Filter.focused: @YES}, @(__FILE__), __LINE__) -#define qck_itBehavesLike qck_itBehavesLike_builder(@{}, @(__FILE__), __LINE__) -#define qck_xitBehavesLike qck_itBehavesLike_builder(@{Filter.pending: @YES}, @(__FILE__), __LINE__) -#define qck_fitBehavesLike qck_itBehavesLike_builder(@{Filter.focused: @YES}, @(__FILE__), __LINE__) - -typedef void (^QCKItBlock)(NSString *description, QCKDSLEmptyBlock closure); -typedef void (^QCKItBehavesLikeBlock)(NSString *description, QCKDSLSharedExampleContext context); - -QUICK_EXPORT QCKItBlock qck_it_builder(NSDictionary *flags, NSString *file, NSUInteger line); -QUICK_EXPORT QCKItBehavesLikeBlock qck_itBehavesLike_builder(NSDictionary *flags, NSString *file, NSUInteger line); diff --git a/Example/Pods/Quick/Sources/QuickObjectiveC/DSL/QCKDSL.m b/Example/Pods/Quick/Sources/QuickObjectiveC/DSL/QCKDSL.m deleted file mode 100644 index 624832e9..00000000 --- a/Example/Pods/Quick/Sources/QuickObjectiveC/DSL/QCKDSL.m +++ /dev/null @@ -1,83 +0,0 @@ -#import "QCKDSL.h" - -#if __has_include("Quick-Swift.h") -#import "Quick-Swift.h" -#else -#import -#endif - -void qck_beforeSuite(QCKDSLEmptyBlock closure) { - [[World sharedWorld] beforeSuite:closure]; -} - -void qck_afterSuite(QCKDSLEmptyBlock closure) { - [[World sharedWorld] afterSuite:closure]; -} - -void qck_sharedExamples(NSString *name, QCKDSLSharedExampleBlock closure) { - [[World sharedWorld] sharedExamples:name closure:closure]; -} - -void qck_describe(NSString *description, QCKDSLEmptyBlock closure) { - [[World sharedWorld] describe:description flags:@{} closure:closure]; -} - -void qck_context(NSString *description, QCKDSLEmptyBlock closure) { - qck_describe(description, closure); -} - -void qck_beforeEach(QCKDSLEmptyBlock closure) { - [[World sharedWorld] beforeEach:closure]; -} - -void qck_beforeEachWithMetadata(QCKDSLExampleMetadataBlock closure) { - [[World sharedWorld] beforeEachWithMetadata:closure]; -} - -void qck_afterEach(QCKDSLEmptyBlock closure) { - [[World sharedWorld] afterEach:closure]; -} - -void qck_afterEachWithMetadata(QCKDSLExampleMetadataBlock closure) { - [[World sharedWorld] afterEachWithMetadata:closure]; -} - -QCKItBlock qck_it_builder(NSDictionary *flags, NSString *file, NSUInteger line) { - return ^(NSString *description, QCKDSLEmptyBlock closure) { - [[World sharedWorld] itWithDescription:description - flags:flags - file:file - line:line - closure:closure]; - }; -} - -QCKItBehavesLikeBlock qck_itBehavesLike_builder(NSDictionary *flags, NSString *file, NSUInteger line) { - return ^(NSString *name, QCKDSLSharedExampleContext context) { - [[World sharedWorld] itBehavesLikeSharedExampleNamed:name - sharedExampleContext:context - flags:flags - file:file - line:line]; - }; -} - -void qck_pending(NSString *description, QCKDSLEmptyBlock closure) { - [[World sharedWorld] pending:description closure:closure]; -} - -void qck_xdescribe(NSString *description, QCKDSLEmptyBlock closure) { - [[World sharedWorld] xdescribe:description flags:@{} closure:closure]; -} - -void qck_xcontext(NSString *description, QCKDSLEmptyBlock closure) { - qck_xdescribe(description, closure); -} - -void qck_fdescribe(NSString *description, QCKDSLEmptyBlock closure) { - [[World sharedWorld] fdescribe:description flags:@{} closure:closure]; -} - -void qck_fcontext(NSString *description, QCKDSLEmptyBlock closure) { - qck_fdescribe(description, closure); -} diff --git a/Example/Pods/Quick/Sources/QuickObjectiveC/Quick.h b/Example/Pods/Quick/Sources/QuickObjectiveC/Quick.h deleted file mode 100644 index 87dad100..00000000 --- a/Example/Pods/Quick/Sources/QuickObjectiveC/Quick.h +++ /dev/null @@ -1,11 +0,0 @@ -#import - -//! Project version number for Quick. -FOUNDATION_EXPORT double QuickVersionNumber; - -//! Project version string for Quick. -FOUNDATION_EXPORT const unsigned char QuickVersionString[]; - -#import "QuickSpec.h" -#import "QCKDSL.h" -#import "QuickConfiguration.h" diff --git a/Example/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.h b/Example/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.h deleted file mode 100644 index ccf006e9..00000000 --- a/Example/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.h +++ /dev/null @@ -1,56 +0,0 @@ -#import - -/** - QuickSpec is a base class all specs written in Quick inherit from. - They need to inherit from QuickSpec, a subclass of XCTestCase, in - order to be discovered by the XCTest framework. - - XCTest automatically compiles a list of XCTestCase subclasses included - in the test target. It iterates over each class in that list, and creates - a new instance of that class for each test method. It then creates an - "invocation" to execute that test method. The invocation is an instance of - NSInvocation, which represents a single message send in Objective-C. - The invocation is set on the XCTestCase instance, and the test is run. - - Most of the code in QuickSpec is dedicated to hooking into XCTest events. - First, when the spec is first loaded and before it is sent any messages, - the +[NSObject initialize] method is called. QuickSpec overrides this method - to call +[QuickSpec spec]. This builds the example group stacks and - registers them with Quick.World, a global register of examples. - - Then, XCTest queries QuickSpec for a list of test methods. Normally, XCTest - automatically finds all methods whose selectors begin with the string "test". - However, QuickSpec overrides this default behavior by implementing the - +[XCTestCase testInvocations] method. This method iterates over each example - registered in Quick.World, defines a new method for that example, and - returns an invocation to call that method to XCTest. Those invocations are - the tests that are run by XCTest. Their selector names are displayed in - the Xcode test navigation bar. - */ -@interface QuickSpec : XCTestCase - -/** - Override this method in your spec to define a set of example groups - and examples. - - @code - override func spec() { - describe("winter") { - it("is coming") { - // ... - } - } - } - @endcode - - See DSL.swift for more information on what syntax is available. - */ -- (void)spec; - -/** - Returns the currently executing spec. Use in specs that require XCTestCase - methods, e.g. expectationWithDescription. -*/ -@property (class, nonatomic, readonly) QuickSpec *current; - -@end diff --git a/Example/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.m b/Example/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.m deleted file mode 100644 index ed94b66d..00000000 --- a/Example/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.m +++ /dev/null @@ -1,159 +0,0 @@ -#import "QuickSpec.h" -#import "QuickConfiguration.h" - -#if __has_include("Quick-Swift.h") -#import "Quick-Swift.h" -#else -#import -#endif - -static QuickSpec *currentSpec = nil; - -@interface QuickSpec () -@property (nonatomic, strong) Example *example; -@end - -@implementation QuickSpec - -#pragma mark - XCTestCase Overrides - -/** - Invocations for each test method in the test case. QuickSpec overrides this method to define a - new method for each example defined in +[QuickSpec spec]. - - @return An array of invocations that execute the newly defined example methods. - */ -+ (NSArray *)testInvocations { - NSArray *examples = [[World sharedWorld] examplesForSpecClass:[self class]]; - NSMutableArray *invocations = [NSMutableArray arrayWithCapacity:[examples count]]; - - NSMutableSet *selectorNames = [NSMutableSet set]; - - for (Example *example in examples) { - SEL selector = [self addInstanceMethodForExample:example classSelectorNames:selectorNames]; - - NSMethodSignature *signature = [self instanceMethodSignatureForSelector:selector]; - NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature]; - invocation.selector = selector; - - [invocations addObject:invocation]; - } - - return invocations; -} - -#pragma mark - Public Interface - -- (void)spec { } - -+ (QuickSpec*) current { - return currentSpec; -} - -#pragma mark - Internal Methods - -/** - Runs the `spec` method and builds the examples for this class. - - It's safe to call this method multiple times. If the examples for the class have been built, invocation - of this method has no effect. - */ -+ (void)buildExamplesIfNeeded { - [QuickConfiguration class]; - World *world = [World sharedWorld]; - - if ([world isRootExampleGroupInitializedForSpecClass:[self class]]) { - // The examples fot this subclass have been already built. Skipping. - return; - } - - ExampleGroup *rootExampleGroup = [world rootExampleGroupForSpecClass:[self class]]; - [world performWithCurrentExampleGroup:rootExampleGroup closure:^{ - QuickSpec *spec = [self new]; - - @try { - [spec spec]; - } - @catch (NSException *exception) { - [NSException raise:NSInternalInconsistencyException - format:@"An exception occurred when building Quick's example groups.\n" - @"Some possible reasons this might happen include:\n\n" - @"- An 'expect(...).to' expectation was evaluated outside of " - @"an 'it', 'context', or 'describe' block\n" - @"- 'sharedExamples' was called twice with the same name\n" - @"- 'itBehavesLike' was called with a name that is not registered as a shared example\n\n" - @"Here's the original exception: '%@', reason: '%@', userInfo: '%@'", - exception.name, exception.reason, exception.userInfo]; - } - }]; -} - -/** - QuickSpec uses this method to dynamically define a new instance method for the - given example. The instance method runs the example, catching any exceptions. - The exceptions are then reported as test failures. - - In order to report the correct file and line number, examples must raise exceptions - containing following keys in their userInfo: - - - "SenTestFilenameKey": A String representing the file name - - "SenTestLineNumberKey": An Int representing the line number - - These keys used to be used by SenTestingKit, and are still used by some testing tools - in the wild. See: https://github.com/Quick/Quick/pull/41 - - @return The selector of the newly defined instance method. - */ -+ (SEL)addInstanceMethodForExample:(Example *)example classSelectorNames:(NSMutableSet *)selectorNames { - IMP implementation = imp_implementationWithBlock(^(QuickSpec *self){ - self.example = example; - currentSpec = self; - [example run]; - }); - - const char *types = [[NSString stringWithFormat:@"%s%s%s", @encode(void), @encode(id), @encode(SEL)] UTF8String]; - - NSString *originalName = [QCKObjCStringUtils c99ExtendedIdentifierFrom:example.name]; - NSString *selectorName = originalName; - NSUInteger i = 2; - - while ([selectorNames containsObject:selectorName]) { - selectorName = [NSString stringWithFormat:@"%@_%tu", originalName, i++]; - } - - [selectorNames addObject:selectorName]; - - SEL selector = NSSelectorFromString(selectorName); - class_addMethod(self, selector, implementation, types); - - return selector; -} - -/** - This method is used to record failures, whether they represent example - expectations that were not met, or exceptions raised during test setup - and teardown. By default, the failure will be reported as an - XCTest failure, and the example will be highlighted in Xcode. - */ -- (void)recordFailureWithDescription:(NSString *)description - inFile:(NSString *)filePath - atLine:(NSUInteger)lineNumber - expected:(BOOL)expected { - if (self.example.isSharedExample) { - filePath = self.example.callsite.file; - lineNumber = self.example.callsite.line; - } - [currentSpec.testRun recordFailureWithDescription:description - inFile:filePath - atLine:lineNumber - expected:expected]; -} - -@end - -#pragma mark - Test Observation - -__attribute__((constructor)) -static void registerQuickTestObservation(void) { - [[XCTestObservationCenter sharedTestObservationCenter] addTestObserver:[QuickTestObservation sharedInstance]]; -} diff --git a/Example/Pods/Quick/Sources/QuickObjectiveC/XCTestSuite+QuickTestSuiteBuilder.m b/Example/Pods/Quick/Sources/QuickObjectiveC/XCTestSuite+QuickTestSuiteBuilder.m deleted file mode 100644 index ae63036d..00000000 --- a/Example/Pods/Quick/Sources/QuickObjectiveC/XCTestSuite+QuickTestSuiteBuilder.m +++ /dev/null @@ -1,45 +0,0 @@ -#import -#import - -#if __has_include("Quick-Swift.h") -#import "Quick-Swift.h" -#else -#import -#endif - -@interface XCTestSuite (QuickTestSuiteBuilder) -@end - -@implementation XCTestSuite (QuickTestSuiteBuilder) - -/** - In order to ensure we can correctly build dynamic test suites, we need to - replace some of the default test suite constructors. - */ -+ (void)load { - Method testCaseWithName = class_getClassMethod(self, @selector(testSuiteForTestCaseWithName:)); - Method hooked_testCaseWithName = class_getClassMethod(self, @selector(qck_hooked_testSuiteForTestCaseWithName:)); - method_exchangeImplementations(testCaseWithName, hooked_testCaseWithName); -} - -/** - The `+testSuiteForTestCaseWithName:` method is called when a specific test case - class is run from the Xcode test navigator. If the built test suite is `nil`, - Xcode will not run any tests for that test case. - - Given if the following test case class is run from the Xcode test navigator: - - FooSpec - testFoo - testBar - - XCTest will invoke this once per test case, with test case names following this format: - - FooSpec/testFoo - FooSpec/testBar - */ -+ (nullable instancetype)qck_hooked_testSuiteForTestCaseWithName:(nonnull NSString *)name { - return [QuickTestSuite selectedTestSuiteForTestCaseWithName:name]; -} - -@end diff --git a/Example/Pods/Target Support Files/Nimble/Nimble-Info.plist b/Example/Pods/Target Support Files/Nimble/Nimble-Info.plist deleted file mode 100644 index 68e73973..00000000 --- a/Example/Pods/Target Support Files/Nimble/Nimble-Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 8.0.9 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Example/Pods/Target Support Files/Nimble/Nimble-dummy.m b/Example/Pods/Target Support Files/Nimble/Nimble-dummy.m deleted file mode 100644 index e8177ab4..00000000 --- a/Example/Pods/Target Support Files/Nimble/Nimble-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Nimble : NSObject -@end -@implementation PodsDummy_Nimble -@end diff --git a/Example/Pods/Target Support Files/Nimble/Nimble-prefix.pch b/Example/Pods/Target Support Files/Nimble/Nimble-prefix.pch deleted file mode 100644 index beb2a244..00000000 --- a/Example/Pods/Target Support Files/Nimble/Nimble-prefix.pch +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - diff --git a/Example/Pods/Target Support Files/Nimble/Nimble-umbrella.h b/Example/Pods/Target Support Files/Nimble/Nimble-umbrella.h deleted file mode 100644 index 3a2c2c8f..00000000 --- a/Example/Pods/Target Support Files/Nimble/Nimble-umbrella.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - -#import "Nimble.h" -#import "DSL.h" -#import "NMBExceptionCapture.h" -#import "NMBStringify.h" -#import "CwlCatchException.h" -#import "CwlMachBadInstructionHandler.h" -#import "mach_excServer.h" -#import "CwlPreconditionTesting.h" - -FOUNDATION_EXPORT double NimbleVersionNumber; -FOUNDATION_EXPORT const unsigned char NimbleVersionString[]; - diff --git a/Example/Pods/Target Support Files/Nimble/Nimble.debug.xcconfig b/Example/Pods/Target Support Files/Nimble/Nimble.debug.xcconfig deleted file mode 100644 index 4325fa64..00000000 --- a/Example/Pods/Target Support Files/Nimble/Nimble.debug.xcconfig +++ /dev/null @@ -1,18 +0,0 @@ -APPLICATION_EXTENSION_API_ONLY = YES -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Nimble -DEFINES_MODULE = YES -ENABLE_BITCODE = NO -FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LIBRARY_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/usr/lib" -OTHER_LDFLAGS = $(inherited) -Xlinker -no_application_extension -weak-lswiftXCTest -weak_framework "XCTest" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS $(inherited) -suppress-warnings -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/Nimble -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -SWIFT_INCLUDE_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/usr/lib" -SYSTEM_FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Example/Pods/Target Support Files/Nimble/Nimble.modulemap b/Example/Pods/Target Support Files/Nimble/Nimble.modulemap deleted file mode 100644 index 6f77009e..00000000 --- a/Example/Pods/Target Support Files/Nimble/Nimble.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Nimble { - umbrella header "Nimble-umbrella.h" - - export * - module * { export * } -} diff --git a/Example/Pods/Target Support Files/Nimble/Nimble.release.xcconfig b/Example/Pods/Target Support Files/Nimble/Nimble.release.xcconfig deleted file mode 100644 index 4325fa64..00000000 --- a/Example/Pods/Target Support Files/Nimble/Nimble.release.xcconfig +++ /dev/null @@ -1,18 +0,0 @@ -APPLICATION_EXTENSION_API_ONLY = YES -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Nimble -DEFINES_MODULE = YES -ENABLE_BITCODE = NO -FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LIBRARY_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/usr/lib" -OTHER_LDFLAGS = $(inherited) -Xlinker -no_application_extension -weak-lswiftXCTest -weak_framework "XCTest" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS $(inherited) -suppress-warnings -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/Nimble -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -SWIFT_INCLUDE_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/usr/lib" -SYSTEM_FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Example/Pods/Target Support Files/Pods-ShuffleExample/Pods-ShuffleExample-Info.plist b/Example/Pods/Target Support Files/Pods-ShuffleExample/Pods-ShuffleExample-Info.plist deleted file mode 100644 index 2243fe6e..00000000 --- a/Example/Pods/Target Support Files/Pods-ShuffleExample/Pods-ShuffleExample-Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Example/Pods/Target Support Files/Pods-ShuffleExample/Pods-ShuffleExample-acknowledgements.markdown b/Example/Pods/Target Support Files/Pods-ShuffleExample/Pods-ShuffleExample-acknowledgements.markdown deleted file mode 100644 index 2129f313..00000000 --- a/Example/Pods/Target Support Files/Pods-ShuffleExample/Pods-ShuffleExample-acknowledgements.markdown +++ /dev/null @@ -1,87 +0,0 @@ -# Acknowledgements -This application makes use of the following third party libraries: - -## PopBounceButton - -MIT License - -Copyright (c) 2018 Mac Gallagher - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -## Shuffle-iOS - -MIT License - -Copyright (c) 2019 Mac Gallagher - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -## pop - -BSD License - -For Pop software - -Copyright (c) 2014, Facebook, Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither the name Facebook nor the names of its contributors may be used to - endorse or promote products derived from this software without specific - prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Generated by CocoaPods - https://cocoapods.org diff --git a/Example/Pods/Target Support Files/Pods-ShuffleExample/Pods-ShuffleExample-acknowledgements.plist b/Example/Pods/Target Support Files/Pods-ShuffleExample/Pods-ShuffleExample-acknowledgements.plist deleted file mode 100644 index 147507da..00000000 --- a/Example/Pods/Target Support Files/Pods-ShuffleExample/Pods-ShuffleExample-acknowledgements.plist +++ /dev/null @@ -1,131 +0,0 @@ - - - - - PreferenceSpecifiers - - - FooterText - This application makes use of the following third party libraries: - Title - Acknowledgements - Type - PSGroupSpecifier - - - FooterText - MIT License - -Copyright (c) 2018 Mac Gallagher - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - License - MIT - Title - PopBounceButton - Type - PSGroupSpecifier - - - FooterText - MIT License - -Copyright (c) 2019 Mac Gallagher - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - License - MIT - Title - Shuffle-iOS - Type - PSGroupSpecifier - - - FooterText - BSD License - -For Pop software - -Copyright (c) 2014, Facebook, Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither the name Facebook nor the names of its contributors may be used to - endorse or promote products derived from this software without specific - prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - License - BSD - Title - pop - Type - PSGroupSpecifier - - - FooterText - Generated by CocoaPods - https://cocoapods.org - Title - - Type - PSGroupSpecifier - - - StringsTable - Acknowledgements - Title - Acknowledgements - - diff --git a/Example/Pods/Target Support Files/Pods-ShuffleExample/Pods-ShuffleExample-dummy.m b/Example/Pods/Target Support Files/Pods-ShuffleExample/Pods-ShuffleExample-dummy.m deleted file mode 100644 index d1511e25..00000000 --- a/Example/Pods/Target Support Files/Pods-ShuffleExample/Pods-ShuffleExample-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Pods_ShuffleExample : NSObject -@end -@implementation PodsDummy_Pods_ShuffleExample -@end diff --git a/Example/Pods/Target Support Files/Pods-ShuffleExample/Pods-ShuffleExample-frameworks.sh b/Example/Pods/Target Support Files/Pods-ShuffleExample/Pods-ShuffleExample-frameworks.sh deleted file mode 100755 index ff6d8c9e..00000000 --- a/Example/Pods/Target Support Files/Pods-ShuffleExample/Pods-ShuffleExample-frameworks.sh +++ /dev/null @@ -1,211 +0,0 @@ -#!/bin/sh -set -e -set -u -set -o pipefail - -function on_error { - echo "$(realpath -mq "${0}"):$1: error: Unexpected failure" -} -trap 'on_error $LINENO' ERR - -if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then - # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy - # frameworks to, so exit 0 (signalling the script phase was successful). - exit 0 -fi - -echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" -mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - -COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" -SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" - -# Used as a return value for each invocation of `strip_invalid_archs` function. -STRIP_BINARY_RETVAL=0 - -# This protects against multiple targets copying the same framework dependency at the same time. The solution -# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html -RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") - -# Copies and strips a vendored framework -install_framework() -{ - if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then - local source="${BUILT_PRODUCTS_DIR}/$1" - elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then - local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" - elif [ -r "$1" ]; then - local source="$1" - fi - - local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - - if [ -L "${source}" ]; then - echo "Symlinked..." - source="$(readlink "${source}")" - fi - - # Use filter instead of exclude so missing patterns don't throw errors. - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" - - local basename - basename="$(basename -s .framework "$1")" - binary="${destination}/${basename}.framework/${basename}" - - if ! [ -r "$binary" ]; then - binary="${destination}/${basename}" - elif [ -L "${binary}" ]; then - echo "Destination binary is symlinked..." - dirname="$(dirname "${binary}")" - binary="${dirname}/$(readlink "${binary}")" - fi - - # Strip invalid architectures so "fat" simulator / device frameworks work on device - if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then - strip_invalid_archs "$binary" - fi - - # Resign the code if required by the build settings to avoid unstable apps - code_sign_if_enabled "${destination}/$(basename "$1")" - - # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. - if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then - local swift_runtime_libs - swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u) - for lib in $swift_runtime_libs; do - echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" - rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" - code_sign_if_enabled "${destination}/${lib}" - done - fi -} - -# Copies and strips a vendored dSYM -install_dsym() { - local source="$1" - warn_missing_arch=${2:-true} - if [ -r "$source" ]; then - # Copy the dSYM into the targets temp dir. - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" - - local basename - basename="$(basename -s .dSYM "$source")" - binary_name="$(ls "$source/Contents/Resources/DWARF")" - binary="${DERIVED_FILES_DIR}/${basename}.dSYM/Contents/Resources/DWARF/${binary_name}" - - # Strip invalid architectures so "fat" simulator / device frameworks work on device - if [[ "$(file "$binary")" == *"Mach-O "*"dSYM companion"* ]]; then - strip_invalid_archs "$binary" "$warn_missing_arch" - fi - - if [[ $STRIP_BINARY_RETVAL == 1 ]]; then - # Move the stripped file into its final destination. - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.dSYM" "${DWARF_DSYM_FOLDER_PATH}" - else - # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. - touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.dSYM" - fi - fi -} - -# Copies the bcsymbolmap files of a vendored framework -install_bcsymbolmap() { - local bcsymbolmap_path="$1" - local destination="${BUILT_PRODUCTS_DIR}" - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}" -} - -# Signs a framework with the provided identity -code_sign_if_enabled() { - if [ -n "${EXPANDED_CODE_SIGN_IDENTITY:-}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then - # Use the current code_sign_identity - echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" - local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" - - if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then - code_sign_cmd="$code_sign_cmd &" - fi - echo "$code_sign_cmd" - eval "$code_sign_cmd" - fi -} - -# Strip invalid architectures -strip_invalid_archs() { - binary="$1" - warn_missing_arch=${2:-true} - # Get architectures for current target binary - binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" - # Intersect them with the architectures we are building for - intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" - # If there are no archs supported by this binary then warn the user - if [[ -z "$intersected_archs" ]]; then - if [[ "$warn_missing_arch" == "true" ]]; then - echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." - fi - STRIP_BINARY_RETVAL=0 - return - fi - stripped="" - for arch in $binary_archs; do - if ! [[ "${ARCHS}" == *"$arch"* ]]; then - # Strip non-valid architectures in-place - lipo -remove "$arch" -output "$binary" "$binary" - stripped="$stripped $arch" - fi - done - if [[ "$stripped" ]]; then - echo "Stripped $binary of architectures:$stripped" - fi - STRIP_BINARY_RETVAL=1 -} - -install_artifact() { - artifact="$1" - base="$(basename "$artifact")" - case $base in - *.framework) - install_framework "$artifact" - ;; - *.dSYM) - # Suppress arch warnings since XCFrameworks will include many dSYM files - install_dsym "$artifact" "false" - ;; - *.bcsymbolmap) - install_bcsymbolmap "$artifact" - ;; - *) - echo "error: Unrecognized artifact "$artifact"" - ;; - esac -} - -copy_artifacts() { - file_list="$1" - while read artifact; do - install_artifact "$artifact" - done <$file_list -} - -ARTIFACT_LIST_FILE="${BUILT_PRODUCTS_DIR}/cocoapods-artifacts-${CONFIGURATION}.txt" -if [ -r "${ARTIFACT_LIST_FILE}" ]; then - copy_artifacts "${ARTIFACT_LIST_FILE}" -fi - -if [[ "$CONFIGURATION" == "Debug" ]]; then - install_framework "${BUILT_PRODUCTS_DIR}/PopBounceButton/PopBounceButton.framework" - install_framework "${BUILT_PRODUCTS_DIR}/Shuffle-iOS/Shuffle_iOS.framework" - install_framework "${BUILT_PRODUCTS_DIR}/pop/pop.framework" -fi -if [[ "$CONFIGURATION" == "Release" ]]; then - install_framework "${BUILT_PRODUCTS_DIR}/PopBounceButton/PopBounceButton.framework" - install_framework "${BUILT_PRODUCTS_DIR}/Shuffle-iOS/Shuffle_iOS.framework" - install_framework "${BUILT_PRODUCTS_DIR}/pop/pop.framework" -fi -if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then - wait -fi diff --git a/Example/Pods/Target Support Files/Pods-ShuffleExample/Pods-ShuffleExample-umbrella.h b/Example/Pods/Target Support Files/Pods-ShuffleExample/Pods-ShuffleExample-umbrella.h deleted file mode 100644 index b720feca..00000000 --- a/Example/Pods/Target Support Files/Pods-ShuffleExample/Pods-ShuffleExample-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double Pods_ShuffleExampleVersionNumber; -FOUNDATION_EXPORT const unsigned char Pods_ShuffleExampleVersionString[]; - diff --git a/Example/Pods/Target Support Files/Pods-ShuffleExample/Pods-ShuffleExample.debug.xcconfig b/Example/Pods/Target Support Files/Pods-ShuffleExample/Pods-ShuffleExample.debug.xcconfig deleted file mode 100644 index f8f9c0b2..00000000 --- a/Example/Pods/Target Support Files/Pods-ShuffleExample/Pods-ShuffleExample.debug.xcconfig +++ /dev/null @@ -1,12 +0,0 @@ -ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/PopBounceButton" "${PODS_CONFIGURATION_BUILD_DIR}/Shuffle-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/pop" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/PopBounceButton/PopBounceButton.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Shuffle-iOS/Shuffle_iOS.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/pop/pop.framework/Headers" -LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_LDFLAGS = $(inherited) -l"c++" -framework "PopBounceButton" -framework "Shuffle_iOS" -framework "pop" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_PODFILE_DIR_PATH = ${SRCROOT}/. -PODS_ROOT = ${SRCROOT}/Pods -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Example/Pods/Target Support Files/Pods-ShuffleExample/Pods-ShuffleExample.modulemap b/Example/Pods/Target Support Files/Pods-ShuffleExample/Pods-ShuffleExample.modulemap deleted file mode 100644 index b8b1a884..00000000 --- a/Example/Pods/Target Support Files/Pods-ShuffleExample/Pods-ShuffleExample.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Pods_ShuffleExample { - umbrella header "Pods-ShuffleExample-umbrella.h" - - export * - module * { export * } -} diff --git a/Example/Pods/Target Support Files/Pods-ShuffleExample/Pods-ShuffleExample.release.xcconfig b/Example/Pods/Target Support Files/Pods-ShuffleExample/Pods-ShuffleExample.release.xcconfig deleted file mode 100644 index f8f9c0b2..00000000 --- a/Example/Pods/Target Support Files/Pods-ShuffleExample/Pods-ShuffleExample.release.xcconfig +++ /dev/null @@ -1,12 +0,0 @@ -ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/PopBounceButton" "${PODS_CONFIGURATION_BUILD_DIR}/Shuffle-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/pop" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/PopBounceButton/PopBounceButton.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Shuffle-iOS/Shuffle_iOS.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/pop/pop.framework/Headers" -LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_LDFLAGS = $(inherited) -l"c++" -framework "PopBounceButton" -framework "Shuffle_iOS" -framework "pop" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_PODFILE_DIR_PATH = ${SRCROOT}/. -PODS_ROOT = ${SRCROOT}/Pods -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Example/Pods/Target Support Files/Pods-ShuffleTests/Pods-ShuffleTests-Info.plist b/Example/Pods/Target Support Files/Pods-ShuffleTests/Pods-ShuffleTests-Info.plist deleted file mode 100644 index 2243fe6e..00000000 --- a/Example/Pods/Target Support Files/Pods-ShuffleTests/Pods-ShuffleTests-Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Example/Pods/Target Support Files/Pods-ShuffleTests/Pods-ShuffleTests-acknowledgements.markdown b/Example/Pods/Target Support Files/Pods-ShuffleTests/Pods-ShuffleTests-acknowledgements.markdown deleted file mode 100644 index 61d0a7be..00000000 --- a/Example/Pods/Target Support Files/Pods-ShuffleTests/Pods-ShuffleTests-acknowledgements.markdown +++ /dev/null @@ -1,438 +0,0 @@ -# Acknowledgements -This application makes use of the following third party libraries: - -## Shuffle-iOS - -MIT License - -Copyright (c) 2019 Mac Gallagher - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -## Nimble - -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2016 Quick Team - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - -## Quick - -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2014, Quick Team - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -Generated by CocoaPods - https://cocoapods.org diff --git a/Example/Pods/Target Support Files/Pods-ShuffleTests/Pods-ShuffleTests-acknowledgements.plist b/Example/Pods/Target Support Files/Pods-ShuffleTests/Pods-ShuffleTests-acknowledgements.plist deleted file mode 100644 index 153f69ed..00000000 --- a/Example/Pods/Target Support Files/Pods-ShuffleTests/Pods-ShuffleTests-acknowledgements.plist +++ /dev/null @@ -1,482 +0,0 @@ - - - - - PreferenceSpecifiers - - - FooterText - This application makes use of the following third party libraries: - Title - Acknowledgements - Type - PSGroupSpecifier - - - FooterText - MIT License - -Copyright (c) 2019 Mac Gallagher - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - License - MIT - Title - Shuffle-iOS - Type - PSGroupSpecifier - - - FooterText - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2016 Quick Team - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - License - Apache 2.0 - Title - Nimble - Type - PSGroupSpecifier - - - FooterText - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2014, Quick Team - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - License - Apache 2.0 - Title - Quick - Type - PSGroupSpecifier - - - FooterText - Generated by CocoaPods - https://cocoapods.org - Title - - Type - PSGroupSpecifier - - - StringsTable - Acknowledgements - Title - Acknowledgements - - diff --git a/Example/Pods/Target Support Files/Pods-ShuffleTests/Pods-ShuffleTests-dummy.m b/Example/Pods/Target Support Files/Pods-ShuffleTests/Pods-ShuffleTests-dummy.m deleted file mode 100644 index f299ee6c..00000000 --- a/Example/Pods/Target Support Files/Pods-ShuffleTests/Pods-ShuffleTests-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Pods_ShuffleTests : NSObject -@end -@implementation PodsDummy_Pods_ShuffleTests -@end diff --git a/Example/Pods/Target Support Files/Pods-ShuffleTests/Pods-ShuffleTests-frameworks.sh b/Example/Pods/Target Support Files/Pods-ShuffleTests/Pods-ShuffleTests-frameworks.sh deleted file mode 100755 index 7d5d5fc3..00000000 --- a/Example/Pods/Target Support Files/Pods-ShuffleTests/Pods-ShuffleTests-frameworks.sh +++ /dev/null @@ -1,211 +0,0 @@ -#!/bin/sh -set -e -set -u -set -o pipefail - -function on_error { - echo "$(realpath -mq "${0}"):$1: error: Unexpected failure" -} -trap 'on_error $LINENO' ERR - -if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then - # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy - # frameworks to, so exit 0 (signalling the script phase was successful). - exit 0 -fi - -echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" -mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - -COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" -SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" - -# Used as a return value for each invocation of `strip_invalid_archs` function. -STRIP_BINARY_RETVAL=0 - -# This protects against multiple targets copying the same framework dependency at the same time. The solution -# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html -RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") - -# Copies and strips a vendored framework -install_framework() -{ - if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then - local source="${BUILT_PRODUCTS_DIR}/$1" - elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then - local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" - elif [ -r "$1" ]; then - local source="$1" - fi - - local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - - if [ -L "${source}" ]; then - echo "Symlinked..." - source="$(readlink "${source}")" - fi - - # Use filter instead of exclude so missing patterns don't throw errors. - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" - - local basename - basename="$(basename -s .framework "$1")" - binary="${destination}/${basename}.framework/${basename}" - - if ! [ -r "$binary" ]; then - binary="${destination}/${basename}" - elif [ -L "${binary}" ]; then - echo "Destination binary is symlinked..." - dirname="$(dirname "${binary}")" - binary="${dirname}/$(readlink "${binary}")" - fi - - # Strip invalid architectures so "fat" simulator / device frameworks work on device - if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then - strip_invalid_archs "$binary" - fi - - # Resign the code if required by the build settings to avoid unstable apps - code_sign_if_enabled "${destination}/$(basename "$1")" - - # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. - if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then - local swift_runtime_libs - swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u) - for lib in $swift_runtime_libs; do - echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" - rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" - code_sign_if_enabled "${destination}/${lib}" - done - fi -} - -# Copies and strips a vendored dSYM -install_dsym() { - local source="$1" - warn_missing_arch=${2:-true} - if [ -r "$source" ]; then - # Copy the dSYM into the targets temp dir. - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" - - local basename - basename="$(basename -s .dSYM "$source")" - binary_name="$(ls "$source/Contents/Resources/DWARF")" - binary="${DERIVED_FILES_DIR}/${basename}.dSYM/Contents/Resources/DWARF/${binary_name}" - - # Strip invalid architectures so "fat" simulator / device frameworks work on device - if [[ "$(file "$binary")" == *"Mach-O "*"dSYM companion"* ]]; then - strip_invalid_archs "$binary" "$warn_missing_arch" - fi - - if [[ $STRIP_BINARY_RETVAL == 1 ]]; then - # Move the stripped file into its final destination. - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.dSYM" "${DWARF_DSYM_FOLDER_PATH}" - else - # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. - touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.dSYM" - fi - fi -} - -# Copies the bcsymbolmap files of a vendored framework -install_bcsymbolmap() { - local bcsymbolmap_path="$1" - local destination="${BUILT_PRODUCTS_DIR}" - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}" -} - -# Signs a framework with the provided identity -code_sign_if_enabled() { - if [ -n "${EXPANDED_CODE_SIGN_IDENTITY:-}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then - # Use the current code_sign_identity - echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" - local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" - - if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then - code_sign_cmd="$code_sign_cmd &" - fi - echo "$code_sign_cmd" - eval "$code_sign_cmd" - fi -} - -# Strip invalid architectures -strip_invalid_archs() { - binary="$1" - warn_missing_arch=${2:-true} - # Get architectures for current target binary - binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" - # Intersect them with the architectures we are building for - intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" - # If there are no archs supported by this binary then warn the user - if [[ -z "$intersected_archs" ]]; then - if [[ "$warn_missing_arch" == "true" ]]; then - echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." - fi - STRIP_BINARY_RETVAL=0 - return - fi - stripped="" - for arch in $binary_archs; do - if ! [[ "${ARCHS}" == *"$arch"* ]]; then - # Strip non-valid architectures in-place - lipo -remove "$arch" -output "$binary" "$binary" - stripped="$stripped $arch" - fi - done - if [[ "$stripped" ]]; then - echo "Stripped $binary of architectures:$stripped" - fi - STRIP_BINARY_RETVAL=1 -} - -install_artifact() { - artifact="$1" - base="$(basename "$artifact")" - case $base in - *.framework) - install_framework "$artifact" - ;; - *.dSYM) - # Suppress arch warnings since XCFrameworks will include many dSYM files - install_dsym "$artifact" "false" - ;; - *.bcsymbolmap) - install_bcsymbolmap "$artifact" - ;; - *) - echo "error: Unrecognized artifact "$artifact"" - ;; - esac -} - -copy_artifacts() { - file_list="$1" - while read artifact; do - install_artifact "$artifact" - done <$file_list -} - -ARTIFACT_LIST_FILE="${BUILT_PRODUCTS_DIR}/cocoapods-artifacts-${CONFIGURATION}.txt" -if [ -r "${ARTIFACT_LIST_FILE}" ]; then - copy_artifacts "${ARTIFACT_LIST_FILE}" -fi - -if [[ "$CONFIGURATION" == "Debug" ]]; then - install_framework "${BUILT_PRODUCTS_DIR}/Shuffle-iOS/Shuffle_iOS.framework" - install_framework "${BUILT_PRODUCTS_DIR}/Nimble/Nimble.framework" - install_framework "${BUILT_PRODUCTS_DIR}/Quick/Quick.framework" -fi -if [[ "$CONFIGURATION" == "Release" ]]; then - install_framework "${BUILT_PRODUCTS_DIR}/Shuffle-iOS/Shuffle_iOS.framework" - install_framework "${BUILT_PRODUCTS_DIR}/Nimble/Nimble.framework" - install_framework "${BUILT_PRODUCTS_DIR}/Quick/Quick.framework" -fi -if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then - wait -fi diff --git a/Example/Pods/Target Support Files/Pods-ShuffleTests/Pods-ShuffleTests-umbrella.h b/Example/Pods/Target Support Files/Pods-ShuffleTests/Pods-ShuffleTests-umbrella.h deleted file mode 100644 index 4dacd936..00000000 --- a/Example/Pods/Target Support Files/Pods-ShuffleTests/Pods-ShuffleTests-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double Pods_ShuffleTestsVersionNumber; -FOUNDATION_EXPORT const unsigned char Pods_ShuffleTestsVersionString[]; - diff --git a/Example/Pods/Target Support Files/Pods-ShuffleTests/Pods-ShuffleTests.debug.xcconfig b/Example/Pods/Target Support Files/Pods-ShuffleTests/Pods-ShuffleTests.debug.xcconfig deleted file mode 100644 index 81e3de3e..00000000 --- a/Example/Pods/Target Support Files/Pods-ShuffleTests/Pods-ShuffleTests.debug.xcconfig +++ /dev/null @@ -1,12 +0,0 @@ -ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" "${PODS_CONFIGURATION_BUILD_DIR}/Nimble" "${PODS_CONFIGURATION_BUILD_DIR}/Quick" "${PODS_CONFIGURATION_BUILD_DIR}/Shuffle-iOS" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Nimble/Nimble.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Quick/Quick.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Shuffle-iOS/Shuffle_iOS.framework/Headers" -LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_LDFLAGS = $(inherited) -framework "Nimble" -framework "Quick" -framework "Shuffle_iOS" -framework "XCTest" -weak_framework "XCTest" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_PODFILE_DIR_PATH = ${SRCROOT}/. -PODS_ROOT = ${SRCROOT}/Pods -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Example/Pods/Target Support Files/Pods-ShuffleTests/Pods-ShuffleTests.modulemap b/Example/Pods/Target Support Files/Pods-ShuffleTests/Pods-ShuffleTests.modulemap deleted file mode 100644 index d20990a9..00000000 --- a/Example/Pods/Target Support Files/Pods-ShuffleTests/Pods-ShuffleTests.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Pods_ShuffleTests { - umbrella header "Pods-ShuffleTests-umbrella.h" - - export * - module * { export * } -} diff --git a/Example/Pods/Target Support Files/Pods-ShuffleTests/Pods-ShuffleTests.release.xcconfig b/Example/Pods/Target Support Files/Pods-ShuffleTests/Pods-ShuffleTests.release.xcconfig deleted file mode 100644 index 81e3de3e..00000000 --- a/Example/Pods/Target Support Files/Pods-ShuffleTests/Pods-ShuffleTests.release.xcconfig +++ /dev/null @@ -1,12 +0,0 @@ -ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" "${PODS_CONFIGURATION_BUILD_DIR}/Nimble" "${PODS_CONFIGURATION_BUILD_DIR}/Quick" "${PODS_CONFIGURATION_BUILD_DIR}/Shuffle-iOS" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Nimble/Nimble.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Quick/Quick.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Shuffle-iOS/Shuffle_iOS.framework/Headers" -LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_LDFLAGS = $(inherited) -framework "Nimble" -framework "Quick" -framework "Shuffle_iOS" -framework "XCTest" -weak_framework "XCTest" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_PODFILE_DIR_PATH = ${SRCROOT}/. -PODS_ROOT = ${SRCROOT}/Pods -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Example/Pods/Target Support Files/PopBounceButton/PopBounceButton-Info.plist b/Example/Pods/Target Support Files/PopBounceButton/PopBounceButton-Info.plist deleted file mode 100644 index e433362e..00000000 --- a/Example/Pods/Target Support Files/PopBounceButton/PopBounceButton-Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.2.2 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Example/Pods/Target Support Files/PopBounceButton/PopBounceButton-dummy.m b/Example/Pods/Target Support Files/PopBounceButton/PopBounceButton-dummy.m deleted file mode 100644 index 628ed4ff..00000000 --- a/Example/Pods/Target Support Files/PopBounceButton/PopBounceButton-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_PopBounceButton : NSObject -@end -@implementation PodsDummy_PopBounceButton -@end diff --git a/Example/Pods/Target Support Files/PopBounceButton/PopBounceButton-prefix.pch b/Example/Pods/Target Support Files/PopBounceButton/PopBounceButton-prefix.pch deleted file mode 100644 index beb2a244..00000000 --- a/Example/Pods/Target Support Files/PopBounceButton/PopBounceButton-prefix.pch +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - diff --git a/Example/Pods/Target Support Files/PopBounceButton/PopBounceButton-umbrella.h b/Example/Pods/Target Support Files/PopBounceButton/PopBounceButton-umbrella.h deleted file mode 100644 index d1755dff..00000000 --- a/Example/Pods/Target Support Files/PopBounceButton/PopBounceButton-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double PopBounceButtonVersionNumber; -FOUNDATION_EXPORT const unsigned char PopBounceButtonVersionString[]; - diff --git a/Example/Pods/Target Support Files/PopBounceButton/PopBounceButton.debug.xcconfig b/Example/Pods/Target Support Files/PopBounceButton/PopBounceButton.debug.xcconfig deleted file mode 100644 index 22dcd2a4..00000000 --- a/Example/Pods/Target Support Files/PopBounceButton/PopBounceButton.debug.xcconfig +++ /dev/null @@ -1,11 +0,0 @@ -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/PopBounceButton -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/pop" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/PopBounceButton -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Example/Pods/Target Support Files/PopBounceButton/PopBounceButton.modulemap b/Example/Pods/Target Support Files/PopBounceButton/PopBounceButton.modulemap deleted file mode 100644 index af140ece..00000000 --- a/Example/Pods/Target Support Files/PopBounceButton/PopBounceButton.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module PopBounceButton { - umbrella header "PopBounceButton-umbrella.h" - - export * - module * { export * } -} diff --git a/Example/Pods/Target Support Files/PopBounceButton/PopBounceButton.release.xcconfig b/Example/Pods/Target Support Files/PopBounceButton/PopBounceButton.release.xcconfig deleted file mode 100644 index 22dcd2a4..00000000 --- a/Example/Pods/Target Support Files/PopBounceButton/PopBounceButton.release.xcconfig +++ /dev/null @@ -1,11 +0,0 @@ -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/PopBounceButton -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/pop" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/PopBounceButton -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Example/Pods/Target Support Files/Quick/Quick-Info.plist b/Example/Pods/Target Support Files/Quick/Quick-Info.plist deleted file mode 100644 index 0816e960..00000000 --- a/Example/Pods/Target Support Files/Quick/Quick-Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 2.2.1 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Example/Pods/Target Support Files/Quick/Quick-dummy.m b/Example/Pods/Target Support Files/Quick/Quick-dummy.m deleted file mode 100644 index 54d7dc0a..00000000 --- a/Example/Pods/Target Support Files/Quick/Quick-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Quick : NSObject -@end -@implementation PodsDummy_Quick -@end diff --git a/Example/Pods/Target Support Files/Quick/Quick-prefix.pch b/Example/Pods/Target Support Files/Quick/Quick-prefix.pch deleted file mode 100644 index beb2a244..00000000 --- a/Example/Pods/Target Support Files/Quick/Quick-prefix.pch +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - diff --git a/Example/Pods/Target Support Files/Quick/Quick-umbrella.h b/Example/Pods/Target Support Files/Quick/Quick-umbrella.h deleted file mode 100644 index 1de6bf35..00000000 --- a/Example/Pods/Target Support Files/Quick/Quick-umbrella.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - -#import "QuickConfiguration.h" -#import "QCKDSL.h" -#import "Quick.h" -#import "QuickSpec.h" - -FOUNDATION_EXPORT double QuickVersionNumber; -FOUNDATION_EXPORT const unsigned char QuickVersionString[]; - diff --git a/Example/Pods/Target Support Files/Quick/Quick.debug.xcconfig b/Example/Pods/Target Support Files/Quick/Quick.debug.xcconfig deleted file mode 100644 index 863bafda..00000000 --- a/Example/Pods/Target Support Files/Quick/Quick.debug.xcconfig +++ /dev/null @@ -1,18 +0,0 @@ -APPLICATION_EXTENSION_API_ONLY = YES -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Quick -DEFINES_MODULE = YES -ENABLE_BITCODE = NO -FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LIBRARY_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/usr/lib" -OTHER_LDFLAGS = $(inherited) -Xlinker -no_application_extension -framework "XCTest" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/Quick -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -SWIFT_INCLUDE_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/usr/lib" -SYSTEM_FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Example/Pods/Target Support Files/Quick/Quick.modulemap b/Example/Pods/Target Support Files/Quick/Quick.modulemap deleted file mode 100644 index 1d12b215..00000000 --- a/Example/Pods/Target Support Files/Quick/Quick.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Quick { - umbrella header "Quick-umbrella.h" - - export * - module * { export * } -} diff --git a/Example/Pods/Target Support Files/Quick/Quick.release.xcconfig b/Example/Pods/Target Support Files/Quick/Quick.release.xcconfig deleted file mode 100644 index 863bafda..00000000 --- a/Example/Pods/Target Support Files/Quick/Quick.release.xcconfig +++ /dev/null @@ -1,18 +0,0 @@ -APPLICATION_EXTENSION_API_ONLY = YES -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Quick -DEFINES_MODULE = YES -ENABLE_BITCODE = NO -FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LIBRARY_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/usr/lib" -OTHER_LDFLAGS = $(inherited) -Xlinker -no_application_extension -framework "XCTest" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/Quick -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -SWIFT_INCLUDE_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/usr/lib" -SYSTEM_FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Example/Pods/Target Support Files/Shuffle-iOS/Shuffle-iOS-Info.plist b/Example/Pods/Target Support Files/Shuffle-iOS/Shuffle-iOS-Info.plist deleted file mode 100644 index 53e4061e..00000000 --- a/Example/Pods/Target Support Files/Shuffle-iOS/Shuffle-iOS-Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 0.4.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Example/Pods/Target Support Files/Shuffle-iOS/Shuffle-iOS-dummy.m b/Example/Pods/Target Support Files/Shuffle-iOS/Shuffle-iOS-dummy.m deleted file mode 100644 index 5355e1a7..00000000 --- a/Example/Pods/Target Support Files/Shuffle-iOS/Shuffle-iOS-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Shuffle_iOS : NSObject -@end -@implementation PodsDummy_Shuffle_iOS -@end diff --git a/Example/Pods/Target Support Files/Shuffle-iOS/Shuffle-iOS-prefix.pch b/Example/Pods/Target Support Files/Shuffle-iOS/Shuffle-iOS-prefix.pch deleted file mode 100644 index beb2a244..00000000 --- a/Example/Pods/Target Support Files/Shuffle-iOS/Shuffle-iOS-prefix.pch +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - diff --git a/Example/Pods/Target Support Files/Shuffle-iOS/Shuffle-iOS-umbrella.h b/Example/Pods/Target Support Files/Shuffle-iOS/Shuffle-iOS-umbrella.h deleted file mode 100644 index b5eb2453..00000000 --- a/Example/Pods/Target Support Files/Shuffle-iOS/Shuffle-iOS-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double Shuffle_iOSVersionNumber; -FOUNDATION_EXPORT const unsigned char Shuffle_iOSVersionString[]; - diff --git a/Example/Pods/Target Support Files/Shuffle-iOS/Shuffle-iOS.debug.xcconfig b/Example/Pods/Target Support Files/Shuffle-iOS/Shuffle-iOS.debug.xcconfig deleted file mode 100644 index ce42ffd4..00000000 --- a/Example/Pods/Target Support Files/Shuffle-iOS/Shuffle-iOS.debug.xcconfig +++ /dev/null @@ -1,10 +0,0 @@ -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Shuffle-iOS -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Example/Pods/Target Support Files/Shuffle-iOS/Shuffle-iOS.modulemap b/Example/Pods/Target Support Files/Shuffle-iOS/Shuffle-iOS.modulemap deleted file mode 100644 index 0736bec8..00000000 --- a/Example/Pods/Target Support Files/Shuffle-iOS/Shuffle-iOS.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Shuffle_iOS { - umbrella header "Shuffle-iOS-umbrella.h" - - export * - module * { export * } -} diff --git a/Example/Pods/Target Support Files/Shuffle-iOS/Shuffle-iOS.release.xcconfig b/Example/Pods/Target Support Files/Shuffle-iOS/Shuffle-iOS.release.xcconfig deleted file mode 100644 index ce42ffd4..00000000 --- a/Example/Pods/Target Support Files/Shuffle-iOS/Shuffle-iOS.release.xcconfig +++ /dev/null @@ -1,10 +0,0 @@ -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Shuffle-iOS -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Example/Pods/Target Support Files/pop/pop-Info.plist b/Example/Pods/Target Support Files/pop/pop-Info.plist deleted file mode 100644 index b8236f13..00000000 --- a/Example/Pods/Target Support Files/pop/pop-Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0.12 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Example/Pods/Target Support Files/pop/pop-dummy.m b/Example/Pods/Target Support Files/pop/pop-dummy.m deleted file mode 100644 index 19ed261c..00000000 --- a/Example/Pods/Target Support Files/pop/pop-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_pop : NSObject -@end -@implementation PodsDummy_pop -@end diff --git a/Example/Pods/Target Support Files/pop/pop-prefix.pch b/Example/Pods/Target Support Files/pop/pop-prefix.pch deleted file mode 100644 index beb2a244..00000000 --- a/Example/Pods/Target Support Files/pop/pop-prefix.pch +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - diff --git a/Example/Pods/Target Support Files/pop/pop-umbrella.h b/Example/Pods/Target Support Files/pop/pop-umbrella.h deleted file mode 100644 index 2835c48e..00000000 --- a/Example/Pods/Target Support Files/pop/pop-umbrella.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - -#import "POP.h" -#import "POPAnimatableProperty.h" -#import "POPAnimatablePropertyTypes.h" -#import "POPAnimation.h" -#import "POPAnimationEvent.h" -#import "POPAnimationExtras.h" -#import "POPAnimationTracer.h" -#import "POPAnimator.h" -#import "POPBasicAnimation.h" -#import "POPCustomAnimation.h" -#import "POPDecayAnimation.h" -#import "POPDefines.h" -#import "POPGeometry.h" -#import "POPLayerExtras.h" -#import "POPPropertyAnimation.h" -#import "POPSpringAnimation.h" -#import "POPVector.h" - -FOUNDATION_EXPORT double popVersionNumber; -FOUNDATION_EXPORT const unsigned char popVersionString[]; - diff --git a/Example/Pods/Target Support Files/pop/pop.debug.xcconfig b/Example/Pods/Target Support Files/pop/pop.debug.xcconfig deleted file mode 100644 index cfc1f9dc..00000000 --- a/Example/Pods/Target Support Files/pop/pop.debug.xcconfig +++ /dev/null @@ -1,12 +0,0 @@ -CLANG_CXX_LANGUAGE_STANDARD = c++11 -CLANG_CXX_LIBRARY = libc++ -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/pop -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -OTHER_LDFLAGS = $(inherited) -l"c++" -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/pop -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Example/Pods/Target Support Files/pop/pop.modulemap b/Example/Pods/Target Support Files/pop/pop.modulemap deleted file mode 100644 index 61974853..00000000 --- a/Example/Pods/Target Support Files/pop/pop.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module pop { - umbrella header "pop-umbrella.h" - - export * - module * { export * } -} diff --git a/Example/Pods/Target Support Files/pop/pop.release.xcconfig b/Example/Pods/Target Support Files/pop/pop.release.xcconfig deleted file mode 100644 index cfc1f9dc..00000000 --- a/Example/Pods/Target Support Files/pop/pop.release.xcconfig +++ /dev/null @@ -1,12 +0,0 @@ -CLANG_CXX_LANGUAGE_STANDARD = c++11 -CLANG_CXX_LIBRARY = libc++ -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/pop -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -OTHER_LDFLAGS = $(inherited) -l"c++" -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/pop -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Example/Pods/pop/LICENSE b/Example/Pods/pop/LICENSE deleted file mode 100644 index 642126fd..00000000 --- a/Example/Pods/pop/LICENSE +++ /dev/null @@ -1,30 +0,0 @@ -BSD License - -For Pop software - -Copyright (c) 2014, Facebook, Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither the name Facebook nor the names of its contributors may be used to - endorse or promote products derived from this software without specific - prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Example/Pods/pop/README.md b/Example/Pods/pop/README.md deleted file mode 100644 index e7a5595d..00000000 --- a/Example/Pods/pop/README.md +++ /dev/null @@ -1,341 +0,0 @@ -![pop](https://github.com/facebook/pop/blob/master/Images/pop.gif?raw=true) - -Pop is an extensible animation engine for iOS, tvOS, and OS X. In addition to basic static animations, it supports spring and decay dynamic animations, making it useful for building realistic, physics-based interactions. The API allows quick integration with existing Objective-C or Swift codebases and enables the animation of any property on any object. It's a mature and well-tested framework that drives all the animations and transitions in [Paper](https://en.wikipedia.org/wiki/Facebook_Paper). - -[![Build Status](https://travis-ci.org/facebook/pop.svg)](https://travis-ci.org/facebook/pop) - -## Installation - -Pop is available on [CocoaPods](http://cocoapods.org). Just add the following to your project Podfile: - -```ruby -pod 'pop', '~> 1.0' -``` - -Bugs are first fixed in master and then made available via a designated release. If you tend to live on the bleeding edge, you can use Pop from master with the following Podfile entry: - -```ruby -pod 'pop', :git => 'https://github.com/facebook/pop.git' -``` - -### Framework (manual) -By adding the project to your project and adding pop.embedded framework to the Embedded Binaries section on the General tab of your app's target, you can set up pop in seconds! This also enables `@import pop` syntax with header modules. - -**Note**: because of some awkward limitations with Xcode, embedded binaries must share the same name as the module and must have `.framework` as an extension. This means that you'll see three pop.frameworks when adding embedded binaries (one for OS X, one for tvOS, and one for iOS). You'll need to be sure to add the right one; they appear identically in the list but note the list is populated in order of targets. You can verify the correct one was chosen by checking the path next to the framework listed, in the format `-` (e.g. `Debug-iphoneos`). - -![Embedded Binaries](Images/EmbeddedBinaries.png?raw=true) - -**Note 2**: this method does not currently play nicely with workspaces. Since targets can only depend on and embed products from other targets in the same project, it only works when pop.xcodeproj is added as a subproject to the current target's project. Otherwise, you'll need to manually set the build ordering in the scheme and copy in the product. - -### Static Library (manual) -Alternatively, you can add the project to your workspace and adopt the provided configuration files or manually copy the files under the pop subdirectory into your project. If installing manually, ensure the C++ standard library is also linked by including `-lc++` to your project linker flags. - -## Usage - -Pop adopts the Core Animation explicit animation programming model. Use by including the following import: - -#### Objective-C - -```objective-c -#import -``` - -or if you're using the embedded framework: - -```objective-c -@import pop; -``` - -#### Swift - -```swift -import pop -``` - -### Start, Stop & Update - -To start an animation, add it to the object you wish to animate: - -#### Objective-C - -```objective-c -POPSpringAnimation *anim = [POPSpringAnimation animation]; -... -[layer pop_addAnimation:anim forKey:@"myKey"]; -``` - -#### Swift - -```swift -let anim = POPSpringAnimation() -... -layer.pop_add(anim, forKey: "myKey") -``` - -To stop an animation, remove it from the object referencing the key specified on start: - -#### Objective-C - -```objective-c -[layer pop_removeAnimationForKey:@"myKey"]; -``` - -#### Swift - -```swift -layer.pop_removeAnimation(forKey: "myKey") -``` - -The key can also be used to query for the existence of an animation. Updating the toValue of a running animation can provide the most seamless way to change course: - -#### Objective-C - -```objective-c -anim = [layer pop_animationForKey:@"myKey"]; -if (anim) { - /* update to value to new destination */ - anim.toValue = @(42.0); -} else { - /* create and start a new animation */ - .... -} -``` - -#### Swift - -```swift -if let anim = layer.pop_animation(forKey: "myKey") as? POPSpringAnimation { - /* update to value to new destination */ - anim.toValue = 42.0 -} else { - /* create and start a new animation */ - .... -} -``` - -While a layer was used in the above examples, the Pop interface is implemented as a category addition on NSObject. Any NSObject or subclass can be animated. - -### Types - -There are four concrete animation types: spring, decay, basic and custom. - -Spring animations can be used to give objects a delightful bounce. In this example, we use a spring animation to animate a layer's bounds from its current value to (0, 0, 400, 400): - -#### Objective-C - -```objective-c -POPSpringAnimation *anim = [POPSpringAnimation animationWithPropertyNamed:kPOPLayerBounds]; -anim.toValue = [NSValue valueWithCGRect:CGRectMake(0, 0, 400, 400)]; -[layer pop_addAnimation:anim forKey:@"size"]; -``` - -#### Swift - -```swift -if let anim = POPSpringAnimation(propertyNamed: kPOPLayerBounds) { - anim.toValue = NSValue(cgRect: CGRect(x: 0, y: 0, width: 400, height: 400)) - layer.pop_add(anim, forKey: "size") -} -``` - -Decay animations can be used to gradually slow an object to a halt. In this example, we decay a layer's positionX from it's current value and velocity 1000pts per second: - -#### Objective-C - -```objective-c -POPDecayAnimation *anim = [POPDecayAnimation animationWithPropertyNamed:kPOPLayerPositionX]; -anim.velocity = @(1000.); -[layer pop_addAnimation:anim forKey:@"slide"]; -``` - -#### Swift - -```swift -if let anim = POPDecayAnimation(propertyNamed: kPOPLayerPositionX) { - anim.velocity = 1000.0 - layer.pop_add(anim, forKey: "slide") -} -``` - -Basic animations can be used to interpolate values over a specified time period. To use an ease-in ease-out animation to animate a view's alpha from 0.0 to 1.0 over the default duration: - -#### Objective-C - -```objective-c -POPBasicAnimation *anim = [POPBasicAnimation animationWithPropertyNamed:kPOPViewAlpha]; -anim.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; -anim.fromValue = @(0.0); -anim.toValue = @(1.0); -[view pop_addAnimation:anim forKey:@"fade"]; -``` - -#### Swift - -```swift -if let anim = POPBasicAnimation(propertyNamed: kPOPViewAlpha) { - anim.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut) - anim.fromValue = 0.0 - anim.toValue = 1.0 - view.pop_add(anim, forKey: "fade") -} -``` - -`POPCustomAnimation` makes creating custom animations and transitions easier by handling CADisplayLink and associated time-step management. See header for more details. - - -### Properties - -The property animated is specified by the `POPAnimatableProperty` class. In this example we create a spring animation and explicitly set the animatable property corresponding to `-[CALayer bounds]`: - -#### Objective-C - -```objective-c -POPSpringAnimation *anim = [POPSpringAnimation animation]; -anim.property = [POPAnimatableProperty propertyWithName:kPOPLayerBounds]; -``` - -#### Swift - -```swift -let anim = POPSpringAnimation() -if let property = POPAnimatableProperty.property(withName: kPOPLayerBounds) as? POPAnimatableProperty { - anim.property = property -} -``` - -The framework provides many common layer and view animatable properties out of box. You can animate a custom property by creating a new instance of the class. In this example, we declare a custom volume property: - -#### Objective-C - -```objective-c -prop = [POPAnimatableProperty propertyWithName:@"com.foo.radio.volume" initializer:^(POPMutableAnimatableProperty *prop) { - // read value - prop.readBlock = ^(id obj, CGFloat values[]) { - values[0] = [obj volume]; - }; - // write value - prop.writeBlock = ^(id obj, const CGFloat values[]) { - [obj setVolume:values[0]]; - }; - // dynamics threshold - prop.threshold = 0.01; -}]; - -anim.property = prop; -``` - -#### Swift - -```swift -if let prop = POPAnimatableProperty.property(withName: "com.foo.radio.volume", initializer: { prop in - guard let prop = prop else { - return - } - // read value - prop.readBlock = { obj, values in - guard let obj = obj as? Volumeable, let values = values else { - return - } - - values[0] = obj.volume - } - // write value - prop.writeBlock = { obj, values in - guard var obj = obj as? Volumeable, let values = values else { - return - } - - obj.volume = values[0] - } - // dynamics threshold - prop.threshold = 0.01 -}) as? POPAnimatableProperty { - anim.property = prop -} -``` - -For a complete listing of provided animatable properties, as well more information on declaring custom properties see `POPAnimatableProperty.h`. - - -### Debugging - -Here are a few tips when debugging. Pop obeys the Simulator's Toggle Slow Animations setting. Try enabling it to slow down animations and more easily observe interactions. - -Consider naming your animations. This will allow you to more easily identify them when referencing them, either via logging or in the debugger: - -#### Objective-C - -```objective-c -anim.name = @"springOpen"; -``` - -#### Swift - -```swift -anim.name = "springOpen" -``` - -Each animation comes with an associated tracer. The tracer allows you to record all animation-related events, in a fast and efficient manner, allowing you to query and analyze them after animation completion. The below example starts the tracer and configures it to log all events on animation completion: - -#### Objective-C - -```objective-c -POPAnimationTracer *tracer = anim.tracer; -tracer.shouldLogAndResetOnCompletion = YES; -[tracer start]; -``` - -#### Swift - -```swift -if let tracer = anim.tracer { - tracer.shouldLogAndResetOnCompletion = true - tracer.start() -} -``` - -See `POPAnimationTracer.h` for more details. - -## Testing - -Pop has extensive unit test coverage. To install test dependencies, navigate to the root pop directory and type: - -```sh -pod install -``` - -Assuming CocoaPods is installed, this will include the necessary OCMock dependency to the unit test targets. - -## SceneKit - -Due to SceneKit requiring iOS 8 and OS X 10.9, POP's SceneKit extensions aren't provided out of box. Unfortunately, [weakly linked frameworks](https://developer.apple.com/library/mac/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WeakLinking.html) cannot be used due to issues mentioned in the [Xcode 6.1 Release Notes](https://developer.apple.com/library/ios/releasenotes/DeveloperTools/RN-Xcode/Chapters/xc6_release_notes.html). - -To remedy this, you can easily opt-in to use SceneKit! Simply add this to the Preprocessor Macros section of your Xcode Project: - -``` -POP_USE_SCENEKIT=1 -``` - -## Resources - -A collection of links to external resources that may prove valuable: - -* [AGGeometryKit+POP - Animating Quadrilaterals with Pop](https://github.com/hfossli/aggeometrykit-pop) -* [Apple – Core Animation Programming Guide](https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/CoreAnimation_guide/Introduction/Introduction.html) -* [iOS Development Tips – UIScrollView-like deceleration with Pop](http://iosdevtips.co/post/84571595353/replicating-uiscrollviews-deceleration-with-facebook) -* [Pop Playground – Repository of Pop animation examples](https://github.com/callmeed/pop-playground) -* [Pop Playground 2 – Playing with Facebook's framework](http://victorbaro.com/2014/05/pop-playground-playing-with-facebooks-framework/) -* [POP-MCAnimate – Concise syntax for the Pop animation framework](https://github.com/matthewcheok/POP-MCAnimate) -* [Popping - Great examples in one project](https://github.com/schneiderandre/popping) -* [Rebound – Spring Animations for Android](http://facebook.github.io/rebound/) -* [Tapity Tutorial – Getting Started with Pop](http://tapity.com/tutorial-getting-started-with-pop/) -* [Tweaks – Easily adjust parameters for iOS apps in development](https://github.com/facebook/tweaks) -* [POP Tutorial in 5 steps](https://github.com/maxmyers/FacebookPop) -* [VBFPopFlatButton – Flat animatable button, using Pop to transition between states](https://github.com/victorBaro/VBFPopFlatButton) - -## Contributing -See the CONTRIBUTING file for how to help out. - -## License - -Pop is released under a BSD License. See LICENSE file for details. diff --git a/Example/Pods/pop/pop/POP.h b/Example/Pods/pop/pop/POP.h deleted file mode 100644 index 291db8d2..00000000 --- a/Example/Pods/pop/pop/POP.h +++ /dev/null @@ -1,30 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -#ifndef POP_POP_H -#define POP_POP_H - -#import - -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import - -#endif /* POP_POP_H */ diff --git a/Example/Pods/pop/pop/POPAction.h b/Example/Pods/pop/pop/POPAction.h deleted file mode 100644 index 85cca192..00000000 --- a/Example/Pods/pop/pop/POPAction.h +++ /dev/null @@ -1,67 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -#ifndef POPACTION_H -#define POPACTION_H - -#import - -#import - -#ifdef __cplusplus - -namespace POP { - - /** - @abstract Disables Core Animation actions using RAII. - @discussion The disablement of actions is scoped to the current transaction. - */ - class ActionDisabler - { - BOOL state; - - public: - ActionDisabler() POP_NOTHROW - { - state = [CATransaction disableActions]; - [CATransaction setDisableActions:YES]; - } - - ~ActionDisabler() - { - [CATransaction setDisableActions:state]; - } - }; - - /** - @abstract Enables Core Animation actions using RAII. - @discussion The enablement of actions is scoped to the current transaction. - */ - class ActionEnabler - { - BOOL state; - - public: - ActionEnabler() POP_NOTHROW - { - state = [CATransaction disableActions]; - [CATransaction setDisableActions:NO]; - } - - ~ActionEnabler() - { - [CATransaction setDisableActions:state]; - } - }; - -} - -#endif /* __cplusplus */ - -#endif /* POPACTION_H */ diff --git a/Example/Pods/pop/pop/POPAnimatableProperty.h b/Example/Pods/pop/pop/POPAnimatableProperty.h deleted file mode 100644 index d35f4248..00000000 --- a/Example/Pods/pop/pop/POPAnimatableProperty.h +++ /dev/null @@ -1,256 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -#import - -#import -#import - -@class POPMutableAnimatableProperty; - -/** - @abstract Describes an animatable property. - */ -@interface POPAnimatableProperty : NSObject - -/** - @abstract Property accessor. - @param name The name of the property. - @return The animatable property with that name or nil if it does not exist. - @discussion Common animatable properties are included by default. Use the provided constants to reference. - */ -+ (id)propertyWithName:(NSString *)name; - -/** - @abstract The designated initializer. - @param name The name of the property. - @param block The block used to configure the property on creation. - @return The animatable property with name if it exists, otherwise a newly created instance configured by block. - @discussion Custom properties should use reverse-DNS naming. A newly created instance is only mutable in the scope of block. Once constructed, a property becomes immutable. - */ -+ (id)propertyWithName:(NSString *)name initializer:(void (^)(POPMutableAnimatableProperty *prop))block; - -/** - @abstract The name of the property. - @discussion Used to uniquely identify an animatable property. - */ -@property (readonly, nonatomic, copy) NSString *name; - -/** - @abstract Block used to read values from a property into an array of floats. - */ -@property (readonly, nonatomic, copy) POPAnimatablePropertyReadBlock readBlock; - -/** - @abstract Block used to write values from an array of floats into a property. - */ -@property (readonly, nonatomic, copy) POPAnimatablePropertyWriteBlock writeBlock; - -/** - @abstract The threshold value used when determining completion of dynamics simulations. - */ -@property (readonly, nonatomic, assign) CGFloat threshold; - -@end - -/** - @abstract A mutable animatable property intended for configuration. - */ -@interface POPMutableAnimatableProperty : POPAnimatableProperty - -/** - @abstract A read-write version of POPAnimatableProperty name property. - */ -@property (readwrite, nonatomic, copy) NSString *name; - -/** - @abstract A read-write version of POPAnimatableProperty readBlock property. - */ -@property (readwrite, nonatomic, copy) POPAnimatablePropertyReadBlock readBlock; - -/** - @abstract A read-write version of POPAnimatableProperty writeBlock property. - */ -@property (readwrite, nonatomic, copy) POPAnimatablePropertyWriteBlock writeBlock; - -/** - @abstract A read-write version of POPAnimatableProperty threshold property. - */ -@property (readwrite, nonatomic, assign) CGFloat threshold; - -@end - -POP_EXTERN_C_BEGIN - -/** - Common CALayer property names. - */ -extern NSString * const kPOPLayerBackgroundColor; -extern NSString * const kPOPLayerBounds; -extern NSString * const kPOPLayerCornerRadius; -extern NSString * const kPOPLayerBorderWidth; -extern NSString * const kPOPLayerBorderColor; -extern NSString * const kPOPLayerOpacity; -extern NSString * const kPOPLayerPosition; -extern NSString * const kPOPLayerPositionX; -extern NSString * const kPOPLayerPositionY; -extern NSString * const kPOPLayerRotation; -extern NSString * const kPOPLayerRotationX; -extern NSString * const kPOPLayerRotationY; -extern NSString * const kPOPLayerScaleX; -extern NSString * const kPOPLayerScaleXY; -extern NSString * const kPOPLayerScaleY; -extern NSString * const kPOPLayerSize; -extern NSString * const kPOPLayerSubscaleXY; -extern NSString * const kPOPLayerSubtranslationX; -extern NSString * const kPOPLayerSubtranslationXY; -extern NSString * const kPOPLayerSubtranslationY; -extern NSString * const kPOPLayerSubtranslationZ; -extern NSString * const kPOPLayerTranslationX; -extern NSString * const kPOPLayerTranslationXY; -extern NSString * const kPOPLayerTranslationY; -extern NSString * const kPOPLayerTranslationZ; -extern NSString * const kPOPLayerZPosition; -extern NSString * const kPOPLayerShadowColor; -extern NSString * const kPOPLayerShadowOffset; -extern NSString * const kPOPLayerShadowOpacity; -extern NSString * const kPOPLayerShadowRadius; - -/** - Common CAShapeLayer property names. - */ -extern NSString * const kPOPShapeLayerStrokeStart; -extern NSString * const kPOPShapeLayerStrokeEnd; -extern NSString * const kPOPShapeLayerStrokeColor; -extern NSString * const kPOPShapeLayerFillColor; -extern NSString * const kPOPShapeLayerLineWidth; -extern NSString * const kPOPShapeLayerLineDashPhase; - -/** - Common NSLayoutConstraint property names. - */ -extern NSString * const kPOPLayoutConstraintConstant; - - -#if TARGET_OS_IPHONE - -/** - Common UIView property names. - */ -extern NSString * const kPOPViewAlpha; -extern NSString * const kPOPViewBackgroundColor; -extern NSString * const kPOPViewBounds; -extern NSString * const kPOPViewCenter; -extern NSString * const kPOPViewFrame; -extern NSString * const kPOPViewScaleX; -extern NSString * const kPOPViewScaleXY; -extern NSString * const kPOPViewScaleY; -extern NSString * const kPOPViewSize; -extern NSString * const kPOPViewTintColor; - -/** - Common UIScrollView property names. - */ -extern NSString * const kPOPScrollViewContentOffset; -extern NSString * const kPOPScrollViewContentSize; -extern NSString * const kPOPScrollViewZoomScale; -extern NSString * const kPOPScrollViewContentInset; -extern NSString * const kPOPScrollViewScrollIndicatorInsets; - -/** - Common UITableView property names. - */ -extern NSString * const kPOPTableViewContentOffset; -extern NSString * const kPOPTableViewContentSize; - -/** - Common UICollectionView property names. - */ -extern NSString * const kPOPCollectionViewContentOffset; -extern NSString * const kPOPCollectionViewContentSize; - -/** - Common UINavigationBar property names. - */ -extern NSString * const kPOPNavigationBarBarTintColor; - -/** - Common UIToolbar property names. - */ -extern NSString * const kPOPToolbarBarTintColor; - -/** - Common UITabBar property names. - */ -extern NSString * const kPOPTabBarBarTintColor; - -/** - Common UILabel property names. - */ -extern NSString * const kPOPLabelTextColor; - -#else - -/** - Common NSView property names. - */ -extern NSString * const kPOPViewFrame; -extern NSString * const kPOPViewBounds; -extern NSString * const kPOPViewAlphaValue; -extern NSString * const kPOPViewFrameRotation; -extern NSString * const kPOPViewFrameCenterRotation; -extern NSString * const kPOPViewBoundsRotation; - -/** - Common NSWindow property names. - */ -extern NSString * const kPOPWindowFrame; -extern NSString * const kPOPWindowAlphaValue; -extern NSString * const kPOPWindowBackgroundColor; - -#endif - -#if SCENEKIT_SDK_AVAILABLE - -/** - Common SceneKit property names. - */ -extern NSString * const kPOPSCNNodePosition; -extern NSString * const kPOPSCNNodePositionX; -extern NSString * const kPOPSCNNodePositionY; -extern NSString * const kPOPSCNNodePositionZ; -extern NSString * const kPOPSCNNodeTranslation; -extern NSString * const kPOPSCNNodeTranslationX; -extern NSString * const kPOPSCNNodeTranslationY; -extern NSString * const kPOPSCNNodeTranslationZ; -extern NSString * const kPOPSCNNodeRotation; -extern NSString * const kPOPSCNNodeRotationX; -extern NSString * const kPOPSCNNodeRotationY; -extern NSString * const kPOPSCNNodeRotationZ; -extern NSString * const kPOPSCNNodeRotationW; -extern NSString * const kPOPSCNNodeEulerAngles; -extern NSString * const kPOPSCNNodeEulerAnglesX; -extern NSString * const kPOPSCNNodeEulerAnglesY; -extern NSString * const kPOPSCNNodeEulerAnglesZ; -extern NSString * const kPOPSCNNodeOrientation; -extern NSString * const kPOPSCNNodeOrientationX; -extern NSString * const kPOPSCNNodeOrientationY; -extern NSString * const kPOPSCNNodeOrientationZ; -extern NSString * const kPOPSCNNodeOrientationW; -extern NSString * const kPOPSCNNodeScale; -extern NSString * const kPOPSCNNodeScaleX; -extern NSString * const kPOPSCNNodeScaleY; -extern NSString * const kPOPSCNNodeScaleZ; -extern NSString * const kPOPSCNNodeScaleXY; - -#endif - -POP_EXTERN_C_END diff --git a/Example/Pods/pop/pop/POPAnimatableProperty.mm b/Example/Pods/pop/pop/POPAnimatableProperty.mm deleted file mode 100644 index 7b63c50f..00000000 --- a/Example/Pods/pop/pop/POPAnimatableProperty.mm +++ /dev/null @@ -1,1310 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -#import "POPAnimatableProperty.h" - -#import - -#import "POPAnimationRuntime.h" -#import "POPCGUtils.h" -#import "POPDefines.h" -#import "POPLayerExtras.h" - -// common threshold definitions -static CGFloat const kPOPThresholdColor = 0.01; -static CGFloat const kPOPThresholdPoint = 1.0; -static CGFloat const kPOPThresholdOpacity = 0.01; -static CGFloat const kPOPThresholdScale = 0.005; -static CGFloat const kPOPThresholdRotation = 0.01; -static CGFloat const kPOPThresholdRadius = 0.01; - -#pragma mark - Static - -// CALayer -NSString * const kPOPLayerBackgroundColor = @"backgroundColor"; -NSString * const kPOPLayerBounds = @"bounds"; -NSString * const kPOPLayerCornerRadius = @"cornerRadius"; -NSString * const kPOPLayerBorderWidth = @"borderWidth"; -NSString * const kPOPLayerBorderColor = @"borderColor"; -NSString * const kPOPLayerOpacity = @"opacity"; -NSString * const kPOPLayerPosition = @"position"; -NSString * const kPOPLayerPositionX = @"positionX"; -NSString * const kPOPLayerPositionY = @"positionY"; -NSString * const kPOPLayerRotation = @"rotation"; -NSString * const kPOPLayerRotationX = @"rotationX"; -NSString * const kPOPLayerRotationY = @"rotationY"; -NSString * const kPOPLayerScaleX = @"scaleX"; -NSString * const kPOPLayerScaleXY = @"scaleXY"; -NSString * const kPOPLayerScaleY = @"scaleY"; -NSString * const kPOPLayerSize = @"size"; -NSString * const kPOPLayerSubscaleXY = @"subscaleXY"; -NSString * const kPOPLayerSubtranslationX = @"subtranslationX"; -NSString * const kPOPLayerSubtranslationXY = @"subtranslationXY"; -NSString * const kPOPLayerSubtranslationY = @"subtranslationY"; -NSString * const kPOPLayerSubtranslationZ = @"subtranslationZ"; -NSString * const kPOPLayerTranslationX = @"translationX"; -NSString * const kPOPLayerTranslationXY = @"translationXY"; -NSString * const kPOPLayerTranslationY = @"translationY"; -NSString * const kPOPLayerTranslationZ = @"translationZ"; -NSString * const kPOPLayerZPosition = @"zPosition"; -NSString * const kPOPLayerShadowColor = @"shadowColor"; -NSString * const kPOPLayerShadowOffset = @"shadowOffset"; -NSString * const kPOPLayerShadowOpacity = @"shadowOpacity"; -NSString * const kPOPLayerShadowRadius = @"shadowRadius"; - -// CAShapeLayer -NSString * const kPOPShapeLayerStrokeStart = @"shapeLayer.strokeStart"; -NSString * const kPOPShapeLayerStrokeEnd = @"shapeLayer.strokeEnd"; -NSString * const kPOPShapeLayerStrokeColor = @"shapeLayer.strokeColor"; -NSString * const kPOPShapeLayerFillColor = @"shapeLayer.fillColor"; -NSString * const kPOPShapeLayerLineWidth = @"shapeLayer.lineWidth"; -NSString * const kPOPShapeLayerLineDashPhase = @"shapeLayer.lineDashPhase"; - -// NSLayoutConstraint -NSString * const kPOPLayoutConstraintConstant = @"layoutConstraint.constant"; - -#if TARGET_OS_IPHONE - -// UIView -NSString * const kPOPViewAlpha = @"view.alpha"; -NSString * const kPOPViewBackgroundColor = @"view.backgroundColor"; -NSString * const kPOPViewBounds = kPOPLayerBounds; -NSString * const kPOPViewCenter = @"view.center"; -NSString * const kPOPViewFrame = @"view.frame"; -NSString * const kPOPViewScaleX = @"view.scaleX"; -NSString * const kPOPViewScaleXY = @"view.scaleXY"; -NSString * const kPOPViewScaleY = @"view.scaleY"; -NSString * const kPOPViewSize = kPOPLayerSize; -NSString * const kPOPViewTintColor = @"view.tintColor"; - -// UIScrollView -NSString * const kPOPScrollViewContentOffset = @"scrollView.contentOffset"; -NSString * const kPOPScrollViewContentSize = @"scrollView.contentSize"; -NSString * const kPOPScrollViewZoomScale = @"scrollView.zoomScale"; -NSString * const kPOPScrollViewContentInset = @"scrollView.contentInset"; -NSString * const kPOPScrollViewScrollIndicatorInsets = @"scrollView.scrollIndicatorInsets"; - -// UITableView -NSString * const kPOPTableViewContentOffset = kPOPScrollViewContentOffset; -NSString * const kPOPTableViewContentSize = kPOPScrollViewContentSize; - -// UICollectionView -NSString * const kPOPCollectionViewContentOffset = kPOPScrollViewContentOffset; -NSString * const kPOPCollectionViewContentSize = kPOPScrollViewContentSize; - -// UINavigationBar -NSString * const kPOPNavigationBarBarTintColor = @"navigationBar.barTintColor"; - -// UIToolbar -NSString * const kPOPToolbarBarTintColor = kPOPNavigationBarBarTintColor; - -// UITabBar -NSString * const kPOPTabBarBarTintColor = kPOPNavigationBarBarTintColor; - -// UILabel -NSString * const kPOPLabelTextColor = @"label.textColor"; - -#else - -// NSView -NSString * const kPOPViewFrame = @"view.frame"; -NSString * const kPOPViewBounds = @"view.bounds"; -NSString * const kPOPViewAlphaValue = @"view.alphaValue"; -NSString * const kPOPViewFrameRotation = @"view.frameRotation"; -NSString * const kPOPViewFrameCenterRotation = @"view.frameCenterRotation"; -NSString * const kPOPViewBoundsRotation = @"view.boundsRotation"; - -// NSWindow -NSString * const kPOPWindowFrame = @"window.frame"; -NSString * const kPOPWindowAlphaValue = @"window.alphaValue"; -NSString * const kPOPWindowBackgroundColor = @"window.backgroundColor"; - -#endif - -#if SCENEKIT_SDK_AVAILABLE - -// SceneKit -NSString * const kPOPSCNNodePosition = @"scnode.position"; -NSString * const kPOPSCNNodePositionX = @"scnnode.position.x"; -NSString * const kPOPSCNNodePositionY = @"scnnode.position.y"; -NSString * const kPOPSCNNodePositionZ = @"scnnode.position.z"; -NSString * const kPOPSCNNodeTranslation = @"scnnode.translation"; -NSString * const kPOPSCNNodeTranslationX = @"scnnode.translation.x"; -NSString * const kPOPSCNNodeTranslationY = @"scnnode.translation.y"; -NSString * const kPOPSCNNodeTranslationZ = @"scnnode.translation.z"; -NSString * const kPOPSCNNodeRotation = @"scnnode.rotation"; -NSString * const kPOPSCNNodeRotationX = @"scnnode.rotation.x"; -NSString * const kPOPSCNNodeRotationY = @"scnnode.rotation.y"; -NSString * const kPOPSCNNodeRotationZ = @"scnnode.rotation.z"; -NSString * const kPOPSCNNodeRotationW = @"scnnode.rotation.w"; -NSString * const kPOPSCNNodeEulerAngles = @"scnnode.eulerAngles"; -NSString * const kPOPSCNNodeEulerAnglesX = @"scnnode.eulerAngles.x"; -NSString * const kPOPSCNNodeEulerAnglesY = @"scnnode.eulerAngles.y"; -NSString * const kPOPSCNNodeEulerAnglesZ = @"scnnode.eulerAngles.z"; -NSString * const kPOPSCNNodeOrientation = @"scnnode.orientation"; -NSString * const kPOPSCNNodeOrientationX = @"scnnode.orientation.x"; -NSString * const kPOPSCNNodeOrientationY = @"scnnode.orientation.y"; -NSString * const kPOPSCNNodeOrientationZ = @"scnnode.orientation.z"; -NSString * const kPOPSCNNodeOrientationW = @"scnnode.orientation.w"; -NSString * const kPOPSCNNodeScale = @"scnnode.scale"; -NSString * const kPOPSCNNodeScaleX = @"scnnode.scale.x"; -NSString * const kPOPSCNNodeScaleY = @"scnnode.scale.y"; -NSString * const kPOPSCNNodeScaleZ = @"scnnode.scale.z"; -NSString * const kPOPSCNNodeScaleXY = @"scnnode.scale.xy"; - -#endif - -/** - State structure internal to static animatable property. - */ -typedef struct -{ - NSString *name; - POPAnimatablePropertyReadBlock readBlock; - POPAnimatablePropertyWriteBlock writeBlock; - CGFloat threshold; -} _POPStaticAnimatablePropertyState; -typedef _POPStaticAnimatablePropertyState POPStaticAnimatablePropertyState; - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wglobal-constructors" -static POPStaticAnimatablePropertyState _staticStates[] = -{ - /* CALayer */ - - {kPOPLayerBackgroundColor, - ^(CALayer *obj, CGFloat values[]) { - POPCGColorGetRGBAComponents(obj.backgroundColor, values); - }, - ^(CALayer *obj, const CGFloat values[]) { - CGColorRef color = POPCGColorRGBACreate(values); - [obj setBackgroundColor:color]; - CGColorRelease(color); - }, - kPOPThresholdColor - }, - - {kPOPLayerBounds, - ^(CALayer *obj, CGFloat values[]) { - values_from_rect(values, [obj bounds]); - }, - ^(CALayer *obj, const CGFloat values[]) { - [obj setBounds:values_to_rect(values)]; - }, - kPOPThresholdPoint - }, - - {kPOPLayerCornerRadius, - ^(CALayer *obj, CGFloat values[]) { - values[0] = [obj cornerRadius]; - }, - ^(CALayer *obj, const CGFloat values[]) { - [obj setCornerRadius:values[0]]; - }, - kPOPThresholdRadius - }, - - {kPOPLayerBorderWidth, - ^(CALayer *obj, CGFloat values[]) { - values[0] = [obj borderWidth]; - }, - ^(CALayer *obj, const CGFloat values[]) { - [obj setBorderWidth:values[0]]; - }, - 0.01 - }, - - {kPOPLayerBorderColor, - ^(CALayer *obj, CGFloat values[]) { - POPCGColorGetRGBAComponents(obj.borderColor, values); - }, - ^(CALayer *obj, const CGFloat values[]) { - CGColorRef color = POPCGColorRGBACreate(values); - [obj setBorderColor:color]; - CGColorRelease(color); - }, - kPOPThresholdColor - }, - - {kPOPLayerPosition, - ^(CALayer *obj, CGFloat values[]) { - values_from_point(values, [(CALayer *)obj position]); - }, - ^(CALayer *obj, const CGFloat values[]) { - [obj setPosition:values_to_point(values)]; - }, - kPOPThresholdPoint - }, - - {kPOPLayerPositionX, - ^(CALayer *obj, CGFloat values[]) { - values[0] = [(CALayer *)obj position].x; - }, - ^(CALayer *obj, const CGFloat values[]) { - CGPoint p = [(CALayer *)obj position]; - p.x = values[0]; - [obj setPosition:p]; - }, - kPOPThresholdPoint - }, - - {kPOPLayerPositionY, - ^(CALayer *obj, CGFloat values[]) { - values[0] = [(CALayer *)obj position].y; - }, - ^(CALayer *obj, const CGFloat values[]) { - CGPoint p = [(CALayer *)obj position]; - p.y = values[0]; - [obj setPosition:p]; - }, - kPOPThresholdPoint - }, - - {kPOPLayerOpacity, - ^(CALayer *obj, CGFloat values[]) { - values[0] = [obj opacity]; - }, - ^(CALayer *obj, const CGFloat values[]) { - [obj setOpacity:((float)values[0])]; - }, - kPOPThresholdOpacity - }, - - {kPOPLayerScaleX, - ^(CALayer *obj, CGFloat values[]) { - values[0] = POPLayerGetScaleX(obj); - }, - ^(CALayer *obj, const CGFloat values[]) { - POPLayerSetScaleX(obj, values[0]); - }, - kPOPThresholdScale - }, - - {kPOPLayerScaleY, - ^(CALayer *obj, CGFloat values[]) { - values[0] = POPLayerGetScaleY(obj); - }, - ^(CALayer *obj, const CGFloat values[]) { - POPLayerSetScaleY(obj, values[0]); - }, - kPOPThresholdScale - }, - - {kPOPLayerScaleXY, - ^(CALayer *obj, CGFloat values[]) { - values_from_point(values, POPLayerGetScaleXY(obj)); - }, - ^(CALayer *obj, const CGFloat values[]) { - POPLayerSetScaleXY(obj, values_to_point(values)); - }, - kPOPThresholdScale - }, - - {kPOPLayerSubscaleXY, - ^(CALayer *obj, CGFloat values[]) { - values_from_point(values, POPLayerGetSubScaleXY(obj)); - }, - ^(CALayer *obj, const CGFloat values[]) { - POPLayerSetSubScaleXY(obj, values_to_point(values)); - }, - kPOPThresholdScale - }, - - {kPOPLayerTranslationX, - ^(CALayer *obj, CGFloat values[]) { - values[0] = POPLayerGetTranslationX(obj); - }, - ^(CALayer *obj, const CGFloat values[]) { - POPLayerSetTranslationX(obj, values[0]); - }, - kPOPThresholdPoint - }, - - {kPOPLayerTranslationY, - ^(CALayer *obj, CGFloat values[]) { - values[0] = POPLayerGetTranslationY(obj); - }, - ^(CALayer *obj, const CGFloat values[]) { - POPLayerSetTranslationY(obj, values[0]); - }, - kPOPThresholdPoint - }, - - {kPOPLayerTranslationZ, - ^(CALayer *obj, CGFloat values[]) { - values[0] = POPLayerGetTranslationZ(obj); - }, - ^(CALayer *obj, const CGFloat values[]) { - POPLayerSetTranslationZ(obj, values[0]); - }, - kPOPThresholdPoint - }, - - {kPOPLayerTranslationXY, - ^(CALayer *obj, CGFloat values[]) { - values_from_point(values, POPLayerGetTranslationXY(obj)); - }, - ^(CALayer *obj, const CGFloat values[]) { - POPLayerSetTranslationXY(obj, values_to_point(values)); - }, - kPOPThresholdPoint - }, - - {kPOPLayerSubtranslationX, - ^(CALayer *obj, CGFloat values[]) { - values[0] = POPLayerGetSubTranslationX(obj); - }, - ^(CALayer *obj, const CGFloat values[]) { - POPLayerSetSubTranslationX(obj, values[0]); - }, - kPOPThresholdPoint - }, - - {kPOPLayerSubtranslationY, - ^(CALayer *obj, CGFloat values[]) { - values[0] = POPLayerGetSubTranslationY(obj); - }, - ^(CALayer *obj, const CGFloat values[]) { - POPLayerSetSubTranslationY(obj, values[0]); - }, - kPOPThresholdPoint - }, - - {kPOPLayerSubtranslationZ, - ^(CALayer *obj, CGFloat values[]) { - values[0] = POPLayerGetSubTranslationZ(obj); - }, - ^(CALayer *obj, const CGFloat values[]) { - POPLayerSetSubTranslationZ(obj, values[0]); - }, - kPOPThresholdPoint - }, - - {kPOPLayerSubtranslationXY, - ^(CALayer *obj, CGFloat values[]) { - values_from_point(values, POPLayerGetSubTranslationXY(obj)); - }, - ^(CALayer *obj, const CGFloat values[]) { - POPLayerSetSubTranslationXY(obj, values_to_point(values)); - }, - kPOPThresholdPoint - }, - - {kPOPLayerZPosition, - ^(CALayer *obj, CGFloat values[]) { - values[0] = [obj zPosition]; - }, - ^(CALayer *obj, const CGFloat values[]) { - [obj setZPosition:values[0]]; - }, - kPOPThresholdPoint - }, - - {kPOPLayerSize, - ^(CALayer *obj, CGFloat values[]) { - values_from_size(values, [obj bounds].size); - }, - ^(CALayer *obj, const CGFloat values[]) { - CGSize size = values_to_size(values); - if (size.width < 0. || size.height < 0.) - return; - - CGRect b = [obj bounds]; - b.size = size; - [obj setBounds:b]; - }, - kPOPThresholdPoint - }, - - {kPOPLayerRotation, - ^(CALayer *obj, CGFloat values[]) { - values[0] = POPLayerGetRotation(obj); - }, - ^(CALayer *obj, const CGFloat values[]) { - POPLayerSetRotation(obj, values[0]); - }, - kPOPThresholdRotation - }, - - {kPOPLayerRotationY, - ^(CALayer *obj, CGFloat values[]) { - values[0] = POPLayerGetRotationY(obj); - }, - ^(id obj, const CGFloat values[]) { - POPLayerSetRotationY(obj, values[0]); - }, - kPOPThresholdRotation - }, - - {kPOPLayerRotationX, - ^(CALayer *obj, CGFloat values[]) { - values[0] = POPLayerGetRotationX(obj); - }, - ^(CALayer *obj, const CGFloat values[]) { - POPLayerSetRotationX(obj, values[0]); - }, - kPOPThresholdRotation - }, - - {kPOPLayerShadowColor, - ^(CALayer *obj, CGFloat values[]) { - POPCGColorGetRGBAComponents(obj.shadowColor, values); - }, - ^(CALayer *obj, const CGFloat values[]) { - CGColorRef color = POPCGColorRGBACreate(values); - [obj setShadowColor:color]; - CGColorRelease(color); - }, - 0.01 - }, - - {kPOPLayerShadowOffset, - ^(CALayer *obj, CGFloat values[]) { - values_from_size(values, [obj shadowOffset]); - }, - ^(CALayer *obj, const CGFloat values[]) { - CGSize size = values_to_size(values); - [obj setShadowOffset:size]; - }, - 0.01 - }, - - {kPOPLayerShadowOpacity, - ^(CALayer *obj, CGFloat values[]) { - values[0] = [obj shadowOpacity]; - }, - ^(CALayer *obj, const CGFloat values[]) { - [obj setShadowOpacity:values[0]]; - }, - kPOPThresholdOpacity - }, - - {kPOPLayerShadowRadius, - ^(CALayer *obj, CGFloat values[]) { - values[0] = [obj shadowRadius]; - }, - ^(CALayer *obj, const CGFloat values[]) { - [obj setShadowRadius:values[0]]; - }, - kPOPThresholdRadius - }, - - /* CAShapeLayer */ - - {kPOPShapeLayerStrokeStart, - ^(CAShapeLayer *obj, CGFloat values[]) { - values[0] = obj.strokeStart; - }, - ^(CAShapeLayer *obj, const CGFloat values[]) { - obj.strokeStart = values[0]; - }, - 0.01 - }, - - {kPOPShapeLayerStrokeEnd, - ^(CAShapeLayer *obj, CGFloat values[]) { - values[0] = obj.strokeEnd; - }, - ^(CAShapeLayer *obj, const CGFloat values[]) { - obj.strokeEnd = values[0]; - }, - 0.01 - }, - - {kPOPShapeLayerStrokeColor, - ^(CAShapeLayer *obj, CGFloat values[]) { - POPCGColorGetRGBAComponents(obj.strokeColor, values); - }, - ^(CAShapeLayer *obj, const CGFloat values[]) { - CGColorRef color = POPCGColorRGBACreate(values); - [obj setStrokeColor:color]; - CGColorRelease(color); - }, - kPOPThresholdColor - }, - - {kPOPShapeLayerFillColor, - ^(CAShapeLayer *obj, CGFloat values[]) { - POPCGColorGetRGBAComponents(obj.fillColor, values); - }, - ^(CAShapeLayer *obj, const CGFloat values[]) { - CGColorRef color = POPCGColorRGBACreate(values); - [obj setFillColor:color]; - CGColorRelease(color); - }, - kPOPThresholdColor - }, - - {kPOPShapeLayerLineWidth, - ^(CAShapeLayer *obj, CGFloat values[]) { - values[0] = obj.lineWidth; - }, - ^(CAShapeLayer *obj, const CGFloat values[]) { - obj.lineWidth = values[0]; - }, - 0.01 - }, - - {kPOPShapeLayerLineDashPhase, - ^(CAShapeLayer *obj, CGFloat values[]) { - values[0] = obj.lineDashPhase; - }, - ^(CAShapeLayer *obj, const CGFloat values[]) { - obj.lineDashPhase = values[0]; - }, - 0.01 - }, - - {kPOPLayoutConstraintConstant, - ^(NSLayoutConstraint *obj, CGFloat values[]) { - values[0] = obj.constant; - }, - ^(NSLayoutConstraint *obj, const CGFloat values[]) { - obj.constant = values[0]; - }, - 0.01 - }, - -#if TARGET_OS_IPHONE - - /* UIView */ - - {kPOPViewAlpha, - ^(UIView *obj, CGFloat values[]) { - values[0] = obj.alpha; - }, - ^(UIView *obj, const CGFloat values[]) { - obj.alpha = values[0]; - }, - kPOPThresholdOpacity - }, - - {kPOPViewBackgroundColor, - ^(UIView *obj, CGFloat values[]) { - POPUIColorGetRGBAComponents(obj.backgroundColor, values); - }, - ^(UIView *obj, const CGFloat values[]) { - obj.backgroundColor = POPUIColorRGBACreate(values); - }, - kPOPThresholdColor - }, - - {kPOPViewCenter, - ^(UIView *obj, CGFloat values[]) { - values_from_point(values, obj.center); - }, - ^(UIView *obj, const CGFloat values[]) { - obj.center = values_to_point(values); - }, - kPOPThresholdPoint - }, - - {kPOPViewFrame, - ^(UIView *obj, CGFloat values[]) { - values_from_rect(values, obj.frame); - }, - ^(UIView *obj, const CGFloat values[]) { - obj.frame = values_to_rect(values); - }, - kPOPThresholdPoint - }, - - {kPOPViewScaleX, - ^(UIView *obj, CGFloat values[]) { - values[0] = POPLayerGetScaleX(obj.layer); - }, - ^(UIView *obj, const CGFloat values[]) { - POPLayerSetScaleX(obj.layer, values[0]); - }, - kPOPThresholdScale - }, - - {kPOPViewScaleY, - ^(UIView *obj, CGFloat values[]) { - values[0] = POPLayerGetScaleY(obj.layer); - }, - ^(UIView *obj, const CGFloat values[]) { - POPLayerSetScaleY(obj.layer, values[0]); - }, - kPOPThresholdScale - }, - - {kPOPViewScaleXY, - ^(UIView *obj, CGFloat values[]) { - values_from_point(values, POPLayerGetScaleXY(obj.layer)); - }, - ^(UIView *obj, const CGFloat values[]) { - POPLayerSetScaleXY(obj.layer, values_to_point(values)); - }, - kPOPThresholdScale - }, - - {kPOPViewTintColor, - ^(UIView *obj, CGFloat values[]) { - POPUIColorGetRGBAComponents(obj.tintColor, values); - }, - ^(UIView *obj, const CGFloat values[]) { - obj.tintColor = POPUIColorRGBACreate(values); - }, - kPOPThresholdColor - }, - - /* UIScrollView */ - - {kPOPScrollViewContentOffset, - ^(UIScrollView *obj, CGFloat values[]) { - values_from_point(values, obj.contentOffset); - }, - ^(UIScrollView *obj, const CGFloat values[]) { - [obj setContentOffset:values_to_point(values) animated:NO]; - }, - kPOPThresholdPoint - }, - - {kPOPScrollViewContentSize, - ^(UIScrollView *obj, CGFloat values[]) { - values_from_size(values, obj.contentSize); - }, - ^(UIScrollView *obj, const CGFloat values[]) { - obj.contentSize = values_to_size(values); - }, - kPOPThresholdPoint - }, - - {kPOPScrollViewZoomScale, - ^(UIScrollView *obj, CGFloat values[]) { - values[0]=obj.zoomScale; - }, - ^(UIScrollView *obj, const CGFloat values[]) { - obj.zoomScale=values[0]; - }, - kPOPThresholdScale - }, - - {kPOPScrollViewContentInset, - ^(UIScrollView *obj, CGFloat values[]) { - values[0] = obj.contentInset.top; - values[1] = obj.contentInset.left; - values[2] = obj.contentInset.bottom; - values[3] = obj.contentInset.right; - }, - ^(UIScrollView *obj, const CGFloat values[]) { - obj.contentInset = values_to_edge_insets(values); - }, - kPOPThresholdPoint - }, - - {kPOPScrollViewScrollIndicatorInsets, - ^(UIScrollView *obj, CGFloat values[]) { - values[0] = obj.scrollIndicatorInsets.top; - values[1] = obj.scrollIndicatorInsets.left; - values[2] = obj.scrollIndicatorInsets.bottom; - values[3] = obj.scrollIndicatorInsets.right; - }, - ^(UIScrollView *obj, const CGFloat values[]) { - obj.scrollIndicatorInsets = values_to_edge_insets(values); - }, - kPOPThresholdPoint - }, - - /* UINavigationBar */ - - {kPOPNavigationBarBarTintColor, - ^(UINavigationBar *obj, CGFloat values[]) { - POPUIColorGetRGBAComponents(obj.barTintColor, values); - }, - ^(UINavigationBar *obj, const CGFloat values[]) { - obj.barTintColor = POPUIColorRGBACreate(values); - }, - kPOPThresholdColor - }, - - /* UILabel */ - - {kPOPLabelTextColor, - ^(UILabel *obj, CGFloat values[]) { - POPUIColorGetRGBAComponents(obj.textColor, values); - }, - ^(UILabel *obj, const CGFloat values[]) { - obj.textColor = POPUIColorRGBACreate(values); - }, - kPOPThresholdColor - }, - -#else - - /* NSView */ - - {kPOPViewFrame, - ^(NSView *obj, CGFloat values[]) { - values_from_rect(values, NSRectToCGRect(obj.frame)); - }, - ^(NSView *obj, const CGFloat values[]) { - obj.frame = NSRectFromCGRect(values_to_rect(values)); - }, - kPOPThresholdPoint - }, - - {kPOPViewBounds, - ^(NSView *obj, CGFloat values[]) { - values_from_rect(values, NSRectToCGRect(obj.frame)); - }, - ^(NSView *obj, const CGFloat values[]) { - obj.bounds = NSRectFromCGRect(values_to_rect(values)); - }, - kPOPThresholdPoint - }, - - {kPOPViewAlphaValue, - ^(NSView *obj, CGFloat values[]) { - values[0] = obj.alphaValue; - }, - ^(NSView *obj, const CGFloat values[]) { - obj.alphaValue = values[0]; - }, - kPOPThresholdOpacity - }, - - {kPOPViewFrameRotation, - ^(NSView *obj, CGFloat values[]) { - values[0] = obj.frameRotation; - }, - ^(NSView *obj, const CGFloat values[]) { - obj.frameRotation = values[0]; - }, - kPOPThresholdRotation - }, - - {kPOPViewFrameCenterRotation, - ^(NSView *obj, CGFloat values[]) { - values[0] = obj.frameCenterRotation; - }, - ^(NSView *obj, const CGFloat values[]) { - obj.frameCenterRotation = values[0]; - }, - kPOPThresholdRotation - }, - - {kPOPViewBoundsRotation, - ^(NSView *obj, CGFloat values[]) { - values[0] = obj.boundsRotation; - }, - ^(NSView *obj, const CGFloat values[]) { - obj.boundsRotation = values[0]; - }, - kPOPThresholdRotation - }, - - /* NSWindow */ - - {kPOPWindowFrame, - ^(NSWindow *obj, CGFloat values[]) { - values_from_rect(values, NSRectToCGRect(obj.frame)); - }, - ^(NSWindow *obj, const CGFloat values[]) { - [obj setFrame:NSRectFromCGRect(values_to_rect(values)) display:YES]; - }, - kPOPThresholdPoint - }, - - {kPOPWindowAlphaValue, - ^(NSWindow *obj, CGFloat values[]) { - values[0] = obj.alphaValue; - }, - ^(NSWindow *obj, const CGFloat values[]) { - obj.alphaValue = values[0]; - }, - kPOPThresholdOpacity - }, - - {kPOPWindowBackgroundColor, - ^(NSWindow *obj, CGFloat values[]) { - POPNSColorGetRGBAComponents(obj.backgroundColor, values); - }, - ^(NSWindow *obj, const CGFloat values[]) { - obj.backgroundColor = POPNSColorRGBACreate(values); - }, - kPOPThresholdColor - }, - -#endif - -#if SCENEKIT_SDK_AVAILABLE - - /* SceneKit */ - - {kPOPSCNNodePosition, - ^(SCNNode *obj, CGFloat values[]) { - values_from_vec3(values, obj.position); - }, - ^(SCNNode *obj, const CGFloat values[]) { - obj.position = values_to_vec3(values); - }, - kPOPThresholdScale - }, - - {kPOPSCNNodePositionX, - ^(SCNNode *obj, CGFloat values[]) { - values[0] = obj.position.x; - }, - ^(SCNNode *obj, const CGFloat values[]) { - obj.position = SCNVector3Make(values[0], obj.position.y, obj.position.z); - }, - kPOPThresholdScale - }, - - {kPOPSCNNodePositionY, - ^(SCNNode *obj, CGFloat values[]) { - values[0] = obj.position.y; - }, - ^(SCNNode *obj, const CGFloat values[]) { - obj.position = SCNVector3Make(obj.position.x, values[0], obj.position.z); - }, - kPOPThresholdScale - }, - - {kPOPSCNNodePositionZ, - ^(SCNNode *obj, CGFloat values[]) { - values[0] = obj.position.z; - }, - ^(SCNNode *obj, const CGFloat values[]) { - obj.position = SCNVector3Make(obj.position.x, obj.position.y, values[0]); - }, - kPOPThresholdScale - }, - - {kPOPSCNNodeTranslation, - ^(SCNNode *obj, CGFloat values[]) { - values[0] = obj.transform.m41; - values[1] = obj.transform.m42; - values[2] = obj.transform.m43; - }, - ^(SCNNode *obj, const CGFloat values[]) { - obj.transform = SCNMatrix4MakeTranslation(values[0], values[1], values[2]); - }, - kPOPThresholdScale - }, - - {kPOPSCNNodeTranslationX, - ^(SCNNode *obj, CGFloat values[]) { - values[0] = obj.transform.m41; - }, - ^(SCNNode *obj, const CGFloat values[]) { - obj.transform = SCNMatrix4MakeTranslation(values[0], obj.transform.m42, obj.transform.m43); - }, - kPOPThresholdScale - }, - - {kPOPSCNNodeTranslationY, - ^(SCNNode *obj, CGFloat values[]) { - values[0] = obj.transform.m42; - }, - ^(SCNNode *obj, const CGFloat values[]) { - obj.transform = SCNMatrix4MakeTranslation(obj.transform.m41, values[0], obj.transform.m43); - }, - kPOPThresholdScale - }, - - {kPOPSCNNodeTranslationY, - ^(SCNNode *obj, CGFloat values[]) { - values[0] = obj.transform.m43; - }, - ^(SCNNode *obj, const CGFloat values[]) { - obj.transform = SCNMatrix4MakeTranslation(obj.transform.m41, obj.transform.m42, values[0]); - }, - kPOPThresholdScale - }, - - {kPOPSCNNodeRotation, - ^(SCNNode *obj, CGFloat values[]) { - values_from_vec4(values, obj.rotation); - }, - ^(SCNNode *obj, const CGFloat values[]) { - obj.rotation = values_to_vec4(values); - }, - kPOPThresholdScale - }, - - {kPOPSCNNodeRotationX, - ^(SCNNode *obj, CGFloat values[]) { - values[0] = obj.rotation.x; - }, - ^(SCNNode *obj, const CGFloat values[]) { - obj.rotation = SCNVector4Make(1.0, obj.rotation.y, obj.rotation.z, values[0]); - }, - kPOPThresholdScale - }, - - {kPOPSCNNodeRotationY, - ^(SCNNode *obj, CGFloat values[]) { - values[0] = obj.rotation.y; - }, - ^(SCNNode *obj, const CGFloat values[]) { - obj.rotation = SCNVector4Make(obj.rotation.x, 1.0, obj.rotation.z, values[0]); - }, - kPOPThresholdScale - }, - - {kPOPSCNNodeRotationZ, - ^(SCNNode *obj, CGFloat values[]) { - values[0] = obj.rotation.z; - }, - ^(SCNNode *obj, const CGFloat values[]) { - obj.rotation = SCNVector4Make(obj.rotation.x, obj.rotation.y, 1.0, values[0]); - }, - kPOPThresholdScale - }, - - {kPOPSCNNodeRotationW, - ^(SCNNode *obj, CGFloat values[]) { - values[0] = obj.rotation.w; - }, - ^(SCNNode *obj, const CGFloat values[]) { - obj.rotation = SCNVector4Make(obj.rotation.x, obj.rotation.y, obj.rotation.z, values[0]); - }, - kPOPThresholdScale - }, - - {kPOPSCNNodeEulerAngles, - ^(SCNNode *obj, CGFloat values[]) { - values_from_vec3(values, obj.eulerAngles); - }, - ^(SCNNode *obj, const CGFloat values[]) { - obj.eulerAngles = values_to_vec3(values); - }, - kPOPThresholdScale - }, - - {kPOPSCNNodeEulerAnglesX, - ^(SCNNode *obj, CGFloat values[]) { - values[0] = obj.eulerAngles.x; - }, - ^(SCNNode *obj, const CGFloat values[]) { - obj.eulerAngles = SCNVector3Make(values[0], obj.eulerAngles.y, obj.eulerAngles.z); - }, - kPOPThresholdScale - }, - - {kPOPSCNNodeEulerAnglesY, - ^(SCNNode *obj, CGFloat values[]) { - values[0] = obj.eulerAngles.y; - }, - ^(SCNNode *obj, const CGFloat values[]) { - obj.eulerAngles = SCNVector3Make(obj.eulerAngles.x, values[0], obj.eulerAngles.z); - }, - kPOPThresholdScale - }, - - {kPOPSCNNodeEulerAnglesZ, - ^(SCNNode *obj, CGFloat values[]) { - values[0] = obj.eulerAngles.z; - }, - ^(SCNNode *obj, const CGFloat values[]) { - obj.eulerAngles = SCNVector3Make(obj.eulerAngles.x, obj.eulerAngles.y, values[0]); - }, - kPOPThresholdScale - }, - - {kPOPSCNNodeOrientation, - ^(SCNNode *obj, CGFloat values[]) { - values_from_vec4(values, obj.orientation); - }, - ^(SCNNode *obj, const CGFloat values[]) { - obj.orientation = values_to_vec4(values); - }, - kPOPThresholdScale - }, - - {kPOPSCNNodeOrientationX, - ^(SCNNode *obj, CGFloat values[]) { - values[0] = obj.orientation.x; - }, - ^(SCNNode *obj, const CGFloat values[]) { - obj.orientation = SCNVector4Make(values[0], obj.orientation.y, obj.orientation.z, obj.orientation.w); - }, - kPOPThresholdScale - }, - - {kPOPSCNNodeOrientationY, - ^(SCNNode *obj, CGFloat values[]) { - values[0] = obj.orientation.y; - }, - ^(SCNNode *obj, const CGFloat values[]) { - obj.orientation = SCNVector4Make(obj.orientation.x, values[0], obj.orientation.z, obj.orientation.w); - }, - kPOPThresholdScale - }, - - {kPOPSCNNodeOrientationZ, - ^(SCNNode *obj, CGFloat values[]) { - values[0] = obj.orientation.z; - }, - ^(SCNNode *obj, const CGFloat values[]) { - obj.orientation = SCNVector4Make(obj.orientation.x, obj.orientation.y, values[0], obj.orientation.w); - }, - kPOPThresholdScale - }, - - {kPOPSCNNodeOrientationW, - ^(SCNNode *obj, CGFloat values[]) { - values[0] = obj.orientation.w; - }, - ^(SCNNode *obj, const CGFloat values[]) { - obj.orientation = SCNVector4Make(obj.orientation.x, obj.orientation.y, obj.orientation.z, values[0]); - }, - kPOPThresholdScale - }, - - {kPOPSCNNodeScale, - ^(SCNNode *obj, CGFloat values[]) { - values_from_vec3(values, obj.scale); - }, - ^(SCNNode *obj, const CGFloat values[]) { - obj.scale = values_to_vec3(values); - }, - kPOPThresholdScale - }, - - {kPOPSCNNodeScaleX, - ^(SCNNode *obj, CGFloat values[]) { - values[0] = obj.scale.x; - }, - ^(SCNNode *obj, const CGFloat values[]) { - obj.scale = SCNVector3Make(values[0], obj.scale.y, obj.scale.z); - }, - kPOPThresholdScale - }, - - {kPOPSCNNodeScaleY, - ^(SCNNode *obj, CGFloat values[]) { - values[0] = obj.scale.y; - }, - ^(SCNNode *obj, const CGFloat values[]) { - obj.position = SCNVector3Make(obj.scale.x, values[0], obj.scale.z); - }, - kPOPThresholdScale - }, - - {kPOPSCNNodeScaleZ, - ^(SCNNode *obj, CGFloat values[]) { - values[0] = obj.scale.z; - }, - ^(SCNNode *obj, const CGFloat values[]) { - obj.scale = SCNVector3Make(obj.scale.x, obj.scale.y, values[0]); - }, - kPOPThresholdScale - }, - - {kPOPSCNNodeScaleXY, - ^(SCNNode *obj, CGFloat values[]) { - values[0] = obj.scale.x; - values[1] = obj.scale.y; - }, - ^(SCNNode *obj, const CGFloat values[]) { - obj.scale = SCNVector3Make(values[0], values[1], obj.scale.z); - }, - kPOPThresholdScale - }, - -#endif - -}; -#pragma clang diagnostic pop - -static NSUInteger staticIndexWithName(NSString *aName) -{ - NSUInteger idx = 0; - - while (idx < POP_ARRAY_COUNT(_staticStates)) { - if ([_staticStates[idx].name isEqualToString:aName]) - return idx; - idx++; - } - - return NSNotFound; -} - -/** - Concrete static property class. - */ -@interface POPStaticAnimatableProperty : POPAnimatableProperty -{ -@public - POPStaticAnimatablePropertyState *_state; -} -@end - -@implementation POPStaticAnimatableProperty - -- (NSString *)name -{ - return _state->name; -} - -- (POPAnimatablePropertyReadBlock)readBlock -{ - return _state->readBlock; -} - -- (POPAnimatablePropertyWriteBlock)writeBlock -{ - return _state->writeBlock; -} - -- (CGFloat)threshold -{ - return _state->threshold; -} - -@end - -#pragma mark - Concrete - -/** - Concrete immutable property class. - */ -@interface POPConcreteAnimatableProperty : POPAnimatableProperty -- (instancetype)initWithName:(NSString *)name readBlock:(POPAnimatablePropertyReadBlock)read writeBlock:(POPAnimatablePropertyWriteBlock)write threshold:(CGFloat)threshold; -@end - -@implementation POPConcreteAnimatableProperty - -// default synthesis -@synthesize name, readBlock, writeBlock, threshold; - -- (instancetype)initWithName:(NSString *)aName readBlock:(POPAnimatablePropertyReadBlock)aReadBlock writeBlock:(POPAnimatablePropertyWriteBlock)aWriteBlock threshold:(CGFloat)aThreshold -{ - self = [super init]; - if (nil != self) { - name = [aName copy]; - readBlock = [aReadBlock copy]; - writeBlock = [aWriteBlock copy]; - threshold = aThreshold; - } - return self; -} -@end - -#pragma mark - Mutable - -@implementation POPMutableAnimatableProperty - -// default synthesis -@synthesize name, readBlock, writeBlock, threshold; - -@end - -#pragma mark - Cluster - -/** - Singleton placeholder property class to support class cluster. - */ -@interface POPPlaceholderAnimatableProperty : POPAnimatableProperty - -@end - -@implementation POPPlaceholderAnimatableProperty - -// default synthesis -@synthesize name, readBlock, writeBlock, threshold; - -@end - -/** - Cluster class. - */ -@implementation POPAnimatableProperty - -// avoid creating backing ivars -@dynamic name, readBlock, writeBlock, threshold; - -static POPAnimatableProperty *placeholder = nil; - -+ (void)initialize -{ - if (self == [POPAnimatableProperty class]) { - placeholder = [POPPlaceholderAnimatableProperty alloc]; - } -} - -+ (id)allocWithZone:(struct _NSZone *)zone -{ - if (self == [POPAnimatableProperty class]) { - if (nil == placeholder) { - placeholder = [super allocWithZone:zone]; - } - return placeholder; - } - return [super allocWithZone:zone]; -} - -- (id)copyWithZone:(NSZone *)zone -{ - if ([self isKindOfClass:[POPMutableAnimatableProperty class]]) { - POPConcreteAnimatableProperty *copyProperty = [[POPConcreteAnimatableProperty alloc] initWithName:self.name readBlock:self.readBlock writeBlock:self.writeBlock threshold:self.threshold]; - return copyProperty; - } else { - return self; - } -} - -- (id)mutableCopyWithZone:(NSZone *)zone -{ - POPMutableAnimatableProperty *copyProperty = [[POPMutableAnimatableProperty alloc] init]; - copyProperty.name = self.name; - copyProperty.readBlock = self.readBlock; - copyProperty.writeBlock = self.writeBlock; - copyProperty.threshold = self.threshold; - return copyProperty; -} - -+ (id)propertyWithName:(NSString *)aName -{ - return [self propertyWithName:aName initializer:NULL]; -} - -+ (id)propertyWithName:(NSString *)aName initializer:(void (^)(POPMutableAnimatableProperty *prop))aBlock -{ - POPAnimatableProperty *prop = nil; - - static NSMutableDictionary *_propertyDict = nil; - if (nil == _propertyDict) { - _propertyDict = [[NSMutableDictionary alloc] initWithCapacity:10]; - } - - prop = _propertyDict[aName]; - if (nil != prop) { - return prop; - } - - NSUInteger staticIdx = staticIndexWithName(aName); - - if (NSNotFound != staticIdx) { - POPStaticAnimatableProperty *staticProp = [[POPStaticAnimatableProperty alloc] init]; - staticProp->_state = &_staticStates[staticIdx]; - _propertyDict[aName] = staticProp; - prop = staticProp; - } else if (NULL != aBlock) { - POPMutableAnimatableProperty *mutableProp = [[POPMutableAnimatableProperty alloc] init]; - mutableProp.name = aName; - mutableProp.threshold = 1.0; - aBlock(mutableProp); - prop = [mutableProp copy]; - } - - return prop; -} - -- (NSString *)description -{ - NSMutableString *s = [NSMutableString stringWithFormat:@"%@ name:%@ threshold:%f", super.description, self.name, self.threshold]; - return s; -} - -@end diff --git a/Example/Pods/pop/pop/POPAnimatablePropertyTypes.h b/Example/Pods/pop/pop/POPAnimatablePropertyTypes.h deleted file mode 100644 index 27f6379d..00000000 --- a/Example/Pods/pop/pop/POPAnimatablePropertyTypes.h +++ /dev/null @@ -1,11 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -typedef void (^POPAnimatablePropertyReadBlock)(id obj, CGFloat values[]); -typedef void (^POPAnimatablePropertyWriteBlock)(id obj, const CGFloat values[]); diff --git a/Example/Pods/pop/pop/POPAnimation.h b/Example/Pods/pop/pop/POPAnimation.h deleted file mode 100644 index 7f568cf1..00000000 --- a/Example/Pods/pop/pop/POPAnimation.h +++ /dev/null @@ -1,188 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -#import -#import - -@class CAMediaTimingFunction; - -/** - @abstract The abstract animation base class. - @discussion Instantiate and use one of the concrete animation subclasses. - */ -@interface POPAnimation : NSObject - -/** - @abstract The name of the animation. - @discussion Optional property to help identify the animation. - */ -@property (copy, nonatomic) NSString *name; - -/** - @abstract The beginTime of the animation in media time. - @discussion Defaults to 0 and starts immediately. - */ -@property (assign, nonatomic) CFTimeInterval beginTime; - -/** - @abstract The animation delegate. - @discussion See {@ref POPAnimationDelegate} for details. - */ -@property (weak, nonatomic) id delegate; - -/** - @abstract The animation tracer. - @discussion Returns the existing tracer, creating one if needed. Call start/stop on the tracer to toggle event collection. - */ -@property (readonly, nonatomic) POPAnimationTracer *tracer; - -/** - @abstract Optional block called on animation start. - */ -@property (copy, nonatomic) void (^animationDidStartBlock)(POPAnimation *anim); - -/** - @abstract Optional block called when value meets or exceeds to value. - */ -@property (copy, nonatomic) void (^animationDidReachToValueBlock)(POPAnimation *anim); - -/** - @abstract Optional block called on animation completion. - */ -@property (copy, nonatomic) void (^completionBlock)(POPAnimation *anim, BOOL finished); - -/** - @abstract Optional block called each frame animation is applied. - */ -@property (copy, nonatomic) void (^animationDidApplyBlock)(POPAnimation *anim); - -/** - @abstract Flag indicating whether animation should be removed on completion. - @discussion Setting to NO can facilitate animation reuse. Defaults to YES. - */ -@property (assign, nonatomic) BOOL removedOnCompletion; - -/** - @abstract Flag indicating whether animation is paused. - @discussion A paused animation is excluded from the list of active animations. On initial creation, defaults to YES. On animation addition, the animation is implicity unpaused. On animation completion, the animation is implicity paused including for animations with removedOnCompletion set to NO. - */ -@property (assign, nonatomic, getter = isPaused) BOOL paused; - -/** - @abstract Flag indicating whether animation autoreverses. - @discussion An animation that autoreverses will have twice the duration before it is considered finished. It will animate to the toValue, stop, then animate back to the original fromValue. The delegate methods are called as follows: - - 1) animationDidStart: is called at the beginning, as usual, and then after each toValue is reached and the autoreverse is going to start. - 2) animationDidReachToValue: is called every time the toValue is reached. The toValue is swapped with the fromValue at the end of each animation segment. This means that with autoreverses set to YES, the animationDidReachToValue: delegate method will be called a minimum of twice. - 3) animationDidStop:finished: is called every time the toValue is reached, the finished argument will be NO if the autoreverse is not yet complete. - */ -@property (assign, nonatomic) BOOL autoreverses; - -/** - @abstract The number of times to repeat the animation. - @discussion A repeatCount of 0 or 1 means that the animation will not repeat, just like Core Animation. A repeatCount of 2 or greater means that the animation will run that many times before stopping. The delegate methods are called as follows: - - 1) animationDidStart: is called at the beginning of each animation repeat. - 2) animationDidReachToValue: is called every time the toValue is reached. - 3) animationDidStop:finished: is called every time the toValue is reached, the finished argument will be NO if the autoreverse is not yet complete. - -When combined with the autoreverses property, a singular animation is effectively twice as long. - */ -@property (assign, nonatomic) NSInteger repeatCount; - -/** - @abstract Repeat the animation forever. - @discussion This property will make the animation repeat forever. The value of the repeatCount property is undefined when this property is set. The finished parameter of the delegate callback animationDidStop:finished: will always be NO. - */ -@property (assign, nonatomic) BOOL repeatForever; - -@end - -/** - @abstract The animation delegate. - */ -@protocol POPAnimationDelegate -@optional - -/** - @abstract Called on animation start. - @param anim The relevant animation. - */ -- (void)pop_animationDidStart:(POPAnimation *)anim; - -/** - @abstract Called when value meets or exceeds to value. - @param anim The relevant animation. - */ -- (void)pop_animationDidReachToValue:(POPAnimation *)anim; - -/** - @abstract Called on animation stop. - @param anim The relevant animation. - @param finished Flag indicating finished state. Flag is true if the animation reached completion before being removed. - */ -- (void)pop_animationDidStop:(POPAnimation *)anim finished:(BOOL)finished; - -/** - @abstract Called each frame animation is applied. - @param anim The relevant animation. - */ -- (void)pop_animationDidApply:(POPAnimation *)anim; - -@end - - -@interface NSObject (POP) - -/** - @abstract Add an animation to the reciver. - @param anim The animation to add. - @param key The key used to identify the animation. - @discussion The 'key' may be any string such that only one animation per unique key is added per object. - */ -- (void)pop_addAnimation:(POPAnimation *)anim forKey:(NSString *)key; - -/** - @abstract Remove all animations attached to the receiver. - */ -- (void)pop_removeAllAnimations; - -/** - @abstract Remove any animation attached to the receiver for 'key'. - @param key The key used to identify the animation. - */ -- (void)pop_removeAnimationForKey:(NSString *)key; - -/** - @abstract Returns an array containing the keys of all animations currently attached to the receiver. - The order of keys reflects the order in which animations will be applied. - */ -- (NSArray *)pop_animationKeys; - -/** - @abstract Returns any animation attached to the receiver. - @param key The key used to identify the animation. - @returns The animation currently attached, or nil if no such animation exists. - */ -- (id)pop_animationForKey:(NSString *)key; - -@end - -/** - * This implementation of NSCopying does not do any copying of animation's state, but only configuration. - * i.e. you cannot copy an animation and expect to apply it to a view and have the copied animation pick up where the original left off. - * Two common uses of copying animations: - * * you need to apply the same animation to multiple different views. - * * you need to absolutely ensure that the the caller of your function cannot mutate the animation once it's been passed in. - */ -@interface POPAnimation (NSCopying) - -@end diff --git a/Example/Pods/pop/pop/POPAnimation.mm b/Example/Pods/pop/pop/POPAnimation.mm deleted file mode 100644 index 75bdeb12..00000000 --- a/Example/Pods/pop/pop/POPAnimation.mm +++ /dev/null @@ -1,303 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -#import "POPAnimationExtras.h" -#import "POPAnimationInternal.h" - -#import - -#import "POPAction.h" -#import "POPAnimationRuntime.h" -#import "POPAnimationTracerInternal.h" -#import "POPAnimatorPrivate.h" - -using namespace POP; - -#pragma mark - POPAnimation - -@implementation POPAnimation -@synthesize solver = _solver; -@synthesize currentValue = _currentValue; -@synthesize progressMarkers = _progressMarkers; - -#pragma mark - Lifecycle - -- (id)init -{ - [NSException raise:NSStringFromClass([self class]) format:@"Attempting to instantiate an abstract class. Use a concrete subclass instead."]; - return nil; -} - -- (id)_init -{ - self = [super init]; - if (nil != self) { - [self _initState]; - } - return self; -} - -- (void)_initState -{ - _state = new POPAnimationState(self); -} - -- (void)dealloc -{ - if (_state) { - delete _state; - _state = NULL; - }; -} - -#pragma mark - Properties - -- (id)delegate -{ - return _state->delegate; -} - -- (void)setDelegate:(id)delegate -{ - _state->setDelegate(delegate); -} - -- (BOOL)isPaused -{ - return _state->paused; -} - -- (void)setPaused:(BOOL)paused -{ - _state->setPaused(paused ? true : false); -} - -- (NSInteger)repeatCount -{ - if (_state->autoreverses) { - return _state->repeatCount / 2; - } else { - return _state->repeatCount; - } -} - -- (void)setRepeatCount:(NSInteger)repeatCount -{ - if (repeatCount > 0) { - if (repeatCount > NSIntegerMax / 2) { - repeatCount = NSIntegerMax / 2; - } - - if (_state->autoreverses) { - _state->repeatCount = (repeatCount * 2); - } else { - _state->repeatCount = repeatCount; - } - } -} - -- (BOOL)autoreverses -{ - return _state->autoreverses; -} - -- (void)setAutoreverses:(BOOL)autoreverses -{ - _state->autoreverses = autoreverses; - if (autoreverses) { - if (_state->repeatCount == 0) { - [self setRepeatCount:1]; - } - } -} - -FB_PROPERTY_GET(POPAnimationState, type, POPAnimationType); -DEFINE_RW_PROPERTY_OBJ_COPY(POPAnimationState, animationDidStartBlock, setAnimationDidStartBlock:, POPAnimationDidStartBlock); -DEFINE_RW_PROPERTY_OBJ_COPY(POPAnimationState, animationDidReachToValueBlock, setAnimationDidReachToValueBlock:, POPAnimationDidReachToValueBlock); -DEFINE_RW_PROPERTY_OBJ_COPY(POPAnimationState, completionBlock, setCompletionBlock:, POPAnimationCompletionBlock); -DEFINE_RW_PROPERTY_OBJ_COPY(POPAnimationState, animationDidApplyBlock, setAnimationDidApplyBlock:, POPAnimationDidApplyBlock); -DEFINE_RW_PROPERTY_OBJ_COPY(POPAnimationState, name, setName:, NSString*); -DEFINE_RW_PROPERTY(POPAnimationState, beginTime, setBeginTime:, CFTimeInterval); -DEFINE_RW_FLAG(POPAnimationState, removedOnCompletion, removedOnCompletion, setRemovedOnCompletion:); -DEFINE_RW_FLAG(POPAnimationState, repeatForever, repeatForever, setRepeatForever:); - -- (id)valueForUndefinedKey:(NSString *)key -{ - return _state->dict[key]; -} - -- (void)setValue:(id)value forUndefinedKey:(NSString *)key -{ - if (!value) { - [_state->dict removeObjectForKey:key]; - } else { - if (!_state->dict) - _state->dict = [[NSMutableDictionary alloc] init]; - _state->dict[key] = value; - } -} - -- (POPAnimationTracer *)tracer -{ - if (!_state->tracer) { - _state->tracer = [[POPAnimationTracer alloc] initWithAnimation:self]; - } - return _state->tracer; -} - -- (NSString *)description -{ - NSMutableString *s = [NSMutableString stringWithFormat:@"<%@:%p", NSStringFromClass([self class]), self]; - [self _appendDescription:s debug:NO]; - [s appendString:@">"]; - return s; -} - -- (NSString *)debugDescription -{ - NSMutableString *s = [NSMutableString stringWithFormat:@"<%@:%p", NSStringFromClass([self class]), self]; - [self _appendDescription:s debug:YES]; - [s appendString:@">"]; - return s; -} - -#pragma mark - Utility - -POPAnimationState *POPAnimationGetState(POPAnimation *a) -{ - return a->_state; -} - -- (BOOL)_advance:(id)object currentTime:(CFTimeInterval)currentTime elapsedTime:(CFTimeInterval)elapsedTime -{ - return YES; -} - -- (void)_appendDescription:(NSMutableString *)s debug:(BOOL)debug -{ - if (_state->name) - [s appendFormat:@"; name = %@", _state->name]; - - if (!self.removedOnCompletion) - [s appendFormat:@"; removedOnCompletion = %@", POPStringFromBOOL(self.removedOnCompletion)]; - - if (debug) { - if (_state->active) - [s appendFormat:@"; active = %@", POPStringFromBOOL(_state->active)]; - - if (_state->paused) - [s appendFormat:@"; paused = %@", POPStringFromBOOL(_state->paused)]; - } - - if (_state->beginTime) { - [s appendFormat:@"; beginTime = %f", _state->beginTime]; - } - - for (NSString *key in _state->dict) { - [s appendFormat:@"; %@ = %@", key, _state->dict[key]]; - } -} - -@end - - -#pragma mark - POPPropertyAnimation - -#pragma mark - POPBasicAnimation - -#pragma mark - POPDecayAnimation - -@implementation NSObject (POP) - -- (void)pop_addAnimation:(POPAnimation *)anim forKey:(NSString *)key -{ - [[POPAnimator sharedAnimator] addAnimation:anim forObject:self key:key]; -} - -- (void)pop_removeAllAnimations -{ - [[POPAnimator sharedAnimator] removeAllAnimationsForObject:self]; -} - -- (void)pop_removeAnimationForKey:(NSString *)key -{ - [[POPAnimator sharedAnimator] removeAnimationForObject:self key:key]; -} - -- (NSArray *)pop_animationKeys -{ - return [[POPAnimator sharedAnimator] animationKeysForObject:self]; -} - -- (id)pop_animationForKey:(NSString *)key -{ - return [[POPAnimator sharedAnimator] animationForObject:self key:key]; -} - -@end - -@implementation NSProxy (POP) - -- (void)pop_addAnimation:(POPAnimation *)anim forKey:(NSString *)key -{ - [[POPAnimator sharedAnimator] addAnimation:anim forObject:self key:key]; -} - -- (void)pop_removeAllAnimations -{ - [[POPAnimator sharedAnimator] removeAllAnimationsForObject:self]; -} - -- (void)pop_removeAnimationForKey:(NSString *)key -{ - [[POPAnimator sharedAnimator] removeAnimationForObject:self key:key]; -} - -- (NSArray *)pop_animationKeys -{ - return [[POPAnimator sharedAnimator] animationKeysForObject:self]; -} - -- (id)pop_animationForKey:(NSString *)key -{ - return [[POPAnimator sharedAnimator] animationForObject:self key:key]; -} - -@end - -@implementation POPAnimation (NSCopying) - -- (instancetype)copyWithZone:(NSZone *)zone -{ - /* - * Must use [self class] instead of POPAnimation so that subclasses can call this via super. - * Even though POPAnimation and POPPropertyAnimation throw exceptions on init, - * it's safe to call it since you can only copy objects that have been successfully created. - */ - POPAnimation *copy = [[[self class] allocWithZone:zone] init]; - - if (copy) { - copy.name = self.name; - copy.beginTime = self.beginTime; - copy.delegate = self.delegate; - copy.animationDidStartBlock = self.animationDidStartBlock; - copy.animationDidReachToValueBlock = self.animationDidReachToValueBlock; - copy.completionBlock = self.completionBlock; - copy.animationDidApplyBlock = self.animationDidApplyBlock; - copy.removedOnCompletion = self.removedOnCompletion; - - copy.autoreverses = self.autoreverses; - copy.repeatCount = self.repeatCount; - copy.repeatForever = self.repeatForever; - } - - return copy; -} - -@end \ No newline at end of file diff --git a/Example/Pods/pop/pop/POPAnimationEvent.h b/Example/Pods/pop/pop/POPAnimationEvent.h deleted file mode 100644 index e761091f..00000000 --- a/Example/Pods/pop/pop/POPAnimationEvent.h +++ /dev/null @@ -1,69 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -/** - @abstract Enumeraton of animation event types. - */ -typedef NS_ENUM(NSUInteger, POPAnimationEventType) { - kPOPAnimationEventPropertyRead = 0, - kPOPAnimationEventPropertyWrite, - kPOPAnimationEventToValueUpdate, - kPOPAnimationEventFromValueUpdate, - kPOPAnimationEventVelocityUpdate, - kPOPAnimationEventBouncinessUpdate, - kPOPAnimationEventSpeedUpdate, - kPOPAnimationEventFrictionUpdate, - kPOPAnimationEventMassUpdate, - kPOPAnimationEventTensionUpdate, - kPOPAnimationEventDidStart, - kPOPAnimationEventDidStop, - kPOPAnimationEventDidReachToValue, - kPOPAnimationEventAutoreversed -}; - -/** - @abstract The base animation event class. - */ -@interface POPAnimationEvent : NSObject - -/** - @abstract The event type. See {@ref POPAnimationEventType} for possible values. - */ -@property (readonly, nonatomic, assign) POPAnimationEventType type; - -/** - @abstract The time of event. - */ -@property (readonly, nonatomic, assign) CFTimeInterval time; - -/** - @abstract Optional string describing the animation at time of event. - */ -@property (readonly, nonatomic, copy) NSString *animationDescription; - -@end - -/** - @abstract An animation event subclass for recording value and velocity. - */ -@interface POPAnimationValueEvent : POPAnimationEvent - -/** - @abstract The value recorded. - */ -@property (readonly, nonatomic, strong) id value; - -/** - @abstract The velocity recorded, if any. - */ -@property (readonly, nonatomic, strong) id velocity; - -@end diff --git a/Example/Pods/pop/pop/POPAnimationEvent.mm b/Example/Pods/pop/pop/POPAnimationEvent.mm deleted file mode 100644 index d3a13b69..00000000 --- a/Example/Pods/pop/pop/POPAnimationEvent.mm +++ /dev/null @@ -1,108 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -#import "POPAnimationEvent.h" -#import "POPAnimationEventInternal.h" - -static NSString *stringFromType(POPAnimationEventType aType) -{ - switch (aType) { - case kPOPAnimationEventPropertyRead: - return @"read"; - case kPOPAnimationEventPropertyWrite: - return @"write"; - case kPOPAnimationEventToValueUpdate: - return @"toValue"; - case kPOPAnimationEventFromValueUpdate: - return @"fromValue"; - case kPOPAnimationEventVelocityUpdate: - return @"velocity"; - case kPOPAnimationEventSpeedUpdate: - return @"speed"; - case kPOPAnimationEventBouncinessUpdate: - return @"bounciness"; - case kPOPAnimationEventFrictionUpdate: - return @"friction"; - case kPOPAnimationEventMassUpdate: - return @"mass"; - case kPOPAnimationEventTensionUpdate: - return @"tension"; - case kPOPAnimationEventDidStart: - return @"didStart"; - case kPOPAnimationEventDidStop: - return @"didStop"; - case kPOPAnimationEventDidReachToValue: - return @"didReachToValue"; - case kPOPAnimationEventAutoreversed: - return @"autoreversed"; - default: - return nil; - } -} - -@implementation POPAnimationEvent -@synthesize type = _type; -@synthesize time = _time; -@synthesize animationDescription = _animationDescription; - -- (instancetype)initWithType:(POPAnimationEventType)aType time:(CFTimeInterval)aTime -{ - self = [super init]; - if (nil != self) { - _type = aType; - _time = aTime; - } - return self; -} - -- (NSString *)description -{ - NSMutableString *s = [NSMutableString stringWithFormat:@""]; - return s; -} - -// subclass override -- (void)_appendDescription:(NSMutableString *)s -{ - if (0 != _animationDescription.length) { - [s appendFormat:@"; animation = %@", _animationDescription]; - } -} - -@end - -@implementation POPAnimationValueEvent -@synthesize value = _value; -@synthesize velocity = _velocity; - -- (instancetype)initWithType:(POPAnimationEventType)aType time:(CFTimeInterval)aTime value:(id)aValue -{ - self = [self initWithType:aType time:aTime]; - if (nil != self) { - _value = aValue; - } - return self; -} - -- (void)_appendDescription:(NSMutableString *)s -{ - [super _appendDescription:s]; - - if (nil != _value) { - [s appendFormat:@"; value = %@", _value]; - } - - if (nil != _velocity) { - [s appendFormat:@"; velocity = %@", _velocity]; - } -} - -@end diff --git a/Example/Pods/pop/pop/POPAnimationEventInternal.h b/Example/Pods/pop/pop/POPAnimationEventInternal.h deleted file mode 100644 index 398d59bd..00000000 --- a/Example/Pods/pop/pop/POPAnimationEventInternal.h +++ /dev/null @@ -1,41 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -#import "POPAnimationEvent.h" - -@interface POPAnimationEvent () - -/** - @abstract Default initializer. - */ -- (instancetype)initWithType:(POPAnimationEventType)type time:(CFTimeInterval)time; - -/** - @abstract Readwrite redefinition of public property. - */ -@property (readwrite, nonatomic, copy) NSString *animationDescription; - -@end - -@interface POPAnimationValueEvent () - -/** - @abstract Default initializer. - */ -- (instancetype)initWithType:(POPAnimationEventType)type time:(CFTimeInterval)time value:(id)value; - -/** - @abstract Readwrite redefinition of public property. - */ -@property (readwrite, nonatomic, strong) id velocity; - -@end - diff --git a/Example/Pods/pop/pop/POPAnimationExtras.h b/Example/Pods/pop/pop/POPAnimationExtras.h deleted file mode 100644 index a4c83488..00000000 --- a/Example/Pods/pop/pop/POPAnimationExtras.h +++ /dev/null @@ -1,43 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -#import -#import - -/** - @abstract The current drag coefficient. - @discussion A value greater than 1.0 indicates Simulator slow-motion animations are enabled. Defaults to 1.0. - */ -extern CGFloat POPAnimationDragCoefficient(void); - -@interface CAAnimation (POPAnimationExtras) - -/** - @abstract Apply the current drag coefficient to animation speed. - @discussion Convenience utility to respect Simulator slow-motion animation settings. - */ -- (void)pop_applyDragCoefficient; - -@end - -@interface POPSpringAnimation (POPAnimationExtras) - -/** - @abstract Converts from spring bounciness and speed to tension, friction and mass dynamics values. - */ -+ (void)convertBounciness:(CGFloat)bounciness speed:(CGFloat)speed toTension:(CGFloat *)outTension friction:(CGFloat *)outFriction mass:(CGFloat *)outMass; - -/** - @abstract Converts from dynamics tension, friction and mass to spring bounciness and speed values. - */ -+ (void)convertTension:(CGFloat)tension friction:(CGFloat)friction toBounciness:(CGFloat *)outBounciness speed:(CGFloat *)outSpeed; - -@end diff --git a/Example/Pods/pop/pop/POPAnimationExtras.mm b/Example/Pods/pop/pop/POPAnimationExtras.mm deleted file mode 100644 index d705815b..00000000 --- a/Example/Pods/pop/pop/POPAnimationExtras.mm +++ /dev/null @@ -1,117 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -#import "POPAnimationExtras.h" -#import "POPAnimationPrivate.h" - -#if TARGET_OS_IPHONE -#import -#endif - -#if TARGET_IPHONE_SIMULATOR -UIKIT_EXTERN float UIAnimationDragCoefficient(); // UIKit private drag coefficient, use judiciously -#endif - -#import "POPMath.h" - -CGFloat POPAnimationDragCoefficient() -{ -#if TARGET_IPHONE_SIMULATOR - return UIAnimationDragCoefficient(); -#else - return 1.0; -#endif -} - -@implementation CAAnimation (POPAnimationExtras) - -- (void)pop_applyDragCoefficient -{ - CGFloat k = POPAnimationDragCoefficient(); - if (k != 0 && k != 1) - self.speed = 1 / k; -} - -@end - -@implementation POPSpringAnimation (POPAnimationExtras) - -static const CGFloat POPBouncy3NormalizationRange = 20.0; -static const CGFloat POPBouncy3NormalizationScale = 1.7; -static const CGFloat POPBouncy3BouncinessNormalizedMin = 0.0; -static const CGFloat POPBouncy3BouncinessNormalizedMax = 0.8; -static const CGFloat POPBouncy3SpeedNormalizedMin = 0.5; -static const CGFloat POPBouncy3SpeedNormalizedMax = 200; -static const CGFloat POPBouncy3FrictionInterpolationMax = 0.01; - -+ (void)convertBounciness:(CGFloat)bounciness speed:(CGFloat)speed toTension:(CGFloat *)outTension friction:(CGFloat *)outFriction mass:(CGFloat *)outMass -{ - double b = POPNormalize(bounciness / POPBouncy3NormalizationScale, 0, POPBouncy3NormalizationRange); - b = POPProjectNormal(b, POPBouncy3BouncinessNormalizedMin, POPBouncy3BouncinessNormalizedMax); - - double s = POPNormalize(speed / POPBouncy3NormalizationScale, 0, POPBouncy3NormalizationRange); - - CGFloat tension = POPProjectNormal(s, POPBouncy3SpeedNormalizedMin, POPBouncy3SpeedNormalizedMax); - CGFloat friction = POPQuadraticOutInterpolation(b, POPBouncy3NoBounce(tension), POPBouncy3FrictionInterpolationMax); - - tension = POP_ANIMATION_TENSION_FOR_QC_TENSION(tension); - friction = POP_ANIMATION_FRICTION_FOR_QC_FRICTION(friction); - - if (outTension) { - *outTension = tension; - } - - if (outFriction) { - *outFriction = friction; - } - - if (outMass) { - *outMass = 1.0; - } -} - -+ (void)convertTension:(CGFloat)tension friction:(CGFloat)friction toBounciness:(CGFloat *)outBounciness speed:(CGFloat *)outSpeed -{ - // Convert to QC values, in which our calculations are done. - CGFloat qcFriction = QC_FRICTION_FOR_POP_ANIMATION_FRICTION(friction); - CGFloat qcTension = QC_TENSION_FOR_POP_ANIMATION_TENSION(tension); - - // Friction is a function of bounciness and tension, according to the following: - // friction = POPQuadraticOutInterpolation(b, POPBouncy3NoBounce(tension), POPBouncy3FrictionInterpolationMax); - // Solve for bounciness, given a tension and friction. - - CGFloat nobounceTension = POPBouncy3NoBounce(qcTension); - CGFloat bounciness1, bounciness2; - - POPQuadraticSolve((nobounceTension - POPBouncy3FrictionInterpolationMax), // a - 2 * (POPBouncy3FrictionInterpolationMax - nobounceTension), // b - (nobounceTension - qcFriction), // c - bounciness1, // x1 - bounciness2); // x2 - - - // Choose the quadratic solution within the normalized bounciness range - CGFloat projectedNormalizedBounciness = (bounciness2 < POPBouncy3BouncinessNormalizedMax) ? bounciness2 : bounciness1; - CGFloat projectedNormalizedSpeed = qcTension; - - // Reverse projection + normalization - CGFloat bounciness = ((POPBouncy3NormalizationRange * POPBouncy3NormalizationScale) / (POPBouncy3BouncinessNormalizedMax - POPBouncy3BouncinessNormalizedMin)) * (projectedNormalizedBounciness - POPBouncy3BouncinessNormalizedMin); - CGFloat speed = ((POPBouncy3NormalizationRange * POPBouncy3NormalizationScale) / (POPBouncy3SpeedNormalizedMax - POPBouncy3SpeedNormalizedMin)) * (projectedNormalizedSpeed - POPBouncy3SpeedNormalizedMin); - - // Write back results - if (outBounciness) { - *outBounciness = bounciness; - } - - if (outSpeed) { - *outSpeed = speed; - } -} - -@end diff --git a/Example/Pods/pop/pop/POPAnimationInternal.h b/Example/Pods/pop/pop/POPAnimationInternal.h deleted file mode 100644 index cb8bf6c7..00000000 --- a/Example/Pods/pop/pop/POPAnimationInternal.h +++ /dev/null @@ -1,506 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -#import "POPAnimation.h" - -#import - -#import "POPAction.h" -#import "POPAnimationRuntime.h" -#import "POPAnimationTracerInternal.h" -#import "POPMath.h" -#import "POPSpringSolver.h" - -using namespace POP; - -/** - Enumeration of supported animation types. - */ -enum POPAnimationType -{ - kPOPAnimationSpring, - kPOPAnimationDecay, - kPOPAnimationBasic, - kPOPAnimationCustom, -}; - -typedef struct -{ - CGFloat progress; - bool reached; -} POPProgressMarker; - -typedef void (^POPAnimationDidStartBlock)(POPAnimation *anim); -typedef void (^POPAnimationDidReachToValueBlock)(POPAnimation *anim); -typedef void (^POPAnimationCompletionBlock)(POPAnimation *anim, BOOL finished); -typedef void (^POPAnimationDidApplyBlock)(POPAnimation *anim); - -@interface POPAnimation() -- (instancetype)_init; - -@property (assign, nonatomic) SpringSolver4d *solver; -@property (readonly, nonatomic) POPAnimationType type; - -/** - The current animation value, updated while animation is progressing. - */ -@property (copy, nonatomic, readonly) id currentValue; - -/** - An array of optional progress markers. For each marker specified, the animation delegate will be informed when progress meets or exceeds the value specified. Specifying values outside of the [0, 1] range will give undefined results. - */ -@property (copy, nonatomic) NSArray *progressMarkers; - -/** - Return YES to indicate animation should continue animating. - */ -- (BOOL)_advance:(id)object currentTime:(CFTimeInterval)currentTime elapsedTime:(CFTimeInterval)elapsedTime; - -/** - Subclass override point to append animation description. - */ -- (void)_appendDescription:(NSMutableString *)s debug:(BOOL)debug; - -@end - -NS_INLINE NSString *describe(VectorConstRef vec) -{ - return NULL == vec ? @"null" : vec->toString(); -} - -NS_INLINE Vector4r vector4(VectorConstRef vec) -{ - return NULL == vec ? Vector4r::Zero() : vec->vector4r(); -} - -NS_INLINE Vector4d vector4d(VectorConstRef vec) -{ - if (NULL == vec) { - return Vector4d::Zero(); - } else { - return vec->vector4r().cast(); - } -} - -NS_INLINE bool vec_equal(VectorConstRef v1, VectorConstRef v2) -{ - if (v1 == v2) { - return true; - } - if (!v1 || !v2) { - return false; - } - return *v1 == *v2; -} - -NS_INLINE CGFloat * vec_data(VectorRef vec) -{ - return NULL == vec ? NULL : vec->data(); -} - -template -struct ComputeProgressFunctor { - CGFloat operator()(const T &value, const T &start, const T &end) const { - return 0; - } -}; - -template<> -struct ComputeProgressFunctor { - CGFloat operator()(const Vector4r &value, const Vector4r &start, const Vector4r &end) const { - CGFloat s = (value - start).squaredNorm(); // distance from start - CGFloat e = (value - end).squaredNorm(); // distance from end - CGFloat d = (end - start).squaredNorm(); // distance from start to end - - if (0 == d) { - return 1; - } else if (s > e) { - // s -------- p ---- e OR s ------- e ---- p - return sqrtr(s/d); - } else { - // s --- p --------- e OR p ---- s ------- e - return 1 - sqrtr(e/d); - } - } -}; - -struct _POPAnimationState; -struct _POPDecayAnimationState; -struct _POPPropertyAnimationState; - -extern _POPAnimationState *POPAnimationGetState(POPAnimation *a); - - -#define FB_FLAG_GET(stype, flag, getter) \ -- (BOOL)getter { \ - return ((stype *)_state)->flag; \ -} - -#define FB_FLAG_SET(stype, flag, mutator) \ -- (void)mutator (BOOL)value { \ - if (value == ((stype *)_state)->flag) \ - return; \ - ((stype *)_state)->flag = value; \ -} - -#define DEFINE_RW_FLAG(stype, flag, getter, mutator) \ - FB_FLAG_GET (stype, flag, getter) \ - FB_FLAG_SET (stype, flag, mutator) - -#define FB_PROPERTY_GET(stype, property, ctype) \ -- (ctype)property { \ - return ((stype *)_state)->property; \ -} - -#define FB_PROPERTY_SET(stype, property, mutator, ctype, ...) \ -- (void)mutator (ctype)value { \ - if (value == ((stype *)_state)->property) \ - return; \ - ((stype *)_state)->property = value; \ - __VA_ARGS__ \ -} - -#define FB_PROPERTY_SET_OBJ_COPY(stype, property, mutator, ctype, ...) \ -- (void)mutator (ctype)value { \ - if (value == ((stype *)_state)->property) \ - return; \ - ((stype *)_state)->property = [value copy]; \ - __VA_ARGS__ \ -} - -#define DEFINE_RW_PROPERTY(stype, flag, mutator, ctype, ...) \ - FB_PROPERTY_GET (stype, flag, ctype) \ - FB_PROPERTY_SET (stype, flag, mutator, ctype, __VA_ARGS__) - -#define DEFINE_RW_PROPERTY_OBJ(stype, flag, mutator, ctype, ...) \ - FB_PROPERTY_GET (stype, flag, ctype) \ - FB_PROPERTY_SET (stype, flag, mutator, ctype, __VA_ARGS__) - -#define DEFINE_RW_PROPERTY_OBJ_COPY(stype, flag, mutator, ctype, ...) \ - FB_PROPERTY_GET (stype, flag, ctype) \ - FB_PROPERTY_SET_OBJ_COPY (stype, flag, mutator, ctype, __VA_ARGS__) - - -/** - Internal delegate definition. - */ -@interface NSObject (POPAnimationDelegateInternal) -- (void)pop_animation:(POPAnimation *)anim didReachProgress:(CGFloat)progress; -@end - -struct _POPAnimationState -{ - id __unsafe_unretained self; - POPAnimationType type; - NSString *name; - NSUInteger ID; - CFTimeInterval beginTime; - CFTimeInterval startTime; - CFTimeInterval lastTime; - id __weak delegate; - POPAnimationDidStartBlock animationDidStartBlock; - POPAnimationDidReachToValueBlock animationDidReachToValueBlock; - POPAnimationCompletionBlock completionBlock; - POPAnimationDidApplyBlock animationDidApplyBlock; - NSMutableDictionary *dict; - POPAnimationTracer *tracer; - CGFloat progress; - NSInteger repeatCount; - - bool active:1; - bool paused:1; - bool removedOnCompletion:1; - - bool delegateDidStart:1; - bool delegateDidStop:1; - bool delegateDidProgress:1; - bool delegateDidApply:1; - bool delegateDidReachToValue:1; - - bool additive:1; - bool didReachToValue:1; - bool tracing:1; // corresponds to tracer started - bool userSpecifiedDynamics:1; - bool autoreverses:1; - bool repeatForever:1; - bool customFinished:1; - - _POPAnimationState(id __unsafe_unretained anim) : - self(anim), - type((POPAnimationType)0), - name(nil), - ID(0), - beginTime(0), - startTime(0), - lastTime(0), - delegate(nil), - animationDidStartBlock(nil), - animationDidReachToValueBlock(nil), - completionBlock(nil), - animationDidApplyBlock(nil), - dict(nil), - tracer(nil), - progress(0), - repeatCount(0), - active(false), - paused(true), - removedOnCompletion(true), - delegateDidStart(false), - delegateDidStop(false), - delegateDidProgress(false), - delegateDidApply(false), - delegateDidReachToValue(false), - additive(false), - didReachToValue(false), - tracing(false), - userSpecifiedDynamics(false), - autoreverses(false), - repeatForever(false), - customFinished(false) {} - - virtual ~_POPAnimationState() - { - name = nil; - dict = nil; - tracer = nil; - animationDidStartBlock = NULL; - animationDidReachToValueBlock = NULL; - completionBlock = NULL; - animationDidApplyBlock = NULL; - } - - bool isCustom() { - return kPOPAnimationCustom == type; - } - - bool isStarted() { - return 0 != startTime; - } - - id getDelegate() { - return delegate; - } - - void setDelegate(id d) { - if (d != delegate) { - delegate = d; - delegateDidStart = [d respondsToSelector:@selector(pop_animationDidStart:)]; - delegateDidStop = [d respondsToSelector:@selector(pop_animationDidStop:finished:)]; - delegateDidProgress = [d respondsToSelector:@selector(pop_animation:didReachProgress:)]; - delegateDidApply = [d respondsToSelector:@selector(pop_animationDidApply:)]; - delegateDidReachToValue = [d respondsToSelector:@selector(pop_animationDidReachToValue:)]; - } - } - - bool getPaused() { - return paused; - } - - void setPaused(bool f) { - if (f != paused) { - paused = f; - if (!paused) { - reset(false); - } - } - } - - CGFloat getProgress() { - return progress; - } - - /* returns true if started */ - bool startIfNeeded(id obj, CFTimeInterval time, CFTimeInterval offset) - { - bool started = false; - - // detect start based on time - if (0 == startTime && time >= beginTime + offset) { - - // activate & unpause - active = true; - setPaused(false); - - // note start time - startTime = lastTime = time; - started = true; - } - - // ensure values for running animation - bool running = active && !paused; - if (running) { - willRun(started, obj); - } - - // handle start - if (started) { - handleDidStart(); - } - - return started; - } - - void stop(bool removing, bool done) { - if (active) - { - // delegate progress one last time - if (done) { - delegateProgress(); - } - - if (removing) { - active = false; - } - - handleDidStop(done); - } else { - - // stopped before even started - // delegate start and stop regardless; matches CA behavior - if (!isStarted()) { - handleDidStart(); - handleDidStop(false); - } - } - - setPaused(true); - } - - virtual void handleDidStart() - { - if (delegateDidStart) { - ActionEnabler enabler; - [delegate pop_animationDidStart:self]; - } - - POPAnimationDidStartBlock block = animationDidStartBlock; - if (block != NULL) { - ActionEnabler enabler; - block(self); - } - - if (tracing) { - [tracer didStart]; - } - } - - void handleDidStop(BOOL done) - { - if (delegateDidStop) { - ActionEnabler enabler; - [delegate pop_animationDidStop:self finished:done]; - } - - // add another strong reference to completion block before callout - POPAnimationCompletionBlock block = completionBlock; - if (block != NULL) { - ActionEnabler enabler; - block(self, done); - } - - if (tracing) { - [tracer didStop:done]; - } - } - - /* virtual functions */ - virtual bool isDone() { - if (isCustom()) { - return customFinished; - } - - return false; - } - - bool advanceTime(CFTimeInterval time, id obj) { - bool advanced = false; - bool computedProgress = false; - CFTimeInterval dt = time - lastTime; - - switch (type) { - case kPOPAnimationSpring: - advanced = advance(time, dt, obj); - break; - case kPOPAnimationDecay: - advanced = advance(time, dt, obj); - break; - case kPOPAnimationBasic: { - advanced = advance(time, dt, obj); - computedProgress = true; - break; - } - case kPOPAnimationCustom: { - customFinished = [self _advance:obj currentTime:time elapsedTime:dt] ? false : true; - advanced = true; - break; - } - default: - break; - } - - if (advanced) { - - // estimate progress - if (!computedProgress) { - computeProgress(); - } - - // delegate progress - delegateProgress(); - - // update time - lastTime = time; - } - - return advanced; - } - - virtual void willRun(bool started, id obj) {} - virtual bool advance(CFTimeInterval time, CFTimeInterval dt, id obj) { return false; } - virtual void computeProgress() {} - virtual void delegateProgress() {} - - virtual void delegateApply() { - if (delegateDidApply) { - ActionEnabler enabler; - [delegate pop_animationDidApply:self]; - } - - POPAnimationDidApplyBlock block = animationDidApplyBlock; - if (block != NULL) { - ActionEnabler enabler; - block(self); - } - } - - virtual void reset(bool all) { - startTime = 0; - lastTime = 0; - } -}; - -typedef struct _POPAnimationState POPAnimationState; - - -@interface POPAnimation () -{ -@protected - struct _POPAnimationState *_state; -} - -@end - -// NSProxy extensions, for testing purposes -@interface NSProxy (POP) -- (void)pop_addAnimation:(POPAnimation *)anim forKey:(NSString *)key; -- (void)pop_removeAllAnimations; -- (void)pop_removeAnimationForKey:(NSString *)key; -- (NSArray *)pop_animationKeys; -- (POPAnimation *)pop_animationForKey:(NSString *)key; -@end diff --git a/Example/Pods/pop/pop/POPAnimationPrivate.h b/Example/Pods/pop/pop/POPAnimationPrivate.h deleted file mode 100644 index c0f06c52..00000000 --- a/Example/Pods/pop/pop/POPAnimationPrivate.h +++ /dev/null @@ -1,16 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -#define POP_ANIMATION_FRICTION_FOR_QC_FRICTION(qcFriction) (25.0 + (((qcFriction - 8.0) / 2.0) * (25.0 - 19.0))) -#define POP_ANIMATION_TENSION_FOR_QC_TENSION(qcTension) (194.0 + (((qcTension - 30.0) / 50.0) * (375.0 - 194.0))) - -#define QC_FRICTION_FOR_POP_ANIMATION_FRICTION(fbFriction) (8.0 + 2.0 * ((fbFriction - 25.0)/(25.0 - 19.0))) -#define QC_TENSION_FOR_POP_ANIMATION_TENSION(fbTension) (30.0 + 50.0 * ((fbTension - 194.0)/(375.0 - 194.0))) diff --git a/Example/Pods/pop/pop/POPAnimationRuntime.h b/Example/Pods/pop/pop/POPAnimationRuntime.h deleted file mode 100644 index 1b99bddb..00000000 --- a/Example/Pods/pop/pop/POPAnimationRuntime.h +++ /dev/null @@ -1,99 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -#import -#import - -#import "POPAnimatablePropertyTypes.h" -#import "POPVector.h" - -enum POPValueType -{ - kPOPValueUnknown = 0, - kPOPValueInteger, - kPOPValueFloat, - kPOPValuePoint, - kPOPValueSize, - kPOPValueRect, - kPOPValueEdgeInsets, - kPOPValueAffineTransform, - kPOPValueTransform, - kPOPValueRange, - kPOPValueColor, - kPOPValueSCNVector3, - kPOPValueSCNVector4, -}; - -using namespace POP; - -/** - Returns value type based on objc type description, given list of supported value types and length. - */ -extern POPValueType POPSelectValueType(const char *objctype, const POPValueType *types, size_t length); - -/** - Returns value type based on objc object, given a list of supported value types and length. - */ -extern POPValueType POPSelectValueType(id obj, const POPValueType *types, size_t length); - -/** - Array of all value types. - */ -extern const POPValueType kPOPAnimatableAllTypes[12]; - -/** - Array of all value types supported for animation. - */ -extern const POPValueType kPOPAnimatableSupportTypes[10]; - -/** - Returns a string description of a value type. - */ -extern NSString *POPValueTypeToString(POPValueType t); - -/** - Returns a mutable dictionary of weak pointer keys to weak pointer values. - */ -extern CFMutableDictionaryRef POPDictionaryCreateMutableWeakPointerToWeakPointer(NSUInteger capacity) CF_RETURNS_RETAINED; - -/** - Returns a mutable dictionary of weak pointer keys to weak pointer values. - */ -extern CFMutableDictionaryRef POPDictionaryCreateMutableWeakPointerToStrongObject(NSUInteger capacity) CF_RETURNS_RETAINED; - -/** - Box a vector. - */ -extern id POPBox(VectorConstRef vec, POPValueType type, bool force = false); - -/** - Unbox a vector. - */ -extern VectorRef POPUnbox(id value, POPValueType &type, NSUInteger &count, bool validate); - -/** - Read object value and return a Vector4r. - */ -NS_INLINE Vector4r read_values(POPAnimatablePropertyReadBlock read, id obj, size_t count) -{ - Vector4r vec = Vector4r::Zero(); - if (0 == count) - return vec; - - read(obj, vec.data()); - - return vec; -} - -NS_INLINE NSString *POPStringFromBOOL(BOOL value) -{ - return value ? @"YES" : @"NO"; -} diff --git a/Example/Pods/pop/pop/POPAnimationRuntime.mm b/Example/Pods/pop/pop/POPAnimationRuntime.mm deleted file mode 100644 index 371e0093..00000000 --- a/Example/Pods/pop/pop/POPAnimationRuntime.mm +++ /dev/null @@ -1,329 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -#import "POPAnimationRuntime.h" - -#import - -#import - -#if TARGET_OS_IPHONE -#import -#endif - -#import "POPCGUtils.h" -#import "POPDefines.h" -#import "POPGeometry.h" -#import "POPVector.h" - -static Boolean pointerEqual(const void *ptr1, const void *ptr2) { - return ptr1 == ptr2; -} - -static CFHashCode pointerHash(const void *ptr) { - return (CFHashCode)(ptr); -} - -CFMutableDictionaryRef POPDictionaryCreateMutableWeakPointerToWeakPointer(NSUInteger capacity) -{ - CFDictionaryKeyCallBacks kcb = kCFTypeDictionaryKeyCallBacks; - - // weak, pointer keys - kcb.retain = NULL; - kcb.release = NULL; - kcb.equal = pointerEqual; - kcb.hash = pointerHash; - - CFDictionaryValueCallBacks vcb = kCFTypeDictionaryValueCallBacks; - - // weak, pointer values - vcb.retain = NULL; - vcb.release = NULL; - vcb.equal = pointerEqual; - - return CFDictionaryCreateMutable(NULL, capacity, &kcb, &vcb); -} - -CFMutableDictionaryRef POPDictionaryCreateMutableWeakPointerToStrongObject(NSUInteger capacity) -{ - CFDictionaryKeyCallBacks kcb = kCFTypeDictionaryKeyCallBacks; - - // weak, pointer keys - kcb.retain = NULL; - kcb.release = NULL; - kcb.equal = pointerEqual; - kcb.hash = pointerHash; - - // strong, object values - CFDictionaryValueCallBacks vcb = kCFTypeDictionaryValueCallBacks; - - return CFDictionaryCreateMutable(NULL, capacity, &kcb, &vcb); -} - -static bool FBCompareTypeEncoding(const char *objctype, POPValueType type) -{ - switch (type) - { - case kPOPValueFloat: - return (strcmp(objctype, @encode(float)) == 0 - || strcmp(objctype, @encode(double)) == 0 - ); - - case kPOPValuePoint: - return (strcmp(objctype, @encode(CGPoint)) == 0 -#if !TARGET_OS_IPHONE - || strcmp(objctype, @encode(NSPoint)) == 0 -#endif - ); - - case kPOPValueSize: - return (strcmp(objctype, @encode(CGSize)) == 0 -#if !TARGET_OS_IPHONE - || strcmp(objctype, @encode(NSSize)) == 0 -#endif - ); - - case kPOPValueRect: - return (strcmp(objctype, @encode(CGRect)) == 0 -#if !TARGET_OS_IPHONE - || strcmp(objctype, @encode(NSRect)) == 0 -#endif - ); - case kPOPValueEdgeInsets: -#if TARGET_OS_IPHONE - return strcmp(objctype, @encode(UIEdgeInsets)) == 0; -#else - return false; -#endif - - case kPOPValueAffineTransform: - return strcmp(objctype, @encode(CGAffineTransform)) == 0; - - case kPOPValueTransform: - return strcmp(objctype, @encode(CATransform3D)) == 0; - - case kPOPValueRange: - return strcmp(objctype, @encode(CFRange)) == 0 - || strcmp(objctype, @encode (NSRange)) == 0; - - case kPOPValueInteger: - return (strcmp(objctype, @encode(int)) == 0 - || strcmp(objctype, @encode(unsigned int)) == 0 - || strcmp(objctype, @encode(short)) == 0 - || strcmp(objctype, @encode(unsigned short)) == 0 - || strcmp(objctype, @encode(long)) == 0 - || strcmp(objctype, @encode(unsigned long)) == 0 - || strcmp(objctype, @encode(long long)) == 0 - || strcmp(objctype, @encode(unsigned long long)) == 0 - ); - - case kPOPValueSCNVector3: -#if SCENEKIT_SDK_AVAILABLE - return strcmp(objctype, @encode(SCNVector3)) == 0; -#else - return false; -#endif - - case kPOPValueSCNVector4: -#if SCENEKIT_SDK_AVAILABLE - return strcmp(objctype, @encode(SCNVector4)) == 0; -#else - return false; -#endif - - default: - return false; - } -} - -POPValueType POPSelectValueType(const char *objctype, const POPValueType *types, size_t length) -{ - if (NULL != objctype) { - for (size_t idx = 0; idx < length; idx++) { - if (FBCompareTypeEncoding(objctype, types[idx])) - return types[idx]; - } - } - return kPOPValueUnknown; -} - -POPValueType POPSelectValueType(id obj, const POPValueType *types, size_t length) -{ - if ([obj isKindOfClass:[NSValue class]]) { - return POPSelectValueType([obj objCType], types, length); - } else if (NULL != POPCGColorWithColor(obj)) { - return kPOPValueColor; - } - return kPOPValueUnknown; -} - -const POPValueType kPOPAnimatableAllTypes[12] = {kPOPValueInteger, kPOPValueFloat, kPOPValuePoint, kPOPValueSize, kPOPValueRect, kPOPValueEdgeInsets, kPOPValueAffineTransform, kPOPValueTransform, kPOPValueRange, kPOPValueColor, kPOPValueSCNVector3, kPOPValueSCNVector4}; - -const POPValueType kPOPAnimatableSupportTypes[10] = {kPOPValueInteger, kPOPValueFloat, kPOPValuePoint, kPOPValueSize, kPOPValueRect, kPOPValueEdgeInsets, kPOPValueColor, kPOPValueSCNVector3, kPOPValueSCNVector4}; - -NSString *POPValueTypeToString(POPValueType t) -{ - switch (t) { - case kPOPValueUnknown: - return @"unknown"; - case kPOPValueInteger: - return @"int"; - case kPOPValueFloat: - return @"CGFloat"; - case kPOPValuePoint: - return @"CGPoint"; - case kPOPValueSize: - return @"CGSize"; - case kPOPValueRect: - return @"CGRect"; - case kPOPValueEdgeInsets: - return @"UIEdgeInsets"; - case kPOPValueAffineTransform: - return @"CGAffineTransform"; - case kPOPValueTransform: - return @"CATransform3D"; - case kPOPValueRange: - return @"CFRange"; - case kPOPValueColor: - return @"CGColorRef"; - case kPOPValueSCNVector3: - return @"SCNVector3"; - case kPOPValueSCNVector4: - return @"SCNVector4"; - default: - return nil; - } -} - -id POPBox(VectorConstRef vec, POPValueType type, bool force) -{ - if (NULL == vec) - return nil; - - switch (type) { - case kPOPValueInteger: - case kPOPValueFloat: - return @(vec->data()[0]); - break; - case kPOPValuePoint: - return [NSValue valueWithCGPoint:vec->cg_point()]; - break; - case kPOPValueSize: - return [NSValue valueWithCGSize:vec->cg_size()]; - break; - case kPOPValueRect: - return [NSValue valueWithCGRect:vec->cg_rect()]; - break; -#if TARGET_OS_IPHONE - case kPOPValueEdgeInsets: - return [NSValue valueWithUIEdgeInsets:vec->ui_edge_insets()]; - break; -#endif - case kPOPValueColor: { - return (__bridge_transfer id)vec->cg_color(); - break; - } -#if SCENEKIT_SDK_AVAILABLE - case kPOPValueSCNVector3: { - return [NSValue valueWithSCNVector3:vec->scn_vector3()]; - break; - } - case kPOPValueSCNVector4: { - return [NSValue valueWithSCNVector4:vec->scn_vector4()]; - break; - } -#endif - default: - return force ? [NSValue valueWithCGPoint:vec->cg_point()] : nil; - break; - } -} - -static VectorRef vectorize(id value, POPValueType type) -{ - Vector *vec = NULL; - - switch (type) { - case kPOPValueInteger: - case kPOPValueFloat: -#if CGFLOAT_IS_DOUBLE - vec = Vector::new_cg_float([value doubleValue]); -#else - vec = Vector::new_cg_float([value floatValue]); -#endif - break; - case kPOPValuePoint: - vec = Vector::new_cg_point([value CGPointValue]); - break; - case kPOPValueSize: - vec = Vector::new_cg_size([value CGSizeValue]); - break; - case kPOPValueRect: - vec = Vector::new_cg_rect([value CGRectValue]); - break; -#if TARGET_OS_IPHONE - case kPOPValueEdgeInsets: - vec = Vector::new_ui_edge_insets([value UIEdgeInsetsValue]); - break; -#endif - case kPOPValueAffineTransform: - vec = Vector::new_cg_affine_transform([value CGAffineTransformValue]); - break; - case kPOPValueColor: - vec = Vector::new_cg_color(POPCGColorWithColor(value)); - break; -#if SCENEKIT_SDK_AVAILABLE - case kPOPValueSCNVector3: - vec = Vector::new_scn_vector3([value SCNVector3Value]); - break; - case kPOPValueSCNVector4: - vec = Vector::new_scn_vector4([value SCNVector4Value]); - break; -#endif - default: - break; - } - - return VectorRef(vec); -} - -VectorRef POPUnbox(id value, POPValueType &animationType, NSUInteger &count, bool validate) -{ - if (nil == value) { - count = 0; - return VectorRef(NULL); - } - - // determine type of value - POPValueType valueType = POPSelectValueType(value, kPOPAnimatableSupportTypes, POP_ARRAY_COUNT(kPOPAnimatableSupportTypes)); - - // handle unknown types - if (kPOPValueUnknown == valueType) { - NSString *valueDesc = [[value class] description]; - [NSException raise:@"Unsuported value" format:@"Animating %@ values is not supported", valueDesc]; - } - - // vectorize - VectorRef vec = vectorize(value, valueType); - - if (kPOPValueUnknown == animationType || 0 == count) { - // update animation type based on value type - animationType = valueType; - if (NULL != vec) { - count = vec->size(); - } - } else if (validate) { - // allow for mismatched types, so long as vector size matches - if (count != vec->size()) { - [NSException raise:@"Invalid value" format:@"%@ should be of type %@", value, POPValueTypeToString(animationType)]; - } - } - - return vec; -} diff --git a/Example/Pods/pop/pop/POPAnimationTracer.h b/Example/Pods/pop/pop/POPAnimationTracer.h deleted file mode 100644 index 1de56615..00000000 --- a/Example/Pods/pop/pop/POPAnimationTracer.h +++ /dev/null @@ -1,60 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -#import - -@class POPAnimation; - -/** - @abstract Tracer of animation events to facilitate unit testing & debugging. - */ -@interface POPAnimationTracer : NSObject - -/** - @abstract Start recording events. - */ -- (void)start; - -/** - @abstract Stop recording events. - */ -- (void)stop; - -/** - @abstract Resets any recoded events. Continues recording events if already started. - */ -- (void)reset; - -/** - @abstract Property representing all recorded events. - @discussion Events are returned in order of occurrence. - */ -@property (nonatomic, assign, readonly) NSArray *allEvents; - -/** - @abstract Property representing all recorded write events for convenience. - @discussion Events are returned in order of occurrence. - */ -@property (nonatomic, assign, readonly) NSArray *writeEvents; - -/** - @abstract Queries for events of specified type. - @param type The type of event to return. - @returns An array of events of specified type in order of occurrence. - */ -- (NSArray *)eventsWithType:(POPAnimationEventType)type; - -/** - @abstract Property indicating whether tracer should automatically log events and reset collection on animation completion. - */ -@property (nonatomic, assign) BOOL shouldLogAndResetOnCompletion; - -@end diff --git a/Example/Pods/pop/pop/POPAnimationTracer.mm b/Example/Pods/pop/pop/POPAnimationTracer.mm deleted file mode 100644 index 73065246..00000000 --- a/Example/Pods/pop/pop/POPAnimationTracer.mm +++ /dev/null @@ -1,192 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -#import "POPAnimationTracer.h" - -#import - -#import "POPAnimationEventInternal.h" -#import "POPAnimationInternal.h" -#import "POPSpringAnimation.h" - -@implementation POPAnimationTracer -{ - __weak POPAnimation *_animation; - POPAnimationState *_animationState; - NSMutableArray *_events; - BOOL _animationHasVelocity; -} -@synthesize shouldLogAndResetOnCompletion = _shouldLogAndResetOnCompletion; - -static POPAnimationEvent *create_event(POPAnimationTracer *self, POPAnimationEventType type, id value = nil, bool recordAnimation = false) -{ - bool useLocalTime = 0 != self->_animationState->startTime; - CFTimeInterval time = useLocalTime - ? self->_animationState->lastTime - self->_animationState->startTime - : self->_animationState->lastTime; - - POPAnimationEvent *event; - __strong POPAnimation* animation = self->_animation; - - if (!value) { - event = [[POPAnimationEvent alloc] initWithType:type time:time]; - } else { - event = [[POPAnimationValueEvent alloc] initWithType:type time:time value:value]; - if (self->_animationHasVelocity) { - [(POPAnimationValueEvent *)event setVelocity:[(POPSpringAnimation *)animation velocity]]; - } - } - - if (recordAnimation) { - event.animationDescription = [animation description]; - } - - return event; -} - -- (id)initWithAnimation:(POPAnimation *)anAnim -{ - self = [super init]; - if (nil != self) { - _animation = anAnim; - _animationState = POPAnimationGetState(anAnim); - _events = [[NSMutableArray alloc] initWithCapacity:50]; - _animationHasVelocity = [anAnim respondsToSelector:@selector(velocity)]; - } - return self; -} - -- (void)readPropertyValue:(id)aValue -{ - POPAnimationEvent *event = create_event(self, kPOPAnimationEventPropertyRead, aValue); - [_events addObject:event]; -} - -- (void)writePropertyValue:(id)aValue -{ - POPAnimationEvent *event = create_event(self, kPOPAnimationEventPropertyWrite, aValue); - [_events addObject:event]; -} - -- (void)updateToValue:(id)aValue -{ - POPAnimationEvent *event = create_event(self, kPOPAnimationEventToValueUpdate, aValue); - [_events addObject:event]; -} - -- (void)updateFromValue:(id)aValue -{ - POPAnimationEvent *event = create_event(self, kPOPAnimationEventFromValueUpdate, aValue); - [_events addObject:event]; -} - -- (void)updateVelocity:(id)aValue -{ - POPAnimationEvent *event = create_event(self, kPOPAnimationEventVelocityUpdate, aValue); - [_events addObject:event]; -} - -- (void)updateSpeed:(float)aFloat -{ - POPAnimationEvent *event = create_event(self, kPOPAnimationEventSpeedUpdate, @(aFloat)); - [_events addObject:event]; -} - -- (void)updateBounciness:(float)aFloat -{ - POPAnimationEvent *event = create_event(self, kPOPAnimationEventBouncinessUpdate, @(aFloat)); - [_events addObject:event]; -} - -- (void)updateFriction:(float)aFloat -{ - POPAnimationEvent *event = create_event(self, kPOPAnimationEventFrictionUpdate, @(aFloat)); - [_events addObject:event]; -} - -- (void)updateMass:(float)aFloat -{ - POPAnimationEvent *event = create_event(self, kPOPAnimationEventMassUpdate, @(aFloat)); - [_events addObject:event]; -} - -- (void)updateTension:(float)aFloat -{ - POPAnimationEvent *event = create_event(self, kPOPAnimationEventTensionUpdate, @(aFloat)); - [_events addObject:event]; -} - -- (void)didStart -{ - POPAnimationEvent *event = create_event(self, kPOPAnimationEventDidStart, nil, true); - [_events addObject:event]; -} - -- (void)didStop:(BOOL)finished -{ - POPAnimationEvent *event = create_event(self, kPOPAnimationEventDidStop, @(finished), true); - [_events addObject:event]; - - if (_shouldLogAndResetOnCompletion) { - NSLog(@"events:%@", self.allEvents); - [self reset]; - } -} - -- (void)didReachToValue:(id)aValue -{ - POPAnimationEvent *event = create_event(self, kPOPAnimationEventDidReachToValue, aValue); - [_events addObject:event]; -} - -- (void)autoreversed -{ - POPAnimationEvent *event = create_event(self, kPOPAnimationEventAutoreversed); - [_events addObject:event]; -} - -- (void)start -{ - POPAnimationState *s = POPAnimationGetState(_animation); - s->tracing = true; -} - -- (void)stop -{ - POPAnimationState *s = POPAnimationGetState(_animation); - s->tracing = false; -} - -- (void)reset -{ - [_events removeAllObjects]; -} - -- (NSArray *)allEvents -{ - return [_events copy]; -} - -- (NSArray *)writeEvents -{ - return [self eventsWithType:kPOPAnimationEventPropertyWrite]; -} - -- (NSArray *)eventsWithType:(POPAnimationEventType)aType -{ - NSMutableArray *array = [NSMutableArray array]; - for (POPAnimationEvent *event in _events) { - if (aType == event.type) { - [array addObject:event]; - } - } - return array; -} - -@end diff --git a/Example/Pods/pop/pop/POPAnimationTracerInternal.h b/Example/Pods/pop/pop/POPAnimationTracerInternal.h deleted file mode 100644 index 27b7cde3..00000000 --- a/Example/Pods/pop/pop/POPAnimationTracerInternal.h +++ /dev/null @@ -1,96 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -#import - -@interface POPAnimationTracer (Internal) - -/** - @abstract Designated initializer. Pass the animation being traced. - */ -- (instancetype)initWithAnimation:(POPAnimation *)anAnim; - -/** - @abstract Records read value. - */ -- (void)readPropertyValue:(id)aValue; - -/** - @abstract Records write value. - */ -- (void)writePropertyValue:(id)aValue; - -/** - Records to value update. - */ -- (void)updateToValue:(id)aValue; - -/** - @abstract Records from value update. - */ -- (void)updateFromValue:(id)aValue; - -/** - @abstract Records from value update. - */ -- (void)updateVelocity:(id)aValue; - -/** - @abstract Records bounciness update. - */ -- (void)updateBounciness:(float)aFloat; - -/** - @abstract Records speed update. - */ -- (void)updateSpeed:(float)aFloat; - -/** - @abstract Records friction update. - */ -- (void)updateFriction:(float)aFloat; - -/** - @abstract Records mass update. - */ -- (void)updateMass:(float)aFloat; - -/** - @abstract Records tension update. - */ -- (void)updateTension:(float)aFloat; - -/** - @abstract Records did add. - */ -- (void)didAdd; - -/** - @abstract Records did start. - */ -- (void)didStart; - -/** - @abstract Records did stop. - */ -- (void)didStop:(BOOL)finished; - -/** - @abstract Records did reach to value. - */ -- (void)didReachToValue:(id)aValue; - -/** - @abstract Records when an autoreverse animation takes place. - */ -- (void)autoreversed; - -@end diff --git a/Example/Pods/pop/pop/POPAnimator.h b/Example/Pods/pop/pop/POPAnimator.h deleted file mode 100644 index 2c568579..00000000 --- a/Example/Pods/pop/pop/POPAnimator.h +++ /dev/null @@ -1,59 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -@protocol POPAnimatorDelegate; - -/** - @abstract The animator class renders animations. - */ -@interface POPAnimator : NSObject - -/** - @abstract The shared animator instance. - @discussion Consumers should generally use the shared instance in lieu of creating new instances. - */ -+ (instancetype)sharedAnimator; - -#if !TARGET_OS_IPHONE -/** - @abstract Allows to select display to bind. Returns nil if failed to create the display link. - */ -- (instancetype)initWithDisplayID:(CGDirectDisplayID)displayID; -#endif - -/** - @abstract The optional animator delegate. - */ -@property (weak, nonatomic) id delegate; - -/** - @abstract Retrieves the nominal refresh period of a display link. Returns zero if unavailable. - */ -@property (readonly, nonatomic) CFTimeInterval refreshPeriod; - -@end - -/** - @abstract The animator delegate. - */ -@protocol POPAnimatorDelegate - -/** - @abstract Called on each frame before animation application. - */ -- (void)animatorWillAnimate:(POPAnimator *)animator; - -/** - @abstract Called on each frame after animation application. - */ -- (void)animatorDidAnimate:(POPAnimator *)animator; - -@end diff --git a/Example/Pods/pop/pop/POPAnimator.mm b/Example/Pods/pop/pop/POPAnimator.mm deleted file mode 100644 index c3e988df..00000000 --- a/Example/Pods/pop/pop/POPAnimator.mm +++ /dev/null @@ -1,909 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -#import "POPAnimator.h" -#import "POPAnimatorPrivate.h" - -#import -#import - -#if !TARGET_OS_IPHONE -#import -#endif - -#import - -#import - -#import "POPAnimation.h" -#import "POPAnimationExtras.h" -#import "POPBasicAnimationInternal.h" -#import "POPDecayAnimation.h" - -using namespace std; -using namespace POP; - -#define ENABLE_LOGGING_DEBUG 0 -#define ENABLE_LOGGING_INFO 0 - -#if ENABLE_LOGGING_DEBUG -#define FBLogAnimDebug NSLog -#else -#define FBLogAnimDebug(...) -#endif - -#if ENABLE_LOGGING_INFO -#define FBLogAnimInfo NSLog -#else -#define FBLogAnimInfo(...) -#endif - -#if !TARGET_OS_IPHONE -static const uint64_t kDisplayTimerFrequency = 60ull; // Hz -#endif - -class POPAnimatorItem -{ -public: - id __weak object; - NSString *key; - POPAnimation *animation; - NSInteger refCount; - id __unsafe_unretained unretainedObject; - - POPAnimatorItem(id o, NSString *k, POPAnimation *a) POP_NOTHROW - { - object = o; - key = [k copy]; - animation = a; - refCount = 1; - unretainedObject = o; - } - - ~POPAnimatorItem() - { - } - - bool operator==(const POPAnimatorItem& o) const { - return unretainedObject == o.unretainedObject && animation == o.animation && [key isEqualToString:o.key]; - } - -}; - -typedef std::shared_ptr POPAnimatorItemRef; -typedef std::shared_ptr POPAnimatorItemConstRef; - -typedef std::list POPAnimatorItemList; -typedef POPAnimatorItemList::iterator POPAnimatorItemListIterator; -typedef POPAnimatorItemList::const_iterator POPAnimatorItemListConstIterator; - -#if !TARGET_OS_IPHONE -static BOOL _disableBackgroundThread = YES; -static uint64_t _displayTimerFrequency = kDisplayTimerFrequency; -#endif - -@interface POPAnimator () -{ -#if TARGET_OS_IPHONE - CADisplayLink *_displayLink; -#else - CVDisplayLinkRef _displayLink; - dispatch_source_t _displayTimer; - BOOL _displayTimerRunning; - int32_t _enqueuedRender; -#endif - POPAnimatorItemList _list; - CFMutableDictionaryRef _dict; - NSMutableArray *_observers; - POPAnimatorItemList _pendingList; - CFRunLoopObserverRef _pendingListObserver; - CFTimeInterval _slowMotionStartTime; - CFTimeInterval _slowMotionLastTime; - CFTimeInterval _slowMotionAccumulator; - CFTimeInterval _beginTime; - pthread_mutex_t _lock; - BOOL _disableDisplayLink; -} -@end - -@implementation POPAnimator -@synthesize delegate = _delegate; -@synthesize disableDisplayLink = _disableDisplayLink; -@synthesize beginTime = _beginTime; - -#if !TARGET_OS_IPHONE -static CVReturn displayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeStamp *now, const CVTimeStamp *outputTime, CVOptionFlags flagsIn, CVOptionFlags *flagsOut, void *context) -{ - if (_disableBackgroundThread) { - __unsafe_unretained POPAnimator *pa = (__bridge POPAnimator *)context; - int32_t* enqueuedRender = &pa->_enqueuedRender; - if (*enqueuedRender == 0) { - OSAtomicIncrement32(enqueuedRender); - dispatch_async(dispatch_get_main_queue(), ^{ - [(__bridge POPAnimator*)context render]; - OSAtomicDecrement32(enqueuedRender); - }); - } - } else { - [(__bridge POPAnimator*)context render]; - } - return kCVReturnSuccess; -} -#endif - -// call while holding lock -static void updateDisplayLink(POPAnimator *self) -{ - BOOL paused = (0 == self->_observers.count && self->_list.empty()) || self->_disableDisplayLink; - -#if TARGET_OS_IPHONE - if (paused != self->_displayLink.paused) { - FBLogAnimInfo(paused ? @"pausing display link" : @"unpausing display link"); - self->_displayLink.paused = paused; - } -#else - if (NULL != self->_displayLink) { - if (paused == CVDisplayLinkIsRunning(self->_displayLink)) { - FBLogAnimInfo(paused ? @"pausing display link" : @"unpausing display link"); - if (paused) { - CVDisplayLinkStop(self->_displayLink); - } else { - CVDisplayLinkStart(self->_displayLink); - } - } - } else { - if (paused == self->_displayTimerRunning) { - FBLogAnimInfo(paused ? @"pausing display timer" : @"unpausing display timer"); - if (paused) { - self->_displayTimerRunning = NO; - dispatch_suspend(self->_displayTimer); - } else { - self->_displayTimerRunning = YES; - dispatch_resume(self->_displayTimer); - } - } - } -#endif -} - -static void updateAnimatable(id obj, POPPropertyAnimationState *anim, bool shouldAvoidExtraneousWrite = false) -{ - // handle user-initiated stop or pause; halt animation - if (!anim->active || anim->paused) - return; - - if (anim->hasValue()) { - POPAnimatablePropertyWriteBlock write = anim->property.writeBlock; - if (NULL == write) - return; - - // current animation value - VectorRef currentVec = anim->currentValue(); - - if (!anim->additive) { - - // if avoiding extraneous writes and we have a read block defined - if (shouldAvoidExtraneousWrite) { - - POPAnimatablePropertyReadBlock read = anim->property.readBlock; - if (read) { - // compare current animation value with object value - Vector4r currentValue = currentVec->vector4r(); - Vector4r objectValue = read_values(read, obj, anim->valueCount); - if (objectValue == currentValue) { - return; - } - } - } - - // update previous values; support animation convergence - anim->previous2Vec = anim->previousVec; - anim->previousVec = currentVec; - - // write value - write(obj, currentVec->data()); - if (anim->tracing) { - [anim->tracer writePropertyValue:POPBox(currentVec, anim->valueType, true)]; - } - } else { - POPAnimatablePropertyReadBlock read = anim->property.readBlock; - NSCAssert(read, @"additive requires an animatable property readBlock"); - if (NULL == read) { - return; - } - - // object value - Vector4r objectValue = read_values(read, obj, anim->valueCount); - - // current value - Vector4r currentValue = currentVec->vector4r(); - - // determine animation change - if (anim->previousVec) { - Vector4r previousValue = anim->previousVec->vector4r(); - currentValue -= previousValue; - } - - // avoid writing no change - if (shouldAvoidExtraneousWrite && currentValue == Vector4r::Zero()) { - return; - } - - // add to object value - currentValue += objectValue; - - // update previous values; support animation convergence - anim->previous2Vec = anim->previousVec; - anim->previousVec = currentVec; - - // write value - write(obj, currentValue.data()); - if (anim->tracing) { - [anim->tracer writePropertyValue:POPBox(currentVec, anim->valueType, true)]; - } - } - } -} - -static void applyAnimationTime(id obj, POPAnimationState *state, CFTimeInterval time) -{ - if (!state->advanceTime(time, obj)) { - return; - } - - POPPropertyAnimationState *ps = dynamic_cast(state); - if (NULL != ps) { - updateAnimatable(obj, ps); - } - - state->delegateApply(); -} - -static void applyAnimationToValue(id obj, POPAnimationState *state) -{ - POPPropertyAnimationState *ps = dynamic_cast(state); - - if (NULL != ps) { - - // finalize progress - ps->finalizeProgress(); - - // write to value, updating only if needed - updateAnimatable(obj, ps, true); - } - - state->delegateApply(); -} - -static POPAnimation *deleteDictEntry(POPAnimator *self, id __unsafe_unretained obj, NSString *key, BOOL cleanup = YES) -{ - POPAnimation *anim = nil; - - // lock - pthread_mutex_lock(&self->_lock); - - NSMutableDictionary *keyAnimationsDict = (__bridge id)CFDictionaryGetValue(self->_dict, (__bridge void *)obj); - if (keyAnimationsDict) { - - anim = keyAnimationsDict[key]; - if (anim) { - - // remove key - [keyAnimationsDict removeObjectForKey:key]; - - // cleanup empty dictionaries - if (cleanup && 0 == keyAnimationsDict.count) { - CFDictionaryRemoveValue(self->_dict, (__bridge void *)obj); - } - } - } - - // unlock - pthread_mutex_unlock(&self->_lock); - return anim; -} - -static void stopAndCleanup(POPAnimator *self, POPAnimatorItemRef item, bool shouldRemove, bool finished) -{ - // remove - if (shouldRemove) { - deleteDictEntry(self, item->unretainedObject, item->key); - } - - // stop - POPAnimationState *state = POPAnimationGetState(item->animation); - state->stop(shouldRemove, finished); - - if (shouldRemove) { - // lock - pthread_mutex_lock(&self->_lock); - - // find item in list - // may have already been removed on animationDidStop: - POPAnimatorItemListIterator find_iter = find(self->_list.begin(), self->_list.end(), item); - BOOL found = find_iter != self->_list.end(); - - if (found) { - self->_list.erase(find_iter); - } - - // unlock - pthread_mutex_unlock(&self->_lock); - } -} - -+ (id)sharedAnimator -{ - static POPAnimator* _animator = nil; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - _animator = [[POPAnimator alloc] init]; - }); - return _animator; -} - -#if !TARGET_OS_IPHONE -+ (BOOL)disableBackgroundThread -{ - return _disableBackgroundThread; -} - -+ (void)setDisableBackgroundThread:(BOOL)flag -{ - _disableBackgroundThread = flag; -} - -+ (uint64_t)displayTimerFrequency -{ - return _displayTimerFrequency; -} - -+ (void)setDisplayTimerFrequency:(uint64_t)frequency -{ - _displayTimerFrequency = frequency; -} -#endif - -#pragma mark - Lifecycle - -- (instancetype)init -{ - self = [super init]; - if (nil == self) return nil; - -#if TARGET_OS_IPHONE - _displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(render)]; - _displayLink.paused = YES; - [_displayLink addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSRunLoopCommonModes]; -#else - CVReturn ret = CVDisplayLinkCreateWithActiveCGDisplays(&_displayLink); - if (kCVReturnSuccess != ret) { - ret = CVDisplayLinkCreateWithCGDisplay(CGMainDisplayID(), &_displayLink); - } - if (kCVReturnSuccess == ret) { - CVDisplayLinkSetOutputCallback(_displayLink, displayLinkCallback, (__bridge void *)self); - } else { - FBLogAnimInfo(@"cannot create display link: ret=%ld, falling back to display timer at %llu Hz", (long)ret, _displayTimerFrequency); - // Thanks to Apple, on older OSes DISPATCH_TIMER_STRICT is not supported and dispatch_source_create failed if we use it. - unsigned long mask = (NSFoundationVersionNumber >= NSFoundationVersionNumber10_9) ? DISPATCH_TIMER_STRICT : 0; - _displayTimer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, mask, dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0)); - NSAssert(nil != _displayTimer, @"Cannot create display timer"); - dispatch_source_set_timer(_displayTimer, DISPATCH_TIME_NOW, NSEC_PER_SEC / _displayTimerFrequency, 0); - __weak POPAnimator *weakSelf = self; - dispatch_source_set_event_handler(_displayTimer, ^{ - __strong POPAnimator *strongSelf = weakSelf; - if (__builtin_expect(nil != strongSelf, 1)) { - (void) displayLinkCallback(NULL, NULL, NULL, 0, NULL, (__bridge void *)strongSelf); - } - }); - } -#endif - - _dict = POPDictionaryCreateMutableWeakPointerToStrongObject(5); - pthread_mutex_init(&_lock, NULL); - - return self; -} - -#if !TARGET_OS_IPHONE -- (instancetype)initWithDisplayID:(CGDirectDisplayID)displayID -{ - if (kCGNullDirectDisplay == displayID) { - return [self init]; - } - - self = [super init]; - if (nil == self) return nil; - - CVReturn ret = CVDisplayLinkCreateWithCGDisplay(displayID, &_displayLink); - if (kCVReturnSuccess != ret) { - return nil; - } - CVDisplayLinkSetOutputCallback(_displayLink, displayLinkCallback, (__bridge void *)self); - - _dict = POPDictionaryCreateMutableWeakPointerToStrongObject(5); - pthread_mutex_init(&_lock, NULL); - - return self; -} -#endif - -- (void)dealloc -{ -#if TARGET_OS_IPHONE - [_displayLink invalidate]; -#else - if (_displayLink != NULL) { - CVDisplayLinkStop(_displayLink); - CVDisplayLinkRelease(_displayLink); - } - if (_displayTimer != NULL) { - dispatch_source_cancel(_displayTimer); -#if !OS_OBJECT_USE_OBJC - dispatch_release(_displayTimer); -#endif - _displayTimer = NULL; - } -#endif - [self _clearPendingListObserver]; - - pthread_mutex_destroy(&_lock); -} - -#pragma mark - Utility - -- (void)_processPendingList -{ - // rendering pending animations - CFTimeInterval time = [self _currentRenderTime]; - [self _renderTime:(0 != _beginTime) ? _beginTime : time items:_pendingList]; - - // lock - pthread_mutex_lock(&_lock); - - // clear list and observer - _pendingList.clear(); - [self _clearPendingListObserver]; - - // unlock - pthread_mutex_unlock(&_lock); -} - -- (void)_clearPendingListObserver -{ - if (_pendingListObserver) { - CFRunLoopRemoveObserver(CFRunLoopGetMain(), _pendingListObserver, kCFRunLoopCommonModes); - CFRelease(_pendingListObserver); - _pendingListObserver = NULL; - } -} - -- (void)_scheduleProcessPendingList -{ - // see WebKit for magic numbers, eg http://trac.webkit.org/changeset/166540 - static const CFIndex CATransactionCommitRunLoopOrder = 2000000; - static const CFIndex POPAnimationApplyRunLoopOrder = CATransactionCommitRunLoopOrder - 1; - - // lock - pthread_mutex_lock(&_lock); - - if (!_pendingListObserver) { - __weak POPAnimator *weakSelf = self; - - _pendingListObserver = CFRunLoopObserverCreateWithHandler(kCFAllocatorDefault, kCFRunLoopBeforeWaiting | kCFRunLoopExit, false, POPAnimationApplyRunLoopOrder, ^(CFRunLoopObserverRef observer, CFRunLoopActivity activity) { - [weakSelf _processPendingList]; - }); - - if (_pendingListObserver) { - CFRunLoopAddObserver(CFRunLoopGetMain(), _pendingListObserver, kCFRunLoopCommonModes); - } - } - - // unlock - pthread_mutex_unlock(&_lock); -} - -- (void)_renderTime:(CFTimeInterval)time items:(std::list)items -{ - // begin transaction with actions disabled - [CATransaction begin]; - [CATransaction setDisableActions:YES]; - - // notify delegate - __strong __typeof__(_delegate) delegate = _delegate; - [delegate animatorWillAnimate:self]; - - // lock - pthread_mutex_lock(&_lock); - - // count active animations - const NSUInteger count = items.size(); - if (0 == count) { - // unlock - pthread_mutex_unlock(&_lock); - } else { - // copy list into vector - std::vector vector{ items.begin(), items.end() }; - - // unlock - pthread_mutex_unlock(&_lock); - - for (auto item : vector) { - [self _renderTime:time item:item]; - } - } - - // notify observers - for (id observer in self.observers) { - [observer animatorDidAnimate:(id)self]; - } - - // lock - pthread_mutex_lock(&_lock); - - // update display link - updateDisplayLink(self); - - // unlock - pthread_mutex_unlock(&_lock); - - // notify delegate and commit - [delegate animatorDidAnimate:self]; - [CATransaction commit]; -} - -- (void)_renderTime:(CFTimeInterval)time item:(POPAnimatorItemRef)item -{ - id obj = item->object; - POPAnimation *anim = item->animation; - POPAnimationState *state = POPAnimationGetState(anim); - - if (nil == obj) { - // object exists not; stop animating - NSAssert(item->unretainedObject, @"object should exist"); - stopAndCleanup(self, item, true, false); - } else { - - // start if needed - state->startIfNeeded(obj, time, _slowMotionAccumulator); - - // only run active, not paused animations - if (state->active && !state->paused) { - // object exists; animate - applyAnimationTime(obj, state, time); - - FBLogAnimDebug(@"time:%f running:%@", time, item->animation); - if (state->isDone()) { - // set end value - applyAnimationToValue(obj, state); - - state->repeatCount--; - if (state->repeatForever || state->repeatCount > 0) { - if ([anim isKindOfClass:[POPPropertyAnimation class]]) { - POPPropertyAnimation *propAnim = (POPPropertyAnimation *)anim; - id oldFromValue = propAnim.fromValue; - propAnim.fromValue = propAnim.toValue; - - if (state->autoreverses) { - if (state->tracing) { - [state->tracer autoreversed]; - } - - if (state->type == kPOPAnimationDecay) { - POPDecayAnimation *decayAnimation = (POPDecayAnimation *)propAnim; - decayAnimation.velocity = [decayAnimation reversedVelocity]; - } else { - propAnim.toValue = oldFromValue; - } - } else { - if (state->type == kPOPAnimationDecay) { - POPDecayAnimation *decayAnimation = (POPDecayAnimation *)propAnim; - id originalVelocity = decayAnimation.originalVelocity; - decayAnimation.velocity = originalVelocity; - } else { - propAnim.fromValue = oldFromValue; - } - } - } - - state->stop(NO, NO); - state->reset(true); - - state->startIfNeeded(obj, time, _slowMotionAccumulator); - } else { - stopAndCleanup(self, item, state->removedOnCompletion, YES); - } - } - } - } -} - -#pragma mark - API - -- (NSArray *)observers -{ - // lock - pthread_mutex_lock(&_lock); - - // get observers - NSArray *observers = 0 != _observers.count ? [_observers copy] : nil; - - // unlock - pthread_mutex_unlock(&_lock); - return observers; -} - -- (void)addAnimation:(POPAnimation *)anim forObject:(id)obj key:(NSString *)key -{ - if (!anim || !obj) { - return; - } - - // support arbitrarily many nil keys - if (!key) { - key = [[NSUUID UUID] UUIDString]; - } - - // lock - pthread_mutex_lock(&_lock); - - // get key, animation dict associated with object - NSMutableDictionary *keyAnimationDict = (__bridge id)CFDictionaryGetValue(_dict, (__bridge void *)obj); - - // update associated animation state - if (nil == keyAnimationDict) { - keyAnimationDict = [NSMutableDictionary dictionary]; - CFDictionarySetValue(_dict, (__bridge void *)obj, (__bridge void *)keyAnimationDict); - } else { - // if the animation instance already exists, avoid cancelling only to restart - POPAnimation *existingAnim = keyAnimationDict[key]; - if (existingAnim) { - // unlock - pthread_mutex_unlock(&_lock); - - if (existingAnim == anim) { - return; - } - [self removeAnimationForObject:obj key:key cleanupDict:NO]; - - // lock - pthread_mutex_lock(&_lock); - } - } - keyAnimationDict[key] = anim; - - // create entry after potential removal - POPAnimatorItemRef item(new POPAnimatorItem(obj, key, anim)); - - // add to list and pending list - _list.push_back(item); - _pendingList.push_back(item); - - // support animation re-use, reset all animation state - POPAnimationGetState(anim)->reset(true); - - // update display link - updateDisplayLink(self); - - // unlock - pthread_mutex_unlock(&_lock); - - // schedule runloop processing of pending animations - [self _scheduleProcessPendingList]; -} - -- (void)removeAllAnimationsForObject:(id)obj -{ - // lock - pthread_mutex_lock(&_lock); - - NSArray *animations = [(__bridge id)CFDictionaryGetValue(_dict, (__bridge void *)obj) allValues]; - CFDictionaryRemoveValue(_dict, (__bridge void *)obj); - - // unlock - pthread_mutex_unlock(&_lock); - - if (0 == animations.count) { - return; - } - - NSHashTable *animationSet = [[NSHashTable alloc] initWithOptions:NSHashTableObjectPointerPersonality capacity:animations.count]; - for (id animation in animations) { - [animationSet addObject:animation]; - } - - // lock - pthread_mutex_lock(&_lock); - - POPAnimatorItemRef item; - for (auto iter = _list.begin(); iter != _list.end();) { - item = *iter; - if(![animationSet containsObject:item->animation]) { - iter++; - } else { - iter = _list.erase(iter); - } - } - - // unlock - pthread_mutex_unlock(&_lock); - - for (POPAnimation *anim in animations) { - POPAnimationState *state = POPAnimationGetState(anim); - state->stop(true, !state->active); - } -} - -- (void)removeAnimationForObject:(id)obj key:(NSString *)key cleanupDict:(BOOL)cleanupDict -{ - POPAnimation *anim = deleteDictEntry(self, obj, key, cleanupDict); - if (nil == anim) { - return; - } - - // lock - pthread_mutex_lock(&_lock); - - // remove from list - POPAnimatorItemRef item; - for (auto iter = _list.begin(); iter != _list.end();) { - item = *iter; - if(anim == item->animation) { - _list.erase(iter); - break; - } else { - iter++; - } - } - - // remove from pending list - for (auto iter = _pendingList.begin(); iter != _pendingList.end();) { - item = *iter; - if(anim == item->animation) { - _pendingList.erase(iter); - break; - } else { - iter++; - } - } - - // unlock - pthread_mutex_unlock(&_lock); - - // stop animation and callout - POPAnimationState *state = POPAnimationGetState(anim); - state->stop(true, (!state->active && !state->paused)); -} - -- (void)removeAnimationForObject:(id)obj key:(NSString *)key -{ - [self removeAnimationForObject:obj key:key cleanupDict:YES]; -} - -- (NSArray *)animationKeysForObject:(id)obj -{ - // lock - pthread_mutex_lock(&_lock); - - // get keys - NSArray *keys = [(__bridge NSDictionary *)CFDictionaryGetValue(_dict, (__bridge void *)obj) allKeys]; - - // unlock - pthread_mutex_unlock(&_lock); - return keys; -} - -- (id)animationForObject:(id)obj key:(NSString *)key -{ - // lock - pthread_mutex_lock(&_lock); - - // lookup animation - NSDictionary *keyAnimationsDict = (__bridge id)CFDictionaryGetValue(_dict, (__bridge void *)obj); - POPAnimation *animation = keyAnimationsDict[key]; - - // unlock - pthread_mutex_unlock(&_lock); - return animation; -} - -- (CFTimeInterval)refreshPeriod -{ -#if TARGET_OS_IPHONE - return self->_displayLink.duration; -#else - if (NULL != self->_displayLink) { - CVTime period = CVDisplayLinkGetNominalOutputVideoRefreshPeriod(self->_displayLink); - if (period.flags & kCVTimeIsIndefinite) { - return 0; - } - return ((CFTimeInterval)period.timeValue / (CFTimeInterval)period.timeScale); - } - return (1.0 / (CFTimeInterval)_displayTimerFrequency); -#endif -} - -- (CFTimeInterval)_currentRenderTime -{ - CFTimeInterval time = CACurrentMediaTime(); - -#if TARGET_IPHONE_SIMULATOR - // support slow-motion animations - time += _slowMotionAccumulator; - float f = POPAnimationDragCoefficient(); - - if (f > 1.0) { - if (!_slowMotionStartTime) { - _slowMotionStartTime = time; - } else { - time = (time - _slowMotionStartTime) / f + _slowMotionStartTime; - _slowMotionLastTime = time; - } - } else if (_slowMotionStartTime) { - CFTimeInterval dt = (_slowMotionLastTime - time); - time += dt; - _slowMotionAccumulator += dt; - _slowMotionStartTime = 0; - } -#endif - - return time; -} - -- (void)render -{ - CFTimeInterval time = [self _currentRenderTime]; - [self renderTime:time]; -} - -- (void)renderTime:(CFTimeInterval)time -{ - [self _renderTime:time items:_list]; -} - -- (void)addObserver:(id)observer -{ - NSAssert(nil != observer, @"attempting to add nil %@ observer", self); - if (nil == observer) { - return; - } - - // lock - pthread_mutex_lock(&_lock); - - if (!_observers) { - // use ordered collection for deterministic callout - _observers = [[NSMutableArray alloc] initWithCapacity:1]; - } - - [_observers addObject:observer]; - updateDisplayLink(self); - - // unlock - pthread_mutex_unlock(&_lock); -} - -- (void)removeObserver:(id)observer -{ - NSAssert(nil != observer, @"attempting to remove nil %@ observer", self); - if (nil == observer) { - return; - } - - // lock - pthread_mutex_lock(&_lock); - - [_observers removeObject:observer]; - updateDisplayLink(self); - - // unlock - pthread_mutex_unlock(&_lock); -} - -@end diff --git a/Example/Pods/pop/pop/POPAnimatorPrivate.h b/Example/Pods/pop/pop/POPAnimatorPrivate.h deleted file mode 100644 index 8ddf2e0d..00000000 --- a/Example/Pods/pop/pop/POPAnimatorPrivate.h +++ /dev/null @@ -1,74 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -@class POPAnimation; - -@protocol POPAnimatorObserving -@required - -/** - @abstract Called on each observer after animator has advanced. Core Animation actions are disabled by default. - */ -- (void)animatorDidAnimate:(POPAnimator *)animator; - -@end - -@interface POPAnimator () - -#if !TARGET_OS_IPHONE -/** - Determines whether or not to use a high priority background thread for animation updates. Using a background thread can result in faster, more responsive updates, but may be less compatible. Defaults to YES. - */ -+ (BOOL)disableBackgroundThread; -+ (void)setDisableBackgroundThread:(BOOL)flag; - -/** - Determines the frequency (Hz) of the timer used when no display is available. Defaults to 60Hz. - */ -+ (uint64_t)displayTimerFrequency; -+ (void)setDisplayTimerFrequency:(uint64_t)frequency; -#endif - -/** - Used for externally driven animator instances. - */ -@property (assign, nonatomic) BOOL disableDisplayLink; - -/** - Time used when starting animations. Defaults to 0 meaning current media time is used. Exposed for unit testing. - */ -@property (assign, nonatomic) CFTimeInterval beginTime; - -/** - Exposed for unit testing. - */ -- (void)renderTime:(CFTimeInterval)time; - -/** - Funnel methods for category additions. - */ -- (void)addAnimation:(POPAnimation *)anim forObject:(id)obj key:(NSString *)key; -- (void)removeAllAnimationsForObject:(id)obj; -- (void)removeAnimationForObject:(id)obj key:(NSString *)key; -- (NSArray *)animationKeysForObject:(id)obj; -- (POPAnimation *)animationForObject:(id)obj key:(NSString *)key; - -/** - @abstract Add an animator observer. Observer will be notified of each subsequent animator advance until removal. - */ -- (void)addObserver:(id)observer; - -/** - @abstract Remove an animator observer. - */ -- (void)removeObserver:(id)observer; - -@end diff --git a/Example/Pods/pop/pop/POPBasicAnimation.h b/Example/Pods/pop/pop/POPBasicAnimation.h deleted file mode 100644 index ce2e23af..00000000 --- a/Example/Pods/pop/pop/POPBasicAnimation.h +++ /dev/null @@ -1,71 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -/** - @abstract A concrete basic animation class. - @discussion Animation is achieved through interpolation. - */ -@interface POPBasicAnimation : POPPropertyAnimation - -/** - @abstract The designated initializer. - @returns An instance of a basic animation. - */ -+ (instancetype)animation; - -/** - @abstract Convenience initializer that returns an animation with animatable property of name. - @param name The name of the animatable property. - @returns An instance of a basic animation configured with specified animatable property. - */ -+ (instancetype)animationWithPropertyNamed:(NSString *)name; - -/** - @abstract Convenience constructor. - @returns Returns a basic animation with kCAMediaTimingFunctionDefault timing function. - */ -+ (instancetype)defaultAnimation; - -/** - @abstract Convenience constructor. - @returns Returns a basic animation with kCAMediaTimingFunctionLinear timing function. - */ -+ (instancetype)linearAnimation; - -/** - @abstract Convenience constructor. - @returns Returns a basic animation with kCAMediaTimingFunctionEaseIn timing function. - */ -+ (instancetype)easeInAnimation; - -/** - @abstract Convenience constructor. - @returns Returns a basic animation with kCAMediaTimingFunctionEaseOut timing function. - */ -+ (instancetype)easeOutAnimation; - -/** - @abstract Convenience constructor. - @returns Returns a basic animation with kCAMediaTimingFunctionEaseInEaseOut timing function. - */ -+ (instancetype)easeInEaseOutAnimation; - -/** - @abstract The duration in seconds. Defaults to 0.4. - */ -@property (assign, nonatomic) CFTimeInterval duration; - -/** - @abstract A timing function defining the pacing of the animation. Defaults to nil indicating pacing according to kCAMediaTimingFunctionDefault. - */ -@property (strong, nonatomic) CAMediaTimingFunction *timingFunction; - -@end diff --git a/Example/Pods/pop/pop/POPBasicAnimation.mm b/Example/Pods/pop/pop/POPBasicAnimation.mm deleted file mode 100644 index 2843c993..00000000 --- a/Example/Pods/pop/pop/POPBasicAnimation.mm +++ /dev/null @@ -1,106 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -#import "POPBasicAnimationInternal.h" - -@implementation POPBasicAnimation - -#undef __state -#define __state ((POPBasicAnimationState *)_state) - -#pragma mark - Lifecycle - -+ (instancetype)animation -{ - return [[self alloc] init]; -} - -+ (instancetype)animationWithPropertyNamed:(NSString *)aName -{ - POPBasicAnimation *anim = [self animation]; - anim.property = [POPAnimatableProperty propertyWithName:aName]; - return anim; -} - -- (void)_initState -{ - _state = new POPBasicAnimationState(self); -} - -+ (instancetype)linearAnimation -{ - POPBasicAnimation *anim = [self animation]; - anim.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear]; - return anim; -} - -+ (instancetype)easeInAnimation -{ - POPBasicAnimation *anim = [self animation]; - anim.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn]; - return anim; -} - -+ (instancetype)easeOutAnimation -{ - POPBasicAnimation *anim = [self animation]; - anim.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut]; - return anim; -} - -+ (instancetype)easeInEaseOutAnimation -{ - POPBasicAnimation *anim = [self animation]; - anim.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; - return anim; -} - -+ (instancetype)defaultAnimation -{ - POPBasicAnimation *anim = [self animation]; - anim.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionDefault]; - return anim; -} - -- (id)init -{ - return [self _init]; -} - -#pragma mark - Properties - -DEFINE_RW_PROPERTY(POPBasicAnimationState, duration, setDuration:, CFTimeInterval); -DEFINE_RW_PROPERTY_OBJ(POPBasicAnimationState, timingFunction, setTimingFunction:, CAMediaTimingFunction*, __state->updatedTimingFunction();); - -#pragma mark - Utility - -- (void)_appendDescription:(NSMutableString *)s debug:(BOOL)debug -{ - [super _appendDescription:s debug:debug]; - if (__state->duration) - [s appendFormat:@"; duration = %f", __state->duration]; -} - -@end - -@implementation POPBasicAnimation (NSCopying) - -- (instancetype)copyWithZone:(NSZone *)zone { - - POPBasicAnimation *copy = [super copyWithZone:zone]; - - if (copy) { - copy.duration = self.duration; - copy.timingFunction = self.timingFunction; // not a 'copy', but timing functions are publicly immutable. - } - - return copy; -} - -@end \ No newline at end of file diff --git a/Example/Pods/pop/pop/POPBasicAnimationInternal.h b/Example/Pods/pop/pop/POPBasicAnimationInternal.h deleted file mode 100644 index 14dd64d4..00000000 --- a/Example/Pods/pop/pop/POPBasicAnimationInternal.h +++ /dev/null @@ -1,97 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -#import "POPBasicAnimation.h" - -#import "POPPropertyAnimationInternal.h" - -// default animation duration -static CGFloat const kPOPAnimationDurationDefault = 0.4; - -// progress threshold for computing done -static CGFloat const kPOPProgressThreshold = 1e-6; - -static void interpolate(POPValueType valueType, NSUInteger count, const CGFloat *fromVec, const CGFloat *toVec, CGFloat *outVec, CGFloat p) -{ - switch (valueType) { - case kPOPValueInteger: - case kPOPValueFloat: - case kPOPValuePoint: - case kPOPValueSize: - case kPOPValueRect: - case kPOPValueEdgeInsets: - case kPOPValueColor: - POPInterpolateVector(count, outVec, fromVec, toVec, p); - break; - default: - NSCAssert(false, @"unhandled type %d", valueType); - break; - } -} - -struct _POPBasicAnimationState : _POPPropertyAnimationState -{ - CAMediaTimingFunction *timingFunction; - double timingControlPoints[4]; - CFTimeInterval duration; - CFTimeInterval timeProgress; - - _POPBasicAnimationState(id __unsafe_unretained anim) : _POPPropertyAnimationState(anim), - timingFunction(nil), - timingControlPoints{0.}, - duration(kPOPAnimationDurationDefault), - timeProgress(0.) - { - type = kPOPAnimationBasic; - } - - bool isDone() { - if (_POPPropertyAnimationState::isDone()) { - return true; - } - return timeProgress + kPOPProgressThreshold >= 1.; - } - - void updatedTimingFunction() - { - float vec[4] = {0.}; - [timingFunction getControlPointAtIndex:1 values:&vec[0]]; - [timingFunction getControlPointAtIndex:2 values:&vec[2]]; - for (NSUInteger idx = 0; idx < POP_ARRAY_COUNT(vec); idx++) { - timingControlPoints[idx] = vec[idx]; - } - } - - bool advance(CFTimeInterval time, CFTimeInterval dt, id obj) { - // default timing function - if (!timingFunction) { - ((POPBasicAnimation *)self).timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionDefault]; - } - - // solve for normalized time, aka progress [0, 1] - CGFloat p = 1.0f; - if (duration > 0.0f) { - // cap local time to duration - CFTimeInterval t = MIN(time - startTime, duration) / duration; - p = POPTimingFunctionSolve(timingControlPoints, t, SOLVE_EPS(duration)); - timeProgress = t; - } else { - timeProgress = 1.; - } - - // interpolate and advance - interpolate(valueType, valueCount, fromVec->data(), toVec->data(), currentVec->data(), p); - progress = p; - clampCurrentValue(); - - return true; - } -}; - -typedef struct _POPBasicAnimationState POPBasicAnimationState; diff --git a/Example/Pods/pop/pop/POPCGUtils.h b/Example/Pods/pop/pop/POPCGUtils.h deleted file mode 100644 index c8439478..00000000 --- a/Example/Pods/pop/pop/POPCGUtils.h +++ /dev/null @@ -1,152 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -#if TARGET_OS_IPHONE -#import -#else -#import -#endif - -#import "POPDefines.h" - -#if SCENEKIT_SDK_AVAILABLE -#import -#endif - -POP_EXTERN_C_BEGIN - -NS_INLINE CGPoint values_to_point(const CGFloat values[]) -{ - return CGPointMake(values[0], values[1]); -} - -NS_INLINE CGSize values_to_size(const CGFloat values[]) -{ - return CGSizeMake(values[0], values[1]); -} - -NS_INLINE CGRect values_to_rect(const CGFloat values[]) -{ - return CGRectMake(values[0], values[1], values[2], values[3]); -} - -#if SCENEKIT_SDK_AVAILABLE -NS_INLINE SCNVector3 values_to_vec3(const CGFloat values[]) -{ - return SCNVector3Make(values[0], values[1], values[2]); -} - -NS_INLINE SCNVector4 values_to_vec4(const CGFloat values[]) -{ - return SCNVector4Make(values[0], values[1], values[2], values[3]); -} -#endif - -#if TARGET_OS_IPHONE - -NS_INLINE UIEdgeInsets values_to_edge_insets(const CGFloat values[]) -{ - return UIEdgeInsetsMake(values[0], values[1], values[2], values[3]); -} - -#endif - -NS_INLINE void values_from_point(CGFloat values[], CGPoint p) -{ - values[0] = p.x; - values[1] = p.y; -} - -NS_INLINE void values_from_size(CGFloat values[], CGSize s) -{ - values[0] = s.width; - values[1] = s.height; -} - -NS_INLINE void values_from_rect(CGFloat values[], CGRect r) -{ - values[0] = r.origin.x; - values[1] = r.origin.y; - values[2] = r.size.width; - values[3] = r.size.height; -} - -#if SCENEKIT_SDK_AVAILABLE -NS_INLINE void values_from_vec3(CGFloat values[], SCNVector3 v) -{ - values[0] = v.x; - values[1] = v.y; - values[2] = v.z; -} - -NS_INLINE void values_from_vec4(CGFloat values[], SCNVector4 v) -{ - values[0] = v.x; - values[1] = v.y; - values[2] = v.z; - values[3] = v.w; -} -#endif - -#if TARGET_OS_IPHONE - -NS_INLINE void values_from_edge_insets(CGFloat values[], UIEdgeInsets i) -{ - values[0] = i.top; - values[1] = i.left; - values[2] = i.bottom; - values[3] = i.right; -} - -#endif - -/** - Takes a CGColorRef and converts it into RGBA components, if necessary. - */ -extern void POPCGColorGetRGBAComponents(CGColorRef color, CGFloat components[]); - -/** - Takes RGBA components and returns a CGColorRef. - */ -extern CGColorRef POPCGColorRGBACreate(const CGFloat components[]) CF_RETURNS_RETAINED; - -/** - Takes a color reference and returns a CGColor. - */ -extern CGColorRef POPCGColorWithColor(id color) CF_RETURNS_NOT_RETAINED; - -#if TARGET_OS_IPHONE - -/** - Takes a UIColor and converts it into RGBA components, if necessary. - */ -extern void POPUIColorGetRGBAComponents(UIColor *color, CGFloat components[]); - -/** - Takes RGBA components and returns a UIColor. - */ -extern UIColor *POPUIColorRGBACreate(const CGFloat components[]) NS_RETURNS_RETAINED; - -#else - -/** - Takes a NSColor and converts it into RGBA components, if necessary. - */ -extern void POPNSColorGetRGBAComponents(NSColor *color, CGFloat components[]); - -/** - Takes RGBA components and returns a NSColor. - */ -extern NSColor *POPNSColorRGBACreate(const CGFloat components[]) NS_RETURNS_RETAINED; - -#endif - -POP_EXTERN_C_END diff --git a/Example/Pods/pop/pop/POPCGUtils.mm b/Example/Pods/pop/pop/POPCGUtils.mm deleted file mode 100644 index acc7dfec..00000000 --- a/Example/Pods/pop/pop/POPCGUtils.mm +++ /dev/null @@ -1,150 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -#import "POPCGUtils.h" - -#import - -void POPCGColorGetRGBAComponents(CGColorRef color, CGFloat components[]) -{ - if (color) { - const CGFloat *colors = CGColorGetComponents(color); - size_t count = CGColorGetNumberOfComponents(color); - - if (4 == count) { - // RGB colorspace - components[0] = colors[0]; - components[1] = colors[1]; - components[2] = colors[2]; - components[3] = colors[3]; - } else if (2 == count) { - // Grey colorspace - components[0] = components[1] = components[2] = colors[0]; - components[3] = colors[1]; - } else { - // Use CI to convert - CIColor *ciColor = [CIColor colorWithCGColor:color]; - components[0] = ciColor.red; - components[1] = ciColor.green; - components[2] = ciColor.blue; - components[3] = ciColor.alpha; - } - } else { - memset(components, 0, 4 * sizeof(components[0])); - } -} - -CGColorRef POPCGColorRGBACreate(const CGFloat components[]) -{ -#if TARGET_OS_IPHONE - CGColorSpaceRef space = CGColorSpaceCreateDeviceRGB(); - CGColorRef color = CGColorCreate(space, components); - CGColorSpaceRelease(space); - return color; -#else - return CGColorCreateGenericRGB(components[0], components[1], components[2], components[3]); -#endif -} - -CGColorRef POPCGColorWithColor(id color) -{ - if (CFGetTypeID((__bridge CFTypeRef)color) == CGColorGetTypeID()) { - return ((__bridge CGColorRef)color); - } -#if TARGET_OS_IPHONE - else if ([color isKindOfClass:[UIColor class]]) { - return [color CGColor]; - } -#else - else if ([color isKindOfClass:[NSColor class]]) { - // -[NSColor CGColor] is only supported since OSX 10.8+ - if ([color respondsToSelector:@selector(CGColor)]) { - return [color CGColor]; - } - - /* - * Otherwise create a CGColorRef manually. - * - * The original accessor is (or would be) declared as: - * @property(readonly) CGColorRef CGColor; - * - (CGColorRef)CGColor NS_RETURNS_INNER_POINTER CF_RETURNS_NOT_RETAINED; - * - * (Please note that OSX' accessor is atomic, while iOS' isn't.) - * - * The access to the NSColor object must thus be synchronized - * and the CGColorRef be stored as an associated object, - * to return a reference which doesn't need to be released manually. - */ - @synchronized(color) { - static const void* key = &key; - - CGColorRef colorRef = (__bridge CGColorRef)objc_getAssociatedObject(color, key); - - if (!colorRef) { - size_t numberOfComponents = [(NSColor *)color numberOfComponents]; - CGFloat components[numberOfComponents]; - CGColorSpaceRef colorSpace = [[(NSColor *)color colorSpace] CGColorSpace]; - - [color getComponents:components]; - - colorRef = CGColorCreate(colorSpace, components); - - objc_setAssociatedObject(color, key, (__bridge id)colorRef, OBJC_ASSOCIATION_RETAIN_NONATOMIC); - CGColorRelease(colorRef); - } - - return colorRef; - } - } -#endif - return nil; -} - -#if TARGET_OS_IPHONE - -void POPUIColorGetRGBAComponents(UIColor *color, CGFloat components[]) -{ - return POPCGColorGetRGBAComponents(POPCGColorWithColor(color), components); -} - -UIColor *POPUIColorRGBACreate(const CGFloat components[]) -{ - CGColorRef colorRef = POPCGColorRGBACreate(components); - UIColor *color = [[UIColor alloc] initWithCGColor:colorRef]; - CGColorRelease(colorRef); - return color; -} - -#else - -void POPNSColorGetRGBAComponents(NSColor *color, CGFloat components[]) -{ - return POPCGColorGetRGBAComponents(POPCGColorWithColor(color), components); -} - -NSColor *POPNSColorRGBACreate(const CGFloat components[]) -{ - CGColorRef colorRef = POPCGColorRGBACreate(components); - NSColor *color = nil; - - if (colorRef) { - if ([NSColor respondsToSelector:@selector(colorWithCGColor:)]) { - color = [NSColor colorWithCGColor:colorRef]; - } else { - color = [NSColor colorWithCIColor:[CIColor colorWithCGColor:colorRef]]; - } - - CGColorRelease(colorRef); - } - - return color; -} - -#endif - diff --git a/Example/Pods/pop/pop/POPCustomAnimation.h b/Example/Pods/pop/pop/POPCustomAnimation.h deleted file mode 100644 index 501a755b..00000000 --- a/Example/Pods/pop/pop/POPCustomAnimation.h +++ /dev/null @@ -1,46 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -@class POPCustomAnimation; - -/** - @abstract POPCustomAnimationBlock is the callback block of a custom animation. - @discussion This block will be executed for each animation frame and should update the property or properties being animated based on current timing. - @param target The object being animated. Reference the passed in target to help avoid retain loops. - @param animation The custom animation instance. Use to determine the current and elapsed time since last callback. Reference the passed in animation to help avoid retain loops. - @return Flag indicating whether the animation should continue animating. Return NO to indicate animation is done. - */ -typedef BOOL (^POPCustomAnimationBlock)(id target, POPCustomAnimation *animation); - -/** - @abstract POPCustomAnimation is a concrete animation subclass for custom animations. - */ -@interface POPCustomAnimation : POPAnimation - -/** -@abstract Creates and returns an initialized custom animation instance. -@discussion This is the designated initializer. -@param block The custom animation callback block. See {@ref POPCustomAnimationBlock}. -@return The initialized custom animation instance. -*/ -+ (instancetype)animationWithBlock:(POPCustomAnimationBlock)block; - -/** - @abstract The current animation time at time of callback. - */ -@property (readonly, nonatomic) CFTimeInterval currentTime; - -/** - @abstract The elapsed animation time since last callback. - */ -@property (readonly, nonatomic) CFTimeInterval elapsedTime; - -@end diff --git a/Example/Pods/pop/pop/POPCustomAnimation.mm b/Example/Pods/pop/pop/POPCustomAnimation.mm deleted file mode 100644 index 8cb79135..00000000 --- a/Example/Pods/pop/pop/POPCustomAnimation.mm +++ /dev/null @@ -1,75 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -#import "POPAnimationInternal.h" - -#import "POPCustomAnimation.h" - -@interface POPCustomAnimation () -@property (nonatomic, copy) POPCustomAnimationBlock animate; -@end - -@implementation POPCustomAnimation -@synthesize currentTime = _currentTime; -@synthesize elapsedTime = _elapsedTime; -@synthesize animate = _animate; - -+ (instancetype)animationWithBlock:(BOOL(^)(id target, POPCustomAnimation *))block -{ - POPCustomAnimation *b = [[self alloc] _init]; - b.animate = block; - return b; -} - -- (id)_init -{ - self = [super _init]; - if (nil != self) { - _state->type = kPOPAnimationCustom; - } - return self; -} - -- (CFTimeInterval)beginTime -{ - POPAnimationState *s = POPAnimationGetState(self); - return s->startTime > 0 ? s->startTime : s->beginTime; -} - -- (BOOL)_advance:(id)object currentTime:(CFTimeInterval)currentTime elapsedTime:(CFTimeInterval)elapsedTime -{ - _currentTime = currentTime; - _elapsedTime = elapsedTime; - return _animate(object, self); -} - -- (void)_appendDescription:(NSMutableString *)s debug:(BOOL)debug -{ - [s appendFormat:@"; elapsedTime = %f; currentTime = %f;", _elapsedTime, _currentTime]; -} - -@end - -/** - * Note that only the animate block is copied, but not the current/elapsed times - */ -@implementation POPCustomAnimation (NSCopying) - -- (instancetype)copyWithZone:(NSZone *)zone { - - POPCustomAnimation *copy = [super copyWithZone:zone]; - - if (copy) { - copy.animate = self.animate; - } - - return copy; -} - -@end \ No newline at end of file diff --git a/Example/Pods/pop/pop/POPDecayAnimation.h b/Example/Pods/pop/pop/POPDecayAnimation.h deleted file mode 100644 index 92c6b604..00000000 --- a/Example/Pods/pop/pop/POPDecayAnimation.h +++ /dev/null @@ -1,66 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -/** - @abstract A concrete decay animation class. - @discussion Animation is achieved through gradual decay of animation value. - */ -@interface POPDecayAnimation : POPPropertyAnimation - -/** - @abstract The designated initializer. - @returns An instance of a decay animation. - */ -+ (instancetype)animation; - -/** - @abstract Convenience initializer that returns an animation with animatable property of name. - @param name The name of the animatable property. - @returns An instance of a decay animation configured with specified animatable property. - */ -+ (instancetype)animationWithPropertyNamed:(NSString *)name; - -/** - @abstract The current velocity value. - @discussion Set before animation start to account for initial velocity. Expressed in change of value units per second. The only POPValueTypes supported for velocity are: kPOPValuePoint, kPOPValueInteger, kPOPValueFloat, kPOPValueRect, and kPOPValueSize. - */ -@property (copy, nonatomic) id velocity; - -/** - @abstract The original velocity value. - @discussion Since the velocity property is modified as the animation progresses, this property stores the original, passed in velocity to support autoreverse and repeatCount. - */ -@property (copy, nonatomic, readonly) id originalVelocity; - -/** - @abstract The deceleration factor. - @discussion Values specifies should be in the range [0, 1]. Lower values results in faster deceleration. Defaults to 0.998. - */ -@property (assign, nonatomic) CGFloat deceleration; - -/** - @abstract The expected duration. - @discussion Derived based on input velocity and deceleration values. - */ -@property (readonly, assign, nonatomic) CFTimeInterval duration; - -/** - The to value is derived based on input velocity and deceleration. - */ -- (void)setToValue:(id)toValue NS_UNAVAILABLE; - -/** - @abstract The reversed velocity. - @discussion The reversed velocity based on the originalVelocity when the animation was set up. - */ -- (id)reversedVelocity; - -@end diff --git a/Example/Pods/pop/pop/POPDecayAnimation.mm b/Example/Pods/pop/pop/POPDecayAnimation.mm deleted file mode 100644 index 4698fd0d..00000000 --- a/Example/Pods/pop/pop/POPDecayAnimation.mm +++ /dev/null @@ -1,203 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -#import "POPDecayAnimationInternal.h" - -#if TARGET_OS_IPHONE -#import -#endif - -const POPValueType supportedVelocityTypes[6] = { kPOPValuePoint, kPOPValueInteger, kPOPValueFloat, kPOPValueRect, kPOPValueSize, kPOPValueEdgeInsets }; - -@implementation POPDecayAnimation - -#pragma mark - Lifecycle - -#undef __state -#define __state ((POPDecayAnimationState *)_state) - -+ (instancetype)animation -{ - return [[self alloc] init]; -} - -+ (instancetype)animationWithPropertyNamed:(NSString *)aName -{ - POPDecayAnimation *anim = [self animation]; - anim.property = [POPAnimatableProperty propertyWithName:aName]; - return anim; -} - -- (id)init -{ - return [self _init]; -} - -- (void)_initState -{ - _state = new POPDecayAnimationState(self); -} - -#pragma mark - Properties - -DEFINE_RW_PROPERTY(POPDecayAnimationState, deceleration, setDeceleration:, CGFloat, __state->toVec = NULL;); - -@dynamic velocity; - -- (id)toValue -{ - [self _ensureComputedProperties]; - return POPBox(__state->toVec, __state->valueType); -} - -- (CFTimeInterval)duration -{ - [self _ensureComputedProperties]; - return __state->duration; -} - -- (void)setFromValue:(id)fromValue -{ - super.fromValue = fromValue; - [self _invalidateComputedProperties]; -} - -- (void)setToValue:(id)aValue -{ - // no-op - NSLog(@"ignoring to value on decay animation %@", self); -} - -- (id)reversedVelocity -{ - id reversedVelocity = nil; - - POPValueType velocityType = POPSelectValueType(self.originalVelocity, supportedVelocityTypes, POP_ARRAY_COUNT(supportedVelocityTypes)); - if (velocityType == kPOPValueFloat) { -#if CGFLOAT_IS_DOUBLE - CGFloat originalVelocityFloat = [(NSNumber *)self.originalVelocity doubleValue]; -#else - CGFloat originalVelocityFloat = [(NSNumber *)self.originalVelocity floatValue]; -#endif - NSNumber *negativeOriginalVelocityNumber = @(-originalVelocityFloat); - reversedVelocity = negativeOriginalVelocityNumber; - } else if (velocityType == kPOPValueInteger) { - NSInteger originalVelocityInteger = [(NSNumber *)self.originalVelocity integerValue]; - NSNumber *negativeOriginalVelocityNumber = @(-originalVelocityInteger); - reversedVelocity = negativeOriginalVelocityNumber; - } else if (velocityType == kPOPValuePoint) { - CGPoint originalVelocityPoint = [self.originalVelocity CGPointValue]; - CGPoint negativeOriginalVelocityPoint = CGPointMake(-originalVelocityPoint.x, -originalVelocityPoint.y); - reversedVelocity = [NSValue valueWithCGPoint:negativeOriginalVelocityPoint]; - } else if (velocityType == kPOPValueRect) { - CGRect originalVelocityRect = [self.originalVelocity CGRectValue]; - CGRect negativeOriginalVelocityRect = CGRectMake(-originalVelocityRect.origin.x, -originalVelocityRect.origin.y, -originalVelocityRect.size.width, -originalVelocityRect.size.height); - reversedVelocity = [NSValue valueWithCGRect:negativeOriginalVelocityRect]; - } else if (velocityType == kPOPValueSize) { - CGSize originalVelocitySize = [self.originalVelocity CGSizeValue]; - CGSize negativeOriginalVelocitySize = CGSizeMake(-originalVelocitySize.width, -originalVelocitySize.height); - reversedVelocity = [NSValue valueWithCGSize:negativeOriginalVelocitySize]; - } else if (velocityType == kPOPValueEdgeInsets) { -#if TARGET_OS_IPHONE - UIEdgeInsets originalVelocityInsets = [self.originalVelocity UIEdgeInsetsValue]; - UIEdgeInsets negativeOriginalVelocityInsets = UIEdgeInsetsMake(-originalVelocityInsets.top, -originalVelocityInsets.left, -originalVelocityInsets.bottom, -originalVelocityInsets.right); - reversedVelocity = [NSValue valueWithUIEdgeInsets:negativeOriginalVelocityInsets]; -#endif - } - - return reversedVelocity; -} - -- (id)originalVelocity -{ - return POPBox(__state->originalVelocityVec, __state->valueType); -} - -- (id)velocity -{ - return POPBox(__state->velocityVec, __state->valueType); -} - -- (void)setVelocity:(id)aValue -{ - POPValueType valueType = POPSelectValueType(aValue, supportedVelocityTypes, POP_ARRAY_COUNT(supportedVelocityTypes)); - if (valueType != kPOPValueUnknown) { - VectorRef vec = POPUnbox(aValue, __state->valueType, __state->valueCount, YES); - VectorRef origVec = POPUnbox(aValue, __state->valueType, __state->valueCount, YES); - - if (!vec_equal(vec, __state->velocityVec)) { - __state->velocityVec = vec; - __state->originalVelocityVec = origVec; - - if (__state->tracing) { - [__state->tracer updateVelocity:aValue]; - } - - [self _invalidateComputedProperties]; - - // automatically unpause active animations - if (__state->active && __state->paused) { - __state->fromVec = NULL; - __state->setPaused(false); - } - } - } else { - __state->velocityVec = NULL; - NSLog(@"Invalid velocity value for the decayAnimation: %@", aValue); - } -} - -#pragma mark - Utility - -- (void)_ensureComputedProperties -{ - if (NULL == __state->toVec) { - __state->computeDuration(); - __state->computeToValue(); - } -} - -- (void)_invalidateComputedProperties -{ - __state->toVec = NULL; - __state->duration = 0; -} - -- (void)_appendDescription:(NSMutableString *)s debug:(BOOL)debug -{ - [super _appendDescription:s debug:debug]; - - if (0 != self.duration) { - [s appendFormat:@"; duration = %f", self.duration]; - } - - if (__state->deceleration) { - [s appendFormat:@"; deceleration = %f", __state->deceleration]; - } -} - -@end - -@implementation POPDecayAnimation (NSCopying) - -- (instancetype)copyWithZone:(NSZone *)zone { - - POPDecayAnimation *copy = [super copyWithZone:zone]; - - if (copy) { - // Set the velocity to the animation's original velocity, not its current. - copy.velocity = self.originalVelocity; - copy.deceleration = self.deceleration; - - } - - return copy; -} - -@end \ No newline at end of file diff --git a/Example/Pods/pop/pop/POPDecayAnimationInternal.h b/Example/Pods/pop/pop/POPDecayAnimationInternal.h deleted file mode 100644 index c1017611..00000000 --- a/Example/Pods/pop/pop/POPDecayAnimationInternal.h +++ /dev/null @@ -1,127 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -#import "POPDecayAnimation.h" - -#import - -#import "POPPropertyAnimationInternal.h" - -// minimal velocity factor before decay animation is considered complete, in units / s -static CGFloat kPOPAnimationDecayMinimalVelocityFactor = 5.; - -// default decay animation deceleration -static CGFloat kPOPAnimationDecayDecelerationDefault = 0.998; - -static void decay_position(CGFloat *x, CGFloat *v, NSUInteger count, CFTimeInterval dt, CGFloat deceleration) -{ - dt *= 1000; - - // v0 = v / 1000 - // v = v0 * powf(deceleration, dt); - // v = v * 1000; - - // x0 = x; - // x = x0 + v0 * deceleration * (1 - powf(deceleration, dt)) / (1 - deceleration) - float v0[count]; - float kv = powf(deceleration, dt); - float kx = deceleration * (1 - kv) / (1 - deceleration); - - for (NSUInteger idx = 0; idx < count; idx++) { - v0[idx] = v[idx] / 1000.; - v[idx] = v0[idx] * kv * 1000.; - x[idx] = x[idx] + v0[idx] * kx; - } -} - -struct _POPDecayAnimationState : _POPPropertyAnimationState -{ - double deceleration; - CFTimeInterval duration; - - _POPDecayAnimationState(id __unsafe_unretained anim) : - _POPPropertyAnimationState(anim), - deceleration(kPOPAnimationDecayDecelerationDefault), - duration(0) - { - type = kPOPAnimationDecay; - } - - bool isDone() { - if (_POPPropertyAnimationState::isDone()) { - return true; - } - - CGFloat f = dynamicsThreshold * kPOPAnimationDecayMinimalVelocityFactor; - const CGFloat *velocityValues = vec_data(velocityVec); - for (NSUInteger idx = 0; idx < valueCount; idx++) { - if (std::abs((velocityValues[idx])) >= f) - return false; - } - return true; - - } - - void computeDuration() { - - // compute duration till threshold velocity - Vector4r scaledVelocity = vector4(velocityVec) / 1000.; - - double k = dynamicsThreshold * kPOPAnimationDecayMinimalVelocityFactor / 1000.; - double vx = k / scaledVelocity.x; - double vy = k / scaledVelocity.y; - double vz = k / scaledVelocity.z; - double vw = k / scaledVelocity.w; - double d = log(deceleration) * 1000.; - duration = MAX(MAX(MAX(log(fabs(vx)) / d, log(fabs(vy)) / d), log(fabs(vz)) / d), log(fabs(vw)) / d); - - // ensure velocity threshold is exceeded - if (std::isnan(duration) || duration < 0) { - duration = 0; - } - } - - void computeToValue() { - // to value assuming final velocity as a factor of dynamics threshold - // derived from v' = v * d^dt used in decay_position - // to compute the to value with maximal dt, p' = p + (v * d) / (1 - d) - VectorRef fromValue = NULL != currentVec ? currentVec : fromVec; - if (!fromValue) { - return; - } - - // ensure duration is computed - if (0 == duration) { - computeDuration(); - } - - // compute to value - VectorRef toValue(Vector::new_vector(fromValue.get())); - Vector4r velocity = velocityVec->vector4r(); - decay_position(toValue->data(), velocity.data(), valueCount, duration, deceleration); - toVec = toValue; - } - - bool advance(CFTimeInterval time, CFTimeInterval dt, id obj) { - // advance past not yet initialized animations - if (NULL == currentVec) { - return false; - } - - decay_position(currentVec->data(), velocityVec->data(), valueCount, dt, deceleration); - - // clamp to compute end value; avoid possibility of decaying past - clampCurrentValue(kPOPAnimationClampEnd | clampMode); - - return true; - } - -}; - -typedef struct _POPDecayAnimationState POPDecayAnimationState; diff --git a/Example/Pods/pop/pop/POPDefines.h b/Example/Pods/pop/pop/POPDefines.h deleted file mode 100644 index a1ed381e..00000000 --- a/Example/Pods/pop/pop/POPDefines.h +++ /dev/null @@ -1,37 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -#ifndef POP_POPDefines_h -#define POP_POPDefines_h - -#import - -#ifdef __cplusplus -# define POP_EXTERN_C_BEGIN extern "C" { -# define POP_EXTERN_C_END } -#else -# define POP_EXTERN_C_BEGIN -# define POP_EXTERN_C_END -#endif - -#define POP_ARRAY_COUNT(x) sizeof(x) / sizeof(x[0]) - -#if defined (__cplusplus) && defined (__GNUC__) -# define POP_NOTHROW __attribute__ ((nothrow)) -#else -# define POP_NOTHROW -#endif - -#if defined(POP_USE_SCENEKIT) -# if TARGET_OS_MAC || TARGET_OS_IPHONE -# define SCENEKIT_SDK_AVAILABLE 1 -# endif -#endif - -#endif diff --git a/Example/Pods/pop/pop/POPGeometry.h b/Example/Pods/pop/pop/POPGeometry.h deleted file mode 100644 index 8ba07e33..00000000 --- a/Example/Pods/pop/pop/POPGeometry.h +++ /dev/null @@ -1,73 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -#if TARGET_OS_IPHONE -#import -#endif - -#if !TARGET_OS_IPHONE - -/** NSValue extensions to support animatable types. */ -@interface NSValue (POP) - -/** - @abstract Creates an NSValue given a CGPoint. - */ -+ (NSValue *)valueWithCGPoint:(CGPoint)point; - -/** - @abstract Creates an NSValue given a CGSize. - */ -+ (NSValue *)valueWithCGSize:(CGSize)size; - -/** - @abstract Creates an NSValue given a CGRect. - */ -+ (NSValue *)valueWithCGRect:(CGRect)rect; - -/** - @abstract Creates an NSValue given a CFRange. - */ -+ (NSValue *)valueWithCFRange:(CFRange)range; - -/** - @abstract Creates an NSValue given a CGAffineTransform. - */ -+ (NSValue *)valueWithCGAffineTransform:(CGAffineTransform)transform; - -/** - @abstract Returns the underlying CGPoint value. - */ -- (CGPoint)CGPointValue; - -/** - @abstract Returns the underlying CGSize value. - */ -- (CGSize)CGSizeValue; - -/** - @abstract Returns the underlying CGRect value. - */ -- (CGRect)CGRectValue; - -/** - @abstract Returns the underlying CFRange value. - */ -- (CFRange)CFRangeValue; - -/** - @abstract Returns the underlying CGAffineTransform value. - */ -- (CGAffineTransform)CGAffineTransformValue; - -@end - -#endif diff --git a/Example/Pods/pop/pop/POPGeometry.mm b/Example/Pods/pop/pop/POPGeometry.mm deleted file mode 100644 index 41998b10..00000000 --- a/Example/Pods/pop/pop/POPGeometry.mm +++ /dev/null @@ -1,94 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -#import "POPGeometry.h" - -#if !TARGET_OS_IPHONE -@implementation NSValue (POP) - -+ (NSValue *)valueWithCGPoint:(CGPoint)point { - return [NSValue valueWithBytes:&point objCType:@encode(CGPoint)]; -} - -+ (NSValue *)valueWithCGSize:(CGSize)size { - return [NSValue valueWithBytes:&size objCType:@encode(CGSize)]; -} - -+ (NSValue *)valueWithCGRect:(CGRect)rect { - return [NSValue valueWithBytes:&rect objCType:@encode(CGRect)]; -} - -+ (NSValue *)valueWithCFRange:(CFRange)range { - return [NSValue valueWithBytes:&range objCType:@encode(CFRange)]; -} - -+ (NSValue *)valueWithCGAffineTransform:(CGAffineTransform)transform -{ - return [NSValue valueWithBytes:&transform objCType:@encode(CGAffineTransform)]; -} - -- (CGPoint)CGPointValue { - CGPoint result; - [self getValue:&result]; - return result; -} - -- (CGSize)CGSizeValue { - CGSize result; - [self getValue:&result]; - return result; -} - -- (CGRect)CGRectValue { - CGRect result; - [self getValue:&result]; - return result; -} - -- (CFRange)CFRangeValue { - CFRange result; - [self getValue:&result]; - return result; -} - -- (CGAffineTransform)CGAffineTransformValue { - CGAffineTransform result; - [self getValue:&result]; - return result; -} -@end - -#endif - -#if TARGET_OS_IPHONE -#import "POPDefines.h" - -#if SCENEKIT_SDK_AVAILABLE -#import - -/** - Dirty hacks because iOS is weird and decided to define both SCNVector3's and SCNVector4's objCType as "t". However @encode(SCNVector3) and @encode(SCNVector4) both return the proper definition ("{SCNVector3=fff}" and "{SCNVector4=ffff}" respectively) - - [[NSValue valueWithSCNVector3:SCNVector3Make(0.0, 0.0, 0.0)] objcType] returns "t", whereas it should return "{SCNVector3=fff}". - - *flips table* - */ -@implementation NSValue (SceneKitFixes) - -+ (NSValue *)valueWithSCNVector3:(SCNVector3)vec3 { - return [NSValue valueWithBytes:&vec3 objCType:@encode(SCNVector3)]; -} - -+ (NSValue *)valueWithSCNVector4:(SCNVector4)vec4 { - return [NSValue valueWithBytes:&vec4 objCType:@encode(SCNVector4)]; -} - -@end -#endif -#endif diff --git a/Example/Pods/pop/pop/POPLayerExtras.h b/Example/Pods/pop/pop/POPLayerExtras.h deleted file mode 100644 index ec4c29a4..00000000 --- a/Example/Pods/pop/pop/POPLayerExtras.h +++ /dev/null @@ -1,196 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -#import - -POP_EXTERN_C_BEGIN - -#pragma mark - Scale - -/** - @abstract Returns layer scale factor for the x axis. - */ -extern CGFloat POPLayerGetScaleX(CALayer *l); - -/** - @abstract Set layer scale factor for the x axis. - */ -extern void POPLayerSetScaleX(CALayer *l, CGFloat f); - -/** - @abstract Returns layer scale factor for the y axis. - */ -extern CGFloat POPLayerGetScaleY(CALayer *l); - -/** - @abstract Set layer scale factor for the y axis. - */ -extern void POPLayerSetScaleY(CALayer *l, CGFloat f); - -/** - @abstract Returns layer scale factor for the z axis. - */ -extern CGFloat POPLayerGetScaleZ(CALayer *l); - -/** - @abstract Set layer scale factor for the z axis. - */ -extern void POPLayerSetScaleZ(CALayer *l, CGFloat f); - -/** - @abstract Returns layer scale factors for x and y access as point. - */ -extern CGPoint POPLayerGetScaleXY(CALayer *l); - -/** - @abstract Sets layer x and y scale factors given point. - */ -extern void POPLayerSetScaleXY(CALayer *l, CGPoint p); - -#pragma mark - Translation - -/** - @abstract Returns layer translation factor for the x axis. - */ -extern CGFloat POPLayerGetTranslationX(CALayer *l); - -/** - @abstract Set layer translation factor for the x axis. - */ -extern void POPLayerSetTranslationX(CALayer *l, CGFloat f); - -/** - @abstract Returns layer translation factor for the y axis. - */ -extern CGFloat POPLayerGetTranslationY(CALayer *l); - -/** - @abstract Set layer translation factor for the y axis. - */ -extern void POPLayerSetTranslationY(CALayer *l, CGFloat f); - -/** - @abstract Returns layer translation factor for the z axis. - */ -extern CGFloat POPLayerGetTranslationZ(CALayer *l); - -/** - @abstract Set layer translation factor for the z axis. - */ -extern void POPLayerSetTranslationZ(CALayer *l, CGFloat f); - -/** - @abstract Returns layer translation factors for x and y access as point. - */ -extern CGPoint POPLayerGetTranslationXY(CALayer *l); - -/** - @abstract Sets layer x and y translation factors given point. - */ -extern void POPLayerSetTranslationXY(CALayer *l, CGPoint p); - -#pragma mark - Rotation - -/** - @abstract Returns layer rotation, in radians, in the X axis. - */ -extern CGFloat POPLayerGetRotationX(CALayer *l); - -/** - @abstract Sets layer rotation, in radians, in the X axis. - */ -extern void POPLayerSetRotationX(CALayer *l, CGFloat f); - -/** - @abstract Returns layer rotation, in radians, in the Y axis. - */ -extern CGFloat POPLayerGetRotationY(CALayer *l); - -/** - @abstract Sets layer rotation, in radians, in the Y axis. - */ -extern void POPLayerSetRotationY(CALayer *l, CGFloat f); - -/** - @abstract Returns layer rotation, in radians, in the Z axis. - */ -extern CGFloat POPLayerGetRotationZ(CALayer *l); - -/** - @abstract Sets layer rotation, in radians, in the Z axis. - */ -extern void POPLayerSetRotationZ(CALayer *l, CGFloat f); - -/** - @abstract Returns layer rotation, in radians, in the Z axis. - */ -extern CGFloat POPLayerGetRotation(CALayer *l); - -/** - @abstract Sets layer rotation, in radians, in the Z axis. - */ -extern void POPLayerSetRotation(CALayer *l, CGFloat f); - -#pragma mark - Sublayer Scale - -/** - @abstract Returns sublayer scale factors for x and y access as point. - */ -extern CGPoint POPLayerGetSubScaleXY(CALayer *l); - -/** - @abstract Sets sublayer x and y scale factors given point. - */ -extern void POPLayerSetSubScaleXY(CALayer *l, CGPoint p); - -#pragma mark - Sublayer Translation - -/** - @abstract Returns sublayer translation factor for the x axis. - */ -extern CGFloat POPLayerGetSubTranslationX(CALayer *l); - -/** - @abstract Set sublayer translation factor for the x axis. - */ -extern void POPLayerSetSubTranslationX(CALayer *l, CGFloat f); - -/** - @abstract Returns sublayer translation factor for the y axis. - */ -extern CGFloat POPLayerGetSubTranslationY(CALayer *l); - -/** - @abstract Set sublayer translation factor for the y axis. - */ -extern void POPLayerSetSubTranslationY(CALayer *l, CGFloat f); - -/** - @abstract Returns sublayer translation factor for the z axis. - */ -extern CGFloat POPLayerGetSubTranslationZ(CALayer *l); - -/** - @abstract Set sublayer translation factor for the z axis. - */ -extern void POPLayerSetSubTranslationZ(CALayer *l, CGFloat f); - -/** - @abstract Returns sublayer translation factors for x and y access as point. - */ -extern CGPoint POPLayerGetSubTranslationXY(CALayer *l); - -/** - @abstract Sets sublayer x and y translation factors given point. - */ -extern void POPLayerSetSubTranslationXY(CALayer *l, CGPoint p); - -POP_EXTERN_C_END diff --git a/Example/Pods/pop/pop/POPLayerExtras.mm b/Example/Pods/pop/pop/POPLayerExtras.mm deleted file mode 100644 index c8ad7f90..00000000 --- a/Example/Pods/pop/pop/POPLayerExtras.mm +++ /dev/null @@ -1,288 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -#import "POPLayerExtras.h" - -#include "TransformationMatrix.h" - -using namespace WebCore; - -#define DECOMPOSE_TRANSFORM(L) \ - TransformationMatrix _m(L.transform); \ - TransformationMatrix::DecomposedType _d; \ - _m.decompose(_d); - -#define RECOMPOSE_TRANSFORM(L) \ - _m.recompose(_d); \ - L.transform = _m.transform3d(); - -#define RECOMPOSE_ROT_TRANSFORM(L) \ - _m.recompose(_d, true); \ - L.transform = _m.transform3d(); - -#define DECOMPOSE_SUBLAYER_TRANSFORM(L) \ - TransformationMatrix _m(L.sublayerTransform); \ - TransformationMatrix::DecomposedType _d; \ - _m.decompose(_d); - -#define RECOMPOSE_SUBLAYER_TRANSFORM(L) \ - _m.recompose(_d); \ - L.sublayerTransform = _m.transform3d(); - -#pragma mark - Scale - -NS_INLINE void ensureNonZeroValue(CGFloat &f) -{ - if (f == 0) { - f = 1e-6; - } -} - -NS_INLINE void ensureNonZeroValue(CGPoint &p) -{ - if (p.x == 0 && p.y == 0) { - p.x = 1e-6; - p.y = 1e-6; - } -} - -CGFloat POPLayerGetScaleX(CALayer *l) -{ - DECOMPOSE_TRANSFORM(l); - return _d.scaleX; -} - -void POPLayerSetScaleX(CALayer *l, CGFloat f) -{ - ensureNonZeroValue(f); - DECOMPOSE_TRANSFORM(l); - _d.scaleX = f; - RECOMPOSE_TRANSFORM(l); -} - -CGFloat POPLayerGetScaleY(CALayer *l) -{ - DECOMPOSE_TRANSFORM(l); - return _d.scaleY; -} - -void POPLayerSetScaleY(CALayer *l, CGFloat f) -{ - ensureNonZeroValue(f); - DECOMPOSE_TRANSFORM(l); - _d.scaleY = f; - RECOMPOSE_TRANSFORM(l); -} - -CGFloat POPLayerGetScaleZ(CALayer *l) -{ - DECOMPOSE_TRANSFORM(l); - return _d.scaleZ; -} - -void POPLayerSetScaleZ(CALayer *l, CGFloat f) -{ - ensureNonZeroValue(f); - DECOMPOSE_TRANSFORM(l); - _d.scaleZ = f; - RECOMPOSE_TRANSFORM(l); -} - -CGPoint POPLayerGetScaleXY(CALayer *l) -{ - DECOMPOSE_TRANSFORM(l); - return CGPointMake(_d.scaleX, _d.scaleY); -} - -void POPLayerSetScaleXY(CALayer *l, CGPoint p) -{ - ensureNonZeroValue(p); - DECOMPOSE_TRANSFORM(l); - _d.scaleX = p.x; - _d.scaleY = p.y; - RECOMPOSE_TRANSFORM(l); -} - -#pragma mark - Translation - -CGFloat POPLayerGetTranslationX(CALayer *l) -{ - DECOMPOSE_TRANSFORM(l); - return _d.translateX; -} - -void POPLayerSetTranslationX(CALayer *l, CGFloat f) -{ - DECOMPOSE_TRANSFORM(l); - _d.translateX = f; - RECOMPOSE_TRANSFORM(l); -} - -CGFloat POPLayerGetTranslationY(CALayer *l) -{ - DECOMPOSE_TRANSFORM(l); - return _d.translateY; -} - -void POPLayerSetTranslationY(CALayer *l, CGFloat f) -{ - DECOMPOSE_TRANSFORM(l); - _d.translateY = f; - RECOMPOSE_TRANSFORM(l); -} - -CGFloat POPLayerGetTranslationZ(CALayer *l) -{ - DECOMPOSE_TRANSFORM(l); - return _d.translateZ; -} - -void POPLayerSetTranslationZ(CALayer *l, CGFloat f) -{ - DECOMPOSE_TRANSFORM(l); - _d.translateZ = f; - RECOMPOSE_TRANSFORM(l); -} - -CGPoint POPLayerGetTranslationXY(CALayer *l) -{ - DECOMPOSE_TRANSFORM(l); - return CGPointMake(_d.translateX, _d.translateY); -} - -void POPLayerSetTranslationXY(CALayer *l, CGPoint p) -{ - DECOMPOSE_TRANSFORM(l); - _d.translateX = p.x; - _d.translateY = p.y; - RECOMPOSE_TRANSFORM(l); -} - -#pragma mark - Rotation - -CGFloat POPLayerGetRotationX(CALayer *l) -{ - DECOMPOSE_TRANSFORM(l); - return _d.rotateX; -} - -void POPLayerSetRotationX(CALayer *l, CGFloat f) -{ - DECOMPOSE_TRANSFORM(l); - _d.rotateX = f; - RECOMPOSE_ROT_TRANSFORM(l); -} - -CGFloat POPLayerGetRotationY(CALayer *l) -{ - DECOMPOSE_TRANSFORM(l); - return _d.rotateY; -} - -void POPLayerSetRotationY(CALayer *l, CGFloat f) -{ - DECOMPOSE_TRANSFORM(l); - _d.rotateY = f; - RECOMPOSE_ROT_TRANSFORM(l); -} - -CGFloat POPLayerGetRotationZ(CALayer *l) -{ - DECOMPOSE_TRANSFORM(l); - return _d.rotateZ; -} - -void POPLayerSetRotationZ(CALayer *l, CGFloat f) -{ - DECOMPOSE_TRANSFORM(l); - _d.rotateZ = f; - RECOMPOSE_ROT_TRANSFORM(l); -} - -CGFloat POPLayerGetRotation(CALayer *l) -{ - return POPLayerGetRotationZ(l); -} - -void POPLayerSetRotation(CALayer *l, CGFloat f) -{ - POPLayerSetRotationZ(l, f); -} - -#pragma mark - Sublayer Scale - -CGPoint POPLayerGetSubScaleXY(CALayer *l) -{ - DECOMPOSE_SUBLAYER_TRANSFORM(l); - return CGPointMake(_d.scaleX, _d.scaleY); -} - -void POPLayerSetSubScaleXY(CALayer *l, CGPoint p) -{ - ensureNonZeroValue(p); - DECOMPOSE_SUBLAYER_TRANSFORM(l); - _d.scaleX = p.x; - _d.scaleY = p.y; - RECOMPOSE_SUBLAYER_TRANSFORM(l); -} - -#pragma mark - Sublayer Translation - -extern CGFloat POPLayerGetSubTranslationX(CALayer *l) -{ - DECOMPOSE_SUBLAYER_TRANSFORM(l); - return _d.translateX; -} - -extern void POPLayerSetSubTranslationX(CALayer *l, CGFloat f) -{ - DECOMPOSE_SUBLAYER_TRANSFORM(l); - _d.translateX = f; - RECOMPOSE_SUBLAYER_TRANSFORM(l); -} - -extern CGFloat POPLayerGetSubTranslationY(CALayer *l) -{ - DECOMPOSE_SUBLAYER_TRANSFORM(l); - return _d.translateY; -} - -extern void POPLayerSetSubTranslationY(CALayer *l, CGFloat f) -{ - DECOMPOSE_SUBLAYER_TRANSFORM(l); - _d.translateY = f; - RECOMPOSE_SUBLAYER_TRANSFORM(l); -} - -extern CGFloat POPLayerGetSubTranslationZ(CALayer *l) -{ - DECOMPOSE_SUBLAYER_TRANSFORM(l); - return _d.translateZ; -} - -extern void POPLayerSetSubTranslationZ(CALayer *l, CGFloat f) -{ - DECOMPOSE_SUBLAYER_TRANSFORM(l); - _d.translateZ = f; - RECOMPOSE_SUBLAYER_TRANSFORM(l); -} - -extern CGPoint POPLayerGetSubTranslationXY(CALayer *l) -{ - DECOMPOSE_SUBLAYER_TRANSFORM(l); - return CGPointMake(_d.translateX, _d.translateY); -} - -extern void POPLayerSetSubTranslationXY(CALayer *l, CGPoint p) -{ - DECOMPOSE_SUBLAYER_TRANSFORM(l); - _d.translateX = p.x; - _d.translateY = p.y; - RECOMPOSE_SUBLAYER_TRANSFORM(l); -} diff --git a/Example/Pods/pop/pop/POPMath.h b/Example/Pods/pop/pop/POPMath.h deleted file mode 100644 index 2e8d3abb..00000000 --- a/Example/Pods/pop/pop/POPMath.h +++ /dev/null @@ -1,55 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -#import - -#import "POPDefines.h" - -NS_INLINE CGFloat sqrtr(CGFloat f) -{ -#if CGFLOAT_IS_DOUBLE - return sqrt(f); -#else - return sqrtf(f); -#endif -} - -// round to nearest sub; pass 2.0 to round to every 0.5 (eg: retina pixels) -NS_INLINE CGFloat POPSubRound(CGFloat f, CGFloat sub) -{ - return round(f * sub) / sub; -} - -#define MIX(a, b, f) ((a) + (f) * ((b) - (a))) - -// the longer the duration, the higher the necessary precision -#define SOLVE_EPS(dur) (1. / (1000. * (dur))) - -#define _EQLF_(x, y, epsilon) (fabsf ((x) - (y)) < epsilon) - -extern void POPInterpolateVector(NSUInteger count, CGFloat *dst, const CGFloat *from, const CGFloat *to, CGFloat f); - -extern double POPTimingFunctionSolve(const double vec[4], double t, double eps); - -// quadratic mapping of t [0, 1] to [start, end] -extern double POPQuadraticOutInterpolation(double t, double start, double end); - -// normalize value to [0, 1] based on its range [startValue, endValue] -extern double POPNormalize(double value, double startValue, double endValue); - -// project a normalized value [0, 1] to a given range [start, end] -extern double POPProjectNormal(double n, double start, double end); - -// solve a quadratic equation of the form a * x^2 + b * x + c = 0 -extern void POPQuadraticSolve(CGFloat a, CGFloat b, CGFloat c, CGFloat &x1, CGFloat &x2); - -// for a given tension return the bouncy 3 friction that produces no bounce -extern double POPBouncy3NoBounce(double tension); diff --git a/Example/Pods/pop/pop/POPMath.mm b/Example/Pods/pop/pop/POPMath.mm deleted file mode 100644 index 69a506aa..00000000 --- a/Example/Pods/pop/pop/POPMath.mm +++ /dev/null @@ -1,83 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -#import "POPMath.h" - -#import "POPAnimationPrivate.h" -#import "UnitBezier.h" - -void POPInterpolateVector(NSUInteger count, CGFloat *dst, const CGFloat *from, const CGFloat *to, CGFloat f) -{ - for (NSUInteger idx = 0; idx < count; idx++) { - dst[idx] = MIX(from[idx], to[idx], f); - } -} - -double POPTimingFunctionSolve(const double vec[4], double t, double eps) -{ - WebCore::UnitBezier bezier(vec[0], vec[1], vec[2], vec[3]); - return bezier.solve(t, eps); -} - -double POPNormalize(double value, double startValue, double endValue) -{ - return (value - startValue) / (endValue - startValue); -} - -double POPProjectNormal(double n, double start, double end) -{ - return start + (n * (end - start)); -} - -static double linear_interpolation(double t, double start, double end) -{ - return t * end + (1.f - t) * start; -} - -double POPQuadraticOutInterpolation(double t, double start, double end) -{ - return linear_interpolation(2*t - t*t, start, end); -} - -static double b3_friction1(double x) -{ - return (0.0007 * pow(x, 3)) - (0.031 * pow(x, 2)) + 0.64 * x + 1.28; -} - -static double b3_friction2(double x) -{ - return (0.000044 * pow(x, 3)) - (0.006 * pow(x, 2)) + 0.36 * x + 2.; -} - -static double b3_friction3(double x) -{ - return (0.00000045 * pow(x, 3)) - (0.000332 * pow(x, 2)) + 0.1078 * x + 5.84; -} - -double POPBouncy3NoBounce(double tension) -{ - double friction = 0; - if (tension <= 18.) { - friction = b3_friction1(tension); - } else if (tension > 18 && tension <= 44) { - friction = b3_friction2(tension); - } else if (tension > 44) { - friction = b3_friction3(tension); - } else { - assert(false); - } - return friction; -} - -void POPQuadraticSolve(CGFloat a, CGFloat b, CGFloat c, CGFloat &x1, CGFloat &x2) -{ - CGFloat discriminant = sqrt(b * b - 4 * a * c); - x1 = (-b + discriminant) / (2 * a); - x2 = (-b - discriminant) / (2 * a); -} diff --git a/Example/Pods/pop/pop/POPPropertyAnimation.h b/Example/Pods/pop/pop/POPPropertyAnimation.h deleted file mode 100644 index cf895726..00000000 --- a/Example/Pods/pop/pop/POPPropertyAnimation.h +++ /dev/null @@ -1,76 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -#import -#import - -/** - @abstract Flags for clamping animation values. - @discussion Animation values can optionally be clamped to avoid overshoot. kPOPAnimationClampStart ensures values are more than fromValue and kPOPAnimationClampEnd ensures values are less than toValue. - */ -typedef NS_OPTIONS(NSUInteger, POPAnimationClampFlags) -{ - kPOPAnimationClampNone = 0, - kPOPAnimationClampStart = 1UL << 0, - kPOPAnimationClampEnd = 1UL << 1, - kPOPAnimationClampBoth = kPOPAnimationClampStart | kPOPAnimationClampEnd, -}; - -/** - @abstract The semi-concrete property animation subclass. - */ -@interface POPPropertyAnimation : POPAnimation - -/** - @abstract The property to animate. - */ -@property (strong, nonatomic) POPAnimatableProperty *property; - -/** - @abstract The value to animate from. - @discussion The value type should match the property. If unspecified, the value is initialized to the object's current value on animation start. - */ -@property (copy, nonatomic) id fromValue; - -/** - @abstract The value to animate to. - @discussion The value type should match the property. If unspecified, the value is initialized to the object's current value on animation start. - */ -@property (copy, nonatomic) id toValue; - -/** - @abstract The rounding factor applied to the current animated value. - @discussion Specify 1.0 to animate between integral values. Defaults to 0 meaning no rounding. - */ -@property (assign, nonatomic) CGFloat roundingFactor; - -/** - @abstract The clamp mode applied to the current animated value. - @discussion See {@ref POPAnimationClampFlags} for possible values. Defaults to kPOPAnimationClampNone. - */ -@property (assign, nonatomic) NSUInteger clampMode; - -/** - @abstract The flag indicating whether values should be "added" each frame, rather than set. - @discussion Addition may be type dependent. Defaults to NO. - */ -@property (assign, nonatomic, getter = isAdditive) BOOL additive; - -@end - -@interface POPPropertyAnimation (CustomProperty) - -+ (instancetype)animationWithCustomPropertyNamed:(NSString *)name - readBlock:(POPAnimatablePropertyReadBlock)readBlock - writeBlock:(POPAnimatablePropertyWriteBlock)writeBlock; - -+ (instancetype)animationWithCustomPropertyReadBlock:(POPAnimatablePropertyReadBlock)readBlock - writeBlock:(POPAnimatablePropertyWriteBlock)writeBlock; - -@end diff --git a/Example/Pods/pop/pop/POPPropertyAnimation.mm b/Example/Pods/pop/pop/POPPropertyAnimation.mm deleted file mode 100644 index 06f8cfa8..00000000 --- a/Example/Pods/pop/pop/POPPropertyAnimation.mm +++ /dev/null @@ -1,149 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -#import "POPPropertyAnimationInternal.h" - -@implementation POPPropertyAnimation - -#pragma mark - Lifecycle - -#undef __state -#define __state ((POPPropertyAnimationState *)_state) - -- (void)_initState -{ - _state = new POPPropertyAnimationState(self); -} - -#pragma mark - Properties - -DEFINE_RW_FLAG(POPPropertyAnimationState, additive, isAdditive, setAdditive:); -DEFINE_RW_PROPERTY(POPPropertyAnimationState, roundingFactor, setRoundingFactor:, CGFloat); -DEFINE_RW_PROPERTY(POPPropertyAnimationState, clampMode, setClampMode:, NSUInteger); -DEFINE_RW_PROPERTY_OBJ(POPPropertyAnimationState, property, setProperty:, POPAnimatableProperty*, ((POPPropertyAnimationState*)_state)->updatedDynamicsThreshold();); -DEFINE_RW_PROPERTY_OBJ_COPY(POPPropertyAnimationState, progressMarkers, setProgressMarkers:, NSArray*, ((POPPropertyAnimationState*)_state)->updatedProgressMarkers();); - -- (id)fromValue -{ - return POPBox(__state->fromVec, __state->valueType); -} - -- (void)setFromValue:(id)aValue -{ - POPPropertyAnimationState *s = __state; - VectorRef vec = POPUnbox(aValue, s->valueType, s->valueCount, YES); - if (!vec_equal(vec, s->fromVec)) { - s->fromVec = vec; - - if (s->tracing) { - [s->tracer updateFromValue:aValue]; - } - } -} - -- (id)toValue -{ - return POPBox(__state->toVec, __state->valueType); -} - -- (void)setToValue:(id)aValue -{ - POPPropertyAnimationState *s = __state; - VectorRef vec = POPUnbox(aValue, s->valueType, s->valueCount, YES); - - if (!vec_equal(vec, s->toVec)) { - s->toVec = vec; - - // invalidate to dependent state - s->didReachToValue = false; - s->distanceVec = NULL; - - if (s->tracing) { - [s->tracer updateToValue:aValue]; - } - - // automatically unpause active animations - if (s->active && s->paused) { - s->setPaused(false); - } - } -} - -- (id)currentValue -{ - return POPBox(__state->currentValue(), __state->valueType); -} - -#pragma mark - Utility - -- (void)_appendDescription:(NSMutableString *)s debug:(BOOL)debug -{ - [s appendFormat:@"; from = %@; to = %@", describe(__state->fromVec), describe(__state->toVec)]; - - if (_state->active) - [s appendFormat:@"; currentValue = %@", describe(__state->currentValue())]; - - if (__state->velocityVec && 0 != __state->velocityVec->norm()) - [s appendFormat:@"; velocity = %@", describe(__state->velocityVec)]; - - if (!self.removedOnCompletion) - [s appendFormat:@"; removedOnCompletion = %@", POPStringFromBOOL(self.removedOnCompletion)]; - - if (__state->progressMarkers) - [s appendFormat:@"; progressMarkers = [%@]", [__state->progressMarkers componentsJoinedByString:@", "]]; - - if (_state->active) - [s appendFormat:@"; progress = %f", __state->progress]; -} - -@end - -@implementation POPPropertyAnimation (NSCopying) - -- (instancetype)copyWithZone:(NSZone *)zone { - - POPPropertyAnimation *copy = [super copyWithZone:zone]; - - if (copy) { - copy.property = [self.property copyWithZone:zone]; - copy.fromValue = self.fromValue; - copy.toValue = self.toValue; - copy.roundingFactor = self.roundingFactor; - copy.clampMode = self.clampMode; - copy.additive = self.additive; - } - - return copy; -} - -@end - -@implementation POPPropertyAnimation (CustomProperty) - -+ (instancetype)animationWithCustomPropertyNamed:(NSString *)name - readBlock:(POPAnimatablePropertyReadBlock)readBlock - writeBlock:(POPAnimatablePropertyWriteBlock)writeBlock -{ - POPPropertyAnimation *animation = [[self alloc] init]; - animation.property = [POPAnimatableProperty propertyWithName:name initializer:^(POPMutableAnimatableProperty *prop) { - prop.readBlock = readBlock; - prop.writeBlock = writeBlock; - }]; - return animation; -} - -+ (instancetype)animationWithCustomPropertyReadBlock:(POPAnimatablePropertyReadBlock)readBlock - writeBlock:(POPAnimatablePropertyWriteBlock)writeBlock -{ - return [self animationWithCustomPropertyNamed:[NSUUID UUID].UUIDString - readBlock:readBlock - writeBlock:writeBlock]; -} - -@end diff --git a/Example/Pods/pop/pop/POPPropertyAnimationInternal.h b/Example/Pods/pop/pop/POPPropertyAnimationInternal.h deleted file mode 100644 index 20471cac..00000000 --- a/Example/Pods/pop/pop/POPPropertyAnimationInternal.h +++ /dev/null @@ -1,359 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -#import "POPAnimationInternal.h" -#import "POPPropertyAnimation.h" - -static void clampValue(CGFloat &value, CGFloat fromValue, CGFloat toValue, NSUInteger clamp) -{ - BOOL increasing = (toValue > fromValue); - - // Clamp start of animation. - if ((kPOPAnimationClampStart & clamp) && - ((increasing && (value < fromValue)) || (!increasing && (value > fromValue)))) { - value = fromValue; - } - - // Clamp end of animation. - if ((kPOPAnimationClampEnd & clamp) && - ((increasing && (value > toValue)) || (!increasing && (value < toValue)))) { - value = toValue; - } -} - -struct _POPPropertyAnimationState : _POPAnimationState -{ - POPAnimatableProperty *property; - POPValueType valueType; - NSUInteger valueCount; - VectorRef fromVec; - VectorRef toVec; - VectorRef currentVec; - VectorRef previousVec; - VectorRef previous2Vec; - VectorRef velocityVec; - VectorRef originalVelocityVec; - VectorRef distanceVec; - CGFloat roundingFactor; - NSUInteger clampMode; - NSArray *progressMarkers; - POPProgressMarker *progressMarkerState; - NSUInteger progressMarkerCount; - NSUInteger nextProgressMarkerIdx; - CGFloat dynamicsThreshold; - - _POPPropertyAnimationState(id __unsafe_unretained anim) : _POPAnimationState(anim), - property(nil), - valueType((POPValueType)0), - valueCount(0), - fromVec(nullptr), - toVec(nullptr), - currentVec(nullptr), - previousVec(nullptr), - previous2Vec(nullptr), - velocityVec(nullptr), - originalVelocityVec(nullptr), - distanceVec(nullptr), - roundingFactor(0), - clampMode(0), - progressMarkers(nil), - progressMarkerState(nil), - progressMarkerCount(0), - nextProgressMarkerIdx(0), - dynamicsThreshold(0) - { - type = kPOPAnimationBasic; - } - - ~_POPPropertyAnimationState() - { - if (progressMarkerState) { - free(progressMarkerState); - progressMarkerState = NULL; - } - } - - bool canProgress() { - return hasValue(); - } - - bool shouldRound() { - return 0 != roundingFactor; - } - - bool hasValue() { - return 0 != valueCount; - } - - bool isDone() { - // inherit done - if (_POPAnimationState::isDone()) { - return true; - } - - // consider an animation with no values done - if (!hasValue() && !isCustom()) { - return true; - } - - return false; - } - - // returns a copy of the currentVec, rounding if needed - VectorRef currentValue() { - VectorRef vec = VectorRef(Vector::new_vector(currentVec.get())); - if (shouldRound()) { - vec->subRound(1 / roundingFactor); - } - return vec; - } - - void resetProgressMarkerState() - { - for (NSUInteger idx = 0; idx < progressMarkerCount; idx++) - progressMarkerState[idx].reached = false; - - nextProgressMarkerIdx = 0; - } - - void updatedProgressMarkers() - { - if (progressMarkerState) { - free(progressMarkerState); - progressMarkerState = NULL; - } - - progressMarkerCount = progressMarkers.count; - - if (0 != progressMarkerCount) { - progressMarkerState = (POPProgressMarker *)malloc(progressMarkerCount * sizeof(POPProgressMarker)); - [progressMarkers enumerateObjectsUsingBlock:^(NSNumber *progressMarker, NSUInteger idx, BOOL *stop) { - progressMarkerState[idx].reached = false; - progressMarkerState[idx].progress = [progressMarker floatValue]; - }]; - } - - nextProgressMarkerIdx = 0; - } - - virtual void updatedDynamicsThreshold() - { - dynamicsThreshold = property.threshold; - } - - void finalizeProgress() - { - progress = 1.0; - NSUInteger count = valueCount; - VectorRef outVec(Vector::new_vector(count, NULL)); - - if (outVec && toVec) { - *outVec = *toVec; - } - - currentVec = outVec; - clampCurrentValue(); - delegateProgress(); - } - - void computeProgress() { - if (!canProgress()) { - return; - } - - static ComputeProgressFunctor func; - Vector4r v = vector4(currentVec); - Vector4r f = vector4(fromVec); - Vector4r t = vector4(toVec); - progress = func(v, f, t); - } - - void delegateProgress() { - if (!canProgress()) { - return; - } - - if (delegateDidProgress && progressMarkerState) { - - while (nextProgressMarkerIdx < progressMarkerCount) { - if (progress < progressMarkerState[nextProgressMarkerIdx].progress) - break; - - if (!progressMarkerState[nextProgressMarkerIdx].reached) { - ActionEnabler enabler; - [delegate pop_animation:self didReachProgress:progressMarkerState[nextProgressMarkerIdx].progress]; - progressMarkerState[nextProgressMarkerIdx].reached = true; - } - - nextProgressMarkerIdx++; - } - } - - if (!didReachToValue) { - bool didReachToValue = false; - if (0 == valueCount) { - didReachToValue = true; - } else { - Vector4r distance = toVec->vector4r(); - distance -= currentVec->vector4r(); - - if (0 == distance.squaredNorm()) { - didReachToValue = true; - } else { - // components - if (distanceVec) { - didReachToValue = true; - const CGFloat *distanceValues = distanceVec->data(); - for (NSUInteger idx = 0; idx < valueCount; idx++) { - didReachToValue &= (signbit(distance[idx]) != signbit(distanceValues[idx])); - } - } - } - } - - if (didReachToValue) { - handleDidReachToValue(); - } - } - } - - void handleDidReachToValue() { - didReachToValue = true; - - if (delegateDidReachToValue) { - ActionEnabler enabler; - [delegate pop_animationDidReachToValue:self]; - } - - POPAnimationDidReachToValueBlock block = animationDidReachToValueBlock; - if (block != NULL) { - ActionEnabler enabler; - block(self); - } - - if (tracing) { - [tracer didReachToValue:POPBox(currentValue(), valueType, true)]; - } - } - - void readObjectValue(VectorRef *ptrVec, id obj) - { - // use current object value as from value - POPAnimatablePropertyReadBlock read = property.readBlock; - if (NULL != read) { - - Vector4r vec = read_values(read, obj, valueCount); - *ptrVec = VectorRef(Vector::new_vector(valueCount, vec)); - - if (tracing) { - [tracer readPropertyValue:POPBox(*ptrVec, valueType, true)]; - } - } - } - - virtual void willRun(bool started, id obj) { - // ensure from value initialized - if (NULL == fromVec) { - readObjectValue(&fromVec, obj); - } - - // ensure to value initialized - if (NULL == toVec) { - // compute decay to value - if (kPOPAnimationDecay == type) { - [self toValue]; - } else { - // read to value - readObjectValue(&toVec, obj); - } - } - - // handle one time value initialization on start - if (started) { - - // initialize current vec - if (!currentVec) { - currentVec = VectorRef(Vector::new_vector(valueCount, NULL)); - - // initialize current value with from value - // only do this on initial creation to avoid overwriting current value - // on paused animation continuation - if (currentVec && fromVec) { - *currentVec = *fromVec; - } - } - - // ensure velocity values - if (!velocityVec) { - velocityVec = VectorRef(Vector::new_vector(valueCount, NULL)); - } - if (!originalVelocityVec) { - originalVelocityVec = VectorRef(Vector::new_vector(valueCount, NULL)); - } - } - - // ensure distance value initialized - // depends on current value set on one time start - if (NULL == distanceVec) { - - // not yet started animations may not have current value - VectorRef fromVec2 = NULL != currentVec ? currentVec : fromVec; - - if (fromVec2 && toVec) { - Vector4r distance = toVec->vector4r(); - distance -= fromVec2->vector4r(); - - if (0 != distance.squaredNorm()) { - distanceVec = VectorRef(Vector::new_vector(valueCount, distance)); - } - } - } - } - - virtual void reset(bool all) { - _POPAnimationState::reset(all); - - if (all) { - currentVec = NULL; - previousVec = NULL; - previous2Vec = NULL; - } - progress = 0; - resetProgressMarkerState(); - didReachToValue = false; - distanceVec = NULL; - } - - void clampCurrentValue(NSUInteger clamp) - { - if (kPOPAnimationClampNone == clamp) - return; - - // Clamp all vector values - CGFloat *currentValues = currentVec->data(); - const CGFloat *fromValues = fromVec->data(); - const CGFloat *toValues = toVec->data(); - - for (NSUInteger idx = 0; idx < valueCount; idx++) { - clampValue(currentValues[idx], fromValues[idx], toValues[idx], clamp); - } - } - - void clampCurrentValue() - { - clampCurrentValue(clampMode); - } -}; - -typedef struct _POPPropertyAnimationState POPPropertyAnimationState; - -@interface POPPropertyAnimation () - -@end - diff --git a/Example/Pods/pop/pop/POPSpringAnimation.h b/Example/Pods/pop/pop/POPSpringAnimation.h deleted file mode 100644 index a22cd5be..00000000 --- a/Example/Pods/pop/pop/POPSpringAnimation.h +++ /dev/null @@ -1,67 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -/** - @abstract A concrete spring animation class. - @discussion Animation is achieved through modeling spring dynamics. - */ -@interface POPSpringAnimation : POPPropertyAnimation - -/** - @abstract The designated initializer. - @returns An instance of a spring animation. - */ -+ (instancetype)animation; - -/** - @abstract Convenience initializer that returns an animation with animatable property of name. - @param name The name of the animatable property. - @returns An instance of a spring animation configured with specified animatable property. - */ -+ (instancetype)animationWithPropertyNamed:(NSString *)name; - -/** - @abstract The current velocity value. - @discussion Set before animation start to account for initial velocity. Expressed in change of value units per second. - */ -@property (copy, nonatomic) id velocity; - -/** - @abstract The effective bounciness. - @discussion Use in conjunction with 'springSpeed' to change animation effect. Values are converted into corresponding dynamics constants. Higher values increase spring movement range resulting in more oscillations and springiness. Defined as a value in the range [0, 20]. Defaults to 4. - */ -@property (assign, nonatomic) CGFloat springBounciness; - -/** - @abstract The effective speed. - @discussion Use in conjunction with 'springBounciness' to change animation effect. Values are converted into corresponding dynamics constants. Higher values increase the dampening power of the spring resulting in a faster initial velocity and more rapid bounce slowdown. Defined as a value in the range [0, 20]. Defaults to 12. - */ -@property (assign, nonatomic) CGFloat springSpeed; - -/** - @abstract The tension used in the dynamics simulation. - @discussion Can be used over bounciness and speed for finer grain tweaking of animation effect. - */ -@property (assign, nonatomic) CGFloat dynamicsTension; - -/** - @abstract The friction used in the dynamics simulation. - @discussion Can be used over bounciness and speed for finer grain tweaking of animation effect. - */ -@property (assign, nonatomic) CGFloat dynamicsFriction; - -/** - @abstract The mass used in the dynamics simulation. - @discussion Can be used over bounciness and speed for finer grain tweaking of animation effect. - */ -@property (assign, nonatomic) CGFloat dynamicsMass; - -@end diff --git a/Example/Pods/pop/pop/POPSpringAnimation.mm b/Example/Pods/pop/pop/POPSpringAnimation.mm deleted file mode 100644 index d2997707..00000000 --- a/Example/Pods/pop/pop/POPSpringAnimation.mm +++ /dev/null @@ -1,192 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -#import "POPSpringAnimationInternal.h" - -@implementation POPSpringAnimation - -#pragma mark - Lifecycle - -#undef __state -#define __state ((POPSpringAnimationState *)_state) - -+ (instancetype)animation -{ - return [[self alloc] init]; -} - -+ (instancetype)animationWithPropertyNamed:(NSString *)aName -{ - POPSpringAnimation *anim = [self animation]; - anim.property = [POPAnimatableProperty propertyWithName:aName]; - return anim; -} - -- (void)_initState -{ - _state = new POPSpringAnimationState(self); -} - -- (id)init -{ - self = [super _init]; - if (nil != self) { - __state->solver = new SpringSolver4d(1, 1, 1); - __state->updatedDynamicsThreshold(); - __state->updatedBouncinessAndSpeed(); - } - return self; -} - -- (void)dealloc -{ - if (__state) { - delete __state->solver; - __state->solver = NULL; - } -} - -#pragma mark - Properties - -- (id)velocity -{ - return POPBox(__state->velocityVec, __state->valueType); -} - -- (void)setVelocity:(id)aValue -{ - POPPropertyAnimationState *s = __state; - VectorRef vec = POPUnbox(aValue, s->valueType, s->valueCount, YES); - VectorRef origVec = POPUnbox(aValue, s->valueType, s->valueCount, YES); - if (!vec_equal(vec, s->velocityVec)) { - s->velocityVec = vec; - s->originalVelocityVec = origVec; - - if (s->tracing) { - [s->tracer updateVelocity:aValue]; - } - } -} - -DEFINE_RW_PROPERTY(POPSpringAnimationState, dynamicsTension, setDynamicsTension:, CGFloat, [self _updatedDynamicsTension];); -DEFINE_RW_PROPERTY(POPSpringAnimationState, dynamicsFriction, setDynamicsFriction:, CGFloat, [self _updatedDynamicsFriction];); -DEFINE_RW_PROPERTY(POPSpringAnimationState, dynamicsMass, setDynamicsMass:, CGFloat, [self _updatedDynamicsMass];); - -FB_PROPERTY_GET(POPSpringAnimationState, springSpeed, CGFloat); -- (void)setSpringSpeed:(CGFloat)aFloat -{ - POPSpringAnimationState *s = __state; - if (s->userSpecifiedDynamics || aFloat != s->springSpeed) { - s->springSpeed = aFloat; - s->userSpecifiedDynamics = false; - s->updatedBouncinessAndSpeed(); - if (s->tracing) { - [s->tracer updateSpeed:aFloat]; - } - } -} - -FB_PROPERTY_GET(POPSpringAnimationState, springBounciness, CGFloat); -- (void)setSpringBounciness:(CGFloat)aFloat -{ - POPSpringAnimationState *s = __state; - if (s->userSpecifiedDynamics || aFloat != s->springBounciness) { - s->springBounciness = aFloat; - s->userSpecifiedDynamics = false; - s->updatedBouncinessAndSpeed(); - if (s->tracing) { - [s->tracer updateBounciness:aFloat]; - } - } -} - -- (SpringSolver4d *)solver -{ - return __state->solver; -} - -- (void)setSolver:(SpringSolver4d *)aSolver -{ - if (aSolver != __state->solver) { - if (__state->solver) { - delete(__state->solver); - } - __state->solver = aSolver; - } -} - -#pragma mark - Utility - -- (void)_updatedDynamicsTension -{ - __state->userSpecifiedDynamics = true; - if(__state->tracing) { - [__state->tracer updateTension:__state->dynamicsTension]; - } - __state->updatedDynamics(); -} - -- (void)_updatedDynamicsFriction -{ - __state->userSpecifiedDynamics = true; - if(__state->tracing) { - [__state->tracer updateFriction:__state->dynamicsFriction]; - } - __state->updatedDynamics(); -} - -- (void)_updatedDynamicsMass -{ - __state->userSpecifiedDynamics = true; - if(__state->tracing) { - [__state->tracer updateMass:__state->dynamicsMass]; - } - __state->updatedDynamics(); -} - -- (void)_appendDescription:(NSMutableString *)s debug:(BOOL)debug -{ - [super _appendDescription:s debug:debug]; - - if (debug) { - if (_state->userSpecifiedDynamics) { - [s appendFormat:@"; dynamics = (tension:%f, friction:%f, mass:%f)", __state->dynamicsTension, __state->dynamicsFriction, __state->dynamicsMass]; - } else { - [s appendFormat:@"; bounciness = %f; speed = %f", __state->springBounciness, __state->springSpeed]; - } - } -} - -@end - -@implementation POPSpringAnimation (NSCopying) - -- (instancetype)copyWithZone:(NSZone *)zone { - - POPSpringAnimation *copy = [super copyWithZone:zone]; - - if (copy) { - id velocity = POPBox(__state->originalVelocityVec, __state->valueType); - - // If velocity never gets set, then POPBox will return nil, messing up __state->valueCount. - if (velocity) { - copy.velocity = velocity; - } - - copy.springBounciness = self.springBounciness; - copy.springSpeed = self.springSpeed; - copy.dynamicsTension = self.dynamicsTension; - copy.dynamicsFriction = self.dynamicsFriction; - copy.dynamicsMass = self.dynamicsMass; - } - - return copy; -} - -@end \ No newline at end of file diff --git a/Example/Pods/pop/pop/POPSpringAnimationInternal.h b/Example/Pods/pop/pop/POPSpringAnimationInternal.h deleted file mode 100644 index 6a72a432..00000000 --- a/Example/Pods/pop/pop/POPSpringAnimationInternal.h +++ /dev/null @@ -1,132 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -#import "POPAnimationExtras.h" -#import "POPPropertyAnimationInternal.h" - -struct _POPSpringAnimationState : _POPPropertyAnimationState -{ - SpringSolver4d *solver; - CGFloat springSpeed; - CGFloat springBounciness; // normalized springiness - CGFloat dynamicsTension; // tension - CGFloat dynamicsFriction; // friction - CGFloat dynamicsMass; // mass - - _POPSpringAnimationState(id __unsafe_unretained anim) : _POPPropertyAnimationState(anim), - solver(nullptr), - springSpeed(12.), - springBounciness(4.), - dynamicsTension(0), - dynamicsFriction(0), - dynamicsMass(0) - { - type = kPOPAnimationSpring; - } - - bool hasConverged() - { - NSUInteger count = valueCount; - if (shouldRound()) { - return vec_equal(previous2Vec, previousVec) && vec_equal(previousVec, toVec); - } else { - if (!previousVec || !previous2Vec) - return false; - - CGFloat t = dynamicsThreshold / 5; - - const CGFloat *toValues = toVec->data(); - const CGFloat *previousValues = previousVec->data(); - const CGFloat *previous2Values = previous2Vec->data(); - - for (NSUInteger idx = 0; idx < count; idx++) { - if ((std::abs(toValues[idx] - previousValues[idx]) >= t) || (std::abs(previous2Values[idx] - previousValues[idx]) >= t)) { - return false; - } - } - return true; - } - } - - bool isDone() { - if (_POPPropertyAnimationState::isDone()) { - return true; - } - return solver->started() && (hasConverged() || solver->hasConverged()); - } - - void updatedDynamics() - { - if (NULL != solver) { - solver->setConstants(dynamicsTension, dynamicsFriction, dynamicsMass); - } - } - - void updatedDynamicsThreshold() - { - _POPPropertyAnimationState::updatedDynamicsThreshold(); - if (NULL != solver) { - solver->setThreshold(dynamicsThreshold); - } - } - - void updatedBouncinessAndSpeed() { - [POPSpringAnimation convertBounciness:springBounciness speed:springSpeed toTension:&dynamicsTension friction:&dynamicsFriction mass:&dynamicsMass]; - updatedDynamics(); - } - - bool advance(CFTimeInterval time, CFTimeInterval dt, id obj) { - // advance past not yet initialized animations - if (NULL == currentVec) { - return false; - } - - CFTimeInterval localTime = time - startTime; - - Vector4d value = vector4d(currentVec); - Vector4d toValue = vector4d(toVec); - Vector4d velocity = vector4d(velocityVec); - - SSState4d state; - state.p = toValue - value; - - // the solver assumes a spring of size zero - // flip the velocity from user perspective to solver perspective - state.v = velocity * -1; - - solver->advance(state, localTime, dt); - value = toValue - state.p; - - // flip velocity back to user perspective - velocity = state.v * -1; - - *currentVec = value; - - if (velocityVec) { - *velocityVec = velocity; - } - - clampCurrentValue(); - - return true; - } - - virtual void reset(bool all) { - _POPPropertyAnimationState::reset(all); - - if (solver) { - solver->setConstants(dynamicsTension, dynamicsFriction, dynamicsMass); - solver->reset(); - } - } -}; - -typedef struct _POPSpringAnimationState POPSpringAnimationState; diff --git a/Example/Pods/pop/pop/POPSpringSolver.h b/Example/Pods/pop/pop/POPSpringSolver.h deleted file mode 100644 index 6db4260f..00000000 --- a/Example/Pods/pop/pop/POPSpringSolver.h +++ /dev/null @@ -1,190 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -#import - -namespace POP { - - template - struct SSState - { - T p; - T v; - }; - - template - struct SSDerivative - { - T dp; - T dv; - }; - - typedef SSState SSState4d; - typedef SSDerivative SSDerivative4d; - - const CFTimeInterval solverDt = 0.001f; - const CFTimeInterval maxSolverDt = 30.0f; - - /** - Templated spring solver class. - */ - template - class SpringSolver - { - double _k; // stiffness - double _b; // dampening - double _m; // mass - - double _tp; // threshold - double _tv; // threshold velocity - double _ta; // threshold acceleration - - CFTimeInterval _accumulatedTime; - SSState _lastState; - T _lastDv; - bool _started; - - public: - SpringSolver(double k, double b, double m = 1) : _k(k), _b(b), _m(m), _started(false) - { - _accumulatedTime = 0; - _lastState.p = T::Zero(); - _lastState.v = T::Zero(); - _lastDv = T::Zero(); - setThreshold(1.); - } - - ~SpringSolver() - { - } - - bool started() - { - return _started; - } - - void setConstants(double k, double b, double m) - { - _k = k; - _b = b; - _m = m; - } - - void setThreshold(double t) - { - _tp = t / 2; // half a unit - _tv = 25.0 * t; // 5 units per second, squared for comparison - _ta = 625.0 * t * t; // 5 units per second squared, squared for comparison - } - - T acceleration(const SSState &state, double t) - { - return state.p*(-_k/_m) - state.v*(_b/_m); - } - - SSDerivative evaluate(const SSState &initial, double t) - { - SSDerivative output; - output.dp = initial.v; - output.dv = acceleration(initial, t); - return output; - } - - SSDerivative evaluate(const SSState &initial, double t, double dt, const SSDerivative &d) - { - SSState state; - state.p = initial.p + d.dp*dt; - state.v = initial.v + d.dv*dt; - SSDerivative output; - output.dp = state.v; - output.dv = acceleration(state, t+dt); - return output; - } - - void integrate(SSState &state, double t, double dt) - { - SSDerivative a = evaluate(state, t); - SSDerivative b = evaluate(state, t, dt*0.5, a); - SSDerivative c = evaluate(state, t, dt*0.5, b); - SSDerivative d = evaluate(state, t, dt, c); - - T dpdt = (a.dp + (b.dp + c.dp)*2.0 + d.dp) * (1.0/6.0); - T dvdt = (a.dv + (b.dv + c.dv)*2.0 + d.dv) * (1.0/6.0); - - state.p = state.p + dpdt*dt; - state.v = state.v + dvdt*dt; - - _lastDv = dvdt; - } - - SSState interpolate(const SSState &previous, const SSState ¤t, double alpha) - { - SSState state; - state.p = current.p*alpha + previous.p*(1-alpha); - state.v = current.v*alpha + previous.v*(1-alpha); - return state; - } - - void advance(SSState &state, double t, double dt) - { - _started = true; - - if (dt > maxSolverDt) { - // excessive time step, force shut down - _lastDv = _lastState.v = _lastState.p = T::Zero(); - } else { - _accumulatedTime += dt; - - SSState previousState = state, currentState = state; - while (_accumulatedTime >= solverDt) { - previousState = currentState; - this->integrate(currentState, t, solverDt); - t += solverDt; - _accumulatedTime -= solverDt; - } - CFTimeInterval alpha = _accumulatedTime / solverDt; - _lastState = state = this->interpolate(previousState, currentState, alpha); - } - } - - bool hasConverged() - { - if (!_started) { - return false; - } - - for (size_t idx = 0; idx < _lastState.p.size(); idx++) { - if (fabs(_lastState.p(idx)) >= _tp) { - return false; - } - } - - return (_lastState.v.squaredNorm() < _tv) && (_lastDv.squaredNorm() < _ta); - } - - void reset() - { - _accumulatedTime = 0; - _lastState.p = T::Zero(); - _lastState.v = T::Zero(); - _lastDv = T::Zero(); - _started = false; - } - }; - - /** - Convenience spring solver type definitions. - */ - typedef SpringSolver SpringSolver2d; - typedef SpringSolver SpringSolver3d; - typedef SpringSolver SpringSolver4d; -} - diff --git a/Example/Pods/pop/pop/POPVector.h b/Example/Pods/pop/pop/POPVector.h deleted file mode 100644 index 32173ff8..00000000 --- a/Example/Pods/pop/pop/POPVector.h +++ /dev/null @@ -1,396 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -#ifndef __POP__FBVector__ -#define __POP__FBVector__ - -#ifdef __cplusplus - -#include -#include - -#import - -#import -#import - -#import "POPDefines.h" - -#if SCENEKIT_SDK_AVAILABLE -#import -#endif - -#if TARGET_OS_IPHONE -#import -#endif - -namespace POP { - - /** Fixed two-size vector class */ - template - struct Vector2 - { - private: - typedef T Vector2::* const _data[2]; - static const _data _v; - - public: - T x; - T y; - - // Zero vector - static const Vector2 Zero() { return Vector2(0); } - - // Constructors - Vector2() {} - explicit Vector2(T v) { x = v; y = v; }; - explicit Vector2(T x0, T y0) : x(x0), y(y0) {}; - explicit Vector2(const CGPoint &p) : x(p.x), y (p.y) {} - explicit Vector2(const CGSize &s) : x(s.width), y (s.height) {} - - // Copy constructor - template explicit Vector2(const Vector2 &v) : x(v.x), y(v.y) {} - - // Index operators - const T& operator[](size_t i) const { return this->*_v[i]; } - T& operator[](size_t i) { return this->*_v[i]; } - const T& operator()(size_t i) const { return this->*_v[i]; } - T& operator()(size_t i) { return this->*_v[i]; } - - // Backing data - T * data() { return &(this->*_v[0]); } - const T * data() const { return &(this->*_v[0]); } - - // Size - inline size_t size() const { return 2; } - - // Assignment - Vector2 &operator= (T v) { x = v; y = v; return *this;} - template Vector2 &operator= (const Vector2 &v) { x = v.x; y = v.y; return *this;} - - // Negation - Vector2 operator- (void) const { return Vector2(-x, -y); } - - // Equality - bool operator== (T v) const { return (x == v && y == v); } - bool operator== (const Vector2 &v) const { return (x == v.x && y == v.y); } - - // Inequality - bool operator!= (T v) const {return (x != v || y != v); } - bool operator!= (const Vector2 &v) const { return (x != v.x || y != v.y); } - - // Scalar Math - Vector2 operator+ (T v) const { return Vector2(x + v, y + v); } - Vector2 operator- (T v) const { return Vector2(x - v, y - v); } - Vector2 operator* (T v) const { return Vector2(x * v, y * v); } - Vector2 operator/ (T v) const { return Vector2(x / v, y / v); } - Vector2 &operator+= (T v) { x += v; y += v; return *this; }; - Vector2 &operator-= (T v) { x -= v; y -= v; return *this; }; - Vector2 &operator*= (T v) { x *= v; y *= v; return *this; }; - Vector2 &operator/= (T v) { x /= v; y /= v; return *this; }; - - // Vector Math - Vector2 operator+ (const Vector2 &v) const { return Vector2(x + v.x, y + v.y); } - Vector2 operator- (const Vector2 &v) const { return Vector2(x - v.x, y - v.y); } - Vector2 &operator+= (const Vector2 &v) { x += v.x; y += v.y; return *this; }; - Vector2 &operator-= (const Vector2 &v) { x -= v.x; y -= v.y; return *this; }; - - // Norms - CGFloat norm() const { return sqrtr(squaredNorm()); } - CGFloat squaredNorm() const { return x * x + y * y; } - - // Cast - template Vector2 cast() const { return Vector2(x, y); } - CGPoint cg_point() const { return CGPointMake(x, y); }; - }; - - template - const typename Vector2::_data Vector2::_v = { &Vector2::x, &Vector2::y }; - - /** Fixed three-size vector class */ - template - struct Vector3 - { - private: - typedef T Vector3::* const _data[3]; - static const _data _v; - - public: - T x; - T y; - T z; - - // Zero vector - static const Vector3 Zero() { return Vector3(0); }; - - // Constructors - Vector3() {} - explicit Vector3(T v) : x(v), y(v), z(v) {}; - explicit Vector3(T x0, T y0, T z0) : x(x0), y(y0), z(z0) {}; - - // Copy constructor - template explicit Vector3(const Vector3 &v) : x(v.x), y(v.y), z(v.z) {} - - // Index operators - const T& operator[](size_t i) const { return this->*_v[i]; } - T& operator[](size_t i) { return this->*_v[i]; } - const T& operator()(size_t i) const { return this->*_v[i]; } - T& operator()(size_t i) { return this->*_v[i]; } - - // Backing data - T * data() { return &(this->*_v[0]); } - const T * data() const { return &(this->*_v[0]); } - - // Size - inline size_t size() const { return 3; } - - // Assignment - Vector3 &operator= (T v) { x = v; y = v; z = v; return *this;} - template Vector3 &operator= (const Vector3 &v) { x = v.x; y = v.y; z = v.z; return *this;} - - // Negation - Vector3 operator- (void) const { return Vector3(-x, -y, -z); } - - // Equality - bool operator== (T v) const { return (x == v && y == v && z = v); } - bool operator== (const Vector3 &v) const { return (x == v.x && y == v.y && z == v.z); } - - // Inequality - bool operator!= (T v) const {return (x != v || y != v || z != v); } - bool operator!= (const Vector3 &v) const { return (x != v.x || y != v.y || z != v.z); } - - // Scalar Math - Vector3 operator+ (T v) const { return Vector3(x + v, y + v, z + v); } - Vector3 operator- (T v) const { return Vector3(x - v, y - v, z - v); } - Vector3 operator* (T v) const { return Vector3(x * v, y * v, z * v); } - Vector3 operator/ (T v) const { return Vector3(x / v, y / v, z / v); } - Vector3 &operator+= (T v) { x += v; y += v; z += v; return *this; }; - Vector3 &operator-= (T v) { x -= v; y -= v; z -= v; return *this; }; - Vector3 &operator*= (T v) { x *= v; y *= v; z *= v; return *this; }; - Vector3 &operator/= (T v) { x /= v; y /= v; z /= v; return *this; }; - - // Vector Math - Vector3 operator+ (const Vector3 &v) const { return Vector3(x + v.x, y + v.y, z + v.z); } - Vector3 operator- (const Vector3 &v) const { return Vector3(x - v.x, y - v.y, z - v.z); } - Vector3 &operator+= (const Vector3 &v) { x += v.x; y += v.y; z += v.z; return *this; }; - Vector3 &operator-= (const Vector3 &v) { x -= v.x; y -= v.y; z -= v.z; return *this; }; - - // Norms - CGFloat norm() const { return sqrtr(squaredNorm()); } - CGFloat squaredNorm() const { return x * x + y * y + z * z; } - - // Cast - template Vector3 cast() const { return Vector3(x, y, z); } - }; - - template - const typename Vector3::_data Vector3::_v = { &Vector3::x, &Vector3::y, &Vector3::z }; - - /** Fixed four-size vector class */ - template - struct Vector4 - { - private: - typedef T Vector4::* const _data[4]; - static const _data _v; - - public: - T x; - T y; - T z; - T w; - - // Zero vector - static const Vector4 Zero() { return Vector4(0); }; - - // Constructors - Vector4() {} - explicit Vector4(T v) : x(v), y(v), z(v), w(v) {}; - explicit Vector4(T x0, T y0, T z0, T w0) : x(x0), y(y0), z(z0), w(w0) {}; - - // Copy constructor - template explicit Vector4(const Vector4 &v) : x(v.x), y(v.y), z(v.z), w(v.w) {} - - // Index operators - const T& operator[](size_t i) const { return this->*_v[i]; } - T& operator[](size_t i) { return this->*_v[i]; } - const T& operator()(size_t i) const { return this->*_v[i]; } - T& operator()(size_t i) { return this->*_v[i]; } - - // Backing data - T * data() { return &(this->*_v[0]); } - const T * data() const { return &(this->*_v[0]); } - - // Size - inline size_t size() const { return 4; } - - // Assignment - Vector4 &operator= (T v) { x = v; y = v; z = v; w = v; return *this;} - template Vector4 &operator= (const Vector4 &v) { x = v.x; y = v.y; z = v.z; w = v.w; return *this;} - - // Negation - Vector4 operator- (void) const { return Vector4(-x, -y, -z, -w); } - - // Equality - bool operator== (T v) const { return (x == v && y == v && z = v, w = v); } - bool operator== (const Vector4 &v) const { return (x == v.x && y == v.y && z == v.z && w == v.w); } - - // Inequality - bool operator!= (T v) const {return (x != v || y != v || z != v || w != v); } - bool operator!= (const Vector4 &v) const { return (x != v.x || y != v.y || z != v.z || w != v.w); } - - // Scalar Math - Vector4 operator+ (T v) const { return Vector4(x + v, y + v, z + v, w + v); } - Vector4 operator- (T v) const { return Vector4(x - v, y - v, z - v, w - v); } - Vector4 operator* (T v) const { return Vector4(x * v, y * v, z * v, w * v); } - Vector4 operator/ (T v) const { return Vector4(x / v, y / v, z / v, w / v); } - Vector4 &operator+= (T v) { x += v; y += v; z += v; w += v; return *this; }; - Vector4 &operator-= (T v) { x -= v; y -= v; z -= v; w -= v; return *this; }; - Vector4 &operator*= (T v) { x *= v; y *= v; z *= v; w *= v; return *this; }; - Vector4 &operator/= (T v) { x /= v; y /= v; z /= v; w /= v; return *this; }; - - // Vector Math - Vector4 operator+ (const Vector4 &v) const { return Vector4(x + v.x, y + v.y, z + v.z, w + v.w); } - Vector4 operator- (const Vector4 &v) const { return Vector4(x - v.x, y - v.y, z - v.z, w - v.w); } - Vector4 &operator+= (const Vector4 &v) { x += v.x; y += v.y; z += v.z; w += v.w; return *this; }; - Vector4 &operator-= (const Vector4 &v) { x -= v.x; y -= v.y; z -= v.z; w -= v.w; return *this; }; - - // Norms - CGFloat norm() const { return sqrtr(squaredNorm()); } - CGFloat squaredNorm() const { return x * x + y * y + z * z + w * w; } - - // Cast - template Vector4 cast() const { return Vector4(x, y, z, w); } - }; - - template - const typename Vector4::_data Vector4::_v = { &Vector4::x, &Vector4::y, &Vector4::z, &Vector4::w }; - - /** Convenience typedefs */ - typedef Vector2 Vector2f; - typedef Vector2 Vector2d; - typedef Vector2 Vector2r; - typedef Vector3 Vector3f; - typedef Vector3 Vector3d; - typedef Vector3 Vector3r; - typedef Vector4 Vector4f; - typedef Vector4 Vector4d; - typedef Vector4 Vector4r; - - /** Variable-sized vector class */ - class Vector - { - size_t _count; - CGFloat *_values; - - private: - Vector(size_t); - Vector(const Vector& other); - - public: - ~Vector(); - - // Creates a new vector instance of count with values. Initializing a vector of size 0 returns NULL. - static Vector *new_vector(NSUInteger count, const CGFloat *values); - - // Creates a new vector given a pointer to another. Can return NULL. - static Vector *new_vector(const Vector * const other); - - // Creates a variable size vector given a static vector and count. - static Vector *new_vector(NSUInteger count, Vector4r vec); - - // Size of vector - NSUInteger size() const { return _count; } - - // Returns array of values - CGFloat *data () { return _values; } - const CGFloat *data () const { return _values; }; - - // Vector2r support - Vector2r vector2r() const; - - // Vector4r support - Vector4r vector4r() const; - - // CGFloat support - static Vector *new_cg_float(CGFloat f); - - // CGPoint support - CGPoint cg_point() const; - static Vector *new_cg_point(const CGPoint &p); - - // CGSize support - CGSize cg_size() const; - static Vector *new_cg_size(const CGSize &s); - - // CGRect support - CGRect cg_rect() const; - static Vector *new_cg_rect(const CGRect &r); - -#if TARGET_OS_IPHONE - // UIEdgeInsets support - UIEdgeInsets ui_edge_insets() const; - static Vector *new_ui_edge_insets(const UIEdgeInsets &i); -#endif - - // CGAffineTransform support - CGAffineTransform cg_affine_transform() const; - static Vector *new_cg_affine_transform(const CGAffineTransform &t); - - // CGColorRef support - CGColorRef cg_color() const CF_RETURNS_RETAINED; - static Vector *new_cg_color(CGColorRef color); - -#if SCENEKIT_SDK_AVAILABLE - // SCNVector3 support - SCNVector3 scn_vector3() const; - static Vector *new_scn_vector3(const SCNVector3 &vec3); - - // SCNVector4 support - SCNVector4 scn_vector4() const; - static Vector *new_scn_vector4(const SCNVector4 &vec4); -#endif - - // operator overloads - CGFloat &operator[](size_t i) const { - NSCAssert(size() > i, @"unexpected vector size:%lu", (unsigned long)size()); - return _values[i]; - } - - // Returns the mathematical length - CGFloat norm() const; - CGFloat squaredNorm() const; - - // Round to nearest sub - void subRound(CGFloat sub); - - // Returns string description - NSString * toString() const; - - // Operator overloads - template Vector& operator= (const Vector4& other) { - size_t count = MIN(_count, other.size()); - for (size_t i = 0; i < count; i++) { - _values[i] = other[i]; - } - return *this; - } - Vector& operator= (const Vector& other); - void swap(Vector &first, Vector &second); - bool operator==(const Vector &other) const; - bool operator!=(const Vector &other) const; - }; - - /** Convenience typedefs */ - typedef std::shared_ptr VectorRef; - typedef std::shared_ptr VectorConstRef; - -} -#endif /* __cplusplus */ -#endif /* defined(__POP__FBVector__) */ diff --git a/Example/Pods/pop/pop/POPVector.mm b/Example/Pods/pop/pop/POPVector.mm deleted file mode 100644 index 4035cb97..00000000 --- a/Example/Pods/pop/pop/POPVector.mm +++ /dev/null @@ -1,335 +0,0 @@ -/** - Copyright (c) 2014-present, Facebook, Inc. - All rights reserved. - - This source code is licensed under the BSD-style license found in the - LICENSE file in the root directory of this source tree. An additional grant - of patent rights can be found in the PATENTS file in the same directory. - */ - -#import "POPVector.h" - -#import "POPDefines.h" -#import "POPCGUtils.h" -#import "POPMath.h" - -namespace POP -{ - - Vector::Vector(const size_t count) - { - _count = count; - _values = 0 != count ? (CGFloat *)calloc(count, sizeof(CGFloat)) : NULL; - } - - Vector::Vector(const Vector& other) - { - _count = other.size(); - _values = 0 != _count ? (CGFloat *)calloc(_count, sizeof(CGFloat)) : NULL; - if (0 != _count) { - memcpy(_values, other.data(), _count * sizeof(CGFloat)); - } - } - - Vector::~Vector() - { - if (NULL != _values) { - free(_values); - _values = NULL; - } - _count = 0; - } - - void Vector::swap(Vector &first, Vector &second) - { - using std::swap; - swap(first._count, second._count); - swap(first._values, second._values); - } - - Vector& Vector::operator=(const Vector& other) - { - Vector temp(other); - swap(*this, temp); - return *this; - } - - bool Vector::operator==(const Vector &other) const { - if (_count != other.size()) { - return false; - } - - const CGFloat * const values = other.data(); - - for (NSUInteger idx = 0; idx < _count; idx++) { - if (_values[idx] != values[idx]) { - return false; - } - } - - return true; - } - - bool Vector::operator!=(const Vector &other) const { - if (_count == other.size()) { - return false; - } - - const CGFloat * const values = other.data(); - - for (NSUInteger idx = 0; idx < _count; idx++) { - if (_values[idx] != values[idx]) { - return false; - } - } - - return true; - } - - Vector *Vector::new_vector(NSUInteger count, const CGFloat *values) - { - if (0 == count) { - return NULL; - } - - Vector *v = new Vector(count); - if (NULL != values) { - memcpy(v->_values, values, count * sizeof(CGFloat)); - } - return v; - } - - Vector *Vector::new_vector(const Vector * const other) - { - if (NULL == other) { - return NULL; - } - - return Vector::new_vector(other->size(), other->data()); - } - - Vector *Vector::new_vector(NSUInteger count, Vector4r vec) - { - if (0 == count) { - return NULL; - } - - Vector *v = new Vector(count); - - NSCAssert(count <= 4, @"unexpected count %lu", (unsigned long)count); - for (NSUInteger i = 0; i < MIN(count, (NSUInteger)4); i++) { - v->_values[i] = vec[i]; - } - - return v; - } - - Vector4r Vector::vector4r() const - { - Vector4r v = Vector4r::Zero(); - for (size_t i = 0; i < _count; i++) { - v(i) = _values[i]; - } - return v; - } - - Vector2r Vector::vector2r() const - { - Vector2r v = Vector2r::Zero(); - if (_count > 0) v(0) = _values[0]; - if (_count > 1) v(1) = _values[1]; - return v; - } - - Vector *Vector::new_cg_float(CGFloat f) - { - Vector *v = new Vector(1); - v->_values[0] = f; - return v; - } - - CGPoint Vector::cg_point () const - { - Vector2r v = vector2r(); - return CGPointMake(v(0), v(1)); - } - - Vector *Vector::new_cg_point(const CGPoint &p) - { - Vector *v = new Vector(2); - v->_values[0] = p.x; - v->_values[1] = p.y; - return v; - } - - CGSize Vector::cg_size () const - { - Vector2r v = vector2r(); - return CGSizeMake(v(0), v(1)); - } - - Vector *Vector::new_cg_size(const CGSize &s) - { - Vector *v = new Vector(2); - v->_values[0] = s.width; - v->_values[1] = s.height; - return v; - } - - CGRect Vector::cg_rect() const - { - return _count < 4 ? CGRectZero : CGRectMake(_values[0], _values[1], _values[2], _values[3]); - } - - Vector *Vector::new_cg_rect(const CGRect &r) - { - Vector *v = new Vector(4); - v->_values[0] = r.origin.x; - v->_values[1] = r.origin.y; - v->_values[2] = r.size.width; - v->_values[3] = r.size.height; - return v; - } - -#if TARGET_OS_IPHONE - - UIEdgeInsets Vector::ui_edge_insets() const - { - return _count < 4 ? UIEdgeInsetsZero : UIEdgeInsetsMake(_values[0], _values[1], _values[2], _values[3]); - } - - Vector *Vector::new_ui_edge_insets(const UIEdgeInsets &i) - { - Vector *v = new Vector(4); - v->_values[0] = i.top; - v->_values[1] = i.left; - v->_values[2] = i.bottom; - v->_values[3] = i.right; - return v; - } - -#endif - - CGAffineTransform Vector::cg_affine_transform() const - { - if (_count < 6) { - return CGAffineTransformIdentity; - } - - NSCAssert(size() >= 6, @"unexpected vector size:%lu", (unsigned long)size()); - CGAffineTransform t; - t.a = _values[0]; - t.b = _values[1]; - t.c = _values[2]; - t.d = _values[3]; - t.tx = _values[4]; - t.ty = _values[5]; - return t; - } - - Vector *Vector::new_cg_affine_transform(const CGAffineTransform &t) - { - Vector *v = new Vector(6); - v->_values[0] = t.a; - v->_values[1] = t.b; - v->_values[2] = t.c; - v->_values[3] = t.d; - v->_values[4] = t.tx; - v->_values[5] = t.ty; - return v; - } - - CGColorRef Vector::cg_color() const - { - if (_count < 4) { - return NULL; - } - return POPCGColorRGBACreate(_values); - } - - Vector *Vector::new_cg_color(CGColorRef color) - { - CGFloat rgba[4]; - POPCGColorGetRGBAComponents(color, rgba); - return new_vector(4, rgba); - } - -#if SCENEKIT_SDK_AVAILABLE - SCNVector3 Vector::scn_vector3() const - { - return _count < 3 ? SCNVector3Make(0.0, 0.0, 0.0) : SCNVector3Make(_values[0], _values[1], _values[2]); - } - - Vector *Vector::new_scn_vector3(const SCNVector3 &vec3) - { - Vector *v = new Vector(3); - v->_values[0] = vec3.x; - v->_values[1] = vec3.y; - v->_values[2] = vec3.z; - return v; - } - - SCNVector4 Vector::scn_vector4() const - { - return _count < 4 ? SCNVector4Make(0.0, 0.0, 0.0, 0.0) : SCNVector4Make(_values[0], _values[1], _values[2], _values[3]); - } - - Vector *Vector::new_scn_vector4(const SCNVector4 &vec4) - { - Vector *v = new Vector(4); - v->_values[0] = vec4.x; - v->_values[1] = vec4.y; - v->_values[2] = vec4.z; - v->_values[3] = vec4.w; - return v; - } -#endif - - void Vector::subRound(CGFloat sub) - { - for (NSUInteger idx = 0; idx < _count; idx++) { - _values[idx] = POPSubRound(_values[idx], sub); - } - } - - CGFloat Vector::norm() const - { - return sqrtr(squaredNorm()); - } - - CGFloat Vector::squaredNorm() const - { - CGFloat d = 0; - for (NSUInteger idx = 0; idx < _count; idx++) { - d += (_values[idx] * _values[idx]); - } - return d; - } - - NSString * Vector::toString() const - { - if (0 == _count) - return @"()"; - - if (1 == _count) - return [NSString stringWithFormat:@"%f", _values[0]]; - - if (2 == _count) - return [NSString stringWithFormat:@"(%.3f, %.3f)", _values[0], _values[1]]; - - NSMutableString *s = [NSMutableString stringWithCapacity:10]; - - for (NSUInteger idx = 0; idx < _count; idx++) { - if (0 == idx) { - [s appendFormat:@"[%.3f", _values[idx]]; - } else if (idx == _count - 1) { - [s appendFormat:@", %.3f]", _values[idx]]; - } else { - [s appendFormat:@", %.3f", _values[idx]]; - } - } - - return s; - - } -} diff --git a/Example/Pods/pop/pop/WebCore/FloatConversion.h b/Example/Pods/pop/pop/WebCore/FloatConversion.h deleted file mode 100644 index 4a161660..00000000 --- a/Example/Pods/pop/pop/WebCore/FloatConversion.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (C) 2007 Apple Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef FloatConversion_h -#define FloatConversion_h - -#include - -namespace WebCore { - - template - float narrowPrecisionToFloat(T); - - template<> - inline float narrowPrecisionToFloat(double number) - { - return static_cast(number); - } - - template - CGFloat narrowPrecisionToCGFloat(T); - - template<> - inline CGFloat narrowPrecisionToCGFloat(double number) - { - return static_cast(number); - } - -} // namespace WebCore - -#endif // FloatConversion_h diff --git a/Example/Pods/pop/pop/WebCore/TransformationMatrix.cpp b/Example/Pods/pop/pop/WebCore/TransformationMatrix.cpp deleted file mode 100644 index 7264ab56..00000000 --- a/Example/Pods/pop/pop/WebCore/TransformationMatrix.cpp +++ /dev/null @@ -1,1074 +0,0 @@ -/* - * Copyright (C) 2005, 2006 Apple Computer, Inc. All rights reserved. - * Copyright (C) 2009 Torch Mobile, Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "TransformationMatrix.h" - -#include - -#include "FloatConversion.h" - -inline double deg2rad(double d) { return d * M_PI / 180.0; } -inline double rad2deg(double r) { return r * 180.0 / M_PI; } -inline double deg2grad(double d) { return d * 400.0 / 360.0; } -inline double grad2deg(double g) { return g * 360.0 / 400.0; } -inline double turn2deg(double t) { return t * 360.0; } -inline double deg2turn(double d) { return d / 360.0; } -inline double rad2grad(double r) { return r * 200.0 / M_PI; } -inline double grad2rad(double g) { return g * M_PI / 200.0; } - -//using namespace std; - -namespace WebCore { - - // - // Supporting Math Functions - // - // This is a set of function from various places (attributed inline) to do things like - // inversion and decomposition of a 4x4 matrix. They are used throughout the code - // - - // - // Adapted from Matrix Inversion by Richard Carling, Graphics Gems . - - // EULA: The Graphics Gems code is copyright-protected. In other words, you cannot claim the text of the code - // as your own and resell it. Using the code is permitted in any program, product, or library, non-commercial - // or commercial. Giving credit is not required, though is a nice gesture. The code comes as-is, and if there - // are any flaws or problems with any Gems code, nobody involved with Gems - authors, editors, publishers, or - // webmasters - are to be held responsible. Basically, don't be a jerk, and remember that anything free comes - // with no guarantee. - - // A clarification about the storage of matrix elements - // - // This class uses a 2 dimensional array internally to store the elements of the matrix. The first index into - // the array refers to the column that the element lies in; the second index refers to the row. - // - // In other words, this is the layout of the matrix: - // - // | m_matrix[0][0] m_matrix[1][0] m_matrix[2][0] m_matrix[3][0] | - // | m_matrix[0][1] m_matrix[1][1] m_matrix[2][1] m_matrix[3][1] | - // | m_matrix[0][2] m_matrix[1][2] m_matrix[2][2] m_matrix[3][2] | - // | m_matrix[0][3] m_matrix[1][3] m_matrix[2][3] m_matrix[3][3] | - - typedef double Vector4[4]; - typedef double Vector3[3]; - - const double SMALL_NUMBER = 1.e-8; - - // inverse(original_matrix, inverse_matrix) - // - // calculate the inverse of a 4x4 matrix - // - // -1 - // A = ___1__ adjoint A - // det A - - // double = determinant2x2(double a, double b, double c, double d) - // - // calculate the determinant of a 2x2 matrix. - - static double determinant2x2(double a, double b, double c, double d) - { - return a * d - b * c; - } - - // double = determinant3x3(a1, a2, a3, b1, b2, b3, c1, c2, c3) - // - // Calculate the determinant of a 3x3 matrix - // in the form - // - // | a1, b1, c1 | - // | a2, b2, c2 | - // | a3, b3, c3 | - - static double determinant3x3(double a1, double a2, double a3, double b1, double b2, double b3, double c1, double c2, double c3) - { - return a1 * determinant2x2(b2, b3, c2, c3) - - b1 * determinant2x2(a2, a3, c2, c3) - + c1 * determinant2x2(a2, a3, b2, b3); - } - - // double = determinant4x4(matrix) - // - // calculate the determinant of a 4x4 matrix. - - static double determinant4x4(const TransformationMatrix::Matrix4& m) - { - // Assign to individual variable names to aid selecting - // correct elements - - double a1 = m[0][0]; - double b1 = m[0][1]; - double c1 = m[0][2]; - double d1 = m[0][3]; - - double a2 = m[1][0]; - double b2 = m[1][1]; - double c2 = m[1][2]; - double d2 = m[1][3]; - - double a3 = m[2][0]; - double b3 = m[2][1]; - double c3 = m[2][2]; - double d3 = m[2][3]; - - double a4 = m[3][0]; - double b4 = m[3][1]; - double c4 = m[3][2]; - double d4 = m[3][3]; - - return a1 * determinant3x3(b2, b3, b4, c2, c3, c4, d2, d3, d4) - - b1 * determinant3x3(a2, a3, a4, c2, c3, c4, d2, d3, d4) - + c1 * determinant3x3(a2, a3, a4, b2, b3, b4, d2, d3, d4) - - d1 * determinant3x3(a2, a3, a4, b2, b3, b4, c2, c3, c4); - } - - // adjoint( original_matrix, inverse_matrix ) - // - // calculate the adjoint of a 4x4 matrix - // - // Let a denote the minor determinant of matrix A obtained by - // ij - // - // deleting the ith row and jth column from A. - // - // i+j - // Let b = (-1) a - // ij ji - // - // The matrix B = (b ) is the adjoint of A - // ij - - static void adjoint(const TransformationMatrix::Matrix4& matrix, TransformationMatrix::Matrix4& result) - { - // Assign to individual variable names to aid - // selecting correct values - double a1 = matrix[0][0]; - double b1 = matrix[0][1]; - double c1 = matrix[0][2]; - double d1 = matrix[0][3]; - - double a2 = matrix[1][0]; - double b2 = matrix[1][1]; - double c2 = matrix[1][2]; - double d2 = matrix[1][3]; - - double a3 = matrix[2][0]; - double b3 = matrix[2][1]; - double c3 = matrix[2][2]; - double d3 = matrix[2][3]; - - double a4 = matrix[3][0]; - double b4 = matrix[3][1]; - double c4 = matrix[3][2]; - double d4 = matrix[3][3]; - - // Row column labeling reversed since we transpose rows & columns - result[0][0] = determinant3x3(b2, b3, b4, c2, c3, c4, d2, d3, d4); - result[1][0] = - determinant3x3(a2, a3, a4, c2, c3, c4, d2, d3, d4); - result[2][0] = determinant3x3(a2, a3, a4, b2, b3, b4, d2, d3, d4); - result[3][0] = - determinant3x3(a2, a3, a4, b2, b3, b4, c2, c3, c4); - - result[0][1] = - determinant3x3(b1, b3, b4, c1, c3, c4, d1, d3, d4); - result[1][1] = determinant3x3(a1, a3, a4, c1, c3, c4, d1, d3, d4); - result[2][1] = - determinant3x3(a1, a3, a4, b1, b3, b4, d1, d3, d4); - result[3][1] = determinant3x3(a1, a3, a4, b1, b3, b4, c1, c3, c4); - - result[0][2] = determinant3x3(b1, b2, b4, c1, c2, c4, d1, d2, d4); - result[1][2] = - determinant3x3(a1, a2, a4, c1, c2, c4, d1, d2, d4); - result[2][2] = determinant3x3(a1, a2, a4, b1, b2, b4, d1, d2, d4); - result[3][2] = - determinant3x3(a1, a2, a4, b1, b2, b4, c1, c2, c4); - - result[0][3] = - determinant3x3(b1, b2, b3, c1, c2, c3, d1, d2, d3); - result[1][3] = determinant3x3(a1, a2, a3, c1, c2, c3, d1, d2, d3); - result[2][3] = - determinant3x3(a1, a2, a3, b1, b2, b3, d1, d2, d3); - result[3][3] = determinant3x3(a1, a2, a3, b1, b2, b3, c1, c2, c3); - } - - // Returns false if the matrix is not invertible - static bool inverse(const TransformationMatrix::Matrix4& matrix, TransformationMatrix::Matrix4& result) - { - // Calculate the adjoint matrix - adjoint(matrix, result); - - // Calculate the 4x4 determinant - // If the determinant is zero, - // then the inverse matrix is not unique. - double det = determinant4x4(matrix); - - if (fabs(det) < SMALL_NUMBER) - return false; - - // Scale the adjoint matrix to get the inverse - - for (int i = 0; i < 4; i++) - for (int j = 0; j < 4; j++) - result[i][j] = result[i][j] / det; - - return true; - } - - // End of code adapted from Matrix Inversion by Richard Carling - - // Perform a decomposition on the passed matrix, return false if unsuccessful - // From Graphics Gems: unmatrix.c - - // Transpose rotation portion of matrix a, return b - static void transposeMatrix4(const TransformationMatrix::Matrix4& a, TransformationMatrix::Matrix4& b) - { - for (int i = 0; i < 4; i++) - for (int j = 0; j < 4; j++) - b[i][j] = a[j][i]; - } - - // Multiply a homogeneous point by a matrix and return the transformed point - static void v4MulPointByMatrix(const Vector4 p, const TransformationMatrix::Matrix4& m, Vector4 result) - { - result[0] = (p[0] * m[0][0]) + (p[1] * m[1][0]) + - (p[2] * m[2][0]) + (p[3] * m[3][0]); - result[1] = (p[0] * m[0][1]) + (p[1] * m[1][1]) + - (p[2] * m[2][1]) + (p[3] * m[3][1]); - result[2] = (p[0] * m[0][2]) + (p[1] * m[1][2]) + - (p[2] * m[2][2]) + (p[3] * m[3][2]); - result[3] = (p[0] * m[0][3]) + (p[1] * m[1][3]) + - (p[2] * m[2][3]) + (p[3] * m[3][3]); - } - - static double v3Length(Vector3 a) - { - return sqrt((a[0] * a[0]) + (a[1] * a[1]) + (a[2] * a[2])); - } - - static void v3Scale(Vector3 v, double desiredLength) - { - double len = v3Length(v); - if (len != 0) { - double l = desiredLength / len; - v[0] *= l; - v[1] *= l; - v[2] *= l; - } - } - - static double v3Dot(const Vector3 a, const Vector3 b) - { - return (a[0] * b[0]) + (a[1] * b[1]) + (a[2] * b[2]); - } - - // Make a linear combination of two vectors and return the result. - // result = (a * ascl) + (b * bscl) - static void v3Combine(const Vector3 a, const Vector3 b, Vector3 result, double ascl, double bscl) - { - result[0] = (ascl * a[0]) + (bscl * b[0]); - result[1] = (ascl * a[1]) + (bscl * b[1]); - result[2] = (ascl * a[2]) + (bscl * b[2]); - } - - // Return the cross product result = a cross b */ - static void v3Cross(const Vector3 a, const Vector3 b, Vector3 result) - { - result[0] = (a[1] * b[2]) - (a[2] * b[1]); - result[1] = (a[2] * b[0]) - (a[0] * b[2]); - result[2] = (a[0] * b[1]) - (a[1] * b[0]); - } - - static bool decompose(const TransformationMatrix::Matrix4& mat, TransformationMatrix::DecomposedType& result) - { - TransformationMatrix::Matrix4 localMatrix; - memcpy(localMatrix, mat, sizeof(TransformationMatrix::Matrix4)); - - // Normalize the matrix. - if (localMatrix[3][3] == 0) - return false; - - int i, j; - for (i = 0; i < 4; i++) - for (j = 0; j < 4; j++) - localMatrix[i][j] /= localMatrix[3][3]; - - // perspectiveMatrix is used to solve for perspective, but it also provides - // an easy way to test for singularity of the upper 3x3 component. - TransformationMatrix::Matrix4 perspectiveMatrix; - memcpy(perspectiveMatrix, localMatrix, sizeof(TransformationMatrix::Matrix4)); - for (i = 0; i < 3; i++) - perspectiveMatrix[i][3] = 0; - perspectiveMatrix[3][3] = 1; - - if (determinant4x4(perspectiveMatrix) == 0) - return false; - - // First, isolate perspective. This is the messiest. - if (localMatrix[0][3] != 0 || localMatrix[1][3] != 0 || localMatrix[2][3] != 0) { - // rightHandSide is the right hand side of the equation. - Vector4 rightHandSide; - rightHandSide[0] = localMatrix[0][3]; - rightHandSide[1] = localMatrix[1][3]; - rightHandSide[2] = localMatrix[2][3]; - rightHandSide[3] = localMatrix[3][3]; - - // Solve the equation by inverting perspectiveMatrix and multiplying - // rightHandSide by the inverse. (This is the easiest way, not - // necessarily the best.) - TransformationMatrix::Matrix4 inversePerspectiveMatrix, transposedInversePerspectiveMatrix; - inverse(perspectiveMatrix, inversePerspectiveMatrix); - transposeMatrix4(inversePerspectiveMatrix, transposedInversePerspectiveMatrix); - - Vector4 perspectivePoint; - v4MulPointByMatrix(rightHandSide, transposedInversePerspectiveMatrix, perspectivePoint); - - result.perspectiveX = perspectivePoint[0]; - result.perspectiveY = perspectivePoint[1]; - result.perspectiveZ = perspectivePoint[2]; - result.perspectiveW = perspectivePoint[3]; - - // Clear the perspective partition - localMatrix[0][3] = localMatrix[1][3] = localMatrix[2][3] = 0; - localMatrix[3][3] = 1; - } else { - // No perspective. - result.perspectiveX = result.perspectiveY = result.perspectiveZ = 0; - result.perspectiveW = 1; - } - - // Next take care of translation (easy). - result.translateX = localMatrix[3][0]; - localMatrix[3][0] = 0; - result.translateY = localMatrix[3][1]; - localMatrix[3][1] = 0; - result.translateZ = localMatrix[3][2]; - localMatrix[3][2] = 0; - - // Vector4 type and functions need to be added to the common set. - Vector3 row[3], pdum3; - - // Now get scale and shear. - for (i = 0; i < 3; i++) { - row[i][0] = localMatrix[i][0]; - row[i][1] = localMatrix[i][1]; - row[i][2] = localMatrix[i][2]; - } - - // Compute X scale factor and normalize first row. - result.scaleX = v3Length(row[0]); - v3Scale(row[0], 1.0); - - // Compute XY shear factor and make 2nd row orthogonal to 1st. - result.skewXY = v3Dot(row[0], row[1]); - v3Combine(row[1], row[0], row[1], 1.0, -result.skewXY); - - // Now, compute Y scale and normalize 2nd row. - result.scaleY = v3Length(row[1]); - v3Scale(row[1], 1.0); - result.skewXY /= result.scaleY; - - // Compute XZ and YZ shears, orthogonalize 3rd row. - result.skewXZ = v3Dot(row[0], row[2]); - v3Combine(row[2], row[0], row[2], 1.0, -result.skewXZ); - result.skewYZ = v3Dot(row[1], row[2]); - v3Combine(row[2], row[1], row[2], 1.0, -result.skewYZ); - - // Next, get Z scale and normalize 3rd row. - result.scaleZ = v3Length(row[2]); - v3Scale(row[2], 1.0); - result.skewXZ /= result.scaleZ; - result.skewYZ /= result.scaleZ; - - // At this point, the matrix (in rows[]) is orthonormal. - // Check for a coordinate system flip. If the determinant - // is -1, then negate the matrix and the scaling factors. - v3Cross(row[1], row[2], pdum3); - if (v3Dot(row[0], pdum3) < 0) { - - result.scaleX *= -1; - result.scaleY *= -1; - result.scaleZ *= -1; - - for (i = 0; i < 3; i++) { - row[i][0] *= -1; - row[i][1] *= -1; - row[i][2] *= -1; - } - } - - // Now, get the rotations out, as described in the gem. - - result.rotateY = asin(-row[0][2]); - if (cos(result.rotateY) != 0) { - result.rotateX = atan2(row[1][2], row[2][2]); - result.rotateZ = atan2(row[0][1], row[0][0]); - } else { - result.rotateX = atan2(-row[2][0], row[1][1]); - result.rotateZ = 0; - } - - double s, t, x, y, z, w; - - t = row[0][0] + row[1][1] + row[2][2] + 1.0; - - if (t > 1e-4) { - s = 0.5 / sqrt(t); - w = 0.25 / s; - x = (row[2][1] - row[1][2]) * s; - y = (row[0][2] - row[2][0]) * s; - z = (row[1][0] - row[0][1]) * s; - } else if (row[0][0] > row[1][1] && row[0][0] > row[2][2]) { - s = sqrt (1.0 + row[0][0] - row[1][1] - row[2][2]) * 2.0; // S=4*qx - x = 0.25 * s; - y = (row[0][1] + row[1][0]) / s; - z = (row[0][2] + row[2][0]) / s; - w = (row[2][1] - row[1][2]) / s; - } else if (row[1][1] > row[2][2]) { - s = sqrt (1.0 + row[1][1] - row[0][0] - row[2][2]) * 2.0; // S=4*qy - x = (row[0][1] + row[1][0]) / s; - y = 0.25 * s; - z = (row[1][2] + row[2][1]) / s; - w = (row[0][2] - row[2][0]) / s; - } else { - s = sqrt(1.0 + row[2][2] - row[0][0] - row[1][1]) * 2.0; // S=4*qz - x = (row[0][2] + row[2][0]) / s; - y = (row[1][2] + row[2][1]) / s; - z = 0.25 * s; - w = (row[1][0] - row[0][1]) / s; - } - - result.quaternionX = x; - result.quaternionY = y; - result.quaternionZ = z; - result.quaternionW = w; - - return true; - } - - // Perform a spherical linear interpolation between the two - // passed quaternions with 0 <= t <= 1 - static void slerp(double qa[4], const double qb[4], double t) - { - double ax, ay, az, aw; - double bx, by, bz, bw; - double cx, cy, cz, cw; - double angle; - double th, invth, scale, invscale; - - ax = qa[0]; ay = qa[1]; az = qa[2]; aw = qa[3]; - bx = qb[0]; by = qb[1]; bz = qb[2]; bw = qb[3]; - - angle = ax * bx + ay * by + az * bz + aw * bw; - - if (angle < 0.0) { - ax = -ax; ay = -ay; - az = -az; aw = -aw; - angle = -angle; - } - - if (angle + 1.0 > .05) { - if (1.0 - angle >= .05) { - th = acos (angle); - invth = 1.0 / sin (th); - scale = sin (th * (1.0 - t)) * invth; - invscale = sin (th * t) * invth; - } else { - scale = 1.0 - t; - invscale = t; - } - } else { - bx = -ay; - by = ax; - bz = -aw; - bw = az; - scale = sin(M_PI * (.5 - t)); - invscale = sin (M_PI * t); - } - - cx = ax * scale + bx * invscale; - cy = ay * scale + by * invscale; - cz = az * scale + bz * invscale; - cw = aw * scale + bw * invscale; - - qa[0] = cx; qa[1] = cy; qa[2] = cz; qa[3] = cw; - } - - // End of Supporting Math Functions - - TransformationMatrix::TransformationMatrix(const CGAffineTransform& t) - { - setMatrix(t.a, t.b, t.c, t.d, t.tx, t.ty); - } - - TransformationMatrix::TransformationMatrix(const CATransform3D& t) - { - setMatrix( - t.m11, t.m12, t.m13, t.m14, - t.m21, t.m22, t.m23, t.m24, - t.m31, t.m32, t.m33, t.m34, - t.m41, t.m42, t.m43, t.m44); - } - - CATransform3D TransformationMatrix::transform3d() const - { - CATransform3D t; - t.m11 = narrowPrecisionToFloat(m11()); - t.m12 = narrowPrecisionToFloat(m12()); - t.m13 = narrowPrecisionToFloat(m13()); - t.m14 = narrowPrecisionToFloat(m14()); - t.m21 = narrowPrecisionToFloat(m21()); - t.m22 = narrowPrecisionToFloat(m22()); - t.m23 = narrowPrecisionToFloat(m23()); - t.m24 = narrowPrecisionToFloat(m24()); - t.m31 = narrowPrecisionToFloat(m31()); - t.m32 = narrowPrecisionToFloat(m32()); - t.m33 = narrowPrecisionToFloat(m33()); - t.m34 = narrowPrecisionToFloat(m34()); - t.m41 = narrowPrecisionToFloat(m41()); - t.m42 = narrowPrecisionToFloat(m42()); - t.m43 = narrowPrecisionToFloat(m43()); - t.m44 = narrowPrecisionToFloat(m44()); - return t; - } - - CGAffineTransform TransformationMatrix::affineTransform () const - { - CGAffineTransform t; - t.a = narrowPrecisionToFloat(m11()); - t.b = narrowPrecisionToFloat(m12()); - t.c = narrowPrecisionToFloat(m21()); - t.d = narrowPrecisionToFloat(m22()); - t.tx = narrowPrecisionToFloat(m41()); - t.ty = narrowPrecisionToFloat(m42()); - return t; - } - - TransformationMatrix::operator CATransform3D() const - { - return transform3d(); - } - - TransformationMatrix& TransformationMatrix::scale(double s) - { - return scaleNonUniform(s, s); - } - - TransformationMatrix& TransformationMatrix::rotateFromVector(double x, double y) - { - return rotate(rad2deg(atan2(y, x))); - } - - TransformationMatrix& TransformationMatrix::flipX() - { - return scaleNonUniform(-1.0, 1.0); - } - - TransformationMatrix& TransformationMatrix::flipY() - { - return scaleNonUniform(1.0, -1.0); - } - - TransformationMatrix& TransformationMatrix::scaleNonUniform(double sx, double sy) - { - m_matrix[0][0] *= sx; - m_matrix[0][1] *= sx; - m_matrix[0][2] *= sx; - m_matrix[0][3] *= sx; - - m_matrix[1][0] *= sy; - m_matrix[1][1] *= sy; - m_matrix[1][2] *= sy; - m_matrix[1][3] *= sy; - return *this; - } - - TransformationMatrix& TransformationMatrix::scale3d(double sx, double sy, double sz) - { - scaleNonUniform(sx, sy); - - m_matrix[2][0] *= sz; - m_matrix[2][1] *= sz; - m_matrix[2][2] *= sz; - m_matrix[2][3] *= sz; - return *this; - } - - TransformationMatrix& TransformationMatrix::rotate3d(double x, double y, double z, double angle) - { - // Normalize the axis of rotation - double length = sqrt(x * x + y * y + z * z); - if (length == 0) { - // A direction vector that cannot be normalized, such as [0, 0, 0], will cause the rotation to not be applied. - return *this; - } else if (length != 1) { - x /= length; - y /= length; - z /= length; - } - - // Angles are in degrees. Switch to radians. - angle = deg2rad(angle); - - double sinTheta = sin(angle); - double cosTheta = cos(angle); - - TransformationMatrix mat; - - // Optimize cases where the axis is along a major axis - if (x == 1.0 && y == 0.0 && z == 0.0) { - mat.m_matrix[0][0] = 1.0; - mat.m_matrix[0][1] = 0.0; - mat.m_matrix[0][2] = 0.0; - mat.m_matrix[1][0] = 0.0; - mat.m_matrix[1][1] = cosTheta; - mat.m_matrix[1][2] = sinTheta; - mat.m_matrix[2][0] = 0.0; - mat.m_matrix[2][1] = -sinTheta; - mat.m_matrix[2][2] = cosTheta; - mat.m_matrix[0][3] = mat.m_matrix[1][3] = mat.m_matrix[2][3] = 0.0; - mat.m_matrix[3][0] = mat.m_matrix[3][1] = mat.m_matrix[3][2] = 0.0; - mat.m_matrix[3][3] = 1.0; - } else if (x == 0.0 && y == 1.0 && z == 0.0) { - mat.m_matrix[0][0] = cosTheta; - mat.m_matrix[0][1] = 0.0; - mat.m_matrix[0][2] = -sinTheta; - mat.m_matrix[1][0] = 0.0; - mat.m_matrix[1][1] = 1.0; - mat.m_matrix[1][2] = 0.0; - mat.m_matrix[2][0] = sinTheta; - mat.m_matrix[2][1] = 0.0; - mat.m_matrix[2][2] = cosTheta; - mat.m_matrix[0][3] = mat.m_matrix[1][3] = mat.m_matrix[2][3] = 0.0; - mat.m_matrix[3][0] = mat.m_matrix[3][1] = mat.m_matrix[3][2] = 0.0; - mat.m_matrix[3][3] = 1.0; - } else if (x == 0.0 && y == 0.0 && z == 1.0) { - mat.m_matrix[0][0] = cosTheta; - mat.m_matrix[0][1] = sinTheta; - mat.m_matrix[0][2] = 0.0; - mat.m_matrix[1][0] = -sinTheta; - mat.m_matrix[1][1] = cosTheta; - mat.m_matrix[1][2] = 0.0; - mat.m_matrix[2][0] = 0.0; - mat.m_matrix[2][1] = 0.0; - mat.m_matrix[2][2] = 1.0; - mat.m_matrix[0][3] = mat.m_matrix[1][3] = mat.m_matrix[2][3] = 0.0; - mat.m_matrix[3][0] = mat.m_matrix[3][1] = mat.m_matrix[3][2] = 0.0; - mat.m_matrix[3][3] = 1.0; - } else { - // This case is the rotation about an arbitrary unit vector. - // - // Formula is adapted from Wikipedia article on Rotation matrix, - // http://en.wikipedia.org/wiki/Rotation_matrix#Rotation_matrix_from_axis_and_angle - // - // An alternate resource with the same matrix: http://www.fastgraph.com/makegames/3drotation/ - // - double oneMinusCosTheta = 1 - cosTheta; - mat.m_matrix[0][0] = cosTheta + x * x * oneMinusCosTheta; - mat.m_matrix[0][1] = y * x * oneMinusCosTheta + z * sinTheta; - mat.m_matrix[0][2] = z * x * oneMinusCosTheta - y * sinTheta; - mat.m_matrix[1][0] = x * y * oneMinusCosTheta - z * sinTheta; - mat.m_matrix[1][1] = cosTheta + y * y * oneMinusCosTheta; - mat.m_matrix[1][2] = z * y * oneMinusCosTheta + x * sinTheta; - mat.m_matrix[2][0] = x * z * oneMinusCosTheta + y * sinTheta; - mat.m_matrix[2][1] = y * z * oneMinusCosTheta - x * sinTheta; - mat.m_matrix[2][2] = cosTheta + z * z * oneMinusCosTheta; - mat.m_matrix[0][3] = mat.m_matrix[1][3] = mat.m_matrix[2][3] = 0.0; - mat.m_matrix[3][0] = mat.m_matrix[3][1] = mat.m_matrix[3][2] = 0.0; - mat.m_matrix[3][3] = 1.0; - } - multiply(mat); - return *this; - } - - TransformationMatrix& TransformationMatrix::rotate3d(double rx, double ry, double rz) - { - // Angles are in degrees. Switch to radians. - rx = deg2rad(rx); - ry = deg2rad(ry); - rz = deg2rad(rz); - - TransformationMatrix mat; - - double sinTheta = sin(rz); - double cosTheta = cos(rz); - - mat.m_matrix[0][0] = cosTheta; - mat.m_matrix[0][1] = sinTheta; - mat.m_matrix[0][2] = 0.0; - mat.m_matrix[1][0] = -sinTheta; - mat.m_matrix[1][1] = cosTheta; - mat.m_matrix[1][2] = 0.0; - mat.m_matrix[2][0] = 0.0; - mat.m_matrix[2][1] = 0.0; - mat.m_matrix[2][2] = 1.0; - mat.m_matrix[0][3] = mat.m_matrix[1][3] = mat.m_matrix[2][3] = 0.0; - mat.m_matrix[3][0] = mat.m_matrix[3][1] = mat.m_matrix[3][2] = 0.0; - mat.m_matrix[3][3] = 1.0; - - TransformationMatrix rmat(mat); - - sinTheta = sin(ry); - cosTheta = cos(ry); - - mat.m_matrix[0][0] = cosTheta; - mat.m_matrix[0][1] = 0.0; - mat.m_matrix[0][2] = -sinTheta; - mat.m_matrix[1][0] = 0.0; - mat.m_matrix[1][1] = 1.0; - mat.m_matrix[1][2] = 0.0; - mat.m_matrix[2][0] = sinTheta; - mat.m_matrix[2][1] = 0.0; - mat.m_matrix[2][2] = cosTheta; - mat.m_matrix[0][3] = mat.m_matrix[1][3] = mat.m_matrix[2][3] = 0.0; - mat.m_matrix[3][0] = mat.m_matrix[3][1] = mat.m_matrix[3][2] = 0.0; - mat.m_matrix[3][3] = 1.0; - - rmat.multiply(mat); - - sinTheta = sin(rx); - cosTheta = cos(rx); - - mat.m_matrix[0][0] = 1.0; - mat.m_matrix[0][1] = 0.0; - mat.m_matrix[0][2] = 0.0; - mat.m_matrix[1][0] = 0.0; - mat.m_matrix[1][1] = cosTheta; - mat.m_matrix[1][2] = sinTheta; - mat.m_matrix[2][0] = 0.0; - mat.m_matrix[2][1] = -sinTheta; - mat.m_matrix[2][2] = cosTheta; - mat.m_matrix[0][3] = mat.m_matrix[1][3] = mat.m_matrix[2][3] = 0.0; - mat.m_matrix[3][0] = mat.m_matrix[3][1] = mat.m_matrix[3][2] = 0.0; - mat.m_matrix[3][3] = 1.0; - - rmat.multiply(mat); - - multiply(rmat); - return *this; - } - - TransformationMatrix& TransformationMatrix::translate(double tx, double ty) - { - m_matrix[3][0] += tx * m_matrix[0][0] + ty * m_matrix[1][0]; - m_matrix[3][1] += tx * m_matrix[0][1] + ty * m_matrix[1][1]; - m_matrix[3][2] += tx * m_matrix[0][2] + ty * m_matrix[1][2]; - m_matrix[3][3] += tx * m_matrix[0][3] + ty * m_matrix[1][3]; - return *this; - } - - TransformationMatrix& TransformationMatrix::translate3d(double tx, double ty, double tz) - { - m_matrix[3][0] += tx * m_matrix[0][0] + ty * m_matrix[1][0] + tz * m_matrix[2][0]; - m_matrix[3][1] += tx * m_matrix[0][1] + ty * m_matrix[1][1] + tz * m_matrix[2][1]; - m_matrix[3][2] += tx * m_matrix[0][2] + ty * m_matrix[1][2] + tz * m_matrix[2][2]; - m_matrix[3][3] += tx * m_matrix[0][3] + ty * m_matrix[1][3] + tz * m_matrix[2][3]; - return *this; - } - - TransformationMatrix& TransformationMatrix::translateRight(double tx, double ty) - { - if (tx != 0) { - m_matrix[0][0] += m_matrix[0][3] * tx; - m_matrix[1][0] += m_matrix[1][3] * tx; - m_matrix[2][0] += m_matrix[2][3] * tx; - m_matrix[3][0] += m_matrix[3][3] * tx; - } - - if (ty != 0) { - m_matrix[0][1] += m_matrix[0][3] * ty; - m_matrix[1][1] += m_matrix[1][3] * ty; - m_matrix[2][1] += m_matrix[2][3] * ty; - m_matrix[3][1] += m_matrix[3][3] * ty; - } - - return *this; - } - - TransformationMatrix& TransformationMatrix::translateRight3d(double tx, double ty, double tz) - { - translateRight(tx, ty); - if (tz != 0) { - m_matrix[0][2] += m_matrix[0][3] * tz; - m_matrix[1][2] += m_matrix[1][3] * tz; - m_matrix[2][2] += m_matrix[2][3] * tz; - m_matrix[3][2] += m_matrix[3][3] * tz; - } - - return *this; - } - - TransformationMatrix& TransformationMatrix::skew(double sx, double sy) - { - // angles are in degrees. Switch to radians - sx = deg2rad(sx); - sy = deg2rad(sy); - - TransformationMatrix mat; - mat.m_matrix[0][1] = tan(sy); // note that the y shear goes in the first row - mat.m_matrix[1][0] = tan(sx); // and the x shear in the second row - - multiply(mat); - return *this; - } - - TransformationMatrix& TransformationMatrix::applyPerspective(double p) - { - TransformationMatrix mat; - if (p != 0) - mat.m_matrix[2][3] = -1/p; - - multiply(mat); - return *this; - } - - // this = mat * this. - TransformationMatrix& TransformationMatrix::multiply(const TransformationMatrix& mat) - { - Matrix4 tmp; - - tmp[0][0] = (mat.m_matrix[0][0] * m_matrix[0][0] + mat.m_matrix[0][1] * m_matrix[1][0] - + mat.m_matrix[0][2] * m_matrix[2][0] + mat.m_matrix[0][3] * m_matrix[3][0]); - tmp[0][1] = (mat.m_matrix[0][0] * m_matrix[0][1] + mat.m_matrix[0][1] * m_matrix[1][1] - + mat.m_matrix[0][2] * m_matrix[2][1] + mat.m_matrix[0][3] * m_matrix[3][1]); - tmp[0][2] = (mat.m_matrix[0][0] * m_matrix[0][2] + mat.m_matrix[0][1] * m_matrix[1][2] - + mat.m_matrix[0][2] * m_matrix[2][2] + mat.m_matrix[0][3] * m_matrix[3][2]); - tmp[0][3] = (mat.m_matrix[0][0] * m_matrix[0][3] + mat.m_matrix[0][1] * m_matrix[1][3] - + mat.m_matrix[0][2] * m_matrix[2][3] + mat.m_matrix[0][3] * m_matrix[3][3]); - - tmp[1][0] = (mat.m_matrix[1][0] * m_matrix[0][0] + mat.m_matrix[1][1] * m_matrix[1][0] - + mat.m_matrix[1][2] * m_matrix[2][0] + mat.m_matrix[1][3] * m_matrix[3][0]); - tmp[1][1] = (mat.m_matrix[1][0] * m_matrix[0][1] + mat.m_matrix[1][1] * m_matrix[1][1] - + mat.m_matrix[1][2] * m_matrix[2][1] + mat.m_matrix[1][3] * m_matrix[3][1]); - tmp[1][2] = (mat.m_matrix[1][0] * m_matrix[0][2] + mat.m_matrix[1][1] * m_matrix[1][2] - + mat.m_matrix[1][2] * m_matrix[2][2] + mat.m_matrix[1][3] * m_matrix[3][2]); - tmp[1][3] = (mat.m_matrix[1][0] * m_matrix[0][3] + mat.m_matrix[1][1] * m_matrix[1][3] - + mat.m_matrix[1][2] * m_matrix[2][3] + mat.m_matrix[1][3] * m_matrix[3][3]); - - tmp[2][0] = (mat.m_matrix[2][0] * m_matrix[0][0] + mat.m_matrix[2][1] * m_matrix[1][0] - + mat.m_matrix[2][2] * m_matrix[2][0] + mat.m_matrix[2][3] * m_matrix[3][0]); - tmp[2][1] = (mat.m_matrix[2][0] * m_matrix[0][1] + mat.m_matrix[2][1] * m_matrix[1][1] - + mat.m_matrix[2][2] * m_matrix[2][1] + mat.m_matrix[2][3] * m_matrix[3][1]); - tmp[2][2] = (mat.m_matrix[2][0] * m_matrix[0][2] + mat.m_matrix[2][1] * m_matrix[1][2] - + mat.m_matrix[2][2] * m_matrix[2][2] + mat.m_matrix[2][3] * m_matrix[3][2]); - tmp[2][3] = (mat.m_matrix[2][0] * m_matrix[0][3] + mat.m_matrix[2][1] * m_matrix[1][3] - + mat.m_matrix[2][2] * m_matrix[2][3] + mat.m_matrix[2][3] * m_matrix[3][3]); - - tmp[3][0] = (mat.m_matrix[3][0] * m_matrix[0][0] + mat.m_matrix[3][1] * m_matrix[1][0] - + mat.m_matrix[3][2] * m_matrix[2][0] + mat.m_matrix[3][3] * m_matrix[3][0]); - tmp[3][1] = (mat.m_matrix[3][0] * m_matrix[0][1] + mat.m_matrix[3][1] * m_matrix[1][1] - + mat.m_matrix[3][2] * m_matrix[2][1] + mat.m_matrix[3][3] * m_matrix[3][1]); - tmp[3][2] = (mat.m_matrix[3][0] * m_matrix[0][2] + mat.m_matrix[3][1] * m_matrix[1][2] - + mat.m_matrix[3][2] * m_matrix[2][2] + mat.m_matrix[3][3] * m_matrix[3][2]); - tmp[3][3] = (mat.m_matrix[3][0] * m_matrix[0][3] + mat.m_matrix[3][1] * m_matrix[1][3] - + mat.m_matrix[3][2] * m_matrix[2][3] + mat.m_matrix[3][3] * m_matrix[3][3]); - - setMatrix(tmp); - return *this; - } - - void TransformationMatrix::multVecMatrix(double x, double y, double& resultX, double& resultY) const - { - resultX = m_matrix[3][0] + x * m_matrix[0][0] + y * m_matrix[1][0]; - resultY = m_matrix[3][1] + x * m_matrix[0][1] + y * m_matrix[1][1]; - double w = m_matrix[3][3] + x * m_matrix[0][3] + y * m_matrix[1][3]; - if (w != 1 && w != 0) { - resultX /= w; - resultY /= w; - } - } - - void TransformationMatrix::multVecMatrix(double x, double y, double z, double& resultX, double& resultY, double& resultZ) const - { - resultX = m_matrix[3][0] + x * m_matrix[0][0] + y * m_matrix[1][0] + z * m_matrix[2][0]; - resultY = m_matrix[3][1] + x * m_matrix[0][1] + y * m_matrix[1][1] + z * m_matrix[2][1]; - resultZ = m_matrix[3][2] + x * m_matrix[0][2] + y * m_matrix[1][2] + z * m_matrix[2][2]; - double w = m_matrix[3][3] + x * m_matrix[0][3] + y * m_matrix[1][3] + z * m_matrix[2][3]; - if (w != 1 && w != 0) { - resultX /= w; - resultY /= w; - resultZ /= w; - } - } - - bool TransformationMatrix::isInvertible() const - { - if (isIdentityOrTranslation()) - return true; - - double det = WebCore::determinant4x4(m_matrix); - - if (fabs(det) < SMALL_NUMBER) - return false; - - return true; - } - - TransformationMatrix TransformationMatrix::inverse() const - { - if (isIdentityOrTranslation()) { - // identity matrix - if (m_matrix[3][0] == 0 && m_matrix[3][1] == 0 && m_matrix[3][2] == 0) - return TransformationMatrix(); - - // translation - return TransformationMatrix(1, 0, 0, 0, - 0, 1, 0, 0, - 0, 0, 1, 0, - -m_matrix[3][0], -m_matrix[3][1], -m_matrix[3][2], 1); - } - - TransformationMatrix invMat; - bool inverted = WebCore::inverse(m_matrix, invMat.m_matrix); - if (!inverted) - return TransformationMatrix(); - - return invMat; - } - - void TransformationMatrix::makeAffine() - { - m_matrix[0][2] = 0; - m_matrix[0][3] = 0; - - m_matrix[1][2] = 0; - m_matrix[1][3] = 0; - - m_matrix[2][0] = 0; - m_matrix[2][1] = 0; - m_matrix[2][2] = 1; - m_matrix[2][3] = 0; - - m_matrix[3][2] = 0; - m_matrix[3][3] = 1; - } - - static inline void blendFloat(double& from, double to, double progress) - { - if (from != to) - from = from + (to - from) * progress; - } - - void TransformationMatrix::blend(const TransformationMatrix& from, double progress) - { - if (from.isIdentity() && isIdentity()) - return; - - // decompose - DecomposedType fromDecomp; - DecomposedType toDecomp; - from.decompose(fromDecomp); - decompose(toDecomp); - - // interpolate - blendFloat(fromDecomp.scaleX, toDecomp.scaleX, progress); - blendFloat(fromDecomp.scaleY, toDecomp.scaleY, progress); - blendFloat(fromDecomp.scaleZ, toDecomp.scaleZ, progress); - blendFloat(fromDecomp.skewXY, toDecomp.skewXY, progress); - blendFloat(fromDecomp.skewXZ, toDecomp.skewXZ, progress); - blendFloat(fromDecomp.skewYZ, toDecomp.skewYZ, progress); - blendFloat(fromDecomp.translateX, toDecomp.translateX, progress); - blendFloat(fromDecomp.translateY, toDecomp.translateY, progress); - blendFloat(fromDecomp.translateZ, toDecomp.translateZ, progress); - blendFloat(fromDecomp.perspectiveX, toDecomp.perspectiveX, progress); - blendFloat(fromDecomp.perspectiveY, toDecomp.perspectiveY, progress); - blendFloat(fromDecomp.perspectiveZ, toDecomp.perspectiveZ, progress); - blendFloat(fromDecomp.perspectiveW, toDecomp.perspectiveW, progress); - - slerp(&fromDecomp.quaternionX, &toDecomp.quaternionX, progress); - - // recompose - recompose(fromDecomp); - } - - bool TransformationMatrix::decompose(DecomposedType& decomp) const - { - if (isIdentity()) { - memset(&decomp, 0, sizeof(decomp)); - decomp.perspectiveW = 1; - decomp.scaleX = 1; - decomp.scaleY = 1; - decomp.scaleZ = 1; - } - - if (!WebCore::decompose(m_matrix, decomp)) - return false; - return true; - } - - void TransformationMatrix::recompose(const DecomposedType& decomp, bool useEulerAngle) - { - makeIdentity(); - - // first apply perspective - m_matrix[0][3] = decomp.perspectiveX; - m_matrix[1][3] = decomp.perspectiveY; - m_matrix[2][3] = decomp.perspectiveZ; - m_matrix[3][3] = decomp.perspectiveW; - - // now translate - translate3d(decomp.translateX, decomp.translateY, decomp.translateZ); - - if (!useEulerAngle) { - // apply rotation - double xx = decomp.quaternionX * decomp.quaternionX; - double xy = decomp.quaternionX * decomp.quaternionY; - double xz = decomp.quaternionX * decomp.quaternionZ; - double xw = decomp.quaternionX * decomp.quaternionW; - double yy = decomp.quaternionY * decomp.quaternionY; - double yz = decomp.quaternionY * decomp.quaternionZ; - double yw = decomp.quaternionY * decomp.quaternionW; - double zz = decomp.quaternionZ * decomp.quaternionZ; - double zw = decomp.quaternionZ * decomp.quaternionW; - - // Construct a composite rotation matrix from the quaternion values - TransformationMatrix rotationMatrix(1 - 2 * (yy + zz), 2 * (xy - zw), 2 * (xz + yw), 0, - 2 * (xy + zw), 1 - 2 * (xx + zz), 2 * (yz - xw), 0, - 2 * (xz - yw), 2 * (yz + xw), 1 - 2 * (xx + yy), 0, - 0, 0, 0, 1); - - multiply(rotationMatrix); - } else { - rotate3d(1.0, 0.0, 0.0, rad2deg(decomp.rotateX)); - rotate3d(0.0, 1.0, 0.0, rad2deg(decomp.rotateY)); - rotate3d(0.0, 0.0, 1.0, rad2deg(decomp.rotateZ)); - } - - // now apply skew - if (decomp.skewYZ) { - TransformationMatrix tmp; - tmp.setM32(decomp.skewYZ); - multiply(tmp); - } - - if (decomp.skewXZ) { - TransformationMatrix tmp; - tmp.setM31(decomp.skewXZ); - multiply(tmp); - } - - if (decomp.skewXY) { - TransformationMatrix tmp; - tmp.setM21(decomp.skewXY); - multiply(tmp); - } - - // finally, apply scale - scale3d(decomp.scaleX, decomp.scaleY, decomp.scaleZ); - } -} \ No newline at end of file diff --git a/Example/Pods/pop/pop/WebCore/TransformationMatrix.h b/Example/Pods/pop/pop/WebCore/TransformationMatrix.h deleted file mode 100644 index b99ae892..00000000 --- a/Example/Pods/pop/pop/WebCore/TransformationMatrix.h +++ /dev/null @@ -1,279 +0,0 @@ -/* - * Copyright (C) 2005, 2006 Apple Computer, Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef TransformationMatrix_h -#define TransformationMatrix_h - -#include //for memcpy - -#include - -#include - -namespace WebCore { - - class TransformationMatrix { - public: - - typedef double Matrix4[4][4]; - - TransformationMatrix() { makeIdentity(); } - TransformationMatrix(const TransformationMatrix& t) { *this = t; } - TransformationMatrix(double a, double b, double c, double d, double e, double f) { setMatrix(a, b, c, d, e, f); } - TransformationMatrix(double m11, double m12, double m13, double m14, - double m21, double m22, double m23, double m24, - double m31, double m32, double m33, double m34, - double m41, double m42, double m43, double m44) - { - setMatrix(m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, m41, m42, m43, m44); - } - - void setMatrix(double a, double b, double c, double d, double e, double f) - { - m_matrix[0][0] = a; m_matrix[0][1] = b; m_matrix[0][2] = 0; m_matrix[0][3] = 0; - m_matrix[1][0] = c; m_matrix[1][1] = d; m_matrix[1][2] = 0; m_matrix[1][3] = 0; - m_matrix[2][0] = 0; m_matrix[2][1] = 0; m_matrix[2][2] = 1; m_matrix[2][3] = 0; - m_matrix[3][0] = e; m_matrix[3][1] = f; m_matrix[3][2] = 0; m_matrix[3][3] = 1; - } - - void setMatrix(double m11, double m12, double m13, double m14, - double m21, double m22, double m23, double m24, - double m31, double m32, double m33, double m34, - double m41, double m42, double m43, double m44) - { - m_matrix[0][0] = m11; m_matrix[0][1] = m12; m_matrix[0][2] = m13; m_matrix[0][3] = m14; - m_matrix[1][0] = m21; m_matrix[1][1] = m22; m_matrix[1][2] = m23; m_matrix[1][3] = m24; - m_matrix[2][0] = m31; m_matrix[2][1] = m32; m_matrix[2][2] = m33; m_matrix[2][3] = m34; - m_matrix[3][0] = m41; m_matrix[3][1] = m42; m_matrix[3][2] = m43; m_matrix[3][3] = m44; - } - - TransformationMatrix& operator =(const TransformationMatrix &t) - { - setMatrix(t.m_matrix); - return *this; - } - - TransformationMatrix& makeIdentity() - { - setMatrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - return *this; - } - - bool isIdentity() const - { - return m_matrix[0][0] == 1 && m_matrix[0][1] == 0 && m_matrix[0][2] == 0 && m_matrix[0][3] == 0 && - m_matrix[1][0] == 0 && m_matrix[1][1] == 1 && m_matrix[1][2] == 0 && m_matrix[1][3] == 0 && - m_matrix[2][0] == 0 && m_matrix[2][1] == 0 && m_matrix[2][2] == 1 && m_matrix[2][3] == 0 && - m_matrix[3][0] == 0 && m_matrix[3][1] == 0 && m_matrix[3][2] == 0 && m_matrix[3][3] == 1; - } - - // This form preserves the double math from input to output - void map(double x, double y, double& x2, double& y2) const { multVecMatrix(x, y, x2, y2); } - - double m11() const { return m_matrix[0][0]; } - void setM11(double f) { m_matrix[0][0] = f; } - double m12() const { return m_matrix[0][1]; } - void setM12(double f) { m_matrix[0][1] = f; } - double m13() const { return m_matrix[0][2]; } - void setM13(double f) { m_matrix[0][2] = f; } - double m14() const { return m_matrix[0][3]; } - void setM14(double f) { m_matrix[0][3] = f; } - double m21() const { return m_matrix[1][0]; } - void setM21(double f) { m_matrix[1][0] = f; } - double m22() const { return m_matrix[1][1]; } - void setM22(double f) { m_matrix[1][1] = f; } - double m23() const { return m_matrix[1][2]; } - void setM23(double f) { m_matrix[1][2] = f; } - double m24() const { return m_matrix[1][3]; } - void setM24(double f) { m_matrix[1][3] = f; } - double m31() const { return m_matrix[2][0]; } - void setM31(double f) { m_matrix[2][0] = f; } - double m32() const { return m_matrix[2][1]; } - void setM32(double f) { m_matrix[2][1] = f; } - double m33() const { return m_matrix[2][2]; } - void setM33(double f) { m_matrix[2][2] = f; } - double m34() const { return m_matrix[2][3]; } - void setM34(double f) { m_matrix[2][3] = f; } - double m41() const { return m_matrix[3][0]; } - void setM41(double f) { m_matrix[3][0] = f; } - double m42() const { return m_matrix[3][1]; } - void setM42(double f) { m_matrix[3][1] = f; } - double m43() const { return m_matrix[3][2]; } - void setM43(double f) { m_matrix[3][2] = f; } - double m44() const { return m_matrix[3][3]; } - void setM44(double f) { m_matrix[3][3] = f; } - - double a() const { return m_matrix[0][0]; } - void setA(double a) { m_matrix[0][0] = a; } - - double b() const { return m_matrix[0][1]; } - void setB(double b) { m_matrix[0][1] = b; } - - double c() const { return m_matrix[1][0]; } - void setC(double c) { m_matrix[1][0] = c; } - - double d() const { return m_matrix[1][1]; } - void setD(double d) { m_matrix[1][1] = d; } - - double e() const { return m_matrix[3][0]; } - void setE(double e) { m_matrix[3][0] = e; } - - double f() const { return m_matrix[3][1]; } - void setF(double f) { m_matrix[3][1] = f; } - - // this = this * mat - TransformationMatrix& multiply(const TransformationMatrix&); - - TransformationMatrix& scale(double); - TransformationMatrix& scaleNonUniform(double sx, double sy); - TransformationMatrix& scale3d(double sx, double sy, double sz); - - TransformationMatrix& rotate(double d) { return rotate3d(0, 0, d); } - TransformationMatrix& rotateFromVector(double x, double y); - TransformationMatrix& rotate3d(double rx, double ry, double rz); - - // The vector (x,y,z) is normalized if it's not already. A vector of - // (0,0,0) uses a vector of (0,0,1). - TransformationMatrix& rotate3d(double x, double y, double z, double angle); - - TransformationMatrix& translate(double tx, double ty); - TransformationMatrix& translate3d(double tx, double ty, double tz); - - // translation added with a post-multiply - TransformationMatrix& translateRight(double tx, double ty); - TransformationMatrix& translateRight3d(double tx, double ty, double tz); - - TransformationMatrix& flipX(); - TransformationMatrix& flipY(); - TransformationMatrix& skew(double angleX, double angleY); - TransformationMatrix& skewX(double angle) { return skew(angle, 0); } - TransformationMatrix& skewY(double angle) { return skew(0, angle); } - - TransformationMatrix& applyPerspective(double p); - bool hasPerspective() const { return m_matrix[2][3] != 0.0f; } - - bool isInvertible() const; - - // This method returns the identity matrix if it is not invertible. - // Use isInvertible() before calling this if you need to know. - TransformationMatrix inverse() const; - - // decompose the matrix into its component parts - typedef struct { - double scaleX, scaleY, scaleZ; - double skewXY, skewXZ, skewYZ; - double rotateX, rotateY, rotateZ; - double quaternionX, quaternionY, quaternionZ, quaternionW; - double translateX, translateY, translateZ; - double perspectiveX, perspectiveY, perspectiveZ, perspectiveW; - } DecomposedType; - - bool decompose(DecomposedType& decomp) const; - void recompose(const DecomposedType& decomp, bool useEulerAngle = false); - - void blend(const TransformationMatrix& from, double progress); - - bool isAffine() const - { - return (m13() == 0 && m14() == 0 && m23() == 0 && m24() == 0 && - m31() == 0 && m32() == 0 && m33() == 1 && m34() == 0 && m43() == 0 && m44() == 1); - } - - // Throw away the non-affine parts of the matrix (lossy!) - void makeAffine(); - - bool operator==(const TransformationMatrix& m2) const - { - return (m_matrix[0][0] == m2.m_matrix[0][0] && - m_matrix[0][1] == m2.m_matrix[0][1] && - m_matrix[0][2] == m2.m_matrix[0][2] && - m_matrix[0][3] == m2.m_matrix[0][3] && - m_matrix[1][0] == m2.m_matrix[1][0] && - m_matrix[1][1] == m2.m_matrix[1][1] && - m_matrix[1][2] == m2.m_matrix[1][2] && - m_matrix[1][3] == m2.m_matrix[1][3] && - m_matrix[2][0] == m2.m_matrix[2][0] && - m_matrix[2][1] == m2.m_matrix[2][1] && - m_matrix[2][2] == m2.m_matrix[2][2] && - m_matrix[2][3] == m2.m_matrix[2][3] && - m_matrix[3][0] == m2.m_matrix[3][0] && - m_matrix[3][1] == m2.m_matrix[3][1] && - m_matrix[3][2] == m2.m_matrix[3][2] && - m_matrix[3][3] == m2.m_matrix[3][3]); - } - - bool operator!=(const TransformationMatrix& other) const { return !(*this == other); } - - // *this = *this * t (i.e., a multRight) - TransformationMatrix& operator*=(const TransformationMatrix& t) - { - return multiply(t); - } - - // result = *this * t (i.e., a multRight) - TransformationMatrix operator*(const TransformationMatrix& t) - { - TransformationMatrix result = *this; - result.multiply(t); - return result; - } - - CATransform3D transform3d () const; - CGAffineTransform affineTransform () const; - - TransformationMatrix(const CATransform3D&); - operator CATransform3D() const; - - TransformationMatrix(const CGAffineTransform&); - operator CGAffineTransform() const; - - private: - - // multiply passed 2D point by matrix (assume z=0) - void multVecMatrix(double x, double y, double& dstX, double& dstY) const; - - // multiply passed 3D point by matrix - void multVecMatrix(double x, double y, double z, double& dstX, double& dstY, double& dstZ) const; - - void setMatrix(const Matrix4 m) - { - if (m && m != m_matrix) - memcpy(m_matrix, m, sizeof(Matrix4)); - } - - bool isIdentityOrTranslation() const - { - return m_matrix[0][0] == 1 && m_matrix[0][1] == 0 && m_matrix[0][2] == 0 && m_matrix[0][3] == 0 && - m_matrix[1][0] == 0 && m_matrix[1][1] == 1 && m_matrix[1][2] == 0 && m_matrix[1][3] == 0 && - m_matrix[2][0] == 0 && m_matrix[2][1] == 0 && m_matrix[2][2] == 1 && m_matrix[2][3] == 0 && - m_matrix[3][3] == 1; - } - - Matrix4 m_matrix; - }; - -} // namespace WebCore - -#endif // TransformationMatrix_h diff --git a/Example/Pods/pop/pop/WebCore/UnitBezier.h b/Example/Pods/pop/pop/WebCore/UnitBezier.h deleted file mode 100644 index 0f847a0c..00000000 --- a/Example/Pods/pop/pop/WebCore/UnitBezier.h +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Copyright (C) 2008 Apple Inc. All Rights Reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef UnitBezier_h -#define UnitBezier_h - -#include - -namespace WebCore { - - struct UnitBezier { - UnitBezier(double p1x, double p1y, double p2x, double p2y) - { - // Calculate the polynomial coefficients, implicit first and last control points are (0,0) and (1,1). - cx = 3.0 * p1x; - bx = 3.0 * (p2x - p1x) - cx; - ax = 1.0 - cx -bx; - - cy = 3.0 * p1y; - by = 3.0 * (p2y - p1y) - cy; - ay = 1.0 - cy - by; - } - - double sampleCurveX(double t) - { - // `ax t^3 + bx t^2 + cx t' expanded using Horner's rule. - return ((ax * t + bx) * t + cx) * t; - } - - double sampleCurveY(double t) - { - return ((ay * t + by) * t + cy) * t; - } - - double sampleCurveDerivativeX(double t) - { - return (3.0 * ax * t + 2.0 * bx) * t + cx; - } - - // Given an x value, find a parametric value it came from. - double solveCurveX(double x, double epsilon) - { - double t0; - double t1; - double t2; - double x2; - double d2; - int i; - - // First try a few iterations of Newton's method -- normally very fast. - for (t2 = x, i = 0; i < 8; i++) { - x2 = sampleCurveX(t2) - x; - if (fabs (x2) < epsilon) - return t2; - d2 = sampleCurveDerivativeX(t2); - if (fabs(d2) < 1e-6) - break; - t2 = t2 - x2 / d2; - } - - // Fall back to the bisection method for reliability. - t0 = 0.0; - t1 = 1.0; - t2 = x; - - if (t2 < t0) - return t0; - if (t2 > t1) - return t1; - - while (t0 < t1) { - x2 = sampleCurveX(t2); - if (fabs(x2 - x) < epsilon) - return t2; - if (x > x2) - t0 = t2; - else - t1 = t2; - t2 = (t1 - t0) * .5 + t0; - } - - // Failure. - return t2; - } - - double solve(double x, double epsilon) - { - return sampleCurveY(solveCurveX(x, epsilon)); - } - - private: - double ax; - double bx; - double cx; - - double ay; - double by; - double cy; - }; -} -#endif diff --git a/Example/Shuffle.xcodeproj/project.pbxproj b/Example/Shuffle.xcodeproj/project.pbxproj index d0e563ce..1317f6f1 100644 --- a/Example/Shuffle.xcodeproj/project.pbxproj +++ b/Example/Shuffle.xcodeproj/project.pbxproj @@ -21,8 +21,8 @@ /* End PBXAggregateTarget section */ /* Begin PBXBuildFile section */ - 5F57C481455B6160EDB7E287 /* Pods_ShuffleTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 18AFD7AA72AA976397371F14 /* Pods_ShuffleTests.framework */; }; - A2A6726E4080452BDB432655 /* Pods_ShuffleExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8397BB7664A96B3F7276F02 /* Pods_ShuffleExample.framework */; }; + 13428DB08D67C399311FF2FC /* Pods_ShuffleExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4664D842E2EB45B708F03949 /* Pods_ShuffleExample.framework */; }; + 81052FC54C519D4BC1A59A50 /* Pods_ShuffleTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 96E655EA6DB7A38C33ED8F64 /* Pods_ShuffleTests.framework */; }; ADF646DA261A5CD200FE6BA3 /* TinderCardContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADF646CB261A5CD200FE6BA3 /* TinderCardContentView.swift */; }; ADF646DB261A5CD200FE6BA3 /* TinderCardModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADF646CC261A5CD200FE6BA3 /* TinderCardModel.swift */; }; ADF646DC261A5CD200FE6BA3 /* TinderCardFooterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADF646CD261A5CD200FE6BA3 /* TinderCardFooterView.swift */; }; @@ -37,10 +37,8 @@ ADF6476C261A62D000FE6BA3 /* TestableNotificationCenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADF64744261A62D000FE6BA3 /* TestableNotificationCenter.swift */; }; ADF6476E261A62D000FE6BA3 /* MockCardAnimator.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADF64748261A62D000FE6BA3 /* MockCardAnimator.swift */; }; ADF6476F261A62D000FE6BA3 /* MockSwipeCardDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADF64749261A62D000FE6BA3 /* MockSwipeCardDelegate.swift */; }; - ADF64770261A62D000FE6BA3 /* MockCardLayoutProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADF6474A261A62D000FE6BA3 /* MockCardLayoutProvider.swift */; }; ADF64771261A62D000FE6BA3 /* MockCardTransformProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADF6474B261A62D000FE6BA3 /* MockCardTransformProvider.swift */; }; ADF64772261A62D000FE6BA3 /* CardTransformProviderTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADF6474D261A62D000FE6BA3 /* CardTransformProviderTest.swift */; }; - ADF64773261A62D000FE6BA3 /* CardLayoutProviderTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADF6474E261A62D000FE6BA3 /* CardLayoutProviderTest.swift */; }; ADF64774261A62D000FE6BA3 /* CardAnimatorTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADF6474F261A62D000FE6BA3 /* CardAnimatorTest.swift */; }; ADF64775261A62D000FE6BA3 /* SwipeViewTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADF64750261A62D000FE6BA3 /* SwipeViewTest.swift */; }; ADF64776261A62D000FE6BA3 /* CardAnimationOptionsTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADF64751261A62D000FE6BA3 /* CardAnimationOptionsTest.swift */; }; @@ -50,7 +48,6 @@ ADF6477A261A62D000FE6BA3 /* TestableSwipeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADF64756261A62D000FE6BA3 /* TestableSwipeView.swift */; }; ADF6477B261A62D000FE6BA3 /* TestableCardTransformProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADF64757261A62D000FE6BA3 /* TestableCardTransformProvider.swift */; }; ADF6477C261A62D000FE6BA3 /* TestableCardAnimator.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADF64758261A62D000FE6BA3 /* TestableCardAnimator.swift */; }; - ADF6477D261A62D000FE6BA3 /* MockCardStackLayoutProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADF6475B261A62D000FE6BA3 /* MockCardStackLayoutProvider.swift */; }; ADF6477E261A62D000FE6BA3 /* MockCardStackStateManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADF6475C261A62D000FE6BA3 /* MockCardStackStateManager.swift */; }; ADF6477F261A62D000FE6BA3 /* MockSwipeCardStackDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADF6475D261A62D000FE6BA3 /* MockSwipeCardStackDataSource.swift */; }; ADF64780261A62D000FE6BA3 /* MockSwipeCardStackDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADF6475E261A62D000FE6BA3 /* MockSwipeCardStackDelegate.swift */; }; @@ -58,7 +55,6 @@ ADF64782261A62D000FE6BA3 /* MockCardStackTransformProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADF64760261A62D000FE6BA3 /* MockCardStackTransformProvider.swift */; }; ADF64783261A62D000FE6BA3 /* SwipeCardStackTest_MainMethods.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADF64762261A62D000FE6BA3 /* SwipeCardStackTest_MainMethods.swift */; }; ADF64784261A62D000FE6BA3 /* CardStackStateManagerTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADF64763261A62D000FE6BA3 /* CardStackStateManagerTest.swift */; }; - ADF64785261A62D000FE6BA3 /* CardStackLayoutProviderTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADF64764261A62D000FE6BA3 /* CardStackLayoutProviderTest.swift */; }; ADF64786261A62D000FE6BA3 /* SwipeCardStackTest_SwipeCardDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADF64765261A62D000FE6BA3 /* SwipeCardStackTest_SwipeCardDelegate.swift */; }; ADF64787261A62D000FE6BA3 /* CardStackAnimationOptionsTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADF64766261A62D000FE6BA3 /* CardStackAnimationOptionsTest.swift */; }; ADF64788261A62D000FE6BA3 /* SwipeCardStackTest_StateManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADF64767261A62D000FE6BA3 /* SwipeCardStackTest_StateManager.swift */; }; @@ -67,25 +63,15 @@ ADF6478B261A62D000FE6BA3 /* TestableCardStackStateManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADF6476B261A62D000FE6BA3 /* TestableCardStackStateManager.swift */; }; /* End PBXBuildFile section */ -/* Begin PBXContainerItemProxy section */ - 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 607FACC81AFB9204008FA782 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 607FACCF1AFB9204008FA782; - remoteInfo = Shuffle; - }; -/* End PBXContainerItemProxy section */ - /* Begin PBXFileReference section */ - 01D52DD4444FBF02CDBF714D /* Pods-ShuffleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ShuffleTests.debug.xcconfig"; path = "Target Support Files/Pods-ShuffleTests/Pods-ShuffleTests.debug.xcconfig"; sourceTree = ""; }; - 18AFD7AA72AA976397371F14 /* Pods_ShuffleTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ShuffleTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 3BF96DA14E02E2949D8BAE02 /* Pods-ShuffleExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ShuffleExample.release.xcconfig"; path = "Target Support Files/Pods-ShuffleExample/Pods-ShuffleExample.release.xcconfig"; sourceTree = ""; }; + 0A69FCED2F213622CAD2F11C /* Pods-ShuffleExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ShuffleExample.release.xcconfig"; path = "Target Support Files/Pods-ShuffleExample/Pods-ShuffleExample.release.xcconfig"; sourceTree = ""; }; + 4664D842E2EB45B708F03949 /* Pods_ShuffleExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ShuffleExample.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 47BC2D80DADBC4D39AE261DD /* Pods-ShuffleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ShuffleTests.release.xcconfig"; path = "Target Support Files/Pods-ShuffleTests/Pods-ShuffleTests.release.xcconfig"; sourceTree = ""; }; 607FACD01AFB9204008FA782 /* ShuffleExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ShuffleExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 607FACE51AFB9204008FA782 /* ShuffleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ShuffleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 6AD5D90D898A5D96840E619C /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; 6D7D80EFAC2C40B10D76131E /* Shuffle-iOS.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = "Shuffle-iOS.podspec"; path = "../Shuffle-iOS.podspec"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - 941AD27A9BA6BD0828F4008C /* Pods-ShuffleExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ShuffleExample.debug.xcconfig"; path = "Target Support Files/Pods-ShuffleExample/Pods-ShuffleExample.debug.xcconfig"; sourceTree = ""; }; + 96E655EA6DB7A38C33ED8F64 /* Pods_ShuffleTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ShuffleTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; ADF646CB261A5CD200FE6BA3 /* TinderCardContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TinderCardContentView.swift; sourceTree = ""; }; ADF646CC261A5CD200FE6BA3 /* TinderCardModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TinderCardModel.swift; sourceTree = ""; }; ADF646CD261A5CD200FE6BA3 /* TinderCardFooterView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TinderCardFooterView.swift; sourceTree = ""; }; @@ -102,10 +88,8 @@ ADF64745261A62D000FE6BA3 /* ShuffleTests.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = ShuffleTests.plist; sourceTree = ""; }; ADF64748261A62D000FE6BA3 /* MockCardAnimator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MockCardAnimator.swift; sourceTree = ""; }; ADF64749261A62D000FE6BA3 /* MockSwipeCardDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MockSwipeCardDelegate.swift; sourceTree = ""; }; - ADF6474A261A62D000FE6BA3 /* MockCardLayoutProvider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MockCardLayoutProvider.swift; sourceTree = ""; }; ADF6474B261A62D000FE6BA3 /* MockCardTransformProvider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MockCardTransformProvider.swift; sourceTree = ""; }; ADF6474D261A62D000FE6BA3 /* CardTransformProviderTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CardTransformProviderTest.swift; sourceTree = ""; }; - ADF6474E261A62D000FE6BA3 /* CardLayoutProviderTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CardLayoutProviderTest.swift; sourceTree = ""; }; ADF6474F261A62D000FE6BA3 /* CardAnimatorTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CardAnimatorTest.swift; sourceTree = ""; }; ADF64750261A62D000FE6BA3 /* SwipeViewTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwipeViewTest.swift; sourceTree = ""; }; ADF64751261A62D000FE6BA3 /* CardAnimationOptionsTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CardAnimationOptionsTest.swift; sourceTree = ""; }; @@ -115,7 +99,6 @@ ADF64756261A62D000FE6BA3 /* TestableSwipeView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestableSwipeView.swift; sourceTree = ""; }; ADF64757261A62D000FE6BA3 /* TestableCardTransformProvider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestableCardTransformProvider.swift; sourceTree = ""; }; ADF64758261A62D000FE6BA3 /* TestableCardAnimator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestableCardAnimator.swift; sourceTree = ""; }; - ADF6475B261A62D000FE6BA3 /* MockCardStackLayoutProvider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MockCardStackLayoutProvider.swift; sourceTree = ""; }; ADF6475C261A62D000FE6BA3 /* MockCardStackStateManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MockCardStackStateManager.swift; sourceTree = ""; }; ADF6475D261A62D000FE6BA3 /* MockSwipeCardStackDataSource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MockSwipeCardStackDataSource.swift; sourceTree = ""; }; ADF6475E261A62D000FE6BA3 /* MockSwipeCardStackDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MockSwipeCardStackDelegate.swift; sourceTree = ""; }; @@ -123,16 +106,15 @@ ADF64760261A62D000FE6BA3 /* MockCardStackTransformProvider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MockCardStackTransformProvider.swift; sourceTree = ""; }; ADF64762261A62D000FE6BA3 /* SwipeCardStackTest_MainMethods.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwipeCardStackTest_MainMethods.swift; sourceTree = ""; }; ADF64763261A62D000FE6BA3 /* CardStackStateManagerTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CardStackStateManagerTest.swift; sourceTree = ""; }; - ADF64764261A62D000FE6BA3 /* CardStackLayoutProviderTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CardStackLayoutProviderTest.swift; sourceTree = ""; }; ADF64765261A62D000FE6BA3 /* SwipeCardStackTest_SwipeCardDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwipeCardStackTest_SwipeCardDelegate.swift; sourceTree = ""; }; ADF64766261A62D000FE6BA3 /* CardStackAnimationOptionsTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CardStackAnimationOptionsTest.swift; sourceTree = ""; }; ADF64767261A62D000FE6BA3 /* SwipeCardStackTest_StateManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwipeCardStackTest_StateManager.swift; sourceTree = ""; }; ADF64768261A62D000FE6BA3 /* SwipeCardStackTest_Base.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwipeCardStackTest_Base.swift; sourceTree = ""; }; ADF6476A261A62D000FE6BA3 /* TestableSwipeCardStack.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestableSwipeCardStack.swift; sourceTree = ""; }; ADF6476B261A62D000FE6BA3 /* TestableCardStackStateManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestableCardStackStateManager.swift; sourceTree = ""; }; - B7158B1C202B3EC4CDCA39F0 /* Pods-ShuffleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ShuffleTests.release.xcconfig"; path = "Target Support Files/Pods-ShuffleTests/Pods-ShuffleTests.release.xcconfig"; sourceTree = ""; }; BDFBB5FCC0EDD35C6A08BD0E /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; - F8397BB7664A96B3F7276F02 /* Pods_ShuffleExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ShuffleExample.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + C250298DC1C1654DC4386386 /* Pods-ShuffleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ShuffleTests.debug.xcconfig"; path = "Target Support Files/Pods-ShuffleTests/Pods-ShuffleTests.debug.xcconfig"; sourceTree = ""; }; + E9AC75B0C3970E4F6597D8B1 /* Pods-ShuffleExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ShuffleExample.debug.xcconfig"; path = "Target Support Files/Pods-ShuffleExample/Pods-ShuffleExample.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -140,7 +122,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - A2A6726E4080452BDB432655 /* Pods_ShuffleExample.framework in Frameworks */, + 13428DB08D67C399311FF2FC /* Pods_ShuffleExample.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -148,7 +130,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 5F57C481455B6160EDB7E287 /* Pods_ShuffleTests.framework in Frameworks */, + 81052FC54C519D4BC1A59A50 /* Pods_ShuffleTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -163,7 +145,7 @@ 607FACE81AFB9204008FA782 /* Tests */, 607FACD11AFB9204008FA782 /* Products */, D227647704E6DAA75E687B00 /* Pods */, - F01916E401B13801D2BA5145 /* Frameworks */, + A3F99DBA041EC60E82C25153 /* Frameworks */, ); sourceTree = ""; }; @@ -209,6 +191,15 @@ name = "Podspec Metadata"; sourceTree = ""; }; + A3F99DBA041EC60E82C25153 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 4664D842E2EB45B708F03949 /* Pods_ShuffleExample.framework */, + 96E655EA6DB7A38C33ED8F64 /* Pods_ShuffleTests.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; ADF646C9261A5CD200FE6BA3 /* TinderExample */ = { isa = PBXGroup; children = ( @@ -255,7 +246,6 @@ children = ( ADF64751261A62D000FE6BA3 /* CardAnimationOptionsTest.swift */, ADF6474F261A62D000FE6BA3 /* CardAnimatorTest.swift */, - ADF6474E261A62D000FE6BA3 /* CardLayoutProviderTest.swift */, ADF6474D261A62D000FE6BA3 /* CardTransformProviderTest.swift */, ADF64752261A62D000FE6BA3 /* SwipeCardTest_Base.swift */, ADF64753261A62D000FE6BA3 /* SwipeCardTest_MainMethods.swift */, @@ -268,7 +258,6 @@ isa = PBXGroup; children = ( ADF64766261A62D000FE6BA3 /* CardStackAnimationOptionsTest.swift */, - ADF64764261A62D000FE6BA3 /* CardStackLayoutProviderTest.swift */, ADF64763261A62D000FE6BA3 /* CardStackStateManagerTest.swift */, ADF64768261A62D000FE6BA3 /* SwipeCardStackTest_Base.swift */, ADF64762261A62D000FE6BA3 /* SwipeCardStackTest_MainMethods.swift */, @@ -282,11 +271,9 @@ isa = PBXGroup; children = ( ADF64748261A62D000FE6BA3 /* MockCardAnimator.swift */, - ADF6474A261A62D000FE6BA3 /* MockCardLayoutProvider.swift */, ADF6475F261A62D000FE6BA3 /* MockCardStackAnimator.swift */, ADF64760261A62D000FE6BA3 /* MockCardStackTransformProvider.swift */, ADF6474B261A62D000FE6BA3 /* MockCardTransformProvider.swift */, - ADF6475B261A62D000FE6BA3 /* MockCardStackLayoutProvider.swift */, ADF6475C261A62D000FE6BA3 /* MockCardStackStateManager.swift */, ADF64749261A62D000FE6BA3 /* MockSwipeCardDelegate.swift */, ADF6475D261A62D000FE6BA3 /* MockSwipeCardStackDataSource.swift */, @@ -320,23 +307,14 @@ D227647704E6DAA75E687B00 /* Pods */ = { isa = PBXGroup; children = ( - 941AD27A9BA6BD0828F4008C /* Pods-ShuffleExample.debug.xcconfig */, - 3BF96DA14E02E2949D8BAE02 /* Pods-ShuffleExample.release.xcconfig */, - 01D52DD4444FBF02CDBF714D /* Pods-ShuffleTests.debug.xcconfig */, - B7158B1C202B3EC4CDCA39F0 /* Pods-ShuffleTests.release.xcconfig */, + E9AC75B0C3970E4F6597D8B1 /* Pods-ShuffleExample.debug.xcconfig */, + 0A69FCED2F213622CAD2F11C /* Pods-ShuffleExample.release.xcconfig */, + C250298DC1C1654DC4386386 /* Pods-ShuffleTests.debug.xcconfig */, + 47BC2D80DADBC4D39AE261DD /* Pods-ShuffleTests.release.xcconfig */, ); path = Pods; sourceTree = ""; }; - F01916E401B13801D2BA5145 /* Frameworks */ = { - isa = PBXGroup; - children = ( - F8397BB7664A96B3F7276F02 /* Pods_ShuffleExample.framework */, - 18AFD7AA72AA976397371F14 /* Pods_ShuffleTests.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -344,11 +322,12 @@ isa = PBXNativeTarget; buildConfigurationList = 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "ShuffleExample" */; buildPhases = ( - 55F4B7CB7751093A93CC9349 /* [CP] Check Pods Manifest.lock */, + 7A7754D17C5F986C993327D4 /* [CP] Check Pods Manifest.lock */, 607FACCC1AFB9204008FA782 /* Sources */, 607FACCD1AFB9204008FA782 /* Frameworks */, 607FACCE1AFB9204008FA782 /* Resources */, - F3A3E452FCC3804C51332641 /* [CP] Embed Pods Frameworks */, + AD8E58BE261B9FB600E99C62 /* Run SwiftLint */, + 0830382F2BF4A4AFA7763EE1 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -363,16 +342,16 @@ isa = PBXNativeTarget; buildConfigurationList = 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "ShuffleTests" */; buildPhases = ( - F55AB40A64AEAA0C1E910FF7 /* [CP] Check Pods Manifest.lock */, + C0037843D29A8AFBBA1EDC00 /* [CP] Check Pods Manifest.lock */, 607FACE11AFB9204008FA782 /* Sources */, 607FACE21AFB9204008FA782 /* Frameworks */, 607FACE31AFB9204008FA782 /* Resources */, - F4FC9B7E6431F0F72F9D29C8 /* [CP] Embed Pods Frameworks */, + AD8E58BF261B9FCB00E99C62 /* Run SwiftLint */, + 55A0E0697C4A448757CF82AF /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); dependencies = ( - 607FACE71AFB9204008FA782 /* PBXTargetDependency */, ); name = ShuffleTests; productName = Tests; @@ -444,7 +423,51 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 55F4B7CB7751093A93CC9349 /* [CP] Check Pods Manifest.lock */ = { + 0830382F2BF4A4AFA7763EE1 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-ShuffleExample/Pods-ShuffleExample-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/PopBounceButton/PopBounceButton.framework", + "${BUILT_PRODUCTS_DIR}/Shuffle-iOS/Shuffle_iOS.framework", + "${BUILT_PRODUCTS_DIR}/pop/pop.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PopBounceButton.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Shuffle_iOS.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/pop.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ShuffleExample/Pods-ShuffleExample-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 55A0E0697C4A448757CF82AF /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-ShuffleTests/Pods-ShuffleTests-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Shuffle-iOS/Shuffle_iOS.framework", + "${BUILT_PRODUCTS_DIR}/Nimble/Nimble.framework", + "${BUILT_PRODUCTS_DIR}/Quick/Quick.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Shuffle_iOS.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Nimble.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Quick.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ShuffleTests/Pods-ShuffleTests-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 7A7754D17C5F986C993327D4 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -466,7 +489,7 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - ADF647FE261A6D8000FE6BA3 /* Run SwiftLint */ = { + AD8E58BE261B9FB600E99C62 /* Run SwiftLint */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -484,51 +507,43 @@ shellPath = /bin/sh; shellScript = "if which swiftlint >/dev/null; then\n swiftlint\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n"; }; - F3A3E452FCC3804C51332641 /* [CP] Embed Pods Frameworks */ = { + AD8E58BF261B9FCB00E99C62 /* Run SwiftLint */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); + inputFileListPaths = ( + ); inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-ShuffleExample/Pods-ShuffleExample-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/PopBounceButton/PopBounceButton.framework", - "${BUILT_PRODUCTS_DIR}/Shuffle-iOS/Shuffle_iOS.framework", - "${BUILT_PRODUCTS_DIR}/pop/pop.framework", ); - name = "[CP] Embed Pods Frameworks"; + name = "Run SwiftLint"; + outputFileListPaths = ( + ); outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PopBounceButton.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Shuffle_iOS.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/pop.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ShuffleExample/Pods-ShuffleExample-frameworks.sh\"\n"; - showEnvVarsInLog = 0; + shellScript = "if which swiftlint >/dev/null; then\n swiftlint\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n"; }; - F4FC9B7E6431F0F72F9D29C8 /* [CP] Embed Pods Frameworks */ = { + ADF647FE261A6D8000FE6BA3 /* Run SwiftLint */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); + inputFileListPaths = ( + ); inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-ShuffleTests/Pods-ShuffleTests-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/Shuffle-iOS/Shuffle_iOS.framework", - "${BUILT_PRODUCTS_DIR}/Nimble/Nimble.framework", - "${BUILT_PRODUCTS_DIR}/Quick/Quick.framework", ); - name = "[CP] Embed Pods Frameworks"; + name = "Run SwiftLint"; + outputFileListPaths = ( + ); outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Shuffle_iOS.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Nimble.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Quick.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ShuffleTests/Pods-ShuffleTests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; + shellScript = "if which swiftlint >/dev/null; then\n swiftlint\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n"; }; - F55AB40A64AEAA0C1E910FF7 /* [CP] Check Pods Manifest.lock */ = { + C0037843D29A8AFBBA1EDC00 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -576,16 +591,13 @@ ADF64789261A62D000FE6BA3 /* SwipeCardStackTest_Base.swift in Sources */, ADF64772261A62D000FE6BA3 /* CardTransformProviderTest.swift in Sources */, ADF64777261A62D000FE6BA3 /* SwipeCardTest_Base.swift in Sources */, - ADF64785261A62D000FE6BA3 /* CardStackLayoutProviderTest.swift in Sources */, ADF6477E261A62D000FE6BA3 /* MockCardStackStateManager.swift in Sources */, ADF64775261A62D000FE6BA3 /* SwipeViewTest.swift in Sources */, ADF64774261A62D000FE6BA3 /* CardAnimatorTest.swift in Sources */, ADF64788261A62D000FE6BA3 /* SwipeCardStackTest_StateManager.swift in Sources */, - ADF64770261A62D000FE6BA3 /* MockCardLayoutProvider.swift in Sources */, ADF64776261A62D000FE6BA3 /* CardAnimationOptionsTest.swift in Sources */, ADF6477F261A62D000FE6BA3 /* MockSwipeCardStackDataSource.swift in Sources */, ADF64787261A62D000FE6BA3 /* CardStackAnimationOptionsTest.swift in Sources */, - ADF64773261A62D000FE6BA3 /* CardLayoutProviderTest.swift in Sources */, ADF64778261A62D000FE6BA3 /* SwipeCardTest_MainMethods.swift in Sources */, ADF6476F261A62D000FE6BA3 /* MockSwipeCardDelegate.swift in Sources */, ADF6476E261A62D000FE6BA3 /* MockCardAnimator.swift in Sources */, @@ -593,7 +605,6 @@ ADF64780261A62D000FE6BA3 /* MockSwipeCardStackDelegate.swift in Sources */, ADF64771261A62D000FE6BA3 /* MockCardTransformProvider.swift in Sources */, ADF6476C261A62D000FE6BA3 /* TestableNotificationCenter.swift in Sources */, - ADF6477D261A62D000FE6BA3 /* MockCardStackLayoutProvider.swift in Sources */, ADF64784261A62D000FE6BA3 /* CardStackStateManagerTest.swift in Sources */, ADF6478B261A62D000FE6BA3 /* TestableCardStackStateManager.swift in Sources */, ADF64779261A62D000FE6BA3 /* TestableSwipeCard.swift in Sources */, @@ -609,14 +620,6 @@ }; /* End PBXSourcesBuildPhase section */ -/* Begin PBXTargetDependency section */ - 607FACE71AFB9204008FA782 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 607FACCF1AFB9204008FA782 /* ShuffleExample */; - targetProxy = 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - /* Begin PBXVariantGroup section */ ADF646ED261A5D2700FE6BA3 /* LaunchScreen.xib */ = { isa = PBXVariantGroup; @@ -738,7 +741,7 @@ }; 607FACF01AFB9204008FA782 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 941AD27A9BA6BD0828F4008C /* Pods-ShuffleExample.debug.xcconfig */; + baseConfigurationReference = E9AC75B0C3970E4F6597D8B1 /* Pods-ShuffleExample.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; @@ -757,7 +760,7 @@ }; 607FACF11AFB9204008FA782 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 3BF96DA14E02E2949D8BAE02 /* Pods-ShuffleExample.release.xcconfig */; + baseConfigurationReference = 0A69FCED2F213622CAD2F11C /* Pods-ShuffleExample.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; @@ -775,7 +778,7 @@ }; 607FACF31AFB9204008FA782 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 01D52DD4444FBF02CDBF714D /* Pods-ShuffleTests.debug.xcconfig */; + baseConfigurationReference = C250298DC1C1654DC4386386 /* Pods-ShuffleTests.debug.xcconfig */; buildSettings = { CLANG_ENABLE_MODULES = YES; "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; @@ -799,7 +802,7 @@ }; 607FACF41AFB9204008FA782 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = B7158B1C202B3EC4CDCA39F0 /* Pods-ShuffleTests.release.xcconfig */; + baseConfigurationReference = 47BC2D80DADBC4D39AE261DD /* Pods-ShuffleTests.release.xcconfig */; buildSettings = { CLANG_ENABLE_MODULES = YES; "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; diff --git a/Example/Tests/Mocks/MockCardLayoutProvider.swift b/Example/Tests/Mocks/MockCardLayoutProvider.swift deleted file mode 100644 index 1ee42ccb..00000000 --- a/Example/Tests/Mocks/MockCardLayoutProvider.swift +++ /dev/null @@ -1,44 +0,0 @@ -/// -/// MIT License -/// -/// Copyright (c) 2020 Mac Gallagher -/// -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in all -/// copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -/// SOFTWARE. -/// - -@testable import Shuffle_iOS -import UIKit - -class MockCardLayoutProvider: CardLayoutProvidable { - - var testContentFrame: CGRect = .zero - func createContentFrame(for card: SwipeCard) -> CGRect { - return testContentFrame - } - - var testFooterFrame: CGRect = .zero - func createFooterFrame(for card: SwipeCard) -> CGRect { - return testFooterFrame - } - - var testOverlayContainerFrame: CGRect = .zero - func createOverlayContainerFrame(for card: SwipeCard) -> CGRect { - return testOverlayContainerFrame - } -} diff --git a/Example/Tests/Mocks/MockCardStackLayoutProvider.swift b/Example/Tests/Mocks/MockCardStackLayoutProvider.swift deleted file mode 100644 index d070604a..00000000 --- a/Example/Tests/Mocks/MockCardStackLayoutProvider.swift +++ /dev/null @@ -1,39 +0,0 @@ -/// -/// MIT License -/// -/// Copyright (c) 2020 Mac Gallagher -/// -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in all -/// copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -/// SOFTWARE. -/// - -@testable import Shuffle_iOS -import UIKit - -class MockCardStackLayoutProvider: CardStackLayoutProvidable { - - var testCardContainerFrame: CGRect = .zero - func createCardContainerFrame(for cardStack: SwipeCardStack) -> CGRect { - return testCardContainerFrame - } - - var testCardFrame: CGRect = .zero - func createCardFrame(for cardStack: SwipeCardStack) -> CGRect { - return testCardFrame - } -} diff --git a/Example/Tests/SwipeCardStackTests/CardStackLayoutProviderTest.swift b/Example/Tests/SwipeCardStackTests/CardStackLayoutProviderTest.swift deleted file mode 100644 index c2f43e09..00000000 --- a/Example/Tests/SwipeCardStackTests/CardStackLayoutProviderTest.swift +++ /dev/null @@ -1,84 +0,0 @@ -/// -/// MIT License -/// -/// Copyright (c) 2020 Mac Gallagher -/// -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in all -/// copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -/// SOFTWARE. -/// - -import Nimble -import Quick -@testable import Shuffle_iOS -import UIKit - -// swiftlint:disable implicitly_unwrapped_optional -class CardStackLayoutProviderTest: QuickSpec { - - override func spec() { - let insets = UIEdgeInsets(top: -1, left: 2, bottom: 3, right: -4) - let cardStackWidth: CGFloat = 100 - let cardStackHeight: CGFloat = 200 - - var cardStack: SwipeCardStack! - var subject: CardStackLayoutProvider! - - beforeEach { - cardStack = SwipeCardStack(animator: MockCardStackAnimator(), - layoutProvider: MockCardStackLayoutProvider(), - notificationCenter: NotificationCenter.default, - stateManager: MockCardStackStateManager(), - transformProvider: MockCardStackTransformProvider()) - cardStack.cardStackInsets = insets - cardStack.frame = CGRect(x: 0, y: 0, width: cardStackWidth, height: cardStackHeight) - - subject = CardStackLayoutProvider() - } - - // MARK: - Card Container Frame - - describe("When calling createCardContainerFrame") { - it("should return the correct frame") { - let expectedWidth = cardStackWidth - (insets.left + insets.right) - let expectedHeight = cardStackHeight - (insets.top + insets.bottom) - let expectedFrame = CGRect(x: insets.left, - y: insets.top, - width: expectedWidth, - height: expectedHeight) - let actualFrame = subject.createCardContainerFrame(for: cardStack) - expect(actualFrame) == expectedFrame - } - } - - // MARK: - Card Frame - - describe("When calling createCardFrame") { - it("should return the correct frame") { - let expectedWidth = cardStackWidth - (insets.left + insets.right) - let expectedHeight = cardStackHeight - (insets.top + insets.bottom) - let expectedFrame = CGRect(x: 0, - y: 0, - width: expectedWidth, - height: expectedHeight) - let actualFrame = subject.createCardFrame(for: cardStack) - expect(actualFrame) == expectedFrame - } - } - } -} -// swiftlint:enable implicitly_unwrapped_optional diff --git a/Example/Tests/SwipeCardStackTests/SwipeCardStackTest_Base.swift b/Example/Tests/SwipeCardStackTests/SwipeCardStackTest_Base.swift index 18703a97..fb842915 100644 --- a/Example/Tests/SwipeCardStackTests/SwipeCardStackTest_Base.swift +++ b/Example/Tests/SwipeCardStackTests/SwipeCardStackTest_Base.swift @@ -33,15 +33,12 @@ class SwipeCardStackTest_Base: QuickSpec { typealias Card = SwipeCardStack.Card override func spec() { - var mockLayoutProvider: MockCardStackLayoutProvider! var mockStateManager: MockCardStackStateManager! var subject: TestableSwipeCardStack! beforeEach { - mockLayoutProvider = MockCardStackLayoutProvider() mockStateManager = MockCardStackStateManager() subject = TestableSwipeCardStack(animator: MockCardStackAnimator(), - layoutProvider: mockLayoutProvider, notificationCenter: NotificationCenter.default, stateManager: mockStateManager, transformProvider: MockCardStackTransformProvider()) @@ -246,12 +243,15 @@ class SwipeCardStackTest_Base: QuickSpec { // MARK: Layout Subviews describe("When calling layoutSubviews") { - let cardContainerFrame = CGRect(x: 1, y: 2, width: 3, height: 4) + let insets = UIEdgeInsets(top: -1, left: 2, bottom: 3, right: -4) + let cardStackWidth: CGFloat = 100 + let cardStackHeight: CGFloat = 200 let numberOfCards: Int = 3 let visibleCards = [SwipeCard(), SwipeCard(), SwipeCard()] beforeEach { - mockLayoutProvider.testCardContainerFrame = cardContainerFrame + subject.cardStackInsets = insets + subject.frame = CGRect(x: 0, y: 0, width: cardStackWidth, height: cardStackHeight) subject.visibleCards = [Card(index: 0, card: visibleCards[0]), Card(index: 1, card: visibleCards[1]), Card(index: 2, card: visibleCards[2])] @@ -259,8 +259,13 @@ class SwipeCardStackTest_Base: QuickSpec { } it("should correctly layout the card container") { - let cardContainer = subject.subviews.first - expect(cardContainer?.frame) == cardContainerFrame + let expectedWidth = cardStackWidth - (insets.left + insets.right) + let expectedHeight = cardStackHeight - (insets.top + insets.bottom) + let expectedFrame = CGRect(x: insets.left, + y: insets.top, + width: expectedWidth, + height: expectedHeight) + expect(subject.cardContainer.frame) == expectedFrame } it("should call layoutCard for each card") { @@ -272,18 +277,19 @@ class SwipeCardStackTest_Base: QuickSpec { // MARK: Layout Card describe("When calling layoutCard") { - let cardFrame = CGRect(x: 1, y: 2, width: 3, height: 4) + let containerFrame = CGRect(x: 1, y: 2, width: 3, height: 4) let cardTransform = CGAffineTransform(a: 1, b: 2, c: 3, d: 4, tx: 5, ty: 6) let card = SwipeCard() - let transformedFrame: CGRect = { - let tempView = UIView(frame: cardFrame) + let expectedTransformedFrame: CGRect = { + let tempView = UIView(frame: CGRect(origin: .zero, size: containerFrame.size)) tempView.transform = cardTransform return tempView.frame }() beforeEach { - mockLayoutProvider.testCardFrame = cardFrame + subject.cardContainer.frame = containerFrame + subject.testTransformForCard = cardTransform } context("and position is zero") { @@ -294,7 +300,11 @@ class SwipeCardStackTest_Base: QuickSpec { subject.layoutCard(card, at: position) } - testLayoutCard(position: position) + it("should correctly layout the card and enable user interaction") { + expect(card.frame) == expectedTransformedFrame + expect(card.transform) == cardTransform + expect(card.isUserInteractionEnabled) == true + } } context("and position is greater than zero") { @@ -305,14 +315,10 @@ class SwipeCardStackTest_Base: QuickSpec { subject.layoutCard(card, at: position) } - testLayoutCard(position: position) - } - - func testLayoutCard(position: Int) { it("should correctly layout the card and disable user interaction") { - expect(card.frame) == transformedFrame + expect(card.frame) == expectedTransformedFrame expect(card.transform) == cardTransform - expect(card.isUserInteractionEnabled) == (position == 0) + expect(card.isUserInteractionEnabled) == false } } } diff --git a/Example/Tests/SwipeCardStackTests/SwipeCardStackTest_MainMethods.swift b/Example/Tests/SwipeCardStackTests/SwipeCardStackTest_MainMethods.swift index c0307efa..9a94391d 100644 --- a/Example/Tests/SwipeCardStackTests/SwipeCardStackTest_MainMethods.swift +++ b/Example/Tests/SwipeCardStackTests/SwipeCardStackTest_MainMethods.swift @@ -28,7 +28,7 @@ import Quick import UIKit // swiftlint:disable type_body_length closure_body_length implicitly_unwrapped_optional -class SwipeCardStackSpec_MainMethods: QuickSpec { +class SwipeCardStackTest_MainMethods: QuickSpec { typealias Card = SwipeCardStack.Card @@ -44,7 +44,6 @@ class SwipeCardStackSpec_MainMethods: QuickSpec { mockDelegate = MockSwipeCardStackDelegate() mockStateManager = MockCardStackStateManager() subject = TestableSwipeCardStack(animator: mockAnimator, - layoutProvider: MockCardStackLayoutProvider(), notificationCenter: NotificationCenter.default, stateManager: mockStateManager, transformProvider: MockCardStackTransformProvider()) diff --git a/Example/Tests/SwipeCardStackTests/SwipeCardStackTest_StateManager.swift b/Example/Tests/SwipeCardStackTests/SwipeCardStackTest_StateManager.swift index 4f6db793..d19ec0ac 100644 --- a/Example/Tests/SwipeCardStackTests/SwipeCardStackTest_StateManager.swift +++ b/Example/Tests/SwipeCardStackTests/SwipeCardStackTest_StateManager.swift @@ -40,7 +40,6 @@ class SwipeCardStackTest_StateManager: QuickSpec { beforeEach { mockStateManager = MockCardStackStateManager() subject = TestableSwipeCardStack(animator: MockCardStackAnimator(), - layoutProvider: MockCardStackLayoutProvider(), notificationCenter: NotificationCenter(), stateManager: mockStateManager, transformProvider: MockCardStackTransformProvider()) diff --git a/Example/Tests/SwipeCardStackTests/SwipeCardStackTest_SwipeCardDelegate.swift b/Example/Tests/SwipeCardStackTests/SwipeCardStackTest_SwipeCardDelegate.swift index aecf2963..d4ce51a5 100644 --- a/Example/Tests/SwipeCardStackTests/SwipeCardStackTest_SwipeCardDelegate.swift +++ b/Example/Tests/SwipeCardStackTests/SwipeCardStackTest_SwipeCardDelegate.swift @@ -43,7 +43,6 @@ class SwipeCardStackTest_SwipeCardDelegate: QuickSpec { mockStateManager = MockCardStackStateManager() mockTransformProvider = MockCardStackTransformProvider() subject = TestableSwipeCardStack(animator: mockAnimator, - layoutProvider: MockCardStackLayoutProvider(), notificationCenter: NotificationCenter(), stateManager: mockStateManager, transformProvider: mockTransformProvider) diff --git a/Example/Tests/SwipeCardTests/CardAnimatorTest.swift b/Example/Tests/SwipeCardTests/CardAnimatorTest.swift index a8a9f14f..2ef22cbc 100644 --- a/Example/Tests/SwipeCardTests/CardAnimatorTest.swift +++ b/Example/Tests/SwipeCardTests/CardAnimatorTest.swift @@ -40,7 +40,6 @@ class CardAnimatorTest: QuickSpec { beforeEach { subject = TestableCardAnimator() card = TestableSwipeCard(animator: MockCardAnimator(), - layoutProvider: MockCardLayoutProvider(), notificationCenter: NotificationCenter.default, transformProvider: MockCardTransformProvider()) card.frame = CGRect(x: 0, y: 0, width: cardWidth, height: cardHeight) @@ -143,7 +142,7 @@ class CardAnimatorTest: QuickSpec { beforeEach { card.setOverlay(overlay, forDirection: .left) - // add animation key to overlay + // Add arbitrary animation key to overlay UIView.animate(withDuration: 100) { card.alpha = 0 overlay.transform = CGAffineTransform(a: 1, b: 2, c: 3, d: 4, tx: 5, ty: 6) diff --git a/Example/Tests/SwipeCardTests/CardLayoutProviderTest.swift b/Example/Tests/SwipeCardTests/CardLayoutProviderTest.swift deleted file mode 100644 index 5e6b5cd0..00000000 --- a/Example/Tests/SwipeCardTests/CardLayoutProviderTest.swift +++ /dev/null @@ -1,136 +0,0 @@ -/// -/// MIT License -/// -/// Copyright (c) 2020 Mac Gallagher -/// -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in all -/// copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -/// SOFTWARE. -/// - -import Nimble -import Quick -@testable import Shuffle_iOS -import UIKit - -// swiftlint:disable closure_body_length function_body_length implicitly_unwrapped_optional -class CardLayoutProviderTest: QuickSpec { - - override func spec() { - let cardWidth: CGFloat = 100 - let cardHeight: CGFloat = 200 - let footerHeight: CGFloat = 50 - - var card: SwipeCard! - var subject: CardLayoutProvider! - - beforeEach { - subject = CardLayoutProvider() - card = SwipeCard(animator: MockCardAnimator(), - layoutProvider: MockCardLayoutProvider(), - notificationCenter: NotificationCenter.default, - transformProvider: MockCardTransformProvider()) - card.frame = CGRect(x: 0, y: 0, width: cardWidth, height: cardHeight) - card.footerHeight = footerHeight - } - - // MARK: - Create Content Frame - - describe("When calling createContentFrame") { - context("and the card has an opaque footer") { - let footer = UIView() - - beforeEach { - footer.isOpaque = true - card.footer = footer - } - - it("should return the correct frame") { - let actualFrame = subject.createContentFrame(for: card) - let expectedFrame = CGRect(x: 0, y: 0, width: cardWidth, height: cardHeight - footerHeight) - expect(actualFrame) == expectedFrame - } - } - - context("and the card has a transparent footer") { - let footer = UIView() - - beforeEach { - footer.isOpaque = false - card.footer = footer - } - - it("should return the correct frame") { - let actualFrame = subject.createContentFrame(for: card) - let expectedFrame = CGRect(x: 0, y: 0, width: cardWidth, height: cardHeight) - expect(actualFrame) == expectedFrame - } - } - - context("and the card has no footer") { - beforeEach { - card.footer = nil - } - - it("should return the correct frame") { - let actualFrame = subject.createContentFrame(for: card) - let expectedFrame = CGRect(x: 0, y: 0, width: cardWidth, height: cardHeight) - expect(actualFrame) == expectedFrame - } - } - } - - // MARK: - Create Footer Frame - - describe("When calling createFooterFrame") { - it("should return the correct frame") { - let actualFrame = subject.createFooterFrame(for: card) - let expectedFrame = CGRect(x: 0, y: cardHeight - footerHeight, width: cardWidth, height: footerHeight) - expect(actualFrame) == expectedFrame - } - } - - // MARK: - Create Overlay Container Frame - - describe("When calling createOverlayContainerFrame") { - context("and the card has a footer") { - beforeEach { - card.footer = UIView() - } - - it("should return the correct frame") { - let actualFrame = subject.createOverlayContainerFrame(for: card) - let expectedFrame = CGRect(x: 0, y: 0, width: cardWidth, height: cardHeight - footerHeight) - expect(actualFrame) == expectedFrame - } - } - - context("and the card has no footer") { - beforeEach { - card.footer = nil - } - - it("should return the correct frame") { - let actualFrame = subject.createOverlayContainerFrame(for: card) - let expectedFrame = CGRect(x: 0, y: 0, width: cardWidth, height: cardHeight) - expect(actualFrame) == expectedFrame - } - } - } - } -} -// swiftlint:enabled closure_body_length function_body_length implicitly_unwrapped_optional diff --git a/Example/Tests/SwipeCardTests/CardTransformProviderTest.swift b/Example/Tests/SwipeCardTests/CardTransformProviderTest.swift index ef81e218..24e652dc 100644 --- a/Example/Tests/SwipeCardTests/CardTransformProviderTest.swift +++ b/Example/Tests/SwipeCardTests/CardTransformProviderTest.swift @@ -43,7 +43,6 @@ class CardTransformProviderTest: QuickSpec { beforeEach { subject = TestableCardTransformProvider() card = TestableSwipeCard(animator: MockCardAnimator(), - layoutProvider: MockCardLayoutProvider(), notificationCenter: NotificationCenter.default, transformProvider: MockCardTransformProvider()) card.frame = CGRect(x: 0, y: 0, width: cardWidth, height: cardHeight) diff --git a/Example/Tests/SwipeCardTests/SwipeCardTest_Base.swift b/Example/Tests/SwipeCardTests/SwipeCardTest_Base.swift index 97bd2462..6c51eb21 100644 --- a/Example/Tests/SwipeCardTests/SwipeCardTest_Base.swift +++ b/Example/Tests/SwipeCardTests/SwipeCardTest_Base.swift @@ -32,22 +32,17 @@ class SwipeCardTest_Base: QuickSpec { override func spec() { var mockCardAnimator: MockCardAnimator! - var mockCardLayoutProvider: MockCardLayoutProvider! var mockCardTransformProvider: MockCardTransformProvider! var mockSwipeCardDelegate: MockSwipeCardDelegate! - var mockNotificationCenter: TestableNotificationCenter! var subject: TestableSwipeCard! beforeEach { mockCardAnimator = MockCardAnimator() - mockCardLayoutProvider = MockCardLayoutProvider() mockCardTransformProvider = MockCardTransformProvider() mockSwipeCardDelegate = MockSwipeCardDelegate() - mockNotificationCenter = TestableNotificationCenter() subject = TestableSwipeCard(animator: mockCardAnimator, - layoutProvider: mockCardLayoutProvider, - notificationCenter: mockNotificationCenter, + notificationCenter: NotificationCenter.default, transformProvider: mockCardTransformProvider) subject.delegate = mockSwipeCardDelegate } @@ -179,65 +174,90 @@ class SwipeCardTest_Base: QuickSpec { } } - // MARK: Swipe Completion Block - - describe("When the swipe animation completion block is called") { - beforeEach { - subject.swipeCompletionBlock() - } - - it("should post the correct notification to the notification center") { - expect(mockNotificationCenter.postedNotificationName) == CardDidFinishSwipeAnimationNotification - expect(mockNotificationCenter.postedNotificationObject).to(be(subject)) - } - } - - // MARK: Reverse Swipe Completion Block - - describe("When the reverse swipe animation completion block is called") { - beforeEach { - subject.isUserInteractionEnabled = false - subject.reverseSwipeCompletionBlock() - } - - it("should enable user interaction on the card") { - expect(subject.isUserInteractionEnabled) == true - } - } - // MARK: - Layout describe("When calling layoutSubviews") { - let overlayContainerFrame = CGRect(x: 1, y: 2, width: 3, height: 4) - let contentFrame = CGRect(x: 5, y: 6, width: 7, height: 8) - let footerFrame = CGRect(x: 9, y: 10, width: 11, height: 12) let content = UIView() - let footer = UIView() let overlay = UIView() - beforeEach { - mockCardLayoutProvider.testContentFrame = contentFrame - mockCardLayoutProvider.testFooterFrame = footerFrame - mockCardLayoutProvider.testOverlayContainerFrame = overlayContainerFrame + let cardWidth: CGFloat = 100 + let cardHeight: CGFloat = 200 + let footerHeight: CGFloat = 50 + beforeEach { + subject.frame = CGRect(x: 0, y: 0, width: cardWidth, height: cardHeight) + subject.footerHeight = footerHeight subject.content = content - subject.footer = footer subject.setOverlay(overlay, forDirection: .left) - - subject.layoutSubviews() } - it("should correctly layout the footer and the content") { - expect(footer.frame) == footerFrame - expect(content.frame) == contentFrame + context("and there is a footer") { + let footer = UIView() + + beforeEach { + subject.footer = footer + } + + context("and the footer is opaque") { + beforeEach { + footer.isOpaque = true + subject.layoutSubviews() + } + + it("should correctly layout the footer") { + let expectedFrame = CGRect(x: 0, y: cardHeight - footerHeight, width: cardWidth, height: footerHeight) + expect(footer.frame) == expectedFrame + } + + it("should layout the content above the footer") { + let expectedFrame = CGRect(x: 0, y: 0, width: cardWidth, height: cardHeight - footerHeight) + expect(content.frame) == expectedFrame + } + + it("the overlays should be laid out above the footer") { + let expectedFrame = CGRect(x: 0, y: 0, width: cardWidth, height: cardHeight - footerHeight) + expect(overlay.frame) == expectedFrame + } + } + + context("and the footer is partially transparent") { + beforeEach { + footer.isOpaque = false + subject.layoutSubviews() + } + + it("should correctly layout the footer") { + let expectedFrame = CGRect(x: 0, y: cardHeight - footerHeight, width: cardWidth, height: footerHeight) + expect(footer.frame) == expectedFrame + } + + it("should layout the content behind the footer") { + let expectedFrame = CGRect(x: 0, y: 0, width: cardWidth, height: cardHeight) + expect(content.frame) == expectedFrame + } + + it("the overlays should be laid out above the footer") { + let expectedFrame = CGRect(x: 0, y: 0, width: cardWidth, height: cardHeight - footerHeight) + expect(overlay.frame) == expectedFrame + } + } } - it("should correctly layout the overlay container and its overlays") { - let overlayContainer = subject.subviews.last - expect(overlayContainer?.frame) == overlayContainerFrame + context("and there is no footer") { + beforeEach { + subject.footer = nil + subject.layoutSubviews() + } - let expectedOverlayFrame = CGRect(origin: .zero, size: overlayContainerFrame.size) - expect(overlay.frame) == expectedOverlayFrame + it("the content should be laid out over the entire card") { + let expectedFrame = CGRect(x: 0, y: 0, width: cardWidth, height: cardHeight) + expect(content.frame) == expectedFrame + } + + it("the overlays should be laid out over the entire card") { + let expectedFrame = CGRect(x: 0, y: 0, width: cardWidth, height: cardHeight) + expect(overlay.frame) == expectedFrame + } } } diff --git a/Example/Tests/SwipeCardTests/SwipeCardTest_MainMethods.swift b/Example/Tests/SwipeCardTests/SwipeCardTest_MainMethods.swift index 8a316d26..806f460c 100644 --- a/Example/Tests/SwipeCardTests/SwipeCardTest_MainMethods.swift +++ b/Example/Tests/SwipeCardTests/SwipeCardTest_MainMethods.swift @@ -33,15 +33,16 @@ class SwipeCardTest_MainMethods: QuickSpec { override func spec() { var mockCardAnimator: MockCardAnimator! var mockSwipeCardDelegate: MockSwipeCardDelegate! + var mockNotificationCenter: TestableNotificationCenter! var subject: TestableSwipeCard! beforeEach { mockCardAnimator = MockCardAnimator() mockSwipeCardDelegate = MockSwipeCardDelegate() + mockNotificationCenter = TestableNotificationCenter() subject = TestableSwipeCard(animator: mockCardAnimator, - layoutProvider: MockCardLayoutProvider(), - notificationCenter: NotificationCenter.default, + notificationCenter: mockNotificationCenter, transformProvider: MockCardTransformProvider()) subject.delegate = mockSwipeCardDelegate } @@ -148,8 +149,9 @@ class SwipeCardTest_MainMethods: QuickSpec { expect(mockCardAnimator.animateSwipeForced) == forced } - it("should invoke the swipe completion block once the animation has completed") { - expect(subject.swipeCompletionBlockCalled) == true + it("should post the correct notification to the notification center") { + expect(mockNotificationCenter.postedNotificationName) == CardDidFinishSwipeAnimationNotification + expect(mockNotificationCenter.postedNotificationObject).to(be(subject)) } } @@ -159,36 +161,27 @@ class SwipeCardTest_MainMethods: QuickSpec { let direction: SwipeDirection = .left beforeEach { - subject.testReverseSwipeCompletionBlock = {} subject.reverseSwipe(from: direction) } - it("should disable user interaction on the card") { - expect(subject.isUserInteractionEnabled) == false - } - it("should call the animator's reverse swipe method with the correct direction") { expect(mockCardAnimator.animateReverseSwipeCalled) == true expect(mockCardAnimator.animateReverseSwipeDirection) == direction } - - it("should invoke the reverse swipe completion block once the animation has completed") { - expect(subject.reverseSwipeCompletionBlockCalled) == true - } } // MARK: Remove All Animations describe("When calling removeAllAnimations") { beforeEach { - // add animation key to card + // Add arbitrary animation key to card UIView.animate(withDuration: 100) { subject.alpha = 0 } subject.removeAllAnimations() } - it("should remove all the current animations on it's layer") { + it("should remove all the current animations on its layer") { expect(subject.layer.animationKeys()).to(beNil()) } diff --git a/Example/Tests/Testables/TestableSwipeCard.swift b/Example/Tests/Testables/TestableSwipeCard.swift index 71afd48d..9f4c7860 100644 --- a/Example/Tests/Testables/TestableSwipeCard.swift +++ b/Example/Tests/Testables/TestableSwipeCard.swift @@ -32,22 +32,6 @@ class TestableSwipeCard: SwipeCard { return testTouchLocation ?? super.touchLocation } - // MARK: - Completion Blocks - - var swipeCompletionBlockCalled: Bool = false - override var swipeCompletionBlock: () -> Void { - swipeCompletionBlockCalled = true - return super.swipeCompletionBlock - } - - var reverseSwipeCompletionBlockCalled: Bool = false - var testReverseSwipeCompletionBlock: (() -> Void)? - - override var reverseSwipeCompletionBlock: () -> Void { - reverseSwipeCompletionBlockCalled = true - return testReverseSwipeCompletionBlock ?? super.reverseSwipeCompletionBlock - } - // MARK: - Swipe Calculations var testActiveDirection: SwipeDirection? diff --git a/Shuffle-iOS.podspec b/Shuffle-iOS.podspec index 314d73a7..b84d02ce 100644 --- a/Shuffle-iOS.podspec +++ b/Shuffle-iOS.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "Shuffle-iOS" -s.version = "0.4.1" +s.version = "0.4.2" s.platform = :ios, "9.0" s.summary = "A multi-directional card swiping library inspired by Tinder" diff --git a/Sources/Shuffle/Classes/Internal/Animator.swift b/Sources/Shuffle/Classes/Internal/Animator.swift index 469f9693..197ca585 100644 --- a/Sources/Shuffle/Classes/Internal/Animator.swift +++ b/Sources/Shuffle/Classes/Internal/Animator.swift @@ -41,7 +41,7 @@ enum Animator { alpha: CGFloat) { UIView.addKeyframe(withRelativeStartTime: relativeStartTime, relativeDuration: relativeDuration) { - view?.alpha = alpha + view?.alpha = alpha } } @@ -51,7 +51,7 @@ enum Animator { transform: CGAffineTransform) { UIView.addKeyframe(withRelativeStartTime: relativeStartTime, relativeDuration: relativeDuration) { - view?.transform = transform + view?.transform = transform } } diff --git a/Sources/Shuffle/Classes/Internal/Array+Extensions.swift b/Sources/Shuffle/Classes/Internal/Array+Extensions.swift index 1fff3f2a..4fa52b3d 100644 --- a/Sources/Shuffle/Classes/Internal/Array+Extensions.swift +++ b/Sources/Shuffle/Classes/Internal/Array+Extensions.swift @@ -37,12 +37,12 @@ extension Array { extension Array where Element: Hashable { - func removingDuplicates() -> [Element] { - var dict = [Element: Bool]() - return filter { dict.updateValue(true, forKey: $0) == nil } - } + func removingDuplicates() -> [Element] { + var dict = [Element: Bool]() + return filter { dict.updateValue(true, forKey: $0) == nil } + } - mutating func removeDuplicates() { - self = self.removingDuplicates() - } + mutating func removeDuplicates() { + self = self.removingDuplicates() + } } diff --git a/Sources/Shuffle/Classes/SwipeCard/CardAnimator.swift b/Sources/Shuffle/Classes/SwipeCard/CardAnimator.swift index ee476090..5ec7d3fb 100644 --- a/Sources/Shuffle/Classes/SwipeCard/CardAnimator.swift +++ b/Sources/Shuffle/Classes/SwipeCard/CardAnimator.swift @@ -67,14 +67,13 @@ class CardAnimator: CardAnimatable { Animator.animateSpring(withDuration: card.animationOptions.totalResetDuration, usingSpringWithDamping: card.animationOptions.resetSpringDamping, - options: [.curveLinear, .allowUserInteraction], - animations: { - if let direction = card.activeDirection(), - let overlay = card.overlay(forDirection: direction) { - overlay.alpha = 0 - } - card.transform = .identity - }) + options: [.curveLinear, .allowUserInteraction]) { + if let direction = card.activeDirection(), + let overlay = card.overlay(forDirection: direction) { + overlay.alpha = 0 + } + card.transform = .identity + } } func animateReverseSwipe(on card: SwipeCard, @@ -82,15 +81,14 @@ class CardAnimator: CardAnimatable { completion: ((Bool) -> Void)?) { removeAllAnimations(on: card) - // recreate swipe - Animator.animateKeyFrames(withDuration: 0.0, - animations: { [weak self] in - self?.addSwipeAnimationKeyFrames(card, - direction: direction, - forced: true) - }) + // Recreate swipe + Animator.animateKeyFrames(withDuration: 0.0) { [weak self] in + self?.addSwipeAnimationKeyFrames(card, + direction: direction, + forced: true) + } - // reverse swipe + // Reverse swipe Animator.animateKeyFrames(withDuration: card.animationOptions.totalReverseSwipeDuration, options: .calculationModeLinear, animations: { [weak self] in @@ -126,12 +124,12 @@ class CardAnimator: CardAnimatable { func addReverseSwipeAnimationKeyFrames(_ card: SwipeCard, direction: SwipeDirection) { let relativeOverlayDuration = relativeReverseSwipeOverlayFadeDuration(card, direction: direction) - // transform + // Transform Animator.addTransformKeyFrame(to: card, relativeDuration: 1 - relativeOverlayDuration, transform: .identity) - // overlays + // Overlays for swipeDirection in card.swipeDirections { card.overlay(forDirection: direction)?.alpha = swipeDirection == direction ? 1.0 : 0.0 } @@ -148,7 +146,7 @@ class CardAnimator: CardAnimatable { direction: direction, forced: forced) - // overlays + // Overlays for swipeDirection in card.swipeDirections.filter({ $0 != direction }) { card.overlay(forDirection: swipeDirection)?.alpha = 0.0 } @@ -158,7 +156,7 @@ class CardAnimator: CardAnimatable { relativeDuration: relativeOverlayDuration, alpha: 1.0) - // transform + // Transform let transform = swipeTransform(card, direction: direction, forced: forced) Animator.addTransformKeyFrame(to: card, withRelativeStartTime: relativeOverlayDuration, @@ -194,12 +192,12 @@ class CardAnimator: CardAnimatable { let velocityFactor = card.dragSpeed(on: direction) / card.minimumSwipeSpeed(on: direction) - // card swiped below the minimum swipe speed + // Card swiped below the minimum swipe speed if velocityFactor < 1.0 { return card.animationOptions.totalSwipeDuration } - // card swiped at least the minimum swipe speed -> return relative duration + // Card swiped at least the minimum swipe speed -> return relative duration return 1.0 / TimeInterval(velocityFactor) } diff --git a/Sources/Shuffle/Classes/SwipeCard/CardLayoutProvider.swift b/Sources/Shuffle/Classes/SwipeCard/CardLayoutProvider.swift deleted file mode 100644 index 63f62fe4..00000000 --- a/Sources/Shuffle/Classes/SwipeCard/CardLayoutProvider.swift +++ /dev/null @@ -1,63 +0,0 @@ -/// -/// MIT License -/// -/// Copyright (c) 2020 Mac Gallagher -/// -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in all -/// copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -/// SOFTWARE. -/// - -import UIKit - -protocol CardLayoutProvidable { - func createContentFrame(for card: SwipeCard) -> CGRect - func createFooterFrame(for card: SwipeCard) -> CGRect - func createOverlayContainerFrame(for card: SwipeCard) -> CGRect -} - -class CardLayoutProvider: CardLayoutProvidable { - - static var shared = CardLayoutProvider() - - func createContentFrame(for card: SwipeCard) -> CGRect { - if let footer = card.footer, footer.isOpaque { - return CGRect(x: 0, - y: 0, - width: card.bounds.width, - height: card.bounds.height - card.footerHeight) - } - return card.bounds - } - - func createFooterFrame(for card: SwipeCard) -> CGRect { - return CGRect(x: 0, - y: card.bounds.height - card.footerHeight, - width: card.bounds.width, - height: card.footerHeight) - } - - func createOverlayContainerFrame(for card: SwipeCard) -> CGRect { - if card.footer != nil { - return CGRect(x: 0, - y: 0, - width: card.bounds.width, - height: card.bounds.height - card.footerHeight) - } - return card.bounds - } -} diff --git a/Sources/Shuffle/Classes/SwipeCard/SwipeCard.swift b/Sources/Shuffle/Classes/SwipeCard/SwipeCard.swift index 1d9f3607..f55ce8cd 100644 --- a/Sources/Shuffle/Classes/SwipeCard/SwipeCard.swift +++ b/Sources/Shuffle/Classes/SwipeCard/SwipeCard.swift @@ -66,23 +66,10 @@ open class SwipeCard: SwipeView { private var internalTouchLocation: CGPoint? - var swipeCompletionBlock: () -> Void { - return { [weak self] in - self?.notificationCenter.post(name: CardDidFinishSwipeAnimationNotification, object: self) - } - } - - var reverseSwipeCompletionBlock: () -> Void { - return { [weak self] in - self?.isUserInteractionEnabled = true - } - } - private let overlayContainer = UIView() private var overlays = [SwipeDirection: UIView]() private var animator: CardAnimatable = CardAnimator.shared - private var layoutProvider: CardLayoutProvidable = CardLayoutProvider.shared private var notificationCenter = NotificationCenter.default private var transformProvider: CardTransformProvidable = CardTransformProvider.shared @@ -99,12 +86,10 @@ open class SwipeCard: SwipeView { } convenience init(animator: CardAnimatable, - layoutProvider: CardLayoutProvidable, notificationCenter: NotificationCenter, transformProvider: CardTransformProvidable) { self.init(frame: .zero) self.animator = animator - self.layoutProvider = layoutProvider self.notificationCenter = notificationCenter self.transformProvider = transformProvider } @@ -118,19 +103,24 @@ open class SwipeCard: SwipeView { override open func layoutSubviews() { super.layoutSubviews() - footer?.frame = layoutProvider.createFooterFrame(for: self) - layoutContentView() - layoutOverlays() - } - - private func layoutContentView() { - guard let content = content else { return } - content.frame = layoutProvider.createContentFrame(for: self) - sendSubviewToBack(content) - } + footer?.frame = CGRect(x: 0, y: bounds.height - footerHeight, width: bounds.width, height: footerHeight) + + // Content + if let content = content { + if let footer = footer, footer.isOpaque { + content.frame = CGRect(x: 0, y: 0, width: bounds.width, height: bounds.height - footerHeight) + } else { + content.frame = bounds + } + sendSubviewToBack(content) + } - private func layoutOverlays() { - overlayContainer.frame = layoutProvider.createOverlayContainerFrame(for: self) + // Overlays + if footer != nil { + overlayContainer.frame = CGRect(x: 0, y: 0, width: bounds.width, height: bounds.height - footerHeight) + } else { + overlayContainer.frame = bounds + } bringSubviewToFront(overlayContainer) overlays.values.forEach { $0.frame = overlayContainer.bounds } } @@ -209,7 +199,7 @@ open class SwipeCard: SwipeView { direction: direction, forced: forced) { [weak self] finished in if finished { - self?.swipeCompletionBlock() + self?.notificationCenter.post(name: CardDidFinishSwipeAnimationNotification, object: self) } } } @@ -220,7 +210,7 @@ open class SwipeCard: SwipeView { isUserInteractionEnabled = false animator.animateReverseSwipe(on: self, from: direction) { [weak self] finished in if finished { - self?.reverseSwipeCompletionBlock() + self?.isUserInteractionEnabled = true } } } diff --git a/Sources/Shuffle/Classes/SwipeCardStack/CardStackLayoutProvider.swift b/Sources/Shuffle/Classes/SwipeCardStack/CardStackLayoutProvider.swift deleted file mode 100644 index 34463cd2..00000000 --- a/Sources/Shuffle/Classes/SwipeCardStack/CardStackLayoutProvider.swift +++ /dev/null @@ -1,47 +0,0 @@ -/// -/// MIT License -/// -/// Copyright (c) 2020 Mac Gallagher -/// -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in all -/// copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -/// SOFTWARE. -/// - -import UIKit - -protocol CardStackLayoutProvidable { - func createCardContainerFrame(for cardStack: SwipeCardStack) -> CGRect - func createCardFrame(for cardStack: SwipeCardStack) -> CGRect -} - -class CardStackLayoutProvider: CardStackLayoutProvidable { - - static let shared = CardStackLayoutProvider() - - func createCardContainerFrame(for cardStack: SwipeCardStack) -> CGRect { - let insets = cardStack.cardStackInsets - let width = cardStack.bounds.width - (insets.left + insets.right) - let height = cardStack.bounds.height - (insets.top + insets.bottom) - return CGRect(x: insets.left, y: insets.top, width: width, height: height) - } - - func createCardFrame(for cardStack: SwipeCardStack) -> CGRect { - let containerSize = createCardContainerFrame(for: cardStack).size - return CGRect(origin: .zero, size: containerSize) - } -} diff --git a/Sources/Shuffle/Classes/SwipeCardStack/SwipeCardStack.swift b/Sources/Shuffle/Classes/SwipeCardStack/SwipeCardStack.swift index c5f221ea..68afacb6 100644 --- a/Sources/Shuffle/Classes/SwipeCardStack/SwipeCardStack.swift +++ b/Sources/Shuffle/Classes/SwipeCardStack/SwipeCardStack.swift @@ -84,14 +84,13 @@ open class SwipeCardStack: UIView, SwipeCardDelegate, UIGestureRecognizerDelegat var isAnimating: Bool = false + let cardContainer = UIView() + private var animator: CardStackAnimatable = CardStackAnimator.shared - private var layoutProvider: CardStackLayoutProvidable = CardStackLayoutProvider.shared private var notificationCenter = NotificationCenter() private var stateManager: CardStackStateManagable = CardStackStateManager() private var transformProvider: CardStackTransformProvidable = CardStackTransformProvider.shared - private let cardContainer = UIView() - // MARK: - Initialization override public init(frame: CGRect) { @@ -105,13 +104,11 @@ open class SwipeCardStack: UIView, SwipeCardDelegate, UIGestureRecognizerDelegat } convenience init(animator: CardStackAnimatable, - layoutProvider: CardStackLayoutProvidable, notificationCenter: NotificationCenter, stateManager: CardStackStateManagable, transformProvider: CardStackTransformProvidable) { self.init(frame: .zero) self.animator = animator - self.layoutProvider = layoutProvider self.notificationCenter = notificationCenter self.stateManager = stateManager self.transformProvider = transformProvider @@ -129,7 +126,10 @@ open class SwipeCardStack: UIView, SwipeCardDelegate, UIGestureRecognizerDelegat override open func layoutSubviews() { super.layoutSubviews() - cardContainer.frame = layoutProvider.createCardContainerFrame(for: self) + let width = bounds.width - (cardStackInsets.left + cardStackInsets.right) + let height = bounds.height - (cardStackInsets.top + cardStackInsets.bottom) + cardContainer.frame = CGRect(x: cardStackInsets.left, y: cardStackInsets.top, width: width, height: height) + for (position, value) in visibleCards.enumerated() { layoutCard(value.card, at: position) } @@ -137,7 +137,7 @@ open class SwipeCardStack: UIView, SwipeCardDelegate, UIGestureRecognizerDelegat func layoutCard(_ card: SwipeCard, at position: Int) { card.transform = .identity - card.frame = layoutProvider.createCardFrame(for: self) + card.frame = CGRect(origin: .zero, size: cardContainer.frame.size) card.transform = transform(forCardAtPosition: position) card.isUserInteractionEnabled = position == 0 }