diff --git a/Example/.gitignore b/Example/.gitignore new file mode 100644 index 0000000..0cfdf50 --- /dev/null +++ b/Example/.gitignore @@ -0,0 +1,33 @@ +# Xcode +# +build/ +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata +*.xccheckout +*.moved-aside +DerivedData +*.hmap +*.ipa +*.xcuserstate + +# 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/Example/.swiftlint.yml b/Example/.swiftlint.yml new file mode 100644 index 0000000..4021c5f --- /dev/null +++ b/Example/.swiftlint.yml @@ -0,0 +1,5 @@ +line_length: 120 +excluded: +- Pods +disabled_rules: +- force_cast diff --git a/Example/Podfile b/Example/Podfile new file mode 100644 index 0000000..f2945a1 --- /dev/null +++ b/Example/Podfile @@ -0,0 +1,7 @@ +source 'https://github.com/CocoaPods/Specs.git' +platform :ios, '8.0' +use_frameworks! + +target 'YoshiExample', :exclusive => true do + pod "Yoshi", :path => "../" +end diff --git a/Example/Podfile.lock b/Example/Podfile.lock new file mode 100644 index 0000000..6db930a --- /dev/null +++ b/Example/Podfile.lock @@ -0,0 +1,14 @@ +PODS: + - Yoshi (0.1.0) + +DEPENDENCIES: + - Yoshi (from `../`) + +EXTERNAL SOURCES: + Yoshi: + :path: "../" + +SPEC CHECKSUMS: + Yoshi: c72d7ab825483c0ae033238ce7073f7a546ce6a3 + +COCOAPODS: 0.39.0 diff --git a/Example/YoshiExample.xcodeproj/project.pbxproj b/Example/YoshiExample.xcodeproj/project.pbxproj new file mode 100644 index 0000000..75e277e --- /dev/null +++ b/Example/YoshiExample.xcodeproj/project.pbxproj @@ -0,0 +1,393 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 276BCECF1C29F060002138C7 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 276BCECE1C29F060002138C7 /* AppDelegate.swift */; }; + 276BCED11C29F060002138C7 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 276BCED01C29F060002138C7 /* ViewController.swift */; }; + 276BCED41C29F060002138C7 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 276BCED21C29F060002138C7 /* Main.storyboard */; }; + 276BCED61C29F060002138C7 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 276BCED51C29F060002138C7 /* Assets.xcassets */; }; + 276BCED91C29F060002138C7 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 276BCED71C29F060002138C7 /* LaunchScreen.storyboard */; }; + 27A952431C2A0CA800F0CCEB /* MenuItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27A952421C2A0CA800F0CCEB /* MenuItem.swift */; }; + C6092D98DA31D4BD6F10C646 /* Pods_YoshiExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 682D3188735FFBC65CDD85E6 /* Pods_YoshiExample.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 276BCECB1C29F060002138C7 /* YoshiExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = YoshiExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 276BCECE1C29F060002138C7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 276BCED01C29F060002138C7 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 276BCED31C29F060002138C7 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 276BCED51C29F060002138C7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 276BCED81C29F060002138C7 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 276BCEDA1C29F060002138C7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 27A952421C2A0CA800F0CCEB /* MenuItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MenuItem.swift; sourceTree = ""; }; + 3F156603A16AE31CAF01E2C2 /* Pods-YoshiExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-YoshiExample.release.xcconfig"; path = "Pods/Target Support Files/Pods-YoshiExample/Pods-YoshiExample.release.xcconfig"; sourceTree = ""; }; + 682D3188735FFBC65CDD85E6 /* Pods_YoshiExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_YoshiExample.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + A4B41EF52CC70276BA3E1FF3 /* Pods-YoshiExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-YoshiExample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-YoshiExample/Pods-YoshiExample.debug.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 276BCEC81C29F060002138C7 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + C6092D98DA31D4BD6F10C646 /* Pods_YoshiExample.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 276BCEC21C29F060002138C7 = { + isa = PBXGroup; + children = ( + 276BCECD1C29F060002138C7 /* YoshiExample */, + 276BCECC1C29F060002138C7 /* Products */, + 6E2EE9056500D86F12EB256B /* Pods */, + AE2190EAEAA3F1CB2B7915C9 /* Frameworks */, + ); + sourceTree = ""; + }; + 276BCECC1C29F060002138C7 /* Products */ = { + isa = PBXGroup; + children = ( + 276BCECB1C29F060002138C7 /* YoshiExample.app */, + ); + name = Products; + sourceTree = ""; + }; + 276BCECD1C29F060002138C7 /* YoshiExample */ = { + isa = PBXGroup; + children = ( + 276BCECE1C29F060002138C7 /* AppDelegate.swift */, + 276BCED01C29F060002138C7 /* ViewController.swift */, + 276BCED21C29F060002138C7 /* Main.storyboard */, + 276BCED51C29F060002138C7 /* Assets.xcassets */, + 276BCED71C29F060002138C7 /* LaunchScreen.storyboard */, + 276BCEDA1C29F060002138C7 /* Info.plist */, + 27A952421C2A0CA800F0CCEB /* MenuItem.swift */, + ); + path = YoshiExample; + sourceTree = ""; + }; + 6E2EE9056500D86F12EB256B /* Pods */ = { + isa = PBXGroup; + children = ( + A4B41EF52CC70276BA3E1FF3 /* Pods-YoshiExample.debug.xcconfig */, + 3F156603A16AE31CAF01E2C2 /* Pods-YoshiExample.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; + AE2190EAEAA3F1CB2B7915C9 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 682D3188735FFBC65CDD85E6 /* Pods_YoshiExample.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 276BCECA1C29F060002138C7 /* YoshiExample */ = { + isa = PBXNativeTarget; + buildConfigurationList = 276BCEDD1C29F060002138C7 /* Build configuration list for PBXNativeTarget "YoshiExample" */; + buildPhases = ( + 426862DD908072D0CF56FA1D /* Check Pods Manifest.lock */, + 276BCEC71C29F060002138C7 /* Sources */, + 276BCEC81C29F060002138C7 /* Frameworks */, + 276BCEC91C29F060002138C7 /* Resources */, + A0994FDD7AAD46FB6B1AE173 /* Embed Pods Frameworks */, + 6AE282707406E4A6FF1CB8B0 /* Copy Pods Resources */, + 27AFFEF61C6574CB00C656BA /* SwiftLint */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = YoshiExample; + productName = YoshiExample; + productReference = 276BCECB1C29F060002138C7 /* YoshiExample.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 276BCEC31C29F060002138C7 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0720; + LastUpgradeCheck = 0720; + ORGANIZATIONNAME = "Prolific Interactive"; + TargetAttributes = { + 276BCECA1C29F060002138C7 = { + CreatedOnToolsVersion = 7.2; + }; + }; + }; + buildConfigurationList = 276BCEC61C29F060002138C7 /* Build configuration list for PBXProject "YoshiExample" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 276BCEC21C29F060002138C7; + productRefGroup = 276BCECC1C29F060002138C7 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 276BCECA1C29F060002138C7 /* YoshiExample */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 276BCEC91C29F060002138C7 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 276BCED91C29F060002138C7 /* LaunchScreen.storyboard in Resources */, + 276BCED61C29F060002138C7 /* Assets.xcassets in Resources */, + 276BCED41C29F060002138C7 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 27AFFEF61C6574CB00C656BA /* SwiftLint */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = SwiftLint; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "# Run Linter.\npushd $PROJECT_DIR > /dev/null\n../Scripts/SwiftLint/swiftlint\nif [ $? -gt 0 ]\nthen\nexit 1\nfi\npopd > /dev/null"; + }; + 426862DD908072D0CF56FA1D /* 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; + }; + 6AE282707406E4A6FF1CB8B0 /* 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-YoshiExample/Pods-YoshiExample-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + A0994FDD7AAD46FB6B1AE173 /* 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-YoshiExample/Pods-YoshiExample-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 276BCEC71C29F060002138C7 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 27A952431C2A0CA800F0CCEB /* MenuItem.swift in Sources */, + 276BCED11C29F060002138C7 /* ViewController.swift in Sources */, + 276BCECF1C29F060002138C7 /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 276BCED21C29F060002138C7 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 276BCED31C29F060002138C7 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 276BCED71C29F060002138C7 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 276BCED81C29F060002138C7 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 276BCEDB1C29F060002138C7 /* 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_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.2; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + OTHER_SWIFT_FLAGS = "-D DEBUG"; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 276BCEDC1C29F060002138C7 /* 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_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.2; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 276BCEDE1C29F060002138C7 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = A4B41EF52CC70276BA3E1FF3 /* Pods-YoshiExample.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = YoshiExample/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.prolificinteractive.YoshiExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 276BCEDF1C29F060002138C7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 3F156603A16AE31CAF01E2C2 /* Pods-YoshiExample.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = YoshiExample/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.prolificinteractive.YoshiExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 276BCEC61C29F060002138C7 /* Build configuration list for PBXProject "YoshiExample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 276BCEDB1C29F060002138C7 /* Debug */, + 276BCEDC1C29F060002138C7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 276BCEDD1C29F060002138C7 /* Build configuration list for PBXNativeTarget "YoshiExample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 276BCEDE1C29F060002138C7 /* Debug */, + 276BCEDF1C29F060002138C7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 276BCEC31C29F060002138C7 /* Project object */; +} diff --git a/Example/YoshiExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Example/YoshiExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..04fd3c4 --- /dev/null +++ b/Example/YoshiExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Example/YoshiExample.xcworkspace/contents.xcworkspacedata b/Example/YoshiExample.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..9045b75 --- /dev/null +++ b/Example/YoshiExample.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Example/YoshiExample/AppDelegate.swift b/Example/YoshiExample/AppDelegate.swift new file mode 100644 index 0000000..cbfd99b --- /dev/null +++ b/Example/YoshiExample/AppDelegate.swift @@ -0,0 +1,79 @@ +// +// AppDelegate.swift +// YoshiExample +// +// Created by Michael Campbell on 12/22/15. +// Copyright © 2015 Prolific Interactive. All rights reserved. +// + +import UIKit +import Yoshi + +struct Notifications { + static let EnvironmentUpdatedNotification = "EnvironmentUpdatedNotification" + static let EnvironmentDateUpdatedNotification = "EnvironmentDateUpdatedNotification" +} + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { + // Override point for customization after application launch. + + #if DEBUG + setupDebugMenu() + #endif + + return true + } + + func setupDebugMenu() { + // YoshiMenuType.TableView + let menuItemProd = MenuItem(name: "Production") + let menuItemStaging = MenuItem(name: "Staging") + let menuItemQA = MenuItem(name: "QA") + let environmentItems: [YoshiTableViewMenuItem] = [menuItemProd, menuItemStaging, menuItemQA] + + let tableViewMenu = TableViewMenu(debugMenuName: "Environment", + displayItems: environmentItems, didSelectDisplayItem: { (displayItem) in + NSNotificationCenter.defaultCenter() + .postNotificationName(Notifications.EnvironmentUpdatedNotification, object: displayItem.displayText()) + }) + + // YoshiMenuType.DateSelector + let dateSelector = DateSelector(debugMenuName: "Environment Date", didUpdateDate: { (dateSelected) in + NSNotificationCenter.defaultCenter() + .postNotificationName(Notifications.EnvironmentDateUpdatedNotification, object: dateSelected) + }) + + // YoshiMenuType.CustomMenu + let setup: () -> () = { + print("setup") + } + + let completion: () -> () = { + print("completed") + } + + let customMenu = CustomMenu(debugMenuName: "Custom", setup: setup, completion: completion) + + DebugMenu.setupDebugMenu([tableViewMenu, dateSelector, customMenu]) + } + + // Implement the functionality you want! + + override func motionBegan(motion: UIEventSubtype, withEvent event: UIEvent?) { + DebugMenu.motionBegan(motion, withEvent: event) + } + + override func touchesBegan(touches: Set, withEvent event: UIEvent?) { + DebugMenu.touchesBegan(touches, withEvent: event) + } + + override func touchesMoved(touches: Set, withEvent event: UIEvent?) { + DebugMenu.touchesMoved(touches, withEvent: event) + } +} diff --git a/Example/YoshiExample/Assets.xcassets/AppIcon.appiconset/Contents.json b/Example/YoshiExample/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..118c98f --- /dev/null +++ b/Example/YoshiExample/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,38 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Example/YoshiExample/Base.lproj/LaunchScreen.storyboard b/Example/YoshiExample/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..2e721e1 --- /dev/null +++ b/Example/YoshiExample/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Example/YoshiExample/Base.lproj/Main.storyboard b/Example/YoshiExample/Base.lproj/Main.storyboard new file mode 100644 index 0000000..b7ea832 --- /dev/null +++ b/Example/YoshiExample/Base.lproj/Main.storyboard @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Example/YoshiExample/Info.plist b/Example/YoshiExample/Info.plist new file mode 100644 index 0000000..6f460e0 --- /dev/null +++ b/Example/YoshiExample/Info.plist @@ -0,0 +1,41 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + UIInterfaceOrientationPortraitUpsideDown + + + diff --git a/Example/YoshiExample/MenuItem.swift b/Example/YoshiExample/MenuItem.swift new file mode 100644 index 0000000..9449afc --- /dev/null +++ b/Example/YoshiExample/MenuItem.swift @@ -0,0 +1,35 @@ +// +// MenuItem.swift +// YoshiExample +// +// Created by Michael Campbell on 12/22/15. +// Copyright © 2015 Prolific Interactive. All rights reserved. +// + +import UIKit +import Yoshi + +struct MenuItem: YoshiTableViewMenuItem { + var name: String + + func displayText() -> String { + return name + } +} + +struct TableViewMenu: YoshiTableViewMenu { + var debugMenuName: String + var displayItems: [YoshiTableViewMenuItem] + var didSelectDisplayItem: (displayItem: YoshiTableViewMenuItem) -> () +} + +struct CustomMenu: YoshiCustomMenu { + var debugMenuName: String + var setup: () -> () + var completion: () -> () +} + +struct DateSelector: YoshiDateSelectorMenu { + var debugMenuName: String + var didUpdateDate: (dateSelected: NSDate) -> () +} diff --git a/Example/YoshiExample/ViewController.swift b/Example/YoshiExample/ViewController.swift new file mode 100644 index 0000000..daea10c --- /dev/null +++ b/Example/YoshiExample/ViewController.swift @@ -0,0 +1,46 @@ +// +// ViewController.swift +// YoshiExample +// +// Created by Michael Campbell on 12/22/15. +// Copyright © 2015 Prolific Interactive. All rights reserved. +// + +import UIKit + +class ViewController: UIViewController { + + @IBOutlet private weak var environment: UILabel! + @IBOutlet private weak var environmentDate: UILabel! + + override func viewDidLoad() { + super.viewDidLoad() + + NSNotificationCenter.defaultCenter().addObserver(self, selector: Selector("didUpdateEnvironment:"), + name: Notifications.EnvironmentUpdatedNotification, object: nil) + + NSNotificationCenter.defaultCenter().addObserver(self, selector: Selector("didUpdateEnvironmentDate:"), + name: Notifications.EnvironmentDateUpdatedNotification, object: nil) + } + + deinit { + NSNotificationCenter.defaultCenter().removeObserver(self) + } + + func didUpdateEnvironment(notification: NSNotification) { + guard let environment = notification.object as? String else { + return + } + + self.environment.text = environment + } + + func didUpdateEnvironmentDate(notification: NSNotification) { + guard let environmentDate = notification.object as? NSDate else { + return + } + + self.environmentDate.text = environmentDate.description + } + +} diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..a6cf3ad --- /dev/null +++ b/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2016 Prolific Interactive + +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/README.md b/README.md index c7302b6..3ffdbee 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,69 @@ # Yoshi -In app debug panel for iOS + +[![Travis build status](https://img.shields.io/travis/prolificinteractive/Yoshi.svg?style=flat-square)](https://travis-ci.org/prolificinteractive/Yoshi) +[![Cocoapods Compatible](https://img.shields.io/cocoapods/v/Yoshi.svg?style=flat-square)](https://img.shields.io/cocoapods/v/Yoshi.svg) +[![Platform](https://img.shields.io/cocoapods/p/Yoshi.svg?style=flat-square)](http://cocoadocs.org/docsets/Yoshi) +[![Docs](https://img.shields.io/cocoapods/metrics/doc-percent/Yoshi.svg?style=flat-square)](http://cocoadocs.org/docsets/Yoshi) +[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) + +A helpful companion for your iOS app. + +Yoshi is a convenient wrapper around the UI code that is often needed for displaying debug menus. Out of the box, Yoshi provides easy-to-implement date, list and custom menus. + +## Requirements + +* iOS 8.0+ +* Xcode 7.2+ + +## Installation + +### CocoaPods +Yoshi is available through [CocoaPods](http://cocoapods.org). To install +it, simply add the following line to your `Podfile`: + +```ruby +pod "Yoshi" +``` + +### Carthage +You can also add Yoshi to your project using [Carthage](https://github.com/Carthage/Carthage). Add the following to your `Cartfile`: + +```ruby +github "prolificInteractive/Yoshi" +``` + +## Usage + +A common use case for Yoshi would be to present a menu for API environment switching. Yoshi takes care of presenting the UI for environment selection and calls the convenient closure function when a selection is made. + +```swift +import Yoshi + +let menuItemProd = MenuItem(name: "Production") +let menuItemStaging = MenuItem(name: "Staging") +let environmentItems: [YoshiTableViewMenuItem] = [menuItemProd, menuItemStaging] + +let tableViewMenu = TableViewMenu(debugMenuName: "Environment", displayItems: environmentItems, didSelectDisplayItem: { (displayItem) in + // Switch environment here. +}) + +DebugMenu.startWithInvokeEvent(.ShakeMotion, menuItems: [tableViewMenu]) +``` + +## Contributing to Yoshi + +To report a bug or enhancement request, feel free to file an issue under the respective heading. + +If you wish to contribute to the project, fork this repo and submit a pull request. Code contributions should follow the standards specified in the [Prolific Swift Style Guide](https://github.com/prolificinteractive/swift-style-guide). + +## License + +Yoshi is Copyright (c) 2016 Prolific Interactive. It may be redistributed under the terms specified in the [LICENSE] file. + +[LICENSE]: /LICENSE + +## Maintainers + +![prolific](https://s3.amazonaws.com/prolificsitestaging/logos/Prolific_Logo_Full_Color.png) + +Yoshi is maintained and funded by Prolific Interactive. The names and logos are trademarks of Prolific Interactive. diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Resources b/Scripts/SwiftLint/SwiftLintFramework.framework/Resources new file mode 120000 index 0000000..953ee36 --- /dev/null +++ b/Scripts/SwiftLint/SwiftLintFramework.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources \ No newline at end of file diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/SwiftLintFramework b/Scripts/SwiftLint/SwiftLintFramework.framework/SwiftLintFramework new file mode 120000 index 0000000..a6d8984 --- /dev/null +++ b/Scripts/SwiftLint/SwiftLintFramework.framework/SwiftLintFramework @@ -0,0 +1 @@ +Versions/Current/SwiftLintFramework \ No newline at end of file diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/Commandant.framework/Commandant b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/Commandant.framework/Commandant new file mode 120000 index 0000000..9c4b622 --- /dev/null +++ b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/Commandant.framework/Commandant @@ -0,0 +1 @@ +Versions/Current/Commandant \ No newline at end of file diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/Commandant.framework/Resources b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/Commandant.framework/Resources new file mode 120000 index 0000000..953ee36 --- /dev/null +++ b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/Commandant.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources \ No newline at end of file diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/Commandant.framework/Versions/A/Commandant b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/Commandant.framework/Versions/A/Commandant new file mode 100755 index 0000000..08f7c59 Binary files /dev/null and b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/Commandant.framework/Versions/A/Commandant differ diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/Commandant.framework/Versions/A/Resources/Info.plist b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/Commandant.framework/Versions/A/Resources/Info.plist new file mode 100644 index 0000000..d8137d5 --- /dev/null +++ b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/Commandant.framework/Versions/A/Resources/Info.plist @@ -0,0 +1,46 @@ + + + + + BuildMachineOSBuild + 15B42 + CFBundleDevelopmentRegion + en + CFBundleExecutable + Commandant + CFBundleIdentifier + org.carthage.Commandant + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + Commandant + CFBundlePackageType + FMWK + CFBundleShortVersionString + 0.6.1 + CFBundleSignature + ???? + CFBundleSupportedPlatforms + + MacOSX + + CFBundleVersion + 1 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 7B1005 + DTPlatformVersion + GM + DTSDKBuild + 15A278 + DTSDKName + macosx10.11 + DTXcode + 0711 + DTXcodeBuild + 7B1005 + NSHumanReadableCopyright + Copyright © 2014 Carthage. All rights reserved. + + diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/Commandant.framework/Versions/Current b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/Commandant.framework/Versions/Current new file mode 120000 index 0000000..8c7e5a6 --- /dev/null +++ b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/Commandant.framework/Versions/Current @@ -0,0 +1 @@ +A \ No newline at end of file diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/Result.framework/Resources b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/Result.framework/Resources new file mode 120000 index 0000000..953ee36 --- /dev/null +++ b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/Result.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources \ No newline at end of file diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/Result.framework/Result b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/Result.framework/Result new file mode 120000 index 0000000..d95252c --- /dev/null +++ b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/Result.framework/Result @@ -0,0 +1 @@ +Versions/Current/Result \ No newline at end of file diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/Result.framework/Versions/A/Resources/Info.plist b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/Result.framework/Versions/A/Resources/Info.plist new file mode 100644 index 0000000..5ebc3fa --- /dev/null +++ b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/Result.framework/Versions/A/Resources/Info.plist @@ -0,0 +1,46 @@ + + + + + BuildMachineOSBuild + 15B42 + CFBundleDevelopmentRegion + en + CFBundleExecutable + Result + CFBundleIdentifier + com.antitypical.Result + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + Result + CFBundlePackageType + FMWK + CFBundleShortVersionString + 0.0.1 + CFBundleSignature + ???? + CFBundleSupportedPlatforms + + MacOSX + + CFBundleVersion + 1 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 7B1005 + DTPlatformVersion + GM + DTSDKBuild + 15A278 + DTSDKName + macosx10.11 + DTXcode + 0711 + DTXcodeBuild + 7B1005 + NSHumanReadableCopyright + Copyright © 2015 Rob Rix. All rights reserved. + + diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/Result.framework/Versions/A/Result b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/Result.framework/Versions/A/Result new file mode 100755 index 0000000..ad0c98f Binary files /dev/null and b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/Result.framework/Versions/A/Result differ diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/Result.framework/Versions/Current b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/Result.framework/Versions/Current new file mode 120000 index 0000000..8c7e5a6 --- /dev/null +++ b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/Result.framework/Versions/Current @@ -0,0 +1 @@ +A \ No newline at end of file diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/Resources b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/Resources new file mode 120000 index 0000000..953ee36 --- /dev/null +++ b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources \ No newline at end of file diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/SWXMLHash b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/SWXMLHash new file mode 120000 index 0000000..fb92f1c --- /dev/null +++ b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/SWXMLHash @@ -0,0 +1 @@ +Versions/Current/SWXMLHash \ No newline at end of file diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/Versions/A/Resources/Info.plist b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/Versions/A/Resources/Info.plist new file mode 100644 index 0000000..760da89 --- /dev/null +++ b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/Versions/A/Resources/Info.plist @@ -0,0 +1,49 @@ + + + + + BuildMachineOSBuild + 15B42 + CFBundleDevelopmentRegion + en + CFBundleExecutable + SWXMLHash + CFBundleIdentifier + drmohundro.SWXMLHash + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + SWXMLHash + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleSupportedPlatforms + + MacOSX + + CFBundleVersion + 1 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 7B1005 + DTPlatformVersion + GM + DTSDKBuild + 15A278 + DTSDKName + macosx10.11 + DTXcode + 0711 + DTXcodeBuild + 7B1005 + UIDeviceFamily + + 1 + 2 + + + diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/Versions/A/SWXMLHash b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/Versions/A/SWXMLHash new file mode 100755 index 0000000..ae15d8d Binary files /dev/null and b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/Versions/A/SWXMLHash differ diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/Versions/Current b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/Versions/Current new file mode 120000 index 0000000..8c7e5a6 --- /dev/null +++ b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/Versions/Current @@ -0,0 +1 @@ +A \ No newline at end of file diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Resources b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Resources new file mode 120000 index 0000000..953ee36 --- /dev/null +++ b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources \ No newline at end of file diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/SourceKittenFramework b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/SourceKittenFramework new file mode 120000 index 0000000..e339a39 --- /dev/null +++ b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/SourceKittenFramework @@ -0,0 +1 @@ +Versions/Current/SourceKittenFramework \ No newline at end of file diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Commandant.framework/Commandant b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Commandant.framework/Commandant new file mode 120000 index 0000000..9c4b622 --- /dev/null +++ b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Commandant.framework/Commandant @@ -0,0 +1 @@ +Versions/Current/Commandant \ No newline at end of file diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Commandant.framework/Resources b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Commandant.framework/Resources new file mode 120000 index 0000000..953ee36 --- /dev/null +++ b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Commandant.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources \ No newline at end of file diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Commandant.framework/Versions/A/Commandant b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Commandant.framework/Versions/A/Commandant new file mode 100755 index 0000000..08f7c59 Binary files /dev/null and b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Commandant.framework/Versions/A/Commandant differ diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Commandant.framework/Versions/A/Resources/Info.plist b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Commandant.framework/Versions/A/Resources/Info.plist new file mode 100644 index 0000000..d8137d5 --- /dev/null +++ b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Commandant.framework/Versions/A/Resources/Info.plist @@ -0,0 +1,46 @@ + + + + + BuildMachineOSBuild + 15B42 + CFBundleDevelopmentRegion + en + CFBundleExecutable + Commandant + CFBundleIdentifier + org.carthage.Commandant + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + Commandant + CFBundlePackageType + FMWK + CFBundleShortVersionString + 0.6.1 + CFBundleSignature + ???? + CFBundleSupportedPlatforms + + MacOSX + + CFBundleVersion + 1 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 7B1005 + DTPlatformVersion + GM + DTSDKBuild + 15A278 + DTSDKName + macosx10.11 + DTXcode + 0711 + DTXcodeBuild + 7B1005 + NSHumanReadableCopyright + Copyright © 2014 Carthage. All rights reserved. + + diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Commandant.framework/Versions/Current b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Commandant.framework/Versions/Current new file mode 120000 index 0000000..8c7e5a6 --- /dev/null +++ b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Commandant.framework/Versions/Current @@ -0,0 +1 @@ +A \ No newline at end of file diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Result.framework/Resources b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Result.framework/Resources new file mode 120000 index 0000000..953ee36 --- /dev/null +++ b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Result.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources \ No newline at end of file diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Result.framework/Result b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Result.framework/Result new file mode 120000 index 0000000..d95252c --- /dev/null +++ b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Result.framework/Result @@ -0,0 +1 @@ +Versions/Current/Result \ No newline at end of file diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Result.framework/Versions/A/Resources/Info.plist b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Result.framework/Versions/A/Resources/Info.plist new file mode 100644 index 0000000..5ebc3fa --- /dev/null +++ b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Result.framework/Versions/A/Resources/Info.plist @@ -0,0 +1,46 @@ + + + + + BuildMachineOSBuild + 15B42 + CFBundleDevelopmentRegion + en + CFBundleExecutable + Result + CFBundleIdentifier + com.antitypical.Result + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + Result + CFBundlePackageType + FMWK + CFBundleShortVersionString + 0.0.1 + CFBundleSignature + ???? + CFBundleSupportedPlatforms + + MacOSX + + CFBundleVersion + 1 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 7B1005 + DTPlatformVersion + GM + DTSDKBuild + 15A278 + DTSDKName + macosx10.11 + DTXcode + 0711 + DTXcodeBuild + 7B1005 + NSHumanReadableCopyright + Copyright © 2015 Rob Rix. All rights reserved. + + diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Result.framework/Versions/A/Result b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Result.framework/Versions/A/Result new file mode 100755 index 0000000..ad0c98f Binary files /dev/null and b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Result.framework/Versions/A/Result differ diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Result.framework/Versions/Current b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Result.framework/Versions/Current new file mode 120000 index 0000000..8c7e5a6 --- /dev/null +++ b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Result.framework/Versions/Current @@ -0,0 +1 @@ +A \ No newline at end of file diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/Resources b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/Resources new file mode 120000 index 0000000..953ee36 --- /dev/null +++ b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources \ No newline at end of file diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/SWXMLHash b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/SWXMLHash new file mode 120000 index 0000000..fb92f1c --- /dev/null +++ b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/SWXMLHash @@ -0,0 +1 @@ +Versions/Current/SWXMLHash \ No newline at end of file diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/Versions/A/Resources/Info.plist b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/Versions/A/Resources/Info.plist new file mode 100644 index 0000000..760da89 --- /dev/null +++ b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/Versions/A/Resources/Info.plist @@ -0,0 +1,49 @@ + + + + + BuildMachineOSBuild + 15B42 + CFBundleDevelopmentRegion + en + CFBundleExecutable + SWXMLHash + CFBundleIdentifier + drmohundro.SWXMLHash + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + SWXMLHash + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleSupportedPlatforms + + MacOSX + + CFBundleVersion + 1 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 7B1005 + DTPlatformVersion + GM + DTSDKBuild + 15A278 + DTSDKName + macosx10.11 + DTXcode + 0711 + DTXcodeBuild + 7B1005 + UIDeviceFamily + + 1 + 2 + + + diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/Versions/A/SWXMLHash b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/Versions/A/SWXMLHash new file mode 100755 index 0000000..ae15d8d Binary files /dev/null and b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/Versions/A/SWXMLHash differ diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/Versions/Current b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/Versions/Current new file mode 120000 index 0000000..8c7e5a6 --- /dev/null +++ b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/Versions/Current @@ -0,0 +1 @@ +A \ No newline at end of file diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SwiftXPC.framework/Resources b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SwiftXPC.framework/Resources new file mode 120000 index 0000000..953ee36 --- /dev/null +++ b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SwiftXPC.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources \ No newline at end of file diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SwiftXPC.framework/SwiftXPC b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SwiftXPC.framework/SwiftXPC new file mode 120000 index 0000000..ba8de7e --- /dev/null +++ b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SwiftXPC.framework/SwiftXPC @@ -0,0 +1 @@ +Versions/Current/SwiftXPC \ No newline at end of file diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SwiftXPC.framework/Versions/A/Resources/Info.plist b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SwiftXPC.framework/Versions/A/Resources/Info.plist new file mode 100644 index 0000000..b267fae --- /dev/null +++ b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SwiftXPC.framework/Versions/A/Resources/Info.plist @@ -0,0 +1,46 @@ + + + + + BuildMachineOSBuild + 15B42 + CFBundleDevelopmentRegion + en + CFBundleExecutable + SwiftXPC + CFBundleIdentifier + com.jpsim.SwiftXPC + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + SwiftXPC + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.1.0 + CFBundleSignature + ???? + CFBundleSupportedPlatforms + + MacOSX + + CFBundleVersion + 1 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 7B1005 + DTPlatformVersion + GM + DTSDKBuild + 15A278 + DTSDKName + macosx10.11 + DTXcode + 0711 + DTXcodeBuild + 7B1005 + NSHumanReadableCopyright + Copyright © 2014 JP Simard. All rights reserved. + + diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SwiftXPC.framework/Versions/A/SwiftXPC b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SwiftXPC.framework/Versions/A/SwiftXPC new file mode 100755 index 0000000..1588f2a Binary files /dev/null and b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SwiftXPC.framework/Versions/A/SwiftXPC differ diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SwiftXPC.framework/Versions/Current b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SwiftXPC.framework/Versions/Current new file mode 120000 index 0000000..8c7e5a6 --- /dev/null +++ b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SwiftXPC.framework/Versions/Current @@ -0,0 +1 @@ +A \ No newline at end of file diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/libswiftCore.dylib b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/libswiftCore.dylib new file mode 100755 index 0000000..3ed375d Binary files /dev/null and b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/libswiftCore.dylib differ diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/libswiftCoreGraphics.dylib b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/libswiftCoreGraphics.dylib new file mode 100755 index 0000000..60d5d82 Binary files /dev/null and b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/libswiftCoreGraphics.dylib differ diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/libswiftDarwin.dylib b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/libswiftDarwin.dylib new file mode 100755 index 0000000..15e5db9 Binary files /dev/null and b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/libswiftDarwin.dylib differ diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/libswiftDispatch.dylib b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/libswiftDispatch.dylib new file mode 100755 index 0000000..81edc42 Binary files /dev/null and b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/libswiftDispatch.dylib differ diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/libswiftFoundation.dylib b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/libswiftFoundation.dylib new file mode 100755 index 0000000..ac63bc7 Binary files /dev/null and b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/libswiftFoundation.dylib differ diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/libswiftObjectiveC.dylib b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/libswiftObjectiveC.dylib new file mode 100755 index 0000000..0cc9535 Binary files /dev/null and b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/libswiftObjectiveC.dylib differ diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Resources/Info.plist b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Resources/Info.plist new file mode 100644 index 0000000..fbee265 --- /dev/null +++ b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/Resources/Info.plist @@ -0,0 +1,46 @@ + + + + + BuildMachineOSBuild + 15B42 + CFBundleDevelopmentRegion + en + CFBundleExecutable + SourceKittenFramework + CFBundleIdentifier + com.sourcekitten.SourceKittenFramework + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + SourceKittenFramework + CFBundlePackageType + FMWK + CFBundleShortVersionString + 0.6.0 + CFBundleSignature + ???? + CFBundleSupportedPlatforms + + MacOSX + + CFBundleVersion + 1 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 7B1005 + DTPlatformVersion + GM + DTSDKBuild + 15A278 + DTSDKName + macosx10.11 + DTXcode + 0711 + DTXcodeBuild + 7B1005 + NSHumanReadableCopyright + Copyright © 2015 SourceKitten. All rights reserved. + + diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/SourceKittenFramework b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/SourceKittenFramework new file mode 100755 index 0000000..746301d Binary files /dev/null and b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/A/SourceKittenFramework differ diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/Current b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/Current new file mode 120000 index 0000000..8c7e5a6 --- /dev/null +++ b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SourceKittenFramework.framework/Versions/Current @@ -0,0 +1 @@ +A \ No newline at end of file diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SwiftXPC.framework/Resources b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SwiftXPC.framework/Resources new file mode 120000 index 0000000..953ee36 --- /dev/null +++ b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SwiftXPC.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources \ No newline at end of file diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SwiftXPC.framework/SwiftXPC b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SwiftXPC.framework/SwiftXPC new file mode 120000 index 0000000..ba8de7e --- /dev/null +++ b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SwiftXPC.framework/SwiftXPC @@ -0,0 +1 @@ +Versions/Current/SwiftXPC \ No newline at end of file diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SwiftXPC.framework/Versions/A/Resources/Info.plist b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SwiftXPC.framework/Versions/A/Resources/Info.plist new file mode 100644 index 0000000..b267fae --- /dev/null +++ b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SwiftXPC.framework/Versions/A/Resources/Info.plist @@ -0,0 +1,46 @@ + + + + + BuildMachineOSBuild + 15B42 + CFBundleDevelopmentRegion + en + CFBundleExecutable + SwiftXPC + CFBundleIdentifier + com.jpsim.SwiftXPC + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + SwiftXPC + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.1.0 + CFBundleSignature + ???? + CFBundleSupportedPlatforms + + MacOSX + + CFBundleVersion + 1 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 7B1005 + DTPlatformVersion + GM + DTSDKBuild + 15A278 + DTSDKName + macosx10.11 + DTXcode + 0711 + DTXcodeBuild + 7B1005 + NSHumanReadableCopyright + Copyright © 2014 JP Simard. All rights reserved. + + diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SwiftXPC.framework/Versions/A/SwiftXPC b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SwiftXPC.framework/Versions/A/SwiftXPC new file mode 100755 index 0000000..1588f2a Binary files /dev/null and b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SwiftXPC.framework/Versions/A/SwiftXPC differ diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SwiftXPC.framework/Versions/Current b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SwiftXPC.framework/Versions/Current new file mode 120000 index 0000000..8c7e5a6 --- /dev/null +++ b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/SwiftXPC.framework/Versions/Current @@ -0,0 +1 @@ +A \ No newline at end of file diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/Yaml.framework/Resources b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/Yaml.framework/Resources new file mode 120000 index 0000000..953ee36 --- /dev/null +++ b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/Yaml.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources \ No newline at end of file diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/Yaml.framework/Versions/A/Resources/Info.plist b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/Yaml.framework/Versions/A/Resources/Info.plist new file mode 100644 index 0000000..5aaf077 --- /dev/null +++ b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/Yaml.framework/Versions/A/Resources/Info.plist @@ -0,0 +1,42 @@ + + + + + BuildMachineOSBuild + 15B42 + CFBundleDevelopmentRegion + en + CFBundleExecutable + Yaml + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + Yaml + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleSupportedPlatforms + + MacOSX + + CFBundleVersion + 1 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 7B1005 + DTPlatformVersion + GM + DTSDKBuild + 15A278 + DTSDKName + macosx10.11 + DTXcode + 0711 + DTXcodeBuild + 7B1005 + + diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/Yaml.framework/Versions/A/Yaml b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/Yaml.framework/Versions/A/Yaml new file mode 100755 index 0000000..49776bf Binary files /dev/null and b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/Yaml.framework/Versions/A/Yaml differ diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/Yaml.framework/Versions/Current b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/Yaml.framework/Versions/Current new file mode 120000 index 0000000..8c7e5a6 --- /dev/null +++ b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/Yaml.framework/Versions/Current @@ -0,0 +1 @@ +A \ No newline at end of file diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/Yaml.framework/Yaml b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/Yaml.framework/Yaml new file mode 120000 index 0000000..ed0195b --- /dev/null +++ b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/Yaml.framework/Yaml @@ -0,0 +1 @@ +Versions/Current/Yaml \ No newline at end of file diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/libswiftCore.dylib b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/libswiftCore.dylib new file mode 100755 index 0000000..3ed375d Binary files /dev/null and b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/libswiftCore.dylib differ diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/libswiftCoreGraphics.dylib b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/libswiftCoreGraphics.dylib new file mode 100755 index 0000000..60d5d82 Binary files /dev/null and b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/libswiftCoreGraphics.dylib differ diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/libswiftDarwin.dylib b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/libswiftDarwin.dylib new file mode 100755 index 0000000..15e5db9 Binary files /dev/null and b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/libswiftDarwin.dylib differ diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/libswiftDispatch.dylib b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/libswiftDispatch.dylib new file mode 100755 index 0000000..81edc42 Binary files /dev/null and b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/libswiftDispatch.dylib differ diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/libswiftFoundation.dylib b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/libswiftFoundation.dylib new file mode 100755 index 0000000..ac63bc7 Binary files /dev/null and b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/libswiftFoundation.dylib differ diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/libswiftObjectiveC.dylib b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/libswiftObjectiveC.dylib new file mode 100755 index 0000000..0cc9535 Binary files /dev/null and b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Frameworks/libswiftObjectiveC.dylib differ diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Resources/Info.plist b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Resources/Info.plist new file mode 100644 index 0000000..c79a950 --- /dev/null +++ b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/Resources/Info.plist @@ -0,0 +1,46 @@ + + + + + BuildMachineOSBuild + 15B42 + CFBundleDevelopmentRegion + en + CFBundleExecutable + SwiftLintFramework + CFBundleIdentifier + io.realm.SwiftLintFramework + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + SwiftLintFramework + CFBundlePackageType + FMWK + CFBundleShortVersionString + 0.3.0 + CFBundleSignature + ???? + CFBundleSupportedPlatforms + + MacOSX + + CFBundleVersion + 1 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 7B1005 + DTPlatformVersion + GM + DTSDKBuild + 15A278 + DTSDKName + macosx10.11 + DTXcode + 0711 + DTXcodeBuild + 7B1005 + NSHumanReadableCopyright + Copyright © 2015 Realm. All rights reserved. + + diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/SwiftLintFramework b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/SwiftLintFramework new file mode 100755 index 0000000..1b82595 Binary files /dev/null and b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/A/SwiftLintFramework differ diff --git a/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/Current b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/Current new file mode 120000 index 0000000..8c7e5a6 --- /dev/null +++ b/Scripts/SwiftLint/SwiftLintFramework.framework/Versions/Current @@ -0,0 +1 @@ +A \ No newline at end of file diff --git a/Scripts/SwiftLint/libswiftCore.dylib b/Scripts/SwiftLint/libswiftCore.dylib new file mode 100755 index 0000000..3ed375d Binary files /dev/null and b/Scripts/SwiftLint/libswiftCore.dylib differ diff --git a/Scripts/SwiftLint/libswiftCoreGraphics.dylib b/Scripts/SwiftLint/libswiftCoreGraphics.dylib new file mode 100755 index 0000000..60d5d82 Binary files /dev/null and b/Scripts/SwiftLint/libswiftCoreGraphics.dylib differ diff --git a/Scripts/SwiftLint/libswiftDarwin.dylib b/Scripts/SwiftLint/libswiftDarwin.dylib new file mode 100755 index 0000000..15e5db9 Binary files /dev/null and b/Scripts/SwiftLint/libswiftDarwin.dylib differ diff --git a/Scripts/SwiftLint/libswiftDispatch.dylib b/Scripts/SwiftLint/libswiftDispatch.dylib new file mode 100755 index 0000000..81edc42 Binary files /dev/null and b/Scripts/SwiftLint/libswiftDispatch.dylib differ diff --git a/Scripts/SwiftLint/libswiftFoundation.dylib b/Scripts/SwiftLint/libswiftFoundation.dylib new file mode 100755 index 0000000..ac63bc7 Binary files /dev/null and b/Scripts/SwiftLint/libswiftFoundation.dylib differ diff --git a/Scripts/SwiftLint/libswiftObjectiveC.dylib b/Scripts/SwiftLint/libswiftObjectiveC.dylib new file mode 100755 index 0000000..0cc9535 Binary files /dev/null and b/Scripts/SwiftLint/libswiftObjectiveC.dylib differ diff --git a/Scripts/SwiftLint/swiftlint b/Scripts/SwiftLint/swiftlint new file mode 100755 index 0000000..5e3c834 Binary files /dev/null and b/Scripts/SwiftLint/swiftlint differ diff --git a/Yoshi.podspec b/Yoshi.podspec new file mode 100644 index 0000000..63531ac --- /dev/null +++ b/Yoshi.podspec @@ -0,0 +1,35 @@ +# +# Be sure to run `pod lib lint Yoshi.podspec' to ensure this is a +# valid spec before submitting. +# +# Any lines starting with a # are optional, but their use is encouraged +# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html +# + +Pod::Spec.new do |s| + s.name = "Yoshi" + s.version = "0.1.0" + s.summary = "In app debug panel for iOS" + +# This description is used to generate tags and improve search results. +# * Think: What does it do? Why did you write it? What is the focus? +# * Try to keep it short, snappy and to the point. +# * Write the description between the DESC delimiters below. +# * Finally, don't worry about the indent, CocoaPods strips it! + s.description = <<-DESC +In app debug panel for iOS + DESC + + s.homepage = "https://github.com/prolificinteractive/Yoshi" + # s.screenshots = "www.example.com/screenshots_1", "www.example.com/screenshots_2" + s.license = { :type => 'MIT', :file => 'LICENSE' } + s.author = { "Michael Campbell" => "Michael@prolificinteractive.com" } + s.source = { :git => "https://github.com/prolificinteractive/Yoshi.git", :tag => s.version.to_s } + + s.platform = :ios, '8.0' + s.requires_arc = true + + s.source_files = 'Yoshi/Yoshi/**/*.{swift}' + s.resources = 'Yoshi/**/*.{png,jpeg,jpg,storyboard,xib}' + +end diff --git a/Yoshi/.gitignore b/Yoshi/.gitignore new file mode 100644 index 0000000..0cfdf50 --- /dev/null +++ b/Yoshi/.gitignore @@ -0,0 +1,33 @@ +# Xcode +# +build/ +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata +*.xccheckout +*.moved-aside +DerivedData +*.hmap +*.ipa +*.xcuserstate + +# 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/Yoshi/.swiftlint.yml b/Yoshi/.swiftlint.yml new file mode 100644 index 0000000..4021c5f --- /dev/null +++ b/Yoshi/.swiftlint.yml @@ -0,0 +1,5 @@ +line_length: 120 +excluded: +- Pods +disabled_rules: +- force_cast diff --git a/Yoshi/Yoshi.xcodeproj/project.pbxproj b/Yoshi/Yoshi.xcodeproj/project.pbxproj new file mode 100644 index 0000000..e82fa32 --- /dev/null +++ b/Yoshi/Yoshi.xcodeproj/project.pbxproj @@ -0,0 +1,478 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 27100A991C3B1A9400074B2A /* AppBundleUtility.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27100A981C3B1A9400074B2A /* AppBundleUtility.swift */; }; + 2746E6501C2C7AC3006C1DEF /* DebugDatePickerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2746E64E1C2C7AC3006C1DEF /* DebugDatePickerViewController.swift */; }; + 2746E6511C2C7AC3006C1DEF /* DebugDatePickerViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2746E64F1C2C7AC3006C1DEF /* DebugDatePickerViewController.xib */; }; + 276BCEA51C29A6EF002138C7 /* Yoshi.h in Headers */ = {isa = PBXBuildFile; fileRef = 276BCEA41C29A6EF002138C7 /* Yoshi.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 276BCEAC1C29A6EF002138C7 /* Yoshi.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 276BCEA11C29A6EF002138C7 /* Yoshi.framework */; }; + 276BCEB11C29A6EF002138C7 /* YoshiTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 276BCEB01C29A6EF002138C7 /* YoshiTests.swift */; }; + 276BCEBE1C29A97E002138C7 /* DebugTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 276BCEBC1C29A97E002138C7 /* DebugTableViewController.swift */; }; + 276BCEBF1C29A97E002138C7 /* DebugTableViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 276BCEBD1C29A97E002138C7 /* DebugTableViewController.xib */; }; + 276BCEC11C29AEDD002138C7 /* Yoshi.swift in Sources */ = {isa = PBXBuildFile; fileRef = 276BCEC01C29AEDD002138C7 /* Yoshi.swift */; }; + 27A9523F1C29F29C00F0CCEB /* DebugMenu.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27A9523E1C29F29C00F0CCEB /* DebugMenu.swift */; }; + 27A952411C29F42800F0CCEB /* DebugConfigurationManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27A952401C29F42800F0CCEB /* DebugConfigurationManager.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 276BCEAD1C29A6EF002138C7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 276BCE981C29A6EF002138C7 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 276BCEA01C29A6EF002138C7; + remoteInfo = Yoshi; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 27100A981C3B1A9400074B2A /* AppBundleUtility.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AppBundleUtility.swift; path = Utility/AppBundleUtility.swift; sourceTree = ""; }; + 2746E64E1C2C7AC3006C1DEF /* DebugDatePickerViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = DebugDatePickerViewController.swift; path = "View Controllers/Debug Date Picker View Controller/DebugDatePickerViewController.swift"; sourceTree = ""; }; + 2746E64F1C2C7AC3006C1DEF /* DebugDatePickerViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = DebugDatePickerViewController.xib; path = "View Controllers/Debug Date Picker View Controller/DebugDatePickerViewController.xib"; sourceTree = ""; }; + 276BCEA11C29A6EF002138C7 /* Yoshi.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Yoshi.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 276BCEA41C29A6EF002138C7 /* Yoshi.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Yoshi.h; sourceTree = ""; }; + 276BCEA61C29A6EF002138C7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 276BCEAB1C29A6EF002138C7 /* YoshiTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = YoshiTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 276BCEB01C29A6EF002138C7 /* YoshiTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YoshiTests.swift; sourceTree = ""; }; + 276BCEB21C29A6EF002138C7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 276BCEBC1C29A97E002138C7 /* DebugTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = DebugTableViewController.swift; path = "View Controllers/Debug Table View Controller/DebugTableViewController.swift"; sourceTree = ""; }; + 276BCEBD1C29A97E002138C7 /* DebugTableViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = DebugTableViewController.xib; path = "View Controllers/Debug Table View Controller/DebugTableViewController.xib"; sourceTree = ""; }; + 276BCEC01C29AEDD002138C7 /* Yoshi.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Yoshi.swift; sourceTree = ""; }; + 27A9523E1C29F29C00F0CCEB /* DebugMenu.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DebugMenu.swift; sourceTree = ""; }; + 27A952401C29F42800F0CCEB /* DebugConfigurationManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DebugConfigurationManager.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 276BCE9D1C29A6EF002138C7 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 276BCEA81C29A6EF002138C7 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 276BCEAC1C29A6EF002138C7 /* Yoshi.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 27100A9A1C3B1A9800074B2A /* Utility */ = { + isa = PBXGroup; + children = ( + 27100A981C3B1A9400074B2A /* AppBundleUtility.swift */, + ); + name = Utility; + sourceTree = ""; + }; + 2746E64A1C2C7A24006C1DEF /* Debug Table View Controller */ = { + isa = PBXGroup; + children = ( + 276BCEBC1C29A97E002138C7 /* DebugTableViewController.swift */, + 276BCEBD1C29A97E002138C7 /* DebugTableViewController.xib */, + ); + name = "Debug Table View Controller"; + sourceTree = ""; + }; + 2746E64B1C2C7A2D006C1DEF /* Debug Date Picker View Controller */ = { + isa = PBXGroup; + children = ( + 2746E64E1C2C7AC3006C1DEF /* DebugDatePickerViewController.swift */, + 2746E64F1C2C7AC3006C1DEF /* DebugDatePickerViewController.xib */, + ); + name = "Debug Date Picker View Controller"; + sourceTree = ""; + }; + 276BCE971C29A6EF002138C7 = { + isa = PBXGroup; + children = ( + 276BCEA31C29A6EF002138C7 /* Yoshi */, + 276BCEAF1C29A6EF002138C7 /* YoshiTests */, + 276BCEA21C29A6EF002138C7 /* Products */, + ); + sourceTree = ""; + }; + 276BCEA21C29A6EF002138C7 /* Products */ = { + isa = PBXGroup; + children = ( + 276BCEA11C29A6EF002138C7 /* Yoshi.framework */, + 276BCEAB1C29A6EF002138C7 /* YoshiTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 276BCEA31C29A6EF002138C7 /* Yoshi */ = { + isa = PBXGroup; + children = ( + 276BCEBB1C29A8BB002138C7 /* View Controllers */, + 276BCEA41C29A6EF002138C7 /* Yoshi.h */, + 276BCEA61C29A6EF002138C7 /* Info.plist */, + 276BCEC01C29AEDD002138C7 /* Yoshi.swift */, + 27A9523E1C29F29C00F0CCEB /* DebugMenu.swift */, + 27100A9A1C3B1A9800074B2A /* Utility */, + 27A952401C29F42800F0CCEB /* DebugConfigurationManager.swift */, + ); + path = Yoshi; + sourceTree = ""; + }; + 276BCEAF1C29A6EF002138C7 /* YoshiTests */ = { + isa = PBXGroup; + children = ( + 276BCEB01C29A6EF002138C7 /* YoshiTests.swift */, + 276BCEB21C29A6EF002138C7 /* Info.plist */, + ); + path = YoshiTests; + sourceTree = ""; + }; + 276BCEBB1C29A8BB002138C7 /* View Controllers */ = { + isa = PBXGroup; + children = ( + 2746E64B1C2C7A2D006C1DEF /* Debug Date Picker View Controller */, + 2746E64A1C2C7A24006C1DEF /* Debug Table View Controller */, + ); + name = "View Controllers"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 276BCE9E1C29A6EF002138C7 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 276BCEA51C29A6EF002138C7 /* Yoshi.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 276BCEA01C29A6EF002138C7 /* Yoshi */ = { + isa = PBXNativeTarget; + buildConfigurationList = 276BCEB51C29A6EF002138C7 /* Build configuration list for PBXNativeTarget "Yoshi" */; + buildPhases = ( + 276BCE9C1C29A6EF002138C7 /* Sources */, + 276BCE9D1C29A6EF002138C7 /* Frameworks */, + 276BCE9E1C29A6EF002138C7 /* Headers */, + 276BCE9F1C29A6EF002138C7 /* Resources */, + 27AFFEF51C6574B400C656BA /* SwiftLint */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Yoshi; + productName = Yoshi; + productReference = 276BCEA11C29A6EF002138C7 /* Yoshi.framework */; + productType = "com.apple.product-type.framework"; + }; + 276BCEAA1C29A6EF002138C7 /* YoshiTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 276BCEB81C29A6EF002138C7 /* Build configuration list for PBXNativeTarget "YoshiTests" */; + buildPhases = ( + 276BCEA71C29A6EF002138C7 /* Sources */, + 276BCEA81C29A6EF002138C7 /* Frameworks */, + 276BCEA91C29A6EF002138C7 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 276BCEAE1C29A6EF002138C7 /* PBXTargetDependency */, + ); + name = YoshiTests; + productName = YoshiTests; + productReference = 276BCEAB1C29A6EF002138C7 /* YoshiTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 276BCE981C29A6EF002138C7 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0720; + LastUpgradeCheck = 0720; + ORGANIZATIONNAME = "Prolific Interactive"; + TargetAttributes = { + 276BCEA01C29A6EF002138C7 = { + CreatedOnToolsVersion = 7.2; + }; + 276BCEAA1C29A6EF002138C7 = { + CreatedOnToolsVersion = 7.2; + }; + }; + }; + buildConfigurationList = 276BCE9B1C29A6EF002138C7 /* Build configuration list for PBXProject "Yoshi" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 276BCE971C29A6EF002138C7; + productRefGroup = 276BCEA21C29A6EF002138C7 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 276BCEA01C29A6EF002138C7 /* Yoshi */, + 276BCEAA1C29A6EF002138C7 /* YoshiTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 276BCE9F1C29A6EF002138C7 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2746E6511C2C7AC3006C1DEF /* DebugDatePickerViewController.xib in Resources */, + 276BCEBF1C29A97E002138C7 /* DebugTableViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 276BCEA91C29A6EF002138C7 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 27AFFEF51C6574B400C656BA /* SwiftLint */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = SwiftLint; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "# Run Linter.\npushd $PROJECT_DIR > /dev/null\n../Scripts/SwiftLint/swiftlint\nif [ $? -gt 0 ]\nthen\nexit 1\nfi\npopd > /dev/null"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 276BCE9C1C29A6EF002138C7 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2746E6501C2C7AC3006C1DEF /* DebugDatePickerViewController.swift in Sources */, + 27A952411C29F42800F0CCEB /* DebugConfigurationManager.swift in Sources */, + 27100A991C3B1A9400074B2A /* AppBundleUtility.swift in Sources */, + 276BCEC11C29AEDD002138C7 /* Yoshi.swift in Sources */, + 276BCEBE1C29A97E002138C7 /* DebugTableViewController.swift in Sources */, + 27A9523F1C29F29C00F0CCEB /* DebugMenu.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 276BCEA71C29A6EF002138C7 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 276BCEB11C29A6EF002138C7 /* YoshiTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 276BCEAE1C29A6EF002138C7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 276BCEA01C29A6EF002138C7 /* Yoshi */; + targetProxy = 276BCEAD1C29A6EF002138C7 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 276BCEB31C29A6EF002138C7 /* 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_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 276BCEB41C29A6EF002138C7 /* 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_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 276BCEB61C29A6EF002138C7 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Yoshi/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.prolificinteractive.Yoshi; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 276BCEB71C29A6EF002138C7 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Yoshi/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.prolificinteractive.Yoshi; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + }; + name = Release; + }; + 276BCEB91C29A6EF002138C7 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + INFOPLIST_FILE = YoshiTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.prolificinteractive.YoshiTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 276BCEBA1C29A6EF002138C7 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + INFOPLIST_FILE = YoshiTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.prolificinteractive.YoshiTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 276BCE9B1C29A6EF002138C7 /* Build configuration list for PBXProject "Yoshi" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 276BCEB31C29A6EF002138C7 /* Debug */, + 276BCEB41C29A6EF002138C7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 276BCEB51C29A6EF002138C7 /* Build configuration list for PBXNativeTarget "Yoshi" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 276BCEB61C29A6EF002138C7 /* Debug */, + 276BCEB71C29A6EF002138C7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 276BCEB81C29A6EF002138C7 /* Build configuration list for PBXNativeTarget "YoshiTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 276BCEB91C29A6EF002138C7 /* Debug */, + 276BCEBA1C29A6EF002138C7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 276BCE981C29A6EF002138C7 /* Project object */; +} diff --git a/Yoshi/Yoshi.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Yoshi/Yoshi.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..29b7234 --- /dev/null +++ b/Yoshi/Yoshi.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Yoshi/Yoshi.xcodeproj/xcshareddata/xcschemes/Yoshi.xcscheme b/Yoshi/Yoshi.xcodeproj/xcshareddata/xcschemes/Yoshi.xcscheme new file mode 100644 index 0000000..2ad3a24 --- /dev/null +++ b/Yoshi/Yoshi.xcodeproj/xcshareddata/xcschemes/Yoshi.xcscheme @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Yoshi/Yoshi/DebugConfigurationManager.swift b/Yoshi/Yoshi/DebugConfigurationManager.swift new file mode 100644 index 0000000..cf9eeff --- /dev/null +++ b/Yoshi/Yoshi/DebugConfigurationManager.swift @@ -0,0 +1,143 @@ +// +// DebugConfigurationManager.swift +// Yoshi +// +// Created by Michael Campbell on 12/22/15. +// Copyright © 2015 Prolific Interactive. All rights reserved. +// + +import UIKit + +internal class DebugConfigurationManager { + + static let sharedInstance = DebugConfigurationManager() + + private var currentDate = NSDate() + private var inDebugMenu: Bool = false + private lazy var debugAlertController: UIAlertController = { + var preferredStyle: UIAlertControllerStyle + + switch UIDevice.currentDevice().userInterfaceIdiom { + case .Phone: + preferredStyle = .ActionSheet + default: + preferredStyle = .Alert + } + return UIAlertController(title: AppBundleUtility.appVersionText(), message: nil, preferredStyle: preferredStyle) + }() + + private var yoshiMenuItems = [YoshiMenu]() + + func setupDebugMenuOptions(menuItems: [YoshiMenu]) { + yoshiMenuItems = menuItems + + for menuItem in yoshiMenuItems { + switch menuItem { + case let menuType as YoshiTableViewMenu: + let tableViewAction = self.tableViewAction(menuType) + debugAlertController.addAction(tableViewAction) + case let menuType as YoshiDateSelectorMenu: + let datePickerAction = self.datePickerAction(menuType) + debugAlertController.addAction(datePickerAction) + case let menuType as YoshiCustomMenu: + let customMenuAction = self.customMenuAction(menuType) + debugAlertController.addAction(customMenuAction) + default: + continue + } + } + + let cancelAction = UIAlertAction(title: "Cancel", style: .Cancel) { (alertAction) -> Void in + self.inDebugMenu = false + } + debugAlertController.addAction(cancelAction) + } + + func showDebugActionSheet() { + guard !inDebugMenu else { + return + } + presentViewController(debugAlertController) { () -> Void in + self.inDebugMenu = true + } + } + + // MARK: Private Methods + + private func presentViewController(viewControllerToDisplay: UIViewController, presentedCompletion: () -> Void) { + let window = UIApplication.sharedApplication().keyWindow + guard let rootViewController = window?.rootViewController else { + return + } + rootViewController + .presentViewController(viewControllerToDisplay, animated: true, completion: presentedCompletion) + } + + private func dismiss(viewController: UIViewController) { + viewController.dismissViewControllerAnimated(true) { () -> Void in + self.inDebugMenu = false + } + } + + private func tableViewAction(menu: YoshiTableViewMenu) -> UIAlertAction { + return UIAlertAction(title: menu.debugMenuName, style: .Default) { (_) -> Void in + let bundle = NSBundle(forClass: DebugConfigurationManager.self) + let tableViewController = + DebugTableViewController(nibName: String(DebugTableViewController), bundle: bundle) + tableViewController.modalPresentationStyle = .FormSheet + tableViewController.setup(menu) + tableViewController.tableViewControllerDelegate = self + self.presentViewController(tableViewController) { + self.inDebugMenu = true + } + } + } + + private func datePickerAction(menu: YoshiDateSelectorMenu) -> UIAlertAction { + return UIAlertAction(title: menu.debugMenuName, style: .Default, handler: { (_) -> Void in + let bundle = NSBundle(forClass: DebugConfigurationManager.self) + let datePickerViewController = + DebugDatePickerViewController(nibName: String(DebugDatePickerViewController), bundle: bundle) + datePickerViewController.modalPresentationStyle = .FormSheet + datePickerViewController.setup(menu) + datePickerViewController.datePickerViewControllerDelegate = self + datePickerViewController.date = self.currentDate + self.presentViewController(datePickerViewController) { + self.inDebugMenu = true + } + }) + } + + private func customMenuAction(menu: YoshiCustomMenu) -> UIAlertAction { + menu.setup() + return UIAlertAction(title: menu.debugMenuName, style: .Default) { (_) -> Void in + menu.completion() + self.inDebugMenu = false + } + } + +} + +// MARK: DebugDatePickerViewControllerDelegate + +extension DebugConfigurationManager: DebugDatePickerViewControllerDelegate { + + func didUpdateDate(date: NSDate) { + currentDate = date + } + + func shouldDismissDatePickerView(viewController: UIViewController) { + dismiss(viewController) + } + +} + +// MARK: DebugTableViewControllerDelegate + +extension DebugConfigurationManager: DebugTableViewControllerDelegate { + + func shouldDismissDebugTableView(viewController: UIViewController) { + dismiss(viewController) + } + +} diff --git a/Yoshi/Yoshi/DebugMenu.swift b/Yoshi/Yoshi/DebugMenu.swift new file mode 100644 index 0000000..455cda3 --- /dev/null +++ b/Yoshi/Yoshi/DebugMenu.swift @@ -0,0 +1,88 @@ +// +// DebugMenu.swift +// Yoshi +// +// Created by Michael Campbell on 12/22/15. +// Copyright © 2015 Prolific Interactive. All rights reserved. +// + +import UIKit + +public class DebugMenu { + + // MARK: Setup + + /** + Should be called in application didFinishLaunchingWithOptions + + - parameter menuItems: [YoshiMenu] an array of items to be displayed in the Yoshi Debug Action Sheet + */ + public class func setupDebugMenu(menuItems: [YoshiMenu]) { + DebugConfigurationManager.sharedInstance.setupDebugMenuOptions(menuItems) + } + + // MARK: Invocation Functions + + /** + Should be called when a motion event is received. This will handle showing the hidden debug menu. + + - parameter motion: (UIEventSubtype) the motion captured by the original motionBegan call + - parameter event: (UIEvent) the event captured by the original motionBegan call + */ + public class func motionBegan(motion: UIEventSubtype, withEvent event: UIEvent?) { + guard motion == .MotionShake else { + return + } + + DebugMenu.showDebugActionSheet() + } + + /** + Should be called when touch events are received. This will handle showing the hidden debug menu. + + - parameter touches: Set the touches received by the original touchesBegan + - parameter event: (UIEvent) the event captured by the original touchesBegan call + - parameter minimumTouchRequirement: (Int) the minimum number of touches required to show the debug menu. + */ + public class func touchesBegan(touches: Set, withEvent event: UIEvent?, minimumTouchRequirement: Int = 3) { + guard event?.allTouches()?.count >= minimumTouchRequirement else { + return + } + + DebugMenu.showDebugActionSheet() + } + + /** + Should be called when touches moved. This will handle showing the hidden debug menu. + + - parameter touches: Set the touches received by the original touchesMoved + - parameter event: (UIEvent) the event captured by the original touchesMoved call + - parameter minimumForcePercent: (Int) the minimum force percent required to show the debug menu. + */ + public class func touchesMoved(touches: Set, withEvent event: UIEvent?, minimumForcePercent: Float = 60) { + guard #available(iOS 9.0, *) else { + return + } + + let eventTouches = event?.allTouches()?.filter({ (touch) -> Bool in + guard let percent: CGFloat = CGFloat(minimumForcePercent) else { + return false + } + return touch.force >= touch.maximumPossibleForce * (percent / 100) + }) + + guard let touches = eventTouches where touches.count > 0 else { + return + } + + DebugMenu.showDebugActionSheet() + } + + /** + Should be called directly only if you want to manually invoke Yoshi + */ + public class func showDebugActionSheet() { + DebugConfigurationManager.sharedInstance.showDebugActionSheet() + } + +} diff --git a/Yoshi/Yoshi/Info.plist b/Yoshi/Yoshi/Info.plist new file mode 100644 index 0000000..d3de8ee --- /dev/null +++ b/Yoshi/Yoshi/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/Yoshi/Yoshi/Utility/AppBundleUtility.swift b/Yoshi/Yoshi/Utility/AppBundleUtility.swift new file mode 100644 index 0000000..5075596 --- /dev/null +++ b/Yoshi/Yoshi/Utility/AppBundleUtility.swift @@ -0,0 +1,35 @@ +// +// AppBundleUtility.swift +// Yoshi +// +// Created by Michael Campbell on 1/4/16. +// Copyright © 2016 Prolific Interactive. All rights reserved. +// + +import UIKit + +let appDisplayNameDictionaryKey = "CFBundleName" +let appVersionNumberDictionaryKey = "CFBundleShortVersionString" +let appBuildNumberDictionaryKey = "CFBundleVersion" + +internal class AppBundleUtility: NSObject { + + class func appVersionText() -> String { + return "\(AppBundleUtility.appDisplayName())" + + " | Version \(AppBundleUtility.appVersionNumber())" + + " (\(AppBundleUtility.appBuildNumber()))" + } + + private class func appDisplayName() -> String { + return NSBundle.mainBundle().objectForInfoDictionaryKey(appDisplayNameDictionaryKey) as? String ?? "" + } + + private class func appVersionNumber() -> String { + return NSBundle.mainBundle().objectForInfoDictionaryKey(appVersionNumberDictionaryKey) as? String ?? "" + } + + private class func appBuildNumber() -> String { + return NSBundle.mainBundle().objectForInfoDictionaryKey(appBuildNumberDictionaryKey) as? String ?? "" + } + +} diff --git a/Yoshi/Yoshi/View Controllers/Debug Date Picker View Controller/DebugDatePickerViewController.swift b/Yoshi/Yoshi/View Controllers/Debug Date Picker View Controller/DebugDatePickerViewController.swift new file mode 100644 index 0000000..3c35575 --- /dev/null +++ b/Yoshi/Yoshi/View Controllers/Debug Date Picker View Controller/DebugDatePickerViewController.swift @@ -0,0 +1,83 @@ +// +// DebugDatePickerViewController.swift +// Yoshi +// +// Created by Michael Campbell on 12/24/15. +// Copyright © 2015 Prolific Interactive. All rights reserved. +// + +import UIKit + +protocol DebugDatePickerViewControllerDelegate { + /** + Delegate method that informs a delegate when the date selection has changed + + - parameter date: (NSDate) the new date + */ + func didUpdateDate(date: NSDate) + + /** + Delegate method that informs a delegate when the date picker should be dismissed + + - parameter viewController: (UIViewController) the view controller to be dismissed + */ + func shouldDismissDatePickerView(viewController: UIViewController) +} + +internal class DebugDatePickerViewController: UIViewController { + + @IBOutlet private weak var datePicker: UIDatePicker! + + var datePickerViewControllerDelegate: DebugDatePickerViewControllerDelegate? + var date = NSDate() + var selectorMenu: YoshiDateSelectorMenu? + + // MARK: Initializers + + override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: NSBundle?) { + super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil) + } + + required init?(coder aDecoder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + // MARK: ViewController Life Cycle Methods + + override func viewDidLoad() { + super.viewDidLoad() + setupDatePicker() + } + + // MARK: Public Methods + + /** + Sets up the DebugDatePickerViewController + + - parameter yoshiDateSelectorMenu: (YoshiDateSelectorMenu) the selector menu data + */ + func setup(yoshiDateSelectorMenu: YoshiDateSelectorMenu) { + selectorMenu = yoshiDateSelectorMenu + } + + // MARK: Private Methods + + private func setupDatePicker() { + datePicker.date = date + navigationItem.title = selectorMenu?.debugMenuName + } + + // MARK: IBAction Methods + + @IBAction func cancelBarButtonItemTouched(sender: UIBarButtonItem) { + datePickerViewControllerDelegate?.shouldDismissDatePickerView(self) + } + + @IBAction func applyBarButtonItemTouched(sender: UIBarButtonItem) { + let date = datePicker.date + datePickerViewControllerDelegate?.didUpdateDate(date) + selectorMenu?.didUpdateDate(dateSelected:date) + datePickerViewControllerDelegate?.shouldDismissDatePickerView(self) + } + +} diff --git a/Yoshi/Yoshi/View Controllers/Debug Date Picker View Controller/DebugDatePickerViewController.xib b/Yoshi/Yoshi/View Controllers/Debug Date Picker View Controller/DebugDatePickerViewController.xib new file mode 100644 index 0000000..2ffacf3 --- /dev/null +++ b/Yoshi/Yoshi/View Controllers/Debug Date Picker View Controller/DebugDatePickerViewController.xib @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Yoshi/Yoshi/View Controllers/Debug Table View Controller/DebugTableViewController.swift b/Yoshi/Yoshi/View Controllers/Debug Table View Controller/DebugTableViewController.swift new file mode 100644 index 0000000..f72fffd --- /dev/null +++ b/Yoshi/Yoshi/View Controllers/Debug Table View Controller/DebugTableViewController.swift @@ -0,0 +1,85 @@ +// +// DebugTableViewController.swift +// Yoshi +// +// Created by Michael Campbell on 12/22/15. +// Copyright © 2015 Prolific Interactive. All rights reserved. +// + +import UIKit + +protocol DebugTableViewControllerDelegate { + func shouldDismissDebugTableView(viewController: UIViewController) +} + +internal class DebugTableViewController: UIViewController { + + let yoshiTableViewCellDefaultIdentifier = "YoshiTableViewCellDefaultIdentifier" + + @IBOutlet private weak var tableView: UITableView! + + var yoshiTableViewMenu: YoshiTableViewMenu? + var tableViewControllerDelegate: DebugTableViewControllerDelegate? + + // MARK: Initializers + + override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: NSBundle?) { + super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil) + } + + required init?(coder aDecoder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + // MARK: Public Methods + + func setup(yoshiTableViewMenu: YoshiTableViewMenu) { + self.yoshiTableViewMenu = yoshiTableViewMenu + } + + // MARK: ViewController Life Cycle Methods + + override func viewDidLoad() { + super.viewDidLoad() + navigationItem.title = yoshiTableViewMenu?.debugMenuName + } + + // MARK: IBAction Methods + + @IBAction private func cancelBarButtonItemTouched(sender: UIBarButtonItem) { + tableViewControllerDelegate?.shouldDismissDebugTableView(self) + } + +} + +// MARK: UITableViewDataSource + +extension DebugTableViewController: UITableViewDataSource { + + func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return yoshiTableViewMenu?.displayItems.count ?? 0 + } + + func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { + let cell = + UITableViewCell(style: UITableViewCellStyle.Default, reuseIdentifier: yoshiTableViewCellDefaultIdentifier) + cell.textLabel?.text = yoshiTableViewMenu?.displayItems[indexPath.row].displayText() + return cell + } + +} + +// MARK: UITableViewDelegate + +extension DebugTableViewController: UITableViewDelegate { + + func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { + guard let selectedItem = yoshiTableViewMenu?.displayItems[indexPath.row] else { + return + } + + yoshiTableViewMenu?.didSelectDisplayItem(displayItem: selectedItem) + tableViewControllerDelegate?.shouldDismissDebugTableView(self) + } + +} diff --git a/Yoshi/Yoshi/View Controllers/Debug Table View Controller/DebugTableViewController.xib b/Yoshi/Yoshi/View Controllers/Debug Table View Controller/DebugTableViewController.xib new file mode 100644 index 0000000..0bfae2a --- /dev/null +++ b/Yoshi/Yoshi/View Controllers/Debug Table View Controller/DebugTableViewController.xib @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Yoshi/Yoshi/Yoshi.h b/Yoshi/Yoshi/Yoshi.h new file mode 100644 index 0000000..425c1de --- /dev/null +++ b/Yoshi/Yoshi/Yoshi.h @@ -0,0 +1,19 @@ +// +// Yoshi.h +// Yoshi +// +// Created by Michael Campbell on 12/22/15. +// Copyright © 2015 Prolific Interactive. All rights reserved. +// + +#import + +//! Project version number for Yoshi. +FOUNDATION_EXPORT double YoshiVersionNumber; + +//! Project version string for Yoshi. +FOUNDATION_EXPORT const unsigned char YoshiVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/Yoshi/Yoshi/Yoshi.swift b/Yoshi/Yoshi/Yoshi.swift new file mode 100644 index 0000000..d892286 --- /dev/null +++ b/Yoshi/Yoshi/Yoshi.swift @@ -0,0 +1,29 @@ +// +// Yoshi.swift +// Yoshi +// +// Created by Michael Campbell on 12/22/15. +// Copyright © 2015 Prolific Interactive. All rights reserved. +// + +public protocol YoshiMenu { + var debugMenuName: String { get } +} + +public protocol YoshiTableViewMenuItem { + func displayText() -> String +} + +public protocol YoshiTableViewMenu: YoshiMenu { + var displayItems: [YoshiTableViewMenuItem] { get } + var didSelectDisplayItem: (displayItem: YoshiTableViewMenuItem) -> () { get } +} + +public protocol YoshiDateSelectorMenu: YoshiMenu { + var didUpdateDate: (dateSelected: NSDate) -> () { get } +} + +public protocol YoshiCustomMenu: YoshiMenu { + var setup: () -> () { get } + var completion: () -> () { get } +} diff --git a/Yoshi/YoshiTests/Info.plist b/Yoshi/YoshiTests/Info.plist new file mode 100644 index 0000000..ba72822 --- /dev/null +++ b/Yoshi/YoshiTests/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/Yoshi/YoshiTests/YoshiTests.swift b/Yoshi/YoshiTests/YoshiTests.swift new file mode 100644 index 0000000..007fc9e --- /dev/null +++ b/Yoshi/YoshiTests/YoshiTests.swift @@ -0,0 +1,36 @@ +// +// YoshiTests.swift +// YoshiTests +// +// Created by Michael Campbell on 12/22/15. +// Copyright © 2015 Prolific Interactive. All rights reserved. +// + +import XCTest +@testable import Yoshi + +class YoshiTests: XCTestCase { + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testExample() { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testPerformanceExample() { + // This is an example of a performance test case. + self.measureBlock { + // Put the code you want to measure the time of here. + } + } + +}