diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..198dfce --- /dev/null +++ b/.gitignore @@ -0,0 +1,47 @@ +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## App +settings.plist + +## Build generated +build/ +DerivedData + +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata + +## Other +*.xccheckout +*.moved-aside +*.xcuserstate +*.xcscmblueprint + +## Obj-C/Swift specific +*.hmap +*.ipa + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control +# +# Pods/ + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +# Carthage/Checkouts + +Carthage/Build + diff --git a/DesignStudioExpress.xcodeproj/project.pbxproj b/DesignStudioExpress.xcodeproj/project.pbxproj index a96c040..82e6132 100644 --- a/DesignStudioExpress.xcodeproj/project.pbxproj +++ b/DesignStudioExpress.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + DE9CC0FF2AB206A55D253AC2 /* Pods.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AAF9E289780C23ADD06A8363 /* Pods.framework */; }; E421C4161BF164AD003F9D8A /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E421C4151BF164AD003F9D8A /* AppDelegate.swift */; }; E421C4181BF164AD003F9D8A /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E421C4171BF164AD003F9D8A /* ViewController.swift */; }; E421C41B1BF164AD003F9D8A /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E421C4191BF164AD003F9D8A /* Main.storyboard */; }; @@ -26,6 +27,9 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 2F6E83CBFE1ADF513DD680AE /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = ""; }; + 4C98F6B1E5929336083EA3A8 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = ""; }; + AAF9E289780C23ADD06A8363 /* Pods.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods.framework; sourceTree = BUILT_PRODUCTS_DIR; }; E421C4121BF164AD003F9D8A /* DesignStudioExpress.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DesignStudioExpress.app; sourceTree = BUILT_PRODUCTS_DIR; }; E421C4151BF164AD003F9D8A /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; E421C4171BF164AD003F9D8A /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; @@ -43,6 +47,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + DE9CC0FF2AB206A55D253AC2 /* Pods.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -56,12 +61,31 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 8A0A712E825E85AD68ACE552 /* Frameworks */ = { + isa = PBXGroup; + children = ( + AAF9E289780C23ADD06A8363 /* Pods.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + D9DF9FE3ADAE0635FA1DA539 /* Pods */ = { + isa = PBXGroup; + children = ( + 2F6E83CBFE1ADF513DD680AE /* Pods.debug.xcconfig */, + 4C98F6B1E5929336083EA3A8 /* Pods.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; E421C4091BF164AD003F9D8A = { isa = PBXGroup; children = ( E421C4141BF164AD003F9D8A /* DesignStudioExpress */, E421C4291BF164AD003F9D8A /* DesignStudioExpressTests */, E421C4131BF164AD003F9D8A /* Products */, + D9DF9FE3ADAE0635FA1DA539 /* Pods */, + 8A0A712E825E85AD68ACE552 /* Frameworks */, ); sourceTree = ""; }; @@ -103,9 +127,13 @@ isa = PBXNativeTarget; buildConfigurationList = E421C42F1BF164AD003F9D8A /* Build configuration list for PBXNativeTarget "DesignStudioExpress" */; buildPhases = ( + D85651353B822225EAD177C7 /* Check Pods Manifest.lock */, E421C40E1BF164AD003F9D8A /* Sources */, E421C40F1BF164AD003F9D8A /* Frameworks */, E421C4101BF164AD003F9D8A /* Resources */, + 44A04A8B3F01E8A557370E7C /* Embed Pods Frameworks */, + 2B28DD5CB09FDAA9C1560188 /* Copy Pods Resources */, + E421C4351BF16622003F9D8A /* ShellScript */, ); buildRules = ( ); @@ -192,6 +220,67 @@ }; /* End PBXResourcesBuildPhase section */ +/* Begin PBXShellScriptBuildPhase section */ + 2B28DD5CB09FDAA9C1560188 /* Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + 44A04A8B3F01E8A557370E7C /* Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + D85651353B822225EAD177C7 /* Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Check Pods Manifest.lock"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + showEnvVarsInLog = 0; + }; + E421C4351BF16622003F9D8A /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "./Fabric.framework/run 43ab9ea0d228fd2328dc9a2098812deda29bc839 ce8d79b5bd7fac6af07deea425395977c75fbe2261b35dc400a7cd7cbc69adc0"; + }; +/* End PBXShellScriptBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ E421C40E1BF164AD003F9D8A /* Sources */ = { isa = PBXSourcesBuildPhase; @@ -323,22 +412,24 @@ }; E421C4301BF164AD003F9D8A /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 2F6E83CBFE1ADF513DD680AE /* Pods.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = DesignStudioExpress/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.alexanderinteractive.DesignStudioExpress; + PRODUCT_BUNDLE_IDENTIFIER = com.alexanderinteractive.whackjobapp; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Debug; }; E421C4311BF164AD003F9D8A /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 4C98F6B1E5929336083EA3A8 /* Pods.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = DesignStudioExpress/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.alexanderinteractive.DesignStudioExpress; + PRODUCT_BUNDLE_IDENTIFIER = com.alexanderinteractive.whackjobapp; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Release; @@ -386,6 +477,7 @@ E421C4311BF164AD003F9D8A /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; E421C4321BF164AD003F9D8A /* Build configuration list for PBXNativeTarget "DesignStudioExpressTests" */ = { isa = XCConfigurationList; @@ -394,6 +486,7 @@ E421C4341BF164AD003F9D8A /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; diff --git a/DesignStudioExpress.xcodeproj/xcuserdata/kperusko.xcuserdatad/xcschemes/DesignStudioExpress.xcscheme b/DesignStudioExpress.xcodeproj/xcuserdata/kperusko.xcuserdatad/xcschemes/DesignStudioExpress.xcscheme index 306df6d..ae50295 100644 --- a/DesignStudioExpress.xcodeproj/xcuserdata/kperusko.xcuserdatad/xcschemes/DesignStudioExpress.xcscheme +++ b/DesignStudioExpress.xcodeproj/xcuserdata/kperusko.xcuserdatad/xcschemes/DesignStudioExpress.xcscheme @@ -5,6 +5,22 @@ + + + + + + + + + + + + + + @@ -26,6 +61,16 @@ debugDocumentVersioning = "YES" debugServiceExtension = "internal" allowLocationSimulation = "YES"> + + + + @@ -35,6 +80,16 @@ savedToolIdentifier = "" useCustomWorkingDirectory = "NO" debugDocumentVersioning = "YES"> + + + + diff --git a/DesignStudioExpress.xcworkspace/contents.xcworkspacedata b/DesignStudioExpress.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..69f8fbd --- /dev/null +++ b/DesignStudioExpress.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/DesignStudioExpress/AppDelegate.swift b/DesignStudioExpress/AppDelegate.swift index 4de1ac7..8760de2 100644 --- a/DesignStudioExpress/AppDelegate.swift +++ b/DesignStudioExpress/AppDelegate.swift @@ -7,6 +7,8 @@ // import UIKit +import Fabric +import Crashlytics @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { @@ -16,6 +18,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate { func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { // Override point for customization after application launch. + + Fabric.with([Crashlytics.self()]) + return true } diff --git a/DesignStudioExpress/Base.lproj/Main.storyboard b/DesignStudioExpress/Base.lproj/Main.storyboard index 3a2a49b..08b0718 100644 --- a/DesignStudioExpress/Base.lproj/Main.storyboard +++ b/DesignStudioExpress/Base.lproj/Main.storyboard @@ -1,13 +1,14 @@ - + - + + - + diff --git a/DesignStudioExpress/Info.plist b/DesignStudioExpress/Info.plist index 6905cc6..023724c 100644 --- a/DesignStudioExpress/Info.plist +++ b/DesignStudioExpress/Info.plist @@ -20,6 +20,20 @@ ???? CFBundleVersion 1 + Fabric + + APIKey + 43ab9ea0d228fd2328dc9a2098812deda29bc839 + Kits + + + KitInfo + + KitName + Crashlytics + + + LSRequiresIPhoneOS UILaunchStoryboardName @@ -33,8 +47,6 @@ UISupportedInterfaceOrientations UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight diff --git a/Fabric.framework/Fabric b/Fabric.framework/Fabric new file mode 100755 index 0000000..4360b95 Binary files /dev/null and b/Fabric.framework/Fabric differ diff --git a/Fabric.framework/Headers/FABAttributes.h b/Fabric.framework/Headers/FABAttributes.h new file mode 100644 index 0000000..f4e0639 --- /dev/null +++ b/Fabric.framework/Headers/FABAttributes.h @@ -0,0 +1,48 @@ +// +// FABAttributes.h +// Fabric +// +// Copyright (c) 2015 Twitter. All rights reserved. +// + +#pragma once + +#define FAB_UNAVAILABLE(x) __attribute__((unavailable(x))) + +#if __has_feature(nullability) + #define fab_nullable nullable + #define fab_nonnull nonnull + #define fab_null_unspecified null_unspecified + #define fab_null_resettable null_resettable + #define __fab_nullable __nullable + #define __fab_nonnull __nonnull + #define __fab_null_unspecified __null_unspecified +#else + #define fab_nullable + #define fab_nonnull + #define fab_null_unspecified + #define fab_null_resettable + #define __fab_nullable + #define __fab_nonnull + #define __fab_null_unspecified +#endif + +#ifndef NS_ASSUME_NONNULL_BEGIN + #define NS_ASSUME_NONNULL_BEGIN +#endif + +#ifndef NS_ASSUME_NONNULL_END + #define NS_ASSUME_NONNULL_END +#endif + + +/** + * The following macros are defined here to provide + * backwards compatability. If you are still using + * them you should migrate to the new versions that + * are defined above. + */ +#define FAB_NONNULL __fab_nonnull +#define FAB_NULLABLE __fab_nullable +#define FAB_START_NONNULL NS_ASSUME_NONNULL_BEGIN +#define FAB_END_NONNULL NS_ASSUME_NONNULL_END diff --git a/Fabric.framework/Headers/Fabric.h b/Fabric.framework/Headers/Fabric.h new file mode 100644 index 0000000..47a3d05 --- /dev/null +++ b/Fabric.framework/Headers/Fabric.h @@ -0,0 +1,64 @@ +// +// Fabric.h +// +// Copyright (c) 2015 Twitter. All rights reserved. +// + +#import +#import "FABAttributes.h" + +NS_ASSUME_NONNULL_BEGIN + +#if TARGET_OS_IPHONE +#if __IPHONE_OS_VERSION_MIN_REQUIRED < 60000 + #error "Fabric's minimum iOS version is 6.0" +#endif +#else +#if __MAC_OS_X_VERSION_MIN_REQUIRED < 1070 + #error "Fabric's minimum OS X version is 10.7" +#endif +#endif + +/** + * Fabric Base. Coordinates configuration and starts all provided kits. + */ +@interface Fabric : NSObject + +/** + * Initialize Fabric and all provided kits. Call this method within your App Delegate's `application:didFinishLaunchingWithOptions:` and provide the kits you wish to use. + * + * For example, in Objective-C: + * + * `[Fabric with:@[[Crashlytics class], [Twitter class], [Digits class], [MoPub class]]];` + * + * Swift: + * + * `Fabric.with([Crashlytics.self(), Twitter.self(), Digits.self(), MoPub.self()])` + * + * Only the first call to this method is honored. Subsequent calls are no-ops. + * + * @param kitClasses An array of kit Class objects + * + * @return Returns the shared Fabric instance. In most cases this can be ignored. + */ ++ (instancetype)with:(NSArray *)kitClasses; + +/** + * Returns the Fabric singleton object. + */ ++ (instancetype)sharedSDK; + +/** + * This BOOL enables or disables debug logging, such as kit version information. The default value is NO. + */ +@property (nonatomic, assign) BOOL debug; + +/** + * Unavailable. Use `+sharedSDK` to retrieve the shared Fabric instance. + */ +- (id)init FAB_UNAVAILABLE("Use +sharedSDK to retrieve the shared Fabric instance."); + +@end + +NS_ASSUME_NONNULL_END + diff --git a/Fabric.framework/Info.plist b/Fabric.framework/Info.plist new file mode 100644 index 0000000..d240582 --- /dev/null +++ b/Fabric.framework/Info.plist @@ -0,0 +1,55 @@ + + + + + BuildMachineOSBuild + 14F1021 + CFBundleDevelopmentRegion + en + CFBundleExecutable + Fabric + CFBundleIdentifier + io.fabric.sdk.ios + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + Fabric + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.6.0 + CFBundleSignature + ???? + CFBundleSupportedPlatforms + + iPhoneOS + + CFBundleVersion + 37 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 13B137 + DTPlatformName + iphoneos + DTPlatformVersion + 9.1 + DTSDKBuild + 13B137 + DTSDKName + iphoneos9.1 + DTXcode + 0710 + DTXcodeBuild + 7B91b + MinimumOSVersion + 6.0 + NSHumanReadableCopyright + Copyright © 2015 Twitter. All rights reserved. + UIDeviceFamily + + 1 + 2 + + + diff --git a/Fabric.framework/Modules/module.modulemap b/Fabric.framework/Modules/module.modulemap new file mode 100644 index 0000000..2a31223 --- /dev/null +++ b/Fabric.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module Fabric { + umbrella header "Fabric.h" + + export * + module * { export * } +} \ No newline at end of file diff --git a/Fabric.framework/run b/Fabric.framework/run new file mode 100755 index 0000000..f4c5732 --- /dev/null +++ b/Fabric.framework/run @@ -0,0 +1,28 @@ +#!/bin/sh + +# run +# +# Copyright (c) 2015 Crashlytics. All rights reserved. + +# Figure out where we're being called from +DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) + +# Quote path in case of spaces or special chars +DIR="\"${DIR}" + +PATH_SEP="/" +VALIDATE_COMMAND="uploadDSYM\" $@ validate" +UPLOAD_COMMAND="uploadDSYM\" $@" + +# Ensure params are as expected, run in sync mode to validate +eval $DIR$PATH_SEP$VALIDATE_COMMAND +return_code=$? + +if [[ $return_code != 0 ]]; then + exit $return_code +fi + +# Verification passed, upload dSYM in background to prevent Xcode from waiting +# Note: Validation is performed again before upload. +# Output can still be found in Console.app +eval $DIR$PATH_SEP$UPLOAD_COMMAND > /dev/null 2>&1 & diff --git a/Fabric.framework/uploadDSYM b/Fabric.framework/uploadDSYM new file mode 100755 index 0000000..fa6658d Binary files /dev/null and b/Fabric.framework/uploadDSYM differ diff --git a/Podfile b/Podfile new file mode 100644 index 0000000..a659eba --- /dev/null +++ b/Podfile @@ -0,0 +1,9 @@ +pod 'Cartography', '~> 0.6' +pod 'NRSimplePlist', :git => 'https://github.com/broderboy/NRSimplePlist.git', :branch => 'swift2' +pod 'SwiftyUserDefaults' +pod 'SVProgressHUD', :head +pod 'SwiftyJSON', :git => 'https://github.com/SwiftyJSON/SwiftyJSON.git' +pod 'Fabric' +pod 'Crashlytics' + +use_frameworks! diff --git a/Podfile.lock b/Podfile.lock new file mode 100644 index 0000000..fcdb408 --- /dev/null +++ b/Podfile.lock @@ -0,0 +1,46 @@ +PODS: + - Cartography (0.6.0) + - Crashlytics (3.4.0): + - Fabric (~> 1.6.0) + - Fabric (1.6.0): + - Fabric/Base (= 1.6.0) + - Fabric/Base (1.6.0) + - NRSimplePlist (1.0) + - SVProgressHUD (HEAD based on 2.0-beta) + - SwiftyJSON (2.3.1) + - SwiftyUserDefaults (2.0.0) + +DEPENDENCIES: + - Cartography (~> 0.6) + - Crashlytics + - Fabric + - NRSimplePlist (from `https://github.com/broderboy/NRSimplePlist.git`, branch `swift2`) + - SVProgressHUD (HEAD) + - SwiftyJSON (from `https://github.com/SwiftyJSON/SwiftyJSON.git`) + - SwiftyUserDefaults + +EXTERNAL SOURCES: + NRSimplePlist: + :branch: swift2 + :git: https://github.com/broderboy/NRSimplePlist.git + SwiftyJSON: + :git: https://github.com/SwiftyJSON/SwiftyJSON.git + +CHECKOUT OPTIONS: + NRSimplePlist: + :commit: 9497a4efbf6460ea2384b5f2680009621e25b3ce + :git: https://github.com/broderboy/NRSimplePlist.git + SwiftyJSON: + :commit: ece271ab33839d11c2153d71fb59c53545132cf9 + :git: https://github.com/SwiftyJSON/SwiftyJSON.git + +SPEC CHECKSUMS: + Cartography: 70af183a248547694a8cfaa6b989cb7e04589985 + Crashlytics: 1ee87895c37472eb3f01f409ea1654a464d2f8d4 + Fabric: d737eda3a26ac940a5430230eedb35f16b226131 + NRSimplePlist: c27d95cb456281528885b3c48e15826cf12a970b + SVProgressHUD: c83337f10ed32d701c423d519059a249973c8662 + SwiftyJSON: 592b53bee5ef3dd9b3bebc6b9cb7ee35426ae8c3 + SwiftyUserDefaults: 1266e9734c68bcfbac8294ee84173dc8ba6db312 + +COCOAPODS: 0.39.0 diff --git a/Pods/Cartography/Cartography/Align.swift b/Pods/Cartography/Cartography/Align.swift new file mode 100644 index 0000000..6c83ca2 --- /dev/null +++ b/Pods/Cartography/Cartography/Align.swift @@ -0,0 +1,120 @@ +// +// Align.swift +// Cartography +// +// Created by Robert Böhnke on 17/02/15. +// Copyright (c) 2015 Robert Böhnke. All rights reserved. +// + +#if os(iOS) +import UIKit +#else +import AppKit +#endif + +private func makeEqual(attribute: LayoutProxy -> P, first: LayoutProxy, rest: [LayoutProxy]) -> [NSLayoutConstraint] { + return rest.reduce([]) { acc, current in + current.view.car_translatesAutoresizingMaskIntoConstraints = false + + return acc + [ attribute(first) == attribute(current) ] + } +} + +/// Aligns multiple views by their top edge. +/// +/// All views passed to this function will have +/// their `translatesAutoresizingMaskIntoConstraints` properties set to `false`. +/// +/// - returns: An array of `NSLayoutConstraint` instances. +/// +public func align(top first: LayoutProxy, _ rest: LayoutProxy...) -> [NSLayoutConstraint] { + return makeEqual({ $0.top }, first: first, rest: rest) +} + +/// Aligns multiple views by their right edge. +/// +/// All views passed to this function will have +/// their `translatesAutoresizingMaskIntoConstraints` properties set to `false`. +/// +/// - returns: An array of `NSLayoutConstraint` instances. +/// +public func align(right first: LayoutProxy, _ rest: LayoutProxy...) -> [NSLayoutConstraint] { + return makeEqual({ $0.right }, first: first, rest: rest) +} + +/// Aligns multiple views by their bottom edge. +/// +/// All views passed to this function will have +/// their `translatesAutoresizingMaskIntoConstraints` properties set to `false`. +/// +/// - returns: An array of `NSLayoutConstraint` instances. +/// +public func align(bottom first: LayoutProxy, _ rest: LayoutProxy...) -> [NSLayoutConstraint] { + return makeEqual({ $0.bottom }, first: first, rest: rest) +} + +/// Aligns multiple views by their left edge. +/// +/// All views passed to this function will have +/// their `translatesAutoresizingMaskIntoConstraints` properties set to `false`. +/// +/// - returns: An array of `NSLayoutConstraint` instances. +/// +public func align(left first: LayoutProxy, _ rest: LayoutProxy...) -> [NSLayoutConstraint] { + return makeEqual({ $0.left }, first: first, rest: rest) +} + +/// Aligns multiple views by their leading edge. +/// +/// All views passed to this function will have +/// their `translatesAutoresizingMaskIntoConstraints` properties set to `false`. +/// +/// - returns: An array of `NSLayoutConstraint` instances. +/// +public func align(leading first: LayoutProxy, _ rest: LayoutProxy...) -> [NSLayoutConstraint] { + return makeEqual({ $0.leading }, first: first, rest: rest) +} + +/// Aligns multiple vies by their trailing edge. +/// +/// All views passed to this function will have +/// their `translatesAutoresizingMaskIntoConstraints` properties set to `false`. +/// +/// - returns: An array of `NSLayoutConstraint` instances. +/// +public func align(trailing first: LayoutProxy, _ rest: LayoutProxy...) -> [NSLayoutConstraint] { + return makeEqual({ $0.trailing }, first: first, rest: rest) +} + +/// Aligns multiple views by their horizontal center. +/// +/// All views passed to this function will have +/// their `translatesAutoresizingMaskIntoConstraints` properties set to `false`. +/// +/// - returns: An array of `NSLayoutConstraint` instances. +/// +public func align(centerX first: LayoutProxy, _ rest: LayoutProxy...) -> [NSLayoutConstraint] { + return makeEqual({ $0.centerX }, first: first, rest: rest) +} + +/// Aligns multiple views by their vertical center. +/// +/// All views passed to this function will have +/// their `translatesAutoresizingMaskIntoConstraints` properties set to `false`. +/// +/// - returns: An array of `NSLayoutConstraint` instances. +/// +public func align(centerY first: LayoutProxy, _ rest: LayoutProxy...) -> [NSLayoutConstraint] { + return makeEqual({ $0.centerY }, first: first, rest: rest) +} + +/// Aligns multiple views by their baseline. +/// +/// All views passed to this function will have +/// their `translatesAutoresizingMaskIntoConstraints` properties set to `false`. +/// +/// - returns: An array of `NSLayoutConstraint` instances. +/// +public func align(baseline first: LayoutProxy, _ rest: LayoutProxy...) -> [NSLayoutConstraint] { + return makeEqual({ $0.baseline }, first: first, rest: rest) +} diff --git a/Pods/Cartography/Cartography/Coefficients.swift b/Pods/Cartography/Cartography/Coefficients.swift new file mode 100644 index 0000000..71c590a --- /dev/null +++ b/Pods/Cartography/Cartography/Coefficients.swift @@ -0,0 +1,61 @@ +// +// Coefficients.swift +// Cartography +// +// Created by Robert Böhnke on 17/06/14. +// Copyright (c) 2014 Robert Böhnke. All rights reserved. +// + +import Foundation + +public struct Coefficients { + var multiplier: CGFloat = 1 + var constant: CGFloat = 0 + + init() { } + + init(_ multiplier: CGFloat, _ constant: CGFloat) { + self.constant = constant + self.multiplier = multiplier + } +} + +// MARK: Addition + +public func + (c: CGFloat, rhs: Coefficients) -> Coefficients { + return Coefficients(rhs.multiplier, rhs.constant + c) +} + +public func + (lhs: Coefficients, rhs: CGFloat) -> Coefficients { + return rhs + lhs +} + +// MARK: Subtraction + +public func - (c: CGFloat, rhs: Coefficients) -> Coefficients { + return Coefficients(rhs.multiplier, rhs.constant - c) +} + +public func - (lhs: Coefficients, rhs: CGFloat) -> Coefficients { + return rhs - lhs +} + +// MARK: Multiplication + +public func * (m: CGFloat, rhs: Coefficients) -> Coefficients { + return Coefficients(rhs.multiplier * m, rhs.constant * m) +} + +public func * (lhs: Coefficients, rhs: CGFloat) -> Coefficients { + return rhs * lhs +} + +// MARK: Division + +public func / (m: CGFloat, rhs: Coefficients) -> Coefficients { + return Coefficients(rhs.multiplier / m, rhs.constant / m) +} + +public func / (lhs: Coefficients, rhs: CGFloat) -> Coefficients { + return rhs / lhs +} diff --git a/Pods/Cartography/Cartography/Compound.swift b/Pods/Cartography/Cartography/Compound.swift new file mode 100644 index 0000000..c492a1c --- /dev/null +++ b/Pods/Cartography/Cartography/Compound.swift @@ -0,0 +1,96 @@ +// +// Compound.swift +// Cartography +// +// Created by Robert Böhnke on 18/06/14. +// Copyright (c) 2014 Robert Böhnke. All rights reserved. +// + +#if os(iOS) +import UIKit +#else +import AppKit +#endif + +public protocol Compound { + var context: Context { get } + var properties: [Property] { get } +} + +/// Compound properties conforming to this protocol can use the `==` operator +/// with other compound properties of the same type. +public protocol RelativeCompoundEquality : Compound { } + +/// Declares a property equal to a the result of an expression. +/// +/// - parameter lhs: The affected property. The associated view will have +/// `translatesAutoresizingMaskIntoConstraints` set to `false`. +/// - parameter rhs: The expression. +/// +/// - returns: An `NSLayoutConstraint`. +/// +public func == (lhs: P, rhs: Expression

) -> [NSLayoutConstraint] { + return lhs.context.addConstraint(lhs, coefficients: rhs.coefficients, to: rhs.value) +} + +/// Declares a property equal to another compound property. +/// +/// - parameter lhs: The affected property. The associated view will have +/// `translatesAutoresizingMaskIntoConstraints` set to `false`. +/// - parameter rhs: The other property. +/// +public func == (lhs: P, rhs: P) -> [NSLayoutConstraint] { + return lhs.context.addConstraint(lhs, to: rhs) +} + +/// Compound properties conforming to this protocol can use the `<=` and `>=` +/// operators with other compound properties of the same type. +public protocol RelativeCompoundInequality : Compound { } + +/// Declares a property less than or equal to another compound property. +/// +/// - parameter lhs: The affected property. The associated view will have +/// `translatesAutoresizingMaskIntoConstraints` set to `false`. +/// - parameter rhs: The other property. +/// +/// - returns: An `NSLayoutConstraint`. +/// +public func <= (lhs: P, rhs: P) -> [NSLayoutConstraint] { + return lhs.context.addConstraint(lhs, to: rhs, relation: NSLayoutRelation.LessThanOrEqual) +} + +/// Declares a property greater than or equal to another compound property. +/// +/// - parameter lhs: The affected property. The associated view will have +/// `translatesAutoresizingMaskIntoConstraints` set to `false`. +/// - parameter rhs: The other property. +/// +/// - returns: An `NSLayoutConstraint`. +/// +public func >= (lhs: P, rhs: P) -> [NSLayoutConstraint] { + return lhs.context.addConstraint(lhs, to: rhs, relation: NSLayoutRelation.GreaterThanOrEqual) +} + +/// Declares a property less than or equal to the result of an expression. +/// +/// - parameter lhs: The affected property. The associated view will have +/// `translatesAutoresizingMaskIntoConstraints` set to `false`. +/// - parameter rhs: The other property. +/// +/// - returns: An `NSLayoutConstraint`. +/// +public func <= (lhs: P, rhs: Expression

) -> [NSLayoutConstraint] { + return lhs.context.addConstraint(lhs, coefficients: rhs.coefficients, to: rhs.value, relation: NSLayoutRelation.LessThanOrEqual) +} + +/// Declares a property greater than or equal to the result of an expression. +/// +/// - parameter lhs: The affected property. The associated view will have +/// `translatesAutoresizingMaskIntoConstraints` set to `false`. +/// - parameter rhs: The other property. +/// +/// - returns: An `NSLayoutConstraint`. +/// +public func >= (lhs: P, rhs: Expression

) -> [NSLayoutConstraint] { + return lhs.context.addConstraint(lhs, coefficients: rhs.coefficients, to: rhs.value, relation: NSLayoutRelation.GreaterThanOrEqual) +} diff --git a/Pods/Cartography/Cartography/Constrain.swift b/Pods/Cartography/Cartography/Constrain.swift new file mode 100644 index 0000000..29103d1 --- /dev/null +++ b/Pods/Cartography/Cartography/Constrain.swift @@ -0,0 +1,133 @@ +// +// Constrain.swift +// Cartography +// +// Created by Robert Böhnke on 30/09/14. +// Copyright (c) 2014 Robert Böhnke. All rights reserved. +// + +import Foundation + +/// Updates the constraints of a single view. +/// +/// - parameter view: The view to layout. +/// - parameter replace: The `ConstraintGroup` whose constraints should be +/// replaced. +/// - parameter block: A block that declares the layout for `view`. +/// +public func constrain(view: View, replace group: ConstraintGroup = ConstraintGroup(), @noescape block: LayoutProxy -> ()) -> ConstraintGroup { + let context = Context() + block(LayoutProxy(context, view)) + group.replaceConstraints(context.constraints) + + return group +} + +/// Updates the constraints of two views. +/// +/// - parameter view1: A view to layout. +/// - parameter view2: A view to layout. +/// - parameter replace: The `ConstraintGroup` whose constraints should be +/// replaced. +/// - parameter block: A block that declares the layout for the views. +/// +public func constrain(view1: View, _ view2: View, replace group: ConstraintGroup = ConstraintGroup(), @noescape block: (LayoutProxy, LayoutProxy) -> ()) -> ConstraintGroup { + let context = Context() + block(LayoutProxy(context, view1), LayoutProxy(context, view2)) + group.replaceConstraints(context.constraints) + + return group +} + +/// Updates the constraints of three views. +/// +/// - parameter view1: A view to layout. +/// - parameter view2: A view to layout. +/// - parameter view3: A view to layout. +/// - parameter replace: The `ConstraintGroup` whose constraints should be +/// replaced. +/// - parameter block: A block that declares the layout for the views. +/// +public func constrain(view1: View, _ view2: View, _ view3: View, replace group: ConstraintGroup = ConstraintGroup(), @noescape block: (LayoutProxy, LayoutProxy, LayoutProxy) -> ()) -> ConstraintGroup { + let context = Context() + block(LayoutProxy(context, view1), LayoutProxy(context, view2), LayoutProxy(context, view3)) + group.replaceConstraints(context.constraints) + + return group +} + +/// Updates the constraints of four views. +/// +/// - parameter view1: A view to layout. +/// - parameter view2: A view to layout. +/// - parameter view3: A view to layout. +/// - parameter view4: A view to layout. +/// - parameter replace: The `ConstraintGroup` whose constraints should be +/// replaced. +/// - parameter block: A block that declares the layout for the views. +/// +public func constrain(view1: View, _ view2: View, _ view3: View, _ view4: View, replace group: ConstraintGroup = ConstraintGroup(), @noescape block: (LayoutProxy, LayoutProxy, LayoutProxy, LayoutProxy) -> ()) -> ConstraintGroup { + let context = Context() + block(LayoutProxy(context, view1), LayoutProxy(context, view2), LayoutProxy(context, view3), LayoutProxy(context, view4)) + group.replaceConstraints(context.constraints) + + return group +} + +/// Updates the constraints of five views. +/// +/// - parameter view1: A view to layout. +/// - parameter view2: A view to layout. +/// - parameter view3: A view to layout. +/// - parameter view4: A view to layout. +/// - parameter view5: A view to layout. +/// - parameter replace: The `ConstraintGroup` whose constraints should be +/// replaced. +/// - parameter block: A block that declares the layout for the views. +/// +public func constrain(view1: View, _ view2: View, _ view3: View, _ view4: View, _ view5: View, replace group: ConstraintGroup = ConstraintGroup(), @noescape block: (LayoutProxy, LayoutProxy, LayoutProxy, LayoutProxy, LayoutProxy) -> ()) -> ConstraintGroup { + let context = Context() + block(LayoutProxy(context, view1), LayoutProxy(context, view2), LayoutProxy(context, view3), LayoutProxy(context, view4), LayoutProxy(context, view5)) + group.replaceConstraints(context.constraints) + + return group +} + +/// Updates the constraints of an array of views. +/// +/// - parameter views: The views to layout. +/// - parameter replace: The `ConstraintGroup` whose constraints should be +/// replaced. +/// - parameter block: A block that declares the layout for `views`. +/// +public func constrain(views: [View], replace group: ConstraintGroup = ConstraintGroup(), @noescape block: ([LayoutProxy]) -> ()) -> ConstraintGroup { + let context = Context() + block(views.map({ LayoutProxy(context, $0) })) + group.replaceConstraints(context.constraints) + + return group +} + +/// Updates the constraints of a dictionary of views. +/// +/// - parameter views: The views to layout. +/// - parameter replace: The `ConstraintGroup` whose constraints should be +/// replaced. +/// - parameter block: A block that declares the layout for `views`. +/// +public func constrain(views: [T: View], replace group: ConstraintGroup = ConstraintGroup(), @noescape block: ([T : LayoutProxy] -> ())) -> ConstraintGroup { + let context = Context() + let proxies = views.map { ($0, LayoutProxy(context, $1)) } + block(Dictionary(proxies)) + group.replaceConstraints(context.constraints) + + return group +} + +/// Removes all constraints for a group. +/// +/// - parameter clear: The `ConstraintGroup` whose constraints should be removed. +/// +public func constrain(clear group: ConstraintGroup) { + group.replaceConstraints([]) +} diff --git a/Pods/Cartography/Cartography/Constraint.swift b/Pods/Cartography/Cartography/Constraint.swift new file mode 100644 index 0000000..e713522 --- /dev/null +++ b/Pods/Cartography/Cartography/Constraint.swift @@ -0,0 +1,32 @@ +// +// Constraint.swift +// Cartography +// +// Created by Robert Böhnke on 06/10/14. +// Copyright (c) 2014 Robert Böhnke. All rights reserved. +// + +#if os(iOS) +import UIKit +#else +import AppKit +#endif + +internal class Constraint { + // Set to weak to avoid a retain cycle on the associated view. + weak var view: View? + let layoutConstraint: NSLayoutConstraint + + func install() { + view?.addConstraint(layoutConstraint) + } + + func uninstall() { + view?.removeConstraint(layoutConstraint) + } + + init(view: View, layoutConstraint: NSLayoutConstraint) { + self.view = view + self.layoutConstraint = layoutConstraint + } +} diff --git a/Pods/Cartography/Cartography/ConstraintGroup.swift b/Pods/Cartography/Cartography/ConstraintGroup.swift new file mode 100644 index 0000000..8872bd9 --- /dev/null +++ b/Pods/Cartography/Cartography/ConstraintGroup.swift @@ -0,0 +1,44 @@ +// +// ConstraintGroup.swift +// Cartography +// +// Created by Robert Böhnke on 22/01/15. +// Copyright (c) 2015 Robert Böhnke. All rights reserved. +// + +import Foundation + +public class ConstraintGroup { + private var constraints: [Constraint] = [] + + @available(OSX, introduced=10.10) + @available(iOS, introduced=8.0) + public var active: Bool { + get { + return constraints + .map { $0.layoutConstraint.active } + .reduce(true) { $0 && $1 } + } + set { + for constraint in constraints { + constraint.layoutConstraint.active = newValue + } + } + } + + public init() { + + } + + internal func replaceConstraints(constraints: [Constraint]) { + for constraint in self.constraints { + constraint.uninstall() + } + + self.constraints = constraints + + for constraint in self.constraints { + constraint.install() + } + } +} diff --git a/Pods/Cartography/Cartography/Context.swift b/Pods/Cartography/Cartography/Context.swift new file mode 100644 index 0000000..8f57632 --- /dev/null +++ b/Pods/Cartography/Cartography/Context.swift @@ -0,0 +1,53 @@ +// +// Context.swift +// Cartography +// +// Created by Robert Böhnke on 06/10/14. +// Copyright (c) 2014 Robert Böhnke. All rights reserved. +// + +#if os(iOS) +import UIKit +#else +import AppKit +#endif + +public class Context { + internal var constraints: [Constraint] = [] + + internal func addConstraint(from: Property, to: Property? = nil, coefficients: Coefficients = Coefficients(), relation: NSLayoutRelation = .Equal) -> NSLayoutConstraint { + from.view.car_translatesAutoresizingMaskIntoConstraints = false + + let layoutConstraint = NSLayoutConstraint(item: from.view, + attribute: from.attribute, + relatedBy: relation, + toItem: to?.view, + attribute: to?.attribute ?? .NotAnAttribute, + multiplier: CGFloat(coefficients.multiplier), + constant: CGFloat(coefficients.constant)) + + if let to = to { + if let common = closestCommonAncestor(from.view, b: to.view ) { + constraints.append(Constraint(view: common, layoutConstraint: layoutConstraint)) + } else { + fatalError("No common superview found between \(from.view) and \(to.view)") + } + } else { + constraints.append(Constraint(view: from.view, layoutConstraint: layoutConstraint)) + } + + return layoutConstraint + } + + internal func addConstraint(from: Compound, coefficients: [Coefficients]? = nil, to: Compound? = nil, relation: NSLayoutRelation = NSLayoutRelation.Equal) -> [NSLayoutConstraint] { + var results: [NSLayoutConstraint] = [] + + for i in 0.. NSLayoutConstraint) -> [NSLayoutConstraint] { + rest.last?.view.car_translatesAutoresizingMaskIntoConstraints = false + + return rest.reduce(([], first)) { (acc, current) -> Accumulator in + let (constraints, previous) = acc + + return (constraints + [ combine(previous, current) ], current) + }.0 +} + +/// Distributes multiple views horizontally. +/// +/// All views passed to this function will have +/// their `translatesAutoresizingMaskIntoConstraints` properties set to `false`. +/// +/// - parameter amount: The distance between the views. +/// - parameter views: The views to distribute. +/// +/// - returns: An array of `NSLayoutConstraint` instances. +/// +public func distribute(by amount: CGFloat, horizontally first: LayoutProxy, _ rest: LayoutProxy...) -> [NSLayoutConstraint] { + return reduce(first, rest: rest) { $0.trailing == $1.leading - amount } +} + +/// Distributes multiple views horizontally from left to right. +/// +/// All views passed to this function will have +/// their `translatesAutoresizingMaskIntoConstraints` properties set to `false`. +/// +/// - parameter amount: The distance between the views. +/// - parameter views: The views to distribute. +/// +/// - returns: An array of `NSLayoutConstraint` instances. +/// +public func distribute(by amount: CGFloat, leftToRight first: LayoutProxy, _ rest: LayoutProxy...) -> [NSLayoutConstraint] { + return reduce(first, rest: rest) { $0.right == $1.left - amount } +} + +/// Distributes multiple views vertically. +/// +/// All views passed to this function will have +/// their `translatesAutoresizingMaskIntoConstraints` properties set to `false`. +/// +/// - parameter amount: The distance between the views. +/// - parameter views: The views to distribute. +/// +/// - returns: An array of `NSLayoutConstraint` instances. +/// +public func distribute(by amount: CGFloat, vertically first: LayoutProxy, _ rest: LayoutProxy...) -> [NSLayoutConstraint] { + return reduce(first, rest: rest) { $0.bottom == $1.top - amount } +} diff --git a/Pods/Cartography/Cartography/Edge.swift b/Pods/Cartography/Cartography/Edge.swift new file mode 100644 index 0000000..f8c8153 --- /dev/null +++ b/Pods/Cartography/Cartography/Edge.swift @@ -0,0 +1,25 @@ +// +// Edge.swift +// Cartography +// +// Created by Robert Böhnke on 17/06/14. +// Copyright (c) 2014 Robert Böhnke. All rights reserved. +// + +#if os(iOS) +import UIKit +#else +import AppKit +#endif + +public struct Edge : Property, RelativeEquality, RelativeInequality, Addition, Multiplication { + public let attribute: NSLayoutAttribute + public let context: Context + public let view: View + + internal init(_ context: Context, _ view: View, _ attribute: NSLayoutAttribute) { + self.attribute = attribute + self.context = context + self.view = view + } +} diff --git a/Pods/Cartography/Cartography/Edges.swift b/Pods/Cartography/Cartography/Edges.swift new file mode 100644 index 0000000..b681519 --- /dev/null +++ b/Pods/Cartography/Cartography/Edges.swift @@ -0,0 +1,67 @@ +// +// Edges.swift +// Cartography +// +// Created by Robert Böhnke on 19/06/14. +// Copyright (c) 2014 Robert Böhnke. All rights reserved. +// + +#if os(iOS) +import UIKit +#else +import AppKit +#endif + +public struct Edges: Compound, RelativeCompoundEquality, RelativeCompoundInequality { + public let context: Context + public let properties: [Property] + + internal init(_ context: Context, _ properties: [Property]) { + self.context = context + self.properties = properties + } +} + +/// Insets all edges. +/// +/// - parameter edges: The edges to inset. +/// - parameter all: The amount by which to inset all edges, in points. +/// +/// - returns: A new expression with the inset edges. +/// +public func inset(edges: Edges, _ all: CGFloat) -> Expression { + return inset(edges, all, all, all, all) +} + +/// Insets the horizontal and vertical edges. +/// +/// - parameter edges: The edges to inset. +/// - parameter horizontal: The amount by which to inset the horizontal edges, in +/// points. +/// - parameter vertical: The amount by which to inset the vertical edges, in +/// points. +/// +/// - returns: A new expression with the inset edges. +/// +public func inset(edges: Edges, _ horizontal: CGFloat, _ vertical: CGFloat) -> Expression { + return inset(edges, vertical, horizontal, vertical, horizontal) +} + +/// Insets edges individually. +/// +/// - parameter edges: The edges to inset. +/// - parameter top: The amount by which to inset the top edge, in points. +/// - parameter leading: The amount by which to inset the leading edge, in points. +/// - parameter bottom: The amount by which to inset the bottom edge, in points. +/// - parameter trailing: The amount by which to inset the trailing edge, in points. +/// +/// - returns: A new expression with the inset edges. +/// +public func inset(edges: Edges, _ top: CGFloat, _ leading: CGFloat, _ bottom: CGFloat, _ trailing: CGFloat) -> Expression { + return Expression(edges, [ + Coefficients(1, top), + Coefficients(1, leading), + Coefficients(1, -bottom), + Coefficients(1, -trailing) + ]) +} diff --git a/Pods/Cartography/Cartography/Expression.swift b/Pods/Cartography/Cartography/Expression.swift new file mode 100644 index 0000000..3ac41d5 --- /dev/null +++ b/Pods/Cartography/Cartography/Expression.swift @@ -0,0 +1,21 @@ +// +// Expression.swift +// Cartography +// +// Created by Robert Böhnke on 17/06/14. +// Copyright (c) 2014 Robert Böhnke. All rights reserved. +// + +import Foundation + +public struct Expression { + let value: T + var coefficients: [Coefficients] + + init(_ value: T, _ coefficients: [Coefficients]) { + assert(coefficients.count > 0) + + self.value = value + self.coefficients = coefficients + } +} diff --git a/Pods/Cartography/Cartography/Extensions.swift b/Pods/Cartography/Cartography/Extensions.swift new file mode 100644 index 0000000..06ee2d9 --- /dev/null +++ b/Pods/Cartography/Cartography/Extensions.swift @@ -0,0 +1,23 @@ +// +// Extensions.swift +// Cartography +// +// Created by Robert Böhnke on 22/01/15. +// Copyright (c) 2015 Robert Böhnke. All rights reserved. +// + +#if os(iOS) +import UIKit +#else +import AppKit +#endif + +internal extension Dictionary { + init(_ pairs: [Element]) { + self.init() + + for (key, value) in pairs { + self[key] = value + } + } +} diff --git a/Pods/Cartography/Cartography/LayoutProxy.swift b/Pods/Cartography/Cartography/LayoutProxy.swift new file mode 100644 index 0000000..4c44e6f --- /dev/null +++ b/Pods/Cartography/Cartography/LayoutProxy.swift @@ -0,0 +1,191 @@ +// +// LayoutProxy.swift +// Cartography +// +// Created by Robert Böhnke on 17/06/14. +// Copyright (c) 2014 Robert Böhnke. All rights reserved. +// + +import Foundation + +public struct LayoutProxy { + /// The width of the view. + public var width: Dimension { + return Dimension(context, view, .Width) + } + + /// The height of the view. + public var height: Dimension { + return Dimension(context, view, .Height) + } + + /// The size of the view. This property affects both `width` and `height`. + public var size: Size { + return Size(context, [ + Dimension(context, view, .Width), + Dimension(context, view, .Height) + ]) + } + + /// The top edge of the view. + public var top: Edge { + return Edge(context, view, .Top) + } + + /// The right edge of the view. + public var right: Edge { + return Edge(context, view, .Right) + } + + /// The bottom edge of the view. + public var bottom: Edge { + return Edge(context, view, .Bottom) + } + + /// The left edge of the view. + public var left: Edge { + return Edge(context, view, .Left) + } + + /// All edges of the view. This property affects `top`, `bottom`, `leading` + /// and `trailing`. + public var edges: Edges { + return Edges(context, [ + Edge(context, view, .Top), + Edge(context, view, .Leading), + Edge(context, view, .Bottom), + Edge(context, view, .Trailing) + ]) + } + + /// The leading edge of the view. + public var leading: Edge { + return Edge(context, view, .Leading) + } + + /// The trailing edge of the view. + public var trailing: Edge { + return Edge(context, view, .Trailing) + } + + /// The horizontal center of the view. + public var centerX: Edge { + return Edge(context, view, .CenterX) + } + + /// The vertical center of the view. + public var centerY: Edge { + return Edge(context, view, .CenterY) + } + + /// The center point of the view. This property affects `centerX` and + /// `centerY`. + public var center: Point { + return Point(context, [ + Edge(context, view, .CenterX), + Edge(context, view, .CenterY) + ]) + } + + /// The baseline of the view. + public var baseline: Edge { + return Edge(context, view, .Baseline) + } + + #if os(iOS) + /// The first baseline of the view. iOS exclusive. + @available(iOS, introduced=8.0) + public var firstBaseline: Edge { + return Edge(context, view, .FirstBaseline) + } + + /// All edges of the view with their respective margins. This property + /// affects `topMargin`, `bottomMargin`, `leadingMargin` and + /// `trailingMargin`. + @available(iOS, introduced=8.0) + public var edgesWithinMargins: Edges { + return Edges(context, [ + Edge(context, view, .TopMargin), + Edge(context, view, .LeadingMargin), + Edge(context, view, .BottomMargin), + Edge(context, view, .TrailingMargin) + ]) + } + + /// The left margin of the view. iOS exclusive. + @available(iOS, introduced=8.0) + public var leftMargin: Edge { + return Edge(context, view, .LeftMargin) + } + + /// The right margin of the view. iOS exclusive. + @available(iOS, introduced=8.0) + public var rightMargin: Edge { + return Edge(context, view, .RightMargin) + } + + /// The top margin of the view. iOS exclusive. + @available(iOS, introduced=8.0) + public var topMargin: Edge { + return Edge(context, view, .TopMargin) + } + + /// The bottom margin of the view. iOS exclusive. + @available(iOS, introduced=8.0) + public var bottomMargin: Edge { + return Edge(context, view, .BottomMargin) + } + + /// The leading margin of the view. iOS exclusive. + @available(iOS, introduced=8.0) + public var leadingMargin: Edge { + return Edge(context, view, .LeadingMargin) + } + + /// The trailing margin of the view. iOS exclusive. + @available(iOS, introduced=8.0) + public var trailingMargin: Edge { + return Edge(context, view, .TrailingMargin) + } + + /// The horizontal center within the margins of the view. iOS exclusive. + @available(iOS, introduced=8.0) + public var centerXWithinMargins: Edge { + return Edge(context, view, .CenterXWithinMargins) + } + + /// The vertical center within the margins of the view. iOS exclusive. + @available(iOS, introduced=8.0) + public var centerYWithinMargins: Edge { + return Edge(context, view, .CenterYWithinMargins) + } + + /// The center point within the margins of the view. This property affects + /// `centerXWithinMargins` and `centerYWithinMargins`. iOS exclusive. + @available(iOS, introduced=8.0) + public var centerWithinMargins: Point { + return Point(context, [ + Edge(context, view, .CenterXWithinMargins), + Edge(context, view, .CenterYWithinMargins) + ]) + } + #endif + + internal let context: Context + + internal let view: View + + /// The superview of the view, if it exists. + public var superview: LayoutProxy? { + if let superview = view.superview { + return LayoutProxy(context, superview) + } else { + return nil + } + } + + init(_ context: Context, _ view: View) { + self.context = context + self.view = view + } +} diff --git a/Pods/Cartography/Cartography/Point.swift b/Pods/Cartography/Cartography/Point.swift new file mode 100644 index 0000000..1cd3c51 --- /dev/null +++ b/Pods/Cartography/Cartography/Point.swift @@ -0,0 +1,23 @@ +// +// Point.swift +// Cartography +// +// Created by Robert Böhnke on 18/06/14. +// Copyright (c) 2014 Robert Böhnke. All rights reserved. +// + +#if os(iOS) +import UIKit +#else +import AppKit +#endif + +public struct Point: Compound, RelativeCompoundEquality, RelativeCompoundInequality { + public let context: Context + public let properties: [Property] + + internal init(_ context: Context, _ properties: [Property]) { + self.context = context + self.properties = properties + } +} diff --git a/Pods/Cartography/Cartography/Priority.swift b/Pods/Cartography/Cartography/Priority.swift new file mode 100644 index 0000000..14a7d25 --- /dev/null +++ b/Pods/Cartography/Cartography/Priority.swift @@ -0,0 +1,45 @@ +// +// Priority.swift +// Cartography +// +// Created by Robert Böhnke on 18/06/14. +// Copyright (c) 2014 Robert Böhnke. All rights reserved. +// + +#if os(iOS) +import UIKit + +public typealias LayoutPriority = UILayoutPriority +#else +import AppKit + +public typealias LayoutPriority = NSLayoutPriority +#endif + +infix operator ~ { } + +/// Sets the priority for a constraint. +/// +/// - parameter lhs: The constraint to update. +/// - parameter rhs: The new priority. +/// +/// - returns: The same constraint with its priority updated. +/// +public func ~ (lhs: NSLayoutConstraint, rhs: LayoutPriority) -> NSLayoutConstraint { + lhs.priority = rhs + + return lhs +} + +/// Sets the priority for multiple constraints. +/// +/// - parameter lhs: An array of `NSLayoutConstraint` instances. +/// - parameter rhs: The new priority. +/// +/// - returns: The same constraints with their priorities updated. +/// +public func ~ (lhs: [NSLayoutConstraint], rhs: LayoutPriority) -> [NSLayoutConstraint] { + return lhs.map { + $0 ~ rhs + } +} diff --git a/Pods/Cartography/Cartography/Property.swift b/Pods/Cartography/Cartography/Property.swift new file mode 100644 index 0000000..dda5be7 --- /dev/null +++ b/Pods/Cartography/Cartography/Property.swift @@ -0,0 +1,209 @@ +// +// Property.swift +// Cartography +// +// Created by Robert Böhnke on 17/06/14. +// Copyright (c) 2014 Robert Böhnke. All rights reserved. +// + +#if os(iOS) +import UIKit +#else +import AppKit +#endif + +public protocol Property { + var attribute: NSLayoutAttribute { get } + var context: Context { get } + var view: View { get } +} + +// MARK: Equality + +/// Properties conforming to this protocol can use the `==` operator with +/// numerical constants. +public protocol NumericalEquality : Property { } + +/// Declares a property equal to a numerical constant. +/// +/// - parameter lhs: The affected property. The associated view will have +/// `translatesAutoresizingMaskIntoConstraints` set to `false`. +/// - parameter rhs: The numerical constant. +/// +/// - returns: An `NSLayoutConstraint`. +/// +public func == (lhs: NumericalEquality, rhs: CGFloat) -> NSLayoutConstraint { + return lhs.context.addConstraint(lhs, coefficients: Coefficients(1, rhs)) +} + +/// Properties conforming to this protocol can use the `==` operator with other +/// properties of the same type. +public protocol RelativeEquality : Property { } + +/// Declares a property equal to a the result of an expression. +/// +/// - parameter lhs: The affected property. The associated view will have +/// `translatesAutoresizingMaskIntoConstraints` set to `false`. +/// - parameter rhs: The expression. +/// +/// - returns: An `NSLayoutConstraint`. +/// +public func == (lhs: P, rhs: Expression

) -> NSLayoutConstraint { + return lhs.context.addConstraint(lhs, coefficients: rhs.coefficients[0], to: rhs.value) +} + +/// Declares a property equal to another property. +/// +/// - parameter lhs: The affected property. The associated view will have +/// `translatesAutoresizingMaskIntoConstraints` set to `false`. +/// - parameter rhs: The other property. +/// +public func == (lhs: P, rhs: P) -> NSLayoutConstraint { + return lhs.context.addConstraint(lhs, to: rhs) +} + +// MARK: Inequality + +/// Properties conforming to this protocol can use the `<=` and `>=` operators +/// with numerical constants. +public protocol NumericalInequality : Property { } + +/// Declares a property less than or equal to a numerical constant. +/// +/// - parameter lhs: The affected property. The associated view will have +/// `translatesAutoresizingMaskIntoConstraints` set to `false`. +/// - parameter rhs: The numerical constant. +/// +/// - returns: An `NSLayoutConstraint`. +/// +public func <= (lhs: NumericalInequality, rhs: CGFloat) -> NSLayoutConstraint { + return lhs.context.addConstraint(lhs, coefficients: Coefficients(1, rhs), relation: NSLayoutRelation.LessThanOrEqual) +} + +/// Declares a property greater than or equal to a numerical constant. +/// +/// - parameter lhs: The affected property. The associated view will have +/// `translatesAutoresizingMaskIntoConstraints` set to `false`. +/// - parameter rhs: The numerical constant. +/// +/// - returns: An `NSLayoutConstraint`. +/// +public func >= (lhs: NumericalInequality, rhs: CGFloat) -> NSLayoutConstraint { + return lhs.context.addConstraint(lhs, coefficients: Coefficients(1, rhs), relation: NSLayoutRelation.GreaterThanOrEqual) +} + +/// Properties conforming to this protocol can use the `<=` and `>=` operators +/// with other properties of the same type. +public protocol RelativeInequality : Property { } + +/// Declares a property less than or equal to another property. +/// +/// - parameter lhs: The affected property. The associated view will have +/// `translatesAutoresizingMaskIntoConstraints` set to `false`. +/// - parameter rhs: The other property. +/// +/// - returns: An `NSLayoutConstraint`. +/// +public func <= (lhs: P, rhs: P) -> NSLayoutConstraint { + return lhs.context.addConstraint(lhs, to: rhs, relation: NSLayoutRelation.LessThanOrEqual) +} + +/// Declares a property greater than or equal to another property. +/// +/// - parameter lhs: The affected property. The associated view will have +/// `translatesAutoresizingMaskIntoConstraints` set to `false`. +/// - parameter rhs: The other property. +/// +/// - returns: An `NSLayoutConstraint`. +/// +public func >= (lhs: P, rhs: P) -> NSLayoutConstraint { + return lhs.context.addConstraint(lhs, to: rhs, relation: NSLayoutRelation.GreaterThanOrEqual) +} + +/// Declares a property less than or equal to the result of an expression. +/// +/// - parameter lhs: The affected property. The associated view will have +/// `translatesAutoresizingMaskIntoConstraints` set to `false`. +/// - parameter rhs: The other property. +/// +/// - returns: An `NSLayoutConstraint`. +/// +public func <= (lhs: P, rhs: Expression

) -> NSLayoutConstraint { + return lhs.context.addConstraint(lhs, coefficients: rhs.coefficients[0], to: rhs.value, relation: NSLayoutRelation.LessThanOrEqual) +} + +/// Declares a property greater than or equal to the result of an expression. +/// +/// - parameter lhs: The affected property. The associated view will have +/// `translatesAutoresizingMaskIntoConstraints` set to `false`. +/// - parameter rhs: The other property. +/// +/// - returns: An `NSLayoutConstraint`. +/// +public func >= (lhs: P, rhs: Expression

) -> NSLayoutConstraint { + return lhs.context.addConstraint(lhs, coefficients: rhs.coefficients[0], to: rhs.value, relation: NSLayoutRelation.GreaterThanOrEqual) +} + +// Mark: Addition + +public protocol Addition : Property { } + +public func + (c: CGFloat, rhs: P) -> Expression

{ + return Expression(rhs, [ Coefficients(1, c) ]) +} + +public func + (lhs: P, rhs: CGFloat) -> Expression

{ + return rhs + lhs +} + +public func + (c: CGFloat, rhs: Expression

) -> Expression

{ + return Expression(rhs.value, rhs.coefficients.map { $0 + c }) +} + +public func + (lhs: Expression

, rhs: CGFloat) -> Expression

{ + return rhs + lhs +} + +public func - (c: CGFloat, rhs: P) -> Expression

{ + return Expression(rhs, [ Coefficients(1, -c) ]) +} + +public func - (lhs: P, rhs: CGFloat) -> Expression

{ + return rhs - lhs +} + +public func - (c: CGFloat, rhs: Expression

) -> Expression

{ + return Expression(rhs.value, rhs.coefficients.map { $0 - c}) +} + +public func - (lhs: Expression

, rhs: CGFloat) -> Expression

{ + return rhs - lhs +} + +// MARK: Multiplication + +public protocol Multiplication : Property { } + +public func * (m: CGFloat, rhs: Expression

) -> Expression

{ + return Expression(rhs.value, rhs.coefficients.map { $0 * m }) +} + +public func * (lhs: Expression

, rhs: CGFloat) -> Expression

{ + return rhs * lhs +} + +public func * (m: CGFloat, rhs: P) -> Expression

{ + return Expression(rhs, [ Coefficients(m, 0) ]) +} + +public func * (lhs: P, rhs: CGFloat) -> Expression

{ + return rhs * lhs +} + +public func / (lhs: Expression

, rhs: CGFloat) -> Expression

{ + return lhs * (1 / rhs) +} + +public func / (lhs: P, rhs: CGFloat) -> Expression

{ + return lhs * (1 / rhs) +} diff --git a/Pods/Cartography/Cartography/Size.swift b/Pods/Cartography/Cartography/Size.swift new file mode 100644 index 0000000..db0c6c4 --- /dev/null +++ b/Pods/Cartography/Cartography/Size.swift @@ -0,0 +1,51 @@ +// +// Size.swift +// Cartography +// +// Created by Robert Böhnke on 18/06/14. +// Copyright (c) 2014 Robert Böhnke. All rights reserved. +// + +#if os(iOS) +import UIKit +#else +import AppKit +#endif + +public struct Size : Compound, RelativeCompoundEquality, RelativeCompoundInequality { + public let context: Context + public let properties: [Property] + + internal init(_ context: Context, _ properties: [Property]) { + self.context = context + self.properties = properties + } +} + +// MARK: Multiplication + +public func * (m: CGFloat, rhs: Expression) -> Expression { + return Expression(rhs.value, rhs.coefficients.map { $0 * m }) +} + +public func * (lhs: Expression, rhs: CGFloat) -> Expression { + return rhs * lhs +} + +public func * (m: CGFloat, rhs: Size) -> Expression { + return Expression(rhs, [ Coefficients(m, 0), Coefficients(m, 0) ]) +} + +public func * (lhs: Size, rhs: CGFloat) -> Expression { + return rhs * lhs +} + +// MARK: Division + +public func / (lhs: Expression, rhs: CGFloat) -> Expression { + return lhs * (1 / rhs) +} + +public func / (lhs: Size, rhs: CGFloat) -> Expression { + return lhs * (1 / rhs) +} diff --git a/Pods/Cartography/Cartography/View.swift b/Pods/Cartography/Cartography/View.swift new file mode 100644 index 0000000..6d9d1c8 --- /dev/null +++ b/Pods/Cartography/Cartography/View.swift @@ -0,0 +1,31 @@ +// +// View.swift +// Cartography +// +// Created by Robert Böhnke on 26/06/14. +// Copyright (c) 2014 Robert Böhnke. All rights reserved. +// + +import Foundation + +#if os(iOS) + import UIKit + public typealias View = UIView + + extension View { + public var car_translatesAutoresizingMaskIntoConstraints: Bool { + get { return translatesAutoresizingMaskIntoConstraints } + set { translatesAutoresizingMaskIntoConstraints = newValue } + } + } +#else + import AppKit + public typealias View = NSView + + extension View { + public var car_translatesAutoresizingMaskIntoConstraints: Bool { + get { return translatesAutoresizingMaskIntoConstraints } + set { translatesAutoresizingMaskIntoConstraints = newValue } + } + } +#endif diff --git a/Pods/Cartography/Cartography/ViewUtils.swift b/Pods/Cartography/Cartography/ViewUtils.swift new file mode 100644 index 0000000..3f8c3de --- /dev/null +++ b/Pods/Cartography/Cartography/ViewUtils.swift @@ -0,0 +1,46 @@ +// +// ViewUtils.swift +// Cartography +// +// Created by Garth Snyder on 11/23/14. +// Copyright (c) 2014 Robert Böhnke. All rights reserved. +// + +#if os(iOS) +import UIKit +#else +import AppKit +#endif + +internal func closestCommonAncestor(a: View, b: View) -> View? { + let (aSuper, bSuper) = (a.superview, b.superview) + + if a === b { return a } + + if a === bSuper { return a } + + if b === aSuper { return b } + + if aSuper === bSuper { return aSuper } + + let ancestorsOfA = Set(ancestors(a)) + + for ancestor in ancestors(b) { + if ancestorsOfA.contains(ancestor) { + return ancestor + } + } + + return .None +} + +private func ancestors(v: View) -> AnySequence { + return AnySequence { () -> AnyGenerator in + var view: View? = v + return anyGenerator { + let current = view + view = view?.superview + return current + } + } +} diff --git a/Pods/Cartography/LICENSE b/Pods/Cartography/LICENSE new file mode 100644 index 0000000..5fababa --- /dev/null +++ b/Pods/Cartography/LICENSE @@ -0,0 +1,44 @@ +Copyright (c) 2014 Robert Böhnke + +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. + +This license does not apply to the contents of the images folder. + +--- + +This project uses portions of code from FLKAutoLayout, +copyright (c) 2013 Florian Kugler + +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/Pods/Cartography/README.md b/Pods/Cartography/README.md new file mode 100644 index 0000000..5d43f9e --- /dev/null +++ b/Pods/Cartography/README.md @@ -0,0 +1,244 @@ +# Cartography :iphone::triangular_ruler: + + + + + + + + + +Using Cartography, you can set up your Layout constraints in declarative code and without any stringly typing! + +In short, it allows you to replace this: + + + +```Swift +addConstraint(NSLayoutConstraint( + item: button1, + attribute: .Right, + relatedBy: .Equal, + toItem: button2, + attribute: .Left, + multiplier: 1.0, + constant: -12.0 +)) +``` + +with this + +```Swift +constrain(button1, button2) { button1, button2 in + button1.right == button2.left - 12 +} +``` + +If you end up using Cartography in production, I'd love to hear from you. You can reach me through [Twitter] or [email]. + +## Usage + +Call the `constrain` function with your `UIView` or `NSView` instances as well +as a closure in which you declare the constraints between the different +attributes of your views: + +```swift +constrain(view1, view2) { view1, view2 in + view1.width == (view1.superview!.width - 50) * 0.5 + view2.width == view1.width - 50 + view1.height == 40 + view2.height == view1.height + view1.centerX == view1.superview!.centerX + view2.centerX == view1.centerX + + view1.top >= view1.superview!.top + 20 + view2.top == view1.bottom + 20 +} +``` + + + +For every view on the left hand side of an equality or inequality operator, +Cartography will automatically set its +`translatesAutoresizingMaskIntoConstraints` property to `false`. + +If the view is +not controlled by you–for example _if it belongs to a Apple-provided +`UIViewController` class_–you should take appropriate care when declaring its +constraints. + +

+ +## Replacing constraints + +You can capture multiple constraints in a group to then replace them with new +constraints at a later point. + +```swift +constrain(view) { view in + view.width == 100 + view.height == 100 +} + +let group = ConstraintGroup() + +// Attach `view` to the top left corner of its superview +constrain(view, replace: group) { view in + view.top == view.superview!.top + view.left == view.superview!.left +} + +/* Later */ + +// Move the view to the bottom right corner of its superview +constrain(view, replace: group) { view in + view.bottom == view.superview!.bottom + view.right == view.superview!.right +} + +UIView.animateWithDuration(0.5, animations: view.layoutIfNeeded) +``` + +For convenience, the `constrain` functions also returns `ConstraintGroup` +instances: + +```swift +let group = constrain(button) { button in + button.width == 100 + button.height == 400 +} +``` + +## Supported attributes + + +Cartography supports all built-in attributes as of iOS 8 and OS X 10.9, those are: + + + +- `width` +- `height` +- `top` +- `right` +- `bottom` +- `left` +- `leading` +- `trailing` +- `centerX` +- `centerY` +- `baseline` + +as well as the iOS specific + +- `firstBaseline` +- `leftMargin` +- `rightMargin` +- `topMargin` +- `bottomMargin` +- `leadingMargin` +- `trailingMargin` +- `centerXWithinMargins` +- `centerYWithinMargins` +- `edgesWithinMargins` + +These can be further refined using the following operators: `*`, `/`, `+` and +`-`. + +Additionally, it supports convenient compound attributes that allow you to +assign multiple attributes at once: + +```swift +constrain(view) { view in + view.size == view.superview!.size / 2 + view.center == view.superview!.center +} +``` + +```swift +constrain(view) { view in + view.edges == inset(view.superview!.edges, 20, 20, 40, 20) +} +``` + +### Aligning multiple view + +If you need to align multiple views by a common edge, you can use the `align` +functions: + +```swift +constrain(view1, view2, view3) { view1, view2, view3 in + align(top: view1, view2, view3) +} +``` + +Which is equivalent to `view1.top == view2.top; view2.top == view3.top`. Similar +variants exist for `top`, `right` `bottom`, `left`, `leading`, `trailing`, +`centerX`, `centerY` and `baseline`. + +### Distributing views evenly + +For distributing multiple views, either horizontally or vertically, you can use +the `distribute` functions: + +```swift +constrain(view1, view2, view3) { view1, view2, view3 in + distribute(by: 10, horizontally: view1, view2, view3) +} +``` + +Which is equivalent to `view1.trailing == view2.leading - 10; view2.trailing == view3.leading - 10`. + +## Setting priorities + +You can set the priorities of your constraints using the `~` operator: + +```swift +constrain(view) { view in + view.width >= 200 ~ 100 + view.height >= 200 ~ 100 +} +``` + +## Capturing constraints + +Since the `==`, `>=`, `<=` and `~` emit `NSLayoutConstraint` instances, you can +capture their results if you need to refer to the layout constraints at a later +time: + +```swift +var width: NSLayoutConstraint? + +constrain(view) { view in + width = (view.width == 200 ~ 100) +} +``` + +Note that declaring compound attributes returns multiple constraints at once: + +```swift +var constraints: [NSLayoutConstraint]? + +constrain(view) { view in + constraints = (view.size == view.superview!.size ~ 100) +} +``` + +## Documentation + +Read the documentation [here](http://robb.github.io/Cartography/). For more information, see the [gh-pages](https://github.com/robb/Cartography/tree/gh-pages) branch. + +## Support + +Please, don't hesitate to [file an +issue](https://github.com/robb/Cartography/issues/new) if you have questions. + +## About Cartography + +Cartography was built by [Robb Böhnke][me] and was inspired by the excellent +[FLKAutoLayout] by [Florian Kugler][florian]. + +[flkautolayout]: https://github.com/floriankugler/FLKAutoLayout +[florian]: https://github.com/floriankugler +[me]: http://robb.is +[twitter]: https://twitter.com/ceterum_censeo +[email]: mailto:robb@robb.is diff --git a/Pods/Crashlytics/Crashlytics.framework/Crashlytics b/Pods/Crashlytics/Crashlytics.framework/Crashlytics new file mode 100755 index 0000000..408ba2a Binary files /dev/null and b/Pods/Crashlytics/Crashlytics.framework/Crashlytics differ diff --git a/Pods/Crashlytics/Crashlytics.framework/Headers/ANSCompatibility.h b/Pods/Crashlytics/Crashlytics.framework/Headers/ANSCompatibility.h new file mode 100644 index 0000000..6ec011d --- /dev/null +++ b/Pods/Crashlytics/Crashlytics.framework/Headers/ANSCompatibility.h @@ -0,0 +1,31 @@ +// +// ANSCompatibility.h +// AnswersKit +// +// Copyright (c) 2015 Crashlytics, Inc. All rights reserved. +// + +#pragma once + +#if !__has_feature(nullability) +#define nonnull +#define nullable +#define _Nullable +#define _Nonnull +#endif + +#ifndef NS_ASSUME_NONNULL_BEGIN +#define NS_ASSUME_NONNULL_BEGIN +#endif + +#ifndef NS_ASSUME_NONNULL_END +#define NS_ASSUME_NONNULL_END +#endif + +#if __has_feature(objc_generics) +#define ANS_GENERIC_NSARRAY(type) NSArray +#define ANS_GENERIC_NSDICTIONARY(key_type,object_key) NSDictionary +#else +#define ANS_GENERIC_NSARRAY(type) NSArray +#define ANS_GENERIC_NSDICTIONARY(key_type,object_key) NSDictionary +#endif diff --git a/Pods/Crashlytics/Crashlytics.framework/Headers/Answers.h b/Pods/Crashlytics/Crashlytics.framework/Headers/Answers.h new file mode 100644 index 0000000..7e50991 --- /dev/null +++ b/Pods/Crashlytics/Crashlytics.framework/Headers/Answers.h @@ -0,0 +1,210 @@ +// +// Answers.h +// Crashlytics +// +// Copyright (c) 2015 Crashlytics, Inc. All rights reserved. +// + +#import +#import "ANSCompatibility.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + * This class exposes the Answers Events API, allowing you to track key + * user user actions and metrics in your app. + */ +@interface Answers : NSObject + +/** + * Log a Sign Up event to see users signing up for your app in real-time, understand how + * many users are signing up with different methods and their success rate signing up. + * + * @param signUpMethodOrNil The method by which a user logged in, e.g. Twitter or Digits. + * @param signUpSucceededOrNil The ultimate success or failure of the login + * @param customAttributesOrNil A dictionary of custom attributes to associate with this purchase. + */ ++ (void)logSignUpWithMethod:(nullable NSString *)signUpMethodOrNil + success:(nullable NSNumber *)signUpSucceededOrNil + customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil; + +/** + * Log an Log In event to see users logging into your app in real-time, understand how many + * users are logging in with different methods and their success rate logging into your app. + * + * @param loginMethodOrNil The method by which a user logged in, e.g. email, Twitter or Digits. + * @param loginSucceededOrNil The ultimate success or failure of the login + * @param customAttributesOrNil A dictionary of custom attributes to associate with this purchase. + */ ++ (void)logLoginWithMethod:(nullable NSString *)loginMethodOrNil + success:(nullable NSNumber *)loginSucceededOrNil + customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil; + +/** + * Log a Share event to see users sharing from your app in real-time, letting you + * understand what content they're sharing from the type or genre down to the specific id. + * + * @param shareMethodOrNil The method by which a user shared, e.g. email, Twitter, SMS. + * @param contentNameOrNil The human readable name for this piece of content. + * @param contentTypeOrNil The type of content shared. + * @param contentIdOrNil The unique identifier for this piece of content. Useful for finding the top shared item. + * @param customAttributesOrNil A dictionary of custom attributes to associate with this event. + */ ++ (void)logShareWithMethod:(nullable NSString *)shareMethodOrNil + contentName:(nullable NSString *)contentNameOrNil + contentType:(nullable NSString *)contentTypeOrNil + contentId:(nullable NSString *)contentIdOrNil + customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil; + +/** + * Log an Invite Event to track how users are inviting other users into + * your application. + * + * @param inviteMethodOrNil The method of invitation, e.g. GameCenter, Twitter, email. + * @param customAttributesOrNil A dictionary of custom attributes to associate with this purchase. + */ ++ (void)logInviteWithMethod:(nullable NSString *)inviteMethodOrNil + customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil; + +/** + * Log a Purchase event to see your revenue in real-time, understand how many users are making purchases, see which + * items are most popular, and track plenty of other important purchase-related metrics. + * + * @param itemPriceOrNil The purchased item's price. + * @param currencyOrNil The ISO4217 currency code. Example: USD + * @param purchaseSucceededOrNil Was the purchase succesful or unsuccesful + * @param itemNameOrNil The human-readable form of the item's name. Example: + * @param itemIdOrNil The machine-readable, unique item identifier Example: SKU + * @param itemTypeOrNil The type, or genre of the item. Example: Song + * @param customAttributesOrNil A dictionary of custom attributes to associate with this purchase. + */ ++ (void)logPurchaseWithPrice:(nullable NSDecimalNumber *)itemPriceOrNil + currency:(nullable NSString *)currencyOrNil + success:(nullable NSNumber *)purchaseSucceededOrNil + itemName:(nullable NSString *)itemNameOrNil + itemType:(nullable NSString *)itemTypeOrNil + itemId:(nullable NSString *)itemIdOrNil + customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil; + +/** + * Log a Level Start Event to track where users are in your game. + * + * @param levelNameOrNil The level name + * @param customAttributesOrNil A dictionary of custom attributes to associate with this level start event. + */ ++ (void)logLevelStart:(nullable NSString *)levelNameOrNil + customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil; + +/** + * Log a Level End event to track how users are completing levels in your game. + * + * @param levelNameOrNil The name of the level completed, E.G. "1" or "Training" + * @param scoreOrNil The score the user completed the level with. + * @param levelCompletedSuccesfullyOrNil A boolean representing whether or not the level was completed succesfully. + * @param customAttributesOrNil A dictionary of custom attributes to associate with this purchase. + */ ++ (void)logLevelEnd:(nullable NSString *)levelNameOrNil + score:(nullable NSNumber *)scoreOrNil + success:(nullable NSNumber *)levelCompletedSuccesfullyOrNil + customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil; + +/** + * Log an Add to Cart event to see users adding items to a shopping cart in real-time, understand how + * many users start the purchase flow, see which items are most popular, and track plenty of other important + * purchase-related metrics. + * + * @param itemPriceOrNil The purchased item's price. + * @param currencyOrNil The ISO4217 currency code. Example: USD + * @param itemNameOrNil The human-readable form of the item's name. Example: + * @param itemTypeOrNil The type, or genre of the item. Example: Song + * @param itemIdOrNil The machine-readable, unique item identifier Example: SKU + * @param customAttributesOrNil A dictionary of custom attributes to associate with this purchase. + */ ++ (void)logAddToCartWithPrice:(nullable NSDecimalNumber *)itemPriceOrNil + currency:(nullable NSString *)currencyOrNil + itemName:(nullable NSString *)itemNameOrNil + itemType:(nullable NSString *)itemTypeOrNil + itemId:(nullable NSString *)itemIdOrNil + customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil; + +/** + * Log a Start Checkout event to see users moving through the purchase funnel in real-time, understand how many + * users are doing this and how much they're spending per checkout, and see how it related to other important + * purchase-related metrics. + * + * @param totalPriceOrNil The total price of the cart. + * @param currencyOrNil The ISO4217 currency code. Example: USD + * @param itemCountOrNil The number of items in the cart. + * @param customAttributesOrNil A dictionary of custom attributes to associate with this purchase. + */ ++ (void)logStartCheckoutWithPrice:(nullable NSDecimalNumber *)totalPriceOrNil + currency:(nullable NSString *)currencyOrNil + itemCount:(nullable NSNumber *)itemCountOrNil + customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil; + +/** + * Log a Rating event to see users rating content within your app in real-time and understand what + * content is most engaging, from the type or genre down to the specific id. + * + * @param ratingOrNil The integer rating given by the user. + * @param contentNameOrNil The human readable name for this piece of content. + * @param contentTypeOrNil The type of content shared. + * @param contentIdOrNil The unique identifier for this piece of content. Useful for finding the top shared item. + * @param customAttributesOrNil A dictionary of custom attributes to associate with this event. + */ ++ (void)logRating:(nullable NSNumber *)ratingOrNil + contentName:(nullable NSString *)contentNameOrNil + contentType:(nullable NSString *)contentTypeOrNil + contentId:(nullable NSString *)contentIdOrNil + customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil; + +/** + * Log a Content View event to see users viewing content within your app in real-time and + * understand what content is most engaging, from the type or genre down to the specific id. + * + * @param contentNameOrNil The human readable name for this piece of content. + * @param contentTypeOrNil The type of content shared. + * @param contentIdOrNil The unique identifier for this piece of content. Useful for finding the top shared item. + * @param customAttributesOrNil A dictionary of custom attributes to associate with this event. + */ ++ (void)logContentViewWithName:(nullable NSString *)contentNameOrNil + contentType:(nullable NSString *)contentTypeOrNil + contentId:(nullable NSString *)contentIdOrNil + customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil; + +/** + * Log a Search event allows you to see users searching within your app in real-time and understand + * exactly what they're searching for. + * + * @param queryOrNil The user's query. + * @param customAttributesOrNil A dictionary of custom attributes to associate with this event. + */ ++ (void)logSearchWithQuery:(nullable NSString *)queryOrNil + customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil; + +/** + * Log a Custom Event to see user actions that are uniquely important for your app in real-time, to see how often + * they're performing these actions with breakdowns by different categories you add. Use a human-readable name for + * the name of the event, since this is how the event will appear in Answers. + * + * @param eventName The human-readable name for the event. + * @param customAttributesOrNil A dictionary of custom attributes to associate with this purchase. Attribute keys + * must be NSString and and values must be NSNumber or NSString. + * @discussion How we treat NSNumbers: + * We will provide information about the distribution of values over time. + * + * How we treat NSStrings: + * NSStrings are used as categorical data, allowing comparison across different category values. + * Strings are limited to a maximum length of 100 characters, attributes over this length will be + * truncated. + * + * When tracking the Tweet views to better understand user engagement, sending the tweet's length + * and the type of media present in the tweet allows you to track how tweet length and the type of media influence + * engagement. + */ ++ (void)logCustomEventWithName:(NSString *)eventName + customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/Crashlytics/Crashlytics.framework/Headers/CLSAttributes.h b/Pods/Crashlytics/Crashlytics.framework/Headers/CLSAttributes.h new file mode 100644 index 0000000..1526b0d --- /dev/null +++ b/Pods/Crashlytics/Crashlytics.framework/Headers/CLSAttributes.h @@ -0,0 +1,33 @@ +// +// CLSAttributes.h +// Crashlytics +// +// Copyright (c) 2015 Crashlytics, Inc. All rights reserved. +// + +#pragma once + +#define CLS_DEPRECATED(x) __attribute__ ((deprecated(x))) + +#if !__has_feature(nullability) + #define nonnull + #define nullable + #define _Nullable + #define _Nonnull +#endif + +#ifndef NS_ASSUME_NONNULL_BEGIN + #define NS_ASSUME_NONNULL_BEGIN +#endif + +#ifndef NS_ASSUME_NONNULL_END + #define NS_ASSUME_NONNULL_END +#endif + +#if __has_feature(objc_generics) + #define CLS_GENERIC_NSARRAY(type) NSArray + #define CLS_GENERIC_NSDICTIONARY(key_type,object_key) NSDictionary +#else + #define CLS_GENERIC_NSARRAY(type) NSArray + #define CLS_GENERIC_NSDICTIONARY(key_type,object_key) NSDictionary +#endif diff --git a/Pods/Crashlytics/Crashlytics.framework/Headers/CLSLogging.h b/Pods/Crashlytics/Crashlytics.framework/Headers/CLSLogging.h new file mode 100644 index 0000000..59590d5 --- /dev/null +++ b/Pods/Crashlytics/Crashlytics.framework/Headers/CLSLogging.h @@ -0,0 +1,64 @@ +// +// CLSLogging.h +// Crashlytics +// +// Copyright (c) 2015 Crashlytics, Inc. All rights reserved. +// +#ifdef __OBJC__ +#import "CLSAttributes.h" +#import + +NS_ASSUME_NONNULL_BEGIN +#endif + + + +/** + * + * The CLS_LOG macro provides as easy way to gather more information in your log messages that are + * sent with your crash data. CLS_LOG prepends your custom log message with the function name and + * line number where the macro was used. If your app was built with the DEBUG preprocessor macro + * defined CLS_LOG uses the CLSNSLog function which forwards your log message to NSLog and CLSLog. + * If the DEBUG preprocessor macro is not defined CLS_LOG uses CLSLog only. + * + * Example output: + * -[AppDelegate login:] line 134 $ login start + * + * If you would like to change this macro, create a new header file, unset our define and then define + * your own version. Make sure this new header file is imported after the Crashlytics header file. + * + * #undef CLS_LOG + * #define CLS_LOG(__FORMAT__, ...) CLSNSLog... + * + **/ +#ifdef __OBJC__ +#ifdef DEBUG +#define CLS_LOG(__FORMAT__, ...) CLSNSLog((@"%s line %d $ " __FORMAT__), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__) +#else +#define CLS_LOG(__FORMAT__, ...) CLSLog((@"%s line %d $ " __FORMAT__), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__) +#endif +#endif + +/** + * + * Add logging that will be sent with your crash data. This logging will not show up in the system.log + * and will only be visible in your Crashlytics dashboard. + * + **/ + +#ifdef __OBJC__ +OBJC_EXTERN void CLSLog(NSString *format, ...) NS_FORMAT_FUNCTION(1,2); +OBJC_EXTERN void CLSLogv(NSString *format, va_list ap) NS_FORMAT_FUNCTION(1,0); + +/** + * + * Add logging that will be sent with your crash data. This logging will show up in the system.log + * and your Crashlytics dashboard. It is not recommended for Release builds. + * + **/ +OBJC_EXTERN void CLSNSLog(NSString *format, ...) NS_FORMAT_FUNCTION(1,2); +OBJC_EXTERN void CLSNSLogv(NSString *format, va_list ap) NS_FORMAT_FUNCTION(1,0); + + +NS_ASSUME_NONNULL_END +#endif diff --git a/Pods/Crashlytics/Crashlytics.framework/Headers/CLSReport.h b/Pods/Crashlytics/Crashlytics.framework/Headers/CLSReport.h new file mode 100644 index 0000000..6e3a515 --- /dev/null +++ b/Pods/Crashlytics/Crashlytics.framework/Headers/CLSReport.h @@ -0,0 +1,103 @@ +// +// CLSReport.h +// Crashlytics +// +// Copyright (c) 2015 Crashlytics, Inc. All rights reserved. +// + +#import +#import "CLSAttributes.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + * The CLSCrashReport protocol is deprecated. See the CLSReport class and the CrashyticsDelegate changes for details. + **/ +@protocol CLSCrashReport + +@property (nonatomic, copy, readonly) NSString *identifier; +@property (nonatomic, copy, readonly) NSDictionary *customKeys; +@property (nonatomic, copy, readonly) NSString *bundleVersion; +@property (nonatomic, copy, readonly) NSString *bundleShortVersionString; +@property (nonatomic, copy, readonly) NSDate *crashedOnDate; +@property (nonatomic, copy, readonly) NSString *OSVersion; +@property (nonatomic, copy, readonly) NSString *OSBuildVersion; + +@end + +/** + * The CLSReport exposes an interface to the phsyical report that Crashlytics has created. You can + * use this class to get information about the event, and can also set some values after the + * event has occured. + **/ +@interface CLSReport : NSObject + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +/** + * Returns the session identifier for the report. + **/ +@property (nonatomic, copy, readonly) NSString *identifier; + +/** + * Returns the custom key value data for the report. + **/ +@property (nonatomic, copy, readonly) NSDictionary *customKeys; + +/** + * Returns the CFBundleVersion of the application that generated the report. + **/ +@property (nonatomic, copy, readonly) NSString *bundleVersion; + +/** + * Returns the CFBundleShortVersionString of the application that generated the report. + **/ +@property (nonatomic, copy, readonly) NSString *bundleShortVersionString; + +/** + * Returns the date that the report was created. + **/ +@property (nonatomic, copy, readonly) NSDate *dateCreated; + +/** + * Returns the os version that the application crashed on. + **/ +@property (nonatomic, copy, readonly) NSString *OSVersion; + +/** + * Returns the os build version that the application crashed on. + **/ +@property (nonatomic, copy, readonly) NSString *OSBuildVersion; + +/** + * Returns YES if the report contains any crash information, otherwise returns NO. + **/ +@property (nonatomic, assign, readonly) BOOL isCrash; + +/** + * You can use this method to set, after the event, additional custom keys. The rules + * and semantics for this method are the same as those documented in Crashlytics.h. Be aware + * that the maximum size and count of custom keys is still enforced, and you can overwrite keys + * and/or cause excess keys to be deleted by using this method. + **/ +- (void)setObjectValue:(nullable id)value forKey:(NSString *)key; + +/** + * Record an application-specific user identifier. See Crashlytics.h for details. + **/ +@property (nonatomic, copy, nullable) NSString * userIdentifier; + +/** + * Record a user name. See Crashlytics.h for details. + **/ +@property (nonatomic, copy, nullable) NSString * userName; + +/** + * Record a user email. See Crashlytics.h for details. + **/ +@property (nonatomic, copy, nullable) NSString * userEmail; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/Crashlytics/Crashlytics.framework/Headers/CLSStackFrame.h b/Pods/Crashlytics/Crashlytics.framework/Headers/CLSStackFrame.h new file mode 100644 index 0000000..a9c0f29 --- /dev/null +++ b/Pods/Crashlytics/Crashlytics.framework/Headers/CLSStackFrame.h @@ -0,0 +1,37 @@ +// +// CLSStackFrame.h +// Crashlytics +// +// Copyright 2015 Crashlytics, Inc. All rights reserved. +// + +#import +#import "CLSAttributes.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + * + * This class is used in conjunction with -[Crashlytics recordCustomExceptionName:reason:frameArray:] to + * record information about non-ObjC/C++ exceptions. All information included here will be displayed + * in the Crashlytics UI, and can influence crash grouping. Be particularly careful with the use of the + * address property. If set, Crashlytics will attempt symbolication and could overwrite other properities + * in the process. + * + **/ +@interface CLSStackFrame : NSObject + ++ (instancetype)stackFrame; ++ (instancetype)stackFrameWithAddress:(NSUInteger)address; ++ (instancetype)stackFrameWithSymbol:(NSString *)symbol; + +@property (nonatomic, copy, nullable) NSString *symbol; +@property (nonatomic, copy, nullable) NSString *library; +@property (nonatomic, copy, nullable) NSString *fileName; +@property (nonatomic, assign) uint32_t lineNumber; +@property (nonatomic, assign) uint64_t offset; +@property (nonatomic, assign) uint64_t address; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/Crashlytics/Crashlytics.framework/Headers/Crashlytics.h b/Pods/Crashlytics/Crashlytics.framework/Headers/Crashlytics.h new file mode 100644 index 0000000..dff88a6 --- /dev/null +++ b/Pods/Crashlytics/Crashlytics.framework/Headers/Crashlytics.h @@ -0,0 +1,248 @@ +// +// Crashlytics.h +// Crashlytics +// +// Copyright (c) 2015 Crashlytics, Inc. All rights reserved. +// + +#import + +#import "CLSAttributes.h" +#import "CLSLogging.h" +#import "CLSReport.h" +#import "CLSStackFrame.h" +#import "Answers.h" + +NS_ASSUME_NONNULL_BEGIN + +@protocol CrashlyticsDelegate; + +/** + * Crashlytics. Handles configuration and initialization of Crashlytics. + */ +@interface Crashlytics : NSObject + +@property (nonatomic, readonly, copy) NSString *APIKey; +@property (nonatomic, readonly, copy) NSString *version; +@property (nonatomic, assign) BOOL debugMode; + +/** + * + * The delegate can be used to influence decisions on reporting and behavior, as well as reacting + * to previous crashes. + * + * Make certain that the delegate is setup before starting Crashlytics with startWithAPIKey:... or + * via +[Fabric with:...]. Failure to do will result in missing any delegate callbacks that occur + * synchronously during start. + * + **/ +@property (nonatomic, assign, nullable) id delegate; + +/** + * The recommended way to install Crashlytics into your application is to place a call to +startWithAPIKey: + * in your -application:didFinishLaunchingWithOptions: or -applicationDidFinishLaunching: + * method. + * + * Note: Starting with 3.0, the submission process has been significantly improved. The delay parameter + * is no longer required to throttle submissions on launch, performance will be great without it. + * + * @param apiKey The Crashlytics API Key for this app + * + * @return The singleton Crashlytics instance + */ ++ (Crashlytics *)startWithAPIKey:(NSString *)apiKey; ++ (Crashlytics *)startWithAPIKey:(NSString *)apiKey afterDelay:(NSTimeInterval)delay CLS_DEPRECATED("Crashlytics no longer needs or uses the delay parameter. Please use +startWithAPIKey: instead."); + +/** + * If you need the functionality provided by the CrashlyticsDelegate protocol, you can use + * these convenience methods to activate the framework and set the delegate in one call. + * + * @param apiKey The Crashlytics API Key for this app + * @param delegate A delegate object which conforms to CrashlyticsDelegate. + * + * @return The singleton Crashlytics instance + */ ++ (Crashlytics *)startWithAPIKey:(NSString *)apiKey delegate:(nullable id)delegate; ++ (Crashlytics *)startWithAPIKey:(NSString *)apiKey delegate:(nullable id)delegate afterDelay:(NSTimeInterval)delay CLS_DEPRECATED("Crashlytics no longer needs or uses the delay parameter. Please use +startWithAPIKey:delegate: instead."); + +/** + * Access the singleton Crashlytics instance. + * + * @return The singleton Crashlytics instance + */ ++ (Crashlytics *)sharedInstance; + +/** + * The easiest way to cause a crash - great for testing! + */ +- (void)crash; + +/** + * The easiest way to cause a crash with an exception - great for testing. + */ +- (void)throwException; + +/** + * Specify a user identifier which will be visible in the Crashlytics UI. + * + * Many of our customers have requested the ability to tie crashes to specific end-users of their + * application in order to facilitate responses to support requests or permit the ability to reach + * out for more information. We allow you to specify up to three separate values for display within + * the Crashlytics UI - but please be mindful of your end-user's privacy. + * + * We recommend specifying a user identifier - an arbitrary string that ties an end-user to a record + * in your system. This could be a database id, hash, or other value that is meaningless to a + * third-party observer but can be indexed and queried by you. + * + * Optionally, you may also specify the end-user's name or username, as well as email address if you + * do not have a system that works well with obscured identifiers. + * + * Pursuant to our EULA, this data is transferred securely throughout our system and we will not + * disseminate end-user data unless required to by law. That said, if you choose to provide end-user + * contact information, we strongly recommend that you disclose this in your application's privacy + * policy. Data privacy is of our utmost concern. + * + * @param identifier An arbitrary user identifier string which ties an end-user to a record in your system. + */ +- (void)setUserIdentifier:(nullable NSString *)identifier; + +/** + * Specify a user name which will be visible in the Crashlytics UI. + * Please be mindful of your end-user's privacy and see if setUserIdentifier: can fulfil your needs. + * @see setUserIdentifier: + * + * @param name An end user's name. + */ +- (void)setUserName:(nullable NSString *)name; + +/** + * Specify a user email which will be visible in the Crashlytics UI. + * Please be mindful of your end-user's privacy and see if setUserIdentifier: can fulfil your needs. + * + * @see setUserIdentifier: + * + * @param email An end user's email address. + */ +- (void)setUserEmail:(nullable NSString *)email; + ++ (void)setUserIdentifier:(nullable NSString *)identifier CLS_DEPRECATED("Please access this method via +sharedInstance"); ++ (void)setUserName:(nullable NSString *)name CLS_DEPRECATED("Please access this method via +sharedInstance"); ++ (void)setUserEmail:(nullable NSString *)email CLS_DEPRECATED("Please access this method via +sharedInstance"); + +/** + * Set a value for a for a key to be associated with your crash data which will be visible in the Crashlytics UI. + * When setting an object value, the object is converted to a string. This is typically done by calling + * -[NSObject description]. + * + * @param value The object to be associated with the key + * @param key The key with which to associate the value + */ +- (void)setObjectValue:(nullable id)value forKey:(NSString *)key; + +/** + * Set an int value for a key to be associated with your crash data which will be visible in the Crashlytics UI. + * + * @param value The integer value to be set + * @param key The key with which to associate the value + */ +- (void)setIntValue:(int)value forKey:(NSString *)key; + +/** + * Set an BOOL value for a key to be associated with your crash data which will be visible in the Crashlytics UI. + * + * @param value The BOOL value to be set + * @param key The key with which to associate the value + */ +- (void)setBoolValue:(BOOL)value forKey:(NSString *)key; + +/** + * Set an float value for a key to be associated with your crash data which will be visible in the Crashlytics UI. + * + * @param value The float value to be set + * @param key The key with which to associate the value + */ +- (void)setFloatValue:(float)value forKey:(NSString *)key; + ++ (void)setObjectValue:(nullable id)value forKey:(NSString *)key CLS_DEPRECATED("Please access this method via +sharedInstance"); ++ (void)setIntValue:(int)value forKey:(NSString *)key CLS_DEPRECATED("Please access this method via +sharedInstance"); ++ (void)setBoolValue:(BOOL)value forKey:(NSString *)key CLS_DEPRECATED("Please access this method via +sharedInstance"); ++ (void)setFloatValue:(float)value forKey:(NSString *)key CLS_DEPRECATED("Please access this method via +sharedInstance"); + +/** + * This method can be used to record a single exception structure in a report. This is particularly useful + * when your code interacts with non-native languages like Lua, C#, or Javascript. This call can be + * expensive and should only be used shortly before process termination. This API is not intended be to used + * to log NSException objects. All safely-reportable NSExceptions are automatically captured by + * Crashlytics. + * + * @param name The name of the custom exception + * @param reason The reason this exception occured + * @param frameArray An array of CLSStackFrame objects + */ +- (void)recordCustomExceptionName:(NSString *)name reason:(nullable NSString *)reason frameArray:(CLS_GENERIC_NSARRAY(CLSStackFrame *) *)frameArray; + +- (void)logEvent:(NSString *)eventName CLS_DEPRECATED("Please refer to Answers +logCustomEventWithName:"); +- (void)logEvent:(NSString *)eventName attributes:(nullable NSDictionary *) attributes CLS_DEPRECATED("Please refer to Answers +logCustomEventWithName:"); ++ (void)logEvent:(NSString *)eventName CLS_DEPRECATED("Please refer to Answers +logCustomEventWithName:"); ++ (void)logEvent:(NSString *)eventName attributes:(nullable NSDictionary *) attributes CLS_DEPRECATED("Please refer to Answers +logCustomEventWithName:"); + +@end + +/** + * + * The CrashlyticsDelegate protocol provides a mechanism for your application to take + * action on events that occur in the Crashlytics crash reporting system. You can make + * use of these calls by assigning an object to the Crashlytics' delegate property directly, + * or through the convenience +startWithAPIKey:delegate: method. + * + */ +@protocol CrashlyticsDelegate +@optional + + +- (void)crashlyticsDidDetectCrashDuringPreviousExecution:(Crashlytics *)crashlytics CLS_DEPRECATED("Please refer to -crashlyticsDidDetectReportForLastExecution:"); +- (void)crashlytics:(Crashlytics *)crashlytics didDetectCrashDuringPreviousExecution:(id )crash CLS_DEPRECATED("Please refer to -crashlyticsDidDetectReportForLastExecution:"); + +/** + * + * Called when a Crashlytics instance has determined that the last execution of the + * application ended in a crash. This is called synchronously on Crashlytics + * initialization. Your delegate must invoke the completionHandler, but does not need to do so + * synchronously, or even on the main thread. Invoking completionHandler with NO will cause the + * detected report to be deleted and not submitted to Crashlytics. This is useful for + * implementing permission prompts, or other more-complex forms of logic around submitting crashes. + * + * @warning Failure to invoke the completionHandler will prevent submissions from being reported. Watch out. + * + * @warning Just implementing this delegate method will disable all forms of synchronous report submission. This can + * impact the reliability of reporting crashes very early in application launch. + * + * @param report The CLSReport object representing the last detected crash + * @param completionHandler The completion handler to call when your logic has completed. + * + */ +- (void)crashlyticsDidDetectReportForLastExecution:(CLSReport *)report completionHandler:(void (^)(BOOL submit))completionHandler; + +/** + * If your app is running on an OS that supports it (OS X 10.9+, iOS 7.0+), Crashlytics will submit + * most reports using out-of-process background networking operations. This results in a significant + * improvement in reliability of reporting, as well as power and performance wins for your users. + * If you don't want this functionality, you can disable by returning NO from this method. + * + * @warning Background submission is not supported for extensions on iOS or OS X. + * + * @param crashlytics The Crashlytics singleton instance + * + * @return Return NO if you don't want out-of-process background network operations. + * + */ +- (BOOL)crashlyticsCanUseBackgroundSessions:(Crashlytics *)crashlytics; + +@end + +/** + * `CrashlyticsKit` can be used as a parameter to `[Fabric with:@[CrashlyticsKit]];` in Objective-C. In Swift, use Crashlytics.sharedInstance() + */ +#define CrashlyticsKit [Crashlytics sharedInstance] + +NS_ASSUME_NONNULL_END diff --git a/Pods/Crashlytics/Crashlytics.framework/Info.plist b/Pods/Crashlytics/Crashlytics.framework/Info.plist new file mode 100644 index 0000000..a297f59 --- /dev/null +++ b/Pods/Crashlytics/Crashlytics.framework/Info.plist @@ -0,0 +1,55 @@ + + + + + BuildMachineOSBuild + 14F1021 + CFBundleDevelopmentRegion + English + CFBundleExecutable + Crashlytics + CFBundleIdentifier + com.twitter.crashlytics.ios + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + Crashlytics + CFBundlePackageType + FMWK + CFBundleShortVersionString + 3.4.0 + CFBundleSignature + ???? + CFBundleSupportedPlatforms + + iPhoneOS + + CFBundleVersion + 92 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 13B137 + DTPlatformName + iphoneos + DTPlatformVersion + 9.1 + DTSDKBuild + 13B137 + DTSDKName + iphoneos9.1 + DTXcode + 0710 + DTXcodeBuild + 7B91b + MinimumOSVersion + 6.0 + NSHumanReadableCopyright + Copyright © 2015 Crashlytics, Inc. All rights reserved. + UIDeviceFamily + + 1 + 2 + + + diff --git a/Pods/Crashlytics/Crashlytics.framework/Modules/module.modulemap b/Pods/Crashlytics/Crashlytics.framework/Modules/module.modulemap new file mode 100644 index 0000000..da0845e --- /dev/null +++ b/Pods/Crashlytics/Crashlytics.framework/Modules/module.modulemap @@ -0,0 +1,14 @@ +framework module Crashlytics { + header "Crashlytics.h" + header "Answers.h" + header "ANSCompatibility.h" + header "CLSLogging.h" + header "CLSReport.h" + header "CLSStackFrame.h" + header "CLSAttributes.h" + + export * + + link "z" + link "c++" +} diff --git a/Pods/Crashlytics/Crashlytics.framework/run b/Pods/Crashlytics/Crashlytics.framework/run new file mode 100755 index 0000000..f4c5732 --- /dev/null +++ b/Pods/Crashlytics/Crashlytics.framework/run @@ -0,0 +1,28 @@ +#!/bin/sh + +# run +# +# Copyright (c) 2015 Crashlytics. All rights reserved. + +# Figure out where we're being called from +DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) + +# Quote path in case of spaces or special chars +DIR="\"${DIR}" + +PATH_SEP="/" +VALIDATE_COMMAND="uploadDSYM\" $@ validate" +UPLOAD_COMMAND="uploadDSYM\" $@" + +# Ensure params are as expected, run in sync mode to validate +eval $DIR$PATH_SEP$VALIDATE_COMMAND +return_code=$? + +if [[ $return_code != 0 ]]; then + exit $return_code +fi + +# Verification passed, upload dSYM in background to prevent Xcode from waiting +# Note: Validation is performed again before upload. +# Output can still be found in Console.app +eval $DIR$PATH_SEP$UPLOAD_COMMAND > /dev/null 2>&1 & diff --git a/Pods/Crashlytics/Crashlytics.framework/submit b/Pods/Crashlytics/Crashlytics.framework/submit new file mode 100755 index 0000000..87343bc Binary files /dev/null and b/Pods/Crashlytics/Crashlytics.framework/submit differ diff --git a/Pods/Crashlytics/Crashlytics.framework/uploadDSYM b/Pods/Crashlytics/Crashlytics.framework/uploadDSYM new file mode 100755 index 0000000..05c9855 Binary files /dev/null and b/Pods/Crashlytics/Crashlytics.framework/uploadDSYM differ diff --git a/Pods/Fabric/Fabric.framework/Fabric b/Pods/Fabric/Fabric.framework/Fabric new file mode 100755 index 0000000..4360b95 Binary files /dev/null and b/Pods/Fabric/Fabric.framework/Fabric differ diff --git a/Pods/Fabric/Fabric.framework/Headers/FABAttributes.h b/Pods/Fabric/Fabric.framework/Headers/FABAttributes.h new file mode 100644 index 0000000..f4e0639 --- /dev/null +++ b/Pods/Fabric/Fabric.framework/Headers/FABAttributes.h @@ -0,0 +1,48 @@ +// +// FABAttributes.h +// Fabric +// +// Copyright (c) 2015 Twitter. All rights reserved. +// + +#pragma once + +#define FAB_UNAVAILABLE(x) __attribute__((unavailable(x))) + +#if __has_feature(nullability) + #define fab_nullable nullable + #define fab_nonnull nonnull + #define fab_null_unspecified null_unspecified + #define fab_null_resettable null_resettable + #define __fab_nullable __nullable + #define __fab_nonnull __nonnull + #define __fab_null_unspecified __null_unspecified +#else + #define fab_nullable + #define fab_nonnull + #define fab_null_unspecified + #define fab_null_resettable + #define __fab_nullable + #define __fab_nonnull + #define __fab_null_unspecified +#endif + +#ifndef NS_ASSUME_NONNULL_BEGIN + #define NS_ASSUME_NONNULL_BEGIN +#endif + +#ifndef NS_ASSUME_NONNULL_END + #define NS_ASSUME_NONNULL_END +#endif + + +/** + * The following macros are defined here to provide + * backwards compatability. If you are still using + * them you should migrate to the new versions that + * are defined above. + */ +#define FAB_NONNULL __fab_nonnull +#define FAB_NULLABLE __fab_nullable +#define FAB_START_NONNULL NS_ASSUME_NONNULL_BEGIN +#define FAB_END_NONNULL NS_ASSUME_NONNULL_END diff --git a/Pods/Fabric/Fabric.framework/Headers/Fabric.h b/Pods/Fabric/Fabric.framework/Headers/Fabric.h new file mode 100644 index 0000000..47a3d05 --- /dev/null +++ b/Pods/Fabric/Fabric.framework/Headers/Fabric.h @@ -0,0 +1,64 @@ +// +// Fabric.h +// +// Copyright (c) 2015 Twitter. All rights reserved. +// + +#import +#import "FABAttributes.h" + +NS_ASSUME_NONNULL_BEGIN + +#if TARGET_OS_IPHONE +#if __IPHONE_OS_VERSION_MIN_REQUIRED < 60000 + #error "Fabric's minimum iOS version is 6.0" +#endif +#else +#if __MAC_OS_X_VERSION_MIN_REQUIRED < 1070 + #error "Fabric's minimum OS X version is 10.7" +#endif +#endif + +/** + * Fabric Base. Coordinates configuration and starts all provided kits. + */ +@interface Fabric : NSObject + +/** + * Initialize Fabric and all provided kits. Call this method within your App Delegate's `application:didFinishLaunchingWithOptions:` and provide the kits you wish to use. + * + * For example, in Objective-C: + * + * `[Fabric with:@[[Crashlytics class], [Twitter class], [Digits class], [MoPub class]]];` + * + * Swift: + * + * `Fabric.with([Crashlytics.self(), Twitter.self(), Digits.self(), MoPub.self()])` + * + * Only the first call to this method is honored. Subsequent calls are no-ops. + * + * @param kitClasses An array of kit Class objects + * + * @return Returns the shared Fabric instance. In most cases this can be ignored. + */ ++ (instancetype)with:(NSArray *)kitClasses; + +/** + * Returns the Fabric singleton object. + */ ++ (instancetype)sharedSDK; + +/** + * This BOOL enables or disables debug logging, such as kit version information. The default value is NO. + */ +@property (nonatomic, assign) BOOL debug; + +/** + * Unavailable. Use `+sharedSDK` to retrieve the shared Fabric instance. + */ +- (id)init FAB_UNAVAILABLE("Use +sharedSDK to retrieve the shared Fabric instance."); + +@end + +NS_ASSUME_NONNULL_END + diff --git a/Pods/Fabric/Fabric.framework/Info.plist b/Pods/Fabric/Fabric.framework/Info.plist new file mode 100644 index 0000000..d240582 --- /dev/null +++ b/Pods/Fabric/Fabric.framework/Info.plist @@ -0,0 +1,55 @@ + + + + + BuildMachineOSBuild + 14F1021 + CFBundleDevelopmentRegion + en + CFBundleExecutable + Fabric + CFBundleIdentifier + io.fabric.sdk.ios + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + Fabric + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.6.0 + CFBundleSignature + ???? + CFBundleSupportedPlatforms + + iPhoneOS + + CFBundleVersion + 37 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 13B137 + DTPlatformName + iphoneos + DTPlatformVersion + 9.1 + DTSDKBuild + 13B137 + DTSDKName + iphoneos9.1 + DTXcode + 0710 + DTXcodeBuild + 7B91b + MinimumOSVersion + 6.0 + NSHumanReadableCopyright + Copyright © 2015 Twitter. All rights reserved. + UIDeviceFamily + + 1 + 2 + + + diff --git a/Pods/Fabric/Fabric.framework/Modules/module.modulemap b/Pods/Fabric/Fabric.framework/Modules/module.modulemap new file mode 100644 index 0000000..2a31223 --- /dev/null +++ b/Pods/Fabric/Fabric.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module Fabric { + umbrella header "Fabric.h" + + export * + module * { export * } +} \ No newline at end of file diff --git a/Pods/Fabric/Fabric.framework/run b/Pods/Fabric/Fabric.framework/run new file mode 100755 index 0000000..f4c5732 --- /dev/null +++ b/Pods/Fabric/Fabric.framework/run @@ -0,0 +1,28 @@ +#!/bin/sh + +# run +# +# Copyright (c) 2015 Crashlytics. All rights reserved. + +# Figure out where we're being called from +DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) + +# Quote path in case of spaces or special chars +DIR="\"${DIR}" + +PATH_SEP="/" +VALIDATE_COMMAND="uploadDSYM\" $@ validate" +UPLOAD_COMMAND="uploadDSYM\" $@" + +# Ensure params are as expected, run in sync mode to validate +eval $DIR$PATH_SEP$VALIDATE_COMMAND +return_code=$? + +if [[ $return_code != 0 ]]; then + exit $return_code +fi + +# Verification passed, upload dSYM in background to prevent Xcode from waiting +# Note: Validation is performed again before upload. +# Output can still be found in Console.app +eval $DIR$PATH_SEP$UPLOAD_COMMAND > /dev/null 2>&1 & diff --git a/Pods/Fabric/Fabric.framework/uploadDSYM b/Pods/Fabric/Fabric.framework/uploadDSYM new file mode 100755 index 0000000..fa6658d Binary files /dev/null and b/Pods/Fabric/Fabric.framework/uploadDSYM differ diff --git a/Pods/Headers/Private/NRSimplePlist/NRSimplePlist.h b/Pods/Headers/Private/NRSimplePlist/NRSimplePlist.h new file mode 120000 index 0000000..c328076 --- /dev/null +++ b/Pods/Headers/Private/NRSimplePlist/NRSimplePlist.h @@ -0,0 +1 @@ +../../../NRSimplePlist/NRSimplePlist/NRSimplePlist.h \ No newline at end of file diff --git a/Pods/Headers/Private/SVProgressHUD/SVIndefiniteAnimatedView.h b/Pods/Headers/Private/SVProgressHUD/SVIndefiniteAnimatedView.h new file mode 120000 index 0000000..55a38a2 --- /dev/null +++ b/Pods/Headers/Private/SVProgressHUD/SVIndefiniteAnimatedView.h @@ -0,0 +1 @@ +../../../SVProgressHUD/SVProgressHUD/SVIndefiniteAnimatedView.h \ No newline at end of file diff --git a/Pods/Headers/Private/SVProgressHUD/SVProgressHUD.h b/Pods/Headers/Private/SVProgressHUD/SVProgressHUD.h new file mode 120000 index 0000000..608a8aa --- /dev/null +++ b/Pods/Headers/Private/SVProgressHUD/SVProgressHUD.h @@ -0,0 +1 @@ +../../../SVProgressHUD/SVProgressHUD/SVProgressHUD.h \ No newline at end of file diff --git a/Pods/Headers/Private/SVProgressHUD/SVRadialGradientLayer.h b/Pods/Headers/Private/SVProgressHUD/SVRadialGradientLayer.h new file mode 120000 index 0000000..d78beb5 --- /dev/null +++ b/Pods/Headers/Private/SVProgressHUD/SVRadialGradientLayer.h @@ -0,0 +1 @@ +../../../SVProgressHUD/SVProgressHUD/SVRadialGradientLayer.h \ No newline at end of file diff --git a/Pods/Headers/Public/Crashlytics/Crashlytics/ANSCompatibility.h b/Pods/Headers/Public/Crashlytics/Crashlytics/ANSCompatibility.h new file mode 120000 index 0000000..9ab5f2f --- /dev/null +++ b/Pods/Headers/Public/Crashlytics/Crashlytics/ANSCompatibility.h @@ -0,0 +1 @@ +../../../../Crashlytics/Crashlytics.framework/Headers/ANSCompatibility.h \ No newline at end of file diff --git a/Pods/Headers/Public/Crashlytics/Crashlytics/Answers.h b/Pods/Headers/Public/Crashlytics/Crashlytics/Answers.h new file mode 120000 index 0000000..ab04cca --- /dev/null +++ b/Pods/Headers/Public/Crashlytics/Crashlytics/Answers.h @@ -0,0 +1 @@ +../../../../Crashlytics/Crashlytics.framework/Headers/Answers.h \ No newline at end of file diff --git a/Pods/Headers/Public/Crashlytics/Crashlytics/CLSAttributes.h b/Pods/Headers/Public/Crashlytics/Crashlytics/CLSAttributes.h new file mode 120000 index 0000000..456ea34 --- /dev/null +++ b/Pods/Headers/Public/Crashlytics/Crashlytics/CLSAttributes.h @@ -0,0 +1 @@ +../../../../Crashlytics/Crashlytics.framework/Headers/CLSAttributes.h \ No newline at end of file diff --git a/Pods/Headers/Public/Crashlytics/Crashlytics/CLSLogging.h b/Pods/Headers/Public/Crashlytics/Crashlytics/CLSLogging.h new file mode 120000 index 0000000..1b23be2 --- /dev/null +++ b/Pods/Headers/Public/Crashlytics/Crashlytics/CLSLogging.h @@ -0,0 +1 @@ +../../../../Crashlytics/Crashlytics.framework/Headers/CLSLogging.h \ No newline at end of file diff --git a/Pods/Headers/Public/Crashlytics/Crashlytics/CLSReport.h b/Pods/Headers/Public/Crashlytics/Crashlytics/CLSReport.h new file mode 120000 index 0000000..3e8256e --- /dev/null +++ b/Pods/Headers/Public/Crashlytics/Crashlytics/CLSReport.h @@ -0,0 +1 @@ +../../../../Crashlytics/Crashlytics.framework/Headers/CLSReport.h \ No newline at end of file diff --git a/Pods/Headers/Public/Crashlytics/Crashlytics/CLSStackFrame.h b/Pods/Headers/Public/Crashlytics/Crashlytics/CLSStackFrame.h new file mode 120000 index 0000000..626cff2 --- /dev/null +++ b/Pods/Headers/Public/Crashlytics/Crashlytics/CLSStackFrame.h @@ -0,0 +1 @@ +../../../../Crashlytics/Crashlytics.framework/Headers/CLSStackFrame.h \ No newline at end of file diff --git a/Pods/Headers/Public/Crashlytics/Crashlytics/Crashlytics.h b/Pods/Headers/Public/Crashlytics/Crashlytics/Crashlytics.h new file mode 120000 index 0000000..e304369 --- /dev/null +++ b/Pods/Headers/Public/Crashlytics/Crashlytics/Crashlytics.h @@ -0,0 +1 @@ +../../../../Crashlytics/Crashlytics.framework/Headers/Crashlytics.h \ No newline at end of file diff --git a/Pods/Headers/Public/Fabric/Fabric/FABAttributes.h b/Pods/Headers/Public/Fabric/Fabric/FABAttributes.h new file mode 120000 index 0000000..c614791 --- /dev/null +++ b/Pods/Headers/Public/Fabric/Fabric/FABAttributes.h @@ -0,0 +1 @@ +../../../../Fabric/Fabric.framework/Headers/FABAttributes.h \ No newline at end of file diff --git a/Pods/Headers/Public/Fabric/Fabric/Fabric.h b/Pods/Headers/Public/Fabric/Fabric/Fabric.h new file mode 120000 index 0000000..1be0f43 --- /dev/null +++ b/Pods/Headers/Public/Fabric/Fabric/Fabric.h @@ -0,0 +1 @@ +../../../../Fabric/Fabric.framework/Headers/Fabric.h \ No newline at end of file diff --git a/Pods/Local Podspecs/NRSimplePlist.podspec.json b/Pods/Local Podspecs/NRSimplePlist.podspec.json new file mode 100644 index 0000000..dda3f64 --- /dev/null +++ b/Pods/Local Podspecs/NRSimplePlist.podspec.json @@ -0,0 +1,21 @@ +{ + "name": "NRSimplePlist", + "version": "1.0", + "summary": "Easy library to fetch and edit data from and to plists on the fly (XCode)", + "homepage": "https://github.com/portapipe/NRSimplePlist", + "license": { + "type": "Apache", + "file": "LICENSE" + }, + "authors": { + "Norman Russo": "portapipe@gmail.com" + }, + "source": { + "git": "https://github.com/portapipe/NRSimplePlist.git" + }, + "platforms": { + "ios": "5.0" + }, + "source_files": "NRSimplePlist", + "requires_arc": true +} diff --git a/Pods/Local Podspecs/SwiftyJSON.podspec.json b/Pods/Local Podspecs/SwiftyJSON.podspec.json new file mode 100644 index 0000000..7fb02d6 --- /dev/null +++ b/Pods/Local Podspecs/SwiftyJSON.podspec.json @@ -0,0 +1,25 @@ +{ + "name": "SwiftyJSON", + "version": "2.3.1", + "summary": "SwiftyJSON makes it easy to deal with JSON data in Swift", + "homepage": "https://github.com/SwiftyJSON/SwiftyJSON", + "license": { + "type": "MIT" + }, + "authors": { + "lingoer": "lingoerer@gmail.com", + "tangplin": "tangplin@gmail.com" + }, + "requires_arc": true, + "platforms": { + "osx": "10.9", + "ios": "8.0", + "watchos": "2.0", + "tvos": "9.0" + }, + "source": { + "git": "https://github.com/SwiftyJSON/SwiftyJSON.git", + "tag": "2.3.1" + }, + "source_files": "Source/*.swift" +} diff --git a/Pods/Manifest.lock b/Pods/Manifest.lock new file mode 100644 index 0000000..fcdb408 --- /dev/null +++ b/Pods/Manifest.lock @@ -0,0 +1,46 @@ +PODS: + - Cartography (0.6.0) + - Crashlytics (3.4.0): + - Fabric (~> 1.6.0) + - Fabric (1.6.0): + - Fabric/Base (= 1.6.0) + - Fabric/Base (1.6.0) + - NRSimplePlist (1.0) + - SVProgressHUD (HEAD based on 2.0-beta) + - SwiftyJSON (2.3.1) + - SwiftyUserDefaults (2.0.0) + +DEPENDENCIES: + - Cartography (~> 0.6) + - Crashlytics + - Fabric + - NRSimplePlist (from `https://github.com/broderboy/NRSimplePlist.git`, branch `swift2`) + - SVProgressHUD (HEAD) + - SwiftyJSON (from `https://github.com/SwiftyJSON/SwiftyJSON.git`) + - SwiftyUserDefaults + +EXTERNAL SOURCES: + NRSimplePlist: + :branch: swift2 + :git: https://github.com/broderboy/NRSimplePlist.git + SwiftyJSON: + :git: https://github.com/SwiftyJSON/SwiftyJSON.git + +CHECKOUT OPTIONS: + NRSimplePlist: + :commit: 9497a4efbf6460ea2384b5f2680009621e25b3ce + :git: https://github.com/broderboy/NRSimplePlist.git + SwiftyJSON: + :commit: ece271ab33839d11c2153d71fb59c53545132cf9 + :git: https://github.com/SwiftyJSON/SwiftyJSON.git + +SPEC CHECKSUMS: + Cartography: 70af183a248547694a8cfaa6b989cb7e04589985 + Crashlytics: 1ee87895c37472eb3f01f409ea1654a464d2f8d4 + Fabric: d737eda3a26ac940a5430230eedb35f16b226131 + NRSimplePlist: c27d95cb456281528885b3c48e15826cf12a970b + SVProgressHUD: c83337f10ed32d701c423d519059a249973c8662 + SwiftyJSON: 592b53bee5ef3dd9b3bebc6b9cb7ee35426ae8c3 + SwiftyUserDefaults: 1266e9734c68bcfbac8294ee84173dc8ba6db312 + +COCOAPODS: 0.39.0 diff --git a/Pods/NRSimplePlist/LICENSE b/Pods/NRSimplePlist/LICENSE new file mode 100644 index 0000000..37ec93a --- /dev/null +++ b/Pods/NRSimplePlist/LICENSE @@ -0,0 +1,191 @@ +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: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +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 +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 [yyyy] [name of copyright owner] + + 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/Pods/NRSimplePlist/NRSimplePlist/NRSimplePlist.h b/Pods/NRSimplePlist/NRSimplePlist/NRSimplePlist.h new file mode 100644 index 0000000..4c5a352 --- /dev/null +++ b/Pods/NRSimplePlist/NRSimplePlist/NRSimplePlist.h @@ -0,0 +1,56 @@ +// +// NRSimplePlist.h +// +// Created by Norman Russo on 29/07/13. +// Copyright (c) 2013 Norman Russo. All rights reserved. +// + +#import + +@interface NRSimplePlist : NSObject{ + + +} + +//Estrai valore ++ (id)valorePlist:(NSString *)nomeFile conChiave:(NSString*)chiave; + +//Stringa ++(void)modificaStringaPlist:(NSString *)nomeFile conChiave:(NSString*)chiave eStringa:(NSString*)stringa; + +//Numero ++(void)modificaNumeroPlist:(NSString *)nomeFile conChiave:(NSString*)chiave eNumero:(NSNumber*)numero; + +//Bool ++(void)modificaBoolPlist:(NSString *)nomeFile conChiave:(NSString*)chiave eBool:(BOOL)valoreBooleano; + +//Data ++(void)modificaDataPlist:(NSString *)nomeFile conChiave:(NSString*)chiave eData:(NSData*)data; + +//Date ++(void)modificaDatePlist:(NSString *)nomeFile conChiave:(NSString*)chiave eDate:(NSDate*)date; + +//Array ++(void)modificaArrayPlist:(NSString *)nomeFile conChiave:(NSString*)chiave eArray:(NSArray*)array; + +//Dictionary ++(void)modificaDictionaryPlist:(NSString *)nomeFile conChiave:(NSString*)chiave eDictionary:(NSDictionary*)dictionary; + +//ENGLISH +//Fetch ++ (id)valuePlist:(NSString *)plistName withKey:(NSString*)key; +//String ++(void)editStringPlist:(NSString *)plistName withKey:(NSString*)key andString:(NSString*)string; +//Number ++(void)editNumberPlist:(NSString *)plistName withKey:(NSString*)key andNumber:(NSNumber*)number; +//Bool ++(void)editBoolPlist:(NSString *)plistName withKey:(NSString*)key andBool:(BOOL)boolValue; +//Data ++(void)editDataPlist:(NSString *)plistName withKey:(NSString*)key andData:(NSData*)data; +//Date ++(void)editDatePlist:(NSString *)plistName withKey:(NSString*)key andDate:(NSDate*)date; +//Array ++(void)editArrayPlist:(NSString *)plistName withKey:(NSString*)key andArray:(NSArray*)array; +//Dictionary ++(void)editDictionaryPlist:(NSString *)plistName withKey:(NSString*)key andDictionary:(NSDictionary*)dictionary; +@end diff --git a/Pods/NRSimplePlist/NRSimplePlist/NRSimplePlist.m b/Pods/NRSimplePlist/NRSimplePlist/NRSimplePlist.m new file mode 100644 index 0000000..1deb460 --- /dev/null +++ b/Pods/NRSimplePlist/NRSimplePlist/NRSimplePlist.m @@ -0,0 +1,227 @@ +// +// NRSimplePlist.m +// +// Created by Norman Russo on 29/07/13. +// Copyright (c) 2013 Norman Russo. All rights reserved. +// + +#import "NRSimplePlist.h" + +@implementation NRSimplePlist + + +//Estrae un valore dalla plist passata come primo parametro ++ (id)valorePlist:(NSString *)nomeFile conChiave:(NSString*)chiave { + + NSString *plistError; + NSPropertyListFormat format; + + NSString *localizedPath = [[NSBundle mainBundle] pathForResource:nomeFile ofType:@"plist"]; + NSData *plistData = [NSData dataWithContentsOfFile:localizedPath]; + + id plist = [NSPropertyListSerialization propertyListFromData:plistData mutabilityOption:NSPropertyListImmutable format:&format errorDescription:&plistError]; + if (!localizedPath) { + NSLog(@"NRSimplePlist - Errore LETTURA file plist '%s', errore = '%s'", [localizedPath UTF8String], [plistError UTF8String]); + NSLog(@"NRSimplePlist - Error READING plist file '%s', error = '%s'", [localizedPath UTF8String], [plistError UTF8String]); + } + + return [(NSArray *)plist valueForKey:chiave]; +} + +//Modifica un valore nella plist (passato come primo parametro) alla chiave passata. Metodo generico che comprende le cose più comuni ++ (void)modificaPlist:(NSString *)nomeFile conChiave:(NSString*)chiave eValoreStringa:(NSString*)stringa numero:(NSNumber*)numero data:(NSData*)data date:(NSDate*)date booleano:(BOOL)booleano{ + NSString *plistErrorWrite; + + NSString *localizedPath = [[NSBundle mainBundle] pathForResource:nomeFile ofType:@"plist"]; + + + NSFileManager *fileManager = [NSFileManager defaultManager]; + + if ([fileManager fileExistsAtPath: localizedPath]) { + NSMutableDictionary *tempPlist = [[NSMutableDictionary alloc]initWithContentsOfFile:localizedPath]; + + id valoreTemp; + + if(stringa != nil){ + valoreTemp = stringa; + }else if(numero != nil){ + valoreTemp = numero; + }else if(data != nil){ + valoreTemp = data; + }else if(date != nil){ + valoreTemp = date; + }else if(booleano){ + valoreTemp = [NSNumber numberWithBool:(BOOL)booleano]; + }else{ + NSLog(@"Errore nella modifica plist: nessun parametro valido passato!"); + NSLog(@"Error editing plist file: no valid parameter sended!"); + } + + + [tempPlist setObject:valoreTemp forKey:chiave]; + [tempPlist writeToFile:localizedPath atomically:YES]; + } else { + NSLog(@"NRSimplePlist - Errore nella MODIFICA del file plist '%s', errore = '%s'", [localizedPath UTF8String], [plistErrorWrite UTF8String]); + NSLog(@"NRSimplePlist - Error EDITING plist file '%s', error = '%s'", [localizedPath UTF8String], [plistErrorWrite UTF8String]); + } +} + ++(void)modificaStringaPlist:(NSString *)nomeFile conChiave:(NSString*)chiave eStringa:(NSString*)stringa{ + + NSString *localizedPath = [[NSBundle mainBundle] pathForResource:nomeFile ofType:@"plist"]; + + NSFileManager *fileManager = [NSFileManager defaultManager]; + + if ([fileManager fileExistsAtPath: localizedPath]) { + NSMutableDictionary *tempPlist = [[NSMutableDictionary alloc]initWithContentsOfFile:localizedPath]; + + [tempPlist setObject:stringa forKey:chiave]; + [tempPlist writeToFile:localizedPath atomically:YES]; + } else { + NSLog(@"NRSimplePlist - Errore nella MODIFICA STRINGA del file plist '%s'", [localizedPath UTF8String],nil); + NSLog(@"NRSimplePlist - Error EDITING STRING of plist file '%s'", [localizedPath UTF8String],nil); + } +} + ++(void)modificaNumeroPlist:(NSString *)nomeFile conChiave:(NSString*)chiave eNumero:(NSNumber*)numero{ + + NSString *localizedPath = [[NSBundle mainBundle] pathForResource:nomeFile ofType:@"plist"]; + + NSFileManager *fileManager = [NSFileManager defaultManager]; + + if ([fileManager fileExistsAtPath: localizedPath]) { + NSMutableDictionary *tempPlist = [[NSMutableDictionary alloc]initWithContentsOfFile:localizedPath]; + + [tempPlist setObject:numero forKey:chiave]; + [tempPlist writeToFile:localizedPath atomically:YES]; + } else { + NSLog(@"NRSimplePlist - Errore nella MODIFICA NUMERO del file plist '%s'", [localizedPath UTF8String],nil); + NSLog(@"NRSimplePlist - Error EDITING NUMBER of plist file '%s'", [localizedPath UTF8String],nil); + } +} + + ++(void)modificaBoolPlist:(NSString *)nomeFile conChiave:(NSString*)chiave eBool:(BOOL)valoreBooleano{ + + NSString *localizedPath = [[NSBundle mainBundle] pathForResource:nomeFile ofType:@"plist"]; + + NSFileManager *fileManager = [NSFileManager defaultManager]; + + if ([fileManager fileExistsAtPath: localizedPath]) { + NSMutableDictionary *tempPlist = [[NSMutableDictionary alloc]initWithContentsOfFile:localizedPath]; + + + [tempPlist setObject:[NSNumber numberWithBool:valoreBooleano] forKey:chiave]; + [tempPlist writeToFile:localizedPath atomically:YES]; + } else { + NSLog(@"NRSimplePlist - Errore nella MODIFICA BOOLEANA del file plist '%s'", [localizedPath UTF8String],nil); + NSLog(@"NRSimplePlist - Error EDITING BOOL of plist file '%s'", [localizedPath UTF8String],nil); + } +} + + ++(void)modificaDataPlist:(NSString *)nomeFile conChiave:(NSString*)chiave eData:(NSData*)data{ + + NSString *localizedPath = [[NSBundle mainBundle] pathForResource:nomeFile ofType:@"plist"]; + + NSFileManager *fileManager = [NSFileManager defaultManager]; + + if ([fileManager fileExistsAtPath: localizedPath]) { + NSMutableDictionary *tempPlist = [[NSMutableDictionary alloc]initWithContentsOfFile:localizedPath]; + + [tempPlist setObject:data forKey:chiave]; + [tempPlist writeToFile:localizedPath atomically:YES]; + } else { + NSLog(@"NRSimplePlist - Errore nella MODIFICA DATA del file plist '%s'", [localizedPath UTF8String],nil); + NSLog(@"NRSimplePlist - Error EDITING DATA of plist file '%s'", [localizedPath UTF8String],nil); + } +} + ++(void)modificaDatePlist:(NSString *)nomeFile conChiave:(NSString*)chiave eDate:(NSDate*)date{ + + NSString *localizedPath = [[NSBundle mainBundle] pathForResource:nomeFile ofType:@"plist"]; + + NSFileManager *fileManager = [NSFileManager defaultManager]; + + if ([fileManager fileExistsAtPath: localizedPath]) { + NSMutableDictionary *tempPlist = [[NSMutableDictionary alloc]initWithContentsOfFile:localizedPath]; + + [tempPlist setObject:date forKey:chiave]; + [tempPlist writeToFile:localizedPath atomically:YES]; + } else { + NSLog(@"NRSimplePlist - Errore nella MODIFICA DATE del file plist '%s'", [localizedPath UTF8String],nil); + NSLog(@"NRSimplePlist - Error EDITING DATE of plist file '%s'", [localizedPath UTF8String],nil); + } +} + ++(void)modificaArrayPlist:(NSString *)nomeFile conChiave:(NSString*)chiave eArray:(NSArray*)array{ + + NSString *localizedPath = [[NSBundle mainBundle] pathForResource:nomeFile ofType:@"plist"]; + + NSFileManager *fileManager = [NSFileManager defaultManager]; + + if ([fileManager fileExistsAtPath: localizedPath]) { + NSMutableDictionary *tempPlist = [[NSMutableDictionary alloc]initWithContentsOfFile:localizedPath]; + + [tempPlist setObject:array forKey:chiave]; + [tempPlist writeToFile:localizedPath atomically:YES]; + } else { + NSLog(@"NRSimplePlist - Errore nella MODIFICA ARRAY del file plist '%s'", [localizedPath UTF8String],nil); + NSLog(@"NRSimplePlist - Error EDITING ARRAY of plist file '%s'", [localizedPath UTF8String],nil); + } +} + ++(void)modificaDictionaryPlist:(NSString *)nomeFile conChiave:(NSString*)chiave eDictionary:(NSDictionary*)dictionary{ + + NSString *localizedPath = [[NSBundle mainBundle] pathForResource:nomeFile ofType:@"plist"]; + + NSFileManager *fileManager = [NSFileManager defaultManager]; + + if ([fileManager fileExistsAtPath: localizedPath]) { + NSMutableDictionary *tempPlist = [[NSMutableDictionary alloc]initWithContentsOfFile:localizedPath]; + + [tempPlist setObject:dictionary forKey:chiave]; + [tempPlist writeToFile:localizedPath atomically:YES]; + } else { + NSLog(@"NRSimplePlist - Errore nella MODIFICA DICTIONARY del file plist '%s'", [localizedPath UTF8String],nil); + NSLog(@"NRSimplePlist - Error EDITING DICTIONARY of plist file '%s'", [localizedPath UTF8String],nil); + } +} + + + +//ENGLISH +//Fetch ++(id)valuePlist:(NSString *)plistName withKey:(NSString*)key{ + return [self valorePlist:plistName conChiave:key]; +} +//String ++(void)editStringPlist:(NSString *)plistName withKey:(NSString*)key andString:(NSString*)string{ + [self modificaStringaPlist:plistName conChiave:key eStringa:string]; +} +//Number ++(void)editNumberPlist:(NSString *)plistName withKey:(NSString*)key andNumber:(NSNumber*)number{ + [self modificaNumeroPlist:plistName conChiave:key eNumero:number]; +} +//Bool ++(void)editBoolPlist:(NSString *)plistName withKey:(NSString*)key andBool:(BOOL)boolValue{ + [self modificaBoolPlist:plistName conChiave:key eBool:boolValue]; +} +//Data ++(void)editDataPlist:(NSString *)plistName withKey:(NSString*)key andData:(NSData*)data{ + [self modificaDataPlist:plistName conChiave:key eData:data]; +} +//Date ++(void)editDatePlist:(NSString *)plistName withKey:(NSString*)key andDate:(NSDate*)date{ + [self modificaDatePlist:plistName conChiave:key eDate:date]; +} +//Array ++(void)editArrayPlist:(NSString *)plistName withKey:(NSString*)key andArray:(NSArray*)array{ + [self modificaArrayPlist:plistName conChiave:key eArray:array]; +} +//Dictionary ++(void)editDictionaryPlist:(NSString *)plistName withKey:(NSString*)key andDictionary:(NSDictionary*)dictionary{ + [self modificaDictionaryPlist:plistName conChiave:key eDictionary:dictionary]; +} + +@end diff --git a/Pods/NRSimplePlist/NRSimplePlist/NRSwiftPlist.swift b/Pods/NRSimplePlist/NRSimplePlist/NRSwiftPlist.swift new file mode 100644 index 0000000..9488f90 --- /dev/null +++ b/Pods/NRSimplePlist/NRSimplePlist/NRSwiftPlist.swift @@ -0,0 +1,99 @@ +// +// NRswiftPlist.swift +// +// Created by Norman Russo on 04/11/14. +// Copyright (c) 2014 Norman Russo. All rights reserved. +// + +import UIKit + +public func plistGet(key:String, forPlistNamed:String) throws -> AnyObject{ + let formats: UnsafeMutablePointer = UnsafeMutablePointer() + + var array:NSArray = NSArray() + var tipo:AnyObject = "" + + enum NRSimplePlistError: ErrorType { + case Fatal(String) + } + + + if let path:String = NSBundle.mainBundle().pathForResource(forPlistNamed, ofType: "plist"){ + + if let plistData = NSData(contentsOfFile: path) { + + //var plist = NSPropertyListSerialization.propertyListWithData(plistData, options: 0, format: formats, error: &error) as NSDictionary + + do { + let plist = try NSPropertyListSerialization.propertyListWithData(plistData, options: NSPropertyListReadOptions.Immutable, format: formats) as! NSDictionary + + if (path=="") { + NSLog("NRSimplePlist - Errore LETTURA file plist '\(path)'") + NSLog("NRSimplePlist - Error READING plist file '\(path)'") + + throw NRSimplePlistError.Fatal("NRSimplePlist - Error READING plist file '\(path)'") + } + + tipo = plist.valueForKey(key)! + + return tipo + + } catch let error1 as NSError { + NSLog("NRSimplePlist - Errore LETTURA file plist '\(path)'") + NSLog("NRSimplePlist - Error READING plist file '\(path)'") + + throw error1 + } + + } + + } else { + print("File '\(forPlistNamed)' not found") + } + + return tipo +} + +public func plistSet(newValue:AnyObject, forKey:String, inPlistNamed:String) throws { + let formats: UnsafeMutablePointer = UnsafeMutablePointer() + + var array:NSMutableDictionary = NSMutableDictionary() + + let fileManager : NSFileManager = NSFileManager.defaultManager() + + + if let path : NSString = NSBundle.mainBundle().pathForResource(inPlistNamed, ofType: "plist") { + + if fileManager.fileExistsAtPath(path as String){ + + + if let plistData = NSData(contentsOfFile: path as String) { + + + do { + let plist = try NSPropertyListSerialization.propertyListWithData(plistData, options: NSPropertyListReadOptions.Immutable, format: formats) as! NSDictionary + + array = plist.mutableCopy() as! NSMutableDictionary + + array.setObject(newValue, forKey: forKey) + array.writeToFile(path as String, atomically: true) + + } catch let error1 as NSError { + NSLog("NRSimplePlist - Errore LETTURA file plist '\(path)'") + NSLog("NRSimplePlist - Error READING plist file '\(path)'") + + throw error1 + } + + } + + } else { + print("File '\(inPlistNamed)' not found setting value \(newValue) for key \(forKey)") + } + + }else{ + print("NRswiftPlist - The file in the path doesn't exists") + } + + +} diff --git a/Pods/NRSimplePlist/README.md b/Pods/NRSimplePlist/README.md new file mode 100644 index 0000000..fbf9b5b --- /dev/null +++ b/Pods/NRSimplePlist/README.md @@ -0,0 +1,210 @@ +NRSimplePlist +============= + +COCOAPODS +

pod 'NRSimplePlist'
+ +ENGLISH +============= + +###Easy library to fetch and edit data from and to plists on the fly (XCode) + + +--- + +## Usage + +### Swift Version +Get values (return AnyObject): +
+
+ plistGet(key:String, forPlistNamed:String) -> AnyObject
+
+
+ +Set value for key: +
+
+ plistSet(newValue:AnyObject, forKey:String, inPlistNamed:String)
+
+
+ +With Arrays and Dictionaries you have to set the var to a .mutableCopy() of it before setting it: +
+
+ var value = plistGet(...)
+ value = value.mutableCopy()
+
+
+ +--- +### Example - Swift Version + +Fetching the name of background music from the 'settings.plist' file into the project: + + var stringFromPlist : NSString = plistGet("settings", "backgroundMusic") as NSString + + +Editing the background music, saving the changes on the fly: + + //You can put this into a viewDidLoad method, a generic method, a class or where you need it! + plistSet("bgMusic2.mp3", "backgroundMusic", "settings") + //Set new value "bgMusic2.mp3" for key "backgroundMusic" in Plist named "settings" + +--- +### Objective-C Version +Fetch values: +
+
+ + (id)valuePlist:(NSString *)plistName withKey:(NSString*)key;
+
+
+ + +edit values, depending of his type, with: +
+
+ //String
+    +(void)editStringPlist:(NSString *)plistName withKey:(NSString*)key andString:(NSString*)string;
+
+ //Number
+	 +(void)editNumberPlist:(NSString *)plistName withKey:(NSString*)key andNumber:(NSNumber*)number;
+
+ //Bool
+	 +(void)editBoolPlist:(NSString *)plistName withKey:(NSString*)key andBool:(BOOL)boolValue;
+
+ //Data
+	 +(void)editDataPlist:(NSString *)plistName withKey:(NSString*)key andData:(NSData*)data;
+
+ //Date
+	 +(void)editDatePlist:(NSString *)plistName withKey:(NSString*)key andDate:(NSDate*)date;
+
+ //Array
+	 +(void)editArrayPlist:(NSString *)plistName withKey:(NSString*)key andArray:(NSArray*)array;
+
+ //Dictionary
+	 +(void)editDictionaryPlist:(NSString *)plistName withKey:(NSString*)key andDictionary:(NSDictionary*)dictionary;
+
+
+ +--- +## Examples - Objective-C Version + +Fetching the name of background music from the 'settings.plist' file into the project: + + NSString *stringFromPlist = [NRSimplePlist valuePlist:@"settings" withKey:@"backgroundMusic"]; + + +Editing the background music, saving the changes on the fly: + + //You can put this into a viewDidLoad method, a generic method, a class or where you need it! + [NRSimplePlist editStringPlist:@"settings" withKey:@"backgroundMusic" andString:@"bgMusic2.mp3"]; + + +Easy, right? +Let's give it a try! + + +N.B. If you want to save sensible data DON'T USE PLISTS! Use CoreData instead or MySQL/MySQLi database! + + + + +ITALIANO +============= +###Semplice libreria per recuperare dati da file plist e modificarli al volo (XCode) + + +--- + +## Utilizzo +### Versione Swift (solo in inglese per praticità) +Ritorna il valore passando una chiave (ritorna NSString): +
+
+ plistGet(key:String, forPlistNamed:String) -> AnyObject
+
+
+ +Setta un valore nel file per la chiave passata: +
+
+ plistSet(newValue:AnyObject, forKey:String, inPlistNamed:String)
+
+
+ +Con Array e Dictionary devi settare la variabile in una versione .mutableCopy() prima di poterli modificare: +
+
+ var value = plistGet(...)
+ value = value.mutableCopy()
+
+
+--- +### Esempio - Versione Swift + +Estraiamo il nome della musica di sottofondo dal file 'settaggi.plist' presente nel progetto: + + var stringFromPlist : NSString = plistGet("settings", "backgroundMusic") as NSString + + +Modifichiamo ora la musica di sottofondo, salvando subito il cambiamento: + + plistSet("bgMusic2.mp3", "backgroundMusic", "settings") + //Setta nuovo valore "bgMusic2.mp3" per la chiave "backgroundMusic" nel file Plist "settings" + +--- +### Versione Objective-C + +Recupera i valori con: +
+
+ + (id)valorePlist:(NSString *)nomeFile conChiave:(NSString*)chiave;
+
+
+ + +Modifica i valori, a seconda del tipo, con: +
+
+ //Stringa
+    +(void)modificaStringaPlist:(NSString *)nomeFile conChiave:(NSString*)chiave eStringa:(NSString*)stringa;
+
+ //Numero
+	 +(void)modificaNumeroPlist:(NSString *)nomeFile conChiave:(NSString*)chiave eNumero:(NSNumber*)numero;
+
+ //Bool
+	 +(void)modificaBoolPlist:(NSString *)nomeFile conChiave:(NSString*)chiave eBool:(BOOL)valoreBooleano;
+
+ //Data
+	 +(void)modificaDataPlist:(NSString *)nomeFile conChiave:(NSString*)chiave eData:(NSData*)data;
+
+ //Date
+	 +(void)modificaDatePlist:(NSString *)nomeFile conChiave:(NSString*)chiave eDate:(NSDate*)date;
+
+ //Array
+	 +(void)modificaArrayPlist:(NSString *)nomeFile conChiave:(NSString*)chiave eArray:(NSArray*)array;
+
+ //Dictionary
+	 +(void)modificaDictionaryPlist:(NSString *)nomeFile conChiave:(NSString*)chiave eDictionary:(NSDictionary*)dictionary;
+
+
+ +--- +## Esempio - Versione Objective-C + +Estraiamo il nome della musica di sottofondo dal file 'settaggi.plist' presente nel progetto: + + NSString *stringaDaPlist = [NRSimplePlist valorePlist:@"settaggi" conChiave:@"musicaSottofondo"]; + + +Modifichiamo ora la musica di sottofondo, salvando subito il cambiamento: + + [NRSimplePlist modificaStringaPlist:@"settaggi" conChiave:@"musicaSottofondo" eStringa:@"sottofondo2.mp3"]; + + +Semplice no? +Provaci anche tu! + + +N.B. Se devi passare dati sensibili NON USARE LE PLIST ma utilizza CoreData o i database MySQL o MySQLi! diff --git a/Pods/Pods.xcodeproj/project.pbxproj b/Pods/Pods.xcodeproj/project.pbxproj new file mode 100644 index 0000000..7476d60 --- /dev/null +++ b/Pods/Pods.xcodeproj/project.pbxproj @@ -0,0 +1,1308 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 0729DED1737DCDB309394E0B59393F37 /* Dimension.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7E145A4B742059CCE81A09E084D6662 /* Dimension.swift */; }; + 100A5584C0A8CD5D2446286A9E1F71CC /* SwiftyUserDefaults-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = AAF60EF6E7AC9FE7552A58DBF8EEC29B /* SwiftyUserDefaults-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 176703ABCC78E9E6054446BEDAA01B6B /* NRSimplePlist-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 847E4D6DC3BE172F2DAC62AEE928D5E3 /* NRSimplePlist-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 17FC57D10EC45464E48705C096EBE026 /* SwiftyUserDefaults.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79BD8D19883AC76B711C713F8A531E2E /* SwiftyUserDefaults.swift */; }; + 1E23B4C8861E51A2EA983932BF0BDB0D /* SVProgressHUD.h in Headers */ = {isa = PBXBuildFile; fileRef = D7AF0054F70BF53EE5A6B8CF83A2EF3F /* SVProgressHUD.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2057FF930EF0F28E7AD548BF23BE78EE /* Edge.swift in Sources */ = {isa = PBXBuildFile; fileRef = A89BA9F143624847CDB3AFFA6B14A01A /* Edge.swift */; }; + 2181A7C1B66444084A5144E6CE773CC5 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 258B0C8029B3982F03A30ED9FB271283 /* Foundation.framework */; }; + 24D0E07008EFBA1537B80A167FF8FBC9 /* SwiftyUserDefaults-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = C5076AE533DFCAC7E8ED9BBD6B72B4D7 /* SwiftyUserDefaults-dummy.m */; }; + 28515F6FFAA0E2F9591A862D532F33AC /* Compound.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EB27FCA7050E318A5B59693ECB3DE13 /* Compound.swift */; }; + 364F0BD787695499D1CEA5C699E6A108 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 258B0C8029B3982F03A30ED9FB271283 /* Foundation.framework */; }; + 369CA2AACEED2517C99D77D7700DFCEA /* Distribute.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8454A1D1D181D9B136FF23B3DEC1332C /* Distribute.swift */; }; + 3A258BDD5EFE319EE52CD613454CB66F /* SVProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = 02963E765FDA0B218D7490D0DF74D61B /* SVProgressHUD.m */; }; + 402AA92D530F3A5D0E33366EE2D04865 /* SVProgressHUD-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 671E48929BF9866811F07921BF6A5497 /* SVProgressHUD-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 452C09D0CAC1F8286ABA1CE076033B23 /* Context.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE75E8AA8ECDEEBFB8F406A740C1530C /* Context.swift */; }; + 4723C7F9B96EBDCD864FFA2CED5D365C /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 258B0C8029B3982F03A30ED9FB271283 /* Foundation.framework */; }; + 48ADE3FB3F30FCA5893083351449DA98 /* ViewUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28025A9DF99EBC7B260CA93E3C5E5110 /* ViewUtils.swift */; }; + 5044CA9F7CCBB02F3C294106022FCF9F /* Edges.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04CB9A7E05C78FCBC5D15A46B0724A5D /* Edges.swift */; }; + 53138908711767F6BCE173C1C768978F /* Pods-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 894E5DA93A9F359521A89826BE6DA777 /* Pods-dummy.m */; }; + 54769EF1C0F61CB9673D0B8FAADC6F56 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 258B0C8029B3982F03A30ED9FB271283 /* Foundation.framework */; }; + 584B68A7069844742AEF67ED9311FF50 /* Align.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1AF46336983C9FF7A6F9B02C6D42D5E /* Align.swift */; }; + 630D5582B9554056AE0FF70A4DE8205F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 258B0C8029B3982F03A30ED9FB271283 /* Foundation.framework */; }; + 679B994E3DC25AE440295FC724CD1543 /* SVProgressHUD-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = DFC82D4D7BF0E681593C770BE1A731A7 /* SVProgressHUD-dummy.m */; }; + 78EF482C3D11F052466EB92EAF38C9F5 /* NRSimplePlist.m in Sources */ = {isa = PBXBuildFile; fileRef = C3A605C0A3BE656C5CE1CF554BD32DB0 /* NRSimplePlist.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + 7CD04D81B5ED213A105DFC517187EB87 /* Expression.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7813B7FC5E7D5E82CF5308814E57C3C4 /* Expression.swift */; }; + 8378B61D28075525380201114F6E4582 /* LayoutProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3BFA327B9F89593B9BF19FB38B2FE93B /* LayoutProxy.swift */; }; + 94FA81E5AAD99FC80DC4123F16239B36 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 258B0C8029B3982F03A30ED9FB271283 /* Foundation.framework */; }; + 98AB9682D3AB96578EA453C3F3F487D8 /* SwiftyJSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47F95FAC4CAC028E9E6214F79561D0E5 /* SwiftyJSON.swift */; }; + 9BD6EFA65EAA838855459505EAE679B0 /* NRSwiftPlist.swift in Sources */ = {isa = PBXBuildFile; fileRef = 484DF3B3C920089D396B06C5467D9508 /* NRSwiftPlist.swift */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + 9C1262BE3B3269324CB70A3283FD327C /* NRSimplePlist.h in Headers */ = {isa = PBXBuildFile; fileRef = 20BBA2166A644B6E685A7532096BDE29 /* NRSimplePlist.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B23E3B878363F72D1E874E46EB62FA7F /* Size.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12F16442A855CAA1C420B23C6EBD39FA /* Size.swift */; }; + B2FEBD7126771E6FEB781A4C2FD7CD9B /* Pods-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BCC458FDD5F692BBB2BFC64BB5701FC /* Pods-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B90891688A088BC37455234028C2E993 /* Cartography-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = CF30C880022CABC0A3ABC24040BA0426 /* Cartography-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + BD3185E77842584160EC351FC9C736C9 /* SwiftyJSON-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = E113183A0B7DC47A8DDA1AACA774E711 /* SwiftyJSON-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + BE2FC20F5EDBAE658F688978AB12C279 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13755C7AAABAF8BB793C706325A14A08 /* Extensions.swift */; }; + C1FEA78662815B0056544F51AC6FD8D2 /* SVIndefiniteAnimatedView.m in Sources */ = {isa = PBXBuildFile; fileRef = 55D7CC80B036FE7C8459F1B598CDEFD2 /* SVIndefiniteAnimatedView.m */; }; + C3649839064E53A4BF767D2EF29651EF /* Priority.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C3D7C89B1EEF39FA0ECB074258414DE /* Priority.swift */; }; + C7024D298381AD299280FF6D951AE7A1 /* SVRadialGradientLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 5494D63859B095A5010032C5A994B57C /* SVRadialGradientLayer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D2C9087C6581055C25D5559F934AF65B /* Constrain.swift in Sources */ = {isa = PBXBuildFile; fileRef = 60B404BC2C4F1F0E1120F9E7FECE14EC /* Constrain.swift */; }; + D3C01862D88692FA2E85A2D84345982B /* Point.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4D951074EF6C31F7F7AD125267F66F37 /* Point.swift */; }; + D46E6398FA4B45903AEAA413F9686384 /* NRSimplePlist-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 45EC9649A30CD0C999811A18B976FB36 /* NRSimplePlist-dummy.m */; }; + D56BD3B0ACF32790F3EF43EA3DB08016 /* Cartography-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 14C98DA0A89122B37499AC9F4662228E /* Cartography-dummy.m */; }; + DB79BC8C88B1F2BEE185075299D62DD7 /* SVIndefiniteAnimatedView.h in Headers */ = {isa = PBXBuildFile; fileRef = FB5A6AD21A38ED275D8DC6A6E2A12DAD /* SVIndefiniteAnimatedView.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E1451AA498D7B41C4E049F5D9027B4A7 /* ConstraintGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4DDD4748E106EEEAB90AD5D2C251EE8 /* ConstraintGroup.swift */; }; + E81F7D34FE1B8460E1147359B1964607 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B18F24645AA4D651DFC7B69A3A0833DB /* QuartzCore.framework */; }; + EB357393D049479D8AFE405EC00797B5 /* SwiftyJSON-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 114240EF0235FCE08C193C6988770D87 /* SwiftyJSON-dummy.m */; }; + EB9E85B0CE6A53DCBDE040A716B5DBF8 /* Property.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22EE3503D49E7FA6EC90BEFA9DE27331 /* Property.swift */; }; + ED6360866D1FB0F3A56AFEF657E1052B /* SVProgressHUD.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 39F626C4839B1D6C68820303CBBAC377 /* SVProgressHUD.bundle */; }; + EE94E3F06DA2F096BA43F0679567DC4B /* Coefficients.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45B40C51901B5B826ABDAC777D2E4234 /* Coefficients.swift */; }; + F433CC554BD7A71E9BFB327FAC2B3241 /* SVRadialGradientLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = EFE31E52067D047B96ED9EC2EBD476D4 /* SVRadialGradientLayer.m */; }; + F469BC9885602957FCB73DD39B5B92B0 /* Constraint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BC60B77D3EFB57CE61B6A660F8C3E5F /* Constraint.swift */; }; + F95ADCA0B85C6C0640372D3EFBBF1AD6 /* View.swift in Sources */ = {isa = PBXBuildFile; fileRef = 469E7632669345C309F58B2E05EA5E65 /* View.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 2E427D3BF689D07DB9BC51D2C6CB59E5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 01F2FAAF48B4CFE9933A1165FB93C16E; + remoteInfo = NRSimplePlist; + }; + 481A45EE44C2068C5EB2E52E0DAC031C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = C3A04698AAE4D6124C20602D622956E5; + remoteInfo = Cartography; + }; + 6D83AD1CC7D9B92D00EDEF595208E160 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = D54AD609367F08C428BCB32BC2CCE443; + remoteInfo = SVProgressHUD; + }; + 84936821966D393498013499921BD034 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 84CE7A9DEDB18CAEE72169556A611AB8; + remoteInfo = SwiftyUserDefaults; + }; + AB90E5EB44D4D9AEAFE2057D455907D3 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 4E00D50FA19E0C57AAD724F6FA0CE5D0; + remoteInfo = SwiftyJSON; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 00AC6C275997C30360C0966F126D5085 /* SwiftyJSON.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = SwiftyJSON.modulemap; sourceTree = ""; }; + 02963E765FDA0B218D7490D0DF74D61B /* SVProgressHUD.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = SVProgressHUD.m; path = SVProgressHUD/SVProgressHUD.m; sourceTree = ""; }; + 04CB9A7E05C78FCBC5D15A46B0724A5D /* Edges.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Edges.swift; path = Cartography/Edges.swift; sourceTree = ""; }; + 052DB60B821BBC3B7C3409D0F00D9C66 /* SwiftyJSON.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SwiftyJSON.xcconfig; sourceTree = ""; }; + 0C3D7C89B1EEF39FA0ECB074258414DE /* Priority.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Priority.swift; path = Cartography/Priority.swift; sourceTree = ""; }; + 114240EF0235FCE08C193C6988770D87 /* SwiftyJSON-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SwiftyJSON-dummy.m"; sourceTree = ""; }; + 12F16442A855CAA1C420B23C6EBD39FA /* Size.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Size.swift; path = Cartography/Size.swift; sourceTree = ""; }; + 13755C7AAABAF8BB793C706325A14A08 /* Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Extensions.swift; path = Cartography/Extensions.swift; sourceTree = ""; }; + 14C98DA0A89122B37499AC9F4662228E /* Cartography-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Cartography-dummy.m"; sourceTree = ""; }; + 19E931B280459D6585DC0CC0A6FD3B42 /* Cartography.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Cartography.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 1EB27FCA7050E318A5B59693ECB3DE13 /* Compound.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Compound.swift; path = Cartography/Compound.swift; sourceTree = ""; }; + 20BBA2166A644B6E685A7532096BDE29 /* NRSimplePlist.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = NRSimplePlist.h; path = NRSimplePlist/NRSimplePlist.h; sourceTree = ""; }; + 22EE3503D49E7FA6EC90BEFA9DE27331 /* Property.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Property.swift; path = Cartography/Property.swift; sourceTree = ""; }; + 23ADDE3A87D479A1D08AC3BEACB7CB69 /* Cartography-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Cartography-prefix.pch"; sourceTree = ""; }; + 2462D3D61D8BCFC0888699E2FC3D4EF7 /* SVProgressHUD.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SVProgressHUD.xcconfig; sourceTree = ""; }; + 258B0C8029B3982F03A30ED9FB271283 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + 26A4D4F7F9E36EB8A143FB0B4FD9221C /* SwiftyJSON.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SwiftyJSON.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 28025A9DF99EBC7B260CA93E3C5E5110 /* ViewUtils.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ViewUtils.swift; path = Cartography/ViewUtils.swift; sourceTree = ""; }; + 2BCC458FDD5F692BBB2BFC64BB5701FC /* Pods-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-umbrella.h"; sourceTree = ""; }; + 31C3BEB86A1E165ADFD0B7ABC509B888 /* Crashlytics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Crashlytics.framework; sourceTree = ""; }; + 3921795EC0832F8DB35898EE6D2C55A2 /* NRSimplePlist-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "NRSimplePlist-prefix.pch"; sourceTree = ""; }; + 39F626C4839B1D6C68820303CBBAC377 /* SVProgressHUD.bundle */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "wrapper.plug-in"; name = SVProgressHUD.bundle; path = SVProgressHUD/SVProgressHUD.bundle; sourceTree = ""; }; + 3BFA327B9F89593B9BF19FB38B2FE93B /* LayoutProxy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LayoutProxy.swift; path = Cartography/LayoutProxy.swift; sourceTree = ""; }; + 45B40C51901B5B826ABDAC777D2E4234 /* Coefficients.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Coefficients.swift; path = Cartography/Coefficients.swift; sourceTree = ""; }; + 45EC9649A30CD0C999811A18B976FB36 /* NRSimplePlist-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "NRSimplePlist-dummy.m"; sourceTree = ""; }; + 469E7632669345C309F58B2E05EA5E65 /* View.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = View.swift; path = Cartography/View.swift; sourceTree = ""; }; + 47F95FAC4CAC028E9E6214F79561D0E5 /* SwiftyJSON.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SwiftyJSON.swift; path = Source/SwiftyJSON.swift; sourceTree = ""; }; + 484DF3B3C920089D396B06C5467D9508 /* NRSwiftPlist.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NRSwiftPlist.swift; path = NRSimplePlist/NRSwiftPlist.swift; sourceTree = ""; }; + 4CB04C2E3722671BE61BD1F1F37DCFFF /* SwiftyUserDefaults.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SwiftyUserDefaults.xcconfig; sourceTree = ""; }; + 4D951074EF6C31F7F7AD125267F66F37 /* Point.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Point.swift; path = Cartography/Point.swift; sourceTree = ""; }; + 5494D63859B095A5010032C5A994B57C /* SVRadialGradientLayer.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SVRadialGradientLayer.h; path = SVProgressHUD/SVRadialGradientLayer.h; sourceTree = ""; }; + 55D7CC80B036FE7C8459F1B598CDEFD2 /* SVIndefiniteAnimatedView.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = SVIndefiniteAnimatedView.m; path = SVProgressHUD/SVIndefiniteAnimatedView.m; sourceTree = ""; }; + 57C7FAD2EC3CBF069773EC5F8F261FCE /* SVProgressHUD-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SVProgressHUD-prefix.pch"; sourceTree = ""; }; + 599A39D54924ABC48A70F079B0E1D457 /* SVProgressHUD.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SVProgressHUD.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 5BC60B77D3EFB57CE61B6A660F8C3E5F /* Constraint.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Constraint.swift; path = Cartography/Constraint.swift; sourceTree = ""; }; + 5FF42E258C93461E8085AD510B2924A5 /* SwiftyJSON-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftyJSON-prefix.pch"; sourceTree = ""; }; + 60B404BC2C4F1F0E1120F9E7FECE14EC /* Constrain.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Constrain.swift; path = Cartography/Constrain.swift; sourceTree = ""; }; + 671E48929BF9866811F07921BF6A5497 /* SVProgressHUD-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SVProgressHUD-umbrella.h"; sourceTree = ""; }; + 6770D55CAB9E3CEF49F954120D5A9E9E /* Fabric.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Fabric.framework; sourceTree = ""; }; + 6986F74E570CAA0C29979E5A669B039E /* SwiftyUserDefaults.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SwiftyUserDefaults.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 69F8094A279A2731A12B5401BFCB2031 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 741627B585B5ED1CCD7B4C6B997C2C1E /* SwiftyUserDefaults.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = SwiftyUserDefaults.modulemap; sourceTree = ""; }; + 76BB9853B30A617DBBABCE6744632FAB /* SwiftyUserDefaults-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftyUserDefaults-prefix.pch"; sourceTree = ""; }; + 7813B7FC5E7D5E82CF5308814E57C3C4 /* Expression.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Expression.swift; path = Cartography/Expression.swift; sourceTree = ""; }; + 79A9DEDC89FE8336BF5FEDAAF75BF7FC /* Pods.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = Pods.modulemap; sourceTree = ""; }; + 79BD8D19883AC76B711C713F8A531E2E /* SwiftyUserDefaults.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SwiftyUserDefaults.swift; path = SwiftyUserDefaults/SwiftyUserDefaults.swift; sourceTree = ""; }; + 8454A1D1D181D9B136FF23B3DEC1332C /* Distribute.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Distribute.swift; path = Cartography/Distribute.swift; sourceTree = ""; }; + 847E4D6DC3BE172F2DAC62AEE928D5E3 /* NRSimplePlist-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "NRSimplePlist-umbrella.h"; sourceTree = ""; }; + 87B213035BAC5F75386F62D3C75D2342 /* Pods-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-acknowledgements.plist"; sourceTree = ""; }; + 894E5DA93A9F359521A89826BE6DA777 /* Pods-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-dummy.m"; sourceTree = ""; }; + 977577C045EDA9D9D1F46E2598D19FC7 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Pods.debug.xcconfig; sourceTree = ""; }; + A7E145A4B742059CCE81A09E084D6662 /* Dimension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Dimension.swift; path = Cartography/Dimension.swift; sourceTree = ""; }; + A89BA9F143624847CDB3AFFA6B14A01A /* Edge.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Edge.swift; path = Cartography/Edge.swift; sourceTree = ""; }; + A8FBFA569AF038938B543A831DBECCBC /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + A9B0D0FE5B3A9681F0B08A24D11D9B96 /* NRSimplePlist.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = NRSimplePlist.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + AAF60EF6E7AC9FE7552A58DBF8EEC29B /* SwiftyUserDefaults-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftyUserDefaults-umbrella.h"; sourceTree = ""; }; + B18F24645AA4D651DFC7B69A3A0833DB /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/QuartzCore.framework; sourceTree = DEVELOPER_DIR; }; + BA6428E9F66FD5A23C0A2E06ED26CD2F /* Podfile */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + BE75E8AA8ECDEEBFB8F406A740C1530C /* Context.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Context.swift; path = Cartography/Context.swift; sourceTree = ""; }; + C3A605C0A3BE656C5CE1CF554BD32DB0 /* NRSimplePlist.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = NRSimplePlist.m; path = NRSimplePlist/NRSimplePlist.m; sourceTree = ""; }; + C4DDD4748E106EEEAB90AD5D2C251EE8 /* ConstraintGroup.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintGroup.swift; path = Cartography/ConstraintGroup.swift; sourceTree = ""; }; + C5076AE533DFCAC7E8ED9BBD6B72B4D7 /* SwiftyUserDefaults-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SwiftyUserDefaults-dummy.m"; sourceTree = ""; }; + CBC0F7C552B739C909B650A0F42F7F38 /* Pods-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-resources.sh"; sourceTree = ""; }; + CF30C880022CABC0A3ABC24040BA0426 /* Cartography-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Cartography-umbrella.h"; sourceTree = ""; }; + D0405803033A2A777B8E4DFA0C1800ED /* Pods-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-acknowledgements.markdown"; sourceTree = ""; }; + D7AF0054F70BF53EE5A6B8CF83A2EF3F /* SVProgressHUD.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SVProgressHUD.h; path = SVProgressHUD/SVProgressHUD.h; sourceTree = ""; }; + DA18D531E905C95281DC6AFD6B313728 /* SVProgressHUD.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = SVProgressHUD.modulemap; sourceTree = ""; }; + DA312349A49333542E6F4B36B329960E /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Pods.release.xcconfig; sourceTree = ""; }; + DBE9AD950A2D86E22EF5AA92EDE814D6 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + DFC82D4D7BF0E681593C770BE1A731A7 /* SVProgressHUD-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SVProgressHUD-dummy.m"; sourceTree = ""; }; + E04F7BEE4344B791A919909718A8B8FB /* Cartography.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = Cartography.modulemap; sourceTree = ""; }; + E113183A0B7DC47A8DDA1AACA774E711 /* SwiftyJSON-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftyJSON-umbrella.h"; sourceTree = ""; }; + E65EE2008D87A49BF94F30E44F5D3B0A /* Pods.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + E7F21354943D9F42A70697D5A5EF72E9 /* Pods-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-frameworks.sh"; sourceTree = ""; }; + E8446514FBAD26C0E18F24A5715AEF67 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + E9DA7A1C3013E3BDA738AF2A5A194BC2 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + EA4408A5CD058BDEDD82D77D95C036F3 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + EC354D3DC48DFCDEEFB520BBAB335A05 /* NRSimplePlist.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = NRSimplePlist.xcconfig; sourceTree = ""; }; + EFE31E52067D047B96ED9EC2EBD476D4 /* SVRadialGradientLayer.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = SVRadialGradientLayer.m; path = SVProgressHUD/SVRadialGradientLayer.m; sourceTree = ""; }; + F1AF46336983C9FF7A6F9B02C6D42D5E /* Align.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Align.swift; path = Cartography/Align.swift; sourceTree = ""; }; + F1B129E9F49A8EE8E9471F27B773EEA6 /* Cartography.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Cartography.xcconfig; sourceTree = ""; }; + F9DC73F423C92C4B0664535FFC06BBA7 /* NRSimplePlist.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = NRSimplePlist.modulemap; sourceTree = ""; }; + FB5A6AD21A38ED275D8DC6A6E2A12DAD /* SVIndefiniteAnimatedView.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SVIndefiniteAnimatedView.h; path = SVProgressHUD/SVIndefiniteAnimatedView.h; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 429A34DF3BBD7321C9C7D6FBF5F1E3FB /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 94FA81E5AAD99FC80DC4123F16239B36 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 77D2AB8DCFDC2922F362890ACFE418C8 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4723C7F9B96EBDCD864FFA2CED5D365C /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A75C2269B1A275854D14AB26DCFFB50A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 630D5582B9554056AE0FF70A4DE8205F /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B5CA9B339E5C10BC1B227DEFC97B4BF3 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 364F0BD787695499D1CEA5C699E6A108 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + C39C862EDA8935060ACF4E4BA63FC445 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 2181A7C1B66444084A5144E6CE773CC5 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + CF6216EC3FD9C117ED1C9DC5CB2310CF /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 54769EF1C0F61CB9673D0B8FAADC6F56 /* Foundation.framework in Frameworks */, + E81F7D34FE1B8460E1147359B1964607 /* QuartzCore.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 0EF48784B2FBB627D7A9E43E6C396A9A /* Crashlytics */ = { + isa = PBXGroup; + children = ( + ACBDF3C7A46F3920FA8A090DC893CF74 /* Frameworks */, + ); + path = Crashlytics; + sourceTree = ""; + }; + 3926C638AD0708942C88C2BC89261735 /* iOS */ = { + isa = PBXGroup; + children = ( + 258B0C8029B3982F03A30ED9FB271283 /* Foundation.framework */, + B18F24645AA4D651DFC7B69A3A0833DB /* QuartzCore.framework */, + ); + name = iOS; + sourceTree = ""; + }; + 3F3F2E393D57AB4ED3D28FADC304297F /* Cartography */ = { + isa = PBXGroup; + children = ( + F1AF46336983C9FF7A6F9B02C6D42D5E /* Align.swift */, + 45B40C51901B5B826ABDAC777D2E4234 /* Coefficients.swift */, + 1EB27FCA7050E318A5B59693ECB3DE13 /* Compound.swift */, + 60B404BC2C4F1F0E1120F9E7FECE14EC /* Constrain.swift */, + 5BC60B77D3EFB57CE61B6A660F8C3E5F /* Constraint.swift */, + C4DDD4748E106EEEAB90AD5D2C251EE8 /* ConstraintGroup.swift */, + BE75E8AA8ECDEEBFB8F406A740C1530C /* Context.swift */, + A7E145A4B742059CCE81A09E084D6662 /* Dimension.swift */, + 8454A1D1D181D9B136FF23B3DEC1332C /* Distribute.swift */, + A89BA9F143624847CDB3AFFA6B14A01A /* Edge.swift */, + 04CB9A7E05C78FCBC5D15A46B0724A5D /* Edges.swift */, + 7813B7FC5E7D5E82CF5308814E57C3C4 /* Expression.swift */, + 13755C7AAABAF8BB793C706325A14A08 /* Extensions.swift */, + 3BFA327B9F89593B9BF19FB38B2FE93B /* LayoutProxy.swift */, + 4D951074EF6C31F7F7AD125267F66F37 /* Point.swift */, + 0C3D7C89B1EEF39FA0ECB074258414DE /* Priority.swift */, + 22EE3503D49E7FA6EC90BEFA9DE27331 /* Property.swift */, + 12F16442A855CAA1C420B23C6EBD39FA /* Size.swift */, + 469E7632669345C309F58B2E05EA5E65 /* View.swift */, + 28025A9DF99EBC7B260CA93E3C5E5110 /* ViewUtils.swift */, + 44E3D18E082FD691D9B3D84FA049F334 /* Support Files */, + ); + path = Cartography; + sourceTree = ""; + }; + 433CD3331B6C3787F473C941B61FC68F /* Frameworks */ = { + isa = PBXGroup; + children = ( + 3926C638AD0708942C88C2BC89261735 /* iOS */, + ); + name = Frameworks; + sourceTree = ""; + }; + 44E3D18E082FD691D9B3D84FA049F334 /* Support Files */ = { + isa = PBXGroup; + children = ( + E04F7BEE4344B791A919909718A8B8FB /* Cartography.modulemap */, + F1B129E9F49A8EE8E9471F27B773EEA6 /* Cartography.xcconfig */, + 14C98DA0A89122B37499AC9F4662228E /* Cartography-dummy.m */, + 23ADDE3A87D479A1D08AC3BEACB7CB69 /* Cartography-prefix.pch */, + CF30C880022CABC0A3ABC24040BA0426 /* Cartography-umbrella.h */, + A8FBFA569AF038938B543A831DBECCBC /* Info.plist */, + ); + name = "Support Files"; + path = "../Target Support Files/Cartography"; + sourceTree = ""; + }; + 4676791E39236A7CD1768DA716FA91DE /* Frameworks */ = { + isa = PBXGroup; + children = ( + 6770D55CAB9E3CEF49F954120D5A9E9E /* Fabric.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 511B8DAE067C738BA0B968097954F2D2 /* Support Files */ = { + isa = PBXGroup; + children = ( + E9DA7A1C3013E3BDA738AF2A5A194BC2 /* Info.plist */, + 741627B585B5ED1CCD7B4C6B997C2C1E /* SwiftyUserDefaults.modulemap */, + 4CB04C2E3722671BE61BD1F1F37DCFFF /* SwiftyUserDefaults.xcconfig */, + C5076AE533DFCAC7E8ED9BBD6B72B4D7 /* SwiftyUserDefaults-dummy.m */, + 76BB9853B30A617DBBABCE6744632FAB /* SwiftyUserDefaults-prefix.pch */, + AAF60EF6E7AC9FE7552A58DBF8EEC29B /* SwiftyUserDefaults-umbrella.h */, + ); + name = "Support Files"; + path = "../Target Support Files/SwiftyUserDefaults"; + sourceTree = ""; + }; + 52AC472375A3D0E28875A59034016E8F /* SwiftyJSON */ = { + isa = PBXGroup; + children = ( + 47F95FAC4CAC028E9E6214F79561D0E5 /* SwiftyJSON.swift */, + CAE5134AE8A2D6C34D98712A971F50B6 /* Support Files */, + ); + path = SwiftyJSON; + sourceTree = ""; + }; + 552C4A0A77B569F102AD1C5DCB7B5498 /* SVProgressHUD */ = { + isa = PBXGroup; + children = ( + FB5A6AD21A38ED275D8DC6A6E2A12DAD /* SVIndefiniteAnimatedView.h */, + 55D7CC80B036FE7C8459F1B598CDEFD2 /* SVIndefiniteAnimatedView.m */, + D7AF0054F70BF53EE5A6B8CF83A2EF3F /* SVProgressHUD.h */, + 02963E765FDA0B218D7490D0DF74D61B /* SVProgressHUD.m */, + 5494D63859B095A5010032C5A994B57C /* SVRadialGradientLayer.h */, + EFE31E52067D047B96ED9EC2EBD476D4 /* SVRadialGradientLayer.m */, + 7F8E2C3D0A2FD5008E0B70FCD9BEF17C /* Resources */, + 68EDF67BE319E087C3F9930D9EA2CB70 /* Support Files */, + ); + path = SVProgressHUD; + sourceTree = ""; + }; + 631DC57A5C5BFB787C39F1BC0DDBC58F /* Base */ = { + isa = PBXGroup; + children = ( + 4676791E39236A7CD1768DA716FA91DE /* Frameworks */, + ); + name = Base; + sourceTree = ""; + }; + 68EDF67BE319E087C3F9930D9EA2CB70 /* Support Files */ = { + isa = PBXGroup; + children = ( + 69F8094A279A2731A12B5401BFCB2031 /* Info.plist */, + DA18D531E905C95281DC6AFD6B313728 /* SVProgressHUD.modulemap */, + 2462D3D61D8BCFC0888699E2FC3D4EF7 /* SVProgressHUD.xcconfig */, + DFC82D4D7BF0E681593C770BE1A731A7 /* SVProgressHUD-dummy.m */, + 57C7FAD2EC3CBF069773EC5F8F261FCE /* SVProgressHUD-prefix.pch */, + 671E48929BF9866811F07921BF6A5497 /* SVProgressHUD-umbrella.h */, + ); + name = "Support Files"; + path = "../Target Support Files/SVProgressHUD"; + sourceTree = ""; + }; + 75D98FF52E597A11900E131B6C4E1ADA /* Pods */ = { + isa = PBXGroup; + children = ( + E8446514FBAD26C0E18F24A5715AEF67 /* Info.plist */, + 79A9DEDC89FE8336BF5FEDAAF75BF7FC /* Pods.modulemap */, + D0405803033A2A777B8E4DFA0C1800ED /* Pods-acknowledgements.markdown */, + 87B213035BAC5F75386F62D3C75D2342 /* Pods-acknowledgements.plist */, + 894E5DA93A9F359521A89826BE6DA777 /* Pods-dummy.m */, + E7F21354943D9F42A70697D5A5EF72E9 /* Pods-frameworks.sh */, + CBC0F7C552B739C909B650A0F42F7F38 /* Pods-resources.sh */, + 2BCC458FDD5F692BBB2BFC64BB5701FC /* Pods-umbrella.h */, + 977577C045EDA9D9D1F46E2598D19FC7 /* Pods.debug.xcconfig */, + DA312349A49333542E6F4B36B329960E /* Pods.release.xcconfig */, + ); + name = Pods; + path = "Target Support Files/Pods"; + sourceTree = ""; + }; + 7DB346D0F39D3F0E887471402A8071AB = { + isa = PBXGroup; + children = ( + BA6428E9F66FD5A23C0A2E06ED26CD2F /* Podfile */, + 433CD3331B6C3787F473C941B61FC68F /* Frameworks */, + A8EACEC951552ED8D09F597DF7698C3A /* Pods */, + 81D37C8AD89C7A9F9B32A665EF1D74E7 /* Products */, + B7B80995527643776607AFFA75B91E24 /* Targets Support Files */, + ); + sourceTree = ""; + }; + 7F8E2C3D0A2FD5008E0B70FCD9BEF17C /* Resources */ = { + isa = PBXGroup; + children = ( + 39F626C4839B1D6C68820303CBBAC377 /* SVProgressHUD.bundle */, + ); + name = Resources; + sourceTree = ""; + }; + 81D37C8AD89C7A9F9B32A665EF1D74E7 /* Products */ = { + isa = PBXGroup; + children = ( + 19E931B280459D6585DC0CC0A6FD3B42 /* Cartography.framework */, + A9B0D0FE5B3A9681F0B08A24D11D9B96 /* NRSimplePlist.framework */, + E65EE2008D87A49BF94F30E44F5D3B0A /* Pods.framework */, + 599A39D54924ABC48A70F079B0E1D457 /* SVProgressHUD.framework */, + 26A4D4F7F9E36EB8A143FB0B4FD9221C /* SwiftyJSON.framework */, + 6986F74E570CAA0C29979E5A669B039E /* SwiftyUserDefaults.framework */, + ); + name = Products; + sourceTree = ""; + }; + 86EFA1E104A33CE727CDDF16A7C20100 /* NRSimplePlist */ = { + isa = PBXGroup; + children = ( + 20BBA2166A644B6E685A7532096BDE29 /* NRSimplePlist.h */, + C3A605C0A3BE656C5CE1CF554BD32DB0 /* NRSimplePlist.m */, + 484DF3B3C920089D396B06C5467D9508 /* NRSwiftPlist.swift */, + FAD71126BC0A9DC37123728142875776 /* Support Files */, + ); + path = NRSimplePlist; + sourceTree = ""; + }; + A8EACEC951552ED8D09F597DF7698C3A /* Pods */ = { + isa = PBXGroup; + children = ( + 3F3F2E393D57AB4ED3D28FADC304297F /* Cartography */, + 0EF48784B2FBB627D7A9E43E6C396A9A /* Crashlytics */, + EA8B600D64E8401928FCF98C7666EBAD /* Fabric */, + 86EFA1E104A33CE727CDDF16A7C20100 /* NRSimplePlist */, + 552C4A0A77B569F102AD1C5DCB7B5498 /* SVProgressHUD */, + 52AC472375A3D0E28875A59034016E8F /* SwiftyJSON */, + AB36DAEFF9BBE71964342AA2E124AEE3 /* SwiftyUserDefaults */, + ); + name = Pods; + sourceTree = ""; + }; + AB36DAEFF9BBE71964342AA2E124AEE3 /* SwiftyUserDefaults */ = { + isa = PBXGroup; + children = ( + 79BD8D19883AC76B711C713F8A531E2E /* SwiftyUserDefaults.swift */, + 511B8DAE067C738BA0B968097954F2D2 /* Support Files */, + ); + path = SwiftyUserDefaults; + sourceTree = ""; + }; + ACBDF3C7A46F3920FA8A090DC893CF74 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 31C3BEB86A1E165ADFD0B7ABC509B888 /* Crashlytics.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + B7B80995527643776607AFFA75B91E24 /* Targets Support Files */ = { + isa = PBXGroup; + children = ( + 75D98FF52E597A11900E131B6C4E1ADA /* Pods */, + ); + name = "Targets Support Files"; + sourceTree = ""; + }; + CAE5134AE8A2D6C34D98712A971F50B6 /* Support Files */ = { + isa = PBXGroup; + children = ( + EA4408A5CD058BDEDD82D77D95C036F3 /* Info.plist */, + 00AC6C275997C30360C0966F126D5085 /* SwiftyJSON.modulemap */, + 052DB60B821BBC3B7C3409D0F00D9C66 /* SwiftyJSON.xcconfig */, + 114240EF0235FCE08C193C6988770D87 /* SwiftyJSON-dummy.m */, + 5FF42E258C93461E8085AD510B2924A5 /* SwiftyJSON-prefix.pch */, + E113183A0B7DC47A8DDA1AACA774E711 /* SwiftyJSON-umbrella.h */, + ); + name = "Support Files"; + path = "../Target Support Files/SwiftyJSON"; + sourceTree = ""; + }; + EA8B600D64E8401928FCF98C7666EBAD /* Fabric */ = { + isa = PBXGroup; + children = ( + 631DC57A5C5BFB787C39F1BC0DDBC58F /* Base */, + ); + path = Fabric; + sourceTree = ""; + }; + FAD71126BC0A9DC37123728142875776 /* Support Files */ = { + isa = PBXGroup; + children = ( + DBE9AD950A2D86E22EF5AA92EDE814D6 /* Info.plist */, + F9DC73F423C92C4B0664535FFC06BBA7 /* NRSimplePlist.modulemap */, + EC354D3DC48DFCDEEFB520BBAB335A05 /* NRSimplePlist.xcconfig */, + 45EC9649A30CD0C999811A18B976FB36 /* NRSimplePlist-dummy.m */, + 3921795EC0832F8DB35898EE6D2C55A2 /* NRSimplePlist-prefix.pch */, + 847E4D6DC3BE172F2DAC62AEE928D5E3 /* NRSimplePlist-umbrella.h */, + ); + name = "Support Files"; + path = "../Target Support Files/NRSimplePlist"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 07CCAF62764AAF5A3C288296D9245445 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + DB79BC8C88B1F2BEE185075299D62DD7 /* SVIndefiniteAnimatedView.h in Headers */, + 402AA92D530F3A5D0E33366EE2D04865 /* SVProgressHUD-umbrella.h in Headers */, + 1E23B4C8861E51A2EA983932BF0BDB0D /* SVProgressHUD.h in Headers */, + C7024D298381AD299280FF6D951AE7A1 /* SVRadialGradientLayer.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 14A51B3999BC947A6098955DCCD331AF /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 176703ABCC78E9E6054446BEDAA01B6B /* NRSimplePlist-umbrella.h in Headers */, + 9C1262BE3B3269324CB70A3283FD327C /* NRSimplePlist.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 514705BF944036B79FA99816C564643C /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + B90891688A088BC37455234028C2E993 /* Cartography-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 746216B33B1D5D6EF2395B9AC696C8BB /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + B2FEBD7126771E6FEB781A4C2FD7CD9B /* Pods-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + C7DD8A551194957C34BCC7F8727CEB56 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 100A5584C0A8CD5D2446286A9E1F71CC /* SwiftyUserDefaults-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D6A217F2425793BA8B7744C46A316378 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + BD3185E77842584160EC351FC9C736C9 /* SwiftyJSON-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 01F2FAAF48B4CFE9933A1165FB93C16E /* NRSimplePlist */ = { + isa = PBXNativeTarget; + buildConfigurationList = B3245BFB3E1DBD60887B9986A3B9768F /* Build configuration list for PBXNativeTarget "NRSimplePlist" */; + buildPhases = ( + 6DED799EBA09E287D0B53D2D12A69283 /* Sources */, + A75C2269B1A275854D14AB26DCFFB50A /* Frameworks */, + 14A51B3999BC947A6098955DCCD331AF /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = NRSimplePlist; + productName = NRSimplePlist; + productReference = A9B0D0FE5B3A9681F0B08A24D11D9B96 /* NRSimplePlist.framework */; + productType = "com.apple.product-type.framework"; + }; + 4E00D50FA19E0C57AAD724F6FA0CE5D0 /* SwiftyJSON */ = { + isa = PBXNativeTarget; + buildConfigurationList = 583B619CC10B209748DA3BA4C5E416A7 /* Build configuration list for PBXNativeTarget "SwiftyJSON" */; + buildPhases = ( + BA2EB0C8379C95905F09E9A47E8F51BE /* Sources */, + C39C862EDA8935060ACF4E4BA63FC445 /* Frameworks */, + D6A217F2425793BA8B7744C46A316378 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = SwiftyJSON; + productName = SwiftyJSON; + productReference = 26A4D4F7F9E36EB8A143FB0B4FD9221C /* SwiftyJSON.framework */; + productType = "com.apple.product-type.framework"; + }; + 84CE7A9DEDB18CAEE72169556A611AB8 /* SwiftyUserDefaults */ = { + isa = PBXNativeTarget; + buildConfigurationList = EA5EEACB5EB83182896467857945EA41 /* Build configuration list for PBXNativeTarget "SwiftyUserDefaults" */; + buildPhases = ( + 493818A2830F53D52243BBC0F4BF0A11 /* Sources */, + 77D2AB8DCFDC2922F362890ACFE418C8 /* Frameworks */, + C7DD8A551194957C34BCC7F8727CEB56 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = SwiftyUserDefaults; + productName = SwiftyUserDefaults; + productReference = 6986F74E570CAA0C29979E5A669B039E /* SwiftyUserDefaults.framework */; + productType = "com.apple.product-type.framework"; + }; + 9B30F56DBCB88AA782A5A0F021FD14AD /* Pods */ = { + isa = PBXNativeTarget; + buildConfigurationList = 31084B8B6E191368C3ECC9F4691E4E85 /* Build configuration list for PBXNativeTarget "Pods" */; + buildPhases = ( + F7F604A46F7D28AFFABBA4282F796419 /* Sources */, + B5CA9B339E5C10BC1B227DEFC97B4BF3 /* Frameworks */, + 746216B33B1D5D6EF2395B9AC696C8BB /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + 7631B0793D7F6E1BDECD5FAB9828850A /* PBXTargetDependency */, + 1736088511D6DC576A66FECEE26FA698 /* PBXTargetDependency */, + 350DCA245DE632C8DCCF2AC4FC73BDF0 /* PBXTargetDependency */, + 06DDE938D629F35BAA45F6E1592871E0 /* PBXTargetDependency */, + E8B8B5822D49F00D2C409ACD00666216 /* PBXTargetDependency */, + ); + name = Pods; + productName = Pods; + productReference = E65EE2008D87A49BF94F30E44F5D3B0A /* Pods.framework */; + productType = "com.apple.product-type.framework"; + }; + C3A04698AAE4D6124C20602D622956E5 /* Cartography */ = { + isa = PBXNativeTarget; + buildConfigurationList = B22DC939D187391042315573DBEE7623 /* Build configuration list for PBXNativeTarget "Cartography" */; + buildPhases = ( + B962ED42E882856B9D168260BB18AE95 /* Sources */, + 429A34DF3BBD7321C9C7D6FBF5F1E3FB /* Frameworks */, + 514705BF944036B79FA99816C564643C /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Cartography; + productName = Cartography; + productReference = 19E931B280459D6585DC0CC0A6FD3B42 /* Cartography.framework */; + productType = "com.apple.product-type.framework"; + }; + D54AD609367F08C428BCB32BC2CCE443 /* SVProgressHUD */ = { + isa = PBXNativeTarget; + buildConfigurationList = 9D706FA9E69375C26DE32DC75C29C754 /* Build configuration list for PBXNativeTarget "SVProgressHUD" */; + buildPhases = ( + E49C76F26805B919BAE1A31B3D06EB5B /* Sources */, + CF6216EC3FD9C117ED1C9DC5CB2310CF /* Frameworks */, + 07CCAF62764AAF5A3C288296D9245445 /* Headers */, + A7C9583B9EC954ED2935F4617C7BC37C /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = SVProgressHUD; + productName = SVProgressHUD; + productReference = 599A39D54924ABC48A70F079B0E1D457 /* SVProgressHUD.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0700; + LastUpgradeCheck = 0700; + }; + buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 7DB346D0F39D3F0E887471402A8071AB; + productRefGroup = 81D37C8AD89C7A9F9B32A665EF1D74E7 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + C3A04698AAE4D6124C20602D622956E5 /* Cartography */, + 01F2FAAF48B4CFE9933A1165FB93C16E /* NRSimplePlist */, + 9B30F56DBCB88AA782A5A0F021FD14AD /* Pods */, + D54AD609367F08C428BCB32BC2CCE443 /* SVProgressHUD */, + 4E00D50FA19E0C57AAD724F6FA0CE5D0 /* SwiftyJSON */, + 84CE7A9DEDB18CAEE72169556A611AB8 /* SwiftyUserDefaults */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + A7C9583B9EC954ED2935F4617C7BC37C /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ED6360866D1FB0F3A56AFEF657E1052B /* SVProgressHUD.bundle in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 493818A2830F53D52243BBC0F4BF0A11 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 24D0E07008EFBA1537B80A167FF8FBC9 /* SwiftyUserDefaults-dummy.m in Sources */, + 17FC57D10EC45464E48705C096EBE026 /* SwiftyUserDefaults.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 6DED799EBA09E287D0B53D2D12A69283 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D46E6398FA4B45903AEAA413F9686384 /* NRSimplePlist-dummy.m in Sources */, + 78EF482C3D11F052466EB92EAF38C9F5 /* NRSimplePlist.m in Sources */, + 9BD6EFA65EAA838855459505EAE679B0 /* NRSwiftPlist.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B962ED42E882856B9D168260BB18AE95 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 584B68A7069844742AEF67ED9311FF50 /* Align.swift in Sources */, + D56BD3B0ACF32790F3EF43EA3DB08016 /* Cartography-dummy.m in Sources */, + EE94E3F06DA2F096BA43F0679567DC4B /* Coefficients.swift in Sources */, + 28515F6FFAA0E2F9591A862D532F33AC /* Compound.swift in Sources */, + D2C9087C6581055C25D5559F934AF65B /* Constrain.swift in Sources */, + F469BC9885602957FCB73DD39B5B92B0 /* Constraint.swift in Sources */, + E1451AA498D7B41C4E049F5D9027B4A7 /* ConstraintGroup.swift in Sources */, + 452C09D0CAC1F8286ABA1CE076033B23 /* Context.swift in Sources */, + 0729DED1737DCDB309394E0B59393F37 /* Dimension.swift in Sources */, + 369CA2AACEED2517C99D77D7700DFCEA /* Distribute.swift in Sources */, + 2057FF930EF0F28E7AD548BF23BE78EE /* Edge.swift in Sources */, + 5044CA9F7CCBB02F3C294106022FCF9F /* Edges.swift in Sources */, + 7CD04D81B5ED213A105DFC517187EB87 /* Expression.swift in Sources */, + BE2FC20F5EDBAE658F688978AB12C279 /* Extensions.swift in Sources */, + 8378B61D28075525380201114F6E4582 /* LayoutProxy.swift in Sources */, + D3C01862D88692FA2E85A2D84345982B /* Point.swift in Sources */, + C3649839064E53A4BF767D2EF29651EF /* Priority.swift in Sources */, + EB9E85B0CE6A53DCBDE040A716B5DBF8 /* Property.swift in Sources */, + B23E3B878363F72D1E874E46EB62FA7F /* Size.swift in Sources */, + F95ADCA0B85C6C0640372D3EFBBF1AD6 /* View.swift in Sources */, + 48ADE3FB3F30FCA5893083351449DA98 /* ViewUtils.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + BA2EB0C8379C95905F09E9A47E8F51BE /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + EB357393D049479D8AFE405EC00797B5 /* SwiftyJSON-dummy.m in Sources */, + 98AB9682D3AB96578EA453C3F3F487D8 /* SwiftyJSON.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E49C76F26805B919BAE1A31B3D06EB5B /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + C1FEA78662815B0056544F51AC6FD8D2 /* SVIndefiniteAnimatedView.m in Sources */, + 679B994E3DC25AE440295FC724CD1543 /* SVProgressHUD-dummy.m in Sources */, + 3A258BDD5EFE319EE52CD613454CB66F /* SVProgressHUD.m in Sources */, + F433CC554BD7A71E9BFB327FAC2B3241 /* SVRadialGradientLayer.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F7F604A46F7D28AFFABBA4282F796419 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 53138908711767F6BCE173C1C768978F /* Pods-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 06DDE938D629F35BAA45F6E1592871E0 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = SwiftyJSON; + target = 4E00D50FA19E0C57AAD724F6FA0CE5D0 /* SwiftyJSON */; + targetProxy = AB90E5EB44D4D9AEAFE2057D455907D3 /* PBXContainerItemProxy */; + }; + 1736088511D6DC576A66FECEE26FA698 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = NRSimplePlist; + target = 01F2FAAF48B4CFE9933A1165FB93C16E /* NRSimplePlist */; + targetProxy = 2E427D3BF689D07DB9BC51D2C6CB59E5 /* PBXContainerItemProxy */; + }; + 350DCA245DE632C8DCCF2AC4FC73BDF0 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = SVProgressHUD; + target = D54AD609367F08C428BCB32BC2CCE443 /* SVProgressHUD */; + targetProxy = 6D83AD1CC7D9B92D00EDEF595208E160 /* PBXContainerItemProxy */; + }; + 7631B0793D7F6E1BDECD5FAB9828850A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = Cartography; + target = C3A04698AAE4D6124C20602D622956E5 /* Cartography */; + targetProxy = 481A45EE44C2068C5EB2E52E0DAC031C /* PBXContainerItemProxy */; + }; + E8B8B5822D49F00D2C409ACD00666216 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = SwiftyUserDefaults; + target = 84CE7A9DEDB18CAEE72169556A611AB8 /* SwiftyUserDefaults */; + targetProxy = 84936821966D393498013499921BD034 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 2A4875CCC15711F355328D4D36BB210F /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = F1B129E9F49A8EE8E9471F27B773EEA6 /* Cartography.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_PREFIX_HEADER = "Target Support Files/Cartography/Cartography-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Cartography/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.1; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/Cartography/Cartography.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_NAME = Cartography; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 31BFB0514697355A722C6E73F35172AB /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 977577C045EDA9D9D1F46E2598D19FC7 /* Pods.debug.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + INFOPLIST_FILE = "Target Support Files/Pods/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.1; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods/Pods.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_NAME = Pods; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 3D49F15C725236ABE74DF2CFBE9D5EF2 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 2462D3D61D8BCFC0888699E2FC3D4EF7 /* SVProgressHUD.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_PREFIX_HEADER = "Target Support Files/SVProgressHUD/SVProgressHUD-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/SVProgressHUD/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.1; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/SVProgressHUD/SVProgressHUD.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_NAME = SVProgressHUD; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 7943BCCECFDC872CC8B793C7D1F91FC2 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 2462D3D61D8BCFC0888699E2FC3D4EF7 /* SVProgressHUD.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_PREFIX_HEADER = "Target Support Files/SVProgressHUD/SVProgressHUD-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/SVProgressHUD/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.1; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/SVProgressHUD/SVProgressHUD.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = SVProgressHUD; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 9768FD27A4E2D1352ED646F0C41F0C60 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = F1B129E9F49A8EE8E9471F27B773EEA6 /* Cartography.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_PREFIX_HEADER = "Target Support Files/Cartography/Cartography-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Cartography/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.1; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/Cartography/Cartography.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = Cartography; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + B9BBAC0CEF3C5D14A0DB0EA4C039927F /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 052DB60B821BBC3B7C3409D0F00D9C66 /* SwiftyJSON.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_PREFIX_HEADER = "Target Support Files/SwiftyJSON/SwiftyJSON-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/SwiftyJSON/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.1; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/SwiftyJSON/SwiftyJSON.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = SwiftyJSON; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + BC636E775182B782AEFAC9265A3AD29F /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 4CB04C2E3722671BE61BD1F1F37DCFFF /* SwiftyUserDefaults.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_PREFIX_HEADER = "Target Support Files/SwiftyUserDefaults/SwiftyUserDefaults-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/SwiftyUserDefaults/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.1; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/SwiftyUserDefaults/SwiftyUserDefaults.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = SwiftyUserDefaults; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + C074F63C9EE7CB4D8C618390A32CEC35 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.1; + ONLY_ACTIVE_ARCH = YES; + STRIP_INSTALLED_PRODUCT = NO; + SYMROOT = "${SRCROOT}/../build"; + }; + name = Debug; + }; + C3712D0B26CE7E1ADD0A093031195540 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 4CB04C2E3722671BE61BD1F1F37DCFFF /* SwiftyUserDefaults.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_PREFIX_HEADER = "Target Support Files/SwiftyUserDefaults/SwiftyUserDefaults-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/SwiftyUserDefaults/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.1; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/SwiftyUserDefaults/SwiftyUserDefaults.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_NAME = SwiftyUserDefaults; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + C89159DB1BF1F41FB1EBE2B36B5445AC /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = EC354D3DC48DFCDEEFB520BBAB335A05 /* NRSimplePlist.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_PREFIX_HEADER = "Target Support Files/NRSimplePlist/NRSimplePlist-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/NRSimplePlist/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.1; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/NRSimplePlist/NRSimplePlist.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = NRSimplePlist; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + E11C63D334B52BBDC38267488679F0ED /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = EC354D3DC48DFCDEEFB520BBAB335A05 /* NRSimplePlist.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_PREFIX_HEADER = "Target Support Files/NRSimplePlist/NRSimplePlist-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/NRSimplePlist/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.1; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/NRSimplePlist/NRSimplePlist.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_NAME = NRSimplePlist; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + E43846B588E1892F3093F3B7082B6DFB /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = YES; + ENABLE_NS_ASSERTIONS = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_PREPROCESSOR_DEFINITIONS = "RELEASE=1"; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.1; + STRIP_INSTALLED_PRODUCT = NO; + SYMROOT = "${SRCROOT}/../build"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + F2986C22FA1C6E2DAD92360B19FB486E /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 052DB60B821BBC3B7C3409D0F00D9C66 /* SwiftyJSON.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_PREFIX_HEADER = "Target Support Files/SwiftyJSON/SwiftyJSON-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/SwiftyJSON/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.1; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/SwiftyJSON/SwiftyJSON.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_NAME = SwiftyJSON; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + F3F99C413BAB7F48216191D78B5EC3A5 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = DA312349A49333542E6F4B36B329960E /* Pods.release.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + INFOPLIST_FILE = "Target Support Files/Pods/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.1; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods/Pods.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_NAME = Pods; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C074F63C9EE7CB4D8C618390A32CEC35 /* Debug */, + E43846B588E1892F3093F3B7082B6DFB /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 31084B8B6E191368C3ECC9F4691E4E85 /* Build configuration list for PBXNativeTarget "Pods" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 31BFB0514697355A722C6E73F35172AB /* Debug */, + F3F99C413BAB7F48216191D78B5EC3A5 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 583B619CC10B209748DA3BA4C5E416A7 /* Build configuration list for PBXNativeTarget "SwiftyJSON" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + F2986C22FA1C6E2DAD92360B19FB486E /* Debug */, + B9BBAC0CEF3C5D14A0DB0EA4C039927F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 9D706FA9E69375C26DE32DC75C29C754 /* Build configuration list for PBXNativeTarget "SVProgressHUD" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3D49F15C725236ABE74DF2CFBE9D5EF2 /* Debug */, + 7943BCCECFDC872CC8B793C7D1F91FC2 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B22DC939D187391042315573DBEE7623 /* Build configuration list for PBXNativeTarget "Cartography" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2A4875CCC15711F355328D4D36BB210F /* Debug */, + 9768FD27A4E2D1352ED646F0C41F0C60 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B3245BFB3E1DBD60887B9986A3B9768F /* Build configuration list for PBXNativeTarget "NRSimplePlist" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E11C63D334B52BBDC38267488679F0ED /* Debug */, + C89159DB1BF1F41FB1EBE2B36B5445AC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + EA5EEACB5EB83182896467857945EA41 /* Build configuration list for PBXNativeTarget "SwiftyUserDefaults" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C3712D0B26CE7E1ADD0A093031195540 /* Debug */, + BC636E775182B782AEFAC9265A3AD29F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; +} diff --git a/Pods/SVProgressHUD/LICENSE.txt b/Pods/SVProgressHUD/LICENSE.txt new file mode 100644 index 0000000..5bcd8b4 --- /dev/null +++ b/Pods/SVProgressHUD/LICENSE.txt @@ -0,0 +1,26 @@ +Copyright (c) 2011-2014 Sam Vermette + +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. + +A different license may apply to other resources included in this package, +including Freepik Icons. Please consult their +respective headers for the terms of their individual licenses. \ No newline at end of file diff --git a/Pods/SVProgressHUD/README.md b/Pods/SVProgressHUD/README.md new file mode 100644 index 0000000..5e8efcc --- /dev/null +++ b/Pods/SVProgressHUD/README.md @@ -0,0 +1,166 @@ +# SVProgressHUD + +![Pod Version](https://img.shields.io/cocoapods/v/SVProgressHUD.svg?style=flat) +![Pod License](https://img.shields.io/cocoapods/l/SVProgressHUD.svg?style=flat) +![Pod Platform](https://img.shields.io/cocoapods/p/SVProgressHUD.svg?style=flat) +[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) + + +`SVProgressHUD` is a clean and easy-to-use HUD meant to display the progress of an ongoing task on iOS and tvOS. + +![SVProgressHUD](http://f.cl.ly/items/2G1F1Z0M0k0h2U3V1p39/SVProgressHUD.gif) + +## Installation + +### From CocoaPods + +[CocoaPods](http://cocoapods.org) is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like `SVProgressHUD` in your projects. Simply add the following line to your [Podfile](http://guides.cocoapods.org/using/using-cocoapods.html): + +```ruby +pod 'SVProgressHUD' +``` + +If you want to use the latest features of `SVProgressHUD` add `:head`: + +```ruby +pod 'SVProgressHUD', :head +``` + +This pulls from the `master` branch directly. We are usually careful about what we push there and this is the version we use ourselves in all of our projects. + +### Carthage + +You can install `SVProgressHUD` with [Carthage](https://github.com/Carthage/Carthage). + +[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/TransitApp/SVProgressHUD) + +### Manually + +* Drag the `SVProgressHUD/SVProgressHUD` folder into your project. +* Take care that `SVProgressHUD.bundle` is added to `Targets->Build Phases->Copy Bundle Resources`. +* Add the **QuartzCore** framework to your project. + +## Usage + +(see sample Xcode project in `/Demo`) + +`SVProgressHUD` is created as a singleton (i.e. it doesn't need to be explicitly allocated and instantiated; you directly call `[SVProgressHUD method]`). + +**Use `SVProgressHUD` wisely! Only use it if you absolutely need to perform a task before taking the user forward. Bad use case examples: pull to refresh, infinite scrolling, sending message.** + +Using `SVProgressHUD` in your app will usually look as simple as this (using Grand Central Dispatch): + +```objective-c +[SVProgressHUD show]; +dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ + // time-consuming task + dispatch_async(dispatch_get_main_queue(), ^{ + [SVProgressHUD dismiss]; + }); +}); +``` + +### Showing the HUD + +You can show the status of indeterminate tasks using one of the following: + +```objective-c ++ (void)show; ++ (void)showWithStatus:(NSString*)string; +``` + +If you'd like the HUD to reflect the progress of a task, use one of these: + +```objective-c ++ (void)showProgress:(CGFloat)progress; ++ (void)showProgress:(CGFloat)progress status:(NSString*)status; +``` + +### Dismissing the HUD + +The HUD can be dismissed using: + +```objective-c ++ (void)dismiss; ++ (void)dismissWithDelay:(NSTimeInterval)delay; +``` + +If you'd like to stack HUDs, you can balance out every show call using: + +```objective-c ++ (void)popActivity; +``` + +The HUD will get dismissed once the `popActivity` calls will match the number of show calls. + +Or show a confirmation glyph before before getting dismissed a little bit later. The display time depends on the length of the given string (between 0.5 and 5 seconds). + +```objective-c ++ (void)showInfoWithStatus:(NSString *)string; ++ (void)showSuccessWithStatus:(NSString*)string; ++ (void)showErrorWithStatus:(NSString *)string; ++ (void)showImage:(UIImage*)image status:(NSString*)string; +``` + +## Customization + +`SVProgressHUD` can be customized via the following methods: + +```objective-c ++ (void)setDefaultStyle:(SVProgressHUDStyle)style; // default is SVProgressHUDStyleLight ++ (void)setDefaultMaskType:(SVProgressHUDMaskType)maskType; // default is SVProgressHUDMaskTypeNone ++ (void)setDefaultAnimationType:(SVProgressHUDAnimationType)type; // default is SVProgressHUDAnimationTypeFlat ++ (void)setMinimumSize:(CGSize)minimumSize; // default is CGSizeZero, can be used to avoid resizing for a larger message ++ (void)setRingThickness:(CGFloat)width; // default is 2 pt ++ (void)setRingRadius:(CGFloat)radius; // default is 18 pt ++ (void)setRingNoTextRadius:(CGFloat)radius; // default is 24 pt ++ (void)setCornerRadius:(CGFloat)cornerRadius; // default is 14 pt ++ (void)setFont:(UIFont*)font; // default is [UIFont preferredFontForTextStyle:UIFontTextStyleSubheadline] ++ (void)setForegroundColor:(UIColor*)color; // default is [UIColor blackColor], only used for SVProgressHUDStyleCustom ++ (void)setBackgroundColor:(UIColor*)color; // default is [UIColor whiteColor], only used for SVProgressHUDStyleCustom ++ (void)setInfoImage:(UIImage*)image; // default is the bundled info image provided by Freepik ++ (void)setSuccessImage:(UIImage*)image; // default is bundled success image from Freepik ++ (void)setErrorImage:(UIImage*)image; // default is bundled error image from Freepik ++ (void)setViewForExtension:(UIView*)view; // default is nil, only used if #define SV_APP_EXTENSIONS is set ++ (void)setMinimumDismissTimeInterval:(NSTimeInterval)interval; // default is 5.0 seconds +``` + +Additionally `SVProgressHUD` supports the `UIAppearance` protocol for most of the above methods. + +### Hint + +As standard `SVProgressHUD` offers two preconfigured styles: + +* `SVProgressHUDStyleLight`: White background with black spinner and text +* `SVProgressHUDStyleDark`: Black background with white spinner and text + +If you want to use custom colors with `setForegroundColor` and `setBackgroundColor:` don't forget to set `SVProgressHUDStyleCustom` via `setDefaultStyle:`. + +## Notifications + +`SVProgressHUD` posts four notifications via `NSNotificationCenter` in response to being shown/dismissed: +* `SVProgressHUDWillAppearNotification` when the show animation starts +* `SVProgressHUDDidAppearNotification` when the show animation completes +* `SVProgressHUDWillDisappearNotification` when the dismiss animation starts +* `SVProgressHUDDidDisappearNotification` when the dismiss animation completes + +Each notification passes a `userInfo` dictionary holding the HUD's status string (if any), retrievable via `SVProgressHUDStatusUserInfoKey`. + +`SVProgressHUD` also posts `SVProgressHUDDidReceiveTouchEventNotification` when users touch on the overall screen or `SVProgressHUDDidTouchDownInsideNotification` when a user touches on the HUD directly. For this notifications `userInfo` is not passed but the object parameter contains the `UIEvent` that related to the touch. + +## App Extensions + +When using `SVProgressHUD` in an App Extension, `#define SV_APP_EXTENSIONS` to avoid using unavailable APIs. Additionally call `setViewForExtension:` from your extensions view controller with `self.view`. + +## Contributing to this project + +If you have feature requests or bug reports, feel free to help out by sending pull requests or by [creating new issues](https://github.com/TransitApp/SVProgressHUD/issues/new). Please take a moment to +review the guidelines written by [Nicolas Gallagher](https://github.com/necolas/): + +* [Bug reports](https://github.com/necolas/issue-guidelines/blob/master/CONTRIBUTING.md#bugs) +* [Feature requests](https://github.com/necolas/issue-guidelines/blob/master/CONTRIBUTING.md#features) +* [Pull requests](https://github.com/necolas/issue-guidelines/blob/master/CONTRIBUTING.md#pull-requests) + +## Credits + +`SVProgressHUD` is brought to you by [Sam Vermette](http://samvermette.com) and [contributors to the project](https://github.com/TransitApp/SVProgressHUD/contributors). If you're using `SVProgressHUD` in your project, attribution would be very appreciated. The success, error and info icons are made by [Freepik](http://www.freepik.com) from [Flaticon](http://www.flaticon.com) and are licensed under [Creative Commons BY 3.0](http://creativecommons.org/licenses/by/3.0/). diff --git a/Pods/SVProgressHUD/SVProgressHUD/SVIndefiniteAnimatedView.h b/Pods/SVProgressHUD/SVProgressHUD/SVIndefiniteAnimatedView.h new file mode 100644 index 0000000..e6be802 --- /dev/null +++ b/Pods/SVProgressHUD/SVProgressHUD/SVIndefiniteAnimatedView.h @@ -0,0 +1,17 @@ +// +// SVIndefiniteAnimatedView.h +// SVProgressHUD, https://github.com/TransitApp/SVProgressHUD +// +// Copyright (c) 2014 Guillaume Campagna. All rights reserved. +// + +#import + +@interface SVIndefiniteAnimatedView : UIView + +@property (nonatomic, assign) CGFloat strokeThickness; +@property (nonatomic, assign) CGFloat radius; +@property (nonatomic, strong) UIColor *strokeColor; + +@end + diff --git a/Pods/SVProgressHUD/SVProgressHUD/SVIndefiniteAnimatedView.m b/Pods/SVProgressHUD/SVProgressHUD/SVIndefiniteAnimatedView.m new file mode 100644 index 0000000..a1a8782 --- /dev/null +++ b/Pods/SVProgressHUD/SVProgressHUD/SVIndefiniteAnimatedView.m @@ -0,0 +1,140 @@ +// +// SVIndefiniteAnimatedView.m +// SVProgressHUD, https://github.com/TransitApp/SVProgressHUD +// +// Copyright (c) 2014 Guillaume Campagna. All rights reserved. +// + +#import "SVIndefiniteAnimatedView.h" + +#pragma mark SVIndefiniteAnimatedView + +@interface SVIndefiniteAnimatedView () + +@property (nonatomic, strong) CAShapeLayer *indefiniteAnimatedLayer; + +@end + +@implementation SVIndefiniteAnimatedView + +- (void)willMoveToSuperview:(UIView *)newSuperview { + if (newSuperview) { + [self layoutAnimatedLayer]; + } else { + [_indefiniteAnimatedLayer removeFromSuperlayer]; + _indefiniteAnimatedLayer = nil; + } +} + +- (void)layoutAnimatedLayer { + CALayer *layer = self.indefiniteAnimatedLayer; + [self.layer addSublayer:layer]; + layer.position = CGPointMake(CGRectGetWidth(self.bounds) - CGRectGetWidth(layer.bounds) / 2, CGRectGetHeight(self.bounds) - CGRectGetHeight(layer.bounds) / 2); +} + +- (CAShapeLayer*)indefiniteAnimatedLayer { + if(!_indefiniteAnimatedLayer) { + CGPoint arcCenter = CGPointMake(self.radius+self.strokeThickness/2+5, self.radius+self.strokeThickness/2+5); + CGRect rect = CGRectMake(0.0f, 0.0f, arcCenter.x*2, arcCenter.y*2); + + UIBezierPath* smoothedPath = [UIBezierPath bezierPathWithArcCenter:arcCenter + radius:self.radius + startAngle:(CGFloat) (M_PI*3/2) + endAngle:(CGFloat) (M_PI/2+M_PI*5) + clockwise:YES]; + + _indefiniteAnimatedLayer = [CAShapeLayer layer]; + _indefiniteAnimatedLayer.contentsScale = [[UIScreen mainScreen] scale]; + _indefiniteAnimatedLayer.frame = rect; + _indefiniteAnimatedLayer.fillColor = [UIColor clearColor].CGColor; + _indefiniteAnimatedLayer.strokeColor = self.strokeColor.CGColor; + _indefiniteAnimatedLayer.lineWidth = self.strokeThickness; + _indefiniteAnimatedLayer.lineCap = kCALineCapRound; + _indefiniteAnimatedLayer.lineJoin = kCALineJoinBevel; + _indefiniteAnimatedLayer.path = smoothedPath.CGPath; + + CALayer *maskLayer = [CALayer layer]; + + NSBundle *bundle = [NSBundle bundleForClass:self.class]; + NSURL *url = [bundle URLForResource:@"SVProgressHUD" withExtension:@"bundle"]; + NSBundle *imageBundle = [NSBundle bundleWithURL:url]; + NSString *path = [imageBundle pathForResource:@"angle-mask" ofType:@"png"]; + + maskLayer.contents = (__bridge id)[[UIImage imageWithContentsOfFile:path] CGImage]; + maskLayer.frame = _indefiniteAnimatedLayer.bounds; + _indefiniteAnimatedLayer.mask = maskLayer; + + NSTimeInterval animationDuration = 1; + CAMediaTimingFunction *linearCurve = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear]; + + CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"transform.rotation"]; + animation.fromValue = (id) 0; + animation.toValue = @(M_PI*2); + animation.duration = animationDuration; + animation.timingFunction = linearCurve; + animation.removedOnCompletion = NO; + animation.repeatCount = INFINITY; + animation.fillMode = kCAFillModeForwards; + animation.autoreverses = NO; + [_indefiniteAnimatedLayer.mask addAnimation:animation forKey:@"rotate"]; + + CAAnimationGroup *animationGroup = [CAAnimationGroup animation]; + animationGroup.duration = animationDuration; + animationGroup.repeatCount = INFINITY; + animationGroup.removedOnCompletion = NO; + animationGroup.timingFunction = linearCurve; + + CABasicAnimation *strokeStartAnimation = [CABasicAnimation animationWithKeyPath:@"strokeStart"]; + strokeStartAnimation.fromValue = @0.015; + strokeStartAnimation.toValue = @0.515; + + CABasicAnimation *strokeEndAnimation = [CABasicAnimation animationWithKeyPath:@"strokeEnd"]; + strokeEndAnimation.fromValue = @0.485; + strokeEndAnimation.toValue = @0.985; + + animationGroup.animations = @[strokeStartAnimation, strokeEndAnimation]; + [_indefiniteAnimatedLayer addAnimation:animationGroup forKey:@"progress"]; + + } + return _indefiniteAnimatedLayer; +} + +- (void)setFrame:(CGRect)frame { + if(!CGRectEqualToRect(frame, super.frame)){ + [super setFrame:frame]; + + if (self.superview) { + [self layoutAnimatedLayer]; + } + } + +} + +- (void)setRadius:(CGFloat)radius { + if(radius != _radius){ + _radius = radius; + + [_indefiniteAnimatedLayer removeFromSuperlayer]; + _indefiniteAnimatedLayer = nil; + + if (self.superview) { + [self layoutAnimatedLayer]; + } + } +} + +- (void)setStrokeColor:(UIColor *)strokeColor { + _strokeColor = strokeColor; + _indefiniteAnimatedLayer.strokeColor = strokeColor.CGColor; +} + +- (void)setStrokeThickness:(CGFloat)strokeThickness { + _strokeThickness = strokeThickness; + _indefiniteAnimatedLayer.lineWidth = _strokeThickness; +} + +- (CGSize)sizeThatFits:(CGSize)size { + return CGSizeMake((self.radius+self.strokeThickness/2+5)*2, (self.radius+self.strokeThickness/2+5)*2); +} + +@end diff --git a/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/angle-mask.png b/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/angle-mask.png new file mode 100644 index 0000000..84d1f7c Binary files /dev/null and b/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/angle-mask.png differ diff --git a/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/angle-mask@2x.png b/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/angle-mask@2x.png new file mode 100644 index 0000000..4aa036e Binary files /dev/null and b/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/angle-mask@2x.png differ diff --git a/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/angle-mask@3x.png b/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/angle-mask@3x.png new file mode 100644 index 0000000..2a4cd17 Binary files /dev/null and b/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/angle-mask@3x.png differ diff --git a/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/error.png b/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/error.png new file mode 100644 index 0000000..3a0c20f Binary files /dev/null and b/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/error.png differ diff --git a/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/error@2x.png b/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/error@2x.png new file mode 100644 index 0000000..b8bc16c Binary files /dev/null and b/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/error@2x.png differ diff --git a/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/error@3x.png b/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/error@3x.png new file mode 100644 index 0000000..4cf4c4f Binary files /dev/null and b/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/error@3x.png differ diff --git a/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/info.png b/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/info.png new file mode 100644 index 0000000..5bb8192 Binary files /dev/null and b/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/info.png differ diff --git a/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/info@2x.png b/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/info@2x.png new file mode 100644 index 0000000..49a57d6 Binary files /dev/null and b/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/info@2x.png differ diff --git a/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/info@3x.png b/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/info@3x.png new file mode 100644 index 0000000..7f6fb4e Binary files /dev/null and b/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/info@3x.png differ diff --git a/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/success.png b/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/success.png new file mode 100644 index 0000000..481caf8 Binary files /dev/null and b/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/success.png differ diff --git a/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/success@2x.png b/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/success@2x.png new file mode 100644 index 0000000..c33f9f3 Binary files /dev/null and b/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/success@2x.png differ diff --git a/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/success@3x.png b/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/success@3x.png new file mode 100644 index 0000000..c6063d0 Binary files /dev/null and b/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/success@3x.png differ diff --git a/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.h b/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.h new file mode 100644 index 0000000..74b0f39 --- /dev/null +++ b/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.h @@ -0,0 +1,122 @@ +// +// SVProgressHUD.h +// SVProgressHUD, https://github.com/TransitApp/SVProgressHUD +// +// Copyright (c) 2011-2014 Sam Vermette and contributors. All rights reserved. +// + +#import +#import + +#if __IPHONE_OS_VERSION_MAX_ALLOWED < 70000 + +#define UI_APPEARANCE_SELECTOR + +#endif + +extern NSString * const SVProgressHUDDidReceiveTouchEventNotification; +extern NSString * const SVProgressHUDDidTouchDownInsideNotification; +extern NSString * const SVProgressHUDWillDisappearNotification; +extern NSString * const SVProgressHUDDidDisappearNotification; +extern NSString * const SVProgressHUDWillAppearNotification; +extern NSString * const SVProgressHUDDidAppearNotification; + +extern NSString * const SVProgressHUDStatusUserInfoKey; + +typedef NS_ENUM(NSInteger, SVProgressHUDStyle) { + SVProgressHUDStyleLight, // default style, white HUD with black text, HUD background will be blurred on iOS 8 and above + SVProgressHUDStyleDark, // black HUD and white text, HUD background will be blurred on iOS 8 and above + SVProgressHUDStyleCustom // uses the fore- and background color properties +}; + +typedef NS_ENUM(NSUInteger, SVProgressHUDMaskType) { + SVProgressHUDMaskTypeNone = 1, // default mask type, allow user interactions while HUD is displayed + SVProgressHUDMaskTypeClear, // don't allow user interactions + SVProgressHUDMaskTypeBlack, // don't allow user interactions and dim the UI in the back of the HUD, as on iOS 7 and above + SVProgressHUDMaskTypeGradient // don't allow user interactions and dim the UI with a a-la UIAlertView background gradient, as on iOS 6 +}; + +typedef NS_ENUM(NSUInteger, SVProgressHUDAnimationType) { + SVProgressHUDAnimationTypeFlat, // default animation type, custom flat animation (indefinite animated ring) + SVProgressHUDAnimationTypeNative // iOS native UIActivityIndicatorView +}; + +@interface SVProgressHUD : UIView + +#pragma mark - Customization + +@property (assign, nonatomic) SVProgressHUDStyle defaultStyle UI_APPEARANCE_SELECTOR; // default is SVProgressHUDStyleLight +@property (assign, nonatomic) SVProgressHUDMaskType defaultMaskType UI_APPEARANCE_SELECTOR; // default is SVProgressHUDMaskTypeNone +@property (assign, nonatomic) SVProgressHUDAnimationType defaultAnimationType UI_APPEARANCE_SELECTOR; // default is SVProgressHUDAnimationTypeFlat +@property (assign, nonatomic) CGSize minimumSize UI_APPEARANCE_SELECTOR; // default is CGSizeZero, can be used to avoid resizing for a larger message +@property (assign, nonatomic) CGFloat ringThickness UI_APPEARANCE_SELECTOR; // default is 2 pt +@property (assign, nonatomic) CGFloat ringRadius UI_APPEARANCE_SELECTOR; // default is 18 pt +@property (assign, nonatomic) CGFloat ringNoTextRadius UI_APPEARANCE_SELECTOR; // default is 24 pt +@property (assign, nonatomic) CGFloat cornerRadius UI_APPEARANCE_SELECTOR; // default is 14 pt +@property (strong, nonatomic) UIFont *font UI_APPEARANCE_SELECTOR; // default is [UIFont preferredFontForTextStyle:UIFontTextStyleSubheadline] +@property (strong, nonatomic) UIColor *backgroundColor UI_APPEARANCE_SELECTOR; // default is [UIColor whiteColor] +@property (strong, nonatomic) UIColor *foregroundColor UI_APPEARANCE_SELECTOR; // default is [UIColor blackColor] +@property (strong, nonatomic) UIImage *infoImage UI_APPEARANCE_SELECTOR; // default is the bundled info image provided by Freepik +@property (strong, nonatomic) UIImage *successImage UI_APPEARANCE_SELECTOR; // default is the bundled success image provided by Freepik +@property (strong, nonatomic) UIImage *errorImage UI_APPEARANCE_SELECTOR; // default is the bundled error image provided by Freepik +@property (strong, nonatomic) UIView *viewForExtension UI_APPEARANCE_SELECTOR; // default is nil, only used if #define SV_APP_EXTENSIONS is set +@property (assign, nonatomic) NSTimeInterval minimumDismissTimeInterval; // default is 5.0 seconds + +@property (assign, nonatomic) UIOffset offsetFromCenter UI_APPEARANCE_SELECTOR; // default is 0, 0 + ++ (void)setDefaultStyle:(SVProgressHUDStyle)style; // default is SVProgressHUDStyleLight ++ (void)setDefaultMaskType:(SVProgressHUDMaskType)maskType; // default is SVProgressHUDMaskTypeNone ++ (void)setDefaultAnimationType:(SVProgressHUDAnimationType)type; // default is SVProgressHUDAnimationTypeFlat ++ (void)setMinimumSize:(CGSize)minimumSize; // default is CGSizeZero, can be used to avoid resizing for a larger message ++ (void)setRingThickness:(CGFloat)ringThickness; // default is 2 pt ++ (void)setRingRadius:(CGFloat)radius; // default is 18 pt ++ (void)setRingNoTextRadius:(CGFloat)radius; // default is 24 pt ++ (void)setCornerRadius:(CGFloat)cornerRadius; // default is 14 pt ++ (void)setFont:(UIFont*)font; // default is [UIFont preferredFontForTextStyle:UIFontTextStyleSubheadline] ++ (void)setForegroundColor:(UIColor*)color; // default is [UIColor blackColor], only used for SVProgressHUDStyleCustom ++ (void)setBackgroundColor:(UIColor*)color; // default is [UIColor whiteColor], only used for SVProgressHUDStyleCustom ++ (void)setInfoImage:(UIImage*)image; // default is the bundled info image provided by Freepik ++ (void)setSuccessImage:(UIImage*)image; // default is the bundled success image provided by Freepik ++ (void)setErrorImage:(UIImage*)image; // default is the bundled error image provided by Freepik ++ (void)setViewForExtension:(UIView*)view; // default is nil, only used if #define SV_APP_EXTENSIONS is set ++ (void)setMinimumDismissTimeInterval:(NSTimeInterval)interval; // default is 5.0 seconds + +#pragma mark - Show Methods + ++ (void)show; ++ (void)showWithMaskType:(SVProgressHUDMaskType)maskType __attribute__((deprecated("Use show and setDefaultMaskType: instead."))); ++ (void)showWithStatus:(NSString*)status; ++ (void)showWithStatus:(NSString*)status maskType:(SVProgressHUDMaskType)maskType __attribute__((deprecated("Use showWithStatus: and setDefaultMaskType: instead."))); + ++ (void)showProgress:(float)progress; ++ (void)showProgress:(float)progress maskType:(SVProgressHUDMaskType)maskType __attribute__((deprecated("Use showProgress: and setDefaultMaskType: instead."))); ++ (void)showProgress:(float)progress status:(NSString*)status; ++ (void)showProgress:(float)progress status:(NSString*)status maskType:(SVProgressHUDMaskType)maskType __attribute__((deprecated("Use showProgress: and setDefaultMaskType: instead."))); + ++ (void)setStatus:(NSString*)status; // change the HUD loading status while it's showing + +// stops the activity indicator, shows a glyph + status, and dismisses the HUD a little bit later ++ (void)showInfoWithStatus:(NSString*)status; ++ (void)showInfoWithStatus:(NSString*)status maskType:(SVProgressHUDMaskType)maskType __attribute__((deprecated("Use showInfoWithStatus: and setDefaultMaskType: instead."))); ++ (void)showSuccessWithStatus:(NSString*)status; ++ (void)showSuccessWithStatus:(NSString*)status maskType:(SVProgressHUDMaskType)maskType __attribute__((deprecated("Use showSuccessWithStatus: and setDefaultMaskType: instead."))); ++ (void)showErrorWithStatus:(NSString*)status; ++ (void)showErrorWithStatus:(NSString*)status maskType:(SVProgressHUDMaskType)maskType __attribute__((deprecated("Use showErrorWithStatus: and setDefaultMaskType: instead."))); + +// shows a image + status, use 28x28 white PNGs ++ (void)showImage:(UIImage*)image status:(NSString*)status; ++ (void)showImage:(UIImage*)image status:(NSString*)status maskType:(SVProgressHUDMaskType)maskType __attribute__((deprecated("Use showImage: and setDefaultMaskType: instead."))); + ++ (void)setOffsetFromCenter:(UIOffset)offset; ++ (void)resetOffsetFromCenter; + ++ (void)popActivity; // decrease activity count, if activity count == 0 the HUD is dismissed ++ (void)dismiss; ++ (void)dismissWithDelay:(NSTimeInterval)delay; // delayes the dismissal + ++ (BOOL)isVisible; + ++ (NSTimeInterval)displayDurationForString:(NSString*)string; + +@end + diff --git a/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.m b/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.m new file mode 100644 index 0000000..a8fffeb --- /dev/null +++ b/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.m @@ -0,0 +1,1284 @@ +// +// SVProgressHUD.h +// SVProgressHUD, https://github.com/TransitApp/SVProgressHUD +// +// Copyright (c) 2011-2014 Sam Vermette and contributors. All rights reserved. +// + +#if !__has_feature(objc_arc) +#error SVProgressHUD is ARC only. Either turn on ARC for the project or use -fobjc-arc flag +#endif + +#import "SVProgressHUD.h" +#import "SVIndefiniteAnimatedView.h" +#import "SVRadialGradientLayer.h" + +NSString * const SVProgressHUDDidReceiveTouchEventNotification = @"SVProgressHUDDidReceiveTouchEventNotification"; +NSString * const SVProgressHUDDidTouchDownInsideNotification = @"SVProgressHUDDidTouchDownInsideNotification"; +NSString * const SVProgressHUDWillDisappearNotification = @"SVProgressHUDWillDisappearNotification"; +NSString * const SVProgressHUDDidDisappearNotification = @"SVProgressHUDDidDisappearNotification"; +NSString * const SVProgressHUDWillAppearNotification = @"SVProgressHUDWillAppearNotification"; +NSString * const SVProgressHUDDidAppearNotification = @"SVProgressHUDDidAppearNotification"; + +NSString * const SVProgressHUDStatusUserInfoKey = @"SVProgressHUDStatusUserInfoKey"; + +static const CGFloat SVProgressHUDParallaxDepthPoints = 10; +static const CGFloat SVProgressHUDUndefinedProgress = -1; + +@interface SVProgressHUD () + +@property (nonatomic, strong, readonly) NSTimer *fadeOutTimer; +@property (nonatomic, readonly, getter = isClear) BOOL clear; + +@property (nonatomic, strong) UIControl *overlayView; +@property (nonatomic, strong) UIView *hudView; + +@property (nonatomic, strong) UILabel *stringLabel; +@property (nonatomic, strong) UIImageView *imageView; +@property (nonatomic, strong) UIView *indefiniteAnimatedView; +@property (nonatomic, strong) CALayer *backgroundLayer; + +@property (nonatomic, readwrite) CGFloat progress; +@property (nonatomic, readwrite) NSUInteger activityCount; +@property (nonatomic, strong) CAShapeLayer *backgroundRingLayer; +@property (nonatomic, strong) CAShapeLayer *ringLayer; + +@property (nonatomic, readonly) CGFloat visibleKeyboardHeight; + +- (void)updateHUDFrame; +- (void)updateMask; +- (void)updateBlurBounds; +#if TARGET_OS_IOS +- (void)updateMotionEffectForOrientation:(UIInterfaceOrientation)orientation; +#endif +- (void)updateMotionEffectForXMotionEffectType:(UIInterpolatingMotionEffectType)xMotionEffectType yMotionEffectType:(UIInterpolatingMotionEffectType)yMotionEffectType; + +- (void)setStatus:(NSString*)string; +- (void)setFadeOutTimer:(NSTimer*)newTimer; + +- (void)registerNotifications; +- (NSDictionary*)notificationUserInfo; + +- (void)positionHUD:(NSNotification*)notification; +- (void)moveToPoint:(CGPoint)newCenter rotateAngle:(CGFloat)angle; + +- (void)overlayViewDidReceiveTouchEvent:(id)sender forEvent:(UIEvent*)event; + +- (void)showProgress:(float)progress status:(NSString*)string; +- (void)showImage:(UIImage*)image status:(NSString*)status duration:(NSTimeInterval)duration; + +- (void)dismissWithDelay:(NSTimeInterval)delay; +- (void)dismiss; + +- (UIActivityIndicatorView *)createActivityIndicatorView; +- (SVIndefiniteAnimatedView *)createIndefiniteAnimatedView; +- (UIView *)indefiniteAnimatedView; +- (CAShapeLayer*)ringLayer; +- (CAShapeLayer*)backgroundRingLayer; +- (void)cancelRingLayerAnimation; +- (CAShapeLayer*)createRingLayerWithCenter:(CGPoint)center radius:(CGFloat)radius; + +- (UIColor*)foregroundColorForStyle; +- (UIColor*)backgroundColorForStyle; +- (UIImage*)image:(UIImage*)image withTintColor:(UIColor*)color; + +@end + + +@implementation SVProgressHUD { + BOOL _isInitializing; +} + ++ (SVProgressHUD*)sharedView{ + static dispatch_once_t once; + + static SVProgressHUD *sharedView; +#if !defined(SV_APP_EXTENSIONS) + dispatch_once(&once, ^{ sharedView = [[self alloc] initWithFrame:[[[UIApplication sharedApplication] delegate] window].bounds]; }); +#else + dispatch_once(&once, ^{ sharedView = [[self alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; }); +#endif + return sharedView; +} + + +#pragma mark - Setters + ++ (void)setStatus:(NSString*)status{ + [[self sharedView] setStatus:status]; +} + ++ (void)setDefaultStyle:(SVProgressHUDStyle)style{ + [self sharedView].defaultStyle = style; +} + ++ (void)setDefaultMaskType:(SVProgressHUDMaskType)maskType{ + [self sharedView].defaultMaskType = maskType; +} + ++ (void)setDefaultAnimationType:(SVProgressHUDAnimationType)type { + [self sharedView].defaultAnimationType = type; + // Reset indefiniteAnimatedView so it gets recreated with the new style + [self sharedView].indefiniteAnimatedView = nil; +} + ++ (void)setMinimumSize:(CGSize)minimumSize{ + [self sharedView].minimumSize = minimumSize; +} + ++ (void)setRingThickness:(CGFloat)ringThickness{ + [self sharedView].ringThickness = ringThickness; +} + ++ (void)setRingRadius:(CGFloat)radius{ + [self sharedView].ringRadius = radius; +} + ++ (void)setRingNoTextRadius:(CGFloat)radius{ + [self sharedView].ringNoTextRadius = radius; +} + ++ (void)setCornerRadius:(CGFloat)cornerRadius{ + [self sharedView].cornerRadius = cornerRadius; +} + ++ (void)setFont:(UIFont*)font{ + [self sharedView].font = font; +} + ++ (void)setForegroundColor:(UIColor*)color{ + [self sharedView].foregroundColor = color; +} + ++ (void)setBackgroundColor:(UIColor*)color{ + [self sharedView].backgroundColor = color; +} + ++ (void)setInfoImage:(UIImage*)image{ + [self sharedView].infoImage = image; +} + ++ (void)setSuccessImage:(UIImage *)image { + [self sharedView].successImage = image; +} + ++ (void)setErrorImage:(UIImage *)image { + [self sharedView].errorImage = image; +} + ++ (void)setViewForExtension:(UIView *)view{ + [self sharedView].viewForExtension = view; +} + ++ (void)setMinimumDismissTimeInterval:(NSTimeInterval)interval { + [self sharedView].minimumDismissTimeInterval = interval; +} + + +#pragma mark - Show Methods + ++ (void)show{ + [self showWithStatus:nil]; +} + ++ (void)showWithMaskType:(SVProgressHUDMaskType)maskType{ + SVProgressHUDMaskType existingMaskType = [self sharedView].defaultMaskType; + [self setDefaultMaskType:maskType]; + [self show]; + [self setDefaultMaskType:existingMaskType]; +} + ++ (void)showWithStatus:(NSString*)status{ + [self sharedView]; + [self showProgress:SVProgressHUDUndefinedProgress status:status]; +} + ++ (void)showWithStatus:(NSString*)status maskType:(SVProgressHUDMaskType)maskType{ + SVProgressHUDMaskType existingMaskType = [self sharedView].defaultMaskType; + [self setDefaultMaskType:maskType]; + [self showWithStatus:status]; + [self setDefaultMaskType:existingMaskType]; +} + ++ (void)showProgress:(float)progress{ + [self showProgress:progress status:nil]; +} + ++ (void)showProgress:(float)progress maskType:(SVProgressHUDMaskType)maskType{ + SVProgressHUDMaskType existingMaskType = [self sharedView].defaultMaskType; + [self setDefaultMaskType:maskType]; + [self showProgress:progress]; + [self setDefaultMaskType:existingMaskType]; +} + ++ (void)showProgress:(float)progress status:(NSString*)status{ + [[self sharedView] showProgress:progress status:status]; +} + ++ (void)showProgress:(float)progress status:(NSString*)status maskType:(SVProgressHUDMaskType)maskType{ + SVProgressHUDMaskType existingMaskType = [self sharedView].defaultMaskType; + [self setDefaultMaskType:maskType]; + [self showProgress:progress status:status]; + [self setDefaultMaskType:existingMaskType]; +} + +#pragma mark - Show, then automatically dismiss methods + ++ (void)showInfoWithStatus:(NSString*)status{ + [self showImage:[self sharedView].infoImage status:status]; +} + ++ (void)showInfoWithStatus:(NSString*)status maskType:(SVProgressHUDMaskType)maskType{ + SVProgressHUDMaskType existingMaskType = [self sharedView].defaultMaskType; + [self setDefaultMaskType:maskType]; + [self showInfoWithStatus:status]; + [self setDefaultMaskType:existingMaskType]; +} + ++ (void)showSuccessWithStatus:(NSString*)status{ + [self showImage:[self sharedView].successImage status:status]; +} + ++ (void)showSuccessWithStatus:(NSString*)status maskType:(SVProgressHUDMaskType)maskType{ + SVProgressHUDMaskType existingMaskType = [self sharedView].defaultMaskType; + [self setDefaultMaskType:maskType]; + [self showSuccessWithStatus:status]; + [self setDefaultMaskType:existingMaskType]; +} + ++ (void)showErrorWithStatus:(NSString*)status{ + [self showImage:[self sharedView].errorImage status:status]; +} + ++ (void)showErrorWithStatus:(NSString*)status maskType:(SVProgressHUDMaskType)maskType{ + SVProgressHUDMaskType existingMaskType = [self sharedView].defaultMaskType; + [self setDefaultMaskType:maskType]; + [self showErrorWithStatus:status]; + [self setDefaultMaskType:existingMaskType]; +} + ++ (void)showImage:(UIImage*)image status:(NSString*)status{ + NSTimeInterval displayInterval = [self displayDurationForString:status]; + [[self sharedView] showImage:image status:status duration:displayInterval]; +} + ++ (void)showImage:(UIImage*)image status:(NSString*)status maskType:(SVProgressHUDMaskType)maskType{ + SVProgressHUDMaskType existingMaskType = [self sharedView].defaultMaskType; + [self setDefaultMaskType:maskType]; + [self showImage:image status:status]; + [self setDefaultMaskType:existingMaskType]; +} + + +#pragma mark - Dismiss Methods + ++ (void)popActivity{ + if([self sharedView].activityCount > 0){ + [self sharedView].activityCount--; + } + if([self sharedView].activityCount == 0){ + [[self sharedView] dismiss]; + } +} + ++ (void)dismissWithDelay:(NSTimeInterval)delay{ + if([self isVisible]){ + [[self sharedView] dismissWithDelay:delay]; + } +} + ++ (void)dismiss{ + [self dismissWithDelay:0]; +} + + +#pragma mark - Offset + ++ (void)setOffsetFromCenter:(UIOffset)offset{ + [self sharedView].offsetFromCenter = offset; +} + ++ (void)resetOffsetFromCenter{ + [self setOffsetFromCenter:UIOffsetZero]; +} + + +#pragma mark - Instance Methods + +- (instancetype)initWithFrame:(CGRect)frame{ + if((self = [super initWithFrame:frame])){ + _isInitializing = YES; + + self.userInteractionEnabled = NO; + _backgroundColor = [UIColor clearColor]; + _foregroundColor = [UIColor blackColor]; + self.alpha = 0.0f; + self.activityCount = 0; + + _defaultMaskType = SVProgressHUDMaskTypeNone; + _defaultStyle = SVProgressHUDStyleLight; + _defaultAnimationType = SVProgressHUDAnimationTypeFlat; + + // add accessibility support + self.accessibilityIdentifier = @"SVProgressHUD"; + self.accessibilityLabel = @"SVProgressHUD"; + self.isAccessibilityElement = YES; + + if ([UIFont respondsToSelector:@selector(preferredFontForTextStyle:)]) { + _font = [UIFont preferredFontForTextStyle:UIFontTextStyleSubheadline]; + } else { + _font = [UIFont systemFontOfSize:14.0f]; + } + + NSBundle *bundle = [NSBundle bundleForClass:[self class]]; + NSURL *url = [bundle URLForResource:@"SVProgressHUD" withExtension:@"bundle"]; + NSBundle *imageBundle = [NSBundle bundleWithURL:url]; + + UIImage* infoImage = [UIImage imageWithContentsOfFile:[imageBundle pathForResource:@"info" ofType:@"png"]]; + UIImage* successImage = [UIImage imageWithContentsOfFile:[imageBundle pathForResource:@"success" ofType:@"png"]]; + UIImage* errorImage = [UIImage imageWithContentsOfFile:[imageBundle pathForResource:@"error" ofType:@"png"]]; + + if ([[UIImage class] instancesRespondToSelector:@selector(imageWithRenderingMode:)]) { + _infoImage = [infoImage imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; + _successImage = [successImage imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; + _errorImage = [errorImage imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; + } else { + _infoImage = infoImage; + _successImage = successImage; + _errorImage = errorImage; + } + + _ringThickness = 2; + _ringRadius = 18; + _ringNoTextRadius = 24; + + _cornerRadius = 14; + + _minimumDismissTimeInterval = 5.0f; + + _isInitializing = NO; + } + return self; +} + +- (void)updateHUDFrame{ + CGFloat hudWidth = 100.0f; + CGFloat hudHeight = 100.0f; + CGFloat stringHeightBuffer = 20.0f; + CGFloat stringAndContentHeightBuffer = 80.0f; + CGRect labelRect = CGRectZero; + + // Check if an image or progress ring is displayed + BOOL imageUsed = (self.imageView.image) || (self.imageView.hidden); + BOOL progressUsed = (self.progress != SVProgressHUDUndefinedProgress) && (self.progress >= 0.0f); + + // Calculate and apply sizes + NSString *string = self.stringLabel.text; + if(string){ + CGSize constraintSize = CGSizeMake(200.0f, 300.0f); + CGRect stringRect; + if([string respondsToSelector:@selector(boundingRectWithSize:options:attributes:context:)]){ + stringRect = [string boundingRectWithSize:constraintSize + options:(NSStringDrawingOptions)(NSStringDrawingUsesFontLeading|NSStringDrawingTruncatesLastVisibleLine|NSStringDrawingUsesLineFragmentOrigin) + attributes:@{NSFontAttributeName: self.stringLabel.font} + context:NULL]; + } else{ + CGSize stringSize; + if([string respondsToSelector:@selector(sizeWithAttributes:)]){ + stringSize = [string sizeWithAttributes:@{NSFontAttributeName:[UIFont fontWithName:self.stringLabel.font.fontName size:self.stringLabel.font.pointSize]}]; + } else{ +#if TARGET_OS_IOS +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated" + stringSize = [string sizeWithFont:self.stringLabel.font constrainedToSize:CGSizeMake(200.0f, 300.0f)]; +#pragma clang diagnostic pop +#endif + } + stringRect = CGRectMake(0.0f, 0.0f, stringSize.width, stringSize.height); + } + + CGFloat stringWidth = stringRect.size.width; + CGFloat stringHeight = ceilf(CGRectGetHeight(stringRect)); + + if(imageUsed || progressUsed){ + hudHeight = stringAndContentHeightBuffer + stringHeight; + } else{ + hudHeight = stringHeightBuffer + stringHeight; + } + if(stringWidth > hudWidth){ + hudWidth = ceilf(stringWidth/2)*2; + } + CGFloat labelRectY = (imageUsed || progressUsed) ? 68.0f : 9.0f; + if(hudHeight > 100.0f){ + labelRect = CGRectMake(12.0f, labelRectY, hudWidth, stringHeight); + hudWidth += 24.0f; + } else{ + hudWidth += 24.0f; + labelRect = CGRectMake(0.0f, labelRectY, hudWidth, stringHeight); + } + } + + // Update values on subviews + self.hudView.bounds = CGRectMake(0.0f, 0.0f, MAX(self.minimumSize.width, hudWidth), MAX(self.minimumSize.height, hudHeight)); + labelRect.size.width += MAX(0, self.minimumSize.width - hudWidth); + [self updateBlurBounds]; + + if(string){ + self.imageView.center = CGPointMake(CGRectGetWidth(self.hudView.bounds)/2, 36.0f); + } else{ + self.imageView.center = CGPointMake(CGRectGetWidth(self.hudView.bounds)/2, CGRectGetHeight(self.hudView.bounds)/2); + } + + self.stringLabel.hidden = NO; + self.stringLabel.frame = labelRect; + + // Animate value update + [CATransaction begin]; + [CATransaction setValue:(id)kCFBooleanTrue forKey:kCATransactionDisableActions]; + + if(string) { + if(self.defaultAnimationType == SVProgressHUDAnimationTypeFlat) { + SVIndefiniteAnimatedView *indefiniteAnimationView = (SVIndefiniteAnimatedView *)self.indefiniteAnimatedView; + indefiniteAnimationView.radius = self.ringRadius; + [indefiniteAnimationView sizeToFit]; + } + + CGPoint center = CGPointMake((CGRectGetWidth(self.hudView.bounds)/2), 36.0f); + self.indefiniteAnimatedView.center = center; + + if(self.progress != SVProgressHUDUndefinedProgress){ + self.backgroundRingLayer.position = self.ringLayer.position = CGPointMake((CGRectGetWidth(self.hudView.bounds)/2), 36.0f); + } + } else { + if(self.defaultAnimationType == SVProgressHUDAnimationTypeFlat) { + SVIndefiniteAnimatedView *indefiniteAnimationView = (SVIndefiniteAnimatedView *)self.indefiniteAnimatedView; + indefiniteAnimationView.radius = self.ringNoTextRadius; + [indefiniteAnimationView sizeToFit]; + } + + CGPoint center = CGPointMake((CGRectGetWidth(self.hudView.bounds)/2), CGRectGetHeight(self.hudView.bounds)/2); + self.indefiniteAnimatedView.center = center; + + if(self.progress != SVProgressHUDUndefinedProgress){ + self.backgroundRingLayer.position = self.ringLayer.position = CGPointMake((CGRectGetWidth(self.hudView.bounds)/2), CGRectGetHeight(self.hudView.bounds)/2); + } + } + + [CATransaction commit]; +} + +- (void)updateMask{ + if(self.backgroundLayer){ + [self.backgroundLayer removeFromSuperlayer]; + self.backgroundLayer = nil; + } + switch (self.defaultMaskType){ + case SVProgressHUDMaskTypeBlack:{ + + self.backgroundLayer = [CALayer layer]; + self.backgroundLayer.frame = self.bounds; + self.backgroundLayer.backgroundColor = [UIColor colorWithWhite:0 alpha:0.5].CGColor; + [self.backgroundLayer setNeedsDisplay]; + + [self.layer insertSublayer:self.backgroundLayer atIndex:0]; + break; + } + + case SVProgressHUDMaskTypeGradient:{ + SVRadialGradientLayer *layer = [SVRadialGradientLayer layer]; + self.backgroundLayer = layer; + self.backgroundLayer.frame = self.bounds; + CGPoint gradientCenter = self.center; + gradientCenter.y = (self.bounds.size.height - self.visibleKeyboardHeight) / 2; + layer.gradientCenter = gradientCenter; + [self.backgroundLayer setNeedsDisplay]; + + [self.layer insertSublayer:self.backgroundLayer atIndex:0]; + break; + } + default: + break; + } +} + +- (void)updateBlurBounds{ +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 + if(NSClassFromString(@"UIBlurEffect") && self.defaultStyle != SVProgressHUDStyleCustom){ + // Remove background color, else the effect would not work + self.hudView.backgroundColor = [UIColor clearColor]; + + // Remove any old instances of UIVisualEffectViews + for (UIView *subview in self.hudView.subviews){ + if([subview isKindOfClass:[UIVisualEffectView class]]){ + [subview removeFromSuperview]; + } + } + + if(self.backgroundColor != [UIColor clearColor]){ + // Create blur effect + UIBlurEffectStyle blurEffectStyle = self.defaultStyle == SVProgressHUDStyleDark ? UIBlurEffectStyleDark : UIBlurEffectStyleLight; + UIBlurEffect *blurEffect = [UIBlurEffect effectWithStyle:blurEffectStyle]; + UIVisualEffectView *blurEffectView = [[UIVisualEffectView alloc] initWithEffect:blurEffect]; + blurEffectView.autoresizingMask = self.hudView.autoresizingMask; + blurEffectView.frame = self.hudView.bounds; + + // Add vibrancy to the blur effect to make it more vivid + UIVibrancyEffect *vibrancyEffect = [UIVibrancyEffect effectForBlurEffect:blurEffect]; + UIVisualEffectView *vibrancyEffectView = [[UIVisualEffectView alloc] initWithEffect:vibrancyEffect]; + vibrancyEffectView.autoresizingMask = blurEffectView.autoresizingMask; + vibrancyEffectView.bounds = blurEffectView.bounds; + [blurEffectView.contentView addSubview:vibrancyEffectView]; + + [self.hudView insertSubview:blurEffectView atIndex:0]; + } + } +#endif +} + +#if TARGET_OS_IOS +- (void)updateMotionEffectForOrientation:(UIInterfaceOrientation)orientation{ + UIInterpolatingMotionEffectType xMotionEffectType = UIInterfaceOrientationIsPortrait(orientation) ? UIInterpolatingMotionEffectTypeTiltAlongHorizontalAxis : UIInterpolatingMotionEffectTypeTiltAlongVerticalAxis; + UIInterpolatingMotionEffectType yMotionEffectType = UIInterfaceOrientationIsPortrait(orientation) ? UIInterpolatingMotionEffectTypeTiltAlongVerticalAxis : UIInterpolatingMotionEffectTypeTiltAlongHorizontalAxis; + [self updateMotionEffectForXMotionEffectType:xMotionEffectType yMotionEffectType:yMotionEffectType]; +} +#endif + +- (void)updateMotionEffectForXMotionEffectType:(UIInterpolatingMotionEffectType)xMotionEffectType yMotionEffectType:(UIInterpolatingMotionEffectType)yMotionEffectType{ + if([_hudView respondsToSelector:@selector(addMotionEffect:)]){ + UIInterpolatingMotionEffect *effectX = [[UIInterpolatingMotionEffect alloc] initWithKeyPath:@"center.x" type:xMotionEffectType]; + effectX.minimumRelativeValue = @(-SVProgressHUDParallaxDepthPoints); + effectX.maximumRelativeValue = @(SVProgressHUDParallaxDepthPoints); + + UIInterpolatingMotionEffect *effectY = [[UIInterpolatingMotionEffect alloc] initWithKeyPath:@"center.y" type:yMotionEffectType]; + effectY.minimumRelativeValue = @(-SVProgressHUDParallaxDepthPoints); + effectY.maximumRelativeValue = @(SVProgressHUDParallaxDepthPoints); + + UIMotionEffectGroup *effectGroup = [[UIMotionEffectGroup alloc] init]; + effectGroup.motionEffects = @[effectX, effectY]; + + // Update motion effects + self.hudView.motionEffects = @[]; + [self.hudView addMotionEffect:effectGroup]; + } +} + +- (void)setStatus:(NSString*)string{ + self.stringLabel.text = string; + [self updateHUDFrame]; +} + +- (void)setFadeOutTimer:(NSTimer*)newTimer{ + if(_fadeOutTimer){ + [_fadeOutTimer invalidate], _fadeOutTimer = nil; + } + if(newTimer){ + _fadeOutTimer = newTimer; + } +} + + +#pragma mark - Notifications and their handling + +- (void)registerNotifications{ +#ifndef TARGET_OS_IOS + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(positionHUD:) + name:UIApplicationDidChangeStatusBarOrientationNotification + object:nil]; +#endif + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(positionHUD:) + name:UIApplicationDidBecomeActiveNotification + object:nil]; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(positionHUD:) + name:UIKeyboardWillHideNotification + object:nil]; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(positionHUD:) + name:UIKeyboardDidHideNotification + object:nil]; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(positionHUD:) + name:UIKeyboardWillShowNotification + object:nil]; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(positionHUD:) + name:UIKeyboardDidShowNotification + object:nil]; +} + +- (NSDictionary*)notificationUserInfo{ + return (self.stringLabel.text ? @{SVProgressHUDStatusUserInfoKey : self.stringLabel.text} : nil); +} + +- (void)positionHUD:(NSNotification*)notification{ + CGFloat keyboardHeight = 0.0f; + double animationDuration = 0.0; + +#if !defined(SV_APP_EXTENSIONS) && TARGET_OS_IOS + self.frame = [[[UIApplication sharedApplication] delegate] window].bounds; + UIInterfaceOrientation orientation = UIApplication.sharedApplication.statusBarOrientation; +#elif !defined(SV_APP_EXTENSIONS) + self.frame = [UIApplication sharedApplication].keyWindow.bounds; +#else + if (self.viewForExtension){ + self.frame = self.viewForExtension.frame; + } else { + self.frame = UIScreen.mainScreen.bounds; + } + UIInterfaceOrientation orientation = CGRectGetWidth(self.frame) > CGRectGetHeight(self.frame) ? UIInterfaceOrientationLandscapeLeft : UIInterfaceOrientationPortrait; +#endif + + // no transforms applied to window in iOS 8, but only if compiled with iOS 8 sdk as base sdk, otherwise system supports old rotation logic. + BOOL ignoreOrientation = NO; +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 + if([[NSProcessInfo processInfo] respondsToSelector:@selector(operatingSystemVersion)]){ + ignoreOrientation = YES; + } +#endif + + // Get keyboardHeight in regards to current state + if(notification){ + NSDictionary* keyboardInfo = [notification userInfo]; + CGRect keyboardFrame = [keyboardInfo[UIKeyboardFrameBeginUserInfoKey] CGRectValue]; + animationDuration = [keyboardInfo[UIKeyboardAnimationDurationUserInfoKey] doubleValue]; + + if(notification.name == UIKeyboardWillShowNotification || notification.name == UIKeyboardDidShowNotification){ + keyboardHeight = CGRectGetWidth(keyboardFrame); +#if TARGET_OS_IOS + if(ignoreOrientation || UIInterfaceOrientationIsPortrait(orientation)){ + keyboardHeight = CGRectGetHeight(keyboardFrame); + } +#endif + } + } else{ + keyboardHeight = self.visibleKeyboardHeight; + } + + // Get the currently active frame of the display (depends on orientation) + CGRect orientationFrame = self.bounds; + +#if !defined(SV_APP_EXTENSIONS) && TARGET_OS_IOS + CGRect statusBarFrame = UIApplication.sharedApplication.statusBarFrame; +#else + CGRect statusBarFrame = CGRectZero; +#endif + +#if TARGET_OS_IOS + if(!ignoreOrientation && UIInterfaceOrientationIsLandscape(orientation)){ + float temp = CGRectGetWidth(orientationFrame); + orientationFrame.size.width = CGRectGetHeight(orientationFrame); + orientationFrame.size.height = temp; + + temp = CGRectGetWidth(statusBarFrame); + statusBarFrame.size.width = CGRectGetHeight(statusBarFrame); + statusBarFrame.size.height = temp; + } + + // Update the motion effects in regards to orientation + [self updateMotionEffectForOrientation:orientation]; +#else + [self updateMotionEffectForXMotionEffectType:UIInterpolatingMotionEffectTypeTiltAlongHorizontalAxis yMotionEffectType:UIInterpolatingMotionEffectTypeTiltAlongHorizontalAxis]; +#endif + + // Calculate available height for display + CGFloat activeHeight = CGRectGetHeight(orientationFrame); + if(keyboardHeight > 0){ + activeHeight += CGRectGetHeight(statusBarFrame)*2; + } + activeHeight -= keyboardHeight; + + CGFloat posX = CGRectGetWidth(orientationFrame)/2.0f; + CGFloat posY = floorf(activeHeight*0.45f); + + CGFloat rotateAngle = 0.0; + CGPoint newCenter = CGPointMake(posX, posY); + + // Update posX and posY in regards to orientation +#if TARGET_OS_IOS + if(!ignoreOrientation){ + switch (orientation){ + case UIInterfaceOrientationPortraitUpsideDown: + rotateAngle = (CGFloat) M_PI; + newCenter = CGPointMake(posX, CGRectGetHeight(orientationFrame)-posY); + break; + case UIInterfaceOrientationLandscapeLeft: + rotateAngle = (CGFloat) (-M_PI/2.0f); + newCenter = CGPointMake(posY, posX); + break; + case UIInterfaceOrientationLandscapeRight: + rotateAngle = (CGFloat) (M_PI/2.0f); + newCenter = CGPointMake(CGRectGetHeight(orientationFrame)-posY, posX); + break; + default: // Same as UIInterfaceOrientationPortrait + rotateAngle = 0.0f; + newCenter = CGPointMake(posX, posY); + break; + } + } +#endif + + if(notification){ + // Animate update if notification was present + [UIView animateWithDuration:animationDuration + delay:0 + options:UIViewAnimationOptionAllowUserInteraction + animations:^{ + [self moveToPoint:newCenter rotateAngle:rotateAngle]; + [self.hudView setNeedsDisplay]; + } completion:NULL]; + } else{ + [self moveToPoint:newCenter rotateAngle:rotateAngle]; + [self.hudView setNeedsDisplay]; + } + + [self updateMask]; +} + +- (void)moveToPoint:(CGPoint)newCenter rotateAngle:(CGFloat)angle{ + self.hudView.transform = CGAffineTransformMakeRotation(angle); + self.hudView.center = CGPointMake(newCenter.x + self.offsetFromCenter.horizontal, newCenter.y + self.offsetFromCenter.vertical); +} + + +#pragma mark - Event handling + +- (void)overlayViewDidReceiveTouchEvent:(id)sender forEvent:(UIEvent*)event{ + [[NSNotificationCenter defaultCenter] postNotificationName:SVProgressHUDDidReceiveTouchEventNotification object:event]; + + UITouch *touch = event.allTouches.anyObject; + CGPoint touchLocation = [touch locationInView:self]; + + if(CGRectContainsPoint(self.hudView.frame, touchLocation)){ + [[NSNotificationCenter defaultCenter] postNotificationName:SVProgressHUDDidTouchDownInsideNotification object:event]; + } +} + + +#pragma mark - Master show/dismiss methods + +- (void)showProgress:(float)progress status:(NSString*)string{ + if(!self.overlayView.superview){ +#if !defined(SV_APP_EXTENSIONS) + NSEnumerator *frontToBackWindows = [UIApplication.sharedApplication.windows reverseObjectEnumerator]; + for (UIWindow *window in frontToBackWindows){ + BOOL windowOnMainScreen = window.screen == UIScreen.mainScreen; + BOOL windowIsVisible = !window.hidden && window.alpha > 0; + BOOL windowLevelNormal = window.windowLevel == UIWindowLevelNormal; + + if(windowOnMainScreen && windowIsVisible && windowLevelNormal){ + [window addSubview:self.overlayView]; + break; + } + } +#else + if(self.viewForExtension){ + [self.viewForExtension addSubview:self.overlayView]; + } +#endif + } else{ + // Ensure that overlay will be exactly on top of rootViewController (which may be changed during runtime). + [self.overlayView.superview bringSubviewToFront:self.overlayView]; + } + + if(!self.superview){ + [self.overlayView addSubview:self]; + } + + if(self.fadeOutTimer){ + self.activityCount = 0; + } + self.fadeOutTimer = nil; + self.imageView.hidden = YES; + self.progress = progress; + + self.stringLabel.text = string; + [self updateHUDFrame]; + + if(progress >= 0){ + self.imageView.image = nil; + self.imageView.hidden = NO; + + [self.indefiniteAnimatedView removeFromSuperview]; + if([self.indefiniteAnimatedView respondsToSelector:@selector(stopAnimating)]) { + [(id)self.indefiniteAnimatedView stopAnimating]; + } + + self.ringLayer.strokeEnd = progress; + + if(progress == 0){ + self.activityCount++; + } + } else{ + self.activityCount++; + [self cancelRingLayerAnimation]; + + [self.hudView addSubview:self.indefiniteAnimatedView]; + if([self.indefiniteAnimatedView respondsToSelector:@selector(startAnimating)]) { + [(id)self.indefiniteAnimatedView startAnimating]; + } + } + + if(self.defaultMaskType != SVProgressHUDMaskTypeNone){ + self.overlayView.userInteractionEnabled = YES; + self.accessibilityLabel = string; + self.isAccessibilityElement = YES; + } else{ + self.overlayView.userInteractionEnabled = NO; + self.hudView.accessibilityLabel = string; + self.hudView.isAccessibilityElement = YES; + } + + self.overlayView.hidden = NO; + self.overlayView.backgroundColor = [UIColor clearColor]; + [self positionHUD:nil]; + + // Appear + if(self.alpha != 1 || self.hudView.alpha != 1){ + NSDictionary *userInfo = [self notificationUserInfo]; + [[NSNotificationCenter defaultCenter] postNotificationName:SVProgressHUDWillAppearNotification + object:nil + userInfo:userInfo]; + + [self registerNotifications]; + self.hudView.transform = CGAffineTransformScale(self.hudView.transform, 1.3, 1.3); + + if(self.isClear){ + self.alpha = 1; + self.hudView.alpha = 0; + } + + __weak SVProgressHUD *weakSelf = self; + [UIView animateWithDuration:0.15 + delay:0 + options:UIViewAnimationOptionAllowUserInteraction | UIViewAnimationCurveEaseOut | UIViewAnimationOptionBeginFromCurrentState + animations:^{ + __strong SVProgressHUD *strongSelf = weakSelf; + if(strongSelf){ + strongSelf.hudView.transform = CGAffineTransformScale(strongSelf.hudView.transform, 1/1.3f, 1/1.3f); + + if(strongSelf.isClear){ // handle iOS 7 and 8 UIToolbar which not answers well to hierarchy opacity change + strongSelf.hudView.alpha = 1; + } else{ + strongSelf.alpha = 1; + } + } + } + completion:^(BOOL finished){ + [[NSNotificationCenter defaultCenter] postNotificationName:SVProgressHUDDidAppearNotification + object:nil + userInfo:userInfo]; + UIAccessibilityPostNotification(UIAccessibilityScreenChangedNotification, nil); + UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification, string); + }]; + + [self setNeedsDisplay]; + } +} + +- (void)showImage:(UIImage*)image status:(NSString*)string duration:(NSTimeInterval)duration{ + self.progress = SVProgressHUDUndefinedProgress; + [self cancelRingLayerAnimation]; + + if(![self.class isVisible]){ + [self.class show]; + } + + UIColor *tintColor = self.foregroundColorForStyle; + if([self.imageView respondsToSelector:@selector(setTintColor:)]){ + if (image.renderingMode != UIImageRenderingModeAlwaysTemplate) { + image = [image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; + } + self.imageView.tintColor = tintColor; + } else{ + image = [self image:image withTintColor:tintColor]; + } + self.imageView.image = image; + self.imageView.hidden = NO; + + self.stringLabel.text = string; + [self updateHUDFrame]; + [self.indefiniteAnimatedView removeFromSuperview]; + if([self.indefiniteAnimatedView respondsToSelector:@selector(stopAnimating)]) { + [(id)self.indefiniteAnimatedView stopAnimating]; + } + + if(self.defaultMaskType != SVProgressHUDMaskTypeNone){ + self.overlayView.userInteractionEnabled = YES; + self.accessibilityLabel = string; + self.isAccessibilityElement = YES; + } else{ + self.overlayView.userInteractionEnabled = NO; + self.hudView.accessibilityLabel = string; + self.hudView.isAccessibilityElement = YES; + } + + UIAccessibilityPostNotification(UIAccessibilityScreenChangedNotification, nil); + UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification, string); + + self.fadeOutTimer = [NSTimer timerWithTimeInterval:duration target:self selector:@selector(dismiss) userInfo:nil repeats:NO]; + [[NSRunLoop mainRunLoop] addTimer:self.fadeOutTimer forMode:NSRunLoopCommonModes]; +} + +- (void)dismissWithDelay:(NSTimeInterval)delay{ + NSDictionary *userInfo = [self notificationUserInfo]; + [[NSNotificationCenter defaultCenter] postNotificationName:SVProgressHUDWillDisappearNotification + object:nil + userInfo:userInfo]; + + self.activityCount = 0; + __weak SVProgressHUD *weakSelf = self; + [UIView animateWithDuration:0.15 + delay:delay + options:(UIViewAnimationOptions) (UIViewAnimationCurveEaseIn | UIViewAnimationOptionAllowUserInteraction) + animations:^{ + __strong SVProgressHUD *strongSelf = weakSelf; + if(strongSelf){ + strongSelf.hudView.transform = CGAffineTransformScale(self.hudView.transform, 0.8f, 0.8f); + if(strongSelf.isClear){ // handle iOS 7 UIToolbar not answer well to hierarchy opacity change + strongSelf.hudView.alpha = 0.0f; + } else{ + strongSelf.alpha = 0.0f; + } + } + } + completion:^(BOOL finished){ + __strong SVProgressHUD *strongSelf = weakSelf; + if(strongSelf){ + if(strongSelf.alpha == 0.0f || strongSelf.hudView.alpha == 0.0f){ + strongSelf.alpha = 0.0f; + strongSelf.hudView.alpha = 0.0f; + + [[NSNotificationCenter defaultCenter] removeObserver:strongSelf]; + [strongSelf cancelRingLayerAnimation]; + [_hudView removeFromSuperview]; + _hudView = nil; + + [_overlayView removeFromSuperview]; + _overlayView = nil; + + [_indefiniteAnimatedView removeFromSuperview]; + _indefiniteAnimatedView = nil; + + UIAccessibilityPostNotification(UIAccessibilityScreenChangedNotification, nil); + + [[NSNotificationCenter defaultCenter] postNotificationName:SVProgressHUDDidDisappearNotification + object:nil + userInfo:userInfo]; + + // Tell the rootViewController to update the StatusBar appearance +#if !defined(SV_APP_EXTENSIONS) && TARGET_OS_IOS + UIViewController *rootController = [[UIApplication sharedApplication] keyWindow].rootViewController; + if([rootController respondsToSelector:@selector(setNeedsStatusBarAppearanceUpdate)]){ + [rootController setNeedsStatusBarAppearanceUpdate]; + } +#endif + // uncomment to make sure UIWindow is gone from app.windows + //NSLog(@"%@", [UIApplication sharedApplication].windows); + //NSLog(@"keyWindow = %@", [[[UIApplication sharedApplication] delegate] window]); + } + } + }]; +} + +- (void)dismiss +{ + [self dismissWithDelay:0]; +} + + +#pragma mark - Ring progress animation + +- (UIActivityIndicatorView *)createActivityIndicatorView{ + UIActivityIndicatorView *activityIndicatorView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]; + activityIndicatorView.color = self.foregroundColorForStyle; + [activityIndicatorView sizeToFit]; + return activityIndicatorView; +} + +- (SVIndefiniteAnimatedView *)createIndefiniteAnimatedView{ + SVIndefiniteAnimatedView *indefiniteAnimatedView = [[SVIndefiniteAnimatedView alloc] initWithFrame:CGRectZero]; + indefiniteAnimatedView.strokeColor = self.foregroundColorForStyle; + indefiniteAnimatedView.radius = self.stringLabel.text ? self.ringRadius : self.ringNoTextRadius; + indefiniteAnimatedView.strokeThickness = self.ringThickness; + [indefiniteAnimatedView sizeToFit]; + return indefiniteAnimatedView; +} + +- (UIView *)indefiniteAnimatedView{ + if(_indefiniteAnimatedView == nil){ + _indefiniteAnimatedView = (self.defaultAnimationType == SVProgressHUDAnimationTypeFlat) ? [self createIndefiniteAnimatedView] : [self createActivityIndicatorView]; + } + + return _indefiniteAnimatedView; +} + +- (CAShapeLayer*)ringLayer{ + if(!_ringLayer){ + CGPoint center = CGPointMake(CGRectGetWidth(_hudView.frame)/2, CGRectGetHeight(_hudView.frame)/2); + _ringLayer = [self createRingLayerWithCenter:center radius:self.ringRadius]; + [self.hudView.layer addSublayer:_ringLayer]; + } + _ringLayer.strokeColor = self.foregroundColorForStyle.CGColor; + _ringLayer.lineWidth = self.ringThickness; + + return _ringLayer; +} + +- (CAShapeLayer*)backgroundRingLayer{ + if(!_backgroundRingLayer){ + CGPoint center = CGPointMake(CGRectGetWidth(_hudView.frame)/2, CGRectGetHeight(_hudView.frame)/2); + _backgroundRingLayer = [self createRingLayerWithCenter:center radius:self.ringRadius]; + _backgroundRingLayer.strokeEnd = 1; + [self.hudView.layer addSublayer:_backgroundRingLayer]; + } + _backgroundRingLayer.strokeColor = [self.foregroundColorForStyle colorWithAlphaComponent:0.1f].CGColor; + _backgroundRingLayer.lineWidth = self.ringThickness; + + return _backgroundRingLayer; +} + +- (void)cancelRingLayerAnimation{ + [CATransaction begin]; + [CATransaction setDisableActions:YES]; + [_hudView.layer removeAllAnimations]; + + _ringLayer.strokeEnd = 0.0f; + if(_ringLayer.superlayer){ + [_ringLayer removeFromSuperlayer]; + } + _ringLayer = nil; + + if(_backgroundRingLayer.superlayer){ + [_backgroundRingLayer removeFromSuperlayer]; + } + _backgroundRingLayer = nil; + + [CATransaction commit]; +} + +- (CAShapeLayer*)createRingLayerWithCenter:(CGPoint)center radius:(CGFloat)radius{ + UIBezierPath* smoothedPath = [UIBezierPath bezierPathWithArcCenter:CGPointMake(radius, radius) radius:radius startAngle:(CGFloat) -M_PI_2 endAngle:(CGFloat) (M_PI + M_PI_2) clockwise:YES]; + + CAShapeLayer *slice = [CAShapeLayer layer]; + slice.contentsScale = [[UIScreen mainScreen] scale]; + slice.frame = CGRectMake(center.x-radius, center.y-radius, radius*2, radius*2); + slice.fillColor = [UIColor clearColor].CGColor; + slice.lineCap = kCALineCapRound; + slice.lineJoin = kCALineJoinBevel; + slice.path = smoothedPath.CGPath; + + return slice; +} + + +#pragma mark - Utilities + ++ (BOOL)isVisible{ + return ([self sharedView].alpha == 1); +} + + +#pragma mark - Getters ++ (NSTimeInterval)displayDurationForString:(NSString*)string{ + return MIN((float)string.length * 0.06 + 0.5, [self sharedView].minimumDismissTimeInterval); +} + +- (UIColor *)foregroundColorForStyle{ + if(self.defaultStyle == SVProgressHUDStyleLight){ + return [UIColor blackColor]; + } else if(self.defaultStyle == SVProgressHUDStyleDark){ + return [UIColor whiteColor]; + } else{ + return self.foregroundColor; + } +} + +- (UIColor *)backgroundColorForStyle{ + if(self.defaultStyle == SVProgressHUDStyleLight){ + return [UIColor whiteColor]; + } else if(self.defaultStyle == SVProgressHUDStyleDark){ + return [UIColor blackColor]; + } else{ + return self.backgroundColor; + } +} + +- (UIImage*)image:(UIImage*)image withTintColor:(UIColor*)color{ + CGRect rect = CGRectMake(0.0f, 0.0f, image.size.width, image.size.height); + UIGraphicsBeginImageContextWithOptions(rect.size, NO, image.scale); + CGContextRef c = UIGraphicsGetCurrentContext(); + [image drawInRect:rect]; + CGContextSetFillColorWithColor(c, [color CGColor]); + CGContextSetBlendMode(c, kCGBlendModeSourceAtop); + CGContextFillRect(c, rect); + UIImage *tintedImage = UIGraphicsGetImageFromCurrentImageContext(); + UIGraphicsEndImageContext(); + + return tintedImage; +} + +- (BOOL)isClear{ // used for iOS 7 and above + return (self.defaultMaskType == SVProgressHUDMaskTypeClear || self.defaultMaskType == SVProgressHUDMaskTypeNone); +} + +- (UIControl*)overlayView{ + if(!_overlayView){ +#if !defined(SV_APP_EXTENSIONS) + CGRect windowBounds = [[[UIApplication sharedApplication] delegate] window].bounds; + _overlayView = [[UIControl alloc] initWithFrame:windowBounds]; +#else + _overlayView = [[UIControl alloc] initWithFrame:[UIScreen mainScreen].bounds]; +#endif + _overlayView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; + _overlayView.backgroundColor = [UIColor clearColor]; + [_overlayView addTarget:self action:@selector(overlayViewDidReceiveTouchEvent:forEvent:) forControlEvents:UIControlEventTouchDown]; + } + return _overlayView; +} + +- (UIView*)hudView{ + if(!_hudView){ + _hudView = [[UIView alloc] initWithFrame:CGRectZero]; + _hudView.layer.cornerRadius = self.cornerRadius; + _hudView.layer.masksToBounds = YES; + _hudView.autoresizingMask = UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleLeftMargin; + } + _hudView.backgroundColor = self.backgroundColorForStyle; + + if(!_hudView.superview){ + [self addSubview:_hudView]; + } + return _hudView; +} + +- (UILabel*)stringLabel{ + if(!_stringLabel){ + _stringLabel = [[UILabel alloc] initWithFrame:CGRectZero]; + _stringLabel.backgroundColor = [UIColor clearColor]; + _stringLabel.adjustsFontSizeToFitWidth = YES; + _stringLabel.textAlignment = NSTextAlignmentCenter; + _stringLabel.baselineAdjustment = UIBaselineAdjustmentAlignCenters; + _stringLabel.numberOfLines = 0; + } + _stringLabel.textColor = self.foregroundColorForStyle; + _stringLabel.font = self.font; + + if(!_stringLabel.superview){ + [self.hudView addSubview:_stringLabel]; + } + return _stringLabel; +} + +- (UIImageView*)imageView{ + if(!_imageView){ + _imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 28.0f, 28.0f)]; + } + if(!_imageView.superview){ + [self.hudView addSubview:_imageView]; + } + return _imageView; +} + +- (CGFloat)visibleKeyboardHeight{ +#if !defined(SV_APP_EXTENSIONS) + UIWindow *keyboardWindow = nil; + for (UIWindow *testWindow in [[UIApplication sharedApplication] windows]){ + if(![[testWindow class] isEqual:[UIWindow class]]){ + keyboardWindow = testWindow; + break; + } + } + + for (__strong UIView *possibleKeyboard in [keyboardWindow subviews]){ + if([possibleKeyboard isKindOfClass:NSClassFromString(@"UIPeripheralHostView")] || [possibleKeyboard isKindOfClass:NSClassFromString(@"UIKeyboard")]){ + return CGRectGetHeight(possibleKeyboard.bounds); + } else if([possibleKeyboard isKindOfClass:NSClassFromString(@"UIInputSetContainerView")]){ + for (__strong UIView *possibleKeyboardSubview in [possibleKeyboard subviews]){ + if([possibleKeyboardSubview isKindOfClass:NSClassFromString(@"UIInputSetHostView")]){ + return CGRectGetHeight(possibleKeyboardSubview.bounds); + } + } + } + } +#endif + return 0; +} + +#pragma mark - UIAppearance Setters + +- (void)setDefaultStyle:(SVProgressHUDStyle)style{ + if (!_isInitializing) _defaultStyle = style; +} + +- (void)setDefaultMaskType:(SVProgressHUDMaskType)maskType{ + if (!_isInitializing) _defaultMaskType = maskType; +} + +- (void)setDefaultAnimationType:(SVProgressHUDAnimationType)animationType{ + if (!_isInitializing) _defaultAnimationType = animationType; +} + +- (void)setMinimumSize:(CGSize)minimumSize{ + if (!_isInitializing) _minimumSize = minimumSize; +} + +- (void)setRingThickness:(CGFloat)ringThickness{ + if (!_isInitializing) _ringThickness = ringThickness; +} + +- (void)setRingRadius:(CGFloat)ringRadius{ + if (!_isInitializing) _ringRadius = ringRadius; +} + +- (void)setRingNoTextRadius:(CGFloat)ringNoTextRadius{ + if (!_isInitializing) _ringNoTextRadius = ringNoTextRadius; +} + +- (void)setCornerRadius:(CGFloat)cornerRadius{ + if (!_isInitializing) _cornerRadius = cornerRadius; +} + +- (void)setFont:(UIFont *)font{ + if (!_isInitializing) _font = font; +} + +- (void)setBackgroundColor:(UIColor *)color{ + if (!_isInitializing) _backgroundColor = color; +} + +- (void)setForegroundColor:(UIColor *)color{ + if (!_isInitializing) _foregroundColor = color; +} + +- (void)setInfoImage:(UIImage*)image{ + if (!_isInitializing) _infoImage = image; +} + +- (void)setSuccessImage:(UIImage *)image{ + if (!_isInitializing) _successImage = image; +} + +- (void)setErrorImage:(UIImage *)image{ + if (!_isInitializing) _errorImage = image; +} + +- (void)setViewForExtension:(UIView *)view{ + if (!_isInitializing) _viewForExtension = view; +} + +- (void)setOffsetFromCenter:(UIOffset)offset{ + if (!_isInitializing) _offsetFromCenter = offset; +} + +- (void)setMinimumDismissTimeInterval:(NSTimeInterval)minimumDismissTimeInterval{ + if (!_isInitializing) _minimumDismissTimeInterval = minimumDismissTimeInterval; +} + +@end + diff --git a/Pods/SVProgressHUD/SVProgressHUD/SVRadialGradientLayer.h b/Pods/SVProgressHUD/SVProgressHUD/SVRadialGradientLayer.h new file mode 100644 index 0000000..38cbf74 --- /dev/null +++ b/Pods/SVProgressHUD/SVProgressHUD/SVRadialGradientLayer.h @@ -0,0 +1,14 @@ +// +// SVRadialGradientLayer.h +// SVProgressHUD, https://github.com/TransitApp/SVProgressHUD +// +// Copyright (c) 2014 Tobias Tiemerding. All rights reserved. +// + +#import + +@interface SVRadialGradientLayer : CALayer + +@property (nonatomic) CGPoint gradientCenter; + +@end diff --git a/Pods/SVProgressHUD/SVProgressHUD/SVRadialGradientLayer.m b/Pods/SVProgressHUD/SVProgressHUD/SVRadialGradientLayer.m new file mode 100644 index 0000000..dd4c89a --- /dev/null +++ b/Pods/SVProgressHUD/SVProgressHUD/SVRadialGradientLayer.m @@ -0,0 +1,25 @@ +// +// SVRadialGradientLayer.m +// SVProgressHUD, https://github.com/TransitApp/SVProgressHUD +// +// Copyright (c) 2014 Tobias Tiemerding. All rights reserved. +// + +#import "SVRadialGradientLayer.h" + +@implementation SVRadialGradientLayer + +- (void)drawInContext:(CGContextRef)context { + size_t locationsCount = 2; + CGFloat locations[2] = {0.0f, 1.0f}; + CGFloat colors[8] = {0.0f,0.0f,0.0f,0.0f,0.0f,0.0f,0.0f,0.75f}; + CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); + CGGradientRef gradient = CGGradientCreateWithColorComponents(colorSpace, colors, locations, locationsCount); + CGColorSpaceRelease(colorSpace); + + float radius = MIN(self.bounds.size.width , self.bounds.size.height) ; + CGContextDrawRadialGradient (context, gradient, self.gradientCenter, 0, self.gradientCenter, radius, kCGGradientDrawsAfterEndLocation); + CGGradientRelease(gradient); +} + +@end diff --git a/Pods/SwiftyJSON/LICENSE b/Pods/SwiftyJSON/LICENSE new file mode 100644 index 0000000..a7af196 --- /dev/null +++ b/Pods/SwiftyJSON/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Ruoyu Fu + +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/Pods/SwiftyJSON/README.md b/Pods/SwiftyJSON/README.md new file mode 100644 index 0000000..9fe68f1 --- /dev/null +++ b/Pods/SwiftyJSON/README.md @@ -0,0 +1,377 @@ +#SwiftyJSON [中文介绍](http://tangplin.github.io/swiftyjson/) + +[![Travis CI](https://travis-ci.org/SwiftyJSON/SwiftyJSON.svg?branch=master)](https://travis-ci.org/SwiftyJSON/SwiftyJSON) + +SwiftyJSON makes it easy to deal with JSON data in Swift. + +1. [Why is the typical JSON handling in Swift NOT good](#why-is-the-typical-json-handling-in-swift-not-good) +1. [Requirements](#requirements) +1. [Integration](#integration) +1. [Usage](#usage) + - [Initialization](#initialization) + - [Subscript](#subscript) + - [Loop](#loop) + - [Error](#error) + - [Optional getter](#optional-getter) + - [Non-optional getter](#non-optional-getter) + - [Setter](#setter) + - [Raw object](#raw-object) + - [Literal convertibles](#literal-convertibles) +1. [Work with Alamofire](#work-with-alamofire) + +##Why is the typical JSON handling in Swift NOT good? +Swift is very strict about types. But although explicit typing is good for saving us from mistakes, it becomes painful when dealing with JSON and other areas that are, by nature, implicit about types. + +Take the Twitter API for example. Say we want to retrieve a user's "name" value of some tweet in Swift (according to Twitter's API https://dev.twitter.com/docs/api/1.1/get/statuses/home_timeline). + +The code would look like this: + +```swift + +if let statusesArray = try? NSJSONSerialization.JSONObjectWithData(data, options: .AllowFragments) as? [[String: AnyObject]], + let user = statusesArray[0]["user"] as? [String: AnyObject], + let username = user["name"] as? String { + // Finally we got the username +} + +``` + +It's not good. + +Even if we use optional chaining, it would be messy: + +```swift + +if let JSONObject = try NSJSONSerialization.JSONObjectWithData(data, options: .AllowFragments) as? [[String: AnyObject]], + let username = (JSONObject[0]["user"] as? [String: AnyObject])?["name"] as? String { + // There's our username +} + +``` +An unreadable mess--for something that should really be simple! + +With SwiftyJSON all you have to do is: + +```swift + +let json = JSON(data: dataFromNetworking) +if let userName = json[0]["user"]["name"].string { + //Now you got your value +} + +``` + +And don't worry about the Optional Wrapping thing. It's done for you automatically. + +```swift + +let json = JSON(data: dataFromNetworking) +if let userName = json[999999]["wrong_key"]["wrong_name"].string { + //Calm down, take it easy, the ".string" property still produces the correct Optional String type with safety +} else { + //Print the error + print(json[999999]["wrong_key"]["wrong_name"]) +} + +``` + +## Requirements + +- iOS 7.0+ / Mac OS X 10.9+ +- Xcode 7 + +##Integration + +####CocoaPods (iOS 8+, OS X 10.9+) +You can use [Cocoapods](http://cocoapods.org/) to install `SwiftyJSON`by adding it to your `Podfile`: +```ruby +platform :ios, '8.0' +use_frameworks! + +target 'MyApp' do + pod 'SwiftyJSON', :git => 'https://github.com/SwiftyJSON/SwiftyJSON.git' +end +``` +Note that this requires CocoaPods version 36, and your iOS deployment target to be at least 8.0: + +####Carthage (iOS 8+, OS X 10.9+) +You can use [Carthage](https://github.com/Carthage/Carthage) to install `SwiftyJSON` by adding it to your `Cartfile`: +``` +github "SwiftyJSON/SwiftyJSON" +``` + +####Manually (iOS 7+, OS X 10.9+) + +To use this library in your project manually you may: + +1. for Projects, just drag SwiftyJSON.swift to the project tree +2. for Workspaces, include the whole SwiftyJSON.xcodeproj + +## Usage + +####Initialization +```swift +import SwiftyJSON +``` +```swift +let json = JSON(data: dataFromNetworking) +``` +```swift +let json = JSON(jsonObject) +``` +```swift +if let dataFromString = jsonString.dataUsingEncoding(NSUTF8StringEncoding, allowLossyConversion: false) { + let json = JSON(data: dataFromString) +} +``` + +####Subscript +```swift +//Getting a double from a JSON Array +let name = json[0].double +``` +```swift +//Getting a string from a JSON Dictionary +let name = json["name"].stringValue +``` +```swift +//Getting a string using a path to the element +let path = [1,"list",2,"name"] +let name = json[path].string +//Just the same +let name = json[1]["list"][2]["name"].string +//Alternatively +let name = json[1,"list",2,"name"].string +``` +```swift +//With a hard way +let name = json[].string +``` +```swift +//With a custom way +let keys:[SubscriptType] = [1,"list",2,"name"] +let name = json[keys].string +``` +####Loop +```swift +//If json is .Dictionary +for (key,subJson):(String, JSON) in json { + //Do something you want +} +``` +*The first element is always a String, even if the JSON is an Array* +```swift +//If json is .Array +//The `index` is 0.. = json["list"].arrayValue +``` +```swift +//If not a Dictionary or nil, return [:] +let user: Dictionary = json["user"].dictionaryValue +``` + +####Setter +```swift +json["name"] = JSON("new-name") +json[0] = JSON(1) +``` +```swift +json["id"].int = 1234567890 +json["coordinate"].double = 8766.766 +json["name"].string = "Jack" +json.arrayObject = [1,2,3,4] +json.dictionary = ["name":"Jack", "age":25] +``` + +####Raw object +```swift +let jsonObject: AnyObject = json.object +``` +```swift +if let jsonObject: AnyObject = json.rawValue +``` +```swift +//convert the JSON to raw NSData +if let data = json.rawData() { + //Do something you want +} +``` +```swift +//convert the JSON to a raw String +if let string = json.rawString() { + //Do something you want +} +``` +####Existance +```swift +//shows you whether value specified in JSON or not +if json["name"].isExists() +``` + +####Literal convertibles +For more info about literal convertibles: [Swift Literal Convertibles](http://nshipster.com/swift-literal-convertible/) +```swift +//StringLiteralConvertible +let json: JSON = "I'm a json" +``` +```swift +//IntegerLiteralConvertible +let json: JSON = 12345 +``` +```swift +//BooleanLiteralConvertible +let json: JSON = true +``` +```swift +//FloatLiteralConvertible +let json: JSON = 2.8765 +``` +```swift +//DictionaryLiteralConvertible +let json: JSON = ["I":"am", "a":"json"] +``` +```swift +//ArrayLiteralConvertible +let json: JSON = ["I", "am", "a", "json"] +``` +```swift +//NilLiteralConvertible +let json: JSON = nil +``` +```swift +//With subscript in array +var json: JSON = [1,2,3] +json[0] = 100 +json[1] = 200 +json[2] = 300 +json[999] = 300 //Don't worry, nothing will happen +``` +```swift +//With subscript in dictionary +var json: JSON = ["name": "Jack", "age": 25] +json["name"] = "Mike" +json["age"] = "25" //It's OK to set String +json["address"] = "L.A." // Add the "address": "L.A." in json +``` +```swift +//Array & Dictionary +var json: JSON = ["name": "Jack", "age": 25, "list": ["a", "b", "c", ["what": "this"]]] +json["list"][3]["what"] = "that" +json["list",3,"what"] = "that" +let path = ["list",3,"what"] +json[path] = "that" +``` +##Work with Alamofire + +SwiftyJSON nicely wraps the result of the Alamofire JSON response handler: +```swift +Alamofire.request(.GET, url, parameters: parameters) + .responseJSON { (req, res, json, error) in + if(error != nil) { + NSLog("Error: \(error)") + print(req) + print(res) + } + else { + NSLog("Success: \(url)") + var json = JSON(json!) + } + } +``` diff --git a/Pods/SwiftyJSON/Source/SwiftyJSON.swift b/Pods/SwiftyJSON/Source/SwiftyJSON.swift new file mode 100644 index 0000000..f0397a4 --- /dev/null +++ b/Pods/SwiftyJSON/Source/SwiftyJSON.swift @@ -0,0 +1,1365 @@ +// SwiftyJSON.swift +// +// Copyright (c) 2014 Ruoyu Fu, Pinglin Tang +// +// 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 Foundation + +// MARK: - Error + +///Error domain +public let ErrorDomain: String! = "SwiftyJSONErrorDomain" + +///Error code +public let ErrorUnsupportedType: Int! = 999 +public let ErrorIndexOutOfBounds: Int! = 900 +public let ErrorWrongType: Int! = 901 +public let ErrorNotExist: Int! = 500 +public let ErrorInvalidJSON: Int! = 490 + +// MARK: - JSON Type + +/** +JSON's type definitions. + +See http://tools.ietf.org/html/rfc7231#section-4.3 +*/ +public enum Type :Int{ + + case Number + case String + case Bool + case Array + case Dictionary + case Null + case Unknown +} + +// MARK: - JSON Base + +public struct JSON { + + /** + Creates a JSON using the data. + + - parameter data: The NSData used to convert to json.Top level object in data is an NSArray or NSDictionary + - parameter opt: The JSON serialization reading options. `.AllowFragments` by default. + - parameter error: error The NSErrorPointer used to return the error. `nil` by default. + + - returns: The created JSON + */ + public init(data:NSData, options opt: NSJSONReadingOptions = .AllowFragments, error: NSErrorPointer = nil) { + do { + let object: AnyObject = try NSJSONSerialization.JSONObjectWithData(data, options: opt) + self.init(object) + } catch let aError as NSError { + if error != nil { + error.memory = aError + } + self.init(NSNull()) + } + } + + /** + Creates a JSON using the object. + + - parameter object: The object must have the following properties: All objects are NSString/String, NSNumber/Int/Float/Double/Bool, NSArray/Array, NSDictionary/Dictionary, or NSNull; All dictionary keys are NSStrings/String; NSNumbers are not NaN or infinity. + + - returns: The created JSON + */ + public init(_ object: AnyObject) { + self.object = object + } + + /** + Creates a JSON from a [JSON] + + - parameter jsonArray: A Swift array of JSON objects + + - returns: The created JSON + */ + public init(_ jsonArray:[JSON]) { + self.init(jsonArray.map { $0.object }) + } + + /** + Creates a JSON from a [String: JSON] + + - parameter jsonDictionary: A Swift dictionary of JSON objects + + - returns: The created JSON + */ + public init(_ jsonDictionary:[String: JSON]) { + var dictionary = [String: AnyObject]() + for (key, json) in jsonDictionary { + dictionary[key] = json.object + } + self.init(dictionary) + } + + /// Private object + private var rawArray: [AnyObject] = [] + private var rawDictionary: [String : AnyObject] = [:] + private var rawString: String = "" + private var rawNumber: NSNumber = 0 + private var rawNull: NSNull = NSNull() + /// Private type + private var _type: Type = .Null + /// prviate error + private var _error: NSError? = nil + + /// Object in JSON + public var object: AnyObject { + get { + switch self.type { + case .Array: + return self.rawArray + case .Dictionary: + return self.rawDictionary + case .String: + return self.rawString + case .Number: + return self.rawNumber + case .Bool: + return self.rawNumber + default: + return self.rawNull + } + } + set { + _error = nil + switch newValue { + case let number as NSNumber: + if number.isBool { + _type = .Bool + } else { + _type = .Number + } + self.rawNumber = number + case let string as String: + _type = .String + self.rawString = string + case _ as NSNull: + _type = .Null + case let array as [AnyObject]: + _type = .Array + self.rawArray = array + case let dictionary as [String : AnyObject]: + _type = .Dictionary + self.rawDictionary = dictionary + default: + _type = .Unknown + _error = NSError(domain: ErrorDomain, code: ErrorUnsupportedType, userInfo: [NSLocalizedDescriptionKey: "It is a unsupported type"]) + } + } + } + + /// json type + public var type: Type { get { return _type } } + + /// Error in JSON + public var error: NSError? { get { return self._error } } + + /// The static null json + @available(*, unavailable, renamed="null") + public static var nullJSON: JSON { get { return null } } + public static var null: JSON { get { return JSON(NSNull()) } } +} + +// MARK: - CollectionType, SequenceType, Indexable +extension JSON : Swift.CollectionType, Swift.SequenceType, Swift.Indexable { + + public typealias Generator = JSONGenerator + + public typealias Index = JSONIndex + + public var startIndex: JSON.Index { + switch self.type { + case .Array: + return JSONIndex(arrayIndex: self.rawArray.startIndex) + case .Dictionary: + return JSONIndex(dictionaryIndex: self.rawDictionary.startIndex) + default: + return JSONIndex() + } + } + + public var endIndex: JSON.Index { + switch self.type { + case .Array: + return JSONIndex(arrayIndex: self.rawArray.endIndex) + case .Dictionary: + return JSONIndex(dictionaryIndex: self.rawDictionary.endIndex) + default: + return JSONIndex() + } + } + + public subscript (position: JSON.Index) -> JSON.Generator.Element { + switch self.type { + case .Array: + return (String(position.arrayIndex), JSON(self.rawArray[position.arrayIndex!])) + case .Dictionary: + let (key, value) = self.rawDictionary[position.dictionaryIndex!] + return (key, JSON(value)) + default: + return ("", JSON.null) + } + } + + /// If `type` is `.Array` or `.Dictionary`, return `array.empty` or `dictonary.empty` otherwise return `true`. + public var isEmpty: Bool { + get { + switch self.type { + case .Array: + return self.rawArray.isEmpty + case .Dictionary: + return self.rawDictionary.isEmpty + default: + return true + } + } + } + + /// If `type` is `.Array` or `.Dictionary`, return `array.count` or `dictonary.count` otherwise return `0`. + public var count: Int { + switch self.type { + case .Array: + return self.rawArray.count + case .Dictionary: + return self.rawDictionary.count + default: + return 0 + } + } + + public func underestimateCount() -> Int { + switch self.type { + case .Array: + return self.rawArray.underestimateCount() + case .Dictionary: + return self.rawDictionary.underestimateCount() + default: + return 0 + } + } + + /** + If `type` is `.Array` or `.Dictionary`, return a generator over the elements like `Array` or `Dictionary`, otherwise return a generator over empty. + + - returns: Return a *generator* over the elements of JSON. + */ + public func generate() -> JSON.Generator { + return JSON.Generator(self) + } +} + +public struct JSONIndex: ForwardIndexType, _Incrementable, Equatable, Comparable { + + let arrayIndex: Int? + let dictionaryIndex: DictionaryIndex? + + let type: Type + + init(){ + self.arrayIndex = nil + self.dictionaryIndex = nil + self.type = .Unknown + } + + init(arrayIndex: Int) { + self.arrayIndex = arrayIndex + self.dictionaryIndex = nil + self.type = .Array + } + + init(dictionaryIndex: DictionaryIndex) { + self.arrayIndex = nil + self.dictionaryIndex = dictionaryIndex + self.type = .Dictionary + } + + public func successor() -> JSONIndex { + switch self.type { + case .Array: + return JSONIndex(arrayIndex: self.arrayIndex!.successor()) + case .Dictionary: + return JSONIndex(dictionaryIndex: self.dictionaryIndex!.successor()) + default: + return JSONIndex() + } + } +} + +public func ==(lhs: JSONIndex, rhs: JSONIndex) -> Bool { + switch (lhs.type, rhs.type) { + case (.Array, .Array): + return lhs.arrayIndex == rhs.arrayIndex + case (.Dictionary, .Dictionary): + return lhs.dictionaryIndex == rhs.dictionaryIndex + default: + return false + } +} + +public func <(lhs: JSONIndex, rhs: JSONIndex) -> Bool { + switch (lhs.type, rhs.type) { + case (.Array, .Array): + return lhs.arrayIndex < rhs.arrayIndex + case (.Dictionary, .Dictionary): + return lhs.dictionaryIndex < rhs.dictionaryIndex + default: + return false + } +} + +public func <=(lhs: JSONIndex, rhs: JSONIndex) -> Bool { + switch (lhs.type, rhs.type) { + case (.Array, .Array): + return lhs.arrayIndex <= rhs.arrayIndex + case (.Dictionary, .Dictionary): + return lhs.dictionaryIndex <= rhs.dictionaryIndex + default: + return false + } +} + +public func >=(lhs: JSONIndex, rhs: JSONIndex) -> Bool { + switch (lhs.type, rhs.type) { + case (.Array, .Array): + return lhs.arrayIndex >= rhs.arrayIndex + case (.Dictionary, .Dictionary): + return lhs.dictionaryIndex >= rhs.dictionaryIndex + default: + return false + } +} + +public func >(lhs: JSONIndex, rhs: JSONIndex) -> Bool { + switch (lhs.type, rhs.type) { + case (.Array, .Array): + return lhs.arrayIndex > rhs.arrayIndex + case (.Dictionary, .Dictionary): + return lhs.dictionaryIndex > rhs.dictionaryIndex + default: + return false + } +} + +public struct JSONGenerator : GeneratorType { + + public typealias Element = (String, JSON) + + private let type: Type + private var dictionayGenerate: DictionaryGenerator? + private var arrayGenerate: IndexingGenerator<[AnyObject]>? + private var arrayIndex: Int = 0 + + init(_ json: JSON) { + self.type = json.type + if type == .Array { + self.arrayGenerate = json.rawArray.generate() + }else { + self.dictionayGenerate = json.rawDictionary.generate() + } + } + + public mutating func next() -> JSONGenerator.Element? { + switch self.type { + case .Array: + if let o = self.arrayGenerate!.next() { + return (String(self.arrayIndex++), JSON(o)) + } else { + return nil + } + case .Dictionary: + if let (k, v): (String, AnyObject) = self.dictionayGenerate!.next() { + return (k, JSON(v)) + } else { + return nil + } + default: + return nil + } + } +} + +// MARK: - Subscript + +/** +* To mark both String and Int can be used in subscript. +*/ +public enum JSONKey { + case Index(Int) + case Key(String) +} + +public protocol JSONSubscriptType { + var jsonKey:JSONKey { get } +} + +extension Int: JSONSubscriptType { + public var jsonKey:JSONKey { + return JSONKey.Index(self) + } +} + +extension String: JSONSubscriptType { + public var jsonKey:JSONKey { + return JSONKey.Key(self) + } +} + +extension JSON { + + /// If `type` is `.Array`, return json which's object is `array[index]`, otherwise return null json with error. + private subscript(index index: Int) -> JSON { + get { + if self.type != .Array { + var r = JSON.null + r._error = self._error ?? NSError(domain: ErrorDomain, code: ErrorWrongType, userInfo: [NSLocalizedDescriptionKey: "Array[\(index)] failure, It is not an array"]) + return r + } else if index >= 0 && index < self.rawArray.count { + return JSON(self.rawArray[index]) + } else { + var r = JSON.null + r._error = NSError(domain: ErrorDomain, code:ErrorIndexOutOfBounds , userInfo: [NSLocalizedDescriptionKey: "Array[\(index)] is out of bounds"]) + return r + } + } + set { + if self.type == .Array { + if self.rawArray.count > index && newValue.error == nil { + self.rawArray[index] = newValue.object + } + } + } + } + + /// If `type` is `.Dictionary`, return json which's object is `dictionary[key]` , otherwise return null json with error. + private subscript(key key: String) -> JSON { + get { + var r = JSON.null + if self.type == .Dictionary { + if let o = self.rawDictionary[key] { + r = JSON(o) + } else { + r._error = NSError(domain: ErrorDomain, code: ErrorNotExist, userInfo: [NSLocalizedDescriptionKey: "Dictionary[\"\(key)\"] does not exist"]) + } + } else { + r._error = self._error ?? NSError(domain: ErrorDomain, code: ErrorWrongType, userInfo: [NSLocalizedDescriptionKey: "Dictionary[\"\(key)\"] failure, It is not an dictionary"]) + } + return r + } + set { + if self.type == .Dictionary && newValue.error == nil { + self.rawDictionary[key] = newValue.object + } + } + } + + /// If `sub` is `Int`, return `subscript(index:)`; If `sub` is `String`, return `subscript(key:)`. + private subscript(sub sub: JSONSubscriptType) -> JSON { + get { + switch sub.jsonKey { + case .Index(let index): return self[index: index] + case .Key(let key): return self[key: key] + } + } + set { + switch sub.jsonKey { + case .Index(let index): self[index: index] = newValue + case .Key(let key): self[key: key] = newValue + } + } + } + + /** + Find a json in the complex data structuresby using the Int/String's array. + + - parameter path: The target json's path. Example: + + let json = JSON[data] + let path = [9,"list","person","name"] + let name = json[path] + + The same as: let name = json[9]["list"]["person"]["name"] + + - returns: Return a json found by the path or a null json with error + */ + public subscript(path: [JSONSubscriptType]) -> JSON { + get { + return path.reduce(self) { $0[sub: $1] } + } + set { + switch path.count { + case 0: + return + case 1: + self[sub:path[0]].object = newValue.object + default: + var aPath = path; aPath.removeAtIndex(0) + var nextJSON = self[sub: path[0]] + nextJSON[aPath] = newValue + self[sub: path[0]] = nextJSON + } + } + } + + /** + Find a json in the complex data structuresby using the Int/String's array. + + - parameter path: The target json's path. Example: + + let name = json[9,"list","person","name"] + + The same as: let name = json[9]["list"]["person"]["name"] + + - returns: Return a json found by the path or a null json with error + */ + public subscript(path: JSONSubscriptType...) -> JSON { + get { + return self[path] + } + set { + self[path] = newValue + } + } +} + +// MARK: - LiteralConvertible + +extension JSON: Swift.StringLiteralConvertible { + + public init(stringLiteral value: StringLiteralType) { + self.init(value) + } + + public init(extendedGraphemeClusterLiteral value: StringLiteralType) { + self.init(value) + } + + public init(unicodeScalarLiteral value: StringLiteralType) { + self.init(value) + } +} + +extension JSON: Swift.IntegerLiteralConvertible { + + public init(integerLiteral value: IntegerLiteralType) { + self.init(value) + } +} + +extension JSON: Swift.BooleanLiteralConvertible { + + public init(booleanLiteral value: BooleanLiteralType) { + self.init(value) + } +} + +extension JSON: Swift.FloatLiteralConvertible { + + public init(floatLiteral value: FloatLiteralType) { + self.init(value) + } +} + +extension JSON: Swift.DictionaryLiteralConvertible { + + public init(dictionaryLiteral elements: (String, AnyObject)...) { + self.init(elements.reduce([String : AnyObject]()){(dictionary: [String : AnyObject], element:(String, AnyObject)) -> [String : AnyObject] in + var d = dictionary + d[element.0] = element.1 + return d + }) + } +} + +extension JSON: Swift.ArrayLiteralConvertible { + + public init(arrayLiteral elements: AnyObject...) { + self.init(elements) + } +} + +extension JSON: Swift.NilLiteralConvertible { + + public init(nilLiteral: ()) { + self.init(NSNull()) + } +} + +// MARK: - Raw + +extension JSON: Swift.RawRepresentable { + + public init?(rawValue: AnyObject) { + if JSON(rawValue).type == .Unknown { + return nil + } else { + self.init(rawValue) + } + } + + public var rawValue: AnyObject { + return self.object + } + + public func rawData(options opt: NSJSONWritingOptions = NSJSONWritingOptions(rawValue: 0)) throws -> NSData { + guard NSJSONSerialization.isValidJSONObject(self.object) else { + throw NSError(domain: ErrorDomain, code: ErrorInvalidJSON, userInfo: [NSLocalizedDescriptionKey: "JSON is invalid"]) + } + + return try NSJSONSerialization.dataWithJSONObject(self.object, options: opt) + } + + public func rawString(encoding: UInt = NSUTF8StringEncoding, options opt: NSJSONWritingOptions = .PrettyPrinted) -> String? { + switch self.type { + case .Array, .Dictionary: + do { + let data = try self.rawData(options: opt) + return NSString(data: data, encoding: encoding) as? String + } catch _ { + return nil + } + case .String: + return self.rawString + case .Number: + return self.rawNumber.stringValue + case .Bool: + return self.rawNumber.boolValue.description + case .Null: + return "null" + default: + return nil + } + } +} + +// MARK: - Printable, DebugPrintable + +extension JSON: Swift.Printable, Swift.DebugPrintable { + + public var description: String { + if let string = self.rawString(options:.PrettyPrinted) { + return string + } else { + return "unknown" + } + } + + public var debugDescription: String { + return description + } +} + +// MARK: - Array + +extension JSON { + + //Optional [JSON] + public var array: [JSON]? { + get { + if self.type == .Array { + return self.rawArray.map{ JSON($0) } + } else { + return nil + } + } + } + + //Non-optional [JSON] + public var arrayValue: [JSON] { + get { + return self.array ?? [] + } + } + + //Optional [AnyObject] + public var arrayObject: [AnyObject]? { + get { + switch self.type { + case .Array: + return self.rawArray + default: + return nil + } + } + set { + if let array = newValue { + self.object = array + } else { + self.object = NSNull() + } + } + } +} + +// MARK: - Dictionary + +extension JSON { + + //Optional [String : JSON] + public var dictionary: [String : JSON]? { + if self.type == .Dictionary { + return self.rawDictionary.reduce([String : JSON]()) { (dictionary: [String : JSON], element: (String, AnyObject)) -> [String : JSON] in + var d = dictionary + d[element.0] = JSON(element.1) + return d + } + } else { + return nil + } + } + + //Non-optional [String : JSON] + public var dictionaryValue: [String : JSON] { + return self.dictionary ?? [:] + } + + //Optional [String : AnyObject] + public var dictionaryObject: [String : AnyObject]? { + get { + switch self.type { + case .Dictionary: + return self.rawDictionary + default: + return nil + } + } + set { + if let v = newValue { + self.object = v + } else { + self.object = NSNull() + } + } + } +} + +// MARK: - Bool + +extension JSON: Swift.BooleanType { + + //Optional bool + public var bool: Bool? { + get { + switch self.type { + case .Bool: + return self.rawNumber.boolValue + default: + return nil + } + } + set { + if newValue != nil { + self.object = NSNumber(bool: newValue!) + } else { + self.object = NSNull() + } + } + } + + //Non-optional bool + public var boolValue: Bool { + get { + switch self.type { + case .Bool, .Number, .String: + return self.object.boolValue + default: + return false + } + } + set { + self.object = NSNumber(bool: newValue) + } + } +} + +// MARK: - String + +extension JSON { + + //Optional string + public var string: String? { + get { + switch self.type { + case .String: + return self.object as? String + default: + return nil + } + } + set { + if newValue != nil { + self.object = NSString(string:newValue!) + } else { + self.object = NSNull() + } + } + } + + //Non-optional string + public var stringValue: String { + get { + switch self.type { + case .String: + return self.object as! String + case .Number: + return self.object.stringValue + case .Bool: + return (self.object as! Bool).description + default: + return "" + } + } + set { + self.object = NSString(string:newValue) + } + } +} + +// MARK: - Number +extension JSON { + + //Optional number + public var number: NSNumber? { + get { + switch self.type { + case .Number, .Bool: + return self.rawNumber + default: + return nil + } + } + set { + self.object = newValue ?? NSNull() + } + } + + //Non-optional number + public var numberValue: NSNumber { + get { + switch self.type { + case .String: + let decimal = NSDecimalNumber(string: self.object as? String) + if decimal == NSDecimalNumber.notANumber() { // indicates parse error + return NSDecimalNumber.zero() + } + return decimal + case .Number, .Bool: + return self.object as! NSNumber + default: + return NSNumber(double: 0.0) + } + } + set { + self.object = newValue + } + } +} + +//MARK: - Null +extension JSON { + + public var null: NSNull? { + get { + switch self.type { + case .Null: + return self.rawNull + default: + return nil + } + } + set { + self.object = NSNull() + } + } + public func isExists() -> Bool{ + if let errorValue = error where errorValue.code == ErrorNotExist{ + return false + } + return true + } +} + +//MARK: - URL +extension JSON { + + //Optional URL + public var URL: NSURL? { + get { + switch self.type { + case .String: + if let encodedString_ = self.rawString.stringByAddingPercentEncodingWithAllowedCharacters(NSCharacterSet.URLQueryAllowedCharacterSet()) { + return NSURL(string: encodedString_) + } else { + return nil + } + default: + return nil + } + } + set { + self.object = newValue?.absoluteString ?? NSNull() + } + } +} + +// MARK: - Int, Double, Float, Int8, Int16, Int32, Int64 + +extension JSON { + + public var double: Double? { + get { + return self.number?.doubleValue + } + set { + if newValue != nil { + self.object = NSNumber(double: newValue!) + } else { + self.object = NSNull() + } + } + } + + public var doubleValue: Double { + get { + return self.numberValue.doubleValue + } + set { + self.object = NSNumber(double: newValue) + } + } + + public var float: Float? { + get { + return self.number?.floatValue + } + set { + if newValue != nil { + self.object = NSNumber(float: newValue!) + } else { + self.object = NSNull() + } + } + } + + public var floatValue: Float { + get { + return self.numberValue.floatValue + } + set { + self.object = NSNumber(float: newValue) + } + } + + public var int: Int? { + get { + return self.number?.longValue + } + set { + if newValue != nil { + self.object = NSNumber(integer: newValue!) + } else { + self.object = NSNull() + } + } + } + + public var intValue: Int { + get { + return self.numberValue.integerValue + } + set { + self.object = NSNumber(integer: newValue) + } + } + + public var uInt: UInt? { + get { + return self.number?.unsignedLongValue + } + set { + if newValue != nil { + self.object = NSNumber(unsignedLong: newValue!) + } else { + self.object = NSNull() + } + } + } + + public var uIntValue: UInt { + get { + return self.numberValue.unsignedLongValue + } + set { + self.object = NSNumber(unsignedLong: newValue) + } + } + + public var int8: Int8? { + get { + return self.number?.charValue + } + set { + if newValue != nil { + self.object = NSNumber(char: newValue!) + } else { + self.object = NSNull() + } + } + } + + public var int8Value: Int8 { + get { + return self.numberValue.charValue + } + set { + self.object = NSNumber(char: newValue) + } + } + + public var uInt8: UInt8? { + get { + return self.number?.unsignedCharValue + } + set { + if newValue != nil { + self.object = NSNumber(unsignedChar: newValue!) + } else { + self.object = NSNull() + } + } + } + + public var uInt8Value: UInt8 { + get { + return self.numberValue.unsignedCharValue + } + set { + self.object = NSNumber(unsignedChar: newValue) + } + } + + public var int16: Int16? { + get { + return self.number?.shortValue + } + set { + if newValue != nil { + self.object = NSNumber(short: newValue!) + } else { + self.object = NSNull() + } + } + } + + public var int16Value: Int16 { + get { + return self.numberValue.shortValue + } + set { + self.object = NSNumber(short: newValue) + } + } + + public var uInt16: UInt16? { + get { + return self.number?.unsignedShortValue + } + set { + if newValue != nil { + self.object = NSNumber(unsignedShort: newValue!) + } else { + self.object = NSNull() + } + } + } + + public var uInt16Value: UInt16 { + get { + return self.numberValue.unsignedShortValue + } + set { + self.object = NSNumber(unsignedShort: newValue) + } + } + + public var int32: Int32? { + get { + return self.number?.intValue + } + set { + if newValue != nil { + self.object = NSNumber(int: newValue!) + } else { + self.object = NSNull() + } + } + } + + public var int32Value: Int32 { + get { + return self.numberValue.intValue + } + set { + self.object = NSNumber(int: newValue) + } + } + + public var uInt32: UInt32? { + get { + return self.number?.unsignedIntValue + } + set { + if newValue != nil { + self.object = NSNumber(unsignedInt: newValue!) + } else { + self.object = NSNull() + } + } + } + + public var uInt32Value: UInt32 { + get { + return self.numberValue.unsignedIntValue + } + set { + self.object = NSNumber(unsignedInt: newValue) + } + } + + public var int64: Int64? { + get { + return self.number?.longLongValue + } + set { + if newValue != nil { + self.object = NSNumber(longLong: newValue!) + } else { + self.object = NSNull() + } + } + } + + public var int64Value: Int64 { + get { + return self.numberValue.longLongValue + } + set { + self.object = NSNumber(longLong: newValue) + } + } + + public var uInt64: UInt64? { + get { + return self.number?.unsignedLongLongValue + } + set { + if newValue != nil { + self.object = NSNumber(unsignedLongLong: newValue!) + } else { + self.object = NSNull() + } + } + } + + public var uInt64Value: UInt64 { + get { + return self.numberValue.unsignedLongLongValue + } + set { + self.object = NSNumber(unsignedLongLong: newValue) + } + } +} + +//MARK: - Comparable +extension JSON : Swift.Comparable {} + +public func ==(lhs: JSON, rhs: JSON) -> Bool { + + switch (lhs.type, rhs.type) { + case (.Number, .Number): + return lhs.rawNumber == rhs.rawNumber + case (.String, .String): + return lhs.rawString == rhs.rawString + case (.Bool, .Bool): + return lhs.rawNumber.boolValue == rhs.rawNumber.boolValue + case (.Array, .Array): + return lhs.rawArray as NSArray == rhs.rawArray as NSArray + case (.Dictionary, .Dictionary): + return lhs.rawDictionary as NSDictionary == rhs.rawDictionary as NSDictionary + case (.Null, .Null): + return true + default: + return false + } +} + +public func <=(lhs: JSON, rhs: JSON) -> Bool { + + switch (lhs.type, rhs.type) { + case (.Number, .Number): + return lhs.rawNumber <= rhs.rawNumber + case (.String, .String): + return lhs.rawString <= rhs.rawString + case (.Bool, .Bool): + return lhs.rawNumber.boolValue == rhs.rawNumber.boolValue + case (.Array, .Array): + return lhs.rawArray as NSArray == rhs.rawArray as NSArray + case (.Dictionary, .Dictionary): + return lhs.rawDictionary as NSDictionary == rhs.rawDictionary as NSDictionary + case (.Null, .Null): + return true + default: + return false + } +} + +public func >=(lhs: JSON, rhs: JSON) -> Bool { + + switch (lhs.type, rhs.type) { + case (.Number, .Number): + return lhs.rawNumber >= rhs.rawNumber + case (.String, .String): + return lhs.rawString >= rhs.rawString + case (.Bool, .Bool): + return lhs.rawNumber.boolValue == rhs.rawNumber.boolValue + case (.Array, .Array): + return lhs.rawArray as NSArray == rhs.rawArray as NSArray + case (.Dictionary, .Dictionary): + return lhs.rawDictionary as NSDictionary == rhs.rawDictionary as NSDictionary + case (.Null, .Null): + return true + default: + return false + } +} + +public func >(lhs: JSON, rhs: JSON) -> Bool { + + switch (lhs.type, rhs.type) { + case (.Number, .Number): + return lhs.rawNumber > rhs.rawNumber + case (.String, .String): + return lhs.rawString > rhs.rawString + default: + return false + } +} + +public func <(lhs: JSON, rhs: JSON) -> Bool { + + switch (lhs.type, rhs.type) { + case (.Number, .Number): + return lhs.rawNumber < rhs.rawNumber + case (.String, .String): + return lhs.rawString < rhs.rawString + default: + return false + } +} + +private let trueNumber = NSNumber(bool: true) +private let falseNumber = NSNumber(bool: false) +private let trueObjCType = String.fromCString(trueNumber.objCType) +private let falseObjCType = String.fromCString(falseNumber.objCType) + +// MARK: - NSNumber: Comparable + +extension NSNumber { + var isBool:Bool { + get { + let objCType = String.fromCString(self.objCType) + if (self.compare(trueNumber) == NSComparisonResult.OrderedSame && objCType == trueObjCType) + || (self.compare(falseNumber) == NSComparisonResult.OrderedSame && objCType == falseObjCType){ + return true + } else { + return false + } + } + } +} + +public func ==(lhs: NSNumber, rhs: NSNumber) -> Bool { + switch (lhs.isBool, rhs.isBool) { + case (false, true): + return false + case (true, false): + return false + default: + return lhs.compare(rhs) == NSComparisonResult.OrderedSame + } +} + +public func !=(lhs: NSNumber, rhs: NSNumber) -> Bool { + return !(lhs == rhs) +} + +public func <(lhs: NSNumber, rhs: NSNumber) -> Bool { + + switch (lhs.isBool, rhs.isBool) { + case (false, true): + return false + case (true, false): + return false + default: + return lhs.compare(rhs) == NSComparisonResult.OrderedAscending + } +} + +public func >(lhs: NSNumber, rhs: NSNumber) -> Bool { + + switch (lhs.isBool, rhs.isBool) { + case (false, true): + return false + case (true, false): + return false + default: + return lhs.compare(rhs) == NSComparisonResult.OrderedDescending + } +} + +public func <=(lhs: NSNumber, rhs: NSNumber) -> Bool { + + switch (lhs.isBool, rhs.isBool) { + case (false, true): + return false + case (true, false): + return false + default: + return lhs.compare(rhs) != NSComparisonResult.OrderedDescending + } +} + +public func >=(lhs: NSNumber, rhs: NSNumber) -> Bool { + + switch (lhs.isBool, rhs.isBool) { + case (false, true): + return false + case (true, false): + return false + default: + return lhs.compare(rhs) != NSComparisonResult.OrderedAscending + } +} diff --git a/Pods/SwiftyUserDefaults/LICENSE b/Pods/SwiftyUserDefaults/LICENSE new file mode 100644 index 0000000..9e0e45b --- /dev/null +++ b/Pods/SwiftyUserDefaults/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Radosław Pietruszewski + +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/Pods/SwiftyUserDefaults/README.md b/Pods/SwiftyUserDefaults/README.md new file mode 100644 index 0000000..3a8ad4e --- /dev/null +++ b/Pods/SwiftyUserDefaults/README.md @@ -0,0 +1,216 @@ +# SwiftyUserDefaults 2.0 + +**SwiftyUserDefaults** makes `NSUserDefaults` cleaner, nicer and easier to use in Swift. Its statically-typed API gives you extra safety and convenient compile-time checks for free. + +Read [Swifty APIs: NSUserDefaults](http://radex.io/swift/nsuserdefaults/) and [Statically-typed NSUserDefaults](http://radex.io/swift/nsuserdefaults/static) for more information about this project. + +### Define your keys + +To get the most out of SwiftyUserDefaults, we recommend defining your user defaults keys ahead of time: + +```swift +let colorKey = DefaultsKey("color") +``` + +Just create a `DefaultsKey` object, put the value type in square bracket and the key name in parentheses and you're good to go. + +You can now use the global `Defaults` object: + +```swift +Defaults[colorKey] = "red" +Defaults[colorKey] // => "red", typed as String +``` + +The compiler won't let you set a wrong value type, and fetching conveniently returns `String` — no need for manual casting or special accessors. + +### Take shortcuts + +For extra convenience, define your keys by extending `DefaultsKeys` and adding static properties: + +```swift +extension DefaultsKeys { + static let username = DefaultsKey("username") + static let launchCount = DefaultsKey("launchCount") +} +``` + +And use the shortcut dot syntax: + +```swift +Defaults[.username] = "joe" +Defaults[.launchCount] +``` + +### Just use it! + +You can easily modify value types (strings, numbers, array) in place, without extra steps or magic operators, as if you were working with a plain old dictionary: + +```swift +// Modify value types in place +Defaults[.launchCount]++ +Defaults[.volume] += 0.1 +Defaults[.strings] += "… can easily be extended!" + +// Use and modify typed arrays +Defaults[.libraries].append("SwiftyUserDefaults") +Defaults[.libraries][0] += " 2.0" + +// Easily work with custom serialized types +Defaults[.color] = NSColor.whiteColor() +Defaults[.color]?.whiteComponent // => 1.0 +``` + +### Supported types + +SwiftyUserDefaults supports all of the standard `NSUserDefaults` types, like strings, numbers, booleans, arrays and dictionaries. + +Here's a full table: + +| Optional variant | Non-optional variant | Default value | +|------------------------|-----------------------|---------------| +| `String?` | `String` | `""` | +| `Int?` | `Int` | `0` | +| `Double?` | `Double` | `0.0` | +| `Bool?` | `Bool` | `false` | +| `NSData?` | `NSData` | `NSData()` | +| `[AnyObject]?` | `[AnyObject]` | `[]` | +| `[String: AnyObject]?` | `[String: AnyObject]` | `[:]` | +| `NSDate?` | n/a | n/a | +| `NSURL?` | n/a | n/a | +| `AnyObject?` | n/a | n/a | +| `NSString?` | `NSString` | `""` | +| `NSArray?` | `NSArray` | `[]` | +| `NSDictionary?` | `NSDictionary` | `[:]` | + +You can mark a type as optional to get `nil` if the key doesn't exist. Otherwise, you'll get a default value that makes sense for a given type. + +#### Typed arrays + +Additionally, typed arrays are available for these types: + +| Array type | Optional variant | +|------------|------------------| +| `[String]` | `[String]?` | +| `[Int]` | `[Int]?` | +| `[Double]` | `[Double]?` | +| `[Bool]` | `[Bool]?` | +| `[NSData]` | `[NSData]?` | +| `[NSDate]` | `[NSDate]?` | + +### Custom types + +You can easily store custom `NSCoding`-compliant types by extending `NSUserDefaults` with this stub subscript: + +```swift +extension NSUserDefaults { + subscript(key: DefaultsKey) -> NSColor? { + get { return unarchive(key) } + set { archive(key, newValue) } + } +} +``` + +Just copy&paste this and change `NSColor` to your class name. If you want, you can also remove `?` marks and coalesce nils: `unarchive(key) ?? yourDefaultValue`. + +Here's an example use: + +```swift +extension DefaultsKeys { + static let color = DefaultsKey("color") +} + +Defaults[.color] // => nil +Defaults[.color] = NSColor.whiteColor() +Defaults[.color] // => w 1.0, a 1.0 +Defaults[.color]?.whiteComponent // => 1.0 +``` + +### Existence + +```swift +if !Defaults.hasKey(.hotkey) { + Defaults.remove(.hotkeyOptions) +} +``` + +You can use the `hasKey` method to check for key's existence in the user defaults. `remove()` is an alias for `removeObjectForKey()`, that also works with `DefaultsKeys` shortcuts. + +## Legacy stringly-typed API + +There's also a more traditional string-based API available. This will be deprecated and removed in future versions of this library — it's recommended you use the new static keys API. + +```swift +Defaults["color"].string // returns String? +Defaults["launchCount"].int // returns Int? +Defaults["chimeVolume"].double // returns Double? +Defaults["loggingEnabled"].bool // returns Bool? +Defaults["lastPaths"].array // returns NSArray? +Defaults["credentials"].dictionary // returns NSDictionary? +Defaults["hotkey"].data // returns NSData? +Defaults["firstLaunchAt"].date // returns NSDate? +Defaults["anything"].object // returns NSObject? +Defaults["anything"].number // returns NSNumber? +``` + +When you don't want to deal with the `nil` case, you can use these helpers that return a default value for non-existing defaults: + +```swift +Defaults["color"].stringValue // defaults to "" +Defaults["launchCount"].intValue // defaults to 0 +Defaults["chimeVolume"].doubleValue // defaults to 0.0 +Defaults["loggingEnabled"].boolValue // defaults to false +Defaults["lastPaths"].arrayValue // defaults to [] +Defaults["credentials"].dictionaryValue // defaults to [:] +Defaults["hotkey"].dataValue // defaults to NSData() +``` + +## Installation + +The simplest way to install this library is to copy `SwiftyUserDefaults/SwiftyUserDefaults.swift` to your project. There's no step two! + +#### CocoaPods + +You can also install this library using CocoaPods. Just add this line to your Podfile: + +```ruby +pod 'SwiftyUserDefaults' +``` + +Then import library module like so: + +```swift +import SwiftyUserDefaults +``` + +#### Carthage + +Just add to your Cartfile: + +```ruby +github "radex/SwiftyUserDefaults" +``` + +## More like this + +If you like SwiftyUserDefaults, check out [SwiftyTimer](https://github.com/radex/SwiftyTimer), which applies the same swifty approach to `NSTimer`. + +You might also be interested in my blog posts which explain the design process behind those libraries: +- [Swifty APIs: NSUserDefaults](http://radex.io/swift/nsuserdefaults/) +- [Statically-typed NSUserDefaults](http://radex.io/swift/nsuserdefaults/static) +- [Swifty APIs: NSTimer](http://radex.io/swift/nstimer/) +- [Swifty methods](http://radex.io/swift/methods/) + +### Contributing + +If you have comments, complaints or ideas for improvements, feel free to open an issue or a pull request. Or [ping me on Twitter](http://twitter.com/radexp). + +### Author and license + +Radek Pietruszewski + +* [github.com/radex](http://github.com/radex) +* [twitter.com/radexp](http://twitter.com/radexp) +* [radex.io](http://radex.io) +* this.is@radex.io + +SwiftyUserDefaults is available under the MIT license. See the LICENSE file for more info. diff --git a/Pods/SwiftyUserDefaults/SwiftyUserDefaults/SwiftyUserDefaults.swift b/Pods/SwiftyUserDefaults/SwiftyUserDefaults/SwiftyUserDefaults.swift new file mode 100644 index 0000000..a2ba947 --- /dev/null +++ b/Pods/SwiftyUserDefaults/SwiftyUserDefaults/SwiftyUserDefaults.swift @@ -0,0 +1,490 @@ +// +// SwiftyUserDefaults +// +// Copyright (c) 2015 Radosław Pietruszewski +// +// 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 Foundation + +public extension NSUserDefaults { + class Proxy { + private let defaults: NSUserDefaults + private let key: String + + private init(_ defaults: NSUserDefaults, _ key: String) { + self.defaults = defaults + self.key = key + } + + // MARK: Getters + + public var object: NSObject? { + return defaults.objectForKey(key) as? NSObject + } + + public var string: String? { + return defaults.stringForKey(key) + } + + public var array: NSArray? { + return defaults.arrayForKey(key) + } + + public var dictionary: NSDictionary? { + return defaults.dictionaryForKey(key) + } + + public var data: NSData? { + return defaults.dataForKey(key) + } + + public var date: NSDate? { + return object as? NSDate + } + + public var number: NSNumber? { + return defaults.numberForKey(key) + } + + public var int: Int? { + return number?.integerValue + } + + public var double: Double? { + return number?.doubleValue + } + + public var bool: Bool? { + return number?.boolValue + } + + // MARK: Non-Optional Getters + + public var stringValue: String { + return string ?? "" + } + + public var arrayValue: NSArray { + return array ?? [] + } + + public var dictionaryValue: NSDictionary { + return dictionary ?? NSDictionary() + } + + public var dataValue: NSData { + return data ?? NSData() + } + + public var numberValue: NSNumber { + return number ?? 0 + } + + public var intValue: Int { + return int ?? 0 + } + + public var doubleValue: Double { + return double ?? 0 + } + + public var boolValue: Bool { + return bool ?? false + } + } + + /// `NSNumber` representation of a user default + + func numberForKey(key: String) -> NSNumber? { + return objectForKey(key) as? NSNumber + } + + /// Returns getter proxy for `key` + + public subscript(key: String) -> Proxy { + return Proxy(self, key) + } + + /// Sets value for `key` + + public subscript(key: String) -> Any? { + get { + return self[key] + } + set { + switch newValue { + case let v as Int: setInteger(v, forKey: key) + case let v as Double: setDouble(v, forKey: key) + case let v as Bool: setBool(v, forKey: key) + case let v as NSURL: setURL(v, forKey: key) + case let v as NSObject: setObject(v, forKey: key) + case nil: removeObjectForKey(key) + default: assertionFailure("Invalid value type") + } + } + } + + /// Returns `true` if `key` exists + + public func hasKey(key: String) -> Bool { + return objectForKey(key) != nil + } + + /// Removes value for `key` + + public func remove(key: String) { + removeObjectForKey(key) + } +} + +/// Global shortcut for NSUserDefaults.standardUserDefaults() + +public let Defaults = NSUserDefaults.standardUserDefaults() + +// MARK: - Static keys + +/// Extend this class and add your user defaults keys as static constants +/// so you can use the shortcut dot notation (e.g. `Defaults[.yourKey]`) + +public class DefaultsKeys { + private init() {} +} + +/// Base class for static user defaults keys. Specialize with value type type +/// and pass key name to the initializer to create a key. + +public class DefaultsKey: DefaultsKeys { + // TODO: Can we use protocols to ensure ValueType is a compatible type? + public let _key: String + + public init(_ key: String) { + self._key = key + } +} + +extension NSUserDefaults { + func set(key: DefaultsKey, _ value: Any?) { + self[key._key] = value + } +} + +extension NSUserDefaults { + /// Returns `true` if `key` exists + + public func hasKey(key: DefaultsKey) -> Bool { + return objectForKey(key._key) != nil + } + + /// Removes value for `key` + + public func remove(key: DefaultsKey) { + removeObjectForKey(key._key) + } +} + +// MARK: Static subscripts for standard types + +// TODO: Use generic subscripts when they become available + +extension NSUserDefaults { + public subscript(key: DefaultsKey) -> String? { + get { return stringForKey(key._key) } + set { set(key, newValue) } + } + + public subscript(key: DefaultsKey) -> String { + get { return stringForKey(key._key) ?? "" } + set { set(key, newValue) } + } + public subscript(key: DefaultsKey) -> NSString? { + get { return stringForKey(key._key) } + set { set(key, newValue) } + } + + public subscript(key: DefaultsKey) -> NSString { + get { return stringForKey(key._key) ?? "" } + set { set(key, newValue) } + } + + public subscript(key: DefaultsKey) -> Int? { + get { return numberForKey(key._key)?.integerValue } + set { set(key, newValue) } + } + + public subscript(key: DefaultsKey) -> Int { + get { return numberForKey(key._key)?.integerValue ?? 0 } + set { set(key, newValue) } + } + + public subscript(key: DefaultsKey) -> Double? { + get { return numberForKey(key._key)?.doubleValue } + set { set(key, newValue) } + } + + public subscript(key: DefaultsKey) -> Double { + get { return numberForKey(key._key)?.doubleValue ?? 0.0 } + set { set(key, newValue) } + } + + public subscript(key: DefaultsKey) -> Bool? { + get { return numberForKey(key._key)?.boolValue } + set { set(key, newValue) } + } + + public subscript(key: DefaultsKey) -> Bool { + get { return numberForKey(key._key)?.boolValue ?? false } + set { set(key, newValue) } + } + + public subscript(key: DefaultsKey) -> AnyObject? { + get { return objectForKey(key._key) } + set { set(key, newValue) } + } + + public subscript(key: DefaultsKey) -> NSObject? { + get { return objectForKey(key._key) as? NSObject } + set { set(key, newValue) } + } + + public subscript(key: DefaultsKey) -> NSData? { + get { return dataForKey(key._key) } + set { set(key, newValue) } + } + + public subscript(key: DefaultsKey) -> NSData { + get { return dataForKey(key._key) ?? NSData() } + set { set(key, newValue) } + } + + public subscript(key: DefaultsKey) -> NSDate? { + get { return objectForKey(key._key) as? NSDate } + set { set(key, newValue) } + } + + public subscript(key: DefaultsKey) -> NSURL? { + get { return URLForKey(key._key) } + set { set(key, newValue) } + } + + // TODO: It would probably make sense to have support for statically typed dictionaries (e.g. [String: String]) + + public subscript(key: DefaultsKey<[String: AnyObject]?>) -> [String: AnyObject]? { + get { return dictionaryForKey(key._key) } + set { set(key, newValue) } + } + + public subscript(key: DefaultsKey<[String: AnyObject]>) -> [String: AnyObject] { + get { return dictionaryForKey(key._key) ?? [:] } + set { set(key, newValue) } + } + + public subscript(key: DefaultsKey) -> NSDictionary? { + get { return dictionaryForKey(key._key) } + set { set(key, newValue) } + } + + public subscript(key: DefaultsKey) -> NSDictionary { + get { return dictionaryForKey(key._key) ?? [:] } + set { set(key, newValue) } + } +} + +// MARK: Static subscripts for array types + +extension NSUserDefaults { + public subscript(key: DefaultsKey) -> NSArray? { + get { return arrayForKey(key._key) } + set { set(key, newValue) } + } + + public subscript(key: DefaultsKey) -> NSArray { + get { return arrayForKey(key._key) ?? [] } + set { set(key, newValue) } + } + + public subscript(key: DefaultsKey<[AnyObject]?>) -> [AnyObject]? { + get { return arrayForKey(key._key) } + set { set(key, newValue) } + } + + public subscript(key: DefaultsKey<[AnyObject]>) -> [AnyObject] { + get { return arrayForKey(key._key) ?? [] } + set { set(key, newValue) } + } +} + +// We need the and variants to +// suppress compiler warnings about NSArray not being convertible to [T] +// AnyObject is for NSData and NSDate, _ObjectiveCBridgeable is for value +// types bridge-able to Foundation types (String, Int, ...) + +extension NSUserDefaults { + public func getArray(key: DefaultsKey<[T]>) -> [T] { + return arrayForKey(key._key) as NSArray? as? [T] ?? [] + } + + public func getArray(key: DefaultsKey<[T]?>) -> [T]? { + return arrayForKey(key._key) as NSArray? as? [T] + } + + public func getArray(key: DefaultsKey<[T]>) -> [T] { + return arrayForKey(key._key) as NSArray? as? [T] ?? [] + } + + public func getArray(key: DefaultsKey<[T]?>) -> [T]? { + return arrayForKey(key._key) as NSArray? as? [T] + } +} + +extension NSUserDefaults { + public subscript(key: DefaultsKey<[String]?>) -> [String]? { + get { return getArray(key) } + set { set(key, newValue) } + } + + public subscript(key: DefaultsKey<[String]>) -> [String] { + get { return getArray(key) } + set { set(key, newValue) } + } + + public subscript(key: DefaultsKey<[Int]?>) -> [Int]? { + get { return getArray(key) } + set { set(key, newValue) } + } + + public subscript(key: DefaultsKey<[Int]>) -> [Int] { + get { return getArray(key) } + set { set(key, newValue) } + } + + public subscript(key: DefaultsKey<[Double]?>) -> [Double]? { + get { return getArray(key) } + set { set(key, newValue) } + } + + public subscript(key: DefaultsKey<[Double]>) -> [Double] { + get { return getArray(key) } + set { set(key, newValue) } + } + + public subscript(key: DefaultsKey<[Bool]?>) -> [Bool]? { + get { return getArray(key) } + set { set(key, newValue) } + } + + public subscript(key: DefaultsKey<[Bool]>) -> [Bool] { + get { return getArray(key) } + set { set(key, newValue) } + } + + public subscript(key: DefaultsKey<[NSData]?>) -> [NSData]? { + get { return getArray(key) } + set { set(key, newValue) } + } + + public subscript(key: DefaultsKey<[NSData]>) -> [NSData] { + get { return getArray(key) } + set { set(key, newValue) } + } + + public subscript(key: DefaultsKey<[NSDate]?>) -> [NSDate]? { + get { return getArray(key) } + set { set(key, newValue) } + } + + public subscript(key: DefaultsKey<[NSDate]>) -> [NSDate] { + get { return getArray(key) } + set { set(key, newValue) } + } +} + +// MARK: Archiving complex types + +extension NSUserDefaults { + // TODO: Can we simplify this and ensure that T is NSCoding compliant? + + public func archive(key: DefaultsKey, _ value: T) { + if let value: AnyObject = value as? AnyObject { + set(key, NSKeyedArchiver.archivedDataWithRootObject(value)) + } else { + assertionFailure("Invalid value type") + } + } + + public func archive(key: DefaultsKey, _ value: T?) { + if let value: AnyObject = value as? AnyObject { + set(key, NSKeyedArchiver.archivedDataWithRootObject(value)) + } else if value == nil { + remove(key) + } else { + assertionFailure("Invalid value type") + } + } + + public func unarchive(key: DefaultsKey) -> T? { + return dataForKey(key._key).flatMap { NSKeyedUnarchiver.unarchiveObjectWithData($0) } as? T + } + + public func unarchive(key: DefaultsKey) -> T? { + return dataForKey(key._key).flatMap { NSKeyedUnarchiver.unarchiveObjectWithData($0) } as? T + } +} + +// MARK: - Deprecations + +infix operator ?= { + associativity right + precedence 90 +} + +/// If key doesn't exist, sets its value to `expr` +/// Note: This isn't the same as `Defaults.registerDefaults`. This method saves the new value to disk, whereas `registerDefaults` only modifies the defaults in memory. +/// Note: If key already exists, the expression after ?= isn't evaluated + +@available(*, deprecated=1, message="Please migrate to static keys and use this gist: https://gist.github.com/radex/68de9340b0da61d43e60") +public func ?= (proxy: NSUserDefaults.Proxy, @autoclosure expr: () -> Any) { + if !proxy.defaults.hasKey(proxy.key) { + proxy.defaults[proxy.key] = expr() + } +} + +/// Adds `b` to the key (and saves it as an integer) +/// If key doesn't exist or isn't a number, sets value to `b` + +@available(*, deprecated=1, message="Please migrate to static keys to use this.") +public func += (proxy: NSUserDefaults.Proxy, b: Int) { + let a = proxy.defaults[proxy.key].intValue + proxy.defaults[proxy.key] = a + b +} + +@available(*, deprecated=1, message="Please migrate to static keys to use this.") +public func += (proxy: NSUserDefaults.Proxy, b: Double) { + let a = proxy.defaults[proxy.key].doubleValue + proxy.defaults[proxy.key] = a + b +} + +/// Icrements key by one (and saves it as an integer) +/// If key doesn't exist or isn't a number, sets value to 1 + +@available(*, deprecated=1, message="Please migrate to static keys to use this.") +public postfix func ++ (proxy: NSUserDefaults.Proxy) { + proxy += 1 +} \ No newline at end of file diff --git a/Pods/Target Support Files/Cartography/Cartography-dummy.m b/Pods/Target Support Files/Cartography/Cartography-dummy.m new file mode 100644 index 0000000..14b6bea --- /dev/null +++ b/Pods/Target Support Files/Cartography/Cartography-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Cartography : NSObject +@end +@implementation PodsDummy_Cartography +@end diff --git a/Pods/Target Support Files/Cartography/Cartography-prefix.pch b/Pods/Target Support Files/Cartography/Cartography-prefix.pch new file mode 100644 index 0000000..aa992a4 --- /dev/null +++ b/Pods/Target Support Files/Cartography/Cartography-prefix.pch @@ -0,0 +1,4 @@ +#ifdef __OBJC__ +#import +#endif + diff --git a/Pods/Target Support Files/Cartography/Cartography-umbrella.h b/Pods/Target Support Files/Cartography/Cartography-umbrella.h new file mode 100644 index 0000000..088af33 --- /dev/null +++ b/Pods/Target Support Files/Cartography/Cartography-umbrella.h @@ -0,0 +1,6 @@ +#import + + +FOUNDATION_EXPORT double CartographyVersionNumber; +FOUNDATION_EXPORT const unsigned char CartographyVersionString[]; + diff --git a/Pods/Target Support Files/Cartography/Cartography.modulemap b/Pods/Target Support Files/Cartography/Cartography.modulemap new file mode 100644 index 0000000..412bab1 --- /dev/null +++ b/Pods/Target Support Files/Cartography/Cartography.modulemap @@ -0,0 +1,6 @@ +framework module Cartography { + umbrella header "Cartography-umbrella.h" + + export * + module * { export * } +} diff --git a/Pods/Target Support Files/Cartography/Cartography.xcconfig b/Pods/Target Support Files/Cartography/Cartography.xcconfig new file mode 100644 index 0000000..0c2a4f0 --- /dev/null +++ b/Pods/Target Support Files/Cartography/Cartography.xcconfig @@ -0,0 +1,5 @@ +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Cartography" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Crashlytics" "${PODS_ROOT}/Headers/Public/Fabric" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_ROOT = ${SRCROOT} +SKIP_INSTALL = YES \ No newline at end of file diff --git a/Pods/Target Support Files/Cartography/Info.plist b/Pods/Target Support Files/Cartography/Info.plist new file mode 100644 index 0000000..9a11d96 --- /dev/null +++ b/Pods/Target Support Files/Cartography/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + org.cocoapods.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 0.6.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Pods/Target Support Files/NRSimplePlist/Info.plist b/Pods/Target Support Files/NRSimplePlist/Info.plist new file mode 100644 index 0000000..849b9d1 --- /dev/null +++ b/Pods/Target Support Files/NRSimplePlist/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + org.cocoapods.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Pods/Target Support Files/NRSimplePlist/NRSimplePlist-dummy.m b/Pods/Target Support Files/NRSimplePlist/NRSimplePlist-dummy.m new file mode 100644 index 0000000..5189e7c --- /dev/null +++ b/Pods/Target Support Files/NRSimplePlist/NRSimplePlist-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_NRSimplePlist : NSObject +@end +@implementation PodsDummy_NRSimplePlist +@end diff --git a/Pods/Target Support Files/NRSimplePlist/NRSimplePlist-prefix.pch b/Pods/Target Support Files/NRSimplePlist/NRSimplePlist-prefix.pch new file mode 100644 index 0000000..aa992a4 --- /dev/null +++ b/Pods/Target Support Files/NRSimplePlist/NRSimplePlist-prefix.pch @@ -0,0 +1,4 @@ +#ifdef __OBJC__ +#import +#endif + diff --git a/Pods/Target Support Files/NRSimplePlist/NRSimplePlist-umbrella.h b/Pods/Target Support Files/NRSimplePlist/NRSimplePlist-umbrella.h new file mode 100644 index 0000000..d8e42b2 --- /dev/null +++ b/Pods/Target Support Files/NRSimplePlist/NRSimplePlist-umbrella.h @@ -0,0 +1,7 @@ +#import + +#import "NRSimplePlist.h" + +FOUNDATION_EXPORT double NRSimplePlistVersionNumber; +FOUNDATION_EXPORT const unsigned char NRSimplePlistVersionString[]; + diff --git a/Pods/Target Support Files/NRSimplePlist/NRSimplePlist.modulemap b/Pods/Target Support Files/NRSimplePlist/NRSimplePlist.modulemap new file mode 100644 index 0000000..d072d91 --- /dev/null +++ b/Pods/Target Support Files/NRSimplePlist/NRSimplePlist.modulemap @@ -0,0 +1,6 @@ +framework module NRSimplePlist { + umbrella header "NRSimplePlist-umbrella.h" + + export * + module * { export * } +} diff --git a/Pods/Target Support Files/NRSimplePlist/NRSimplePlist.xcconfig b/Pods/Target Support Files/NRSimplePlist/NRSimplePlist.xcconfig new file mode 100644 index 0000000..fa08334 --- /dev/null +++ b/Pods/Target Support Files/NRSimplePlist/NRSimplePlist.xcconfig @@ -0,0 +1,5 @@ +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/NRSimplePlist" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Crashlytics" "${PODS_ROOT}/Headers/Public/Fabric" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_ROOT = ${SRCROOT} +SKIP_INSTALL = YES \ No newline at end of file diff --git a/Pods/Target Support Files/Pods/Info.plist b/Pods/Target Support Files/Pods/Info.plist new file mode 100644 index 0000000..6974542 --- /dev/null +++ b/Pods/Target Support Files/Pods/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + org.cocoapods.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Pods/Target Support Files/Pods/Pods-acknowledgements.markdown b/Pods/Target Support Files/Pods/Pods-acknowledgements.markdown new file mode 100644 index 0000000..a75e1fa --- /dev/null +++ b/Pods/Target Support Files/Pods/Pods-acknowledgements.markdown @@ -0,0 +1,333 @@ +# Acknowledgements +This application makes use of the following third party libraries: + +## Cartography + +Copyright (c) 2014 Robert Böhnke + +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. + +This license does not apply to the contents of the images folder. + +--- + +This project uses portions of code from FLKAutoLayout, +copyright (c) 2013 Florian Kugler + +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. + + +## Crashlytics + +Fabric: Copyright 2015 Twitter, Inc. All Rights Reserved. Use of this software is subject to the terms and conditions of the Fabric Software and Services Agreement located at https://fabric.io/terms. Crashlytics Kit: Copyright 2015 Crashlytics, Inc. All Rights Reserved. Use of this software is subject to the terms and conditions of the Crashlytics Terms of Service located at http://try.crashlytics.com/terms/terms-of-service.pdf and the Crashlytics Privacy Policy located at http://try.crashlytics.com/terms/privacy-policy.pdf. OSS: http://get.fabric.io/terms/opensource.txt + +## Fabric + +Fabric: Copyright 2015 Twitter, Inc. All Rights Reserved. Use of this software is subject to the terms and conditions of the Fabric Software and Services Agreement located at https://fabric.io/terms. OSS: http://get.fabric.io/terms/opensource.txt + +## NRSimplePlist + +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: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +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 +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 [yyyy] [name of copyright owner] + + 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. + + +## SVProgressHUD + +Copyright (c) 2011-2014 Sam Vermette + +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. + +A different license may apply to other resources included in this package, +including Freepik Icons. Please consult their +respective headers for the terms of their individual licenses. + +## SwiftyJSON + +The MIT License (MIT) + +Copyright (c) 2014 Ruoyu Fu + +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. + + +## SwiftyUserDefaults + +The MIT License (MIT) + +Copyright (c) 2015 Radosław Pietruszewski + +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. + +Generated by CocoaPods - http://cocoapods.org diff --git a/Pods/Target Support Files/Pods/Pods-acknowledgements.plist b/Pods/Target Support Files/Pods/Pods-acknowledgements.plist new file mode 100644 index 0000000..35b9d43 --- /dev/null +++ b/Pods/Target Support Files/Pods/Pods-acknowledgements.plist @@ -0,0 +1,387 @@ + + + + + PreferenceSpecifiers + + + FooterText + This application makes use of the following third party libraries: + Title + Acknowledgements + Type + PSGroupSpecifier + + + FooterText + Copyright (c) 2014 Robert Böhnke <robb@robb.is> + +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. + +This license does not apply to the contents of the images folder. + +--- + +This project uses portions of code from FLKAutoLayout, +copyright (c) 2013 Florian Kugler <mail@floriankugler.de> + +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. + + Title + Cartography + Type + PSGroupSpecifier + + + FooterText + Fabric: Copyright 2015 Twitter, Inc. All Rights Reserved. Use of this software is subject to the terms and conditions of the Fabric Software and Services Agreement located at https://fabric.io/terms. Crashlytics Kit: Copyright 2015 Crashlytics, Inc. All Rights Reserved. Use of this software is subject to the terms and conditions of the Crashlytics Terms of Service located at http://try.crashlytics.com/terms/terms-of-service.pdf and the Crashlytics Privacy Policy located at http://try.crashlytics.com/terms/privacy-policy.pdf. OSS: http://get.fabric.io/terms/opensource.txt + Title + Crashlytics + Type + PSGroupSpecifier + + + FooterText + Fabric: Copyright 2015 Twitter, Inc. All Rights Reserved. Use of this software is subject to the terms and conditions of the Fabric Software and Services Agreement located at https://fabric.io/terms. OSS: http://get.fabric.io/terms/opensource.txt + Title + Fabric + 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: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +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 +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 [yyyy] [name of copyright owner] + + 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. + + Title + NRSimplePlist + Type + PSGroupSpecifier + + + FooterText + Copyright (c) 2011-2014 Sam Vermette + +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. + +A different license may apply to other resources included in this package, +including Freepik Icons. Please consult their +respective headers for the terms of their individual licenses. + Title + SVProgressHUD + Type + PSGroupSpecifier + + + FooterText + The MIT License (MIT) + +Copyright (c) 2014 Ruoyu Fu + +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. + + Title + SwiftyJSON + Type + PSGroupSpecifier + + + FooterText + The MIT License (MIT) + +Copyright (c) 2015 Radosław Pietruszewski + +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. + + Title + SwiftyUserDefaults + Type + PSGroupSpecifier + + + FooterText + Generated by CocoaPods - http://cocoapods.org + Title + + Type + PSGroupSpecifier + + + StringsTable + Acknowledgements + Title + Acknowledgements + + diff --git a/Pods/Target Support Files/Pods/Pods-dummy.m b/Pods/Target Support Files/Pods/Pods-dummy.m new file mode 100644 index 0000000..ade64bd --- /dev/null +++ b/Pods/Target Support Files/Pods/Pods-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods : NSObject +@end +@implementation PodsDummy_Pods +@end diff --git a/Pods/Target Support Files/Pods/Pods-frameworks.sh b/Pods/Target Support Files/Pods/Pods-frameworks.sh new file mode 100755 index 0000000..fcce3a5 --- /dev/null +++ b/Pods/Target Support Files/Pods/Pods-frameworks.sh @@ -0,0 +1,99 @@ +#!/bin/sh +set -e + +echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" +mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + +SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" + +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="${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + + if [ -L "${source}" ]; then + echo "Symlinked..." + source="$(readlink "${source}")" + fi + + # use filter instead of exclude so missing patterns dont' throw errors + echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" + rsync -av --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}" + 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 && exit ${PIPESTATUS[0]}) + 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 +} + +# 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_identitiy + echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" + echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements \"$1\"" + /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements "$1" + fi +} + +# Strip invalid architectures +strip_invalid_archs() { + binary="$1" + # Get architectures for current file + archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" + stripped="" + for arch in $archs; do + if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then + # Strip non-valid architectures in-place + lipo -remove "$arch" -output "$binary" "$binary" || exit 1 + stripped="$stripped $arch" + fi + done + if [[ "$stripped" ]]; then + echo "Stripped $binary of architectures:$stripped" + fi +} + + +if [[ "$CONFIGURATION" == "Debug" ]]; then + install_framework "Pods/Cartography.framework" + install_framework "Pods/NRSimplePlist.framework" + install_framework "Pods/SVProgressHUD.framework" + install_framework "Pods/SwiftyJSON.framework" + install_framework "Pods/SwiftyUserDefaults.framework" +fi +if [[ "$CONFIGURATION" == "Release" ]]; then + install_framework "Pods/Cartography.framework" + install_framework "Pods/NRSimplePlist.framework" + install_framework "Pods/SVProgressHUD.framework" + install_framework "Pods/SwiftyJSON.framework" + install_framework "Pods/SwiftyUserDefaults.framework" +fi diff --git a/Pods/Target Support Files/Pods/Pods-resources.sh b/Pods/Target Support Files/Pods/Pods-resources.sh new file mode 100755 index 0000000..16774fb --- /dev/null +++ b/Pods/Target Support Files/Pods/Pods-resources.sh @@ -0,0 +1,95 @@ +#!/bin/sh +set -e + +mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + +RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt +> "$RESOURCES_TO_COPY" + +XCASSET_FILES=() + +realpath() { + DIRECTORY="$(cd "${1%/*}" && pwd)" + FILENAME="${1##*/}" + echo "$DIRECTORY/$FILENAME" +} + +install_resource() +{ + case $1 in + *.storyboard) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}" + ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" + ;; + *.xib) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}" + ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" + ;; + *.framework) + echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync -av ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + rsync -av "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + ;; + *.xcdatamodel) + echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\"" + xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom" + ;; + *.xcdatamodeld) + echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\"" + xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd" + ;; + *.xcmappingmodel) + echo "xcrun mapc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm\"" + xcrun mapc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm" + ;; + *.xcassets) + ABSOLUTE_XCASSET_FILE=$(realpath "${PODS_ROOT}/$1") + XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") + ;; + /*) + echo "$1" + echo "$1" >> "$RESOURCES_TO_COPY" + ;; + *) + echo "${PODS_ROOT}/$1" + echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY" + ;; + esac +} + +mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then + mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi +rm -f "$RESOURCES_TO_COPY" + +if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] +then + case "${TARGETED_DEVICE_FAMILY}" in + 1,2) + TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" + ;; + 1) + TARGET_DEVICE_ARGS="--target-device iphone" + ;; + 2) + TARGET_DEVICE_ARGS="--target-device ipad" + ;; + *) + TARGET_DEVICE_ARGS="--target-device mac" + ;; + esac + + # Find all other xcassets (this unfortunately includes those of path pods and other targets). + OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) + while read line; do + if [[ $line != "`realpath $PODS_ROOT`*" ]]; then + XCASSET_FILES+=("$line") + fi + done <<<"$OTHER_XCASSETS" + + printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi diff --git a/Pods/Target Support Files/Pods/Pods-umbrella.h b/Pods/Target Support Files/Pods/Pods-umbrella.h new file mode 100644 index 0000000..21dcfd2 --- /dev/null +++ b/Pods/Target Support Files/Pods/Pods-umbrella.h @@ -0,0 +1,6 @@ +#import + + +FOUNDATION_EXPORT double PodsVersionNumber; +FOUNDATION_EXPORT const unsigned char PodsVersionString[]; + diff --git a/Pods/Target Support Files/Pods/Pods.debug.xcconfig b/Pods/Target Support Files/Pods/Pods.debug.xcconfig new file mode 100644 index 0000000..821c227 --- /dev/null +++ b/Pods/Target Support Files/Pods/Pods.debug.xcconfig @@ -0,0 +1,10 @@ +EMBEDDED_CONTENT_CONTAINS_SWIFT = YES +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Crashlytics" "${PODS_ROOT}/Fabric" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Crashlytics" "${PODS_ROOT}/Headers/Public/Fabric" +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "$CONFIGURATION_BUILD_DIR/Cartography.framework/Headers" -iquote "$CONFIGURATION_BUILD_DIR/NRSimplePlist.framework/Headers" -iquote "$CONFIGURATION_BUILD_DIR/SVProgressHUD.framework/Headers" -iquote "$CONFIGURATION_BUILD_DIR/SwiftyJSON.framework/Headers" -iquote "$CONFIGURATION_BUILD_DIR/SwiftyUserDefaults.framework/Headers" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/Crashlytics" -isystem "${PODS_ROOT}/Headers/Public/Fabric" +OTHER_LDFLAGS = $(inherited) -ObjC -l"c++" -l"z" -framework "Cartography" -framework "Crashlytics" -framework "Fabric" -framework "NRSimplePlist" -framework "SVProgressHUD" -framework "Security" -framework "SwiftyJSON" -framework "SwiftyUserDefaults" -framework "SystemConfiguration" -framework "UIKit" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods +PODS_ROOT = ${SRCROOT}/Pods \ No newline at end of file diff --git a/Pods/Target Support Files/Pods/Pods.modulemap b/Pods/Target Support Files/Pods/Pods.modulemap new file mode 100644 index 0000000..8413413 --- /dev/null +++ b/Pods/Target Support Files/Pods/Pods.modulemap @@ -0,0 +1,6 @@ +framework module Pods { + umbrella header "Pods-umbrella.h" + + export * + module * { export * } +} diff --git a/Pods/Target Support Files/Pods/Pods.release.xcconfig b/Pods/Target Support Files/Pods/Pods.release.xcconfig new file mode 100644 index 0000000..821c227 --- /dev/null +++ b/Pods/Target Support Files/Pods/Pods.release.xcconfig @@ -0,0 +1,10 @@ +EMBEDDED_CONTENT_CONTAINS_SWIFT = YES +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Crashlytics" "${PODS_ROOT}/Fabric" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Crashlytics" "${PODS_ROOT}/Headers/Public/Fabric" +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "$CONFIGURATION_BUILD_DIR/Cartography.framework/Headers" -iquote "$CONFIGURATION_BUILD_DIR/NRSimplePlist.framework/Headers" -iquote "$CONFIGURATION_BUILD_DIR/SVProgressHUD.framework/Headers" -iquote "$CONFIGURATION_BUILD_DIR/SwiftyJSON.framework/Headers" -iquote "$CONFIGURATION_BUILD_DIR/SwiftyUserDefaults.framework/Headers" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/Crashlytics" -isystem "${PODS_ROOT}/Headers/Public/Fabric" +OTHER_LDFLAGS = $(inherited) -ObjC -l"c++" -l"z" -framework "Cartography" -framework "Crashlytics" -framework "Fabric" -framework "NRSimplePlist" -framework "SVProgressHUD" -framework "Security" -framework "SwiftyJSON" -framework "SwiftyUserDefaults" -framework "SystemConfiguration" -framework "UIKit" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods +PODS_ROOT = ${SRCROOT}/Pods \ No newline at end of file diff --git a/Pods/Target Support Files/SVProgressHUD/Info.plist b/Pods/Target Support Files/SVProgressHUD/Info.plist new file mode 100644 index 0000000..be161dd --- /dev/null +++ b/Pods/Target Support Files/SVProgressHUD/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + org.cocoapods.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + HEAD based on 2.0-beta + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Pods/Target Support Files/SVProgressHUD/SVProgressHUD-dummy.m b/Pods/Target Support Files/SVProgressHUD/SVProgressHUD-dummy.m new file mode 100644 index 0000000..696032a --- /dev/null +++ b/Pods/Target Support Files/SVProgressHUD/SVProgressHUD-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_SVProgressHUD : NSObject +@end +@implementation PodsDummy_SVProgressHUD +@end diff --git a/Pods/Target Support Files/SVProgressHUD/SVProgressHUD-prefix.pch b/Pods/Target Support Files/SVProgressHUD/SVProgressHUD-prefix.pch new file mode 100644 index 0000000..aa992a4 --- /dev/null +++ b/Pods/Target Support Files/SVProgressHUD/SVProgressHUD-prefix.pch @@ -0,0 +1,4 @@ +#ifdef __OBJC__ +#import +#endif + diff --git a/Pods/Target Support Files/SVProgressHUD/SVProgressHUD-umbrella.h b/Pods/Target Support Files/SVProgressHUD/SVProgressHUD-umbrella.h new file mode 100644 index 0000000..cad07ba --- /dev/null +++ b/Pods/Target Support Files/SVProgressHUD/SVProgressHUD-umbrella.h @@ -0,0 +1,9 @@ +#import + +#import "SVIndefiniteAnimatedView.h" +#import "SVProgressHUD.h" +#import "SVRadialGradientLayer.h" + +FOUNDATION_EXPORT double SVProgressHUDVersionNumber; +FOUNDATION_EXPORT const unsigned char SVProgressHUDVersionString[]; + diff --git a/Pods/Target Support Files/SVProgressHUD/SVProgressHUD.modulemap b/Pods/Target Support Files/SVProgressHUD/SVProgressHUD.modulemap new file mode 100644 index 0000000..2eaf140 --- /dev/null +++ b/Pods/Target Support Files/SVProgressHUD/SVProgressHUD.modulemap @@ -0,0 +1,6 @@ +framework module SVProgressHUD { + umbrella header "SVProgressHUD-umbrella.h" + + export * + module * { export * } +} diff --git a/Pods/Target Support Files/SVProgressHUD/SVProgressHUD.xcconfig b/Pods/Target Support Files/SVProgressHUD/SVProgressHUD.xcconfig new file mode 100644 index 0000000..3ae13e7 --- /dev/null +++ b/Pods/Target Support Files/SVProgressHUD/SVProgressHUD.xcconfig @@ -0,0 +1,5 @@ +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/SVProgressHUD" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Crashlytics" "${PODS_ROOT}/Headers/Public/Fabric" +OTHER_LDFLAGS = -framework "QuartzCore" +PODS_ROOT = ${SRCROOT} +SKIP_INSTALL = YES \ No newline at end of file diff --git a/Pods/Target Support Files/SwiftyJSON/Info.plist b/Pods/Target Support Files/SwiftyJSON/Info.plist new file mode 100644 index 0000000..a98a41a --- /dev/null +++ b/Pods/Target Support Files/SwiftyJSON/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + org.cocoapods.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 2.3.1 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Pods/Target Support Files/SwiftyJSON/SwiftyJSON-dummy.m b/Pods/Target Support Files/SwiftyJSON/SwiftyJSON-dummy.m new file mode 100644 index 0000000..3159bec --- /dev/null +++ b/Pods/Target Support Files/SwiftyJSON/SwiftyJSON-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_SwiftyJSON : NSObject +@end +@implementation PodsDummy_SwiftyJSON +@end diff --git a/Pods/Target Support Files/SwiftyJSON/SwiftyJSON-prefix.pch b/Pods/Target Support Files/SwiftyJSON/SwiftyJSON-prefix.pch new file mode 100644 index 0000000..aa992a4 --- /dev/null +++ b/Pods/Target Support Files/SwiftyJSON/SwiftyJSON-prefix.pch @@ -0,0 +1,4 @@ +#ifdef __OBJC__ +#import +#endif + diff --git a/Pods/Target Support Files/SwiftyJSON/SwiftyJSON-umbrella.h b/Pods/Target Support Files/SwiftyJSON/SwiftyJSON-umbrella.h new file mode 100644 index 0000000..ce00ad0 --- /dev/null +++ b/Pods/Target Support Files/SwiftyJSON/SwiftyJSON-umbrella.h @@ -0,0 +1,6 @@ +#import + + +FOUNDATION_EXPORT double SwiftyJSONVersionNumber; +FOUNDATION_EXPORT const unsigned char SwiftyJSONVersionString[]; + diff --git a/Pods/Target Support Files/SwiftyJSON/SwiftyJSON.modulemap b/Pods/Target Support Files/SwiftyJSON/SwiftyJSON.modulemap new file mode 100644 index 0000000..6f41751 --- /dev/null +++ b/Pods/Target Support Files/SwiftyJSON/SwiftyJSON.modulemap @@ -0,0 +1,6 @@ +framework module SwiftyJSON { + umbrella header "SwiftyJSON-umbrella.h" + + export * + module * { export * } +} diff --git a/Pods/Target Support Files/SwiftyJSON/SwiftyJSON.xcconfig b/Pods/Target Support Files/SwiftyJSON/SwiftyJSON.xcconfig new file mode 100644 index 0000000..6b3542f --- /dev/null +++ b/Pods/Target Support Files/SwiftyJSON/SwiftyJSON.xcconfig @@ -0,0 +1,5 @@ +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/SwiftyJSON" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Crashlytics" "${PODS_ROOT}/Headers/Public/Fabric" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_ROOT = ${SRCROOT} +SKIP_INSTALL = YES \ No newline at end of file diff --git a/Pods/Target Support Files/SwiftyUserDefaults/Info.plist b/Pods/Target Support Files/SwiftyUserDefaults/Info.plist new file mode 100644 index 0000000..93a144a --- /dev/null +++ b/Pods/Target Support Files/SwiftyUserDefaults/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + org.cocoapods.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 2.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Pods/Target Support Files/SwiftyUserDefaults/SwiftyUserDefaults-dummy.m b/Pods/Target Support Files/SwiftyUserDefaults/SwiftyUserDefaults-dummy.m new file mode 100644 index 0000000..81588e3 --- /dev/null +++ b/Pods/Target Support Files/SwiftyUserDefaults/SwiftyUserDefaults-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_SwiftyUserDefaults : NSObject +@end +@implementation PodsDummy_SwiftyUserDefaults +@end diff --git a/Pods/Target Support Files/SwiftyUserDefaults/SwiftyUserDefaults-prefix.pch b/Pods/Target Support Files/SwiftyUserDefaults/SwiftyUserDefaults-prefix.pch new file mode 100644 index 0000000..aa992a4 --- /dev/null +++ b/Pods/Target Support Files/SwiftyUserDefaults/SwiftyUserDefaults-prefix.pch @@ -0,0 +1,4 @@ +#ifdef __OBJC__ +#import +#endif + diff --git a/Pods/Target Support Files/SwiftyUserDefaults/SwiftyUserDefaults-umbrella.h b/Pods/Target Support Files/SwiftyUserDefaults/SwiftyUserDefaults-umbrella.h new file mode 100644 index 0000000..efb5c6e --- /dev/null +++ b/Pods/Target Support Files/SwiftyUserDefaults/SwiftyUserDefaults-umbrella.h @@ -0,0 +1,6 @@ +#import + + +FOUNDATION_EXPORT double SwiftyUserDefaultsVersionNumber; +FOUNDATION_EXPORT const unsigned char SwiftyUserDefaultsVersionString[]; + diff --git a/Pods/Target Support Files/SwiftyUserDefaults/SwiftyUserDefaults.modulemap b/Pods/Target Support Files/SwiftyUserDefaults/SwiftyUserDefaults.modulemap new file mode 100644 index 0000000..fabe6eb --- /dev/null +++ b/Pods/Target Support Files/SwiftyUserDefaults/SwiftyUserDefaults.modulemap @@ -0,0 +1,6 @@ +framework module SwiftyUserDefaults { + umbrella header "SwiftyUserDefaults-umbrella.h" + + export * + module * { export * } +} diff --git a/Pods/Target Support Files/SwiftyUserDefaults/SwiftyUserDefaults.xcconfig b/Pods/Target Support Files/SwiftyUserDefaults/SwiftyUserDefaults.xcconfig new file mode 100644 index 0000000..20c5055 --- /dev/null +++ b/Pods/Target Support Files/SwiftyUserDefaults/SwiftyUserDefaults.xcconfig @@ -0,0 +1,5 @@ +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/SwiftyUserDefaults" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Crashlytics" "${PODS_ROOT}/Headers/Public/Fabric" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_ROOT = ${SRCROOT} +SKIP_INSTALL = YES \ No newline at end of file