├── GDRouting-Example ├── Pods │ ├── Pods-DProperty.xcconfig │ ├── Pods-FastCoding.xcconfig │ ├── Headers │ │ ├── JLRoutes │ │ │ └── JLRoutes.h │ │ ├── FastCoding │ │ │ └── FastCoder.h │ │ └── TheSidebarController │ │ │ └── TheSidebarController │ │ │ ├── TheSidebarController.h │ │ │ └── Animations │ │ │ ├── SidebarAnimation.h │ │ │ ├── SidebarAirbnbAnimation.h │ │ │ ├── SidebarFeedlyAnimation.h │ │ │ ├── SidebarFacebookAnimation.h │ │ │ ├── SidebarFlipboardAnimation.h │ │ │ ├── SidebarLuvocracyAnimation.h │ │ │ └── SidebarWunderlistAnimation.h │ ├── BuildHeaders │ │ ├── JLRoutes │ │ │ └── JLRoutes.h │ │ ├── FastCoding │ │ │ └── FastCoder.h │ │ └── TheSidebarController │ │ │ └── TheSidebarController │ │ │ ├── TheSidebarController.h │ │ │ └── Animations │ │ │ ├── SidebarAnimation.h │ │ │ ├── SidebarAirbnbAnimation.h │ │ │ ├── SidebarFeedlyAnimation.h │ │ │ ├── SidebarFacebookAnimation.h │ │ │ ├── SidebarFlipboardAnimation.h │ │ │ ├── SidebarLuvocracyAnimation.h │ │ │ └── SidebarWunderlistAnimation.h │ ├── Pods-JLRoutes.xcconfig │ ├── Pods-TheSidebarController.xcconfig │ ├── Pods-DProperty-prefix.pch │ ├── Pods-FastCoding-prefix.pch │ ├── Pods-JLRoutes-prefix.pch │ ├── Pods-TheSidebarController-prefix.pch │ ├── Pods-dummy.m │ ├── Pods-DProperty-dummy.m │ ├── Pods-JLRoutes-dummy.m │ ├── Pods-FastCoding-dummy.m │ ├── Pods-TheSidebarController-dummy.m │ ├── Manifest.lock │ ├── Pods-FastCoding-Private.xcconfig │ ├── Pods-JLRoutes-Private.xcconfig │ ├── Pods-DProperty-Private.xcconfig │ ├── Pods-TheSidebarController-Private.xcconfig │ ├── Pods.xcconfig │ ├── Pods-environment.h │ ├── FastCoding │ │ ├── LICENCE.md │ │ ├── FastCoder │ │ │ └── FastCoder.h │ │ └── README.md │ ├── TheSidebarController │ │ ├── LICENSE │ │ ├── TheSidebarController │ │ │ ├── Animations │ │ │ │ ├── SidebarAirbnbAnimation.h │ │ │ │ ├── SidebarFeedlyAnimation.h │ │ │ │ ├── SidebarFacebookAnimation.h │ │ │ │ ├── SidebarFlipboardAnimation.h │ │ │ │ ├── SidebarLuvocracyAnimation.h │ │ │ │ ├── SidebarWunderlistAnimation.h │ │ │ │ ├── SidebarAnimation.h │ │ │ │ ├── SidebarFacebookAnimation.m │ │ │ │ ├── SidebarAnimation.m │ │ │ │ ├── SidebarFeedlyAnimation.m │ │ │ │ ├── SidebarWunderlistAnimation.m │ │ │ │ ├── SidebarFlipboardAnimation.m │ │ │ │ ├── SidebarLuvocracyAnimation.m │ │ │ │ └── SidebarAirbnbAnimation.m │ │ │ └── TheSidebarController.h │ │ └── README.md │ ├── Pods.xcodeproj │ │ └── xcuserdata │ │ │ └── jneugass.xcuserdatad │ │ │ └── xcschemes │ │ │ ├── xcschememanagement.plist │ │ │ ├── Pods.xcscheme │ │ │ ├── Pods-JLRoutes.xcscheme │ │ │ ├── Pods-FastCoding.xcscheme │ │ │ └── Pods-TheSidebarController.xcscheme │ ├── Pods-resources.sh │ ├── Pods-acknowledgements.markdown │ ├── Pods-acknowledgements.plist │ └── JLRoutes │ │ ├── JLRoutes │ │ └── JLRoutes.h │ │ └── README.md ├── GDRouting-Example │ ├── en.lproj │ │ └── InfoPlist.strings │ ├── Images │ │ ├── cat.jpg │ │ ├── dog.jpg │ │ ├── manatee.jpg │ │ └── smiledog.jpg │ ├── Classes │ │ ├── DogViewController.h │ │ ├── CatViewController.h │ │ ├── ManateeViewController.h │ │ ├── CatApp.h │ │ ├── DogApp.h │ │ ├── ManateeApp.h │ │ ├── MainMenuViewController.h │ │ ├── MainMenuTableViewCell.h │ │ ├── MainMenuTableViewController.h │ │ ├── MainMenuTableViewCell.m │ │ ├── CatViewController.m │ │ ├── ManateeViewController.m │ │ ├── MainMenuTableDataModel.h │ │ ├── DogViewController.m │ │ ├── MainMenuViewController.m │ │ ├── ManateeApp.m │ │ ├── CatApp.m │ │ ├── MainMenuTableDataModel.m │ │ ├── DogApp.m │ │ └── MainMenuTableViewController.m │ ├── AppDelegate.h │ ├── main.m │ ├── GDRouting-Example-Prefix.pch │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── GDRouting-Example-Info.plist │ └── AppDelegate.m ├── GDRouting-ExampleTests │ ├── en.lproj │ │ └── InfoPlist.strings │ ├── SupportingFiles │ │ ├── GDSharedApp.h │ │ └── GDSharedApp.m │ ├── GDRouting-ExampleTests-Info.plist │ ├── GDMenuItemTests.m │ ├── GDAppConfigurationTests.m │ ├── GDTableDataModelObjectTests.m │ ├── GDAppManagerTests.m │ ├── GDRouteTests.m │ └── GDTableDataModelTests.m ├── Podfile ├── GDRouting-Example.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── GDRouting-Example.xccheckout ├── GDRouting-Example.xcodeproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── GDRouting-Example.xccheckout └── Podfile.lock ├── GDRouting ├── GDUsableApp.m ├── GDConfigurableTableCell.h ├── GDEnums.h ├── GDUsableApp.h ├── UIStoryboard+QuickFetch.m ├── GDArchiving.h ├── UIStoryboard+QuickFetch.h ├── GDAppConfiguration.h ├── NSObject+FastCoder.h ├── GDRoute.m ├── GDTableDataModelObject.m ├── GDBaseApp.h ├── GDMenuItem.m ├── GDTableDataModel.h ├── GDAppConfiguration.m ├── GDTableDataModel.m ├── GDMenuItem.h ├── GDAppManager.h ├── GDTableDataModelObject.h ├── NSObject+FastCoder.m ├── GDAppManager.m └── GDRoute.h ├── .gitignore ├── GDRouting.podspec ├── LICENSE └── README.md /GDRouting-Example/Pods/Pods-DProperty.xcconfig: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /GDRouting-Example/Pods/Pods-FastCoding.xcconfig: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /GDRouting-Example/Pods/Headers/JLRoutes/JLRoutes.h: -------------------------------------------------------------------------------- 1 | ../../JLRoutes/JLRoutes/JLRoutes.h -------------------------------------------------------------------------------- /GDRouting-Example/Pods/BuildHeaders/JLRoutes/JLRoutes.h: -------------------------------------------------------------------------------- 1 | ../../JLRoutes/JLRoutes/JLRoutes.h -------------------------------------------------------------------------------- /GDRouting-Example/Pods/Headers/FastCoding/FastCoder.h: -------------------------------------------------------------------------------- 1 | ../../FastCoding/FastCoder/FastCoder.h -------------------------------------------------------------------------------- /GDRouting-Example/Pods/BuildHeaders/FastCoding/FastCoder.h: -------------------------------------------------------------------------------- 1 | ../../FastCoding/FastCoder/FastCoder.h -------------------------------------------------------------------------------- /GDRouting-Example/Pods/Pods-JLRoutes.xcconfig: -------------------------------------------------------------------------------- 1 | PODS_JLROUTES_OTHER_LDFLAGS = -framework Foundation -------------------------------------------------------------------------------- /GDRouting-Example/GDRouting-Example/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /GDRouting-Example/GDRouting-ExampleTests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /GDRouting-Example/Pods/Pods-TheSidebarController.xcconfig: -------------------------------------------------------------------------------- 1 | PODS_THESIDEBARCONTROLLER_OTHER_LDFLAGS = -framework QuartzCore -------------------------------------------------------------------------------- /GDRouting-Example/Pods/Pods-DProperty-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | #import "Pods-environment.h" 6 | -------------------------------------------------------------------------------- /GDRouting-Example/Pods/Pods-FastCoding-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | #import "Pods-environment.h" 6 | -------------------------------------------------------------------------------- /GDRouting-Example/Pods/Pods-JLRoutes-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | #import "Pods-environment.h" 6 | -------------------------------------------------------------------------------- /GDRouting-Example/GDRouting-Example/Images/cat.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godaddy/GDRouting/master/GDRouting-Example/GDRouting-Example/Images/cat.jpg -------------------------------------------------------------------------------- /GDRouting-Example/GDRouting-Example/Images/dog.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godaddy/GDRouting/master/GDRouting-Example/GDRouting-Example/Images/dog.jpg -------------------------------------------------------------------------------- /GDRouting-Example/Pods/Pods-TheSidebarController-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | #import "Pods-environment.h" 6 | -------------------------------------------------------------------------------- /GDRouting-Example/GDRouting-Example/Images/manatee.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godaddy/GDRouting/master/GDRouting-Example/GDRouting-Example/Images/manatee.jpg -------------------------------------------------------------------------------- /GDRouting-Example/GDRouting-Example/Images/smiledog.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godaddy/GDRouting/master/GDRouting-Example/GDRouting-Example/Images/smiledog.jpg -------------------------------------------------------------------------------- /GDRouting-Example/Pods/Headers/TheSidebarController/TheSidebarController/TheSidebarController.h: -------------------------------------------------------------------------------- 1 | ../../../TheSidebarController/TheSidebarController/TheSidebarController.h -------------------------------------------------------------------------------- /GDRouting-Example/Pods/Pods-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods : NSObject 3 | @end 4 | @implementation PodsDummy_Pods 5 | @end 6 | -------------------------------------------------------------------------------- /GDRouting-Example/Pods/BuildHeaders/TheSidebarController/TheSidebarController/TheSidebarController.h: -------------------------------------------------------------------------------- 1 | ../../../TheSidebarController/TheSidebarController/TheSidebarController.h -------------------------------------------------------------------------------- /GDRouting-Example/Pods/Headers/TheSidebarController/TheSidebarController/Animations/SidebarAnimation.h: -------------------------------------------------------------------------------- 1 | ../../../../TheSidebarController/TheSidebarController/Animations/SidebarAnimation.h -------------------------------------------------------------------------------- /GDRouting-Example/Pods/BuildHeaders/TheSidebarController/TheSidebarController/Animations/SidebarAnimation.h: -------------------------------------------------------------------------------- 1 | ../../../../TheSidebarController/TheSidebarController/Animations/SidebarAnimation.h -------------------------------------------------------------------------------- /GDRouting-Example/Pods/Headers/TheSidebarController/TheSidebarController/Animations/SidebarAirbnbAnimation.h: -------------------------------------------------------------------------------- 1 | ../../../../TheSidebarController/TheSidebarController/Animations/SidebarAirbnbAnimation.h -------------------------------------------------------------------------------- /GDRouting-Example/Pods/Headers/TheSidebarController/TheSidebarController/Animations/SidebarFeedlyAnimation.h: -------------------------------------------------------------------------------- 1 | ../../../../TheSidebarController/TheSidebarController/Animations/SidebarFeedlyAnimation.h -------------------------------------------------------------------------------- /GDRouting-Example/Pods/Pods-DProperty-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_DProperty : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_DProperty 5 | @end 6 | -------------------------------------------------------------------------------- /GDRouting-Example/Pods/Pods-JLRoutes-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_JLRoutes : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_JLRoutes 5 | @end 6 | -------------------------------------------------------------------------------- /GDRouting-Example/Pods/BuildHeaders/TheSidebarController/TheSidebarController/Animations/SidebarAirbnbAnimation.h: -------------------------------------------------------------------------------- 1 | ../../../../TheSidebarController/TheSidebarController/Animations/SidebarAirbnbAnimation.h -------------------------------------------------------------------------------- /GDRouting-Example/Pods/BuildHeaders/TheSidebarController/TheSidebarController/Animations/SidebarFeedlyAnimation.h: -------------------------------------------------------------------------------- 1 | ../../../../TheSidebarController/TheSidebarController/Animations/SidebarFeedlyAnimation.h -------------------------------------------------------------------------------- /GDRouting-Example/Pods/Headers/TheSidebarController/TheSidebarController/Animations/SidebarFacebookAnimation.h: -------------------------------------------------------------------------------- 1 | ../../../../TheSidebarController/TheSidebarController/Animations/SidebarFacebookAnimation.h -------------------------------------------------------------------------------- /GDRouting-Example/Pods/Headers/TheSidebarController/TheSidebarController/Animations/SidebarFlipboardAnimation.h: -------------------------------------------------------------------------------- 1 | ../../../../TheSidebarController/TheSidebarController/Animations/SidebarFlipboardAnimation.h -------------------------------------------------------------------------------- /GDRouting-Example/Pods/Headers/TheSidebarController/TheSidebarController/Animations/SidebarLuvocracyAnimation.h: -------------------------------------------------------------------------------- 1 | ../../../../TheSidebarController/TheSidebarController/Animations/SidebarLuvocracyAnimation.h -------------------------------------------------------------------------------- /GDRouting-Example/Pods/Pods-FastCoding-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_FastCoding : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_FastCoding 5 | @end 6 | -------------------------------------------------------------------------------- /GDRouting-Example/Pods/BuildHeaders/TheSidebarController/TheSidebarController/Animations/SidebarFacebookAnimation.h: -------------------------------------------------------------------------------- 1 | ../../../../TheSidebarController/TheSidebarController/Animations/SidebarFacebookAnimation.h -------------------------------------------------------------------------------- /GDRouting-Example/Pods/BuildHeaders/TheSidebarController/TheSidebarController/Animations/SidebarFlipboardAnimation.h: -------------------------------------------------------------------------------- 1 | ../../../../TheSidebarController/TheSidebarController/Animations/SidebarFlipboardAnimation.h -------------------------------------------------------------------------------- /GDRouting-Example/Pods/BuildHeaders/TheSidebarController/TheSidebarController/Animations/SidebarLuvocracyAnimation.h: -------------------------------------------------------------------------------- 1 | ../../../../TheSidebarController/TheSidebarController/Animations/SidebarLuvocracyAnimation.h -------------------------------------------------------------------------------- /GDRouting-Example/Pods/Headers/TheSidebarController/TheSidebarController/Animations/SidebarWunderlistAnimation.h: -------------------------------------------------------------------------------- 1 | ../../../../TheSidebarController/TheSidebarController/Animations/SidebarWunderlistAnimation.h -------------------------------------------------------------------------------- /GDRouting-Example/Pods/BuildHeaders/TheSidebarController/TheSidebarController/Animations/SidebarWunderlistAnimation.h: -------------------------------------------------------------------------------- 1 | ../../../../TheSidebarController/TheSidebarController/Animations/SidebarWunderlistAnimation.h -------------------------------------------------------------------------------- /GDRouting-Example/Pods/Pods-TheSidebarController-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_TheSidebarController : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_TheSidebarController 5 | @end 6 | -------------------------------------------------------------------------------- /GDRouting-Example/Podfile: -------------------------------------------------------------------------------- 1 | platform :ios, '7.0' 2 | 3 | inhibit_all_warnings! 4 | 5 | link_with ['GDRouting-Example', 'GDRouting-ExampleTests'] 6 | 7 | pod 'JLRoutes' 8 | pod 'FastCoding' 9 | pod 'TheSidebarController' 10 | -------------------------------------------------------------------------------- /GDRouting-Example/GDRouting-Example.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /GDRouting-Example/GDRouting-Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /GDRouting/GDUsableApp.m: -------------------------------------------------------------------------------- 1 | // 2 | // GDUsableApps.m 3 | // GDRouting-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/7/14. 6 | // Copyright (c) 2014 Go Daddy Operating Company, LLC. All rights reserved. 7 | // 8 | 9 | #import "GDUsableApp.h" 10 | 11 | @implementation GDUsableApp 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /GDRouting-Example/GDRouting-Example/Classes/DogViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // DogViewController.h 3 | // GDDiscovery-MainMenu-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/14/14. 6 | // Copyright (c) 2014 Go Daddy Operating Company, LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface DogViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /GDRouting-Example/GDRouting-Example/Classes/CatViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // SecondViewController.h 3 | // GDDiscovery-MainMenu-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/14/14. 6 | // Copyright (c) 2014 Go Daddy Operating Company, LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface CatViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /GDRouting-Example/GDRouting-Example/Classes/ManateeViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // GDDiscovery-MainMenu-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/1/14. 6 | // Copyright (c) 2014 Go Daddy Operating Company, LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ManateeViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /GDRouting-Example/GDRouting-Example/Classes/CatApp.h: -------------------------------------------------------------------------------- 1 | // 2 | // CatApp.h 3 | // GDDiscovery-MainMenu-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/14/14. 6 | // Copyright (c) 2014 Go Daddy Operating Company, LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "GDBaseApp.h" 11 | 12 | @interface CatApp : NSObject 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /GDRouting-Example/GDRouting-Example/Classes/DogApp.h: -------------------------------------------------------------------------------- 1 | // 2 | // DogApp.h 3 | // GDDiscovery-MainMenu-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/14/14. 6 | // Copyright (c) 2014 Go Daddy Operating Company, LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "GDBaseApp.h" 11 | 12 | @interface DogApp : NSObject 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /GDRouting-Example/GDRouting-Example/Classes/ManateeApp.h: -------------------------------------------------------------------------------- 1 | // 2 | // MainMenuApp.h 3 | // GDDiscovery-MainMenu-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/7/14. 6 | // Copyright (c) 2014 Go Daddy Operating Company, LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "GDBaseApp.h" 11 | 12 | @interface ManateeApp : NSObject 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /GDRouting/GDConfigurableTableCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // GDConfigurableTableCell.h 3 | // GDRouting-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/21/14. 6 | // Copyright (c) 2014 GoDaddy. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol GDConfigurableTableCell 12 | 13 | - (void)configureWithParamaters:(NSDictionary *)inDictionary; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /GDRouting-Example/GDRouting-ExampleTests/SupportingFiles/GDSharedApp.h: -------------------------------------------------------------------------------- 1 | // 2 | // GDSharedApp.h 3 | // GDRouting-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/6/14. 6 | // Copyright (c) 2014 Go Daddy Operating Company, LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "GDBaseApp.h" 11 | 12 | @interface GDSharedApp : NSObject 13 | 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /GDRouting-Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - FastCoding (2.1.8) 3 | - JLRoutes (1.5.1) 4 | - TheSidebarController (0.6) 5 | 6 | DEPENDENCIES: 7 | - FastCoding 8 | - JLRoutes 9 | - TheSidebarController 10 | 11 | SPEC CHECKSUMS: 12 | FastCoding: cc08e6fe71e7c8c065f53a109511983861cb63c8 13 | JLRoutes: 3400fe314fc01c861a14ff7e183d209b0cd302ae 14 | TheSidebarController: 9c770ae6ffbd153839e02b3148584b2fcd857d81 15 | 16 | COCOAPODS: 0.32.1 17 | -------------------------------------------------------------------------------- /GDRouting-Example/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - FastCoding (2.1.8) 3 | - JLRoutes (1.5.1) 4 | - TheSidebarController (0.6) 5 | 6 | DEPENDENCIES: 7 | - FastCoding 8 | - JLRoutes 9 | - TheSidebarController 10 | 11 | SPEC CHECKSUMS: 12 | FastCoding: cc08e6fe71e7c8c065f53a109511983861cb63c8 13 | JLRoutes: 3400fe314fc01c861a14ff7e183d209b0cd302ae 14 | TheSidebarController: 9c770ae6ffbd153839e02b3148584b2fcd857d81 15 | 16 | COCOAPODS: 0.32.1 17 | -------------------------------------------------------------------------------- /GDRouting-Example/GDRouting-Example/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // GDRouting-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/19/14. 6 | // Copyright (c) 2014 Go Daddy Operating Company, LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "GDRoute.h" 11 | 12 | @interface AppDelegate : UIResponder 13 | 14 | @property (strong, nonatomic) UIWindow *window; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /GDRouting-Example/GDRouting-Example/Classes/MainMenuViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // MainMenuViewController.h 3 | // GDDiscovery-MainMenu-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/1/14. 6 | // Copyright (c) 2014 Go Daddy Operating Company, LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MainMenuViewController : UIViewController 12 | 13 | + (MainMenuViewController *)mainMenuViewControllerFromStoryboard; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /GDRouting-Example/GDRouting-Example/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // GDRouting-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/19/14. 6 | // Copyright (c) 2014 Go Daddy Operating Company, LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AppDelegate.h" 12 | 13 | int main(int argc, char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /GDRouting-Example/GDRouting-Example/GDRouting-Example-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_5_0 10 | #warning "This project uses features only available in iOS SDK 5.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | #import 16 | #define EMPTY_STRING @"" 17 | #endif 18 | -------------------------------------------------------------------------------- /GDRouting-Example/GDRouting-Example/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /GDRouting-Example/GDRouting-Example/Classes/MainMenuTableViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // MainMenuTableViewCell.h 3 | // GDDiscovery-MainMenu-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/15/14. 6 | // Copyright (c) 2014 Go Daddy Operating Company, LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "GDConfigurableTableCell.h" 11 | 12 | @interface MainMenuTableViewCell : UITableViewCell 13 | 14 | @property(nonatomic, weak) IBOutlet UILabel *menuItemLabel; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /GDRouting-Example/GDRouting-Example/Classes/MainMenuTableViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // MainMenuTableViewController.h 3 | // GDDiscovery-MainMenu-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/7/14. 6 | // Copyright (c) 2014 Go Daddy Operating Company, LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "TheSidebarController.h" 11 | 12 | @interface MainMenuTableViewController : UITableViewController 13 | 14 | @property(nonatomic, strong) TheSidebarController *parentSideBarController; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /GDRouting-Example/Pods/Pods-FastCoding-Private.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods-FastCoding.xcconfig" 2 | GCC_PREPROCESSOR_DEFINITIONS = COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/BuildHeaders" "${PODS_ROOT}/BuildHeaders/FastCoding" "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/FastCoding" "${PODS_ROOT}/Headers/JLRoutes" "${PODS_ROOT}/Headers/TheSidebarController" "${PODS_ROOT}/Headers/TheSidebarController/TheSidebarController" "${PODS_ROOT}/Headers/TheSidebarController/TheSidebarController/Animations" 4 | OTHER_LDFLAGS = -ObjC 5 | PODS_ROOT = ${SRCROOT} -------------------------------------------------------------------------------- /GDRouting-Example/Pods/Pods-JLRoutes-Private.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods-JLRoutes.xcconfig" 2 | GCC_PREPROCESSOR_DEFINITIONS = COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/BuildHeaders" "${PODS_ROOT}/BuildHeaders/JLRoutes" "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/FastCoding" "${PODS_ROOT}/Headers/JLRoutes" "${PODS_ROOT}/Headers/TheSidebarController" "${PODS_ROOT}/Headers/TheSidebarController/TheSidebarController" "${PODS_ROOT}/Headers/TheSidebarController/TheSidebarController/Animations" 4 | OTHER_LDFLAGS = -ObjC ${PODS_JLROUTES_OTHER_LDFLAGS} 5 | PODS_ROOT = ${SRCROOT} -------------------------------------------------------------------------------- /GDRouting-Example/Pods/Pods-DProperty-Private.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods-DProperty.xcconfig" 2 | GCC_PREPROCESSOR_DEFINITIONS = COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/BuildHeaders" "${PODS_ROOT}/BuildHeaders/DProperty" "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/DProperty" "${PODS_ROOT}/Headers/FastCoding" "${PODS_ROOT}/Headers/JLRoutes" "${PODS_ROOT}/Headers/TheSidebarController" "${PODS_ROOT}/Headers/TheSidebarController/TheSidebarController" "${PODS_ROOT}/Headers/TheSidebarController/TheSidebarController/Animations" 4 | OTHER_LDFLAGS = -ObjC 5 | PODS_ROOT = ${SRCROOT} -------------------------------------------------------------------------------- /GDRouting-Example/GDRouting-Example/Classes/MainMenuTableViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // MainMenuTableViewCell.m 3 | // GDDiscovery-MainMenu-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/15/14. 6 | // Copyright (c) 2014 Go Daddy Operating Company, LLC. All rights reserved. 7 | // 8 | 9 | #import "MainMenuTableViewCell.h" 10 | #import "GDEnums.h" 11 | 12 | @implementation MainMenuTableViewCell 13 | 14 | 15 | - (void)configureWithParamaters:(NSDictionary *)inDictionary 16 | { 17 | self.menuItemLabel.text = inDictionary[@(GDCellConfigKeyTitle)]; 18 | } 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /GDRouting-Example/GDRouting-Example/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /GDRouting/GDEnums.h: -------------------------------------------------------------------------------- 1 | // 2 | // GDEnums.h 3 | // GDRouting-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/21/14. 6 | // Copyright (c) 2014 GoDaddy. All rights reserved. 7 | // 8 | 9 | #ifndef GDRouting_Example_GDEnums_h 10 | #define GDRouting_Example_GDEnums_h 11 | 12 | /** 13 | * Enum for dictionary keys to be used for common cell configuration 14 | */ 15 | typedef NS_OPTIONS(NSUInteger, GDCellConfigKey) { 16 | /** 17 | * Key for cell identifier 18 | */ 19 | GDCellConfigKeyCellIdentifier = 1 << 0, 20 | /** 21 | * Key for cell title 22 | */ 23 | GDCellConfigKeyTitle = 1 << 1, 24 | }; 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | GDRouting-Example/GDRouting-Example.xcworkspace/xcuserdata/jneugass.xcuserdatad/UserInterfaceState.xcuserstate 2 | GDRouting-Example/GDRouting-Example.xcworkspace/xcuserdata/jneugass.xcuserdatad/WorkspaceSettings.xcsettings 3 | GDRouting-Example/GDRouting-Example.xcworkspace/xcuserdata/jneugass.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist 4 | GDRouting-Example/GDRouting-Example.xcodeproj/project.xcworkspace/xcuserdata/jneugass.xcuserdatad/UserInterfaceState.xcuserstate 5 | GDRouting-Example/GDRouting-Example.xcodeproj/xcuserdata/jneugass.xcuserdatad/xcschemes/GDRouting-Example.xcscheme 6 | GDRouting-Example/GDRouting-Example.xcodeproj/xcuserdata/jneugass.xcuserdatad/xcschemes/xcschememanagement.plist 7 | -------------------------------------------------------------------------------- /GDRouting.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "GDRouting" 3 | s.version = "0.0.1" 4 | s.summary = "GDRouting is a framework for using private CocoaPod repositories to modularizing a large application into sub-applications" 5 | s.homepage = "https://www.godaddy.com" 6 | s.license = { :'type' => 'GoDaddy', :'file' => 'LICENSE' } 7 | s.author = { "Jonah Neugass" => "jneugass@godaddy.com" } 8 | s.platform = :ios, '7.0' 9 | s.source = { :git => "https://github.com/godaddy/GDRouting.git", :tag => "0.0.1" } 10 | s.source_files = 'GDRouting' 11 | s.requires_arc = true 12 | s.dependency 'JLRoutes' 13 | s.dependency 'FastCoding' 14 | end -------------------------------------------------------------------------------- /GDRouting/GDUsableApp.h: -------------------------------------------------------------------------------- 1 | // 2 | // GDUsableApps.h 3 | // GDRouting-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/7/14. 6 | // Copyright (c) 2014 Go Daddy Operating Company, LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /** 12 | * A GDUsableApp is a representation of an sub-app that is configured for use in your main application 13 | */ 14 | @interface GDUsableApp : NSObject 15 | 16 | /** 17 | * Name of your sub-app. Should match the sub-app class exactly 18 | */ 19 | @property(nonatomic, strong) NSString *appName; 20 | 21 | /** 22 | * Order the sub-app's menu items should be listed in the menu. 23 | */ 24 | @property(nonatomic) NSInteger displayOrder; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /GDRouting/UIStoryboard+QuickFetch.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIStoryboard+QuickFetch.m 3 | // GDRouting-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/21/14. 6 | // Copyright (c) 2014 GoDaddy. All rights reserved. 7 | // 8 | 9 | #import "UIStoryboard+QuickFetch.h" 10 | 11 | @implementation UIStoryboard (QuickFetch) 12 | 13 | + (UIViewController *)instantiateViewControllerWithIdentifier:(NSString *)inViewControllerIdentifier andStoryboardName:(NSString *)inStoryboardName 14 | { 15 | UIStoryboard *storyboard = [UIStoryboard storyboardWithName:inStoryboardName bundle:nil]; 16 | UIViewController *viewController = [storyboard instantiateViewControllerWithIdentifier:inViewControllerIdentifier]; 17 | return viewController; 18 | } 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /GDRouting-Example/Pods/Pods-TheSidebarController-Private.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods-TheSidebarController.xcconfig" 2 | GCC_PREPROCESSOR_DEFINITIONS = COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/BuildHeaders" "${PODS_ROOT}/BuildHeaders/TheSidebarController" "${PODS_ROOT}/BuildHeaders/TheSidebarController/TheSidebarController" "${PODS_ROOT}/BuildHeaders/TheSidebarController/TheSidebarController/Animations" "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/FastCoding" "${PODS_ROOT}/Headers/JLRoutes" "${PODS_ROOT}/Headers/TheSidebarController" "${PODS_ROOT}/Headers/TheSidebarController/TheSidebarController" "${PODS_ROOT}/Headers/TheSidebarController/TheSidebarController/Animations" 4 | OTHER_LDFLAGS = -ObjC ${PODS_THESIDEBARCONTROLLER_OTHER_LDFLAGS} 5 | PODS_ROOT = ${SRCROOT} -------------------------------------------------------------------------------- /GDRouting/GDArchiving.h: -------------------------------------------------------------------------------- 1 | // 2 | // GDArchiving.h 3 | // Go Daddy Operating Company, LLCDomainBuy 4 | // 5 | // Created by Jonah G. Neugass on 2/21/14. 6 | // 7 | // 8 | 9 | #import "NSObject+FastCoder.h" 10 | #import 11 | 12 | @class GDBaseParser; 13 | 14 | /** 15 | * Protocol that adds methods used for archiving, loading and deleting objects to/from disk. 16 | */ 17 | @protocol GDArchiving 18 | 19 | /** 20 | * Read archived object from disk 21 | * 22 | * @return Archived object. 23 | */ 24 | + (NSObject *)readArchivedObject; 25 | 26 | /** 27 | * Archives object to disk 28 | */ 29 | - (void)archiveObject; 30 | 31 | /** 32 | * Deletes archived object from disk 33 | */ 34 | + (void)deleteArchivedObject; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /GDRouting-Example/Pods/Pods.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/FastCoding" "${PODS_ROOT}/Headers/JLRoutes" "${PODS_ROOT}/Headers/TheSidebarController" "${PODS_ROOT}/Headers/TheSidebarController/TheSidebarController" "${PODS_ROOT}/Headers/TheSidebarController/TheSidebarController/Animations" 3 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers" -isystem "${PODS_ROOT}/Headers/FastCoding" -isystem "${PODS_ROOT}/Headers/JLRoutes" -isystem "${PODS_ROOT}/Headers/TheSidebarController" -isystem "${PODS_ROOT}/Headers/TheSidebarController/TheSidebarController" -isystem "${PODS_ROOT}/Headers/TheSidebarController/TheSidebarController/Animations" 4 | OTHER_LDFLAGS = -ObjC -framework Foundation -framework QuartzCore 5 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /GDRouting/UIStoryboard+QuickFetch.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIStoryboard+QuickFetch.h 3 | // GDRouting-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/21/14. 6 | // Copyright (c) 2014 GoDaddy. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIStoryboard (QuickFetch) 12 | 13 | /** 14 | * Convenience method to return a view controller from a storyboard given the storyboard name and the view controller identifier 15 | * 16 | * @param inViewControllerIdentifier - Identifier of the view controller to return 17 | * @param inStoryboardName - Storyboard name 18 | * 19 | * @return UIViewController instance created with passed in identifier 20 | */ 21 | + (UIViewController *)instantiateViewControllerWithIdentifier:(NSString *)inViewControllerIdentifier andStoryboardName:(NSString *)inStoryboardName; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /GDRouting/GDAppConfiguration.h: -------------------------------------------------------------------------------- 1 | // 2 | // GDAppConfiguration.h 3 | // GDRouting-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/7/14. 6 | // Copyright (c) 2014 Go Daddy Operating Company, LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "GDArchiving.h" 11 | 12 | /** 13 | * GDAppConfiguration is an archivable object used to store configuration information about the app. 14 | */ 15 | @interface GDAppConfiguration : NSObject 16 | 17 | /** 18 | * Array of GDUsableApp objects for use in GDAppManager to configure GDRoutes and GDMenuItems. 19 | */ 20 | @property(strong, nonatomic) NSArray *usableAppArray; 21 | 22 | /** 23 | * Grabs the CFBundleURLSchemes from the info.plist for use creating an x-callback-url link to one of the configured sub applications. 24 | */ 25 | @property(strong, nonatomic, readonly) NSString *baseCallbackURLString; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /GDRouting-Example/GDRouting-Example/Classes/CatViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // SecondViewController.m 3 | // GDDiscovery-MainMenu-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/14/14. 6 | // Copyright (c) 2014 Go Daddy Operating Company, LLC. All rights reserved. 7 | // 8 | 9 | #import "CatViewController.h" 10 | #import "TheSidebarController.h" 11 | 12 | @interface CatViewController () 13 | 14 | @end 15 | 16 | @implementation CatViewController 17 | 18 | - (void)viewDidLoad 19 | { 20 | [super viewDidLoad]; 21 | // Do any additional setup after loading the view. 22 | } 23 | 24 | - (void)didReceiveMemoryWarning 25 | { 26 | [super didReceiveMemoryWarning]; 27 | // Dispose of any resources that can be recreated. 28 | } 29 | 30 | - (IBAction)menuButtonClicked:(id)sender 31 | { 32 | [self.sidebarController presentLeftSidebarViewControllerWithStyle:SidebarTransitionStyleAirbnb]; 33 | } 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /GDRouting-Example/GDRouting-Example/Classes/ManateeViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // GDDiscovery-MainMenu-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/1/14. 6 | // Copyright (c) 2014 Go Daddy Operating Company, LLC. All rights reserved. 7 | // 8 | 9 | #import "ManateeViewController.h" 10 | #import "TheSidebarController.h" 11 | 12 | @interface ManateeViewController () 13 | 14 | @end 15 | 16 | @implementation ManateeViewController 17 | 18 | - (void)viewDidLoad 19 | { 20 | [super viewDidLoad]; 21 | // Do any additional setup after loading the view, typically from a nib. 22 | } 23 | 24 | - (void)didReceiveMemoryWarning 25 | { 26 | [super didReceiveMemoryWarning]; 27 | // Dispose of any resources that can be recreated. 28 | } 29 | 30 | - (IBAction)menuButtonClicked:(id)sender 31 | { 32 | [self.sidebarController presentLeftSidebarViewControllerWithStyle:SidebarTransitionStyleAirbnb]; 33 | } 34 | @end 35 | -------------------------------------------------------------------------------- /GDRouting-Example/Pods/Pods-environment.h: -------------------------------------------------------------------------------- 1 | 2 | // To check if a library is compiled with CocoaPods you 3 | // can use the `COCOAPODS` macro definition which is 4 | // defined in the xcconfigs so it is available in 5 | // headers also when they are imported in the client 6 | // project. 7 | 8 | 9 | // FastCoding 10 | #define COCOAPODS_POD_AVAILABLE_FastCoding 11 | #define COCOAPODS_VERSION_MAJOR_FastCoding 2 12 | #define COCOAPODS_VERSION_MINOR_FastCoding 1 13 | #define COCOAPODS_VERSION_PATCH_FastCoding 8 14 | 15 | // JLRoutes 16 | #define COCOAPODS_POD_AVAILABLE_JLRoutes 17 | #define COCOAPODS_VERSION_MAJOR_JLRoutes 1 18 | #define COCOAPODS_VERSION_MINOR_JLRoutes 5 19 | #define COCOAPODS_VERSION_PATCH_JLRoutes 1 20 | 21 | // TheSidebarController 22 | #define COCOAPODS_POD_AVAILABLE_TheSidebarController 23 | #define COCOAPODS_VERSION_MAJOR_TheSidebarController 0 24 | #define COCOAPODS_VERSION_MINOR_TheSidebarController 6 25 | #define COCOAPODS_VERSION_PATCH_TheSidebarController 0 26 | 27 | -------------------------------------------------------------------------------- /GDRouting-Example/Pods/FastCoding/LICENCE.md: -------------------------------------------------------------------------------- 1 | FastCoding 2 | 3 | Version 2.1.7, January 15th, 2014 4 | 5 | Copyright (C) 2013 Charcoal Design 6 | 7 | This software is provided 'as-is', without any express or implied 8 | warranty. In no event will the authors be held liable for any damages 9 | arising from the use of this software. 10 | 11 | Permission is granted to anyone to use this software for any purpose, 12 | including commercial applications, and to alter it and redistribute it 13 | freely, subject to the following restrictions: 14 | 15 | 1. The origin of this software must not be misrepresented; you must not 16 | claim that you wrote the original software. If you use this software 17 | in a product, an acknowledgment in the product documentation would be 18 | appreciated but is not required. 19 | 20 | 2. Altered source versions must be plainly marked as such, and must not be 21 | misrepresented as being the original software. 22 | 23 | 3. This notice may not be removed or altered from any source distribution. -------------------------------------------------------------------------------- /GDRouting-Example/GDRouting-Example/Classes/MainMenuTableDataModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // MainMenuTableDataModel.h 3 | // GDDiscovery-MainMenu-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/7/14. 6 | // Copyright (c) 2014 Go Daddy Operating Company, LLC. All rights reserved. 7 | // 8 | 9 | #import "GDTableDataModel.h" 10 | 11 | extern NSString * const MainMenuTableCellIdentifier; 12 | extern NSString * const MainMenuTableHeaderCellIdentifier; 13 | 14 | @interface MainMenuTableDataModel : GDTableDataModel 15 | 16 | /** 17 | * Constructor taking in an array of GDMenuItems, GDRoutes and a base appurl string. 18 | * 19 | * @param inMenuItemArray Array of GDMenuItems 20 | * @param inRouteArray Array of GDRoutes 21 | * @param inBaseAppURLString BaseAppUrlString used to create the x-callback-url 22 | * 23 | * @return Instance of MainMenuTableDataModel 24 | */ 25 | - (instancetype)initWithMenuItemArray:(NSArray *)inMenuItemArray andRouteArray:(NSArray *)inRouteArray andBaseAppURLString:(NSString *)inBaseAppURLString; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /GDRouting/NSObject+FastCoder.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+FastCoder.h 3 | // Go Daddy Operating Company, LLCDomainBuy 4 | // 5 | // Created by Jonah G. Neugass on 2/21/14. 6 | // 7 | // 8 | 9 | #import 10 | 11 | /** 12 | * Category that provides a wrapper around FastCoder 13 | */ 14 | @interface NSObject (FastCoder) 15 | 16 | /** 17 | * Reads an archived file provided a file name 18 | * 19 | * @param inFileName - File name to read 20 | * 21 | * @return Unseralized object read from disk 22 | */ 23 | + (NSObject *)readArchiveFile:(NSString *)inFileName; 24 | 25 | /** 26 | * Archives an object to the provided file name 27 | * 28 | * @param inFileName - File name to serialize object to 29 | * @param inObject - Object to serialize 30 | */ 31 | + (void)archiveFile:(NSString *)inFileName inObject:(NSObject *)inObject; 32 | 33 | /** 34 | * Deletes a file from disk with the provided file name 35 | * 36 | * @param inFileName - file name to delete 37 | */ 38 | + (void)deleteFile:(NSString *)inFileName; 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /GDRouting-Example/GDRouting-ExampleTests/GDRouting-ExampleTests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleURLTypes 6 | 7 | 8 | CFBundleURLSchemes 9 | 10 | gdroutingtests 11 | 12 | CFBundleURLName 13 | com.godaddy-os.GDRouting-ExampleTests 14 | 15 | 16 | CFBundleDevelopmentRegion 17 | en 18 | CFBundleExecutable 19 | ${EXECUTABLE_NAME} 20 | CFBundleIdentifier 21 | com.godaddy-os.${PRODUCT_NAME:rfc1034identifier} 22 | CFBundleInfoDictionaryVersion 23 | 6.0 24 | CFBundlePackageType 25 | BNDL 26 | CFBundleShortVersionString 27 | 1.0 28 | CFBundleSignature 29 | ???? 30 | CFBundleVersion 31 | 1 32 | 33 | 34 | -------------------------------------------------------------------------------- /GDRouting/GDRoute.m: -------------------------------------------------------------------------------- 1 | // 2 | // GDRoute.m 3 | // GDRouting-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/1/14. 6 | // Copyright (c) 2014 Go Daddy Operating Company, LLC. All rights reserved. 7 | // 8 | 9 | #import "GDRoute.h" 10 | 11 | @implementation GDRoute 12 | 13 | +(instancetype)routeWithURLString:(NSString *)inURLString andAction:(GDRoutingBlock)inRoutingBlock 14 | { 15 | GDRoute *returnRoute = [[GDRoute alloc] init]; 16 | returnRoute.urlString = inURLString; 17 | returnRoute.routingBlock = inRoutingBlock; 18 | return returnRoute; 19 | } 20 | 21 | +(instancetype)routeWithURLString:(NSString *)inURLString andDisplayOrder:(NSInteger)inDisplayOrder andAction:(GDRoutingBlock)inRoutingBlock 22 | { 23 | GDRoute *returnRoute = [GDRoute routeWithURLString:inURLString andAction:inRoutingBlock]; 24 | returnRoute.displayOrder = inDisplayOrder; 25 | return returnRoute; 26 | } 27 | 28 | - (NSURL *)urlWithBaseAppURLString:(NSString *)inBaseAppURLString 29 | { 30 | NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"%@:/%@",inBaseAppURLString, self.urlString]]; 31 | return url; 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 Go Daddy Operating Company, LLC 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a 4 | copy of this software and associated documentation files (the "Software"), 5 | to deal in the Software without restriction, including without limitation 6 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | and/or sell copies of the Software, and to permit persons to whom the 8 | Software is furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19 | DEALINGS IN THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /GDRouting/GDTableDataModelObject.m: -------------------------------------------------------------------------------- 1 | // 2 | // GDTableDataModelObject.m 3 | // GDRouting-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/6/14. 6 | // Copyright (c) 2014 Go Daddy Operating Company, LLC. All rights reserved. 7 | // 8 | 9 | #import "GDTableDataModelObject.h" 10 | 11 | @implementation GDTableDataModelObject 12 | 13 | - (instancetype)init 14 | { 15 | self = [super init]; 16 | if (self) 17 | { 18 | _parameterDictionary = [[NSMutableDictionary alloc] init]; 19 | } 20 | return self; 21 | } 22 | 23 | - (instancetype)initWithParameterDictionary:(NSDictionary *)inDictionary 24 | { 25 | self = [super init]; 26 | if (self) 27 | { 28 | _parameterDictionary = [[NSMutableDictionary alloc] initWithDictionary:inDictionary]; 29 | } 30 | return self; 31 | } 32 | 33 | - (instancetype)initWithParameterDictionary:(NSDictionary *)inDictionary andSelectedBlock:(GDTableDataModelSelectedBlock)inSelectedBlock 34 | { 35 | self = [self initWithParameterDictionary:inDictionary]; 36 | if (self) 37 | { 38 | _selectedBlock = inSelectedBlock; 39 | } 40 | return self; 41 | } 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /GDRouting/GDBaseApp.h: -------------------------------------------------------------------------------- 1 | // 2 | // GDBaseApp.h 3 | // GDRouting-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/1/14. 6 | // Copyright (c) 2014 Go Daddy Operating Company, LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /** 12 | * Protocol that should be used by all modular all sub-applications 13 | */ 14 | @protocol GDBaseApp 15 | 16 | /** 17 | * Class method that returns a UINavigationController with the main view controller of the sub-app as it's root view controller 18 | * 19 | * @return UINavigationController with the main view controller of the sub-app as it's root view controller 20 | */ 21 | + (UINavigationController *)baseNavigationController; 22 | 23 | /** 24 | * Class method that returns an array of all GDMenuItems associated with the sub-app 25 | * 26 | * @return Array of all menuItems associated with the sub-app. 27 | */ 28 | + (NSArray *)menuItems; 29 | 30 | /** 31 | * Class method that returns an array of all GDRoutes associated with the sub-app 32 | * 33 | * @return Array of all GDRoutes associated with the sub-app 34 | */ 35 | + (NSDictionary *)routesToRegister; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /GDRouting-Example/Pods/TheSidebarController/LICENSE: -------------------------------------------------------------------------------- 1 | TheSidebarController 2 | 3 | Copyright (c) 2013 Jon Danao (danao.org | jondanao) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /GDRouting/GDMenuItem.m: -------------------------------------------------------------------------------- 1 | // 2 | // GDMenuItem.m 3 | // GDRouting-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/1/14. 6 | // Copyright (c) 2014 Go Daddy Operating Company, LLC. All rights reserved. 7 | // 8 | 9 | #import "GDMenuItem.h" 10 | 11 | @implementation GDMenuItem 12 | 13 | - (instancetype) initWithTitle:(NSString *)inTitle andIconImageName:(NSString *)inIconImageName 14 | { 15 | self = [super init]; 16 | if( self != nil ) 17 | { 18 | self.title = inTitle; 19 | self.iconImageName = inIconImageName; 20 | } 21 | return self; 22 | } 23 | 24 | - (instancetype) initWithTitle:(NSString *)inTitle andDisplayOrder:(NSInteger)inDisplayOrder 25 | { 26 | self = [self initWithTitle:inTitle andIconImageName:nil]; 27 | if( self != nil ) 28 | { 29 | self.displayOrder = inDisplayOrder; 30 | } 31 | return self; 32 | } 33 | 34 | - (instancetype) initWithTitle:(NSString *)inTitle andDisplayOrder:(NSInteger)inDisplayOrder andIconImageName:(NSString *)inIconImageName 35 | { 36 | self = [self initWithTitle:inTitle andIconImageName:inIconImageName]; 37 | if( self != nil ) 38 | { 39 | self.displayOrder = inDisplayOrder; 40 | } 41 | return self; 42 | } 43 | @end 44 | -------------------------------------------------------------------------------- /GDRouting-Example/GDRouting-Example/Classes/DogViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // DogViewController.m 3 | // GDDiscovery-MainMenu-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/14/14. 6 | // Copyright (c) 2014 Go Daddy Operating Company, LLC. All rights reserved. 7 | // 8 | 9 | #import "DogViewController.h" 10 | 11 | @interface DogViewController () 12 | 13 | @end 14 | 15 | @implementation DogViewController 16 | 17 | - (void)viewDidLoad 18 | { 19 | [super viewDidLoad]; 20 | // Do any additional setup after loading the view. 21 | } 22 | 23 | - (void)didReceiveMemoryWarning 24 | { 25 | [super didReceiveMemoryWarning]; 26 | // Dispose of any resources that can be recreated. 27 | } 28 | 29 | - (IBAction)dismissModalViewController:(id)sender 30 | { 31 | [self.navigationController dismissViewControllerAnimated:YES completion:nil]; 32 | } 33 | 34 | /* 35 | #pragma mark - Navigation 36 | 37 | // In a storyboard-based application, you will often want to do a little preparation before navigation 38 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender 39 | { 40 | // Get the new view controller using [segue destinationViewController]. 41 | // Pass the selected object to the new view controller. 42 | } 43 | */ 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /GDRouting-Example/GDRouting-ExampleTests/SupportingFiles/GDSharedApp.m: -------------------------------------------------------------------------------- 1 | // 2 | // GDSharedApp.m 3 | // GDRouting-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/6/14. 6 | // Copyright (c) 2014 Go Daddy Operating Company, LLC. All rights reserved. 7 | // 8 | 9 | #import "GDSharedApp.h" 10 | #import "GDMenuItem.h" 11 | #import "GDRoute.h" 12 | #import "ManateeViewController.h" 13 | 14 | @implementation GDSharedApp 15 | 16 | + (UINavigationController *)baseNavigationController 17 | { 18 | return [[UINavigationController alloc] initWithRootViewController:[[ManateeViewController alloc] init]]; 19 | } 20 | 21 | + (NSArray *)menuItems 22 | { 23 | GDMenuItem *viewControllerItem = [[GDMenuItem alloc] initWithTitle:@"SharedApp" andDisplayOrder:0 andIconImageName:@""]; 24 | return @[viewControllerItem]; 25 | } 26 | 27 | + (NSDictionary *)routesToRegister 28 | { 29 | GDRoute *route = [GDRoute routeWithURLString:@"/sharedapp" andAction: ^BOOL (id routingDelegate, NSString *urlString, NSDictionary *parameters) { 30 | [routingDelegate popRoutedViewControllerToRootViewController:YES parameters:nil]; 31 | return YES; 32 | }]; 33 | NSDictionary *routes = @{@"sharedapp" : route}; 34 | 35 | return routes; 36 | } 37 | 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /GDRouting-Example/GDRouting-ExampleTests/GDMenuItemTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // GDDiscovery_Shared_ExampleTests.m 3 | // GDRouting-ExampleTests 4 | // 5 | // Created by Jonah G. Neugass on 5/1/14. 6 | // Copyright (c) 2014 Go Daddy Operating Company, LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "GDMenuItem.h" 11 | #import "GDRoute.h" 12 | 13 | @interface GDMenuItemTests : XCTestCase 14 | 15 | @end 16 | 17 | @implementation GDMenuItemTests 18 | 19 | - (void)setUp 20 | { 21 | [super setUp]; 22 | } 23 | 24 | - (void)tearDown 25 | { 26 | [super tearDown]; 27 | } 28 | 29 | - (void)testCreateMenuItem 30 | { 31 | NSString *testTitle = @"TestTitle"; 32 | NSString *iconName = @"IconName"; 33 | NSString *sectionTitle = @"SectionTitle"; 34 | GDMenuItem *item = [[GDMenuItem alloc] initWithTitle:testTitle andDisplayOrder:0 andIconImageName:iconName]; 35 | item.sectionTitle = sectionTitle; 36 | 37 | XCTAssertTrue([testTitle isEqualToString:item.title], @"Title is not set correctly"); 38 | XCTAssertTrue([iconName isEqualToString:item.iconImageName], @"Icon name is not set correctly"); 39 | XCTAssertTrue([sectionTitle isEqualToString:item.sectionTitle], @"Section title name is not set correctly"); 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /GDRouting-Example/Pods/Pods.xcodeproj/xcuserdata/jneugass.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Pods-FastCoding.xcscheme 8 | 9 | isShown 10 | 11 | 12 | Pods-JLRoutes.xcscheme 13 | 14 | isShown 15 | 16 | 17 | Pods-TheSidebarController.xcscheme 18 | 19 | isShown 20 | 21 | 22 | Pods.xcscheme 23 | 24 | isShown 25 | 26 | 27 | 28 | SuppressBuildableAutocreation 29 | 30 | 0F8D1E4A4E3A4CFA9DC870C6 31 | 32 | primary 33 | 34 | 35 | 215F5B885C7146B5AA67D104 36 | 37 | primary 38 | 39 | 40 | 8428B833833646DABF6C2B54 41 | 42 | primary 43 | 44 | 45 | 88C54AD2729F4DA8BA8ABE6A 46 | 47 | primary 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /GDRouting-Example/Pods/TheSidebarController/TheSidebarController/Animations/SidebarAirbnbAnimation.h: -------------------------------------------------------------------------------- 1 | // SidebarAirbnbAnimation.h 2 | // TheSidebarController 3 | // 4 | // Copyright (c) 2014 Jon Danao (danao.org | jondanao) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import "SidebarAnimation.h" 25 | 26 | @interface SidebarAirbnbAnimation : SidebarAnimation 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /GDRouting-Example/Pods/TheSidebarController/TheSidebarController/Animations/SidebarFeedlyAnimation.h: -------------------------------------------------------------------------------- 1 | // SidebarFeedlyAnimation.h 2 | // TheSidebarController 3 | // 4 | // Copyright (c) 2014 Jon Danao (danao.org | jondanao) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import "SidebarAnimation.h" 25 | 26 | @interface SidebarFeedlyAnimation : SidebarAnimation 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /GDRouting-Example/Pods/TheSidebarController/TheSidebarController/Animations/SidebarFacebookAnimation.h: -------------------------------------------------------------------------------- 1 | // SidebarFacebookAnimation.h 2 | // TheSidebarController 3 | // 4 | // Copyright (c) 2014 Jon Danao (danao.org | jondanao) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import "SidebarAnimation.h" 25 | 26 | @interface SidebarFacebookAnimation : SidebarAnimation 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /GDRouting-Example/Pods/TheSidebarController/TheSidebarController/Animations/SidebarFlipboardAnimation.h: -------------------------------------------------------------------------------- 1 | // SidebarFlipboardAnimation.h 2 | // TheSidebarController 3 | // 4 | // Copyright (c) 2014 Jon Danao (danao.org | jondanao) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import "SidebarAnimation.h" 25 | 26 | @interface SidebarFlipboardAnimation : SidebarAnimation 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /GDRouting-Example/Pods/TheSidebarController/TheSidebarController/Animations/SidebarLuvocracyAnimation.h: -------------------------------------------------------------------------------- 1 | // SidebarLuvocracyAnimation.h 2 | // TheSidebarController 3 | // 4 | // Copyright (c) 2014 Jon Danao (danao.org | jondanao) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import "SidebarAnimation.h" 25 | 26 | @interface SidebarLuvocracyAnimation : SidebarAnimation 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /GDRouting-Example/Pods/TheSidebarController/TheSidebarController/Animations/SidebarWunderlistAnimation.h: -------------------------------------------------------------------------------- 1 | // SidebarWunderlistAnimation.h 2 | // TheSidebarController 3 | // 4 | // Copyright (c) 2014 Jon Danao (danao.org | jondanao) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import "SidebarAnimation.h" 25 | 26 | @interface SidebarWunderlistAnimation : SidebarAnimation 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /GDRouting-Example/GDRouting-Example/Classes/MainMenuViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // MainMenuViewController.m 3 | // GDDiscovery-MainMenu-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/1/14. 6 | // Copyright (c) 2014 Go Daddy Operating Company, LLC. All rights reserved. 7 | // 8 | 9 | #import "MainMenuViewController.h" 10 | #import "MainMenuTableViewController.h" 11 | #import "UIStoryboard+QuickFetch.h" 12 | 13 | 14 | @implementation MainMenuViewController 15 | 16 | static NSString *const StoryboardName = @"Main"; 17 | static NSString *const ViewControllerIdentifier = @"MainMenuViewController"; 18 | 19 | + (MainMenuViewController *)mainMenuViewControllerFromStoryboard 20 | { 21 | return (MainMenuViewController *)[UIStoryboard instantiateViewControllerWithIdentifier:ViewControllerIdentifier andStoryboardName:StoryboardName]; 22 | } 23 | 24 | - (void)viewDidLoad 25 | { 26 | [super viewDidLoad]; 27 | // Do any additional setup after loading the view. 28 | } 29 | 30 | - (void)didReceiveMemoryWarning 31 | { 32 | [super didReceiveMemoryWarning]; 33 | // Dispose of any resources that can be recreated. 34 | } 35 | 36 | 37 | // In a storyboard-based application, you will often want to do a little preparation before navigation 38 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender 39 | { 40 | MainMenuTableViewController *mainTableViewController = (MainMenuTableViewController *)segue.destinationViewController; 41 | mainTableViewController.parentSideBarController = self.sidebarController; 42 | } 43 | 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /GDRouting-Example/GDRouting-Example/Classes/ManateeApp.m: -------------------------------------------------------------------------------- 1 | // 2 | // MainMenuApp.m 3 | // GDDiscovery-MainMenu-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/7/14. 6 | // Copyright (c) 2014 Go Daddy Operating Company, LLC. All rights reserved. 7 | // 8 | 9 | #import "ManateeApp.h" 10 | #import "ManateeViewController.h" 11 | #import "GDMenuItem.h" 12 | #import "GDRoute.h" 13 | #import "UIStoryboard+QuickFetch.h" 14 | 15 | @implementation ManateeApp 16 | 17 | static NSString *const StoryboardName = @"Main"; 18 | static NSString *const ViewControllerIdentifier = @"ManateeViewController"; 19 | static NSString *const MenuItemTitle = @"MANATEES"; 20 | 21 | + (UINavigationController *)baseNavigationController 22 | { 23 | return [[UINavigationController alloc] initWithRootViewController:[UIStoryboard instantiateViewControllerWithIdentifier:ViewControllerIdentifier andStoryboardName:StoryboardName]]; 24 | } 25 | 26 | + (NSArray *)menuItems 27 | { 28 | GDMenuItem *menuItem = [[GDMenuItem alloc] initWithTitle:MenuItemTitle andIconImageName:nil]; 29 | return @[menuItem]; 30 | } 31 | 32 | + (NSDictionary *)routesToRegister 33 | { 34 | GDRoute *route = [GDRoute routeWithURLString:[NSString stringWithFormat:@"/%@", ViewControllerIdentifier] andAction: ^BOOL (id routingDelegate, NSString *urlString, NSDictionary *parameters) { 35 | [routingDelegate popRoutedViewControllerToRootViewController:YES parameters:nil]; 36 | return YES; 37 | }]; 38 | 39 | NSDictionary *routeDictionary = @{ViewControllerIdentifier : route}; 40 | return routeDictionary; 41 | } 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /GDRouting/GDTableDataModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // GDTableDataModel.h 3 | // GDRouting-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/6/14. 6 | // Copyright (c) 2014 Go Daddy Operating Company, LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /** 12 | * GDTableDataModel makes dealing with UITableViews easier and cleaner 13 | */ 14 | @interface GDTableDataModel : NSObject 15 | 16 | /** 17 | * Array of data items to be used in table view 18 | */ 19 | @property(nonatomic, strong, readonly) NSMutableArray *dataArray; 20 | 21 | /** 22 | * Array of header items to be used in table view 23 | */ 24 | @property(nonatomic, strong, readonly) NSMutableArray *headerArray; 25 | 26 | /** 27 | * Constructor for GDTableDataModel 28 | * 29 | * @param inDataArray - Array of data items to be used in table view 30 | * @param inHeaderArray - Array of header items to be used in table view 31 | * 32 | * @return Instance of GDTableDataModel 33 | */ 34 | - (instancetype)initWithDataArray:(NSArray *)inDataArray andHeaderArray:(NSArray *)inHeaderArray; 35 | 36 | /** 37 | * Returns data item at section/row of inIndexPath 38 | * 39 | * @param inIndexPath - section/row of data item 40 | * 41 | * @return Data item at section/row of inIndexPath 42 | */ 43 | - (id) objectInDataArrayAtIndexPath:(NSIndexPath *)inIndexPath; 44 | 45 | /** 46 | * Returns header item at section/row of inIndexPath 47 | * 48 | * @param inIndexPath - section/row of header item 49 | * 50 | * @return Header item at section/row of inIndexPath 51 | */ 52 | - (id) objectInHeaderArrayAtPath:(NSIndexPath *)inIndexPath; 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /GDRouting/GDAppConfiguration.m: -------------------------------------------------------------------------------- 1 | // 2 | // GDAppConfiguration.m 3 | // GDRouting-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/7/14. 6 | // Copyright (c) 2014 Go Daddy Operating Company, LLC. All rights reserved. 7 | // 8 | 9 | #import "GDAppConfiguration.h" 10 | #import "GDUsableApp.h" 11 | 12 | @implementation GDAppConfiguration 13 | 14 | #pragma mark - GDArchiving protocol methods 15 | 16 | static NSString * const ArchiveName = @"GDAppConfiguration.fast"; 17 | static NSString * const SortKey = @"displayOrder"; 18 | 19 | - (void)setUsableAppArray:(NSArray *)inUsableAppArray 20 | { 21 | NSSortDescriptor *sort = [[NSSortDescriptor alloc] initWithKey:SortKey ascending:YES]; 22 | NSArray *sortedArray = [inUsableAppArray sortedArrayUsingDescriptors:@[sort]]; 23 | _usableAppArray = [[NSArray alloc] initWithArray:sortedArray]; 24 | } 25 | 26 | #pragma mark - GDArchiving methods 27 | + (NSObject *)readArchivedObject; 28 | { 29 | NSObject *returnObject = [NSObject readArchiveFile:ArchiveName]; 30 | return returnObject; 31 | } 32 | 33 | - (void)archiveObject; 34 | { 35 | [NSObject archiveFile:ArchiveName inObject:self]; 36 | } 37 | 38 | + (void)deleteArchivedObject; 39 | { 40 | [NSObject deleteFile:ArchiveName]; 41 | } 42 | 43 | - (NSString *)baseCallbackURLString 44 | { 45 | NSBundle *mainBundle = [NSBundle mainBundle]; 46 | 47 | NSArray *urlTypes = [mainBundle objectForInfoDictionaryKey:@"CFBundleURLTypes"]; 48 | NSDictionary *urlType = [urlTypes firstObject]; 49 | NSArray *urlSchemes = urlType[@"CFBundleURLSchemes"]; 50 | NSString *urlString = [urlSchemes firstObject]; 51 | 52 | return urlString; 53 | } 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /GDRouting-Example/GDRouting-Example/Classes/CatApp.m: -------------------------------------------------------------------------------- 1 | // 2 | // CatApp.m 3 | // GDDiscovery-MainMenu-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/14/14. 6 | // Copyright (c) 2014 Go Daddy Operating Company, LLC. All rights reserved. 7 | // 8 | 9 | #import "CatApp.h" 10 | #import "CatViewController.h" 11 | #import "GDMenuItem.h" 12 | #import "GDRoute.h" 13 | #import "UIStoryboard+QuickFetch.h" 14 | 15 | @implementation CatApp 16 | 17 | static NSString *const StoryboardName = @"Main"; 18 | static NSString *const ViewControllerIdentifier = @"CatViewController"; 19 | static NSString *const MenuItemTitle = @"CATS"; 20 | 21 | + (UINavigationController *)baseNavigationController 22 | { 23 | return [[UINavigationController alloc] initWithRootViewController:[UIStoryboard instantiateViewControllerWithIdentifier:ViewControllerIdentifier andStoryboardName:StoryboardName]]; 24 | } 25 | 26 | + (NSArray *)menuItems 27 | { 28 | GDMenuItem *menuItem = [[GDMenuItem alloc] initWithTitle:MenuItemTitle andIconImageName:nil]; 29 | return @[menuItem]; 30 | } 31 | 32 | + (NSDictionary *)routesToRegister 33 | { 34 | GDRoute *route = [GDRoute routeWithURLString:[NSString stringWithFormat:@"/%@", ViewControllerIdentifier] andAction: ^BOOL (id routingDelegate, NSString *urlString, NSDictionary *parameters) { 35 | [routingDelegate pushRoutedViewController:[UIStoryboard instantiateViewControllerWithIdentifier:ViewControllerIdentifier andStoryboardName:StoryboardName] animated:YES parameters:nil]; 36 | return YES; 37 | }]; 38 | 39 | NSDictionary *routeDictionary = @{ViewControllerIdentifier : route}; 40 | return routeDictionary; 41 | } 42 | 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /GDRouting-Example/GDRouting-Example/GDRouting-Example-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleURLTypes 6 | 7 | 8 | CFBundleURLSchemes 9 | 10 | gdrouting 11 | 12 | CFBundleURLName 13 | com.godaddy-os.gdrouting 14 | 15 | 16 | CFBundleDevelopmentRegion 17 | en 18 | CFBundleDisplayName 19 | ${PRODUCT_NAME} 20 | CFBundleExecutable 21 | ${EXECUTABLE_NAME} 22 | CFBundleIdentifier 23 | com.godaddy-os.${PRODUCT_NAME:rfc1034identifier} 24 | CFBundleInfoDictionaryVersion 25 | 6.0 26 | CFBundleName 27 | ${PRODUCT_NAME} 28 | CFBundlePackageType 29 | APPL 30 | CFBundleShortVersionString 31 | 1.0 32 | CFBundleSignature 33 | ???? 34 | CFBundleVersion 35 | 1.0 36 | LSRequiresIPhoneOS 37 | 38 | UIMainStoryboardFile 39 | Main 40 | UIRequiredDeviceCapabilities 41 | 42 | armv7 43 | 44 | UISupportedInterfaceOrientations 45 | 46 | UIInterfaceOrientationPortrait 47 | UIInterfaceOrientationLandscapeLeft 48 | UIInterfaceOrientationLandscapeRight 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /GDRouting-Example/GDRouting-Example.xcworkspace/xcshareddata/GDRouting-Example.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | EC9871F7-A669-407D-8292-A5FCB7323A1F 9 | IDESourceControlProjectName 10 | GDRouting-Example 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 21F3EC16-301D-4B49-BDF9-CF65FA047BC8 14 | ssh://github.com/godaddy/GDRouting.git 15 | 16 | IDESourceControlProjectPath 17 | GDRouting-Example/GDRouting-Example.xcworkspace 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 21F3EC16-301D-4B49-BDF9-CF65FA047BC8 21 | ../.. 22 | 23 | IDESourceControlProjectURL 24 | ssh://github.com/godaddy/GDRouting.git 25 | IDESourceControlProjectVersion 26 | 110 27 | IDESourceControlProjectWCCIdentifier 28 | 21F3EC16-301D-4B49-BDF9-CF65FA047BC8 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 21F3EC16-301D-4B49-BDF9-CF65FA047BC8 36 | IDESourceControlWCCName 37 | GDRouting 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /GDRouting-Example/Pods/FastCoding/FastCoder/FastCoder.h: -------------------------------------------------------------------------------- 1 | // 2 | // FastCoding.h 3 | // 4 | // Version 2.1.8 5 | // 6 | // Created by Nick Lockwood on 09/12/2013. 7 | // Copyright (c) 2013 Charcoal Design 8 | // 9 | // Distributed under the permissive zlib License 10 | // Get the latest version from here: 11 | // 12 | // https://github.com/nicklockwood/FastCoding 13 | // 14 | // This software is provided 'as-is', without any express or implied 15 | // warranty. In no event will the authors be held liable for any damages 16 | // arising from the use of this software. 17 | // 18 | // Permission is granted to anyone to use this software for any purpose, 19 | // including commercial applications, and to alter it and redistribute it 20 | // freely, subject to the following restrictions: 21 | // 22 | // 1. The origin of this software must not be misrepresented; you must not 23 | // claim that you wrote the original software. If you use this software 24 | // in a product, an acknowledgment in the product documentation would be 25 | // appreciated but is not required. 26 | // 27 | // 2. Altered source versions must be plainly marked as such, and must not be 28 | // misrepresented as being the original software. 29 | // 30 | // 3. This notice may not be removed or altered from any source distribution. 31 | // 32 | 33 | 34 | #import 35 | 36 | 37 | extern NSString *const FastCodingException; 38 | 39 | 40 | @interface NSObject (FastCoding) 41 | 42 | + (NSArray *)fastCodingKeys; 43 | - (id)awakeAfterFastCoding; 44 | - (Class)classForFastCoding; 45 | 46 | @end 47 | 48 | 49 | @interface FastCoder : NSObject 50 | 51 | + (id)objectWithData:(NSData *)data; 52 | + (NSData *)dataWithRootObject:(id)object; 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /GDRouting/GDTableDataModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // GDTableDataModel.m 3 | // GDRouting-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/6/14. 6 | // Copyright (c) 2014 Go Daddy Operating Company, LLC. All rights reserved. 7 | // 8 | 9 | #import "GDTableDataModel.h" 10 | 11 | @implementation GDTableDataModel 12 | 13 | - (instancetype)init 14 | { 15 | self = [super init]; 16 | if( self != nil ) 17 | { 18 | _dataArray = [[NSMutableArray alloc] init]; 19 | _headerArray = [[NSMutableArray alloc] init]; 20 | } 21 | 22 | return self; 23 | } 24 | 25 | - (instancetype)initWithDataArray:(NSMutableArray *)inDataArray andHeaderArray:(NSMutableArray *)inHeaderArray 26 | { 27 | self = [self init]; 28 | if( self != nil ) 29 | { 30 | [_dataArray setArray:inDataArray]; 31 | [_headerArray setArray:inHeaderArray]; 32 | } 33 | return self; 34 | } 35 | 36 | - (id) objectInDataArrayAtIndexPath:(NSIndexPath *)inIndexPath 37 | { 38 | id returnObject = nil; 39 | if( inIndexPath.section < self.dataArray.count ) 40 | { 41 | NSArray *rowArray = self.dataArray[inIndexPath.section]; 42 | if( inIndexPath.row < rowArray.count ) 43 | { 44 | returnObject = rowArray[inIndexPath.row]; 45 | } 46 | } 47 | return returnObject; 48 | } 49 | 50 | - (id) objectInHeaderArrayAtPath:(NSIndexPath *)inIndexPath 51 | { 52 | id returnObject = nil; 53 | if( inIndexPath.section < self.headerArray.count ) 54 | { 55 | NSArray *rowArray = self.headerArray[inIndexPath.section]; 56 | if( inIndexPath.row < rowArray.count ) 57 | { 58 | returnObject = rowArray[inIndexPath.row]; 59 | } 60 | } 61 | return returnObject; 62 | } 63 | 64 | @end 65 | -------------------------------------------------------------------------------- /GDRouting-Example/GDRouting-Example.xcodeproj/project.xcworkspace/xcshareddata/GDRouting-Example.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | E6335399-41E4-45F2-91F6-7A9808CFBDCE 9 | IDESourceControlProjectName 10 | GDRouting-Example 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 21F3EC16-301D-4B49-BDF9-CF65FA047BC8 14 | ssh://github.com/godaddy/GDRouting.git 15 | 16 | IDESourceControlProjectPath 17 | GDRouting-Example/GDRouting-Example.xcodeproj/project.xcworkspace 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 21F3EC16-301D-4B49-BDF9-CF65FA047BC8 21 | ../../.. 22 | 23 | IDESourceControlProjectURL 24 | ssh://github.com/godaddy/GDRouting.git 25 | IDESourceControlProjectVersion 26 | 110 27 | IDESourceControlProjectWCCIdentifier 28 | 21F3EC16-301D-4B49-BDF9-CF65FA047BC8 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 21F3EC16-301D-4B49-BDF9-CF65FA047BC8 36 | IDESourceControlWCCName 37 | GDRouting 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /GDRouting/GDMenuItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // GDMenuItem.h 3 | // GDRouting-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/1/14. 6 | // Copyright (c) 2014 Go Daddy Operating Company, LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface GDMenuItem : NSObject 12 | 13 | /** 14 | * Title of the menu item 15 | */ 16 | @property (nonatomic, strong) NSString *title; 17 | 18 | /** 19 | * Associated image displayed in the menu item cell 20 | */ 21 | @property (nonatomic, strong) NSString *iconImageName; 22 | 23 | /** 24 | * Section header of the menu item 25 | */ 26 | @property (nonatomic, strong) NSString *sectionTitle; 27 | 28 | /** 29 | * Order the menu item should be displayed in 30 | */ 31 | @property (nonatomic) NSInteger displayOrder; 32 | 33 | /** 34 | * Constructor for GDMenuItem 35 | * 36 | * @param inTitle - Title of the menu item 37 | * @param inIconImageName - Associated image displayed in the menu item cell 38 | * 39 | * @return GDMenuItem instance 40 | */ 41 | - (instancetype) initWithTitle:(NSString *)inTitle andIconImageName:(NSString *)inIconImageName; 42 | 43 | /** 44 | * Constructor for GDMenuItem 45 | * 46 | * @param inTitle - Title of the menu item 47 | * @param inDisplayOrder - Display order of the menu item 48 | * 49 | * @return GDMenuItem instance 50 | */ 51 | - (instancetype) initWithTitle:(NSString *)inTitle andDisplayOrder:(NSInteger)inDisplayOrder; 52 | 53 | /** 54 | * Constructor for GDMenuItem 55 | * 56 | * @param inTitle - Title of the menu item 57 | * @param inDisplayOrder - Display order of the menu item 58 | * @param inIconImageName - Associated image displayed in the menu item cell 59 | * 60 | * @return GDMenuItem instance 61 | */ 62 | - (instancetype) initWithTitle:(NSString *)inTitle andDisplayOrder:(NSInteger)inDisplayOrder andIconImageName:(NSString *)inIconImageName; 63 | 64 | @end 65 | -------------------------------------------------------------------------------- /GDRouting/GDAppManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // GDAppManager.h 3 | // GDRouting-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/6/14. 6 | // Copyright (c) 2014 Go Daddy Operating Company, LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "GDRoute.h" 11 | 12 | /** 13 | * GDAppManager is used to get all GDRoutes and GDMenuItems configured in the application. Also has a method to register routes with JLRoutes. 14 | */ 15 | @interface GDAppManager : NSObject 16 | 17 | /** 18 | * Array of GDUsableApp objects used to configure GDRoutes and GDMenuItems. 19 | */ 20 | @property(nonatomic, strong, readonly) NSArray *usableAppArray; 21 | 22 | /** 23 | * Constructor that takes in an array of UsableApps 24 | * 25 | * @param inUsableAppArray - Array of UsableApps 26 | * 27 | * @return Instance of GDAppManager 28 | */ 29 | - (instancetype)initWithUsableAppArray:(NSArray *)inUsableAppArray; 30 | 31 | /** 32 | * Returns an array of all GDMenuItems configured in the app 33 | * 34 | * @return Array of all GDMenuItems configured in the app 35 | */ 36 | - (NSArray *)getGDMenuItemsForApps; 37 | 38 | /** 39 | * Returns an array of all GDRoutes configured in the app 40 | * 41 | * @return Array of all GDRoutes configured in the app 42 | */ 43 | - (NSArray *)getGDRouteArrayForApps; 44 | 45 | /** 46 | * Returns a dictionary of all GDRoutes configured in the app. The dictionary key can be used to fetch routes they may not have associated a GDMenuItem. 47 | * 48 | * @return NSDictionary of all GDRoutes configured in the app. 49 | */ 50 | - (NSDictionary *)getGDRouteDictionaryForApps; 51 | 52 | /** 53 | * Loops though all GDRoutes configured in the app and registers them with JLRoutes 54 | * 55 | * @param inDelegate - GDRoutingDelegate delegate that is used to push/pop/present a view controller 56 | * 57 | * @return returns YES if a route was registered, NO otherwise 58 | */ 59 | - (BOOL)registerRoutesForAppsWithRoutingDelegate:(id)inDelegate; 60 | 61 | 62 | @end 63 | -------------------------------------------------------------------------------- /GDRouting/GDTableDataModelObject.h: -------------------------------------------------------------------------------- 1 | // 2 | // GDTableDataModelObject.h 3 | // GDRouting-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/6/14. 6 | // Copyright (c) 2014 Go Daddy Operating Company, LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /** 12 | * Selection block for when the index path for the associated GDTableDataModelObject is selected 13 | * 14 | * @param Parameter dictionary passed to the block 15 | * 16 | * @return Returns YES if block was called 17 | */ 18 | typedef BOOL (^GDTableDataModelSelectedBlock)(NSDictionary *); 19 | 20 | /** 21 | * GDTableDataModelObject is an object which provides a table view information about the cell it is associated with 22 | */ 23 | @interface GDTableDataModelObject : NSObject 24 | 25 | /** 26 | * Dictionary of paramaters describing the associated table cell 27 | */ 28 | @property(nonatomic, strong, readonly) NSMutableDictionary *parameterDictionary; 29 | 30 | /** 31 | * Selection block for when the index path for the associated GDTableDataModelObject is selected 32 | */ 33 | @property(nonatomic, strong) GDTableDataModelSelectedBlock selectedBlock; 34 | 35 | /** 36 | * Constructor taking a parameter dictionary as an argument 37 | * 38 | * @param inDictionary - Dictionary of paramaters describing the associated table cell 39 | * 40 | * @return Instance of GDTableDataModelObject 41 | */ 42 | - (instancetype)initWithParameterDictionary:(NSDictionary *)inDictionary; 43 | 44 | /** 45 | * Constructor taking a parameter dictionary and a selection block as arguments 46 | * 47 | * @param inDictionary - Dictionary of paramaters describing the associated table cell 48 | * @param inSelectedBlock - Selection block for when the index path for the associated GDTableDataModelObject is selected 49 | * 50 | * @return Instance of GDTableDataModelObject 51 | */ 52 | - (instancetype)initWithParameterDictionary:(NSDictionary *)inDictionary andSelectedBlock:(GDTableDataModelSelectedBlock)inSelectedBlock; 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /GDRouting/NSObject+FastCoder.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+FastCoder.m 3 | // Go Daddy Operating Company, LLCDomainBuy 4 | // 5 | // Created by Jonah G. Neugass on 2/21/14. 6 | // 7 | // 8 | 9 | #import "FastCoder.h" 10 | #import "NSObject+FastCoder.h" 11 | 12 | @implementation NSObject (FastCoder) 13 | 14 | + (NSString *)documentsDirectory 15 | { 16 | return [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) firstObject]; 17 | } 18 | 19 | + (NSObject *)readArchiveFile:(NSString *)inFileName; 20 | { 21 | NSString *path = [[self documentsDirectory] stringByAppendingPathComponent:inFileName]; 22 | @try 23 | { 24 | NSData *data = [NSData dataWithContentsOfFile:path]; 25 | NSObject *returnObject = [FastCoder objectWithData:data]; 26 | return returnObject; 27 | } 28 | @catch (NSException *exception) 29 | { 30 | NSLog(@"File %@ read operation threw an exception:%@", path, exception.reason); 31 | } 32 | } 33 | 34 | + (void)archiveFile:(NSString *)inFileName inObject:(NSObject *)inObject; 35 | { 36 | NSString *path = [[[self class] documentsDirectory] stringByAppendingPathComponent:inFileName]; 37 | 38 | @try 39 | { 40 | NSData *data = [FastCoder dataWithRootObject:inObject]; 41 | [data writeToFile:path atomically:YES]; 42 | } 43 | @catch (NSException *exception) 44 | { 45 | NSLog(@"File %@ write operation threw an exception:%@", path, exception.reason); 46 | } 47 | } 48 | 49 | + (void)deleteFile:(NSString *)inFileName; 50 | { 51 | NSFileManager *fileMgr = [NSFileManager defaultManager]; 52 | NSString *path = [[self documentsDirectory] stringByAppendingPathComponent:inFileName]; 53 | 54 | @try 55 | { 56 | NSError *error; 57 | if ([fileMgr fileExistsAtPath:path] && [fileMgr removeItemAtPath:path error:&error] != YES) 58 | { 59 | NSLog(@"Unable to delete file: %@", [error localizedDescription]); 60 | } 61 | } 62 | @catch (NSException *exception) 63 | { 64 | NSLog(@"File %@ delete operation threw an exception:%@", path, exception.reason); 65 | } 66 | } 67 | 68 | @end 69 | -------------------------------------------------------------------------------- /GDRouting-Example/Pods/Pods.xcodeproj/xcuserdata/jneugass.xcuserdatad/xcschemes/Pods.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 42 | 43 | 44 | 45 | 51 | 52 | 54 | 55 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /GDRouting-Example/Pods/Pods.xcodeproj/xcuserdata/jneugass.xcuserdatad/xcschemes/Pods-JLRoutes.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 42 | 43 | 44 | 45 | 51 | 52 | 54 | 55 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /GDRouting-Example/Pods/Pods.xcodeproj/xcuserdata/jneugass.xcuserdatad/xcschemes/Pods-FastCoding.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 42 | 43 | 44 | 45 | 51 | 52 | 54 | 55 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /GDRouting-Example/Pods/Pods.xcodeproj/xcuserdata/jneugass.xcuserdatad/xcschemes/Pods-TheSidebarController.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 42 | 43 | 44 | 45 | 51 | 52 | 54 | 55 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /GDRouting-Example/GDRouting-ExampleTests/GDAppConfigurationTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // GDAppConfigurationTests.m 3 | // GDRouting-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/7/14. 6 | // Copyright (c) 2014 Go Daddy Operating Company, LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "GDAppConfiguration.h" 11 | #import "GDUsableApp.h" 12 | 13 | @interface GDAppConfigurationTests : XCTestCase 14 | 15 | @end 16 | 17 | @implementation GDAppConfigurationTests 18 | 19 | - (void)setUp 20 | { 21 | [super setUp]; 22 | // Put setup code here. This method is called before the invocation of each test method in the class. 23 | } 24 | 25 | - (void)tearDown 26 | { 27 | // Put teardown code here. This method is called after the invocation of each test method in the class. 28 | [super tearDown]; 29 | } 30 | 31 | - (void)testArchiving 32 | { 33 | GDAppConfiguration *appConfiguration = [[GDAppConfiguration alloc] init]; 34 | [appConfiguration archiveObject]; 35 | 36 | GDAppConfiguration *archivedConfiguration = (GDAppConfiguration *)[GDAppConfiguration readArchivedObject]; 37 | XCTAssertNotNil(archivedConfiguration, @"GDAppConfiguration not archived correctly"); 38 | 39 | [GDAppConfiguration deleteArchivedObject]; 40 | archivedConfiguration = (GDAppConfiguration *)[GDAppConfiguration readArchivedObject]; 41 | XCTAssertNil(archivedConfiguration, @"GDAppConfiguration not deleted correctly"); 42 | } 43 | 44 | - (void)testUsableAppArraySort 45 | { 46 | GDUsableApp *app1 = [[GDUsableApp alloc] init]; 47 | app1.appName = @"app1"; 48 | app1.displayOrder = 1; 49 | 50 | GDUsableApp *app0 = [[GDUsableApp alloc] init]; 51 | app0.appName = @"app0"; 52 | app0.displayOrder = 0; 53 | 54 | NSArray *apps = @[app1, app0]; 55 | 56 | GDAppConfiguration *appConfiguration = [[GDAppConfiguration alloc] init]; 57 | appConfiguration.usableAppArray = apps; 58 | 59 | GDUsableApp *firstApp = [appConfiguration.usableAppArray firstObject]; 60 | XCTAssertEqual(firstApp.displayOrder, 0, @"UsableAppArray not sorted correctly"); 61 | 62 | } 63 | 64 | - (void)testBaseAppURLString 65 | { 66 | GDAppConfiguration *config = [[GDAppConfiguration alloc] init]; 67 | XCTAssertTrue([config.baseCallbackURLString isEqualToString:@"gdrouting"], @"BaseURL string is wrong"); 68 | 69 | } 70 | 71 | @end 72 | -------------------------------------------------------------------------------- /GDRouting-Example/GDRouting-Example/Classes/MainMenuTableDataModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // MainMenuTableDataModel.m 3 | // GDDiscovery-MainMenu-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/7/14. 6 | // Copyright (c) 2014 Go Daddy Operating Company, LLC. All rights reserved. 7 | // 8 | 9 | #import "MainMenuTableDataModel.h" 10 | #import "GDTableDataModelObject.h" 11 | #import "GDMenuItem.h" 12 | #import "GDRoute.h" 13 | #import "GDEnums.h" 14 | 15 | @implementation MainMenuTableDataModel 16 | 17 | NSString * const MainMenuTableCellIdentifier = @"MainMenuTableCell"; 18 | NSString * const MainMenuTableHeaderCellIdentifier = @"MainMenuTableHeaderCell"; 19 | 20 | - (instancetype)initWithMenuItemArray:(NSArray *)inMenuItemArray andRouteArray:(NSArray *)inRouteArray andBaseAppURLString:(NSString *)inBaseAppURLString 21 | { 22 | self = [super init]; 23 | if (self) 24 | { 25 | NSMutableArray *section0Array = [[NSMutableArray alloc] init]; 26 | for( int i = 0; i < inMenuItemArray.count; i++ ) 27 | { 28 | GDMenuItem *item = inMenuItemArray[i]; 29 | GDRoute *route = inRouteArray[i]; 30 | if( item.sectionTitle != nil ) 31 | { 32 | NSDictionary *parameterDictionary = @{@(GDCellConfigKeyTitle) : item.sectionTitle, @(GDCellConfigKeyCellIdentifier) : MainMenuTableHeaderCellIdentifier }; 33 | GDTableDataModelObject *modelObject = [[GDTableDataModelObject alloc] initWithParameterDictionary:parameterDictionary]; 34 | [section0Array addObject:modelObject]; 35 | } 36 | 37 | NSDictionary *parameterDictionary = @{@(GDCellConfigKeyTitle): item.title, @(GDCellConfigKeyCellIdentifier) : MainMenuTableCellIdentifier }; 38 | GDTableDataModelSelectedBlock selectedBlock = ^BOOL(NSDictionary *properties) 39 | { 40 | NSURL *url = [route urlWithBaseAppURLString:inBaseAppURLString]; 41 | [[UIApplication sharedApplication] openURL:url]; 42 | return YES; 43 | }; 44 | GDTableDataModelObject *modelObject = [[GDTableDataModelObject alloc] initWithParameterDictionary:parameterDictionary andSelectedBlock:selectedBlock]; 45 | [section0Array addObject:modelObject]; 46 | 47 | } 48 | [self.dataArray addObject:section0Array]; 49 | } 50 | return self; 51 | } 52 | 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /GDRouting-Example/GDRouting-ExampleTests/GDTableDataModelObjectTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // GDTableDataModelObjectTests.m 3 | // GDRouting-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/6/14. 6 | // Copyright (c) 2014 Go Daddy Operating Company, LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "GDTableDataModelObject.h" 11 | 12 | @interface GDTableDataModelObjectTests : XCTestCase 13 | 14 | @end 15 | 16 | @implementation GDTableDataModelObjectTests 17 | 18 | - (void)setUp 19 | { 20 | [super setUp]; 21 | // Put setup code here. This method is called before the invocation of each test method in the class. 22 | } 23 | 24 | - (void)tearDown 25 | { 26 | // Put teardown code here. This method is called after the invocation of each test method in the class. 27 | [super tearDown]; 28 | } 29 | 30 | - (void)testTableDataModelInit 31 | { 32 | GDTableDataModelObject *object = [[GDTableDataModelObject alloc] init]; 33 | XCTAssertNotNil(object.parameterDictionary, @"Parameter dictionary is nil"); 34 | } 35 | 36 | - (void)testTableDataModelInitWithDictonary 37 | { 38 | NSDictionary *dictionary = @{@"test" : @"test"}; 39 | GDTableDataModelObject *object = [[GDTableDataModelObject alloc] initWithParameterDictionary:dictionary]; 40 | 41 | XCTAssertNotNil(object.parameterDictionary, @"Parameter dictionary is nil"); 42 | XCTAssertTrue(object.parameterDictionary.count == 1, @"Parameter dictionary is empty"); 43 | 44 | GDTableDataModelSelectedBlock selectedBlock = ^BOOL(NSDictionary *parameters){ 45 | return YES; 46 | }; 47 | 48 | object.selectedBlock = selectedBlock; 49 | 50 | XCTAssertTrue(selectedBlock(nil), @"Block didn't execute correctly"); 51 | } 52 | 53 | - (void)testTableDataModelInitWithDictonaryAndSelectedBlock 54 | { 55 | NSDictionary *dictionary = @{@"test" : @"test"}; 56 | GDTableDataModelSelectedBlock selectedBlock = ^BOOL(NSDictionary *parameters){ 57 | return YES; 58 | }; 59 | 60 | GDTableDataModelObject *object = [[GDTableDataModelObject alloc] initWithParameterDictionary:dictionary andSelectedBlock:selectedBlock]; 61 | 62 | XCTAssertNotNil(object.parameterDictionary, @"Parameter dictionary is nil"); 63 | XCTAssertTrue(object.parameterDictionary.count == 1, @"Parameter dictionary is empty"); 64 | XCTAssertTrue(selectedBlock(nil), @"Block didn't execute correctly"); 65 | } 66 | 67 | @end 68 | -------------------------------------------------------------------------------- /GDRouting-Example/GDRouting-ExampleTests/GDAppManagerTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // GDAppManagerTests.m 3 | // GDRouting-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/6/14. 6 | // Copyright (c) 2014 Go Daddy Operating Company, LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "GDAppManager.h" 11 | #import "GDUsableApp.h" 12 | 13 | @interface GDAppManagerTests : XCTestCase 14 | 15 | @end 16 | 17 | @implementation GDAppManagerTests 18 | 19 | - (void)setUp 20 | { 21 | [super setUp]; 22 | // Put setup code here. This method is called before the invocation of each test method in the class. 23 | } 24 | 25 | - (void)tearDown 26 | { 27 | // Put teardown code here. This method is called after the invocation of each test method in the class. 28 | [super tearDown]; 29 | } 30 | 31 | - (void)testGetMenuItems 32 | { 33 | GDUsableApp *usableApp = [[GDUsableApp alloc] init]; 34 | usableApp.appName = @"GDSharedApp"; 35 | usableApp.displayOrder = 0; 36 | GDAppManager *appManager = [[GDAppManager alloc] initWithUsableAppArray:@[usableApp]]; 37 | NSArray *menuItemArray = [appManager getGDMenuItemsForApps]; 38 | XCTAssertTrue(menuItemArray.count > 0, @"MenuItemArray count is 0"); 39 | } 40 | 41 | - (void)testGetRouteArray 42 | { 43 | GDUsableApp *usableApp = [[GDUsableApp alloc] init]; 44 | usableApp.appName = @"GDSharedApp"; 45 | usableApp.displayOrder = 0; 46 | GDAppManager *appManager = [[GDAppManager alloc] initWithUsableAppArray:@[usableApp]]; 47 | NSArray *routeArray = [appManager getGDRouteArrayForApps]; 48 | XCTAssertTrue(routeArray.count > 0, @"routeArray count is 0"); 49 | } 50 | 51 | - (void)testRegisterRoutes 52 | { 53 | GDUsableApp *usableApp = [[GDUsableApp alloc] init]; 54 | usableApp.appName = @"GDSharedApp"; 55 | usableApp.displayOrder = 0; 56 | GDAppManager *appManager = [[GDAppManager alloc] initWithUsableAppArray:@[usableApp]]; 57 | BOOL registeredRoutes = [appManager registerRoutesForAppsWithRoutingDelegate:nil]; 58 | XCTAssertTrue(registeredRoutes, @"Routes not registered successfully"); 59 | } 60 | 61 | - (void)testGetRouteDictionary 62 | { 63 | GDUsableApp *usableApp = [[GDUsableApp alloc] init]; 64 | usableApp.appName = @"GDSharedApp"; 65 | usableApp.displayOrder = 0; 66 | GDAppManager *appManager = [[GDAppManager alloc] initWithUsableAppArray:@[usableApp]]; 67 | NSDictionary *routeDictionary = [appManager getGDRouteDictionaryForApps]; 68 | XCTAssertTrue(routeDictionary.count > 0, @"routeDictionary count is 0"); 69 | } 70 | @end 71 | -------------------------------------------------------------------------------- /GDRouting-Example/GDRouting-Example/Classes/DogApp.m: -------------------------------------------------------------------------------- 1 | // 2 | // DogApp.m 3 | // GDDiscovery-MainMenu-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/14/14. 6 | // Copyright (c) 2014 Go Daddy Operating Company, LLC. All rights reserved. 7 | // 8 | 9 | #import "DogApp.h" 10 | #import "GDMenuItem.h" 11 | #import "GDRoute.h" 12 | #import "DogViewController.h" 13 | #import "UIStoryboard+QuickFetch.h" 14 | 15 | @implementation DogApp 16 | 17 | static NSString *const StoryboardName = @"Main"; 18 | static NSString *const ViewControllerIdentifier = @"DogViewController"; 19 | static NSString *const MoarDogViewControllerIdentifier = @"MoarDogViewController"; 20 | static NSString *const MenuItemTitle = @"DOGS"; 21 | static NSString *const MoarMenuItemTitle = @"MOAR DOGS"; 22 | static NSString *const SectionTitle = @"WOOF"; 23 | 24 | + (UINavigationController *)baseNavigationController 25 | { 26 | return [[UINavigationController alloc] initWithRootViewController:[UIStoryboard instantiateViewControllerWithIdentifier:ViewControllerIdentifier andStoryboardName:StoryboardName]]; 27 | } 28 | 29 | + (NSArray *)menuItems 30 | { 31 | GDMenuItem *menuItem = [[GDMenuItem alloc] initWithTitle:MenuItemTitle andDisplayOrder:0]; 32 | menuItem.sectionTitle = SectionTitle; 33 | GDMenuItem *secondItem = [[GDMenuItem alloc] initWithTitle:MoarMenuItemTitle andDisplayOrder:1]; 34 | return @[secondItem, menuItem]; 35 | } 36 | 37 | + (NSDictionary *)routesToRegister 38 | { 39 | GDRoute *route = [GDRoute routeWithURLString:[NSString stringWithFormat:@"/%@", ViewControllerIdentifier] andDisplayOrder:0 andAction: ^BOOL (id routingDelegate, NSString *urlString, NSDictionary *parameters) { 40 | UINavigationController *navController = [DogApp baseNavigationController]; 41 | [routingDelegate presentRoutedViewController:navController animated:YES parameters:nil]; 42 | return YES; 43 | }]; 44 | 45 | GDRoute *secondRoute = [GDRoute routeWithURLString:[NSString stringWithFormat:@"/%@", MoarDogViewControllerIdentifier] andDisplayOrder:1 andAction: ^BOOL (id routingDelegate, NSString *urlString, NSDictionary *parameters) { 46 | 47 | UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:[UIStoryboard instantiateViewControllerWithIdentifier:MoarDogViewControllerIdentifier andStoryboardName:StoryboardName]]; 48 | [routingDelegate presentRoutedViewController:navController animated:YES parameters:nil]; 49 | return YES; 50 | }]; 51 | 52 | NSDictionary *routeDictionary = @{ViewControllerIdentifier : route, MoarDogViewControllerIdentifier : secondRoute}; 53 | return routeDictionary; 54 | } 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /GDRouting-Example/GDRouting-ExampleTests/GDRouteTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // GDRouteTests.m 3 | // GDRouting-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/6/14. 6 | // Copyright (c) 2014 Go Daddy Operating Company, LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "GDRoute.h" 11 | 12 | #pragma mark - dummy routing delegate 13 | @interface DummyRoutingDelegate : NSObject 14 | 15 | @end 16 | 17 | @implementation DummyRoutingDelegate 18 | 19 | -(void) pushRoutedViewController:(UIViewController *)viewController animated:(BOOL)animated parameters:(NSDictionary *)parameters 20 | { 21 | 22 | } 23 | 24 | @end; 25 | 26 | #pragma mark - start of tests 27 | @interface GDRouteTests : XCTestCase 28 | 29 | @end 30 | 31 | @implementation GDRouteTests 32 | 33 | - (void)setUp 34 | { 35 | [super setUp]; 36 | // Put setup code here. This method is called before the invocation of each test method in the class. 37 | } 38 | 39 | - (void)tearDown 40 | { 41 | // Put teardown code here. This method is called after the invocation of each test method in the class. 42 | [super tearDown]; 43 | } 44 | 45 | - (void)testRouteInitialization 46 | { 47 | DummyRoutingDelegate *dummyDelegate = [[DummyRoutingDelegate alloc] init]; 48 | 49 | __block id blockDelegate; 50 | __block NSString *blockUrlString; 51 | __block NSDictionary *blockParameters; 52 | 53 | id initialDelegate = dummyDelegate; 54 | NSString *initialUrlString = @"testString"; 55 | NSDictionary *initialParameters = @{@"testKey": @"testValue"}; 56 | GDRoutingBlock initialRoutingBlock = ^BOOL(id delegate, NSString *urlString, NSDictionary *parameters) { 57 | blockDelegate = delegate; 58 | blockUrlString = urlString; 59 | blockParameters = parameters; 60 | return YES; 61 | }; 62 | 63 | GDRoute *route = [GDRoute routeWithURLString:@"testString" andAction:initialRoutingBlock]; 64 | 65 | BOOL routingBlockResult = initialRoutingBlock(initialDelegate, initialUrlString, initialParameters); 66 | 67 | //compare url strings 68 | XCTAssertTrue(routingBlockResult, @"RoutingBlockResult returned a NO"); 69 | XCTAssertTrue([initialUrlString isEqualToString:route.urlString], @"Route urlString doesn't match"); 70 | XCTAssertTrue([initialUrlString isEqualToString:blockUrlString], @"Block urlString doesn't match"); 71 | 72 | //compare block parameters 73 | XCTAssertEqual(blockParameters.count, 1, @"BlockParamaters has the wrong key count"); 74 | 75 | //compare block 76 | XCTAssertEqual(initialRoutingBlock, route.routingBlock, @"BlockParamaters has the wrong key count"); 77 | } 78 | 79 | @end 80 | -------------------------------------------------------------------------------- /GDRouting-Example/Pods/TheSidebarController/TheSidebarController/Animations/SidebarAnimation.h: -------------------------------------------------------------------------------- 1 | // SidebarAnimation.h 2 | // TheSidebarController 3 | // 4 | // Copyright (c) 2014 Jon Danao (danao.org | jondanao) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import 25 | #import 26 | 27 | #define DEG2RAD(degrees) (degrees * M_PI / 180) 28 | #define SIDEBAR_ANIMATIONS \ 29 | @"SidebarFacebookAnimation", \ 30 | @"SidebarAirbnbAnimation", \ 31 | @"SidebarLuvocracyAnimation", \ 32 | @"SidebarFeedlyAnimation", \ 33 | @"SidebarFlipboardAnimation", \ 34 | @"SidebarWunderlistAnimation" 35 | 36 | 37 | typedef NS_ENUM(NSInteger, SidebarTransitionStyle) 38 | { 39 | SidebarTransitionStyleFacebook, 40 | SidebarTransitionStyleAirbnb, 41 | SidebarTransitionStyleLuvocracy, 42 | SidebarTransitionStyleFeedly, 43 | SidebarTransitionStyleFlipboard, 44 | SidebarTransitionStyleWunderlist 45 | }; 46 | 47 | typedef NS_ENUM(NSInteger, Side) 48 | { 49 | LeftSide, 50 | RightSide, 51 | }; 52 | 53 | 54 | @class SidebarAnimation; 55 | @interface SidebarAnimation : NSObject 56 | 57 | + (void)animateContentView:(UIView *)contentView 58 | sidebarView:(UIView *)sidebarView 59 | fromSide:(Side)side 60 | visibleWidth:(CGFloat)visibleWidth 61 | duration:(NSTimeInterval)animationDuration 62 | completion:(void (^)(BOOL finished))completion; 63 | 64 | + (void)reverseAnimateContentView:(UIView *)contentView 65 | sidebarView:(UIView *)sidebarView 66 | fromSide:(Side)side 67 | visibleWidth:(CGFloat)visibleWidth 68 | duration:(NSTimeInterval)animationDuration 69 | completion:(void (^)(BOOL finished))completion; 70 | 71 | + (void)resetSidebarPosition:(UIView *)sidebarView; 72 | + (void)resetContentPosition:(UIView *)contentView; 73 | 74 | @end 75 | -------------------------------------------------------------------------------- /GDRouting-Example/Pods/TheSidebarController/TheSidebarController/Animations/SidebarFacebookAnimation.m: -------------------------------------------------------------------------------- 1 | // SidebarFacebookAnimation.m 2 | // TheSidebarController 3 | // 4 | // Copyright (c) 2014 Jon Danao (danao.org | jondanao) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | 25 | #import "SidebarFacebookAnimation.h" 26 | 27 | @implementation SidebarFacebookAnimation 28 | 29 | + (void)animateContentView:(UIView *)contentView sidebarView:(UIView *)sidebarView fromSide:(Side)side visibleWidth:(CGFloat)visibleWidth duration:(NSTimeInterval)animationDuration completion:(void (^)(BOOL))completion 30 | { 31 | [self resetSidebarPosition:sidebarView]; 32 | [self resetContentPosition:contentView]; 33 | 34 | 35 | CGRect contentFrame = contentView.frame; 36 | 37 | if(side == LeftSide) 38 | { 39 | contentFrame.origin.x += visibleWidth; 40 | } 41 | else 42 | { 43 | contentFrame.origin.x -= visibleWidth; 44 | } 45 | 46 | [UIView animateWithDuration:animationDuration 47 | delay:0.0 48 | options:UIViewAnimationOptionCurveEaseInOut 49 | animations:^{ 50 | contentView.frame = contentFrame; 51 | } 52 | completion:^(BOOL finished) { 53 | completion(finished); 54 | }]; 55 | } 56 | 57 | 58 | + (void)reverseAnimateContentView:(UIView *)contentView sidebarView:(UIView *)sidebarView fromSide:(Side)side visibleWidth:(CGFloat)visibleWidth duration:(NSTimeInterval)animationDuration completion:(void (^)(BOOL))completion 59 | { 60 | CGRect contentFrame = contentView.frame; 61 | contentFrame.origin.x = 0; 62 | 63 | [UIView animateWithDuration:animationDuration 64 | delay:0.0 65 | options:UIViewAnimationOptionCurveEaseInOut 66 | animations:^{ 67 | contentView.frame = contentFrame; 68 | } 69 | completion:^(BOOL finished) { 70 | completion(finished); 71 | }]; 72 | } 73 | 74 | @end 75 | -------------------------------------------------------------------------------- /GDRouting-Example/Pods/TheSidebarController/TheSidebarController/Animations/SidebarAnimation.m: -------------------------------------------------------------------------------- 1 | // SidebarAnimation.m 2 | // TheSidebarController 3 | // 4 | // Copyright (c) 2014 Jon Danao (danao.org | jondanao) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | 25 | #import "SidebarAnimation.h" 26 | 27 | 28 | 29 | @implementation SidebarAnimation 30 | 31 | + (void)animateContentView:(UIView *)contentView sidebarView:(UIView *)sidebarView fromSide:(Side)side visibleWidth:(CGFloat)visibleWidth duration:(NSTimeInterval)animationDuration completion:(void (^)(BOOL))completion 32 | { 33 | 34 | } 35 | 36 | + (void)reverseAnimateContentView:(UIView *)contentView sidebarView:(UIView *)sidebarView fromSide:(Side)side visibleWidth:(CGFloat)visibleWidth duration:(NSTimeInterval)animationDuration completion:(void (^)(BOOL))completion 37 | { 38 | 39 | } 40 | 41 | + (void)resetSidebarPosition:(UIView *)sidebarView 42 | { 43 | CATransform3D resetTransform = CATransform3DIdentity; 44 | resetTransform = CATransform3DRotate(resetTransform, DEG2RAD(0), 1, 1, 1); 45 | resetTransform = CATransform3DScale(resetTransform, 1.0, 1.0, 1.0); 46 | resetTransform = CATransform3DTranslate(resetTransform, 0.0, 0.0, 0.0); 47 | sidebarView.layer.transform = resetTransform; 48 | 49 | CGRect resetFrame = sidebarView.frame; 50 | resetFrame.origin.x = 0; 51 | resetFrame.origin.y = 0; 52 | sidebarView.frame = resetFrame; 53 | 54 | [sidebarView.superview sendSubviewToBack:sidebarView]; 55 | sidebarView.layer.zPosition = 0; 56 | } 57 | 58 | + (void)resetContentPosition:(UIView *)contentView 59 | { 60 | CATransform3D resetTransform = CATransform3DIdentity; 61 | resetTransform = CATransform3DRotate(resetTransform, DEG2RAD(0), 1, 1, 1); 62 | resetTransform = CATransform3DScale(resetTransform, 1.0, 1.0, 1.0); 63 | resetTransform = CATransform3DTranslate(resetTransform, 0.0, 0.0, 0.0); 64 | contentView.layer.transform = resetTransform; 65 | 66 | CGRect resetFrame = contentView.frame; 67 | resetFrame.origin.x = 0; 68 | resetFrame.origin.y = 0; 69 | contentView.frame = resetFrame; 70 | 71 | [contentView.superview bringSubviewToFront:contentView]; 72 | contentView.layer.zPosition = 0; 73 | } 74 | 75 | @end 76 | -------------------------------------------------------------------------------- /GDRouting-Example/GDRouting-ExampleTests/GDTableDataModelTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // GDTableDataModelTests.m 3 | // GDRouting-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/6/14. 6 | // Copyright (c) 2014 Go Daddy Operating Company, LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "GDTableDataModel.h" 11 | 12 | @interface GDTableDataModelTests : XCTestCase 13 | 14 | @end 15 | 16 | @implementation GDTableDataModelTests 17 | 18 | - (void)setUp 19 | { 20 | [super setUp]; 21 | // Put setup code here. This method is called before the invocation of each test method in the class. 22 | } 23 | 24 | - (void)tearDown 25 | { 26 | // Put teardown code here. This method is called after the invocation of each test method in the class. 27 | [super tearDown]; 28 | } 29 | 30 | - (void)testTableDataModelInitialization 31 | { 32 | GDTableDataModel *model = [[GDTableDataModel alloc] init]; 33 | XCTAssertNotNil(model.dataArray, @"Data array is nil"); 34 | XCTAssertNotNil(model.headerArray, @"Header array is nil"); 35 | } 36 | 37 | - (void)testTableDataModelInitializationWithParameters 38 | { 39 | NSArray *dataArray = @[@(1)]; 40 | NSArray *headerArray = @[@(2)]; 41 | GDTableDataModel *model = [[GDTableDataModel alloc] initWithDataArray:dataArray andHeaderArray:headerArray]; 42 | 43 | XCTAssertEqual(dataArray.count, model.dataArray.count, @"Data Arrays do not have the correct count"); 44 | XCTAssertEqual(headerArray.count, model.headerArray.count, @"Header Arrays do not have the correct count"); 45 | XCTAssertEqual([dataArray[0] intValue], [model.dataArray[0] intValue], @"Data Array values are not equal"); 46 | } 47 | 48 | - (void)testObjectFetching 49 | { 50 | NSArray *rowArray = @[@(1), @(2), @(3)]; 51 | GDTableDataModel *model = [[GDTableDataModel alloc] initWithDataArray:@[rowArray] andHeaderArray:nil]; 52 | NSNumber *number = [model objectInDataArrayAtIndexPath:[NSIndexPath indexPathForItem:0 inSection:0]]; 53 | XCTAssertEqual([rowArray[0] integerValue], [number integerValue], @"objectInDataArrayAtIndexPath didn't return the correct object."); 54 | 55 | number = [model objectInDataArrayAtIndexPath:[NSIndexPath indexPathForItem:3 inSection:0]]; 56 | XCTAssertNil(number, @"objectInDataArrayAtIndexPath should have returned nil"); 57 | 58 | number = [model objectInDataArrayAtIndexPath:[NSIndexPath indexPathForItem:0 inSection:2]]; 59 | XCTAssertNil(number, @"objectInDataArrayAtIndexPath should have returned nil"); 60 | } 61 | 62 | - (void)testHeaderFetching 63 | { 64 | NSArray *rowArray = @[@(1), @(2), @(3)]; 65 | GDTableDataModel *model = [[GDTableDataModel alloc] initWithDataArray:nil andHeaderArray:@[rowArray]]; 66 | 67 | NSNumber *number = [model objectInHeaderArrayAtPath:[NSIndexPath indexPathForItem:0 inSection:0]]; 68 | XCTAssertEqual([rowArray[0] integerValue], [number integerValue], @"objectInHeaderArrayAtPath didn't return the correct object."); 69 | 70 | number = [model objectInHeaderArrayAtPath:[NSIndexPath indexPathForItem:3 inSection:0]]; 71 | XCTAssertNil(number, @"objectInHeaderArrayAtPath should have returned nil"); 72 | 73 | number = [model objectInHeaderArrayAtPath:[NSIndexPath indexPathForItem:0 inSection:2]]; 74 | XCTAssertNil(number, @"objectInHeaderArrayAtPath should have returned nil"); 75 | } 76 | @end 77 | -------------------------------------------------------------------------------- /GDRouting-Example/GDRouting-Example/Classes/MainMenuTableViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // MainMenuTableViewController.m 3 | // GDDiscovery-MainMenu-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/7/14. 6 | // Copyright (c) 2014 Go Daddy Operating Company, LLC. All rights reserved. 7 | // 8 | 9 | #import "MainMenuTableViewController.h" 10 | #import "MainMenuTableDataModel.h" 11 | #import "GDTableDataModelObject.h" 12 | #import "GDAppConfiguration.h" 13 | #import "GDAppManager.h" 14 | #import "MainMenuTableViewCell.h" 15 | #import "GDConfigurableTableCell.h" 16 | #import "GDEnums.h" 17 | 18 | @interface MainMenuTableViewController () 19 | 20 | @property(nonatomic, strong) MainMenuTableDataModel *dataModel; 21 | 22 | @end 23 | 24 | @implementation MainMenuTableViewController 25 | 26 | - (void)viewDidLoad 27 | { 28 | [super viewDidLoad]; 29 | 30 | self.view.backgroundColor = [UIColor clearColor]; 31 | self.tableView.backgroundColor = [UIColor clearColor]; 32 | self.tableView.tableFooterView = [[UIView alloc] init]; 33 | 34 | UISwipeGestureRecognizer *swipeRecognizer = [[UISwipeGestureRecognizer alloc] initWithTarget:self.parentSideBarController action:@selector(dismissSidebarViewController)]; 35 | swipeRecognizer.direction = UISwipeGestureRecognizerDirectionLeft; 36 | [self.tableView addGestureRecognizer:swipeRecognizer]; 37 | 38 | } 39 | 40 | - (void)didReceiveMemoryWarning 41 | { 42 | [super didReceiveMemoryWarning]; 43 | _dataModel = nil; 44 | } 45 | 46 | - (MainMenuTableDataModel *)dataModel 47 | { 48 | if( _dataModel == nil ) 49 | { 50 | GDAppConfiguration *config = (GDAppConfiguration *)[GDAppConfiguration readArchivedObject]; 51 | GDAppManager *appManager = [[GDAppManager alloc] initWithUsableAppArray:config.usableAppArray]; 52 | _dataModel = [[MainMenuTableDataModel alloc] initWithMenuItemArray:[appManager getGDMenuItemsForApps] andRouteArray:[appManager getGDRouteArrayForApps] andBaseAppURLString:config.baseCallbackURLString]; 53 | } 54 | return _dataModel; 55 | } 56 | 57 | #pragma mark - Table view data source 58 | 59 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView 60 | { 61 | NSInteger sectionCount = self.dataModel.dataArray.count; 62 | return sectionCount; 63 | } 64 | 65 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 66 | { 67 | NSArray *sectionArray = self.dataModel.dataArray[section]; 68 | return sectionArray.count; 69 | } 70 | 71 | 72 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 73 | { 74 | GDTableDataModelObject *modelObject = [self.dataModel objectInDataArrayAtIndexPath:indexPath]; 75 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:modelObject.parameterDictionary[@(GDCellConfigKeyCellIdentifier)] forIndexPath:indexPath]; 76 | if( [cell conformsToProtocol:@protocol(GDConfigurableTableCell)]) 77 | { 78 | [cell performSelector:@selector(configureWithParamaters:) withObject:modelObject.parameterDictionary]; 79 | } 80 | return cell; 81 | } 82 | 83 | 84 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 85 | { 86 | GDTableDataModelObject *modelObject = [self.dataModel objectInDataArrayAtIndexPath:indexPath]; 87 | if( modelObject.selectedBlock != nil ) 88 | { 89 | modelObject.selectedBlock(nil); 90 | [self.parentSideBarController dismissSidebarViewController]; 91 | } 92 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; 93 | } 94 | 95 | 96 | @end 97 | -------------------------------------------------------------------------------- /GDRouting-Example/Pods/TheSidebarController/TheSidebarController/TheSidebarController.h: -------------------------------------------------------------------------------- 1 | // TheSidebarController.h 2 | // TheSidebarController 3 | // 4 | // Copyright (c) 2013 Jon Danao (danao.org | jondanao) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | 25 | #import 26 | #import "SidebarAnimation.h" 27 | 28 | @protocol TheSidebarControllerDelegate; 29 | 30 | @interface TheSidebarController : UIViewController 31 | 32 | @property (strong, nonatomic) UIViewController *contentViewController; 33 | @property (strong, nonatomic) UIViewController *leftSidebarViewController; 34 | @property (strong, nonatomic) UIViewController *rightSidebarViewController; 35 | 36 | @property (assign, nonatomic) NSTimeInterval animationDuration; 37 | @property (assign, nonatomic) CGFloat visibleWidth; 38 | @property (assign, nonatomic) BOOL sidebarIsPresenting; 39 | @property (assign, nonatomic) id delegate; 40 | 41 | - (id)initWithContentViewController:(UIViewController *)contentViewController 42 | leftSidebarViewController:(UIViewController *)leftSidebarViewController; 43 | 44 | - (id)initWithContentViewController:(UIViewController *)contentViewController 45 | rightSidebarViewController:(UIViewController *)rightSidebarViewController; 46 | 47 | - (id)initWithContentViewController:(UIViewController *)contentViewController 48 | leftSidebarViewController:(UIViewController *)leftSidebarViewController 49 | rightSidebarViewController:(UIViewController *)rightSidebarViewController; 50 | 51 | - (void)dismissSidebarViewController; 52 | - (void)presentLeftSidebarViewController; 53 | - (void)presentLeftSidebarViewControllerWithStyle:(SidebarTransitionStyle)transitionStyle; 54 | - (void)presentRightSidebarViewController; 55 | - (void)presentRightSidebarViewControllerWithStyle:(SidebarTransitionStyle)transitionStyle; 56 | 57 | @end 58 | 59 | 60 | 61 | @protocol TheSidebarControllerDelegate 62 | 63 | @optional 64 | - (void)sidebarController:(TheSidebarController *)sidebarController willShowViewController:(UIViewController *)viewController; 65 | - (void)sidebarController:(TheSidebarController *)sidebarController didShowViewController:(UIViewController *)viewController; 66 | - (void)sidebarController:(TheSidebarController *)sidebarController willHideViewController:(UIViewController *)viewController; 67 | - (void)sidebarController:(TheSidebarController *)sidebarController didHideViewController:(UIViewController *)viewController; 68 | @end 69 | 70 | 71 | 72 | @interface UIViewController(TheSidebarController) 73 | 74 | @property (strong, readonly, nonatomic) TheSidebarController *sidebarController; 75 | 76 | @end 77 | -------------------------------------------------------------------------------- /GDRouting-Example/Pods/Pods-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 5 | > "$RESOURCES_TO_COPY" 6 | 7 | install_resource() 8 | { 9 | case $1 in 10 | *.storyboard) 11 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}" 12 | ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" 13 | ;; 14 | *.xib) 15 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}" 16 | ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" 17 | ;; 18 | *.framework) 19 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 20 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 21 | echo "rsync -av ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 22 | rsync -av "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 23 | ;; 24 | *.xcdatamodel) 25 | echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\"" 26 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom" 27 | ;; 28 | *.xcdatamodeld) 29 | echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\"" 30 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd" 31 | ;; 32 | *.xcassets) 33 | ;; 34 | /*) 35 | echo "$1" 36 | echo "$1" >> "$RESOURCES_TO_COPY" 37 | ;; 38 | *) 39 | echo "${PODS_ROOT}/$1" 40 | echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY" 41 | ;; 42 | esac 43 | } 44 | 45 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 46 | if [[ "${ACTION}" == "install" ]]; then 47 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 48 | fi 49 | rm -f "$RESOURCES_TO_COPY" 50 | 51 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ `xcrun --find actool` ] && [ `find . -name '*.xcassets' | wc -l` -ne 0 ] 52 | then 53 | case "${TARGETED_DEVICE_FAMILY}" in 54 | 1,2) 55 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 56 | ;; 57 | 1) 58 | TARGET_DEVICE_ARGS="--target-device iphone" 59 | ;; 60 | 2) 61 | TARGET_DEVICE_ARGS="--target-device ipad" 62 | ;; 63 | *) 64 | TARGET_DEVICE_ARGS="--target-device mac" 65 | ;; 66 | esac 67 | find "${PWD}" -name "*.xcassets" -print0 | xargs -0 actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 68 | fi 69 | -------------------------------------------------------------------------------- /GDRouting-Example/Pods/TheSidebarController/TheSidebarController/Animations/SidebarFeedlyAnimation.m: -------------------------------------------------------------------------------- 1 | // SidebarFeedlyAnimation.m 2 | // TheSidebarController 3 | // 4 | // Copyright (c) 2014 Jon Danao (danao.org | jondanao) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | 25 | #import "SidebarFeedlyAnimation.h" 26 | 27 | @implementation SidebarFeedlyAnimation 28 | 29 | + (void)animateContentView:(UIView *)contentView sidebarView:(UIView *)sidebarView fromSide:(Side)side visibleWidth:(CGFloat)visibleWidth duration:(NSTimeInterval)animationDuration completion:(void (^)(BOOL))completion 30 | { 31 | [self resetSidebarPosition:sidebarView]; 32 | [self resetContentPosition:contentView]; 33 | 34 | 35 | CGRect sidebarFrame = sidebarView.frame; 36 | [sidebarView.superview bringSubviewToFront:sidebarView]; 37 | 38 | if(side == LeftSide) 39 | { 40 | sidebarFrame.origin.x = -sidebarFrame.size.width; 41 | sidebarView.frame = sidebarFrame; 42 | sidebarFrame.origin.x += visibleWidth; 43 | } 44 | else 45 | { 46 | sidebarFrame.origin.x = sidebarFrame.size.width; 47 | sidebarView.frame = sidebarFrame; 48 | sidebarFrame.origin.x -= visibleWidth; 49 | } 50 | 51 | [UIView animateWithDuration:animationDuration 52 | delay:0.0 53 | options:UIViewAnimationOptionCurveEaseInOut 54 | animations:^{ 55 | sidebarView.frame = sidebarFrame; 56 | contentView.alpha = 0.3; 57 | } 58 | completion:^(BOOL finished) { 59 | completion(finished); 60 | }]; 61 | } 62 | 63 | 64 | + (void)reverseAnimateContentView:(UIView *)contentView sidebarView:(UIView *)sidebarView fromSide:(Side)side visibleWidth:(CGFloat)visibleWidth duration:(NSTimeInterval)animationDuration completion:(void (^)(BOOL))completion 65 | { 66 | CGRect sidebarFrame = sidebarView.frame; 67 | 68 | if(side == LeftSide) 69 | { 70 | sidebarFrame.origin.x -= visibleWidth; 71 | } 72 | else 73 | { 74 | sidebarFrame.origin.x += visibleWidth; 75 | } 76 | 77 | [UIView animateWithDuration:animationDuration 78 | delay:0.0 79 | options:UIViewAnimationOptionCurveEaseInOut 80 | animations:^{ 81 | sidebarView.frame = sidebarFrame; 82 | contentView.alpha = 1; 83 | } 84 | completion:^(BOOL finished) { 85 | completion(finished); 86 | }]; 87 | } 88 | 89 | @end 90 | -------------------------------------------------------------------------------- /GDRouting-Example/GDRouting-Example/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // GDRouting-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/1/14. 6 | // Copyright (c) 2014 Go Daddy Operating Company, LLC. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "GDAppConfiguration.h" 11 | #import "GDUsableApp.h" 12 | #import "MainMenuViewController.h" 13 | #import "GDAppManager.h" 14 | #import "JLRoutes.h" 15 | #import "TheSidebarController.h" 16 | 17 | @interface AppDelegate() 18 | 19 | @property(nonatomic, strong) UINavigationController *navController; 20 | 21 | @end 22 | 23 | @implementation AppDelegate 24 | 25 | static NSString *const CatAppName = @"CatApp"; 26 | static NSString *const DogAppName = @"DogApp"; 27 | static NSString *const ManateeAppName = @"ManateeApp"; 28 | 29 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 30 | { 31 | /** 32 | * Create the GDAppConfiguration object, configure it with sub-apps and archive it. This is the only time we will explicitly reference 33 | * a sub-app 34 | */ 35 | GDAppConfiguration *appConfiguration = [[GDAppConfiguration alloc] init]; 36 | 37 | GDUsableApp *manateeApp = [[GDUsableApp alloc] init]; 38 | manateeApp.displayOrder = 0; 39 | manateeApp.appName = ManateeAppName; 40 | 41 | GDUsableApp *catApp = [[GDUsableApp alloc] init]; 42 | catApp.displayOrder = 1; 43 | catApp.appName = CatAppName; 44 | 45 | GDUsableApp *dogApp = [[GDUsableApp alloc] init]; 46 | dogApp.displayOrder = 2; 47 | dogApp.appName = DogAppName; 48 | 49 | appConfiguration.usableAppArray = @[manateeApp, catApp, dogApp]; 50 | [appConfiguration archiveObject]; 51 | 52 | /** 53 | * Set up the TheSidebarController and set up our views 54 | */ 55 | MainMenuViewController *mainMenuController = [MainMenuViewController mainMenuViewControllerFromStoryboard]; 56 | 57 | self.navController = (UINavigationController *)self.window.rootViewController; 58 | 59 | TheSidebarController *sidebarController = [[TheSidebarController alloc] initWithContentViewController:self.navController leftSidebarViewController:mainMenuController]; 60 | self.window.rootViewController = sidebarController; 61 | 62 | /** 63 | * Create an instance of GDAppManager and register our routes 64 | */ 65 | GDAppManager *appManager = [[GDAppManager alloc] initWithUsableAppArray:appConfiguration.usableAppArray]; 66 | [appManager registerRoutesForAppsWithRoutingDelegate:self]; 67 | 68 | return YES; 69 | } 70 | 71 | 72 | - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation 73 | { 74 | return [JLRoutes routeURL:url]; 75 | } 76 | 77 | 78 | #pragma mark - GDRoutingDelegate methods 79 | 80 | -(void) pushRoutedViewController:(UIViewController *)viewController animated:(BOOL)animated parameters:(NSDictionary *)parameters 81 | { 82 | [self.navController pushViewController:viewController animated:animated]; 83 | } 84 | 85 | 86 | -(void) presentRoutedViewController:(UIViewController *)viewController animated:(BOOL)animated parameters:(NSDictionary *)parameters 87 | { 88 | [self.navController presentViewController:viewController animated:animated completion:nil]; 89 | } 90 | 91 | -(void) popRoutedViewController:(BOOL)animated parameters:(NSDictionary *)parameters 92 | { 93 | [self.navController popViewControllerAnimated:animated]; 94 | } 95 | 96 | -(void) popRoutedViewControllerToRootViewController:(BOOL)animated parameters:(NSDictionary *)parameters 97 | { 98 | [self.navController popToRootViewControllerAnimated:animated]; 99 | } 100 | 101 | @end 102 | -------------------------------------------------------------------------------- /GDRouting-Example/Pods/TheSidebarController/TheSidebarController/Animations/SidebarWunderlistAnimation.m: -------------------------------------------------------------------------------- 1 | // SidebarWunderlistAnimation.m 2 | // TheSidebarController 3 | // 4 | // Copyright (c) 2014 Jon Danao (danao.org | jondanao) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | 25 | #import "SidebarWunderlistAnimation.h" 26 | 27 | @implementation SidebarWunderlistAnimation 28 | 29 | + (void)animateContentView:(UIView *)contentView sidebarView:(UIView *)sidebarView fromSide:(Side)side visibleWidth:(CGFloat)visibleWidth duration:(NSTimeInterval)animationDuration completion:(void (^)(BOOL))completion 30 | { 31 | [self resetSidebarPosition:sidebarView]; 32 | [self resetContentPosition:contentView]; 33 | 34 | 35 | CGRect contentFrame = contentView.frame; 36 | CGRect sidebarFrame = sidebarView.frame; 37 | 38 | if(side == LeftSide) 39 | { 40 | contentFrame.origin.x += visibleWidth; 41 | sidebarFrame.origin.x -= 50; 42 | } 43 | else 44 | { 45 | contentFrame.origin.x -= visibleWidth; 46 | sidebarFrame.origin.x += 50; 47 | } 48 | 49 | sidebarView.frame = sidebarFrame; 50 | sidebarFrame.origin.x = 0; 51 | 52 | [UIView animateWithDuration:animationDuration 53 | delay:0.0 54 | options:UIViewAnimationOptionCurveEaseInOut 55 | animations:^{ 56 | contentView.frame = contentFrame; 57 | sidebarView.frame = sidebarFrame; 58 | } 59 | completion:^(BOOL finished) { 60 | completion(finished); 61 | }]; 62 | } 63 | 64 | 65 | + (void)reverseAnimateContentView:(UIView *)contentView sidebarView:(UIView *)sidebarView fromSide:(Side)side visibleWidth:(CGFloat)visibleWidth duration:(NSTimeInterval)animationDuration completion:(void (^)(BOOL))completion 66 | { 67 | CGRect contentFrame = contentView.frame; 68 | contentFrame.origin.x = 0; 69 | 70 | CGRect sidebarFrame = sidebarView.frame; 71 | 72 | if(side == LeftSide) 73 | { 74 | sidebarFrame.origin.x -= 50; 75 | } 76 | else 77 | { 78 | sidebarFrame.origin.x += 50; 79 | } 80 | 81 | [UIView animateWithDuration:animationDuration 82 | delay:0.0 83 | options:UIViewAnimationOptionCurveEaseInOut 84 | animations:^{ 85 | contentView.frame = contentFrame; 86 | sidebarView.frame = sidebarFrame; 87 | } 88 | completion:^(BOOL finished) { 89 | completion(finished); 90 | }]; 91 | } 92 | 93 | 94 | @end 95 | -------------------------------------------------------------------------------- /GDRouting/GDAppManager.m: -------------------------------------------------------------------------------- 1 | // 2 | // GDAppManager.m 3 | // GDRouting-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/6/14. 6 | // Copyright (c) 2014 Go Daddy Operating Company, LLC. All rights reserved. 7 | // 8 | 9 | #import "GDAppManager.h" 10 | #import "GDBaseApp.h" 11 | #import "GDUsableApp.h" 12 | #import "JLRoutes.h" 13 | 14 | @implementation GDAppManager 15 | 16 | static NSString * const SortKey = @"displayOrder"; 17 | 18 | - (instancetype)initWithUsableAppArray:(NSArray *)inUsableAppArray 19 | { 20 | self = [super init]; 21 | if (self) 22 | { 23 | _usableAppArray = inUsableAppArray != nil ? [[NSArray alloc] initWithArray:inUsableAppArray] : [[NSArray alloc] init]; 24 | } 25 | return self; 26 | } 27 | 28 | - (NSArray *)getGDMenuItemsForApps 29 | { 30 | NSMutableArray *allMenuItemArray= [[NSMutableArray alloc] init]; 31 | for( GDUsableApp *usableApp in self.usableAppArray ) 32 | { 33 | Class appClass = NSClassFromString(usableApp.appName); 34 | if( [appClass conformsToProtocol:@protocol(GDBaseApp)]) 35 | { 36 | NSArray *menuItemArray = [appClass performSelector:@selector(menuItems)]; 37 | if( menuItemArray != nil ) 38 | { 39 | NSSortDescriptor *sortDescriptior = [[NSSortDescriptor alloc] initWithKey:SortKey ascending:YES]; 40 | NSArray *sortedItems = [menuItemArray sortedArrayUsingDescriptors:@[sortDescriptior]]; 41 | [allMenuItemArray addObjectsFromArray:sortedItems]; 42 | } 43 | } 44 | } 45 | return allMenuItemArray; 46 | } 47 | 48 | - (NSArray *)getGDRouteArrayForApps 49 | { 50 | NSMutableArray *allRouteArray = [[NSMutableArray alloc] init]; 51 | for( GDUsableApp *usableApp in self.usableAppArray ) 52 | { 53 | Class appClass = NSClassFromString(usableApp.appName); 54 | if( [appClass conformsToProtocol:@protocol(GDBaseApp)]) 55 | { 56 | NSDictionary *routeDictionary = [appClass performSelector:@selector(routesToRegister)]; 57 | 58 | if( routeDictionary != nil ) 59 | { 60 | NSArray *routeArray = [routeDictionary allValues]; 61 | NSSortDescriptor *sortDescriptior = [[NSSortDescriptor alloc] initWithKey:SortKey ascending:YES]; 62 | NSArray *sortedItems = [routeArray sortedArrayUsingDescriptors:@[sortDescriptior]]; 63 | [allRouteArray addObjectsFromArray:sortedItems]; 64 | } 65 | } 66 | } 67 | return allRouteArray; 68 | } 69 | 70 | - (NSDictionary *)getGDRouteDictionaryForApps 71 | { 72 | NSMutableDictionary *allRouteDictionary = [[NSMutableDictionary alloc] init]; 73 | for( GDUsableApp *usableApp in self.usableAppArray ) 74 | { 75 | Class appClass = NSClassFromString(usableApp.appName); 76 | if( [appClass conformsToProtocol:@protocol(GDBaseApp)]) 77 | { 78 | NSDictionary *routeDictionary = [appClass performSelector:@selector(routesToRegister)]; 79 | 80 | if( routeDictionary != nil ) 81 | { 82 | [allRouteDictionary addEntriesFromDictionary:routeDictionary]; 83 | } 84 | } 85 | } 86 | return allRouteDictionary; 87 | } 88 | 89 | - (BOOL)registerRoutesForAppsWithRoutingDelegate:(id)inDelegate 90 | { 91 | BOOL registeredRoutes = NO; 92 | NSArray *gdroutes = [self getGDRouteArrayForApps]; 93 | for( GDRoute *route in gdroutes ) 94 | { 95 | [JLRoutes addRoute:route.urlString handler:^BOOL(NSDictionary *parameters) { 96 | return route.routingBlock(inDelegate, route.urlString, parameters); 97 | }]; 98 | registeredRoutes = YES; 99 | } 100 | return registeredRoutes; 101 | } 102 | @end 103 | -------------------------------------------------------------------------------- /GDRouting-Example/Pods/Pods-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## FastCoding 5 | 6 | FastCoding 7 | 8 | Version 2.1.7, January 15th, 2014 9 | 10 | Copyright (C) 2013 Charcoal Design 11 | 12 | This software is provided 'as-is', without any express or implied 13 | warranty. In no event will the authors be held liable for any damages 14 | arising from the use of this software. 15 | 16 | Permission is granted to anyone to use this software for any purpose, 17 | including commercial applications, and to alter it and redistribute it 18 | freely, subject to the following restrictions: 19 | 20 | 1. The origin of this software must not be misrepresented; you must not 21 | claim that you wrote the original software. If you use this software 22 | in a product, an acknowledgment in the product documentation would be 23 | appreciated but is not required. 24 | 25 | 2. Altered source versions must be plainly marked as such, and must not be 26 | misrepresented as being the original software. 27 | 28 | 3. This notice may not be removed or altered from any source distribution. 29 | 30 | ## JLRoutes 31 | 32 | Copyright (c) 2013-Present, Joel Levin 33 | All rights reserved. 34 | 35 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 36 | 37 | Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 38 | Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 39 | Neither the name of JLRoutes nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 40 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 41 | 42 | 43 | ## TheSidebarController 44 | 45 | TheSidebarController 46 | 47 | Copyright (c) 2013 Jon Danao (danao.org | jondanao) 48 | 49 | Permission is hereby granted, free of charge, to any person obtaining a copy 50 | of this software and associated documentation files (the "Software"), to deal 51 | in the Software without restriction, including without limitation the rights 52 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 53 | copies of the Software, and to permit persons to whom the Software is 54 | furnished to do so, subject to the following conditions: 55 | 56 | The above copyright notice and this permission notice shall be included in 57 | all copies or substantial portions of the Software. 58 | 59 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 60 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 61 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 62 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 63 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 64 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 65 | THE SOFTWARE. 66 | Generated by CocoaPods - http://cocoapods.org 67 | -------------------------------------------------------------------------------- /GDRouting/GDRoute.h: -------------------------------------------------------------------------------- 1 | // 2 | // GDRoute.h 3 | // GDRouting-Example 4 | // 5 | // Created by Jonah G. Neugass on 5/1/14. 6 | // Copyright (c) 2014 Go Daddy Operating Company, LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /** 12 | * Protocol that describes how to display a view controller when a route is selected 13 | */ 14 | @protocol GDRoutingDelegate 15 | 16 | /** 17 | * Pushes a view controller 18 | * 19 | * @param viewController - View controller to be pushed 20 | * @param animated - Should the transition be animated 21 | * @param parameters - Parameters associated with the transition or to set onto the pushed view controller 22 | */ 23 | -(void) pushRoutedViewController:(UIViewController *)viewController animated:(BOOL)animated parameters:(NSDictionary *)parameters; 24 | 25 | @optional 26 | 27 | /** 28 | * Presents a view controller 29 | * 30 | * @param viewController - View controller to be presented 31 | * @param animated - Should the transition be animated 32 | * @param parameters - Parameters associated with the transition or to set onto the presented view controller 33 | */ 34 | -(void) presentRoutedViewController:(UIViewController *)viewController animated:(BOOL)animated parameters:(NSDictionary *)parameters; 35 | 36 | /** 37 | * Pops the current view controller 38 | * 39 | * @param animated - Should the transition be animated 40 | * @param parameters - Parameters associated with the transition 41 | */ 42 | -(void) popRoutedViewController:(BOOL)animated parameters:(NSDictionary *)parameters; 43 | 44 | /** 45 | * Pops to the root view controller 46 | * 47 | * @param animated - Should the transition be animated 48 | * @param parameters Parameters associated with the transition 49 | */ 50 | -(void) popRoutedViewControllerToRootViewController:(BOOL)animated parameters:(NSDictionary *)parameters; 51 | 52 | @end 53 | 54 | 55 | /** 56 | * Block to perform when the route is selected 57 | * 58 | * @param id - Object to perform the GDRoutingDelegate selector 59 | * @param - Route url 60 | * @param - Parameter dictionary 61 | * 62 | * @return Whether or not the routing action was performed. 63 | */ 64 | typedef BOOL (^GDRoutingBlock)(id, NSString *, NSDictionary *); 65 | 66 | /** 67 | * GDRoute stores information about the urlString and the routing block to be called when the route is selected 68 | */ 69 | @interface GDRoute : NSObject 70 | 71 | /** 72 | * Url string path to the view controller you want to load 73 | */ 74 | @property (nonatomic, strong) NSString *urlString; 75 | 76 | /** 77 | * Block to perform when the route is selected 78 | */ 79 | @property (nonatomic, strong) GDRoutingBlock routingBlock; 80 | 81 | /** 82 | * Order the associated menu item should be displayed in 83 | */ 84 | @property (nonatomic) NSInteger displayOrder; 85 | /** 86 | * Class method that returns a route configured with the passed in url string and routing block 87 | * 88 | * @param inURLString - Url string path to the view controller you want to load 89 | * @param inRoutingBlock - 90 | * 91 | * @return Block to perform when the route is selected 92 | */ 93 | +(instancetype)routeWithURLString:(NSString *)inURLString andAction:(GDRoutingBlock)inRoutingBlock; 94 | 95 | +(instancetype)routeWithURLString:(NSString *)inURLString andDisplayOrder:(NSInteger)inDisplayOrder andAction:(GDRoutingBlock)inRoutingBlock; 96 | /** 97 | * Returns a URL object created from the base app url string and the url string from the GDRoute 98 | * 99 | * @param inBaseAppURLString - Base app url string 100 | * 101 | * @return URL object created from the base app url string and the url string from the GDRoute 102 | */ 103 | - (NSURL *)urlWithBaseAppURLString:(NSString *)inBaseAppURLString; 104 | 105 | @end 106 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | GDRouting 2 | ========= 3 | 4 | GDRouting is a framework for using private CocoaPod repositories to modularizing a large application into sub-applications. The open source repo JLRoutes is used create x-callback-urls to glue all the sub-apps together accessible though a menu system or with string keys exposed in each sub-app. 5 | 6 | This repo buids upon concepts taken from the blog post Using CocoaPods to Modularize a Big iOS App by Anthony Roldan of HubSpot. 7 | 8 |

GDMenuItem

9 | 10 | GDMenuItem hold properties that determine what shows up in the menu table view, these being title and iconImageName. It also has properies of displayOrder so that you can order menu items in a sub-app and sectionTitle if you want a section header to appear before the menu item. 11 | 12 |
13 | GDMenuItem *menuItem = [[GDMenuItem alloc] initWithTitle:MenuItemTitle andDisplayOrder:0];
14 | menuItem.sectionTitle = SectionTitle;
15 | 
16 | 17 |

GDRoute

18 | GDRoute stores information about the urlString and the routing block to be called when the route is selected 19 | 20 |
21 | GDRoute *route = [GDRoute routeWithURLString:[NSString stringWithFormat:@"/%@", ViewControllerIdentifier] andAction: ^BOOL (id  routingDelegate, NSString *urlString, NSDictionary *parameters) {
22 | 	[routingDelegate pushRoutedViewController:[UIStoryboard instantiateViewControllerWithIdentifier:ViewControllerIdentifier andStoryboardName:StoryboardName] animated:YES parameters:nil];
23 | 	    return YES;
24 | 	}];
25 |  
26 | 27 |

GDBaseApp

28 | All sub-applications should have at least one class that implements this protocol. It is used to get menu items and routes used in the sub-app. 29 | 30 | Here is what the implementation of the ManateeApp looks like: 31 |
32 | @implementation ManateeApp
33 | 
34 | static NSString *const StoryboardName = @"Main";
35 | static NSString *const ViewControllerIdentifier = @"ManateeViewController";
36 | static NSString *const MenuItemTitle = @"MANATEES";
37 | 
38 | + (UINavigationController *)baseNavigationController
39 | {
40 | 	return [[UINavigationController alloc] initWithRootViewController:[UIStoryboard instantiateViewControllerWithIdentifier:ViewControllerIdentifier andStoryboardName:StoryboardName]];
41 | }
42 | 
43 | + (NSArray *)menuItems
44 | {
45 | 	GDMenuItem *menuItem = [[GDMenuItem alloc] initWithTitle:MenuItemTitle andIconImageName:nil];
46 | 	return @[menuItem];
47 | }
48 | 
49 | + (NSDictionary *)routesToRegister
50 | {
51 | 	GDRoute *route = [GDRoute routeWithURLString:[NSString stringWithFormat:@"/%@", ViewControllerIdentifier] andAction: ^BOOL (id  routingDelegate, NSString *urlString, NSDictionary *parameters) {
52 | 	    [routingDelegate popRoutedViewControllerToRootViewController:YES parameters:nil];
53 | 	    return YES;
54 | 	}];
55 | 
56 |     NSDictionary *routeDictionary = @{ViewControllerIdentifier : route};
57 | 	return routeDictionary;
58 | }
59 | 
60 | 61 |

GDUsableApp

62 | 63 | A GDUsableApp is a representation of an sub-app that is configured for use in your main application. It has 2 properties, displayOrder which is used to determine what order menu items from the app show up in menu and appName which matches the name of the sub-app class that you want to import. 64 | 65 | Usage: 66 | 67 |
68 | GDUsableApp *manateeApp = [[GDUsableApp alloc] init];
69 | manateeApp.displayOrder = 0;
70 | manateeApp.appName = @"ManateeApp";
71 | 
72 | 73 |

GDAppConfiguration

74 | 75 | GDAppConfiguration is an archivable object used to store configuration information about the app. 76 | 77 |
78 |     GDAppConfiguration *appConfiguration = [[GDAppConfiguration alloc] init];
79 |     appConfiguration.usableAppArray = @[manateeApp];
80 |     [appConfiguration archiveObject];
81 | 
82 | 83 |

GDAppManager

84 | GDAppManager provides functionality to get all the available GDMenuItems and GDRoutes configured in an application using an array of GDUsableApps. It is also used to set up all your routes. 85 | 86 |
87 |     GDAppManager *appManager = [[GDAppManager alloc] initWithUsableAppArray:appConfiguration.usableAppArray];
88 |     [appManager registerRoutesForAppsWithRoutingDelegate:self];
89 | 
90 | -------------------------------------------------------------------------------- /GDRouting-Example/Pods/TheSidebarController/TheSidebarController/Animations/SidebarFlipboardAnimation.m: -------------------------------------------------------------------------------- 1 | // SidebarFlipboardAnimation.m 2 | // TheSidebarController 3 | // 4 | // Copyright (c) 2014 Jon Danao (danao.org | jondanao) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | 25 | #import "SidebarFlipboardAnimation.h" 26 | 27 | @implementation SidebarFlipboardAnimation 28 | 29 | + (void)animateContentView:(UIView *)contentView sidebarView:(UIView *)sidebarView fromSide:(Side)side visibleWidth:(CGFloat)visibleWidth duration:(NSTimeInterval)animationDuration completion:(void (^)(BOOL))completion 30 | { 31 | [self resetSidebarPosition:sidebarView]; 32 | [self resetContentPosition:contentView]; 33 | 34 | 35 | CGRect sidebarFrame = sidebarView.frame; 36 | [sidebarView.superview bringSubviewToFront:sidebarView]; 37 | 38 | CATransform3D contentTransform = CATransform3DIdentity; 39 | contentTransform = CATransform3DScale(contentTransform, 0.9, 0.9, 0.9); 40 | 41 | if(side == LeftSide) 42 | { 43 | sidebarFrame.origin.x = -sidebarFrame.size.width; 44 | sidebarView.frame = sidebarFrame; 45 | sidebarFrame.origin.x += visibleWidth; 46 | } 47 | else 48 | { 49 | sidebarFrame.origin.x = sidebarFrame.size.width; 50 | sidebarView.frame = sidebarFrame; 51 | sidebarFrame.origin.x -= visibleWidth; 52 | } 53 | 54 | [UIView animateWithDuration:animationDuration 55 | delay:0.0 56 | options:UIViewAnimationOptionCurveEaseInOut 57 | animations:^{ 58 | sidebarView.frame = sidebarFrame; 59 | contentView.alpha = 0.3; 60 | contentView.layer.transform = contentTransform; 61 | } 62 | completion:^(BOOL finished) { 63 | completion(finished); 64 | }]; 65 | 66 | 67 | 68 | } 69 | 70 | + (void)reverseAnimateContentView:(UIView *)contentView sidebarView:(UIView *)sidebarView fromSide:(Side)side visibleWidth:(CGFloat)visibleWidth duration:(NSTimeInterval)animationDuration completion:(void (^)(BOOL))completion 71 | { 72 | CGRect sidebarFrame = sidebarView.frame; 73 | CATransform3D contentTransform = CATransform3DIdentity; 74 | contentTransform = CATransform3DScale(contentTransform, 1.0, 1.0, 1.0); 75 | 76 | if(side == LeftSide) 77 | { 78 | sidebarFrame.origin.x -= visibleWidth; 79 | } 80 | else 81 | { 82 | sidebarFrame.origin.x += visibleWidth; 83 | } 84 | 85 | [UIView animateWithDuration:animationDuration 86 | delay:0.0 87 | options:UIViewAnimationOptionCurveEaseInOut 88 | animations:^{ 89 | sidebarView.frame = sidebarFrame; 90 | contentView.alpha = 1; 91 | contentView.layer.transform = contentTransform; 92 | } 93 | completion:^(BOOL finished) { 94 | completion(finished); 95 | }]; 96 | } 97 | 98 | 99 | @end 100 | -------------------------------------------------------------------------------- /GDRouting-Example/Pods/TheSidebarController/TheSidebarController/Animations/SidebarLuvocracyAnimation.m: -------------------------------------------------------------------------------- 1 | // SidebarLuvocracyAnimation.m 2 | // TheSidebarController 3 | // 4 | // Copyright (c) 2014 Jon Danao (danao.org | jondanao) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | 25 | #import "SidebarLuvocracyAnimation.h" 26 | 27 | @implementation SidebarLuvocracyAnimation 28 | 29 | + (void)animateContentView:(UIView *)contentView sidebarView:(UIView *)sidebarView fromSide:(Side)side visibleWidth:(CGFloat)visibleWidth duration:(NSTimeInterval)animationDuration completion:(void (^)(BOOL))completion 30 | { 31 | [self resetSidebarPosition:sidebarView]; 32 | [self resetContentPosition:contentView]; 33 | 34 | // Animation settings for content view 35 | CATransform3D contentTransform = CATransform3DIdentity; 36 | contentTransform.m34 = -1.0f / 800.0f; 37 | contentView.layer.zPosition = 100; 38 | 39 | // Animation settings for sidebar view 40 | CATransform3D sidebarTransform = CATransform3DIdentity; 41 | sidebarTransform = CATransform3DScale(sidebarTransform, 1.7, 1.7, 1.7); 42 | sidebarView.layer.transform = sidebarTransform; 43 | 44 | sidebarTransform = CATransform3DIdentity; 45 | sidebarTransform = CATransform3DScale(sidebarTransform, 1.0, 1.0, 1.0); 46 | 47 | if(side == LeftSide) 48 | { 49 | contentTransform = CATransform3DTranslate(contentTransform, visibleWidth - (contentView.frame.size.width / 2 * 0.4), 0.0, 0.0); 50 | contentTransform = CATransform3DScale(contentTransform, 0.6, 0.6, 0.6); 51 | } 52 | else 53 | { 54 | contentTransform = CATransform3DTranslate(contentTransform, 0 - visibleWidth + (contentView.frame.size.width / 2 * 0.4), 0.0, 0.0); 55 | contentTransform = CATransform3DScale(contentTransform, 0.6, 0.6, 0.6); 56 | } 57 | 58 | 59 | // Animate 60 | [UIView animateWithDuration:animationDuration 61 | delay:0.0 62 | options:UIViewAnimationOptionCurveEaseInOut 63 | animations:^{ 64 | contentView.layer.transform = contentTransform; 65 | sidebarView.layer.transform = sidebarTransform; 66 | } 67 | completion:^(BOOL finished) { 68 | completion(finished); 69 | }]; 70 | } 71 | 72 | 73 | + (void)reverseAnimateContentView:(UIView *)contentView sidebarView:(UIView *)sidebarView fromSide:(Side)side visibleWidth:(CGFloat)visibleWidth duration:(NSTimeInterval)animationDuration completion:(void (^)(BOOL))completion 74 | { 75 | // Animation settings for content view 76 | CATransform3D contentTransform = CATransform3DIdentity; 77 | contentTransform.m34 = -1.0f / 800.0f; 78 | contentView.layer.zPosition = 100; 79 | contentTransform = CATransform3DTranslate(contentTransform, 0.0, 0.0, 0.0); 80 | contentTransform = CATransform3DScale(contentTransform, 1.0, 1.0, 1.0); 81 | 82 | // Animation settings for menu view 83 | __block CATransform3D sidebarTransform = CATransform3DIdentity; 84 | sidebarTransform = CATransform3DScale(sidebarTransform, 1.7, 1.7, 1.7); 85 | 86 | 87 | // Animate 88 | [UIView animateWithDuration:animationDuration 89 | delay:0.0 90 | options:UIViewAnimationOptionCurveEaseInOut 91 | animations:^{ 92 | contentView.layer.transform = contentTransform; 93 | sidebarView.layer.transform = sidebarTransform; 94 | } 95 | completion:^(BOOL finished) { 96 | completion(finished); 97 | sidebarTransform = CATransform3DIdentity; 98 | sidebarTransform = CATransform3DScale(sidebarTransform, 1.0, 1.0, 1.0); 99 | sidebarView.layer.transform = sidebarTransform; 100 | }]; 101 | } 102 | 103 | 104 | @end 105 | -------------------------------------------------------------------------------- /GDRouting-Example/Pods/Pods-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | FastCoding 18 | 19 | Version 2.1.7, January 15th, 2014 20 | 21 | Copyright (C) 2013 Charcoal Design 22 | 23 | This software is provided 'as-is', without any express or implied 24 | warranty. In no event will the authors be held liable for any damages 25 | arising from the use of this software. 26 | 27 | Permission is granted to anyone to use this software for any purpose, 28 | including commercial applications, and to alter it and redistribute it 29 | freely, subject to the following restrictions: 30 | 31 | 1. The origin of this software must not be misrepresented; you must not 32 | claim that you wrote the original software. If you use this software 33 | in a product, an acknowledgment in the product documentation would be 34 | appreciated but is not required. 35 | 36 | 2. Altered source versions must be plainly marked as such, and must not be 37 | misrepresented as being the original software. 38 | 39 | 3. This notice may not be removed or altered from any source distribution. 40 | Title 41 | FastCoding 42 | Type 43 | PSGroupSpecifier 44 | 45 | 46 | FooterText 47 | Copyright (c) 2013-Present, Joel Levin 48 | All rights reserved. 49 | 50 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 51 | 52 | Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 53 | Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 54 | Neither the name of JLRoutes nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 55 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 56 | 57 | Title 58 | JLRoutes 59 | Type 60 | PSGroupSpecifier 61 | 62 | 63 | FooterText 64 | TheSidebarController 65 | 66 | Copyright (c) 2013 Jon Danao (danao.org | jondanao) 67 | 68 | Permission is hereby granted, free of charge, to any person obtaining a copy 69 | of this software and associated documentation files (the "Software"), to deal 70 | in the Software without restriction, including without limitation the rights 71 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 72 | copies of the Software, and to permit persons to whom the Software is 73 | furnished to do so, subject to the following conditions: 74 | 75 | The above copyright notice and this permission notice shall be included in 76 | all copies or substantial portions of the Software. 77 | 78 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 79 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 80 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 81 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 82 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 83 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 84 | THE SOFTWARE. 85 | Title 86 | TheSidebarController 87 | Type 88 | PSGroupSpecifier 89 | 90 | 91 | FooterText 92 | Generated by CocoaPods - http://cocoapods.org 93 | Title 94 | 95 | Type 96 | PSGroupSpecifier 97 | 98 | 99 | StringsTable 100 | Acknowledgements 101 | Title 102 | Acknowledgements 103 | 104 | 105 | -------------------------------------------------------------------------------- /GDRouting-Example/Pods/JLRoutes/JLRoutes/JLRoutes.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2013, Joel Levin 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 6 | 7 | Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 8 | Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 9 | Neither the name of JLRoutes nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 10 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 11 | */ 12 | 13 | #import 14 | 15 | 16 | static NSString *const kJLRoutePatternKey = @"JLRoutePattern"; 17 | static NSString *const kJLRouteURLKey = @"JLRouteURL"; 18 | static NSString *const kJLRouteNamespaceKey = @"JLRouteNamespace"; 19 | static NSString *const kJLRouteWildcardComponentsKey = @"JLRouteWildcardComponents"; 20 | static NSString *const kJLRoutesGlobalNamespaceKey = @"JLRoutesGlobalNamespace"; 21 | 22 | 23 | @interface JLRoutes : NSObject 24 | /** @class JLRoutes 25 | JLRoutes is a way to manage URL routes and invoke them from a URL. 26 | */ 27 | 28 | /// Returns the global routing namespace (this is used by the +addRoute methods by default) 29 | + (instancetype)globalRoutes; 30 | 31 | /// Returns a routing namespace for the given scheme 32 | + (instancetype)routesForScheme:(NSString *)scheme; 33 | 34 | /// Tells JLRoutes that it should manually replace '+' in parsed values to ' '. Defaults to YES. 35 | + (void)setShouldDecodePlusSymbols:(BOOL)shouldDeecode; 36 | + (BOOL)shouldDecodePlusSymbols; 37 | 38 | /// Registers a routePattern with default priority (0) in the receiving scheme namespace. 39 | + (void)addRoute:(NSString *)routePattern handler:(BOOL (^)(NSDictionary *parameters))handlerBlock; 40 | - (void)addRoute:(NSString *)routePattern handler:(BOOL (^)(NSDictionary *parameters))handlerBlock; // instance method 41 | 42 | /// Removes a routePattern from the receiving scheme namespace. 43 | + (void)removeRoute:(NSString *)routePattern; 44 | - (void)removeRoute:(NSString *)routePattern; // instance method 45 | 46 | /// Removes all routes from the receiving scheme namespace. 47 | + (void)removeAllRoutes; 48 | - (void)removeAllRoutes; // instance method 49 | 50 | /// Unregister and delete an entire scheme namespace 51 | + (void)unregisterRouteScheme:(NSString *)scheme; 52 | 53 | /// Registers a routePattern with default priority (0) using dictionary-style subscripting. 54 | - (void)setObject:(id)handlerBlock forKeyedSubscript:(NSString *)routePatten; 55 | 56 | /// Registers a routePattern in the global scheme namespace with a handlerBlock to call when the route pattern is matched by a URL. 57 | /// The block returns a BOOL representing if the handlerBlock actually handled the route or not. If 58 | /// a block returns NO, JLRoutes will continue trying to find a matching route. 59 | + (void)addRoute:(NSString *)routePattern priority:(NSUInteger)priority handler:(BOOL (^)(NSDictionary *parameters))handlerBlock; 60 | - (void)addRoute:(NSString *)routePattern priority:(NSUInteger)priority handler:(BOOL (^)(NSDictionary *parameters))handlerBlock; // instance method 61 | 62 | /// Routes a URL, calling handler blocks (for patterns that match URL) until one returns YES, optionally specifying add'l parameters 63 | + (BOOL)routeURL:(NSURL *)URL; 64 | + (BOOL)routeURL:(NSURL *)URL withParameters:(NSDictionary *)parameters; 65 | 66 | - (BOOL)routeURL:(NSURL *)URL; // instance method 67 | - (BOOL)routeURL:(NSURL *)URL withParameters:(NSDictionary *)parameters; // instance method 68 | 69 | /// Returns whether a route exists for a URL 70 | + (BOOL)canRouteURL:(NSURL *)URL; 71 | + (BOOL)canRouteURL:(NSURL *)URL withParameters:(NSDictionary *)parameters; 72 | 73 | - (BOOL)canRouteURL:(NSURL *)URL; // instance method 74 | - (BOOL)canRouteURL:(NSURL *)URL withParameters:(NSDictionary *)parameters; // instance method 75 | 76 | /// Prints the entire routing table 77 | + (NSString *)description; 78 | 79 | /// Allows configuration of verbose logging. Default is NO. This is mostly just helpful with debugging. 80 | + (void)setVerboseLoggingEnabled:(BOOL)loggingEnabled; 81 | + (BOOL)isVerboseLoggingEnabled; 82 | 83 | /// Controls whether or not this routes controller will try to match a URL with global routes if it can't be matched in the current namespace. Default is NO. 84 | @property (nonatomic, assign) BOOL shouldFallbackToGlobalRoutes; 85 | 86 | /// Called any time routeURL returns NO. Respects shouldFallbackToGlobalRoutes. 87 | @property (nonatomic, copy) void (^unmatchedURLHandler)(JLRoutes *routes, NSURL *URL, NSDictionary *parameters); 88 | 89 | @end 90 | -------------------------------------------------------------------------------- /GDRouting-Example/Pods/TheSidebarController/TheSidebarController/Animations/SidebarAirbnbAnimation.m: -------------------------------------------------------------------------------- 1 | // SidebarAirbnbAnimation.m 2 | // TheSidebarController 3 | // 4 | // Copyright (c) 2014 Jon Danao (danao.org | jondanao) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | 25 | #import "SidebarAirbnbAnimation.h" 26 | 27 | @implementation SidebarAirbnbAnimation 28 | 29 | + (void)animateContentView:(UIView *)contentView sidebarView:(UIView *)sidebarView fromSide:(Side)side visibleWidth:(CGFloat)visibleWidth duration:(NSTimeInterval)animationDuration completion:(void (^)(BOOL))completion 30 | { 31 | [self resetSidebarPosition:sidebarView]; 32 | [self resetContentPosition:contentView]; 33 | 34 | 35 | // Animation settings for content view 36 | CATransform3D contentTransform = CATransform3DIdentity; 37 | contentTransform.m34 = -1.0f / 800.0f; 38 | contentView.layer.zPosition = 100; 39 | 40 | // Animation settings for menu view 41 | CATransform3D sidebarTransform = CATransform3DIdentity; 42 | sidebarTransform = CATransform3DScale(sidebarTransform, 1.7, 1.7, 1.7); 43 | sidebarView.layer.transform = sidebarTransform; 44 | 45 | sidebarTransform = CATransform3DIdentity; 46 | sidebarTransform = CATransform3DScale(sidebarTransform, 1.0, 1.0, 1.0); 47 | 48 | if(side == LeftSide) 49 | { 50 | contentTransform = CATransform3DTranslate(contentTransform, visibleWidth - (contentView.frame.size.width / 2 * 0.4), 0.0, 0.0); 51 | contentTransform = CATransform3DScale(contentTransform, 0.6, 0.6, 0.6); 52 | contentTransform = CATransform3DRotate(contentTransform, DEG2RAD(-45), 0.0, 1.0, 0.0); 53 | } 54 | else 55 | { 56 | contentTransform = CATransform3DTranslate(contentTransform, 0 - visibleWidth + (contentView.frame.size.width / 2 * 0.4), 0.0, 0.0); 57 | contentTransform = CATransform3DScale(contentTransform, 0.6, 0.6, 0.6); 58 | contentTransform = CATransform3DRotate(contentTransform, DEG2RAD(45), 0.0, 1.0, 0.0); 59 | } 60 | 61 | 62 | // Animate content view 63 | [UIView animateWithDuration:animationDuration 64 | delay:0.0 65 | options:UIViewAnimationOptionCurveEaseInOut 66 | animations:^{ 67 | contentView.layer.transform = contentTransform; 68 | } 69 | completion:^(BOOL finished) { 70 | completion(finished); 71 | }]; 72 | 73 | // Animate menu view 74 | [UIView animateWithDuration:animationDuration 75 | delay:0.0 76 | options:UIViewAnimationOptionCurveEaseInOut 77 | animations:^{ 78 | sidebarView.layer.transform = sidebarTransform; 79 | } 80 | completion:nil]; 81 | } 82 | 83 | 84 | + (void)reverseAnimateContentView:(UIView *)contentView sidebarView:(UIView *)sidebarView fromSide:(Side)side visibleWidth:(CGFloat)visibleWidth duration:(NSTimeInterval)animationDuration completion:(void (^)(BOOL))completion 85 | { 86 | // Animation settings for content view 87 | CATransform3D contentTransform = CATransform3DIdentity; 88 | contentTransform.m34 = -1.0f / 800.0f; 89 | contentView.layer.zPosition = 100; 90 | contentTransform = CATransform3DTranslate(contentTransform, 0.0, 0.0, 0.0); 91 | contentTransform = CATransform3DScale(contentTransform, 1.0, 1.0, 1.0); 92 | contentTransform = CATransform3DRotate(contentTransform, DEG2RAD(0), 0.0, 1.0, 0.0); 93 | 94 | // Animation settings for menu view 95 | __block CATransform3D sidebarTransform = CATransform3DIdentity; 96 | sidebarTransform = CATransform3DScale(sidebarTransform, 1.7, 1.7, 1.7); 97 | 98 | 99 | // Animate content view 100 | [UIView animateWithDuration:animationDuration 101 | delay:0.0 102 | options:UIViewAnimationOptionCurveEaseInOut 103 | animations:^{ 104 | contentView.layer.transform = contentTransform; 105 | } 106 | completion:^(BOOL finished) { 107 | completion(finished); 108 | }]; 109 | 110 | // Animate menu view 111 | [UIView animateWithDuration:animationDuration 112 | delay:0.0 113 | options:UIViewAnimationOptionCurveEaseInOut 114 | animations:^{ 115 | sidebarView.layer.transform = sidebarTransform; 116 | } 117 | completion:^(BOOL finished) { 118 | sidebarTransform = CATransform3DIdentity; 119 | sidebarTransform = CATransform3DScale(sidebarTransform, 1.0, 1.0, 1.0); 120 | sidebarView.layer.transform = sidebarTransform; 121 | }]; 122 | } 123 | 124 | @end 125 | -------------------------------------------------------------------------------- /GDRouting-Example/Pods/TheSidebarController/README.md: -------------------------------------------------------------------------------- 1 | # TheSidebarController 2 | 3 | 4 | 5 | TheSidebarController is a container view controller that manages 3 main view controllers namely - `contentViewController`, `leftSidebarController` and the `rightSidebarController`. Reveal the sidebar by calling either one of the following methods: 6 | 7 | 8 | ### Presentation Methods 9 | 10 | - **`presentLeftSidebarViewController`** - presents the left sidebar using the default Facebook type animation 11 | - **`presentLeftSidebarViewControllerWithStyle:`** - presents the left sidebar by specifying one of the available presentation styles 12 | - **`presentRightSidebarViewController`** - presents the right sidebar using the default Facebook type animation 13 | - **`presentRightSidebarViewControllerWithStyle:`** - presents the right sidebar by specifying one of the available presentation styles 14 | 15 | ### Transition Styles 16 | - **`SidebarTransitionStyleFacebook`** - Content slides to reveal sidebar 17 | - **`SidebarTransitionStyleAirbnb`** - Content rotates in 3D space to reveal sidebar 18 | - **`SidebarTransitionStyleLuvocracy`** - Content zooms out to reveal sidebar 19 | - **`SidebarTransitionStyleFeedly`** - Sidebar slides over content 20 | - **`SidebarTransitionStyleFlipboard`** - Sidebar slides over while content zooms out 21 | - **`SidebarTransitionStyleWunderlist`** - Content and sidebar slide making a parallax effect 22 | 23 | ### Delegation Methods 24 | - **`sidebarController:willShowViewController:`** 25 | - **`sidebarController:didShowViewController:`** 26 | - **`sidebarController:willHideViewController:`** 27 | - **`sidebarController:didHideViewController:`** 28 | 29 | 30 | This project is inspired by [RESideMenu](https://github.com/romaonthego/RESideMenu/). I almost copied everything. Thanks Roman! :) 31 | 32 | 33 | ## Installation 34 | 35 | ### Manual 36 | 37 | Drag and drop `TheSidebarController` folder into your project. Add `#import "TheSidebarController.h"` to all view controllers that need to use it. 38 | 39 | ### Cocoapods 40 | 41 | Cocoapods is amazing. If you're still not using it, start now! This is the recommended approach to manage your dependencies. Learn from their official website: [http://guides.cocoapods.org/](http://guides.cocoapods.org/) 42 | 43 | `TODO` 44 | 45 | 46 | ## Sample Usage 47 | 48 | 49 | ### In your AppDelegate 50 | 51 | ```objective-c 52 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 53 | { 54 | ContentViewController *contentViewController = [[ContentViewController alloc] init]; 55 | UINavigationController *contentNavigationController = [[UINavigationController alloc] initWithRootViewController:contentViewController]; 56 | 57 | LeftSidebarViewController *leftSidebarViewController = [[LeftSidebarViewController alloc] init]; 58 | RightSidebarViewController *rightSidebarViewController = [[RightSidebarViewController alloc] init]; 59 | 60 | TheSidebarController *sidebarController = [[TheSidebarController alloc] initWithContentViewController:contentNavigationController 61 | leftSidebarViewController:leftSidebarViewController 62 | rightSidebarViewController:rightSidebarViewController]; 63 | 64 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 65 | self.window.backgroundColor = [UIColor whiteColor]; 66 | self.window.rootViewController = sidebarController; 67 | [self.window makeKeyAndVisible]; 68 | return YES; 69 | } 70 | ``` 71 | 72 | ### Present the sidebar view controller 73 | 74 | ```objective-c 75 | [self.sidebarController presentLeftSidebarViewControllerWithStyle:SidebarTransitionStyleFacebook]; 76 | ``` 77 | 78 | 79 | ### Dismiss the sidebar view controller 80 | 81 | ```objective-c 82 | [self.sidebarController dismissSidebarViewController]; 83 | ``` 84 | 85 | 86 | ### Replace content view controller 87 | 88 | ```objective-c 89 | self.sidebarController.contentViewController = [[UIViewController alloc] init]; 90 | ``` 91 | 92 | ## Requirements 93 | 94 | - Xcode 5 or higher 95 | - iOS 7.0 or higher 96 | - ARC 97 | 98 | 99 | ## Demo 100 | 101 | Build and run the `Examples/Basic` and `Examples/KitchenSink` projects in Xcode to see TheSidebarController in action. 102 | 103 | 104 | ## Known Bugs 105 | 106 | CATransform3D does not play well with autorotation. A simple 3D rotate screws up view positions when device orientation changes. Would appreciate some help on this. 107 | 108 | 109 | ## Feature Requests and Contributing 110 | 111 | Forks, patches and other feedback are welcome. 112 | 113 | 114 | ## Contact 115 | 116 | #### Jon Danao 117 | 118 | - https://github.com/jondanao 119 | - https://twitter.com/jondanao 120 | - jondanao@gmail.com 121 | 122 | 123 | ## License 124 | 125 | TheSidebarController is available under the MIT license. 126 | 127 | Copyright (c) 2013 Jon Danao (danao.org | jondanao) 128 | 129 | Permission is hereby granted, free of charge, to any person obtaining a copy 130 | of this software and associated documentation files (the "Software"), to deal 131 | in the Software without restriction, including without limitation the rights 132 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 133 | copies of the Software, and to permit persons to whom the Software is 134 | furnished to do so, subject to the following conditions: 135 | 136 | The above copyright notice and this permission notice shall be included in 137 | all copies or substantial portions of the Software. 138 | 139 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 140 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 141 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 142 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 143 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 144 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 145 | THE SOFTWARE. -------------------------------------------------------------------------------- /GDRouting-Example/Pods/JLRoutes/README.md: -------------------------------------------------------------------------------- 1 | JLRoutes 2 | ======== 3 | 4 | ### What is it? ### 5 | JLRoutes is advanced URL parsing with a block-based callback API. It is designed to make it very easy to handle complex URL schemes in your application without having to do any URL or string parsing of any kind. 6 | 7 | [More information on how to register custom URL schemes in your application's Info.plist.](http://developer.apple.com/library/ios/documentation/iphone/conceptual/iphoneosprogrammingguide/AdvancedAppTricks/AdvancedAppTricks.html#//apple_ref/doc/uid/TP40007072-CH7-SW50) 8 | 9 | ### Features ### 10 | * Simple API with minimal impact to existing codebases 11 | * Parse any number of parameters interleaved throughout the URL 12 | * Wildcard parameter support 13 | * Seamlessly parses out query string and fragment parameters and passes them along as part of the parameters dictionary 14 | * Route prioritization 15 | * Scheme namespaces to easily segment routes and block handlers for multiple schemes 16 | * Return NO from a handler block for JLRoutes to look for the next matching route 17 | * Optional verbose logging 18 | * Pretty-print the whole routing table 19 | * No dependencies other than Foundation 20 | 21 | ### Simple Example ### 22 | ```objc 23 | // in your app delegate: 24 | 25 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 26 | // ... 27 | [JLRoutes addRoute:@"/user/view/:userID" handler:^BOOL(NSDictionary *parameters) { 28 | NSString *userID = parameters[@"userID"]; // defined in the route by specifying ":userID" 29 | // present UI for viewing user with ID 'userID' 30 | return YES; // return YES to say we have handled the route 31 | }]; 32 | // ... 33 | return YES; 34 | } 35 | 36 | - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation { 37 | return [JLRoutes routeURL:url]; 38 | } 39 | ``` 40 | 41 | After having set that route up, at any point something (including a different application) could call this to fire the handler block: 42 | ```objc 43 | NSURL *viewUserURL = [NSURL URLWithString:@"myapp://user/view/joeldev"]; 44 | [[UIApplication sharedApplication] openURL:viewUserURL]; 45 | ``` 46 | 47 | In this example, the userID object in the parameters dictionary passed to the block would have the key/value pair `"userID": "joeldev"`, which could then be used to present a UI or do whatever else is needed. 48 | 49 | ### The Parameters Dictionary ### 50 | 51 | The parameters dictionary always contains at least the following three keys: 52 | ```json 53 | { 54 | "JLRouteURL": "(the NSURL that caused this block to be fired)", 55 | "JLRoutePattern": "(the actual route pattern string)", 56 | "JLRouteNamespace": "(the route namespace, defaults to JLRoutesGlobalNamespace)" 57 | } 58 | ``` 59 | 60 | The JLRouteNamespace key refers to the namespace that the matched route lives in. [Read more about namespaces.](https://github.com/joeldev/JLRoutes#scheme-namespaces) 61 | 62 | These keys are defined as constants in JLRoutes.h for easy use. 63 | 64 | ```objc 65 | static NSString *const kJLRoutePatternKey = @"JLRoutePattern"; 66 | static NSString *const kJLRouteURLKey = @"JLRouteURL"; 67 | static NSString *const kJLRouteNamespaceKey = @"JLRouteNamespace"; 68 | ``` 69 | 70 | ### Handler Block ### 71 | 72 | As you may have noticed, the handler block is expected to return a boolean for if it has handled the route or not. If the block returns `NO`, JLRoutes will behave as if that route is not a match and it will continue looking for a match. A route is considered to be a match if the pattern string matches **and** the block returns `YES`. 73 | 74 | It is also important to note that if you pass nil for the handler block, an internal handler block will be created that simply returns `YES`. 75 | 76 | ### More Complex Example ### 77 | 78 | ```objc 79 | [JLRoutes addRoute:@"/:object/:action/:primaryKey" handler:^BOOL(NSDictionary *parameters) { 80 | NSString *object = parameters[@"object"]; 81 | NSString *action = parameters[@"action"]; 82 | NSString *primaryKey = parameters[@"primaryKey"]; 83 | // stuff 84 | return YES; 85 | }]; 86 | ``` 87 | 88 | This route would match things like `/user/view/joeldev` or `/post/edit/123`. Let's say you called `/post/edit/123` with some URL params as well: 89 | 90 | ```objc 91 | NSURL *editPost = [NSURL URLWithString:@"myapp://post/edit/123?debug=true&foo=bar"]; 92 | [[UIApplication sharedApplication] openURL:editPost]; 93 | ``` 94 | 95 | The parameters dictionary that the handler block receives would contain the following key/value pairs: 96 | ```json 97 | { 98 | "object": "post", 99 | "action": "edit", 100 | "primaryKey": "123", 101 | "debug": "true", 102 | "foo": "bar", 103 | "JLRouteURL": "myapp://post/edit/123?debug=true&foo=bar", 104 | "JLRoutePattern": "/:object/:action/:primaryKey", 105 | "JLRouteNamespace": "JLRoutesGlobalNamespace" 106 | } 107 | ``` 108 | 109 | ### Scheme Namespaces ### 110 | 111 | JLRoutes supports setting up routes within the namespace of a given URL scheme. Routes that are set up within the namespace of a single scheme can only be matched by URLs that use that same scheme. By default, all routes go into the global scheme. The current +addRoute methods will use this scheme, and no functionality is different. 112 | 113 | However, if you decide that you do need to handle multiple schemes with different sets of functionality, here is an example of how to do that: 114 | 115 | ```objc 116 | [JLRoutes addRoute:@"/foo" handler:^BOOL(NSDictionary *parameters) { 117 | // This block is called if the scheme is not 'thing' or 'stuff' (see below) 118 | return YES; 119 | }]; 120 | 121 | [[JLRoutes routesForScheme:@"thing"] addRoute:@"/foo" handler:^BOOL(NSDictionary *parameters) { 122 | // This block is called for thing://foo 123 | return YES; 124 | }]; 125 | 126 | [[JLRoutes routesForScheme:@"stuff"] addRoute:@"/foo" handler:^BOOL(NSDictionary *parameters) { 127 | // This block is called for stuff://foo 128 | return YES; 129 | }]; 130 | ``` 131 | 132 | This example shows that you can declare the same routes in different schemes and handle them with different callbacks on a per-scheme basis. 133 | 134 | Continuing with this example, if you were to add the following route to the collection above: 135 | 136 | ```objc 137 | [JLRoutes addRoute:@"/global" handler:^BOOL(NSDictionary *parameters) { 138 | return YES; 139 | }]; 140 | ``` 141 | 142 | and then try to route the URL `thing://global`, it would not match because that route has not been declared within the namespace `thing` but has instead been declared within the global namespace (which we'll assume is how the developer wants it). However, you can easily change this behavior by setting the following property to `YES`: 143 | 144 | ```objc 145 | [JLRoutes routesForScheme:@"thing"].shouldFallbackToGlobalRoutes = YES; 146 | ``` 147 | 148 | This tells JLRoutes that if a URL cannot be routed within the namespace `thing` (aka, it starts with `thing:` but no appropriate route can be found in the namespace), try to recover by looking for a matching route in the global routes namespace as well. After setting that property to `YES`, the URL 'thing://global` would be routed to the /global block. 149 | 150 | 151 | ### Wildcard routes ### 152 | 153 | JLRoutes supports setting up routes that will match an arbitrary number of path components at the end of the routed URL. An array containing the additional path components will be added to the parameters dictionary with the key `kJLRouteWildcardComponentsKey`. 154 | 155 | For example, the following route would be triggerd for any URL that started with `/wildcard/`, but would be rejected by the handler if the next component wasn't `joker`. 156 | 157 | ```objc 158 | [JLRoutes addRoute:@"/wildcard/*" handler:^BOOL(NSDictionary *parameters) { 159 | NSArray *pathComponents = parameters[kJLRouteWildcardComponentsKey]; 160 | if ([pathComponents count] > 0 && [pathComponents[0] isEqualToString:@"joker"]) { 161 | // the route matched; do stuff 162 | return YES; 163 | } 164 | 165 | // not interested unless the joker's in it 166 | return NO; 167 | }]; 168 | ``` 169 | 170 | ### Installation ### 171 | JLRoutes is available for installation via CocoaPods. 172 | 173 | ### Requirements ### 174 | * ARC 175 | * iOS 5.0+ or OS X 10.7+ 176 | * Foundation.framework 177 | 178 | ### License ### 179 | BSD 3-Clause License: 180 | > Copyright (c) 2013, Joel Levin. All rights reserved. 181 | 182 | > Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 183 | 184 | >* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 185 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 186 | * Neither the name of JLRoutes nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 187 | 188 | > THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 189 | 190 | -------------------------------------------------------------------------------- /GDRouting-Example/Pods/FastCoding/README.md: -------------------------------------------------------------------------------- 1 | Purpose 2 | -------------- 3 | 4 | FastCoder is a high-performance binary serialization format for Cocoa objects and object graphs. It is intended as a replacement for NSPropertyList, NSJSONSerializer, NSKeyedArchiver/Unarchiver and Core Data. 5 | 6 | The design goals of the FastCoder library are to be fast, flexible and secure. 7 | 8 | FastCoder is already faster (on average) for reading than any of the built-in serialization mechanisms in Cocoa, and is faster for writing than any mechanism except for JSON (which doesn't support arbitrary object types). File size is smaller than NSKeyedArchiver, and comparable to the other methods. 9 | 10 | FastCoder supports more data types than either JSON or Plist coding (including NSURL, NSValue, NSSet and NSOrderedSet), and allows all supported object types to be used as the keys in a dictionary, not just strings. 11 | 12 | FastCoder can also serialize your custom classes automatically using property inspection. For cases where this doesn't work automatically, you can easily implement your own serialization using the FastCoding Protocol. 13 | 14 | 15 | Supported OS & SDK Versions 16 | ----------------------------- 17 | 18 | * Supported build target - iOS 7.0 / Mac OS 10.9 (Xcode 5.0, Apple LLVM compiler 5.0) 19 | * Earliest supported deployment target - iOS 5.0 / Mac OS 10.7 20 | * Earliest compatible deployment target - iOS 4.0 / Mac OS 10.6 21 | 22 | NOTE: 'Supported' means that the library has been tested with this version. 'Compatible' means that the library should work on this OS version (i.e. it doesn't rely on any unavailable SDK features) but is no longer being tested for compatibility and may require tweaking or bug fixes to run correctly. 23 | 24 | 25 | ARC Compatibility 26 | ------------------ 27 | 28 | FastCoder is compatible with both ARC and non-ARC compile targets, however performance is better when running with ARC disabled, and it is recommended that you apply the -fno-objc-arc compiler flag to the FastCoder.m class. To do this, go to the Build Phases tab in your target settings, open the Compile Sources group, double-click FastCoder.m in the list and type -fno-objc-arc into the popover. 29 | 30 | 31 | Thread Safety 32 | -------------- 33 | 34 | It is safe to call the FastCoder encoding and decoding method concurrently from multiple threads. It should be safe to encode the same object concurrently on multiple threads provided that you do not mutate the object while it is being encoded. 35 | 36 | 37 | Installation 38 | -------------- 39 | 40 | To use FastCoder, just drag the FastCoder.h and .m files into your project. 41 | 42 | 43 | FastCoder methods 44 | ----------------------------- 45 | 46 | FastCoder implements the following methods: 47 | 48 | + (id)objectWithData:(NSData *)data; 49 | 50 | Constructs an object tree from an FastCoded data object and returns it. 51 | 52 | + (NSData *)dataWithRootObject:(id)object; 53 | 54 | Archives an object graph as a block of data, which can then be saved to a file or transmitted. 55 | 56 | 57 | The FastCoding Protocol 58 | ----------------------------- 59 | 60 | FastCoding supports encoding/decoding of arbitrary objects using the FastCoding protocol. The FastCoding protocol is an *informal* protocol, implemented as a category on NSObject. The protocol consists of the following methods: 61 | 62 | + (NSArray *)fastCodingKeys; 63 | 64 | This method returns a list of property names that should be encoded/decoded for an object. The default implementation automatically detects all of the non-virtual (i.e. ivar-backed) @properties (including private and read-only properties) of the object and returns them, so in most cases it is not necessary to override this method. **NOTE:** if you override fastCodingKeys, you should only include keys for the current class, not properties that are inherited from the superclass(es). 65 | 66 | - (id)awakeAfterFastCoding; 67 | 68 | This method is called after an object has been deserialised using the FastCoding protocol, and all of its properties have been set. The deserialised object will be replaced by the one returned by this method, so you can use this method to either modify or completely replace the object. The default implementation just returns self. **NOTE**: returning a different object from -awakeAfterFastCoding may lead to unexpected behaviour if the object being decoded (or any of its children) contains a reference to itself. 69 | 70 | - (Class)classForFastCoding; 71 | 72 | This method is used to supply an alternative class to use for coding/decoding an object. This works the same way as the -classForCoder method of NSCoding, and by default returns the same value. 73 | 74 | 75 | Overriding Default FastCoding Behaviour 76 | ------------------------------------------- 77 | 78 | If you wish to exclude certain properties of your object from being encoded, you can do so in any of the following ways: 79 | 80 | * Only use an ivar, without declaring a matching @property. 81 | * Change the name of the ivar to something that is not KVC compliant (i.e. not the same as the property, or the property name with an _ prefix). You can do this using the @synthesize method, e.g. @synthesize foo = unencodableFoo; 82 | * Override the +fastCodingKeys method 83 | 84 | If you wish to encode additional data that is not represented by an @property, override the +fastCodingKeys method and add the names of your virtual properties. You will need to implement suitable setter/getter methods for these properties, or the encoding/decoding process won't work. 85 | 86 | If you wish to substitute a different class for decoding, you can implement the -classForFastCoding method and FastCoding will encode the object as that class instead. If you wish to substitute a different object after decoding, use the -awakeAfterFastCoding method. 87 | 88 | If you have removed or renamed a property of a class, and want to provide backward compatibility for a previously saved FastCoder file, you should implement a private setter method for the old property, which you can then map to wherever it should go in the new object structure. E.g. if the old property was called foo, add a private -setFoo: method. Alternatively, override the -setValue:forUndefinedKey: method to gracefully handle any unknown property. 89 | 90 | 91 | Security 92 | -------------- 93 | 94 | The FastCoding parser checks for buffer overflow errors whilst parsing, and will throw an exception if the data instructs it to try to read past the end of the data file. This should prevent most kinds of code injection attack. 95 | 96 | Whilst it is not possible to use a FastCoded file to inject code, as with NSCoding, an attacker use a modified FastCoded file to cause unexpected classes to be created in your object graph, which might present a potential attack risk (note that only classes that already exist in your code base or a built-in Framework can be created this way). 97 | 98 | For the time being, it is best not to try to load FastCoded files from an untrusted source (although it is fine to use them for saving data internally within your application). A future release of the FastCoding library will attempt to address this issue by whitelisting classes for decoding. 99 | 100 | 101 | Bootstrapping 102 | --------------------- 103 | 104 | Sometimes it is useful to be able to define an object graph by hand using a human-readable format such as JSON, but it's time consuming to write the recursive logic needed to convert the JSON dictionaries to the correct custom objects, and error prone. 105 | 106 | FastCoder has a neat feature that allows you to "bootstrap" a carefully structured JSON or Plist file into a native object graph via the FastCoding format. To define an object of class Foo using JSON, you would use the following code: 107 | 108 | { 109 | "$class": "Foo", 110 | "someProperty1": 1 111 | "someProperty2": "Hello World!" 112 | } 113 | 114 | You could then load this as an ordinary NSDictionary using NSJSONSerialization. But when you then convert this to data using FastCoder, it will detect the $class key and save this using the custom object record format instead of as a dictionary. When the resultant FastCoded data is decoded again, this will be initialized as an object of type Foo instead of a dictionary. 115 | 116 | If you attempt to load the FastCoded file in an app that doesn't contain a class called Foo, the Foo object will just be loaded as an ordinary dictionary with a $class key, and then saved as a custom object again when the object is re-serialized. This means that it is possible to write applications and scripts that can process arbitrary FastCoded files without needing to know about or implement all of the classes used in the file (this is not possible using NSCoding, or at least would require a lot more work). 117 | 118 | 119 | Aliases 120 | --------------- 121 | 122 | Another limitation of ordinary Plist or JSON files versus NSKeyedArchive or FastCoded files is that they don't support pointers or references. If you want multiple dictionary keys in a JSON file to point to the same object instance, there's no way to do that.FastCoding solves this problem using aliases. 123 | 124 | As with the $class syntax used for bootstrapping custom object types, FastCoding treats a key with the name $alias as an internal file reference. The $alias value is a keypath relative to the root object in the file, used to specify an existing object instance. For example, see the following JSON: 125 | 126 | { 127 | "foo": { 128 | "baz": { "text": "Hello World" }, 129 | "someProperty1": 1 130 | }, 131 | "bar": { 132 | "baz": { "text": "Hello World" }, 133 | "someProperty2": 2 134 | } 135 | } 136 | 137 | Here, the objects foo and bar both contain an object baz. But I'd like foo and bar to both reference the same baz instance. I would do that as follows: 138 | 139 | { 140 | "foo": { 141 | "baz": { "text": "Hello World" }, 142 | "someProperty1": 1 143 | }, 144 | "bar": { 145 | "baz": { "$alias": "foo.baz" } 146 | "someProperty2": 2 147 | } 148 | } 149 | 150 | Note that the baz inside bar contains an alias to the baz inside foo. When saved as a FastCoder file and the loaded again, these will actually be the same object. It doesn't matter whether bar.baz aliases foo.baz or vice-versa; FastCoder aliasing supports forward references, and even circular references (where an object contains an alias to itself). The alias syntax works like a keypath, although unlike regular keypaths you can using numbers to represent array indices. For example, in the following code, foo points to the second object in the bar array ("Cruel"): 151 | 152 | { 153 | "foo": { "$alias": "bar.1" }, 154 | "bar": [ "Goodbye", "Cruel", "World" ] 155 | } 156 | 157 | 158 | File structure 159 | --------------------------- 160 | 161 | The FastArchive format is very simple: 162 | 163 | There is a header consisting of a a 32-bit identifier, followed by two 16-bit version numbers (major and minor). The header is followed by a 32-bit integer representing the total number of unique objects encoded in the file (this is not the same as the number of chunks). This value can be used to set the size of the capacity of the known object cache in advance, which provides some performance benefit. If the object count is not set (has a value of zero), the cache will be grown dynamically. 164 | 165 | Following the header and object count, there are a series of chunks. Each chunk consists of a 32-bit type identifier, followed by 0 or more additional bytes of data, depending on the chunk type. 166 | 167 | Commonly used types and values are represented by their own chunk in order to reduce file size and processing overhead. Other types such as strings or collections are encoded in the sequence of bytes that follow the chunk. 168 | 169 | Chunks are always 32-bit (4-byte) aligned. Most chunk types have sizes that are a multiples of 32 bits anyway, but strings and data objects whose length is not an exact multiple of 4 bytes are padded to the nearest 4-byte offset. 170 | 171 | The chunk types supported by FastCoding are: 172 | 173 | FCTypeNull an NSNull value 174 | FCTypeAlias an alias to an previously encoded chunk in the file 175 | FCTypeString an NSString instance 176 | FCTypeDictionary an NSDictionary instance 177 | FCTypeArray an NSArray instance 178 | FCTypeSet an NSSet instance 179 | FCTypeOrderedSet an NSOrderedSet instance 180 | FCTypeTrue a boolean YES value 181 | FCTypeFalse a boolean NO value 182 | FCTypeInt32 a 32-bit integer value 183 | FCTypeInt64 a 64-bit integer value 184 | FCTypeFloat32 a 32-bit floating point value 185 | FCTypeFloat64 a 64-bit floating point value 186 | FCTypeData an NSData instance 187 | FCTypeDate an NSDate instance 188 | FCTypeMutableString an NSMutableString instance 189 | FCTypeMutableDictionary an NSMutableDictionary instance 190 | FCTypeMutableArray an NSMutableArray instance 191 | FCTypeMutableSet an NSMutableSet instance 192 | FCTypeMutableOrderedSet an NSMutableOrderedSet instance 193 | FCTypeMutableData an NSMutableData instance 194 | FCTypeClassDefinition a class definition (this is a private, internal object type used for object encoding) 195 | FCTypeObject an arbitrary object, encoded using the FastCoding protocol 196 | FCTypeNil a nil value (not the same as NSNull), used for nil object properties 197 | FCTypeURL an NSURL value 198 | FCTypePoint an NSPoint/CGPoint value 199 | FCTypeSize an NSSize/CGSize value 200 | FCTypeRect an NSRect/CGRect value 201 | FCTypeRange an NSRange value 202 | FCTypeAffineTransform a CGAffineTransform value 203 | FCType3DTransform a CATransform3D value 204 | 205 | 206 | Release notes 207 | ------------------ 208 | 209 | Version 2.1.8 210 | 211 | - Fixed memory leak when writing data 212 | 213 | Version 2.1.7 214 | 215 | - Fixed crash when saving 216 | 217 | Version 2.1.6 218 | 219 | - Fixed some conversion warnings when using ARC 220 | 221 | Version 2.1.5 222 | 223 | - Major speed improvements to object encoding (decoding speed is unaffected) 224 | - FIxed some potential bugs cuased by empty strings or collections 225 | - Fixed some minor memory leaks 226 | 227 | Version 2.1.4 228 | 229 | - Fixed bug when encoding NSURLs. 230 | 231 | Version 2.1.3 232 | 233 | - Fixed issue where properties from inherited classes would not be coded 234 | - fastCodingKeys no longer includes properties with nonstandard ivar names (this brings the behaviour in line with the documentation) 235 | - Fixed some compiler warnings 236 | 237 | Version 2.1.2 238 | 239 | - Fixed crash when loading bootstrapped objects 240 | - Added benchmark for coding custom objects 241 | 242 | Version 2.1.1 243 | 244 | - Fixed a bug where multiple aliases to an object that returns a different instance from -awakeAfterFastCoding would not work correctly. This fix improves the common case, but there are still some caveats (see the documentation for the -awakeAfterFastCoding method for details). 245 | 246 | Version 2.1 247 | 248 | - Encoding NSURL and NSValue is now supported 249 | - Immutable arrays, dictionaries and sets are no longer converted to mutable variants when encoded 250 | - Added -classForFastCoding method (to avoid conflicts with NSCoding) 251 | - Fixed a bug in object bootrapping when a $class dictionary does not contain a value for every property of the class that it represents 252 | - FastCoding 2.1 is fully backwards compatible (can read version 2.0 files). FastCoding 2.1 files can be read by a 2.0 implementation provided that they do not include any of the new data types 253 | 254 | Version 2.0.1 255 | 256 | - Fixed bug in NSDate serialization 257 | 258 | Version 2.0 259 | 260 | - FastCoding 2.0 is not forwards or backwards compatible with version 1.0 files 261 | - Added ability to automatically encode any object type 262 | - Mutability of NSString and NSData objects is now preserved 263 | - Added bootstrapping mechanism for creating native objects from plist/json 264 | - Improved decoding performance 265 | 266 | Version 1.1 267 | 268 | - Improved security by throwing an exception if unexpected EOF is encountered 269 | - Improved performance when using ARC (but don't use ARC) 270 | - Refactored to use polymorphic style for serializing (cleaner code) 271 | - Refactored to use function pointer array for parsing (slightly faster) 272 | - Now complies with -Weverything warning level 273 | - Addd Cocopods podspec file 274 | 275 | Version 1.0.1 276 | 277 | - Fixed bug in the aliasing logic 278 | 279 | Version 1.0 280 | 281 | - Initial release 282 | --------------------------------------------------------------------------------