├── .gitignore ├── Gemfile ├── LICENSE.txt ├── README.md ├── Rakefile ├── appjam.gemspec ├── bin └── appjam ├── doc ├── appjam.jpg ├── appjam1.png ├── appjam2.png ├── appjam3.png └── appjam4.png ├── lib ├── appjam.rb └── appjam │ ├── command.rb │ ├── generators │ ├── actions.rb │ ├── blank.rb │ ├── cli.rb │ ├── gist.rb │ ├── gist.yml │ ├── help.rb │ ├── jam.rb │ ├── lib.rb │ ├── lib │ │ ├── gitattributes.tt │ │ ├── gitignore.tt │ │ └── gitmodules.tt │ ├── mvc_model.rb │ ├── mvc_project.rb │ ├── project │ │ ├── Classes │ │ │ ├── ContactsAppDelegate.h.tt │ │ │ ├── ContactsAppDelegate.m.tt │ │ │ ├── contacts │ │ │ │ ├── ApplicationFacade.h.tt │ │ │ │ ├── ApplicationFacade.m.tt │ │ │ │ ├── controller │ │ │ │ │ ├── CreateUserCommand.h.tt │ │ │ │ │ ├── CreateUserCommand.m.tt │ │ │ │ │ ├── DeleteUserCommand.h.tt │ │ │ │ │ ├── DeleteUserCommand.m.tt │ │ │ │ │ ├── GetUsersCommand.h.tt │ │ │ │ │ ├── GetUsersCommand.m.tt │ │ │ │ │ ├── StartupCommand.h.tt │ │ │ │ │ ├── StartupCommand.m.tt │ │ │ │ │ ├── UpdateUserCommand.h.tt │ │ │ │ │ └── UpdateUserCommand.m.tt │ │ │ │ ├── model │ │ │ │ │ ├── UserProxy.h.tt │ │ │ │ │ ├── UserProxy.m.tt │ │ │ │ │ └── vo │ │ │ │ │ │ ├── UserVO.h.tt │ │ │ │ │ │ └── UserVO.m.tt │ │ │ │ └── view │ │ │ │ │ ├── UserFormMediator.h.tt │ │ │ │ │ ├── UserFormMediator.m.tt │ │ │ │ │ ├── UserListMediator.h.tt │ │ │ │ │ ├── UserListMediator.m.tt │ │ │ │ │ ├── UserMediator.h.tt │ │ │ │ │ ├── UserMediator.m.tt │ │ │ │ │ └── components │ │ │ │ │ ├── Contacts.h.tt │ │ │ │ │ ├── Contacts.m.tt │ │ │ │ │ ├── UserForm.h.tt │ │ │ │ │ ├── UserForm.m.tt │ │ │ │ │ ├── UserList.h.tt │ │ │ │ │ └── UserList.m.tt │ │ │ └── org │ │ │ │ └── puremvc │ │ │ │ └── objectivec │ │ │ │ ├── core │ │ │ │ ├── Controller.h │ │ │ │ ├── Controller.m │ │ │ │ ├── Model.h │ │ │ │ ├── Model.m │ │ │ │ ├── View.h │ │ │ │ └── View.m │ │ │ │ ├── interfaces │ │ │ │ ├── ICommand.h │ │ │ │ ├── IController.h │ │ │ │ ├── IFacade.h │ │ │ │ ├── IMediator.h │ │ │ │ ├── IModel.h │ │ │ │ ├── INotification.h │ │ │ │ ├── INotifier.h │ │ │ │ ├── IObserver.h │ │ │ │ ├── IProxy.h │ │ │ │ └── IView.h │ │ │ │ └── patterns │ │ │ │ ├── command │ │ │ │ ├── MacroCommand.h │ │ │ │ ├── MacroCommand.m │ │ │ │ ├── SimpleCommand.h │ │ │ │ └── SimpleCommand.m │ │ │ │ ├── facade │ │ │ │ ├── Facade.h │ │ │ │ └── Facade.m │ │ │ │ ├── mediator │ │ │ │ ├── Mediator.h │ │ │ │ └── Mediator.m │ │ │ │ ├── observer │ │ │ │ ├── Notification.h │ │ │ │ ├── Notification.m │ │ │ │ ├── Notifier.h │ │ │ │ ├── Notifier.m │ │ │ │ ├── Observer.h │ │ │ │ └── Observer.m │ │ │ │ └── proxy │ │ │ │ ├── Proxy.h │ │ │ │ └── Proxy.m │ │ ├── Contacts-Info.plist.tt │ │ ├── Contacts.xcodeproj │ │ │ ├── eiffel.pbxuser │ │ │ ├── eiffel.perspectivev3 │ │ │ └── project.pbxproj │ │ ├── Contacts_Prefix.pch.tt │ │ ├── main.m.tt │ │ └── utils │ │ │ ├── .gitignore │ │ │ ├── NSStringWhiteSpace.h │ │ │ ├── NSStringWhiteSpace.m │ │ │ ├── UIDevice.h │ │ │ ├── UIDevice.m │ │ │ ├── URLEncodeString.h │ │ │ └── URLEncodeString.m │ ├── search.rb │ └── templates │ │ ├── blank │ │ ├── EiffelApplication.xcodeproj │ │ │ ├── project.pbxproj │ │ │ ├── project.xcworkspace │ │ │ │ ├── contents.xcworkspacedata │ │ │ │ └── xcuserdata │ │ │ │ │ └── eiffel.xcuserdatad │ │ │ │ │ └── UserInterfaceState.xcuserstate │ │ │ └── xcuserdata │ │ │ │ └── eiffel.xcuserdatad │ │ │ │ └── xcschemes │ │ │ │ ├── EiffelApplication.xcscheme │ │ │ │ └── xcschememanagement.plist │ │ ├── EiffelApplication │ │ │ ├── AppDelegate.h.tt │ │ │ ├── AppDelegate.m.tt │ │ │ ├── EiffelApplication-Info.plist │ │ │ ├── EiffelApplication-Prefix.pch.tt │ │ │ ├── EiffelApplication.xcdatamodeld │ │ │ │ ├── .xccurrentversion │ │ │ │ └── EiffelApplication.xcdatamodel │ │ │ │ │ └── contents │ │ │ ├── en.lproj │ │ │ │ └── InfoPlist.strings │ │ │ ├── libs │ │ │ │ ├── components │ │ │ │ │ ├── AwesomeMenu │ │ │ │ │ │ ├── AwesomeMenu.h │ │ │ │ │ │ ├── AwesomeMenu.m │ │ │ │ │ │ ├── AwesomeMenuItem.h │ │ │ │ │ │ ├── AwesomeMenuItem.m │ │ │ │ │ │ └── Images │ │ │ │ │ │ │ ├── bg-addbutton-highlighted.png │ │ │ │ │ │ │ ├── bg-addbutton-highlighted@2x.png │ │ │ │ │ │ │ ├── bg-addbutton.png │ │ │ │ │ │ │ ├── bg-addbutton@2x.png │ │ │ │ │ │ │ ├── bg-menuitem-highlighted.png │ │ │ │ │ │ │ ├── bg-menuitem-highlighted@2x.png │ │ │ │ │ │ │ ├── bg-menuitem.png │ │ │ │ │ │ │ ├── bg-menuitem@2x.png │ │ │ │ │ │ │ ├── icon-plus-highlighted.png │ │ │ │ │ │ │ ├── icon-plus-highlighted@2x.png │ │ │ │ │ │ │ ├── icon-plus.png │ │ │ │ │ │ │ ├── icon-plus@2x.png │ │ │ │ │ │ │ ├── icon-star.png │ │ │ │ │ │ │ └── icon-star@2x.png │ │ │ │ │ ├── CMPopTipView │ │ │ │ │ │ ├── CMPopTipView.h │ │ │ │ │ │ └── CMPopTipView.m │ │ │ │ │ ├── FXLabel │ │ │ │ │ │ ├── FXLabel.h │ │ │ │ │ │ └── FXLabel.m │ │ │ │ │ ├── MBProgressHUD │ │ │ │ │ │ ├── MBProgressHUD.h │ │ │ │ │ │ └── MBProgressHUD.m │ │ │ │ │ ├── MyLauncher │ │ │ │ │ │ ├── CustomBadge.h │ │ │ │ │ │ ├── CustomBadge.m │ │ │ │ │ │ ├── MyLauncherItem.h │ │ │ │ │ │ ├── MyLauncherItem.m │ │ │ │ │ │ ├── MyLauncherPageControl.h │ │ │ │ │ │ ├── MyLauncherPageControl.m │ │ │ │ │ │ ├── MyLauncherScrollView.h │ │ │ │ │ │ ├── MyLauncherScrollView.m │ │ │ │ │ │ ├── MyLauncherView.h │ │ │ │ │ │ ├── MyLauncherView.m │ │ │ │ │ │ ├── MyLauncherViewController.h │ │ │ │ │ │ └── MyLauncherViewController.m │ │ │ │ │ ├── PaperFold │ │ │ │ │ │ ├── FacingView.h │ │ │ │ │ │ ├── FacingView.m │ │ │ │ │ │ ├── FoldView.h │ │ │ │ │ │ ├── FoldView.m │ │ │ │ │ │ ├── MultiFoldView.h │ │ │ │ │ │ ├── MultiFoldView.m │ │ │ │ │ │ ├── PaperFoldConstants.h │ │ │ │ │ │ ├── PaperFoldNavigationController.h │ │ │ │ │ │ ├── PaperFoldNavigationController.m │ │ │ │ │ │ ├── PaperFoldResources.bundle │ │ │ │ │ │ │ ├── swipe_guide_left.png │ │ │ │ │ │ │ ├── swipe_guide_left@2x.png │ │ │ │ │ │ │ ├── swipe_guide_right.png │ │ │ │ │ │ │ └── swipe_guide_right@2x.png │ │ │ │ │ │ ├── PaperFoldSwipeHintView.h │ │ │ │ │ │ ├── PaperFoldSwipeHintView.m │ │ │ │ │ │ ├── PaperFoldView.h │ │ │ │ │ │ ├── PaperFoldView.m │ │ │ │ │ │ ├── Resources │ │ │ │ │ │ │ ├── swipe_guide.psd │ │ │ │ │ │ │ └── swipe_guide2.psd │ │ │ │ │ │ ├── ShadowView.h │ │ │ │ │ │ ├── ShadowView.m │ │ │ │ │ │ ├── TouchThroughUIView.h │ │ │ │ │ │ ├── TouchThroughUIView.m │ │ │ │ │ │ ├── UIView+Screenshot.h │ │ │ │ │ │ └── UIView+Screenshot.m │ │ │ │ │ ├── Toast │ │ │ │ │ │ ├── Toast+UIView.h │ │ │ │ │ │ └── Toast+UIView.m │ │ │ │ │ ├── UIBubbleTableView │ │ │ │ │ │ ├── NSBubbleData.h │ │ │ │ │ │ ├── NSBubbleData.m │ │ │ │ │ │ ├── UIBubbleHeaderTableViewCell.h │ │ │ │ │ │ ├── UIBubbleHeaderTableViewCell.m │ │ │ │ │ │ ├── UIBubbleTableView.h │ │ │ │ │ │ ├── UIBubbleTableView.m │ │ │ │ │ │ ├── UIBubbleTableViewCell.h │ │ │ │ │ │ ├── UIBubbleTableViewCell.m │ │ │ │ │ │ ├── UIBubbleTableViewDataSource.h │ │ │ │ │ │ ├── UIBubbleTypingTableViewCell.h │ │ │ │ │ │ ├── UIBubbleTypingTableViewCell.m │ │ │ │ │ │ └── images │ │ │ │ │ │ │ ├── bubbleMine.png │ │ │ │ │ │ │ ├── bubbleMine@2x.png │ │ │ │ │ │ │ ├── bubbleSomeone.png │ │ │ │ │ │ │ ├── bubbleSomeone@2x.png │ │ │ │ │ │ │ ├── missingAvatar.png │ │ │ │ │ │ │ ├── missingAvatar@2x.png │ │ │ │ │ │ │ ├── typingMine.png │ │ │ │ │ │ │ ├── typingMine@2x.png │ │ │ │ │ │ │ ├── typingSomeone.png │ │ │ │ │ │ │ └── typingSomeone@2x.png │ │ │ │ │ └── UIGlossyButton │ │ │ │ │ │ ├── UIGlossyButton.h │ │ │ │ │ │ ├── UIGlossyButton.m │ │ │ │ │ │ ├── UIView+LayerEffects.h │ │ │ │ │ │ └── UIView+LayerEffects.m │ │ │ │ ├── frameworks │ │ │ │ │ ├── AFIncrementalStore │ │ │ │ │ │ ├── AFIncrementalStore.h │ │ │ │ │ │ ├── AFIncrementalStore.m │ │ │ │ │ │ ├── AFRESTClient.h │ │ │ │ │ │ └── AFRESTClient.m │ │ │ │ │ ├── AFNetworking │ │ │ │ │ │ ├── AFHTTPClient.h │ │ │ │ │ │ ├── AFHTTPClient.m │ │ │ │ │ │ ├── AFHTTPRequestOperation.h │ │ │ │ │ │ ├── AFHTTPRequestOperation.m │ │ │ │ │ │ ├── AFImageRequestOperation.h │ │ │ │ │ │ ├── AFImageRequestOperation.m │ │ │ │ │ │ ├── AFJSONRequestOperation.h │ │ │ │ │ │ ├── AFJSONRequestOperation.m │ │ │ │ │ │ ├── AFNetworkActivityIndicatorManager.h │ │ │ │ │ │ ├── AFNetworkActivityIndicatorManager.m │ │ │ │ │ │ ├── AFNetworking.h │ │ │ │ │ │ ├── AFPropertyListRequestOperation.h │ │ │ │ │ │ ├── AFPropertyListRequestOperation.m │ │ │ │ │ │ ├── AFURLConnectionOperation.h │ │ │ │ │ │ ├── AFURLConnectionOperation.m │ │ │ │ │ │ ├── AFXMLRequestOperation.h │ │ │ │ │ │ ├── AFXMLRequestOperation.m │ │ │ │ │ │ ├── UIImageView+AFNetworking.h │ │ │ │ │ │ └── UIImageView+AFNetworking.m │ │ │ │ │ ├── InflectorKit │ │ │ │ │ │ ├── NSString+InflectorKit.h │ │ │ │ │ │ ├── NSString+InflectorKit.m │ │ │ │ │ │ ├── TTTStringInflector.h │ │ │ │ │ │ └── TTTStringInflector.m │ │ │ │ │ ├── JSONKit │ │ │ │ │ │ ├── JSONKit.h │ │ │ │ │ │ └── JSONKit.m │ │ │ │ │ ├── RaptureXML │ │ │ │ │ │ ├── RXMLElement.h │ │ │ │ │ │ └── RXMLElement.m │ │ │ │ │ ├── SDWebImage │ │ │ │ │ │ ├── MKAnnotationView+WebCache.h │ │ │ │ │ │ ├── MKAnnotationView+WebCache.m │ │ │ │ │ │ ├── SDImageCache.h │ │ │ │ │ │ ├── SDImageCache.m │ │ │ │ │ │ ├── SDWebImageCompat.h │ │ │ │ │ │ ├── SDWebImageCompat.m │ │ │ │ │ │ ├── SDWebImageDecoder.h │ │ │ │ │ │ ├── SDWebImageDecoder.m │ │ │ │ │ │ ├── SDWebImageDownloader.h │ │ │ │ │ │ ├── SDWebImageDownloader.m │ │ │ │ │ │ ├── SDWebImageDownloaderOperation.h │ │ │ │ │ │ ├── SDWebImageDownloaderOperation.m │ │ │ │ │ │ ├── SDWebImageManager.h │ │ │ │ │ │ ├── SDWebImageManager.m │ │ │ │ │ │ ├── SDWebImageOperation.h │ │ │ │ │ │ ├── SDWebImagePrefetcher.h │ │ │ │ │ │ ├── SDWebImagePrefetcher.m │ │ │ │ │ │ ├── UIButton+WebCache.h │ │ │ │ │ │ ├── UIButton+WebCache.m │ │ │ │ │ │ ├── UIImageView+WebCache.h │ │ │ │ │ │ └── UIImageView+WebCache.m │ │ │ │ │ └── fmdb │ │ │ │ │ │ ├── FMDatabase.h │ │ │ │ │ │ ├── FMDatabase.m │ │ │ │ │ │ ├── FMDatabaseAdditions.h │ │ │ │ │ │ ├── FMDatabaseAdditions.m │ │ │ │ │ │ ├── FMDatabasePool.h │ │ │ │ │ │ ├── FMDatabasePool.m │ │ │ │ │ │ ├── FMDatabaseQueue.h │ │ │ │ │ │ ├── FMDatabaseQueue.m │ │ │ │ │ │ ├── FMResultSet.h │ │ │ │ │ │ └── FMResultSet.m │ │ │ │ └── toolkit │ │ │ │ │ ├── CPAnimationSequence │ │ │ │ │ ├── CPAnimationProgram.h │ │ │ │ │ ├── CPAnimationSequence.h │ │ │ │ │ ├── CPAnimationStep.h │ │ │ │ │ └── private │ │ │ │ │ │ ├── CPAnimationProgram.m │ │ │ │ │ │ ├── CPAnimationSequence.m │ │ │ │ │ │ └── CPAnimationStep.m │ │ │ │ │ ├── CocoaAsyncSocket │ │ │ │ │ ├── GCDAsyncSocket.h │ │ │ │ │ └── GCDAsyncSocket.m │ │ │ │ │ ├── CocoaHTTPServer │ │ │ │ │ ├── Core │ │ │ │ │ │ ├── Categories │ │ │ │ │ │ │ ├── DDData.h │ │ │ │ │ │ │ ├── DDData.m │ │ │ │ │ │ │ ├── DDNumber.h │ │ │ │ │ │ │ ├── DDNumber.m │ │ │ │ │ │ │ ├── DDRange.h │ │ │ │ │ │ │ └── DDRange.m │ │ │ │ │ │ ├── HTTPAuthenticationRequest.h │ │ │ │ │ │ ├── HTTPAuthenticationRequest.m │ │ │ │ │ │ ├── HTTPConnection.h │ │ │ │ │ │ ├── HTTPConnection.m │ │ │ │ │ │ ├── HTTPLogging.h │ │ │ │ │ │ ├── HTTPMessage.h │ │ │ │ │ │ ├── HTTPMessage.m │ │ │ │ │ │ ├── HTTPResponse.h │ │ │ │ │ │ ├── HTTPServer.h │ │ │ │ │ │ ├── HTTPServer.m │ │ │ │ │ │ ├── Mime │ │ │ │ │ │ │ ├── MultipartFormDataParser.h │ │ │ │ │ │ │ ├── MultipartFormDataParser.m │ │ │ │ │ │ │ ├── MultipartMessageHeader.h │ │ │ │ │ │ │ ├── MultipartMessageHeader.m │ │ │ │ │ │ │ ├── MultipartMessageHeaderField.h │ │ │ │ │ │ │ └── MultipartMessageHeaderField.m │ │ │ │ │ │ ├── Responses │ │ │ │ │ │ │ ├── HTTPAsyncFileResponse.h │ │ │ │ │ │ │ ├── HTTPAsyncFileResponse.m │ │ │ │ │ │ │ ├── HTTPDataResponse.h │ │ │ │ │ │ │ ├── HTTPDataResponse.m │ │ │ │ │ │ │ ├── HTTPDynamicFileResponse.h │ │ │ │ │ │ │ ├── HTTPDynamicFileResponse.m │ │ │ │ │ │ │ ├── HTTPErrorResponse.h │ │ │ │ │ │ │ ├── HTTPErrorResponse.m │ │ │ │ │ │ │ ├── HTTPFileResponse.h │ │ │ │ │ │ │ ├── HTTPFileResponse.m │ │ │ │ │ │ │ ├── HTTPRedirectResponse.h │ │ │ │ │ │ │ └── HTTPRedirectResponse.m │ │ │ │ │ │ ├── WebSocket.h │ │ │ │ │ │ └── WebSocket.m │ │ │ │ │ └── Extensions │ │ │ │ │ │ └── WebDAV │ │ │ │ │ │ ├── DAVConnection.h │ │ │ │ │ │ ├── DAVConnection.m │ │ │ │ │ │ ├── DAVResponse.h │ │ │ │ │ │ ├── DAVResponse.m │ │ │ │ │ │ ├── DELETEResponse.h │ │ │ │ │ │ ├── DELETEResponse.m │ │ │ │ │ │ ├── PUTResponse.h │ │ │ │ │ │ └── PUTResponse.m │ │ │ │ │ ├── DCIntrospect │ │ │ │ │ ├── DCCrossHairView.h │ │ │ │ │ ├── DCCrossHairView.m │ │ │ │ │ ├── DCFrameView.h │ │ │ │ │ ├── DCFrameView.m │ │ │ │ │ ├── DCIntrospect.h │ │ │ │ │ ├── DCIntrospect.m │ │ │ │ │ ├── DCIntrospectSettings.h │ │ │ │ │ ├── DCStatusBarOverlay.h │ │ │ │ │ └── DCStatusBarOverlay.m │ │ │ │ │ ├── EGOCache │ │ │ │ │ ├── EGOCache.h │ │ │ │ │ └── EGOCache.m │ │ │ │ │ ├── Lumberjack │ │ │ │ │ ├── DDASLLogger.h │ │ │ │ │ ├── DDASLLogger.m │ │ │ │ │ ├── DDAbstractDatabaseLogger.h │ │ │ │ │ ├── DDAbstractDatabaseLogger.m │ │ │ │ │ ├── DDFileLogger.h │ │ │ │ │ ├── DDFileLogger.m │ │ │ │ │ ├── DDLog.h │ │ │ │ │ ├── DDLog.m │ │ │ │ │ ├── DDTTYLogger.h │ │ │ │ │ ├── DDTTYLogger.m │ │ │ │ │ └── Extensions │ │ │ │ │ │ ├── ContextFilterLogFormatter.h │ │ │ │ │ │ ├── ContextFilterLogFormatter.m │ │ │ │ │ │ ├── DispatchQueueLogFormatter.h │ │ │ │ │ │ └── DispatchQueueLogFormatter.m │ │ │ │ │ ├── Objective-C-HMTL-Parser │ │ │ │ │ ├── HTMLNode.h │ │ │ │ │ ├── HTMLNode.m │ │ │ │ │ ├── HTMLParser.h │ │ │ │ │ └── HTMLParser.m │ │ │ │ │ ├── ObjectiveMixin │ │ │ │ │ ├── Mixin.h │ │ │ │ │ └── Mixin.m │ │ │ │ │ ├── ObjectiveSugar │ │ │ │ │ ├── NSArray+ObjectiveSugar.h │ │ │ │ │ ├── NSArray+ObjectiveSugar.m │ │ │ │ │ ├── NSDictionary+ObjectiveSugar.h │ │ │ │ │ ├── NSDictionary+ObjectiveSugar.m │ │ │ │ │ ├── NSMutableArray+ObjectiveSugar.h │ │ │ │ │ ├── NSMutableArray+ObjectiveSugar.m │ │ │ │ │ ├── NSNumber+ObjectiveSugar.h │ │ │ │ │ ├── NSNumber+ObjectiveSugar.m │ │ │ │ │ ├── NSSet+ObjectiveSugar.h │ │ │ │ │ ├── NSSet+ObjectiveSugar.m │ │ │ │ │ ├── NSString+ObjectiveSugar.h │ │ │ │ │ ├── NSString+ObjectiveSugar.m │ │ │ │ │ └── ObjectiveSugar.h │ │ │ │ │ ├── SSKeychain │ │ │ │ │ ├── SSKeychain.h │ │ │ │ │ ├── SSKeychain.m │ │ │ │ │ ├── SSKeychainQuery.h │ │ │ │ │ └── SSKeychainQuery.m │ │ │ │ │ ├── SecureUDID │ │ │ │ │ ├── SecureUDID.h │ │ │ │ │ └── SecureUDID.m │ │ │ │ │ ├── SubjectiveScript │ │ │ │ │ ├── Helpers │ │ │ │ │ │ ├── NSString+Versioning.h │ │ │ │ │ │ ├── NSString+Versioning.m │ │ │ │ │ │ ├── SS+Functions.h │ │ │ │ │ │ ├── SS+Functions.m │ │ │ │ │ │ ├── SS+System.h │ │ │ │ │ │ ├── SS+System.m │ │ │ │ │ │ └── SSArguments.h │ │ │ │ │ ├── JavaScript │ │ │ │ │ │ ├── NSArray+JavaScript.h │ │ │ │ │ │ ├── NSArray+JavaScript.m │ │ │ │ │ │ ├── NSDate+JavaScript.h │ │ │ │ │ │ ├── NSDate+JavaScript.m │ │ │ │ │ │ ├── NSDictionary+JavaScript.h │ │ │ │ │ │ ├── NSDictionary+JavaScript.m │ │ │ │ │ │ ├── NSMutableArray+JavaScript.h │ │ │ │ │ │ ├── NSMutableArray+JavaScript.m │ │ │ │ │ │ ├── NSMutableDictionary+JavaScript.h │ │ │ │ │ │ ├── NSMutableDictionary+JavaScript.m │ │ │ │ │ │ ├── NSMutableString+JavaScript.h │ │ │ │ │ │ ├── NSMutableString+JavaScript.m │ │ │ │ │ │ ├── NSNumber+JavaScript.h │ │ │ │ │ │ ├── NSNumber+JavaScript.m │ │ │ │ │ │ ├── NSObject+JavaScript.h │ │ │ │ │ │ ├── NSObject+JavaScript.m │ │ │ │ │ │ ├── NSString+JavaScript.h │ │ │ │ │ │ ├── NSString+JavaScript.m │ │ │ │ │ │ ├── SS+JavaScript.h │ │ │ │ │ │ ├── SS+JavaScript.m │ │ │ │ │ │ ├── SS+Types.h │ │ │ │ │ │ └── SS+Types.m │ │ │ │ │ ├── NSDictionary+NamedProperties.h │ │ │ │ │ ├── NSDictionary+NamedProperties.m │ │ │ │ │ ├── SS.h │ │ │ │ │ ├── SS.m │ │ │ │ │ ├── SubjectiveScript.h │ │ │ │ │ ├── SubjectiveScript.m │ │ │ │ │ └── Types │ │ │ │ │ │ ├── NSArray+SS.h │ │ │ │ │ │ ├── NSArray+SS.m │ │ │ │ │ │ ├── NSDate+SS.h │ │ │ │ │ │ ├── NSDate+SS.m │ │ │ │ │ │ ├── NSDictionary+SS.h │ │ │ │ │ │ ├── NSDictionary+SS.m │ │ │ │ │ │ ├── NSMutableArray+SS.h │ │ │ │ │ │ ├── NSMutableArray+SS.m │ │ │ │ │ │ ├── NSMutableDictionary+SS.h │ │ │ │ │ │ ├── NSMutableDictionary+SS.m │ │ │ │ │ │ ├── NSMutableString+SS.h │ │ │ │ │ │ ├── NSMutableString+SS.m │ │ │ │ │ │ ├── NSNumber+SS.h │ │ │ │ │ │ ├── NSNumber+SS.m │ │ │ │ │ │ ├── NSObject+SS.h │ │ │ │ │ │ ├── NSObject+SS.m │ │ │ │ │ │ ├── NSString+SS.h │ │ │ │ │ │ ├── NSString+SS.m │ │ │ │ │ │ └── SSTypes.h │ │ │ │ │ ├── Underscore │ │ │ │ │ ├── USArrayWrapper.h │ │ │ │ │ ├── USArrayWrapper.m │ │ │ │ │ ├── USConstants.h │ │ │ │ │ ├── USDictionaryWrapper.h │ │ │ │ │ ├── USDictionaryWrapper.m │ │ │ │ │ ├── Underscore+Functional.h │ │ │ │ │ ├── Underscore+Functional.m │ │ │ │ │ ├── Underscore-Prefix.pch │ │ │ │ │ ├── Underscore.h │ │ │ │ │ └── Underscore.m │ │ │ │ │ └── hpple │ │ │ │ │ ├── TFHpple.h │ │ │ │ │ ├── TFHpple.m │ │ │ │ │ ├── TFHppleElement.h │ │ │ │ │ ├── TFHppleElement.m │ │ │ │ │ ├── XPathQuery.h │ │ │ │ │ └── XPathQuery.m │ │ │ └── main.m.tt │ │ └── EiffelApplicationTests │ │ │ ├── EiffelApplicationTests-Info.plist │ │ │ ├── EiffelApplicationTests.h.tt │ │ │ ├── EiffelApplicationTests.m.tt │ │ │ └── en.lproj │ │ │ └── InfoPlist.strings │ │ └── resources │ │ ├── Default-568h@2x.png │ │ ├── Default.png │ │ ├── Default@2x.png │ │ └── contents.tt │ ├── tasks.rb │ ├── tasks │ └── plugin.rb │ ├── utility.rb │ ├── version.rb │ └── view.rb └── test ├── helper.rb ├── test_model_generator.rb └── test_project_generator.rb /.gitignore: -------------------------------------------------------------------------------- 1 | .bundle/* 2 | .document/* 3 | Gemfile.lock 4 | *.rbc 5 | .idea 6 | .rvmrc 7 | coverage 8 | pkg/* 9 | rdoc/* 10 | Gemfile.lock 11 | pkg/* 12 | 13 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | #source "http://ruby.taobao.org" 2 | source "http://rubygems.org" 3 | #source "http://gems.github.com" 4 | 5 | gem "thor" 6 | gem "activesupport" 7 | gem "cli-colorize" 8 | gem "hirb" 9 | 10 | # Add dependencies to develop your gem here. 11 | # Include everything needed to run rake, tests, features, etc. 12 | group :development do 13 | gem "mocha", ">= 0.9.8" 14 | gem "rdoc" 15 | gem "rack-test", ">= 0.5.0" 16 | gem "fakeweb", ">=1.2.8" 17 | gem "webrat", "= 0.5.1" 18 | gem "shoulda", ">= 2.10.3" 19 | gem "uuid", ">= 2.3.1" 20 | gem "builder", ">= 2.1.2" 21 | gem "jeweler", "~> 1.8.4" 22 | gem "rcov", "~> 0.9.8" 23 | gem "grit" 24 | gem "i18n" 25 | gem "yajl-ruby" 26 | gem "plist" 27 | platforms :mri_18 do 28 | gem "ruby-prof", ">= 0.9.1" 29 | gem "system_timer", ">= 1.0" 30 | end 31 | end 32 | 33 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011 Eiffel Q 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /bin/appjam: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require 'rubygems' unless defined?(Gem) 3 | 4 | class Object 5 | alias sh system 6 | end 7 | 8 | unless RUBY_PLATFORM =~ /darwin/i 9 | $stderr.puts "what? you do not have a MAC, dude? Shame on you!!!" 10 | end 11 | 12 | lib_dir = File.expand_path(File.join(File.dirname(__FILE__),'..','lib')) 13 | unless $LOAD_PATH.include?(lib_dir) 14 | $LOAD_PATH << lib_dir 15 | end 16 | 17 | require 'appjam' 18 | require File.expand_path(File.dirname(__FILE__) + '/../lib/appjam/generators/cli') 19 | 20 | Appjam::Generators::Cli.start(ARGV) -------------------------------------------------------------------------------- /doc/appjam.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiffelqiu/appjam/00252dac003b3dc5ede0b2613f82fda093c04096/doc/appjam.jpg -------------------------------------------------------------------------------- /doc/appjam1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiffelqiu/appjam/00252dac003b3dc5ede0b2613f82fda093c04096/doc/appjam1.png -------------------------------------------------------------------------------- /doc/appjam2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiffelqiu/appjam/00252dac003b3dc5ede0b2613f82fda093c04096/doc/appjam2.png -------------------------------------------------------------------------------- /doc/appjam3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiffelqiu/appjam/00252dac003b3dc5ede0b2613f82fda093c04096/doc/appjam3.png -------------------------------------------------------------------------------- /doc/appjam4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiffelqiu/appjam/00252dac003b3dc5ede0b2613f82fda093c04096/doc/appjam4.png -------------------------------------------------------------------------------- /lib/appjam.rb: -------------------------------------------------------------------------------- 1 | require 'thread' 2 | require 'appjam/version' 3 | require 'appjam/tasks' 4 | require 'active_support' 5 | 6 | module Appjam 7 | ## 8 | # This method return the correct location of mvc-gen bin or 9 | # exec it using Kernel#system with the given args 10 | # 11 | def self.bin_gen(*args) 12 | @_mvc_gen_bin ||= [IphoneMvc.ruby_command, File.expand_path("../bin/appjam", __FILE__)] 13 | args.empty? ? @_mvc_gen_bin : system(args.unshift(@_mvc_gen_bin).join(" ")) 14 | end 15 | 16 | ## 17 | # This module it's used for register generators 18 | # 19 | module Generators 20 | 21 | DEV_PATH = File.expand_path("../../", File.dirname(__FILE__)) 22 | 23 | class << self 24 | 25 | ## 26 | # Here we store our generators paths 27 | # 28 | def load_paths 29 | @_files ||= [] 30 | end 31 | 32 | ## 33 | # Return a ordered list of task with their class 34 | # 35 | def mappings 36 | @_mappings ||= ActiveSupport::OrderedHash.new 37 | end 38 | 39 | ## 40 | # Gloabl add a new generator class 41 | # 42 | def add_generator(name, klass) 43 | mappings[name] = klass 44 | end 45 | 46 | ## 47 | # Load Global Actions and Component Actions then all files in +load_path+. 48 | # 49 | def load_components! 50 | require 'appjam/generators/actions' 51 | load_paths.flatten.each { |file| require file } 52 | end 53 | end 54 | end # Generators 55 | end # Appjam 56 | 57 | ## 58 | # We add our generators to Appjam::Genererator 59 | # 60 | Appjam::Generators.load_paths << Dir[File.dirname(__FILE__) + '/appjam/generators/{mvc_project,mvc_model,lib,gist,search,help,blank}.rb'] 61 | 62 | 63 | -------------------------------------------------------------------------------- /lib/appjam/command.rb: -------------------------------------------------------------------------------- 1 | require 'rbconfig' 2 | 3 | module Appjam 4 | ## 5 | # This method return the correct location of appjam bin or 6 | # exec it using Kernel#system with the given args 7 | # 8 | def self.bin(*args) 9 | @_appjam_bin ||= [self.ruby_command, File.expand_path("../../../bin/appjam", __FILE__)] 10 | args.empty? ? @_appjam_bin : system(args.unshift(@_appjam_bin).join(" ")) 11 | end 12 | 13 | ## 14 | # Return the path to the ruby interpreter taking into account multiple 15 | # installations and windows extensions. 16 | # 17 | def self.ruby_command 18 | @ruby_command ||= begin 19 | ruby = File.join(Config::CONFIG['bindir'], Config::CONFIG['ruby_install_name']) 20 | ruby << Config::CONFIG['EXEEXT'] 21 | 22 | # escape string in case path to ruby executable contain spaces. 23 | ruby.sub!(/.*\s.*/m, '"\&"') 24 | ruby 25 | end 26 | end 27 | end # Appjam -------------------------------------------------------------------------------- /lib/appjam/generators/lib/gitattributes.tt: -------------------------------------------------------------------------------- 1 | *.pbxproj -crlf -diff -merge -------------------------------------------------------------------------------- /lib/appjam/generators/lib/gitignore.tt: -------------------------------------------------------------------------------- 1 | # osx noise 2 | .DS_Store 3 | profile 4 | xcuserdata 5 | Gist/* 6 | 7 | # Textmate - if you build your xcode projects with it 8 | *.tm_build_errors 9 | 10 | # XCode (and ancestors) per-user config (very noisy, and not relevant) 11 | *.mode1 12 | *.mode1v3 13 | *.mode2v3 14 | *.perspective 15 | *.perspectivev3 16 | *.pbxuser 17 | *.moved-aside 18 | *.xcworkspace 19 | 20 | # Generated files 21 | VersionX-revision.h 22 | 23 | # build products 24 | build/* 25 | *.[oa] 26 | 27 | # Other source repository archive directories (protects when importing) 28 | .hg 29 | .svn 30 | CVS 31 | 32 | # automatic backup files 33 | *~.nib 34 | *.swp 35 | *~ 36 | *(Autosaved).rtfd/ 37 | Backup[ ]of[ ]*.pages/ 38 | Backup[ ]of[ ]*.key/ 39 | Backup[ ]of[ ]*.numbers/" -------------------------------------------------------------------------------- /lib/appjam/generators/lib/gitmodules.tt: -------------------------------------------------------------------------------- 1 | [submodule "three20"] 2 | path = three20 3 | url = git://github.com/facebook/three20.git 4 | -------------------------------------------------------------------------------- /lib/appjam/generators/project/Classes/ContactsAppDelegate.h.tt: -------------------------------------------------------------------------------- 1 | // 2 | // <%= @class_name %>AppDelegate.h 3 | // <%= @project_name %> 4 | // 5 | // Created by <%= @developer.capitalize %> on <%= @created_on %> 6 | // Copyright(c) <%= Time.now.year %>, All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface <%= @class_name %>AppDelegate : NSObject { 12 | UIWindow *window; 13 | } 14 | 15 | @property (nonatomic, retain) IBOutlet UIWindow *window; 16 | 17 | @end 18 | 19 | -------------------------------------------------------------------------------- /lib/appjam/generators/project/Classes/contacts/ApplicationFacade.h.tt: -------------------------------------------------------------------------------- 1 | // 2 | // ApplicationFacade.h 3 | // <%= @project_name %> 4 | // 5 | // Created by <%= @developer.capitalize %> on <%= @created_on %> 6 | // Copyright(c) <%= Time.now.year %>, All rights reserved. 7 | // 8 | 9 | #import 10 | #import "Facade.h" 11 | 12 | #define Startup @"Startup" 13 | #define ShowNew<%= @class_name %> @"ShowNew<%= @class_name %>" 14 | #define ShowEdit<%= @class_name %> @"ShowEdit<%= @class_name %>" 15 | #define Show<%= @class_name %>Form @"Show<%= @class_name %>Form" 16 | #define Show<%= @class_name %>List @"Show<%= @class_name %>List" 17 | #define ShowError @"ShowError" 18 | #define Create<%= @class_name %> @"Create<%= @class_name %>" 19 | #define Update<%= @class_name %> @"Update<%= @class_name %>" 20 | #define Delete<%= @class_name %> @"Delete<%= @class_name %>" 21 | #define Get<%= @class_name %>s @"Get<%= @class_name %>s" 22 | #define Get<%= @class_name %>sSuccess @"Get<%= @class_name %>sSuccess" 23 | 24 | @interface ApplicationFacade : Facade { 25 | } 26 | 27 | +(ApplicationFacade *)getInstance; 28 | 29 | -(void)startup:(id)app; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /lib/appjam/generators/project/Classes/contacts/ApplicationFacade.m.tt: -------------------------------------------------------------------------------- 1 | // 2 | // ApplicationFacade.m 3 | // <%= @project_name %> 4 | // 5 | // Created by <%= @developer.capitalize %> on <%= @created_on %> 6 | // Copyright(c) <%= Time.now.year %>, All rights reserved. 7 | // 8 | 9 | #import "ApplicationFacade.h" 10 | #import "StartupCommand.h" 11 | #import "Create<%= @class_name %>Command.h" 12 | #import "Update<%= @class_name %>Command.h" 13 | #import "Get<%= @class_name %>sCommand.h" 14 | 15 | @implementation ApplicationFacade 16 | 17 | -(void)startup:(id)app { 18 | [self sendNotification:Startup body:app]; 19 | } 20 | 21 | +(ApplicationFacade *)getInstance { 22 | return (ApplicationFacade *)[super getInstance]; 23 | } 24 | 25 | -(void)initializeController { 26 | [super initializeController]; 27 | [self registerCommand:Startup commandClassRef:[StartupCommand class]]; 28 | [self registerCommand:Create<%= @class_name %> commandClassRef:[Create<%= @class_name %>Command class]]; 29 | [self registerCommand:Update<%= @class_name %> commandClassRef:[Update<%= @class_name %>Command class]]; 30 | [self registerCommand:Get<%= @class_name %>s commandClassRef:[Get<%= @class_name %>sCommand class]]; 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /lib/appjam/generators/project/Classes/contacts/controller/CreateUserCommand.h.tt: -------------------------------------------------------------------------------- 1 | // 2 | // Create<%= @class_name %>Command.h 3 | // <%= @project_name %> 4 | // 5 | // Created by <%= @developer.capitalize %> on <%= @created_on %> 6 | // Copyright(c) <%= Time.now.year %>, All rights reserved. 7 | // 8 | 9 | #import "SimpleCommand.h" 10 | 11 | 12 | @interface Create<%= @class_name %>Command : SimpleCommand { 13 | 14 | } 15 | 16 | @end -------------------------------------------------------------------------------- /lib/appjam/generators/project/Classes/contacts/controller/CreateUserCommand.m.tt: -------------------------------------------------------------------------------- 1 | // 2 | // Create<%= @class_name %>Command.h 3 | // <%= @project_name %> 4 | // 5 | // Created by <%= @developer.capitalize %> on <%= @created_on %> 6 | // Copyright(c) <%= Time.now.year %>, All rights reserved. 7 | // 8 | 9 | #import "Create<%= @class_name %>Command.h" 10 | #import "ApplicationFacade.h" 11 | #import "<%= @class_name %>Proxy.h" 12 | #import "<%= @class_name %>VO.h" 13 | 14 | @implementation Create<%= @class_name %>Command 15 | 16 | -(void)execute:(id)notification { 17 | <%= @class_name %>Proxy *<%= @project_name %>Proxy = (<%= @class_name %>Proxy *)[facade retrieveProxy:[<%= @class_name %>Proxy NAME]]; 18 | <%= @class_name %>VO *<%= @project_name %>VO = [notification body]; 19 | if ([<%= @project_name %>VO isValid]) { 20 | [<%= @project_name %>Proxy create:<%= @project_name %>VO]; 21 | [facade sendNotification:Show<%= @class_name %>List]; 22 | } else { 23 | [facade sendNotification:ShowError body:@"Invalid <%= @class_name %>"]; 24 | } 25 | } 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /lib/appjam/generators/project/Classes/contacts/controller/DeleteUserCommand.h.tt: -------------------------------------------------------------------------------- 1 | // 2 | // Delete<%= @class_name %>Command.h 3 | // <%= @project_name %> 4 | // 5 | // Created by <%= @developer.capitalize %> on <%= @created_on %> 6 | // Copyright(c) <%= Time.now.year %>, All rights reserved. 7 | // 8 | 9 | #import "SimpleCommand.h" 10 | 11 | 12 | @interface Delete<%= @class_name %>Command : SimpleCommand { 13 | 14 | } 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /lib/appjam/generators/project/Classes/contacts/controller/DeleteUserCommand.m.tt: -------------------------------------------------------------------------------- 1 | // 2 | // Delete<%= @class_name %>Command.m 3 | // <%= @project_name %> 4 | // 5 | // Created by <%= @developer.capitalize %> on <%= @created_on %> 6 | // Copyright(c) <%= Time.now.year %>, All rights reserved. 7 | // 8 | 9 | #import "Delete<%= @class_name %>Command.h" 10 | #import "<%= @class_name %>Proxy.h" 11 | #import "<%= @class_name %>VO.h" 12 | 13 | @implementation Delete<%= @class_name %>Command 14 | 15 | -(void)execute:(id)notification { 16 | <%= @class_name %>Proxy *<%= @project_name %>Proxy = (<%= @class_name %>Proxy *)[facade retrieveProxy:[<%= @class_name %>Proxy NAME]]; 17 | <%= @class_name %>VO *<%= @project_name %>VO = [notification body]; 18 | [<%= @project_name %>Proxy delete:<%= @project_name %>VO]; 19 | } 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /lib/appjam/generators/project/Classes/contacts/controller/GetUsersCommand.h.tt: -------------------------------------------------------------------------------- 1 | // 2 | // Get<%= @class_name %>sCommand.h 3 | // <%= @project_name %> 4 | // 5 | // Created by <%= @developer.capitalize %> on <%= @created_on %> 6 | // Copyright(c) <%= Time.now.year %>, All rights reserved. 7 | // 8 | 9 | #import "SimpleCommand.h" 10 | 11 | 12 | @interface Get<%= @class_name %>sCommand : SimpleCommand { 13 | 14 | } 15 | 16 | @end -------------------------------------------------------------------------------- /lib/appjam/generators/project/Classes/contacts/controller/GetUsersCommand.m.tt: -------------------------------------------------------------------------------- 1 | // 2 | // Get<%= @class_name %>sCommand.h 3 | // <%= @project_name %> 4 | // 5 | // Created by <%= @developer.capitalize %> on <%= @created_on %> 6 | // Copyright(c) <%= Time.now.year %>, All rights reserved. 7 | // 8 | 9 | #import "Get<%= @class_name %>sCommand.h" 10 | #import "ApplicationFacade.h" 11 | #import "<%= @class_name %>Proxy.h" 12 | 13 | @implementation Get<%= @class_name %>sCommand 14 | 15 | -(void)execute:(id)notification { 16 | <%= @class_name %>Proxy *<%= @project_name %>Proxy = (<%= @class_name %>Proxy *)[facade retrieveProxy:[<%= @class_name %>Proxy NAME]]; 17 | [facade sendNotification:Get<%= @class_name %>sSuccess body:<%= @project_name %>Proxy.data]; 18 | } 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /lib/appjam/generators/project/Classes/contacts/controller/StartupCommand.h.tt: -------------------------------------------------------------------------------- 1 | // 2 | // StartupCommand.h 3 | // <%= @project_name %> 4 | // 5 | // Created by <%= @developer.capitalize %> on <%= @created_on %> 6 | // Copyright(c) <%= Time.now.year %>, All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SimpleCommand.h" 11 | 12 | @interface StartupCommand : SimpleCommand { 13 | 14 | } 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /lib/appjam/generators/project/Classes/contacts/controller/StartupCommand.m.tt: -------------------------------------------------------------------------------- 1 | // 2 | // StartupCommand.m 3 | // <%= @project_name %> 4 | // 5 | // Created by <%= @developer.capitalize %> on <%= @created_on %> 6 | // Copyright(c) <%= Time.now.year %>, All rights reserved. 7 | // 8 | 9 | #import "StartupCommand.h" 10 | #import "<%= @class_name %>.h" 11 | #import "ApplicationFacade.h" 12 | #import "<%= @class_name %>ListMediator.h" 13 | #import "<%= @class_name %>Proxy.h" 14 | #import "<%= @class_name %>Mediator.h" 15 | #import "<%= @class_name %>FormMediator.h" 16 | 17 | @implementation StartupCommand 18 | 19 | -(void)execute:(id)notification { 20 | [facade registerProxy:[<%= @class_name %>Proxy proxy]]; 21 | 22 | <%= @class_name %> *app = [notification body]; 23 | 24 | [facade registerMediator:[<%= @class_name %>Mediator withViewComponent:app]]; 25 | [facade registerMediator:[<%= @class_name %>ListMediator withViewComponent:app.<%= @project_name %>List]]; 26 | [facade registerMediator:[<%= @class_name %>FormMediator withViewComponent:app.<%= @project_name %>Form]]; 27 | } 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /lib/appjam/generators/project/Classes/contacts/controller/UpdateUserCommand.h.tt: -------------------------------------------------------------------------------- 1 | // 2 | // Update<%= @class_name %>Command.h 3 | // <%= @project_name %> 4 | // 5 | // Created by <%= @developer.capitalize %> on <%= @created_on %> 6 | // Copyright(c) <%= Time.now.year %>, All rights reserved. 7 | // 8 | 9 | #import "SimpleCommand.h" 10 | 11 | 12 | @interface Update<%= @class_name %>Command : SimpleCommand { 13 | 14 | } 15 | 16 | @end -------------------------------------------------------------------------------- /lib/appjam/generators/project/Classes/contacts/controller/UpdateUserCommand.m.tt: -------------------------------------------------------------------------------- 1 | // 2 | // Update<%= @class_name %>Command.h 3 | // <%= @project_name %> 4 | // 5 | // Created by <%= @developer.capitalize %> on <%= @created_on %> 6 | // Copyright(c) <%= Time.now.year %>, All rights reserved. 7 | // 8 | 9 | #import "Update<%= @class_name %>Command.h" 10 | #import "ApplicationFacade.h" 11 | #import "<%= @class_name %>Proxy.h" 12 | #import "<%= @class_name %>VO.h" 13 | 14 | @implementation Update<%= @class_name %>Command 15 | 16 | -(void)execute:(id)notification { 17 | <%= @class_name %>Proxy *<%= @project_name %>Proxy = (<%= @class_name %>Proxy *)[facade retrieveProxy:[<%= @class_name %>Proxy NAME]]; 18 | <%= @class_name %>VO *<%= @project_name %>VO = [notification body]; 19 | if ([<%= @project_name %>VO isValid]) { 20 | [<%= @project_name %>Proxy update:<%= @project_name %>VO]; 21 | [facade sendNotification:Show<%= @class_name %>List]; 22 | } else { 23 | [facade sendNotification:ShowError body:@"Invalid <%= @class_name %>"]; 24 | } 25 | } 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /lib/appjam/generators/project/Classes/contacts/model/UserProxy.h.tt: -------------------------------------------------------------------------------- 1 | // 2 | // <%= @class_name %>Proxy.h 3 | // <%= @project_name %> 4 | // 5 | // Created by <%= @developer.capitalize %> on <%= @created_on %> 6 | // Copyright(c) <%= Time.now.year %>, All rights reserved. 7 | // 8 | 9 | #import 10 | #import "Proxy.h" 11 | 12 | @interface <%= @class_name %>Proxy : Proxy { 13 | } 14 | 15 | -(void)create:(id)item; 16 | -(void)update:(id)item; 17 | -(void)delete:(id)item; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /lib/appjam/generators/project/Classes/contacts/model/vo/UserVO.h.tt: -------------------------------------------------------------------------------- 1 | // 2 | // <%= @class_name %>VO.h 3 | // <%= @project_name %> 4 | // 5 | // Created by <%= @developer.capitalize %> on <%= @created_on %> 6 | // Copyright(c) <%= Time.now.year %>, All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface <%= @class_name %>VO : NSObject { 13 | NSString *<%= @project_name %>name, *firstName, *lastName, *email, *password, *confirmPassword, *department; 14 | } 15 | 16 | @property(nonatomic, retain) NSString *<%= @project_name %>name, *firstName, *lastName, *email, *password, *confirmPassword, *department; 17 | 18 | +(id)with<%= @class_name %>Name:(NSString *)<%= @project_name %>name firstName:(NSString *)firstName lastName:(NSString *)lastName email:(NSString *)email password:(NSString *)password confirmPassword:(NSString *)confirmPassword department:(NSString *)department; 19 | -(NSString *)givenName; 20 | -(BOOL)isValid; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /lib/appjam/generators/project/Classes/contacts/model/vo/UserVO.m.tt: -------------------------------------------------------------------------------- 1 | // 2 | // <%= @class_name %>VO.m 3 | // <%= @project_name %> 4 | // 5 | // Created by <%= @developer.capitalize %> on <%= @created_on %> 6 | // Copyright(c) <%= Time.now.year %>, All rights reserved. 7 | // 8 | 9 | #import "<%= @class_name %>VO.h" 10 | 11 | 12 | @implementation <%= @class_name %>VO 13 | 14 | @synthesize <%= @project_name %>name, firstName, lastName, email, password, confirmPassword, department; 15 | 16 | +(id)with<%= @class_name %>Name:(NSString *)<%= @project_name %>name firstName:(NSString *)firstName lastName:(NSString *)lastName email:(NSString *)email password:(NSString *)password confirmPassword:(NSString *)confirmPassword department:(NSString *)department { 17 | <%= @class_name %>VO *<%= @project_name %>VO = [[[<%= @class_name %>VO alloc] init] autorelease]; 18 | <%= @project_name %>VO.<%= @project_name %>name = <%= @project_name %>name; 19 | <%= @project_name %>VO.firstName = firstName; 20 | <%= @project_name %>VO.lastName = lastName; 21 | <%= @project_name %>VO.email = email; 22 | <%= @project_name %>VO.password = password; 23 | <%= @project_name %>VO.confirmPassword = confirmPassword; 24 | <%= @project_name %>VO.department = department; 25 | return <%= @project_name %>VO; 26 | } 27 | 28 | -(NSString *)givenName { 29 | return [NSString stringWithFormat:@"%@ %@", firstName, lastName]; 30 | } 31 | 32 | -(BOOL)isValid { 33 | return <%= @project_name %>name != nil && password != nil && confirmPassword != nil && [password isEqualToString:confirmPassword]; 34 | } 35 | 36 | -(void)dealloc { 37 | self.<%= @project_name %>name = nil; 38 | self.firstName = nil; 39 | self.lastName = nil; 40 | self.email = nil; 41 | self.password = nil; 42 | self.confirmPassword = nil; 43 | self.department = nil; 44 | [super dealloc]; 45 | } 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /lib/appjam/generators/project/Classes/contacts/view/UserFormMediator.h.tt: -------------------------------------------------------------------------------- 1 | // 2 | // <%= @class_name %>FormMediator.h 3 | // <%= @project_name %> 4 | // 5 | // Created by <%= @developer.capitalize %> on <%= @created_on %> 6 | // Copyright(c) <%= Time.now.year %>, All rights reserved. 7 | // 8 | 9 | #import 10 | #import "Mediator.h" 11 | #import "<%= @class_name %>Form.h" 12 | #import "ApplicationFacade.h" 13 | 14 | @interface <%= @class_name %>FormMediator : Mediator <<%= @class_name %>FormViewControllerDelegate> { 15 | } 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /lib/appjam/generators/project/Classes/contacts/view/UserListMediator.h.tt: -------------------------------------------------------------------------------- 1 | // 2 | // <%= @class_name %>ListMediator.h 3 | // <%= @project_name %> 4 | // 5 | // Created by <%= @developer.capitalize %> on <%= @created_on %> 6 | // Copyright(c) <%= Time.now.year %>, All rights reserved. 7 | // 8 | 9 | #import 10 | #import "Mediator.h" 11 | #import "<%= @class_name %>List.h" 12 | #import "ApplicationFacade.h" 13 | 14 | @interface <%= @class_name %>ListMediator : Mediator <<%= @class_name %>ListViewControllerDelegate>{ 15 | } 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /lib/appjam/generators/project/Classes/contacts/view/UserListMediator.m.tt: -------------------------------------------------------------------------------- 1 | // 2 | // <%= @class_name %>ListMediator.m 3 | // <%= @project_name %> 4 | // 5 | // Created by <%= @developer.capitalize %> on <%= @created_on %> 6 | // Copyright(c) <%= Time.now.year %>, All rights reserved. 7 | // 8 | 9 | #import "<%= @class_name %>ListMediator.h" 10 | 11 | @implementation <%= @class_name %>ListMediator 12 | 13 | +(NSString *)NAME { 14 | return @"<%= @class_name %>ListMediator"; 15 | } 16 | 17 | -(<%= @class_name %>List *)viewComponent { 18 | return viewComponent; 19 | } 20 | 21 | -(void)initializeMediator { 22 | self.mediatorName = [<%= @class_name %>ListMediator NAME]; 23 | } 24 | 25 | -(void)onRegister { 26 | [self.viewComponent setDelegate:self]; 27 | } 28 | 29 | -(NSArray *)listNotificationInterests { 30 | return [NSArray arrayWithObjects:Get<%= @class_name %>sSuccess, nil]; 31 | } 32 | 33 | -(void)handleNotification:(id)notification { 34 | if ([[notification name] isEqualToString:Get<%= @class_name %>sSuccess]) { 35 | [self.viewComponent reload<%= @class_name %>s:[notification body]]; 36 | } 37 | } 38 | 39 | -(void)<%= @project_name %>ListAppeared { 40 | [self sendNotification:Get<%= @class_name %>s]; 41 | } 42 | 43 | -(void)<%= @project_name %>Selected:(<%= @class_name %>VO *)<%= @project_name %>VO { 44 | [self sendNotification:ShowEdit<%= @class_name %> body:<%= @project_name %>VO]; 45 | } 46 | 47 | -(void)delete<%= @class_name %>Selected:(<%= @class_name %>VO *)<%= @project_name %>VO { 48 | [self sendNotification:Delete<%= @class_name %> body:<%= @project_name %>VO]; 49 | } 50 | 51 | -(void)new<%= @class_name %>Selected { 52 | [self sendNotification:ShowNew<%= @class_name %>]; 53 | } 54 | 55 | -(void)dealloc { 56 | [super dealloc]; 57 | } 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /lib/appjam/generators/project/Classes/contacts/view/UserMediator.h.tt: -------------------------------------------------------------------------------- 1 | // 2 | // <%= @class_name %>Mediator.h 3 | // <%= @project_name %> 4 | // 5 | // Created by <%= @developer.capitalize %> on <%= @created_on %> 6 | // Copyright(c) <%= Time.now.year %>, All rights reserved. 7 | // 8 | 9 | #import "Mediator.h" 10 | 11 | @interface <%= @class_name %>Mediator : Mediator { 12 | 13 | } 14 | 15 | @end -------------------------------------------------------------------------------- /lib/appjam/generators/project/Classes/contacts/view/UserMediator.m.tt: -------------------------------------------------------------------------------- 1 | // 2 | // <%= @class_name %>Mediator.m 3 | // <%= @project_name %> 4 | // 5 | // Created by <%= @developer.capitalize %> on <%= @created_on %> 6 | // Copyright(c) <%= Time.now.year %>, All rights reserved. 7 | // 8 | 9 | #import "<%= @class_name %>Mediator.h" 10 | #import "<%= @class_name %>.h" 11 | #import "ApplicationFacade.h" 12 | 13 | @implementation <%= @class_name %>Mediator 14 | 15 | +(NSString *)NAME { 16 | return @"<%= @class_name %>Mediator"; 17 | } 18 | 19 | -(<%= @class_name %> *)viewComponent { 20 | return viewComponent; 21 | } 22 | 23 | -(void)initializeMediator { 24 | self.mediatorName = [<%= @class_name %>Mediator NAME]; 25 | } 26 | 27 | -(NSArray *)listNotificationInterests { 28 | return [NSArray arrayWithObjects:Show<%= @class_name %>Form, Show<%= @class_name %>List, ShowError, nil]; 29 | } 30 | 31 | -(void)handleNotification:(id)notification { 32 | 33 | if ([[notification name] isEqualToString:Show<%= @class_name %>Form]) { 34 | [self.viewComponent show<%= @class_name %>Form]; 35 | } else if ([[notification name] isEqualToString:Show<%= @class_name %>List]) { 36 | [self.viewComponent show<%= @class_name %>List]; 37 | } else if ([[notification name] isEqualToString:ShowError]) { 38 | [self.viewComponent showError:[notification body]]; 39 | } 40 | } 41 | 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /lib/appjam/generators/project/Classes/contacts/view/components/Contacts.h.tt: -------------------------------------------------------------------------------- 1 | // 2 | // <%= @class_name %>.h 3 | // <%= @project_name %> 4 | // 5 | // Created by <%= @developer.capitalize %> on <%= @created_on %> 6 | // Copyright(c) <%= Time.now.year %>, All rights reserved. 7 | // 8 | 9 | #import 10 | #import "<%= @class_name %>List.h" 11 | #import "<%= @class_name %>Form.h" 12 | 13 | @interface <%= @class_name %> : UIView { 14 | UINavigationController *navigation; 15 | <%= @class_name %>List *<%= @project_name %>List; 16 | <%= @class_name %>Form *<%= @project_name %>Form; 17 | } 18 | 19 | @property(nonatomic, retain) UINavigationController *navigation; 20 | @property(nonatomic, retain) <%= @class_name %>List *<%= @project_name %>List; 21 | @property(nonatomic, retain) <%= @class_name %>Form *<%= @project_name %>Form; 22 | 23 | -(void)show<%= @class_name %>Form; 24 | -(void)show<%= @class_name %>List; 25 | -(void)showError:(NSString *)message; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /lib/appjam/generators/project/Classes/contacts/view/components/Contacts.m.tt: -------------------------------------------------------------------------------- 1 | // 2 | // <%= @class_name %>.m 3 | // <%= @project_name %> 4 | // 5 | // Created by <%= @developer.capitalize %> on <%= @created_on %> 6 | // Copyright(c) <%= Time.now.year %>, All rights reserved. 7 | // 8 | 9 | #import "<%= @class_name %>.h" 10 | 11 | 12 | @implementation <%= @class_name %> 13 | 14 | @synthesize <%= @project_name %>List, <%= @project_name %>Form, navigation; 15 | 16 | -(id)initWithFrame:(CGRect)frame { 17 | if (self = [super initWithFrame:frame]) { 18 | self.navigation = [[[UINavigationController alloc] init] autorelease]; 19 | self.<%= @project_name %>List = [[[<%= @class_name %>List alloc] init] autorelease]; 20 | self.<%= @project_name %>Form = [[[<%= @class_name %>Form alloc] init] autorelease]; 21 | [navigation pushViewController:<%= @project_name %>List animated:NO]; 22 | [self addSubview:navigation.view]; 23 | } 24 | return self; 25 | } 26 | 27 | -(void)show<%= @class_name %>Form { 28 | [navigation pushViewController:<%= @project_name %>Form animated:YES]; 29 | } 30 | 31 | -(void)show<%= @class_name %>List { 32 | [navigation popToRootViewControllerAnimated:YES]; 33 | } 34 | 35 | -(void)showError:(NSString *)message { 36 | [[[[UIAlertView alloc] initWithTitle:@"Error:" message:message delegate:self cancelButtonTitle:@"OK" otherButtonTitles: nil] autorelease] show]; 37 | } 38 | 39 | - (void)dealloc { 40 | self.navigation = nil; 41 | self.<%= @project_name %>List = nil; 42 | self.<%= @project_name %>Form = nil; 43 | [super dealloc]; 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /lib/appjam/generators/project/Classes/contacts/view/components/UserForm.h.tt: -------------------------------------------------------------------------------- 1 | // 2 | // <%= @class_name %>Form.h 3 | // <%= @project_name %> 4 | // 5 | // Created by <%= @developer.capitalize %> on <%= @created_on %> 6 | // Copyright(c) <%= Time.now.year %>, All rights reserved. 7 | // 8 | 9 | #import 10 | #import "<%= @class_name %>VO.h" 11 | 12 | @protocol <%= @class_name %>FormViewControllerDelegate 13 | 14 | -(void)create<%= @class_name %>Selected:(<%= @class_name %>VO *)<%= @project_name %>VO; 15 | -(void)update<%= @class_name %>Selected:(<%= @class_name %>VO *)<%= @project_name %>VO; 16 | 17 | @end 18 | 19 | typedef enum { 20 | NEW, EDIT 21 | } Mode; 22 | 23 | @interface <%= @class_name %>Form : UITableViewController { 24 | <%= @class_name %>VO *<%= @project_name %>VO; 25 | UITextField *firstNameTextField, *lastNameTextField, *emailTextField, *<%= @project_name %>nameTextField, *passwordTextField, *confirmPasswordTextField; 26 | Mode mode; 27 | id<<%= @class_name %>FormViewControllerDelegate> delegate; 28 | } 29 | 30 | @property(nonatomic, retain) <%= @class_name %>VO *<%= @project_name %>VO; 31 | @property(nonatomic, retain) UITextField *firstNameTextField, *lastNameTextField, *emailTextField, *<%= @project_name %>nameTextField, *passwordTextField, *confirmPasswordTextField; 32 | @property Mode mode; 33 | @property(nonatomic, retain) id<<%= @class_name %>FormViewControllerDelegate> delegate; 34 | 35 | -(UITextField *)textFieldWithPlaceHolder:(NSString *)placeHolder frame:(CGRect)frame; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /lib/appjam/generators/project/Classes/contacts/view/components/UserList.h.tt: -------------------------------------------------------------------------------- 1 | // 2 | // <%= @class_name %>List.h 3 | // <%= @project_name %> 4 | // 5 | // Created by <%= @developer.capitalize %> on <%= @created_on %> 6 | // Copyright(c) <%= Time.now.year %>, All rights reserved. 7 | // 8 | 9 | #import 10 | #import "<%= @class_name %>VO.h" 11 | 12 | @protocol <%= @class_name %>ListViewControllerDelegate 13 | 14 | -(void)<%= @project_name %>Selected:(<%= @class_name %>VO *)<%= @project_name %>VO; 15 | -(void)delete<%= @class_name %>Selected:(<%= @class_name %>VO *)<%= @project_name %>VO; 16 | -(void)new<%= @class_name %>Selected; 17 | -(void)<%= @project_name %>ListAppeared; 18 | 19 | @end 20 | 21 | @interface <%= @class_name %>List : UITableViewController { 22 | NSMutableArray *<%= @project_name %>s; 23 | id<<%= @class_name %>ListViewControllerDelegate> delegate; 24 | } 25 | 26 | @property(nonatomic, retain) NSMutableArray *<%= @project_name %>s; 27 | @property(nonatomic, retain) id<<%= @class_name %>ListViewControllerDelegate> delegate; 28 | 29 | -(void)reload<%= @class_name %>s:(NSMutableArray *)<%= @project_name %>s; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /lib/appjam/generators/project/Classes/org/puremvc/objectivec/core/Model.h: -------------------------------------------------------------------------------- 1 | // 2 | // Model.h 3 | // PureMVC_ObjectiveC 4 | // 5 | // PureMVC Port to ObjectiveC by Brian Knorr 6 | // PureMVC - Copyright(c) 2006-2008 Futurescale, Inc., Some rights reserved. 7 | // 8 | 9 | #import 10 | #import "IModel.h" 11 | 12 | /** 13 | * A Singleton IModel implementation. 14 | * 15 | *

16 | * In PureMVC, the Model class provides 17 | * access to model objects (Proxies) by named lookup. 18 | * 19 | *

20 | * The Model assumes these responsibilities:

21 | * 22 | *
    23 | *
  • Maintain a cache of IProxy instances.
  • 24 | *
  • Provide methods for registering, retrieving, and removing 25 | * IProxy instances.
  • 26 | *
27 | * 28 | *

29 | * Your application must register IProxy instances 30 | * with the Model. Typically, you use an 31 | * ICommand to create and register IProxy 32 | * instances once the Facade has initialized the Core 33 | * actors.

34 | * 35 | * @see Proxy, IProxy 36 | */ 37 | @interface Model : NSObject { 38 | NSMutableDictionary *proxyMap; 39 | } 40 | 41 | @property(nonatomic, retain) NSMutableDictionary *proxyMap; 42 | 43 | -(id)init; 44 | -(void)initializeModel; 45 | +(id)getInstance; 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /lib/appjam/generators/project/Classes/org/puremvc/objectivec/core/View.h: -------------------------------------------------------------------------------- 1 | // 2 | // View.h 3 | // PureMVC_ObjectiveC 4 | // 5 | // PureMVC Port to ObjectiveC by Brian Knorr 6 | // PureMVC - Copyright(c) 2006-2008 Futurescale, Inc., Some rights reserved. 7 | // 8 | 9 | #import 10 | #import "IView.h" 11 | 12 | /** 13 | * A Singleton IView implementation. 14 | * 15 | *

16 | * In PureMVC, the View class assumes these responsibilities: 17 | *

    18 | *
  • Maintain a cache of IMediator instances.
  • 19 | *
  • Provide methods for registering, retrieving, and removing IMediators.
  • 20 | *
  • Notifiying IMediators when they are registered or removed.
  • 21 | *
  • Managing the observer lists for each INotification in the application.
  • 22 | *
  • Providing a method for attaching IObservers to an INotification's observer list.
  • 23 | *
  • Providing a method for broadcasting an INotification.
  • 24 | *
  • Notifying the IObservers of a given INotification when it broadcast.
  • 25 | *
26 | * 27 | * @see Mediator, Observer, Notification 28 | */ 29 | @interface View : NSObject { 30 | NSMutableDictionary *mediatorMap, *observerMap; 31 | } 32 | 33 | @property(nonatomic, retain) NSMutableDictionary *mediatorMap, *observerMap; 34 | 35 | -(id)init; 36 | -(void)initializeView; 37 | +(id)getInstance; 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /lib/appjam/generators/project/Classes/org/puremvc/objectivec/interfaces/ICommand.h: -------------------------------------------------------------------------------- 1 | #import "INotification.h" 2 | /** 3 | * The interface definition for a PureMVC Command. 4 | * 5 | * @see INotification 6 | */ 7 | @protocol ICommand 8 | 9 | /** 10 | * Execute the ICommand's logic to handle a given INotification. 11 | * 12 | * @param notification an INotification to handle. 13 | */ 14 | -(void)execute:(id)notification; 15 | 16 | @end -------------------------------------------------------------------------------- /lib/appjam/generators/project/Classes/org/puremvc/objectivec/interfaces/IModel.h: -------------------------------------------------------------------------------- 1 | #import "IProxy.h" 2 | /** 3 | * The interface definition for a PureMVC Model. 4 | * 5 | *

6 | * In PureMVC, IModel implementors provide 7 | * access to IProxy objects by named lookup.

8 | * 9 | *

10 | * An IModel assumes these responsibilities:

11 | * 12 | *
    13 | *
  • Maintain a cache of IProxy instances
  • 14 | *
  • Provide methods for registering, retrieving, and removing IProxy instances
  • 15 | *
16 | */ 17 | @protocol IModel 18 | 19 | /** 20 | * Check if a Proxy is registered 21 | * 22 | * @param proxyName 23 | * @return whether a Proxy is currently registered with the given proxyName. 24 | */ 25 | -(BOOL)hasProxy:(NSString *)proxyName; 26 | 27 | /** 28 | * Register an IProxy instance with the Model. 29 | * 30 | * @param proxy an object reference to be held by the Model. 31 | */ 32 | -(void)registerProxy:(id)proxy; 33 | 34 | /** 35 | * Remove an IProxy instance from the Model. 36 | * 37 | * @param proxyName name of the IProxy instance to be removed. 38 | * @return the IProxy that was removed from the Model 39 | */ 40 | -(id)removeProxy:(NSString *)proxyName; 41 | 42 | /** 43 | * Retrieve an IProxy instance from the Model. 44 | * 45 | * @param proxyName 46 | * @return the IProxy instance previously registered with the given proxyName. 47 | */ 48 | -(id)retrieveProxy:(NSString *)proxyName; 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /lib/appjam/generators/project/Classes/org/puremvc/objectivec/interfaces/INotification.h: -------------------------------------------------------------------------------- 1 | /** 2 | * The interface definition for a PureMVC Notification. 3 | * 4 | *

5 | * PureMVC does not rely upon underlying event models such 6 | * as the one provided with in AppKit or UIKit

7 | * 8 | *

9 | * The Observer Pattern as implemented within PureMVC exists 10 | * to support event-driven communication between the 11 | * application and the actors of the MVC triad.

12 | * 13 | *

14 | * Notifications are not meant to be a replacement for Events 15 | * in AppKit or UIKit. Generally, IMediator implementors 16 | * place event listeners on their view components, which they 17 | * then handle in the usual way. This may lead to the broadcast of Notifications to 18 | * trigger ICommands or to communicate with other IMediators. IProxy and ICommand 19 | * instances communicate with each other and IMediators 20 | * by broadcasting INotifications.

21 | * 22 | * @see IView, IObserver 23 | */ 24 | @protocol INotification 25 | 26 | /** 27 | * Get the body of the INotification instance 28 | */ 29 | -(id)body; 30 | 31 | /** 32 | * Get the name of the INotification instance. 33 | * No setter, should be set by constructor only 34 | */ 35 | -(NSString *)name; 36 | 37 | /** 38 | * Get the type of the INotification instance 39 | */ 40 | -(NSString *)type; 41 | 42 | /** 43 | * Set the body of the INotification instance 44 | */ 45 | -(void)setBody:(id)body; 46 | 47 | /** 48 | * Set the type of the INotification instance 49 | */ 50 | -(void)setType:(NSString *)type; 51 | 52 | /** 53 | * Get the string representation of the INotification instance 54 | */ 55 | -(NSString *)description; 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /lib/appjam/generators/project/Classes/org/puremvc/objectivec/interfaces/INotifier.h: -------------------------------------------------------------------------------- 1 | /** 2 | * The interface definition for a PureMVC Notifier. 3 | * 4 | *

5 | * MacroCommand, Command, Mediator and Proxy 6 | * all have a need to send Notifications.

7 | * 8 | *

9 | * The INotifier interface provides a common method called 10 | * sendNotification that relieves implementation code of 11 | * the necessity to actually construct Notifications.

12 | * 13 | *

14 | * The Notifier class, which all of the above mentioned classes 15 | * extend, also provides an initialized reference to the Facade 16 | * Singleton, which is required for the convienience method 17 | * for sending Notifications, but also eases implementation as these 18 | * classes have frequent Facade interactions and usually require 19 | * access to the facade anyway.

20 | * 21 | * @see IFacade, INotification 22 | */ 23 | @protocol INotifier 24 | 25 | /** 26 | * Send a INotification. 27 | * 28 | *

29 | * Convenience method to prevent having to construct new 30 | * notification instances in our implementation code.

31 | * 32 | * @param notificationName the name of the notification to send 33 | * @param body the body of the notification 34 | * @param type the type of the notification 35 | */ 36 | -(void)sendNotification:(NSString *)notificationName body:(id)body type:(NSString *)type; 37 | -(void)sendNotification:(NSString *)notificationName; 38 | -(void)sendNotification:(NSString *)notificationName body:(id)body; 39 | -(void)sendNotification:(NSString *)notificationName type:(NSString *)type; 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /lib/appjam/generators/project/Classes/org/puremvc/objectivec/interfaces/IProxy.h: -------------------------------------------------------------------------------- 1 | /** 2 | * The interface definition for a PureMVC Proxy. 3 | * 4 | *

5 | * In PureMVC, IProxy implementors assume these responsibilities:

6 | *
    7 | *
  • Implement a common method which returns the name of the Proxy.
  • 8 | *
  • Provide methods for setting and getting the data object.
  • 9 | *
10 | *

11 | * Additionally, IProxys typically:

12 | *
    13 | *
  • Maintain references to one or more pieces of model data.
  • 14 | *
  • Provide methods for manipulating that data.
  • 15 | *
  • Generate INotifications when their model data changes.
  • 16 | *
  • Expose their name as a static method called NAME, if they are not instantiated multiple times.
  • 17 | *
  • Encapsulate interaction with local or remote services used to fetch and persist model data.
  • 18 | *
19 | */ 20 | @protocol IProxy 21 | 22 | /** 23 | * Get the data object 24 | * 25 | * @return the data as type id 26 | */ 27 | -(id)data; 28 | 29 | /** 30 | * Get the Proxy name 31 | * 32 | * @return the Proxy instance name 33 | */ 34 | -(NSString *)proxyName; 35 | 36 | /** 37 | * Called by the Model when the Proxy is registered 38 | */ 39 | -(void)onRegister; 40 | 41 | /** 42 | * Called by the Model when the Proxy is removed 43 | */ 44 | -(void)onRemove; 45 | 46 | /** 47 | * Set the data object 48 | * 49 | * @param data the data object 50 | */ 51 | -(void)setData:(id)data; 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /lib/appjam/generators/project/Classes/org/puremvc/objectivec/patterns/command/MacroCommand.h: -------------------------------------------------------------------------------- 1 | // 2 | // MacroCommand.h 3 | // PureMVC_ObjectiveC 4 | // 5 | // PureMVC Port to ObjectiveC by Brian Knorr 6 | // PureMVC - Copyright(c) 2006-2008 Futurescale, Inc., Some rights reserved. 7 | // 8 | 9 | #import 10 | #import "INotification.h" 11 | #import "Notifier.h" 12 | #import "ICommand.h" 13 | 14 | /** 15 | * A base ICommand implementation that executes other ICommands. 16 | * 17 | *

18 | * A MacroCommand maintains an list of 19 | * ICommand Class references called SubCommands.

20 | * 21 | *

22 | * When execute is called, the MacroCommand 23 | * instantiates and calls execute on each of its SubCommands turn. 24 | * Each SubCommand will be passed a reference to the original 25 | * INotification that was passed to the MacroCommand's 26 | * execute method.

27 | * 28 | *

29 | * Unlike SimpleCommand, your subclass 30 | * should not override execute, but instead, should 31 | * override the initializeMacroCommand method, 32 | * calling addSubCommand once for each SubCommand 33 | * to be executed.

34 | * 35 | *

36 | * 37 | * @see Controller, Notification, SimpleCommand 38 | */ 39 | @interface MacroCommand : Notifier { 40 | NSMutableArray *subCommands; 41 | } 42 | 43 | @property(nonatomic, retain) NSMutableArray *subCommands; 44 | 45 | -(id)init; 46 | -(void)initializeMacroCommand; 47 | -(void)addSubCommand:(Class)commandClassRef; 48 | +(id)command; 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /lib/appjam/generators/project/Classes/org/puremvc/objectivec/patterns/command/SimpleCommand.h: -------------------------------------------------------------------------------- 1 | // 2 | // SimpleCommand.h 3 | // PureMVC_ObjectiveC 4 | // 5 | // PureMVC Port to ObjectiveC by Brian Knorr 6 | // PureMVC - Copyright(c) 2006-2008 Futurescale, Inc., Some rights reserved. 7 | // 8 | 9 | #import 10 | #import "INotification.h" 11 | #import "Notifier.h" 12 | #import "ICommand.h" 13 | 14 | /** 15 | * A base ICommand implementation. 16 | * 17 | *

18 | * Your subclass should override the execute 19 | * method where your business logic will handle the INotification.

20 | * 21 | * @see Controller, Notification, MacroCommand 22 | */ 23 | @interface SimpleCommand : Notifier { 24 | } 25 | 26 | +(id)command; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /lib/appjam/generators/project/Classes/org/puremvc/objectivec/patterns/command/SimpleCommand.m: -------------------------------------------------------------------------------- 1 | // 2 | // SimpleCommand.m 3 | // PureMVC_ObjectiveC 4 | // 5 | // PureMVC Port to ObjectiveC by Brian Knorr 6 | // PureMVC - Copyright(c) 2006-2008 Futurescale, Inc., Some rights reserved. 7 | // 8 | 9 | #import "SimpleCommand.h" 10 | 11 | 12 | @implementation SimpleCommand 13 | 14 | /** 15 | * Static Convenience Constructor. 16 | */ 17 | +(id)command { 18 | return [[[self alloc] init] autorelease]; 19 | } 20 | 21 | /** 22 | * Fulfill the use-case initiated by the given INotification. 23 | * 24 | *

25 | * In the Command Pattern, an application use-case typically 26 | * begins with some <%= @project_name %> action, which results in an INotification being broadcast, which 27 | * is handled by business logic in the execute method of an 28 | * ICommand.

29 | * 30 | * @param notification the INotification to handle. 31 | */ 32 | -(void)execute:(id)notification {} 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /lib/appjam/generators/project/Classes/org/puremvc/objectivec/patterns/facade/Facade.h: -------------------------------------------------------------------------------- 1 | // 2 | // Facade.h 3 | // PureMVC_ObjectiveC 4 | // 5 | // PureMVC Port to ObjectiveC by Brian Knorr 6 | // PureMVC - Copyright(c) 2006-2008 Futurescale, Inc., Some rights reserved. 7 | // 8 | 9 | #import 10 | #import "IFacade.h" 11 | #import "IController.h" 12 | #import "IModel.h" 13 | #import "IView.h" 14 | 15 | /** 16 | * A base Singleton IFacade implementation. 17 | * 18 | *

19 | * In PureMVC, the Facade class assumes these 20 | * responsibilities: 21 | *

    22 | *
  • Initializing the Model, View 23 | * and Controller Singletons.
  • 24 | *
  • Providing all the methods defined by the IModel, 25 | * IView, & IController interfaces.
  • 26 | *
  • Providing the ability to override the specific Model, 27 | * View and Controller Singletons created.
  • 28 | *
  • Providing a single point of contact to the application for 29 | * registering Commands and notifying Observers
  • 30 | *
31 | *

32 | * 33 | * @see Model, View, Controller, Notification, Mediator, Proxy, SimpleCommand, MacroCommand 34 | */ 35 | @interface Facade : NSObject { 36 | id controller; 37 | id model; 38 | id view; 39 | } 40 | 41 | @property(nonatomic, retain) id controller; 42 | @property(nonatomic, retain) id model; 43 | @property(nonatomic, retain) id view; 44 | 45 | -(id)init; 46 | -(void)initializeFacade; 47 | +(id)getInstance; 48 | -(void)initializeController; 49 | -(void)initializeView; 50 | -(void)initializeModel; 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /lib/appjam/generators/project/Classes/org/puremvc/objectivec/patterns/mediator/Mediator.h: -------------------------------------------------------------------------------- 1 | // 2 | // Mediator.h 3 | // PureMVC_ObjectiveC 4 | // 5 | // PureMVC Port to ObjectiveC by Brian Knorr 6 | // PureMVC - Copyright(c) 2006-2008 Futurescale, Inc., Some rights reserved. 7 | // 8 | 9 | #import 10 | #import "IMediator.h" 11 | #import "Notifier.h" 12 | 13 | /** 14 | * A base IMediator implementation. 15 | * 16 | * @see View 17 | */ 18 | @interface Mediator : Notifier { 19 | NSString *mediatorName; 20 | id viewComponent; 21 | } 22 | 23 | @property(nonatomic, retain) id viewComponent; 24 | @property(nonatomic, retain) NSString *mediatorName; 25 | 26 | +(id)mediator; 27 | +(id)withMediatorName:(NSString *)mediatorName; 28 | +(id)withMediatorName:(NSString *)mediatorName viewComponent:(id)viewComponent; 29 | +(id)withViewComponent:(id)viewComponent; 30 | -(id)initWithMediatorName:(NSString *)mediatorName viewComponent:(id)viewComponent; 31 | -(void)initializeMediator; 32 | 33 | +(NSString *)NAME; 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /lib/appjam/generators/project/Classes/org/puremvc/objectivec/patterns/observer/Notifier.h: -------------------------------------------------------------------------------- 1 | // 2 | // Notifier.h 3 | // PureMVC_ObjectiveC 4 | // 5 | // PureMVC Port to ObjectiveC by Brian Knorr 6 | // PureMVC - Copyright(c) 2006-2008 Futurescale, Inc., Some rights reserved. 7 | // 8 | 9 | #import 10 | #import "INotifier.h" 11 | #import "IFacade.h" 12 | 13 | /** 14 | * A Base INotifier implementation. 15 | * 16 | *

17 | * MacroCommand, Command, Mediator and Proxy 18 | * all have a need to send Notifications.

19 | *

20 | * The INotifier interface provides a common method called 21 | * sendNotification that relieves implementation code of 22 | * the necessity to actually construct Notifications.

23 | * 24 | *

25 | * The Notifier class, which all of the above mentioned classes 26 | * extend, provides an initialized reference to the Facade 27 | * Singleton, which is required for the convienience method 28 | * for sending Notifications, but also eases implementation as these 29 | * classes have frequent Facade interactions and usually require 30 | * access to the facade anyway.

31 | * 32 | * @see Facade, Mediator, Proxy, SimpleCommand, MacroCommand 33 | */ 34 | @interface Notifier : NSObject { 35 | id facade; 36 | } 37 | 38 | @property(nonatomic, retain) id facade; 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /lib/appjam/generators/project/Classes/org/puremvc/objectivec/patterns/observer/Notifier.m: -------------------------------------------------------------------------------- 1 | // 2 | // Notifier.m 3 | // PureMVC_ObjectiveC 4 | // 5 | // PureMVC Port to ObjectiveC by Brian Knorr 6 | // PureMVC - Copyright(c) 2006-2008 Futurescale, Inc., Some rights reserved. 7 | // 8 | 9 | #import "Notifier.h" 10 | #import "Facade.h" 11 | 12 | @implementation Notifier 13 | 14 | @synthesize facade; 15 | 16 | -(id)init { 17 | if (self = [super init]) { 18 | self.facade = [Facade getInstance]; 19 | } 20 | return self; 21 | } 22 | 23 | /** 24 | * Create and send an INotification. 25 | * 26 | *

27 | * Keeps us from having to construct new INotification 28 | * instances in our implementation code. 29 | * @param notificationName the name of the notiification to send 30 | * @param body the body of the notification 31 | * @param type the type of the notification 32 | */ 33 | -(void)sendNotification:(NSString *)notificationName body:(id)body type:(NSString *)type { 34 | [facade sendNotification:notificationName body:body type:type]; 35 | } 36 | 37 | -(void)sendNotification:(NSString *)notificationName { 38 | [self sendNotification:notificationName body:nil type:nil]; 39 | } 40 | 41 | -(void)sendNotification:(NSString *)notificationName body:(id)body { 42 | [self sendNotification:notificationName body:body type:nil]; 43 | } 44 | 45 | -(void)sendNotification:(NSString *)notificationName type:(NSString *)type { 46 | [self sendNotification:notificationName body:nil type:type]; 47 | } 48 | 49 | -(void)dealloc { 50 | self.facade = nil; 51 | [super dealloc]; 52 | } 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /lib/appjam/generators/project/Classes/org/puremvc/objectivec/patterns/observer/Observer.h: -------------------------------------------------------------------------------- 1 | // 2 | // Observer.h 3 | // PureMVC_ObjectiveC 4 | // 5 | // PureMVC Port to ObjectiveC by Brian Knorr 6 | // PureMVC - Copyright(c) 2006-2008 Futurescale, Inc., Some rights reserved. 7 | // 8 | 9 | #import 10 | #import "IObserver.h" 11 | 12 | /** 13 | * A base IObserver implementation. 14 | * 15 | *

16 | * An Observer is an object that encapsulates information 17 | * about an interested object with a method that should 18 | * be called when a particular INotification is broadcast.

19 | * 20 | *

21 | * In PureMVC, the Observer class assumes these responsibilities: 22 | *

    23 | *
  • Encapsulate the notification (callback) method of the interested object.
  • 24 | *
  • Encapsulate the notification context (this) of the interested object.
  • 25 | *
  • Provide methods for setting the notification method and context.
  • 26 | *
  • Provide a method for notifying the interested object.
  • 27 | *
28 | * 29 | * @see View, Notification 30 | */ 31 | @interface Observer : NSObject { 32 | SEL notifyMethod; 33 | id notifyContext; 34 | } 35 | 36 | @property SEL notifyMethod; 37 | @property(nonatomic, retain) id notifyContext; 38 | 39 | +(id)withNotifyMethod:(SEL)notifyMethod notifyContext:(id)notifyContext; 40 | -(id)initWithNotifyMethod:(SEL)notifyMethod notifyContext:(id)notifyContext; 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /lib/appjam/generators/project/Classes/org/puremvc/objectivec/patterns/proxy/Proxy.h: -------------------------------------------------------------------------------- 1 | // 2 | // Proxy.h 3 | // PureMVC_ObjectiveC 4 | // 5 | // PureMVC Port to ObjectiveC by Brian Knorr 6 | // PureMVC - Copyright(c) 2006-2008 Futurescale, Inc., Some rights reserved. 7 | // 8 | 9 | #import 10 | #import "IProxy.h" 11 | #import "Notifier.h" 12 | 13 | /** 14 | * A base IProxy implementation. 15 | * 16 | *

17 | * In PureMVC, Proxy classes are used to manage parts of the 18 | * application's data model.

19 | * 20 | *

21 | * A Proxy might simply manage a reference to a local data object, 22 | * in which case interacting with it might involve setting and 23 | * getting of its data in synchronous fashion.

24 | * 25 | *

26 | * Proxy classes are also used to encapsulate the application's 27 | * interaction with remote services to save or retrieve data, in which case, 28 | * we adopt an asyncronous idiom; setting data (or calling a method) on the 29 | * Proxy and listening for a Notification to be sent 30 | * when the Proxy has retrieved the data from the service.

31 | * 32 | * @see Model 33 | */ 34 | @interface Proxy : Notifier { 35 | id data; 36 | NSString *proxyName; 37 | } 38 | 39 | @property(nonatomic, retain) id data; 40 | @property(nonatomic, retain) NSString *proxyName; 41 | 42 | +(id)proxy; 43 | +(id)withProxyName:(NSString *)proxyName; 44 | +(id)withProxyName:(NSString *)proxyName data:(id)data; 45 | +(id)withData:(id)data; 46 | -(id)initWithProxyName:(NSString *)proxyName data:(id)data; 47 | -(void)initializeProxy; 48 | 49 | +(NSString *)NAME; 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /lib/appjam/generators/project/Classes/org/puremvc/objectivec/patterns/proxy/Proxy.m: -------------------------------------------------------------------------------- 1 | // 2 | // Proxy.m 3 | // PureMVC_ObjectiveC 4 | // 5 | // PureMVC Port to ObjectiveC by Brian Knorr 6 | // PureMVC - Copyright(c) 2006-2008 Futurescale, Inc., Some rights reserved. 7 | // 8 | 9 | #import "Proxy.h" 10 | 11 | @implementation Proxy 12 | 13 | @synthesize data, proxyName; 14 | 15 | +(id)proxy { 16 | return [[[self alloc] initWithProxyName:nil data:nil] autorelease]; 17 | } 18 | 19 | +(id)withProxyName:(NSString *)proxyName { 20 | return [[[self alloc] initWithProxyName:proxyName data:nil] autorelease]; 21 | } 22 | 23 | +(id)withProxyName:(NSString *)proxyName data:(id)data { 24 | return [[[self alloc] initWithProxyName:proxyName data:data] autorelease]; 25 | } 26 | 27 | +(id)withData:(id)data { 28 | return [[[self alloc] initWithProxyName:nil data:data] autorelease]; 29 | } 30 | 31 | -(id)initWithProxyName:(NSString *)_proxyName data:(id)_data { 32 | if (self = [super init]) { 33 | self.proxyName = (_proxyName == nil) ? [[self class] NAME] : _proxyName; 34 | self.data = _data; 35 | [self initializeProxy]; 36 | } 37 | return self; 38 | } 39 | 40 | +(NSString *)NAME { 41 | return @"Proxy"; 42 | } 43 | 44 | /** 45 | * Initialize the Proxy instance. 46 | * 47 | *

48 | * Called automatically by the constructor, this 49 | * is your opportunity to initialize the Proxy 50 | * instance in your subclass without overriding the 51 | * constructor.

52 | * 53 | * @return void 54 | */ 55 | -(void)initializeProxy {} 56 | 57 | /** 58 | * Called by the Model when the Proxy is registered 59 | */ 60 | -(void)onRegister {} 61 | 62 | /** 63 | * Called by the Model when the Proxy is removed 64 | */ 65 | -(void)onRemove {} 66 | 67 | -(void)dealloc { 68 | self.data = nil; 69 | self.proxyName = nil; 70 | [super dealloc]; 71 | } 72 | 73 | @end 74 | -------------------------------------------------------------------------------- /lib/appjam/generators/project/Contacts-Info.plist.tt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | 13 | CFBundleIdentifier 14 | com.yourcompany.${PRODUCT_NAME:rfc1034identifier} 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | APPL 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /lib/appjam/generators/project/Contacts_Prefix.pch.tt: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the '<%= @class_name %>' target in the '<%= @project_name %>' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #import 8 | #endif 9 | 10 | #define ALog(format, ...) NSLog((@"%s [L%d] " format), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); 11 | 12 | #ifdef DEBUG 13 | #define DLog(format, ...) ALog(format, ##__VA_ARGS__); 14 | #else 15 | #define DLog(...) 16 | #endif -------------------------------------------------------------------------------- /lib/appjam/generators/project/main.m.tt: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // <%= @project_name %> 4 | // 5 | // Created by <%= @developer.capitalize %> on <%= @created_on %> 6 | // Copyright(c) <%= Time.now.year %>, All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) { 12 | 13 | NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; 14 | int retVal = UIApplicationMain(argc, argv, nil, @"<%= @class_name %>AppDelegate"); 15 | [pool release]; 16 | return retVal; 17 | } 18 | -------------------------------------------------------------------------------- /lib/appjam/generators/project/utils/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiffelqiu/appjam/00252dac003b3dc5ede0b2613f82fda093c04096/lib/appjam/generators/project/utils/.gitignore -------------------------------------------------------------------------------- /lib/appjam/generators/project/utils/NSStringWhiteSpace.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSStringWhiteSpace.h 3 | // <%= @project_name %> 4 | // 5 | // Created by <%= @developer.capitalize %> on <%= @created_on %> 6 | // Copyright(c) <%= Time.now.year %>, All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSString (Whitespace) 12 | 13 | // Note: a category implementation does not have ivars in { } 14 | 15 | - (NSString *)stringByCompressingWhitespaceTo:(NSString *)seperator; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /lib/appjam/generators/project/utils/NSStringWhiteSpace.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSStringWhiteSpace.m 3 | // <%= @project_name %> 4 | // 5 | // Created by <%= @developer.capitalize %> on <%= @created_on %> 6 | // Copyright(c) <%= Time.now.year %>, All rights reserved. 7 | // 8 | 9 | #import "NSStringWhiteSpace.h" 10 | 11 | 12 | @implementation NSString (Whitespace) 13 | 14 | - (NSString *)stringByCompressingWhitespaceTo:(NSString *)seperator 15 | { 16 | NSArray *comps = [self componentsSeparatedByCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]; 17 | NSMutableArray *nonemptyComps = [[[NSMutableArray alloc] init] autorelease]; 18 | 19 | // only copy non-empty entries 20 | for (NSString *oneComp in comps) 21 | { 22 | if (![oneComp isEqualToString:@""]) 23 | { 24 | [nonemptyComps addObject:oneComp]; 25 | } 26 | 27 | } 28 | 29 | return [nonemptyComps componentsJoinedByString:seperator]; // already marked as autoreleased 30 | } 31 | @end -------------------------------------------------------------------------------- /lib/appjam/generators/project/utils/UIDevice.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIDevice.h 3 | // <%= @project_name %> 4 | // 5 | // Created by <%= @developer.capitalize %> on <%= @created_on %> 6 | // Copyright(c) <%= Time.now.year %>, All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface UIDevice (DeviceConnectivity) 13 | +(BOOL)cellularConnected; 14 | +(BOOL)wiFiConnected; 15 | +(BOOL)networkConnected; 16 | +(BOOL)connectedToNetwork; 17 | @end 18 | -------------------------------------------------------------------------------- /lib/appjam/generators/project/utils/URLEncodeString.h: -------------------------------------------------------------------------------- 1 | // 2 | // URLEncodeString.h 3 | // <%= @project_name %> 4 | // 5 | // Created by <%= @developer.capitalize %> on <%= @created_on %> 6 | // Copyright(c) <%= Time.now.year %>, All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface NSString (URLEncode) 13 | + (NSString *)URLEncodeString:(NSString *)string; 14 | - (NSString *)URLEncodeString; 15 | - (BOOL) isWhitespace; 16 | @end -------------------------------------------------------------------------------- /lib/appjam/generators/project/utils/URLEncodeString.m: -------------------------------------------------------------------------------- 1 | // 2 | // URLEncodeString.m 3 | // <%= @project_name %> 4 | // 5 | // Created by <%= @developer.capitalize %> on <%= @created_on %> 6 | // Copyright(c) <%= Time.now.year %>, All rights reserved. 7 | // 8 | 9 | #import "URLEncodeString.h" 10 | 11 | @implementation NSString (URLEncode) 12 | 13 | // URL encode a string 14 | + (NSString *)URLEncodeString:(NSString *)string { 15 | NSString *result = (NSString *)CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (CFStringRef)string, NULL, CFSTR("% '\"?=&+<>;:-"), kCFStringEncodingUTF8); 16 | 17 | return [result autorelease]; 18 | } 19 | 20 | // Helper function 21 | - (NSString *)URLEncodeString { 22 | return [NSString URLEncodeString:self]; 23 | } 24 | 25 | - (BOOL) isWhitespace{ 26 | return ([[self stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]length] == 0); 27 | } 28 | 29 | @end -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication.xcodeproj/project.xcworkspace/xcuserdata/eiffel.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiffelqiu/appjam/00252dac003b3dc5ede0b2613f82fda093c04096/lib/appjam/generators/templates/blank/EiffelApplication.xcodeproj/project.xcworkspace/xcuserdata/eiffel.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication.xcodeproj/xcuserdata/eiffel.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | EiffelApplication.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | C52561BC1705AD5200AC76A2 16 | 17 | primary 18 | 19 | 20 | C52561E11705AD5200AC76A2 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/AppDelegate.h.tt: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // <%= @project_name %> 4 | // 5 | // Created by <%= @developer.capitalize %> on <%= @created_on %> 6 | // Copyright(c) <%= Time.now.year %>, All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @property (readonly, strong, nonatomic) NSManagedObjectContext *managedObjectContext; 16 | @property (readonly, strong, nonatomic) NSManagedObjectModel *managedObjectModel; 17 | @property (readonly, strong, nonatomic) NSPersistentStoreCoordinator *persistentStoreCoordinator; 18 | 19 | - (void)saveContext; 20 | - (NSURL *)applicationDocumentsDirectory; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/EiffelApplication-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | com.company.ios.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/EiffelApplication.xcdatamodeld/.xccurrentversion: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | _XCCurrentVersionName 6 | EiffelApplication.xcdatamodel 7 | 8 | 9 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/EiffelApplication.xcdatamodeld/EiffelApplication.xcdatamodel/contents: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/AwesomeMenuItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // AwesomeMenuItem.h 3 | // AwesomeMenu 4 | // 5 | // Created by Levey on 11/30/11. 6 | // Copyright (c) 2011 Levey & Other Contributors. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol AwesomeMenuItemDelegate; 12 | 13 | @interface AwesomeMenuItem : UIImageView 14 | { 15 | UIImageView *_contentImageView; 16 | CGPoint _startPoint; 17 | CGPoint _endPoint; 18 | CGPoint _nearPoint; // near 19 | CGPoint _farPoint; // far 20 | 21 | id __weak _delegate; 22 | } 23 | 24 | @property (nonatomic, strong, readonly) UIImageView *contentImageView; 25 | 26 | @property (nonatomic) CGPoint startPoint; 27 | @property (nonatomic) CGPoint endPoint; 28 | @property (nonatomic) CGPoint nearPoint; 29 | @property (nonatomic) CGPoint farPoint; 30 | 31 | @property (nonatomic, weak) id delegate; 32 | 33 | - (id)initWithImage:(UIImage *)img 34 | highlightedImage:(UIImage *)himg 35 | ContentImage:(UIImage *)cimg 36 | highlightedContentImage:(UIImage *)hcimg; 37 | 38 | 39 | @end 40 | 41 | @protocol AwesomeMenuItemDelegate 42 | - (void)AwesomeMenuItemTouchesBegan:(AwesomeMenuItem *)item; 43 | - (void)AwesomeMenuItemTouchesEnd:(AwesomeMenuItem *)item; 44 | @end -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/bg-addbutton-highlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiffelqiu/appjam/00252dac003b3dc5ede0b2613f82fda093c04096/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/bg-addbutton-highlighted.png -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/bg-addbutton-highlighted@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiffelqiu/appjam/00252dac003b3dc5ede0b2613f82fda093c04096/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/bg-addbutton-highlighted@2x.png -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/bg-addbutton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiffelqiu/appjam/00252dac003b3dc5ede0b2613f82fda093c04096/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/bg-addbutton.png -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/bg-addbutton@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiffelqiu/appjam/00252dac003b3dc5ede0b2613f82fda093c04096/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/bg-addbutton@2x.png -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/bg-menuitem-highlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiffelqiu/appjam/00252dac003b3dc5ede0b2613f82fda093c04096/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/bg-menuitem-highlighted.png -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/bg-menuitem-highlighted@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiffelqiu/appjam/00252dac003b3dc5ede0b2613f82fda093c04096/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/bg-menuitem-highlighted@2x.png -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/bg-menuitem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiffelqiu/appjam/00252dac003b3dc5ede0b2613f82fda093c04096/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/bg-menuitem.png -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/bg-menuitem@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiffelqiu/appjam/00252dac003b3dc5ede0b2613f82fda093c04096/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/bg-menuitem@2x.png -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/icon-plus-highlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiffelqiu/appjam/00252dac003b3dc5ede0b2613f82fda093c04096/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/icon-plus-highlighted.png -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/icon-plus-highlighted@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiffelqiu/appjam/00252dac003b3dc5ede0b2613f82fda093c04096/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/icon-plus-highlighted@2x.png -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/icon-plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiffelqiu/appjam/00252dac003b3dc5ede0b2613f82fda093c04096/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/icon-plus.png -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/icon-plus@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiffelqiu/appjam/00252dac003b3dc5ede0b2613f82fda093c04096/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/icon-plus@2x.png -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/icon-star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiffelqiu/appjam/00252dac003b3dc5ede0b2613f82fda093c04096/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/icon-star.png -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/icon-star@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiffelqiu/appjam/00252dac003b3dc5ede0b2613f82fda093c04096/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/icon-star@2x.png -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/MyLauncher/MyLauncherPageControl.h: -------------------------------------------------------------------------------- 1 | // 2 | // MyLauncherPageControl.h 3 | // @rigoneri 4 | // 5 | // Copyright 2010 Rodrigo Neri 6 | // Copyright 2011 David Jarrett 7 | // 8 | // Licensed under the Apache License, Version 2.0 (the "License"); 9 | // you may not use this file except in compliance with the License. 10 | // You may obtain a copy of the License at 11 | // 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in writing, software 15 | // distributed under the License is distributed on an "AS IS" BASIS, 16 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | // See the License for the specific language governing permissions and 18 | // limitations under the License. 19 | // 20 | 21 | #import 22 | 23 | @interface MyLauncherPageControl : UIPageControl { 24 | NSInteger currentPage; 25 | NSInteger numberOfPages; 26 | NSInteger maxNumberOfPages; 27 | BOOL hidesForSinglePage; 28 | } 29 | 30 | @property (nonatomic) NSInteger currentPage; 31 | @property (nonatomic) NSInteger numberOfPages; 32 | @property (nonatomic) NSInteger maxNumberOfPages; 33 | @property (nonatomic) BOOL hidesForSinglePage; 34 | @property (nonatomic, strong) UIColor *inactivePageColor; 35 | @property (nonatomic, strong) UIColor *activePageColor; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/MyLauncher/MyLauncherScrollView.h: -------------------------------------------------------------------------------- 1 | // 2 | // MyLauncherScrollView.h 3 | // @rigoneri 4 | // 5 | // Copyright 2010 Rodrigo Neri 6 | // 7 | // Licensed under the Apache License, Version 2.0 (the "License"); 8 | // you may not use this file except in compliance with the License. 9 | // You may obtain a copy of the License at 10 | // 11 | // http://www.apache.org/licenses/LICENSE-2.0 12 | // 13 | // Unless required by applicable law or agreed to in writing, software 14 | // distributed under the License is distributed on an "AS IS" BASIS, 15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | // See the License for the specific language governing permissions and 17 | // limitations under the License. 18 | // 19 | 20 | #import 21 | 22 | @interface MyLauncherScrollView : UIScrollView 23 | @end -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/MyLauncher/MyLauncherScrollView.m: -------------------------------------------------------------------------------- 1 | // 2 | // MyLauncherScrollView.m 3 | // @rigoneri 4 | // 5 | // Copyright 2010 Rodrigo Neri 6 | // 7 | // Licensed under the Apache License, Version 2.0 (the "License"); 8 | // you may not use this file except in compliance with the License. 9 | // You may obtain a copy of the License at 10 | // 11 | // http://www.apache.org/licenses/LICENSE-2.0 12 | // 13 | // Unless required by applicable law or agreed to in writing, software 14 | // distributed under the License is distributed on an "AS IS" BASIS, 15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | // See the License for the specific language governing permissions and 17 | // limitations under the License. 18 | // 19 | 20 | #import "MyLauncherScrollView.h" 21 | 22 | @implementation MyLauncherScrollView 23 | 24 | - (void)touchesBegan:(NSSet*)touches withEvent:(UIEvent *)event 25 | { 26 | [super touchesBegan:touches withEvent:event]; 27 | [[self nextResponder] touchesBegan:touches withEvent:event]; 28 | } 29 | 30 | - (void)touchesMoved:(NSSet*)touches withEvent:(UIEvent *)event 31 | { 32 | [super touchesMoved:touches withEvent:event]; 33 | [[self nextResponder] touchesMoved:touches withEvent:event]; 34 | } 35 | 36 | - (void)touchesEnded:(NSSet*)touches withEvent:(UIEvent *)event 37 | { 38 | [super touchesEnded:touches withEvent:event]; 39 | [[self nextResponder] touchesEnded:touches withEvent:event]; 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/MyLauncher/MyLauncherViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // MyLauncherViewController.h 3 | // @rigoneri 4 | // 5 | // Copyright 2010 Rodrigo Neri 6 | // Copyright 2011 David Jarrett 7 | // 8 | // Licensed under the Apache License, Version 2.0 (the "License"); 9 | // you may not use this file except in compliance with the License. 10 | // You may obtain a copy of the License at 11 | // 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in writing, software 15 | // distributed under the License is distributed on an "AS IS" BASIS, 16 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | // See the License for the specific language governing permissions and 18 | // limitations under the License. 19 | // 20 | 21 | #import 22 | #import "MyLauncherView.h" 23 | #import "MyLauncherItem.h" 24 | 25 | @interface MyLauncherViewController : UIViewController { 26 | } 27 | 28 | @property (nonatomic, strong) UINavigationController *launcherNavigationController; 29 | @property (nonatomic, strong) MyLauncherView *launcherView; 30 | @property (nonatomic, strong) NSMutableDictionary *appControllers; 31 | 32 | -(BOOL)hasSavedLauncherItems; 33 | -(void)clearSavedLauncherItems; 34 | 35 | -(void)launcherViewItemSelected:(MyLauncherItem*)item; 36 | -(void)closeView; 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/FacingView.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012 Muh Hon Cheng 3 | * Created by honcheng on 6/2/12. 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining 6 | * a copy of this software and associated documentation files (the 7 | * "Software"), to deal in the Software without restriction, including 8 | * without limitation the rights to use, copy, modify, merge, publish, 9 | * distribute, sublicense, and/or sell copies of the Software, and to 10 | * permit persons to whom the Software is furnished to do so, subject 11 | * to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be 14 | * included in all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT 17 | * WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 18 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR 20 | * PURPOSE AND NONINFRINGEMENT. IN NO EVENT 21 | * SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 22 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR 25 | * IN CONNECTION WITH THE SOFTWARE OR 26 | * THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | * 28 | * @author Muh Hon Cheng 29 | * @copyright 2012 Muh Hon Cheng 30 | * @version 31 | * 32 | */ 33 | 34 | 35 | #import 36 | #import "ShadowView.h" 37 | #import "PaperFoldConstants.h" 38 | 39 | @interface FacingView : UIView 40 | @property (strong, nonatomic) ShadowView *shadowView; 41 | - (id)initWithFrame:(CGRect)frame foldDirection:(FoldDirection)foldDirection; 42 | @end 43 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/PaperFoldConstants.h: -------------------------------------------------------------------------------- 1 | // 2 | // PaperFoldConstants.h 3 | // PaperFold 4 | // 5 | // Created by honcheng on 25/8/12. 6 | // Copyright (c) 2012 honcheng@gmail.com. All rights reserved. 7 | // 8 | 9 | #ifndef PaperFold_PaperFoldConstants_h 10 | #define PaperFold_PaperFoldConstants_h 11 | 12 | #define FOLDVIEW_TAG 1000 13 | #define kLeftViewUnfoldThreshold 0.3 14 | #define kRightViewUnfoldThreshold 0.3 15 | #define kTopViewUnfoldThreshold 0.3 16 | #define kBottomViewUnfoldThreshold 0.3 17 | #define kEdgeScrollWidth 40.0 18 | 19 | typedef enum 20 | { 21 | FoldStateClosed = 0, 22 | FoldStateOpened = 1, 23 | FoldStateTransition = 2 24 | } FoldState; 25 | 26 | typedef enum 27 | { 28 | FoldDirectionHorizontalRightToLeft = 0, 29 | FoldDirectionHorizontalLeftToRight = 1, 30 | FoldDirectionVertical = 2, 31 | } FoldDirection; 32 | 33 | typedef enum 34 | { 35 | PaperFoldStateDefault = 0, 36 | PaperFoldStateLeftUnfolded = 1, 37 | PaperFoldStateRightUnfolded = 2, 38 | PaperFoldStateTopUnfolded = 3, 39 | PaperFoldStateBottomUnfolded = 4, 40 | PaperFoldStateTransition = 5 41 | } PaperFoldState; 42 | 43 | typedef enum 44 | { 45 | PaperFoldInitialPanDirectionHorizontal = 0, 46 | PaperFoldInitialPanDirectionVertical = 1, 47 | } PaperFoldInitialPanDirection; 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/PaperFoldNavigationController.h: -------------------------------------------------------------------------------- 1 | // 2 | // PaperFoldNavigationController.h 3 | // PaperFold-ContainmentView 4 | // 5 | // Created by honcheng on 10/8/12. 6 | // Copyright (c) 2012 honcheng. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "PaperFoldView.h" 11 | 12 | @interface PaperFoldNavigationController : UIViewController 13 | @property (nonatomic, strong) UIViewController *rootViewController, *leftViewController, *rightViewController; 14 | @property (nonatomic, strong) PaperFoldView *paperFoldView; 15 | - (id)initWithRootViewController:(UIViewController*)rootViewController; 16 | - (void)setLeftViewController:(UIViewController *)leftViewController width:(float)width; 17 | - (void)setRightViewController:(UIViewController*)rightViewController width:(float)width rightViewFoldCount:(int)rightViewFoldCount rightViewPullFactor:(float)rightViewPullFactor; 18 | @end 19 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/PaperFoldResources.bundle/swipe_guide_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiffelqiu/appjam/00252dac003b3dc5ede0b2613f82fda093c04096/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/PaperFoldResources.bundle/swipe_guide_left.png -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/PaperFoldResources.bundle/swipe_guide_left@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiffelqiu/appjam/00252dac003b3dc5ede0b2613f82fda093c04096/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/PaperFoldResources.bundle/swipe_guide_left@2x.png -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/PaperFoldResources.bundle/swipe_guide_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiffelqiu/appjam/00252dac003b3dc5ede0b2613f82fda093c04096/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/PaperFoldResources.bundle/swipe_guide_right.png -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/PaperFoldResources.bundle/swipe_guide_right@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiffelqiu/appjam/00252dac003b3dc5ede0b2613f82fda093c04096/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/PaperFoldResources.bundle/swipe_guide_right@2x.png -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/PaperFoldSwipeHintView.h: -------------------------------------------------------------------------------- 1 | // 2 | // PaperFoldSwipeHintView.h 3 | // SGBusArrivals 4 | // 5 | // Created by honcheng on 13/10/12. 6 | // 7 | // 8 | 9 | #import 10 | 11 | typedef enum 12 | { 13 | PaperFoldSwipeHintViewModeSwipeLeft = 0, 14 | PaperFoldSwipeHintViewModeSwipeRight = 1, 15 | } PaperFoldSwipeHintViewMode; 16 | 17 | @interface PaperFoldSwipeHintView : UIView 18 | @property (nonatomic, strong) UIImageView *imageView; 19 | @property (nonatomic, assign) PaperFoldSwipeHintViewMode mode; 20 | - (id)initWithPaperFoldSwipeHintViewMode:(PaperFoldSwipeHintViewMode)mode; 21 | - (void)showInView:(UIView*)view; 22 | + (void)hidePaperFoldHintViewInView:(UIView*)view; 23 | 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/Resources/swipe_guide.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiffelqiu/appjam/00252dac003b3dc5ede0b2613f82fda093c04096/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/Resources/swipe_guide.psd -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/Resources/swipe_guide2.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiffelqiu/appjam/00252dac003b3dc5ede0b2613f82fda093c04096/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/Resources/swipe_guide2.psd -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/ShadowView.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012 Muh Hon Cheng 3 | * Created by honcheng on 6/2/12. 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining 6 | * a copy of this software and associated documentation files (the 7 | * "Software"), to deal in the Software without restriction, including 8 | * without limitation the rights to use, copy, modify, merge, publish, 9 | * distribute, sublicense, and/or sell copies of the Software, and to 10 | * permit persons to whom the Software is furnished to do so, subject 11 | * to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be 14 | * included in all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT 17 | * WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 18 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR 20 | * PURPOSE AND NONINFRINGEMENT. IN NO EVENT 21 | * SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 22 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR 25 | * IN CONNECTION WITH THE SOFTWARE OR 26 | * THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | * 28 | * @author Muh Hon Cheng 29 | * @copyright 2012 Muh Hon Cheng 30 | * @version 31 | * 32 | */ 33 | 34 | 35 | #import 36 | #import 37 | #import "PaperFoldConstants.h" 38 | 39 | @interface ShadowView : UIView 40 | @property (nonatomic, strong) NSMutableArray *colorsArray; 41 | @property (nonatomic, strong) CAGradientLayer *gradient; 42 | 43 | - (id)initWithFrame:(CGRect)frame foldDirection:(FoldDirection)foldDirection; 44 | - (void)setColorArrays:(NSArray*)colors; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/TouchThroughUIView.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012 Muh Hon Cheng 3 | * Created by honcheng on 6/2/12. 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining 6 | * a copy of this software and associated documentation files (the 7 | * "Software"), to deal in the Software without restriction, including 8 | * without limitation the rights to use, copy, modify, merge, publish, 9 | * distribute, sublicense, and/or sell copies of the Software, and to 10 | * permit persons to whom the Software is furnished to do so, subject 11 | * to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be 14 | * included in all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT 17 | * WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 18 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR 20 | * PURPOSE AND NONINFRINGEMENT. IN NO EVENT 21 | * SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 22 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR 25 | * IN CONNECTION WITH THE SOFTWARE OR 26 | * THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | * 28 | * @author Muh Hon Cheng 29 | * @copyright 2012 Muh Hon Cheng 30 | * @version 31 | * 32 | */ 33 | 34 | 35 | #import 36 | 37 | @interface TouchThroughUIView : UIView 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/UIView+Screenshot.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012 Muh Hon Cheng 3 | * Created by honcheng on 6/2/12. 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining 6 | * a copy of this software and associated documentation files (the 7 | * "Software"), to deal in the Software without restriction, including 8 | * without limitation the rights to use, copy, modify, merge, publish, 9 | * distribute, sublicense, and/or sell copies of the Software, and to 10 | * permit persons to whom the Software is furnished to do so, subject 11 | * to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be 14 | * included in all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT 17 | * WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 18 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR 20 | * PURPOSE AND NONINFRINGEMENT. IN NO EVENT 21 | * SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 22 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR 25 | * IN CONNECTION WITH THE SOFTWARE OR 26 | * THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | * 28 | * @author Muh Hon Cheng 29 | * @copyright 2012 Muh Hon Cheng 30 | * @version 31 | * 32 | */ 33 | 34 | 35 | #import 36 | 37 | //typedef void (^CompletionBlock)(UIImage *image); 38 | 39 | @interface UIView (Screenshot) 40 | - (UIImage*)screenshot; 41 | - (UIImage*)screenshotWithOptimization:(BOOL)optimized; 42 | @end 43 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/NSBubbleData.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSBubbleData.h 3 | // 4 | // Created by Alex Barinov 5 | // Project home page: http://alexbarinov.github.com/UIBubbleTableView/ 6 | // 7 | // This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License. 8 | // To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ 9 | // 10 | 11 | #import 12 | 13 | typedef enum _NSBubbleType 14 | { 15 | BubbleTypeMine = 0, 16 | BubbleTypeSomeoneElse = 1 17 | } NSBubbleType; 18 | 19 | @interface NSBubbleData : NSObject 20 | 21 | @property (readonly, nonatomic, strong) NSDate *date; 22 | @property (readonly, nonatomic) NSBubbleType type; 23 | @property (readonly, nonatomic, strong) UIView *view; 24 | @property (readonly, nonatomic) UIEdgeInsets insets; 25 | @property (nonatomic, strong) UIImage *avatar; 26 | 27 | - (id)initWithText:(NSString *)text date:(NSDate *)date type:(NSBubbleType)type; 28 | + (id)dataWithText:(NSString *)text date:(NSDate *)date type:(NSBubbleType)type; 29 | - (id)initWithImage:(UIImage *)image date:(NSDate *)date type:(NSBubbleType)type; 30 | + (id)dataWithImage:(UIImage *)image date:(NSDate *)date type:(NSBubbleType)type; 31 | - (id)initWithView:(UIView *)view date:(NSDate *)date type:(NSBubbleType)type insets:(UIEdgeInsets)insets; 32 | + (id)dataWithView:(UIView *)view date:(NSDate *)date type:(NSBubbleType)type insets:(UIEdgeInsets)insets; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/UIBubbleHeaderTableViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIBubbleHeaderTableViewCell.h 3 | // UIBubbleTableViewExample 4 | // 5 | // Created by Александр Баринов on 10/7/12. 6 | // Copyright (c) 2012 Stex Group. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIBubbleHeaderTableViewCell : UITableViewCell 12 | 13 | + (CGFloat)height; 14 | 15 | @property (nonatomic, strong) NSDate *date; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/UIBubbleHeaderTableViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIBubbleHeaderTableViewCell.m 3 | // UIBubbleTableViewExample 4 | // 5 | // Created by Александр Баринов on 10/7/12. 6 | // Copyright (c) 2012 Stex Group. All rights reserved. 7 | // 8 | 9 | #import "UIBubbleHeaderTableViewCell.h" 10 | 11 | @interface UIBubbleHeaderTableViewCell () 12 | 13 | @property (nonatomic, retain) UILabel *label; 14 | 15 | @end 16 | 17 | @implementation UIBubbleHeaderTableViewCell 18 | 19 | @synthesize label = _label; 20 | @synthesize date = _date; 21 | 22 | + (CGFloat)height 23 | { 24 | return 28.0; 25 | } 26 | 27 | - (void)setDate:(NSDate *)value 28 | { 29 | NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; 30 | [dateFormatter setDateStyle:NSDateFormatterMediumStyle]; 31 | [dateFormatter setTimeStyle:NSDateFormatterShortStyle]; 32 | NSString *text = [dateFormatter stringFromDate:value]; 33 | #if !__has_feature(objc_arc) 34 | [dateFormatter release]; 35 | #endif 36 | 37 | if (self.label) 38 | { 39 | self.label.text = text; 40 | return; 41 | } 42 | 43 | self.selectionStyle = UITableViewCellSelectionStyleNone; 44 | self.label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.frame.size.width, [UIBubbleHeaderTableViewCell height])]; 45 | self.label.text = text; 46 | self.label.font = [UIFont boldSystemFontOfSize:12]; 47 | self.label.textAlignment = NSTextAlignmentCenter; 48 | self.label.shadowOffset = CGSizeMake(0, 1); 49 | self.label.shadowColor = [UIColor whiteColor]; 50 | self.label.textColor = [UIColor darkGrayColor]; 51 | self.label.backgroundColor = [UIColor clearColor]; 52 | [self addSubview:self.label]; 53 | } 54 | 55 | 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/UIBubbleTableView.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIBubbleTableView.h 3 | // 4 | // Created by Alex Barinov 5 | // Project home page: http://alexbarinov.github.com/UIBubbleTableView/ 6 | // 7 | // This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License. 8 | // To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ 9 | // 10 | 11 | #import 12 | 13 | #import "UIBubbleTableViewDataSource.h" 14 | #import "UIBubbleTableViewCell.h" 15 | 16 | typedef enum _NSBubbleTypingType 17 | { 18 | NSBubbleTypingTypeNobody = 0, 19 | NSBubbleTypingTypeMe = 1, 20 | NSBubbleTypingTypeSomebody = 2 21 | } NSBubbleTypingType; 22 | 23 | @interface UIBubbleTableView : UITableView 24 | 25 | @property (nonatomic, assign) IBOutlet id bubbleDataSource; 26 | @property (nonatomic) NSTimeInterval snapInterval; 27 | @property (nonatomic) NSBubbleTypingType typingBubble; 28 | @property (nonatomic) BOOL showAvatars; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/UIBubbleTableViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIBubbleTableViewCell.h 3 | // 4 | // Created by Alex Barinov 5 | // Project home page: http://alexbarinov.github.com/UIBubbleTableView/ 6 | // 7 | // This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License. 8 | // To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ 9 | // 10 | 11 | #import 12 | #import "NSBubbleData.h" 13 | 14 | @interface UIBubbleTableViewCell : UITableViewCell 15 | 16 | @property (nonatomic, strong) NSBubbleData *data; 17 | @property (nonatomic) BOOL showAvatar; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/UIBubbleTableViewDataSource.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIBubbleTableViewDataSource.h 3 | // 4 | // Created by Alex Barinov 5 | // Project home page: http://alexbarinov.github.com/UIBubbleTableView/ 6 | // 7 | // This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License. 8 | // To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ 9 | // 10 | 11 | #import 12 | 13 | @class NSBubbleData; 14 | @class UIBubbleTableView; 15 | @protocol UIBubbleTableViewDataSource 16 | 17 | @optional 18 | 19 | @required 20 | 21 | - (NSInteger)rowsForBubbleTable:(UIBubbleTableView *)tableView; 22 | - (NSBubbleData *)bubbleTableView:(UIBubbleTableView *)tableView dataForRow:(NSInteger)row; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/UIBubbleTypingTableViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIBubbleTypingTableCell.h 3 | // UIBubbleTableViewExample 4 | // 5 | // Created by Александр Баринов on 10/7/12. 6 | // Copyright (c) 2012 Stex Group. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "UIBubbleTableView.h" 11 | 12 | 13 | @interface UIBubbleTypingTableViewCell : UITableViewCell 14 | 15 | + (CGFloat)height; 16 | 17 | @property (nonatomic) NSBubbleTypingType type; 18 | @property (nonatomic) BOOL showAvatar; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/UIBubbleTypingTableViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIBubbleTypingTableCell.m 3 | // UIBubbleTableViewExample 4 | // 5 | // Created by Александр Баринов on 10/7/12. 6 | // Copyright (c) 2012 Stex Group. All rights reserved. 7 | // 8 | 9 | #import "UIBubbleTypingTableViewCell.h" 10 | 11 | @interface UIBubbleTypingTableViewCell () 12 | 13 | @property (nonatomic, retain) UIImageView *typingImageView; 14 | 15 | @end 16 | 17 | @implementation UIBubbleTypingTableViewCell 18 | 19 | @synthesize type = _type; 20 | @synthesize typingImageView = _typingImageView; 21 | @synthesize showAvatar = _showAvatar; 22 | 23 | + (CGFloat)height 24 | { 25 | return 40.0; 26 | } 27 | 28 | - (void)setType:(NSBubbleTypingType)value 29 | { 30 | if (!self.typingImageView) 31 | { 32 | self.typingImageView = [[UIImageView alloc] init]; 33 | [self addSubview:self.typingImageView]; 34 | } 35 | 36 | self.selectionStyle = UITableViewCellSelectionStyleNone; 37 | 38 | UIImage *bubbleImage = nil; 39 | CGFloat x = 0; 40 | 41 | if (value == NSBubbleTypingTypeMe) 42 | { 43 | bubbleImage = [UIImage imageNamed:@"typingMine.png"]; 44 | x = self.frame.size.width - bubbleImage.size.width; 45 | } 46 | else 47 | { 48 | bubbleImage = [UIImage imageNamed:@"typingSomeone.png"]; 49 | x = 0; 50 | } 51 | 52 | self.typingImageView.image = bubbleImage; 53 | self.typingImageView.frame = CGRectMake(x, 4, 73, 31); 54 | } 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/bubbleMine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiffelqiu/appjam/00252dac003b3dc5ede0b2613f82fda093c04096/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/bubbleMine.png -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/bubbleMine@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiffelqiu/appjam/00252dac003b3dc5ede0b2613f82fda093c04096/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/bubbleMine@2x.png -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/bubbleSomeone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiffelqiu/appjam/00252dac003b3dc5ede0b2613f82fda093c04096/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/bubbleSomeone.png -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/bubbleSomeone@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiffelqiu/appjam/00252dac003b3dc5ede0b2613f82fda093c04096/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/bubbleSomeone@2x.png -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/missingAvatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiffelqiu/appjam/00252dac003b3dc5ede0b2613f82fda093c04096/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/missingAvatar.png -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/missingAvatar@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiffelqiu/appjam/00252dac003b3dc5ede0b2613f82fda093c04096/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/missingAvatar@2x.png -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/typingMine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiffelqiu/appjam/00252dac003b3dc5ede0b2613f82fda093c04096/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/typingMine.png -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/typingMine@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiffelqiu/appjam/00252dac003b3dc5ede0b2613f82fda093c04096/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/typingMine@2x.png -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/typingSomeone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiffelqiu/appjam/00252dac003b3dc5ede0b2613f82fda093c04096/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/typingSomeone.png -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/typingSomeone@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiffelqiu/appjam/00252dac003b3dc5ede0b2613f82fda093c04096/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/typingSomeone@2x.png -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIGlossyButton/UIView+LayerEffects.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+ExtraAnimation.h 3 | // 4 | // Created by Water Lou on 15/09/2010. 5 | // Copyright 2010 First Water Tech Ltd. All rights reserved. 6 | // 7 | // many visual effects and animation effects create using CoreAnimation and CALayer 8 | // 9 | 10 | #import 11 | 12 | @interface UIView(LayerEffects) 13 | 14 | // set round corner 15 | - (void) setCornerRadius : (CGFloat) radius; 16 | // set inner border 17 | - (void) setBorder : (UIColor *) color width : (CGFloat) width; 18 | // set the shadow 19 | // Example: [view setShadow:[UIColor blackColor] opacity:0.5 offset:CGSizeMake(1.0, 1.0) blueRadius:3.0]; 20 | - (void) setShadow : (UIColor *)color opacity:(CGFloat)opacity offset:(CGSize) offset blurRadius:(CGFloat)blurRadius; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIGlossyButton/UIView+LayerEffects.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+LayerEffects.m 3 | // 4 | // Created by Water Lou on 15/09/2010. 5 | // Copyright 2010 First Water Tech Ltd. All rights reserved. 6 | // 7 | 8 | #import 9 | #import "UIView+LayerEffects.h" 10 | 11 | @implementation UIView(LayerEffects) 12 | 13 | /* simple setting using the layer */ 14 | - (void) setCornerRadius : (CGFloat) radius { 15 | self.layer.cornerRadius = radius; 16 | } 17 | 18 | - (void) setBorder : (UIColor *) color width : (CGFloat) width { 19 | self.layer.borderColor = [color CGColor]; 20 | self.layer.borderWidth = width; 21 | } 22 | 23 | - (void) setShadow : (UIColor *)color opacity:(CGFloat)opacity offset:(CGSize)offset blurRadius:(CGFloat)blurRadius { 24 | CALayer *l = self.layer; 25 | l.shadowColor = [color CGColor]; 26 | l.shadowOpacity = opacity; 27 | l.shadowOffset = offset; 28 | l.shadowRadius = blurRadius; 29 | } 30 | 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/InflectorKit/NSString+InflectorKit.h: -------------------------------------------------------------------------------- 1 | // NSString+InflectorKit.h 2 | // 3 | // Copyright (c) 2013 Mattt Thompson (http://mattt.me) 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. 22 | 23 | #import 24 | 25 | /** 26 | 27 | */ 28 | @interface NSString (InflectorKit) 29 | 30 | /** 31 | 32 | */ 33 | - (NSString *)singularizedString; 34 | 35 | /** 36 | 37 | */ 38 | - (NSString *)pluralizedString; 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/InflectorKit/NSString+InflectorKit.m: -------------------------------------------------------------------------------- 1 | // NSString+InflectorKit.m 2 | // 3 | // Copyright (c) 2013 Mattt Thompson (http://mattt.me) 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. 22 | 23 | #import "NSString+InflectorKit.h" 24 | #import "TTTStringInflector.h" 25 | 26 | @implementation NSString (InflectorKit) 27 | 28 | - (NSString *)singularizedString { 29 | return [[TTTStringInflector defaultInflector] singularize:self]; 30 | } 31 | 32 | - (NSString *)pluralizedString { 33 | return [[TTTStringInflector defaultInflector] pluralize:self]; 34 | } 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDWebImageCompat.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * (c) Jamie Pinkham 5 | * 6 | * For the full copyright and license information, please view the LICENSE 7 | * file that was distributed with this source code. 8 | */ 9 | 10 | #import 11 | 12 | #ifdef __OBJC_GC__ 13 | #error SDWebImage does not support Objective-C Garbage Collection 14 | #endif 15 | 16 | #if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_5_0 17 | #error SDWebImage doesn't support Deployement Target version < 5.0 18 | #endif 19 | 20 | #if !TARGET_OS_IPHONE 21 | #import 22 | #ifndef UIImage 23 | #define UIImage NSImage 24 | #endif 25 | #ifndef UIImageView 26 | #define UIImageView NSImageView 27 | #endif 28 | #else 29 | #import 30 | #endif 31 | 32 | #if OS_OBJECT_USE_OBJC 33 | #define SDDispatchQueueRelease(q) 34 | #define SDDispatchQueueSetterSementics strong 35 | #else 36 | #define SDDispatchQueueRelease(q) (dispatch_release(q)) 37 | #define SDDispatchQueueSetterSementics assign 38 | #endif 39 | 40 | extern inline UIImage *SDScaledImageForPath(NSString *path, NSObject *imageOrData); 41 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDWebImageCompat.m: -------------------------------------------------------------------------------- 1 | // 2 | // SDWebImageCompat.m 3 | // SDWebImage 4 | // 5 | // Created by Olivier Poitrey on 11/12/12. 6 | // Copyright (c) 2012 Dailymotion. All rights reserved. 7 | // 8 | 9 | #import "SDWebImageCompat.h" 10 | 11 | #if !__has_feature(objc_arc) 12 | #error SDWebImage is ARC only. Either turn on ARC for the project or use -fobjc-arc flag 13 | #endif 14 | 15 | inline UIImage *SDScaledImageForPath(NSString *path, NSObject *imageOrData) 16 | { 17 | if (!imageOrData) 18 | { 19 | return nil; 20 | } 21 | 22 | UIImage *image = nil; 23 | if ([imageOrData isKindOfClass:[NSData class]]) 24 | { 25 | image = [[UIImage alloc] initWithData:(NSData *)imageOrData]; 26 | } 27 | else if ([imageOrData isKindOfClass:[UIImage class]]) 28 | { 29 | image = (UIImage *)imageOrData; 30 | } 31 | else 32 | { 33 | return nil; 34 | } 35 | 36 | if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)]) 37 | { 38 | CGFloat scale = 1.0; 39 | if (path.length >= 8) 40 | { 41 | // Search @2x. at the end of the string, before a 3 to 4 extension length (only if key len is 8 or more @2x. + 4 len ext) 42 | NSRange range = [path rangeOfString:@"@2x." options:0 range:NSMakeRange(path.length - 8, 5)]; 43 | if (range.location != NSNotFound) 44 | { 45 | scale = 2.0; 46 | } 47 | } 48 | 49 | UIImage *scaledImage = [[UIImage alloc] initWithCGImage:image.CGImage scale:scale orientation:image.imageOrientation]; 50 | image = scaledImage; 51 | } 52 | 53 | return image; 54 | } 55 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDWebImageDecoder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * 5 | * Created by james on 9/28/11. 6 | * 7 | * For the full copyright and license information, please view the LICENSE 8 | * file that was distributed with this source code. 9 | */ 10 | 11 | #import 12 | #import "SDWebImageCompat.h" 13 | 14 | @interface UIImage (ForceDecode) 15 | 16 | + (UIImage *)decodedImageWithImage:(UIImage *)image; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDWebImageDownloaderOperation.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * 5 | * For the full copyright and license information, please view the LICENSE 6 | * file that was distributed with this source code. 7 | */ 8 | 9 | #import 10 | #import "SDWebImageDownloader.h" 11 | #import "SDWebImageOperation.h" 12 | 13 | @interface SDWebImageDownloaderOperation : NSOperation 14 | 15 | @property (strong, nonatomic, readonly) NSURLRequest *request; 16 | @property (assign, nonatomic, readonly) SDWebImageDownloaderOptions options; 17 | 18 | - (id)initWithRequest:(NSURLRequest *)request 19 | queue:(dispatch_queue_t)queue 20 | options:(SDWebImageDownloaderOptions)options 21 | progress:(SDWebImageDownloaderProgressBlock)progressBlock 22 | completed:(SDWebImageDownloaderCompletedBlock)completedBlock 23 | cancelled:(void (^)())cancelBlock; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDWebImageOperation.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * 5 | * For the full copyright and license information, please view the LICENSE 6 | * file that was distributed with this source code. 7 | */ 8 | 9 | #import 10 | 11 | @protocol SDWebImageOperation 12 | 13 | - (void)cancel; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/fmdb/FMDatabaseAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // FMDatabaseAdditions.h 3 | // fmkit 4 | // 5 | // Created by August Mueller on 10/30/05. 6 | // Copyright 2005 Flying Meat Inc.. All rights reserved. 7 | // 8 | 9 | #import 10 | @interface FMDatabase (FMDatabaseAdditions) 11 | 12 | 13 | - (int)intForQuery:(NSString*)objs, ...; 14 | - (long)longForQuery:(NSString*)objs, ...; 15 | - (BOOL)boolForQuery:(NSString*)objs, ...; 16 | - (double)doubleForQuery:(NSString*)objs, ...; 17 | - (NSString*)stringForQuery:(NSString*)objs, ...; 18 | - (NSData*)dataForQuery:(NSString*)objs, ...; 19 | - (NSDate*)dateForQuery:(NSString*)objs, ...; 20 | 21 | // Notice that there's no dataNoCopyForQuery:. 22 | // That would be a bad idea, because we close out the result set, and then what 23 | // happens to the data that we just didn't copy? Who knows, not I. 24 | 25 | 26 | - (BOOL)tableExists:(NSString*)tableName; 27 | - (FMResultSet*)getSchema; 28 | - (FMResultSet*)getTableSchema:(NSString*)tableName; 29 | 30 | - (BOOL)columnExists:(NSString*)columnName inTableWithName:(NSString*)tableName; 31 | 32 | - (BOOL)validateSQL:(NSString*)sql error:(NSError**)error; 33 | 34 | // deprecated - use columnExists:inTableWithName: instead. 35 | - (BOOL)columnExists:(NSString*)tableName columnName:(NSString*)columnName __attribute__ ((deprecated)); 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/fmdb/FMDatabaseQueue.h: -------------------------------------------------------------------------------- 1 | // 2 | // FMDatabaseQueue.h 3 | // fmdb 4 | // 5 | // Created by August Mueller on 6/22/11. 6 | // Copyright 2011 Flying Meat Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "sqlite3.h" 11 | 12 | @class FMDatabase; 13 | 14 | @interface FMDatabaseQueue : NSObject { 15 | NSString *_path; 16 | dispatch_queue_t _queue; 17 | FMDatabase *_db; 18 | } 19 | 20 | @property (atomic, retain) NSString *path; 21 | 22 | + (id)databaseQueueWithPath:(NSString*)aPath; 23 | - (id)initWithPath:(NSString*)aPath; 24 | - (void)close; 25 | 26 | - (void)inDatabase:(void (^)(FMDatabase *db))block; 27 | 28 | - (void)inTransaction:(void (^)(FMDatabase *db, BOOL *rollback))block; 29 | - (void)inDeferredTransaction:(void (^)(FMDatabase *db, BOOL *rollback))block; 30 | 31 | #if SQLITE_VERSION_NUMBER >= 3007000 32 | // NOTE: you can not nest these, since calling it will pull another database out of the pool and you'll get a deadlock. 33 | // If you need to nest, use FMDatabase's startSavePointWithName:error: instead. 34 | - (NSError*)inSavePoint:(void (^)(FMDatabase *db, BOOL *rollback))block; 35 | #endif 36 | 37 | @end 38 | 39 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CPAnimationSequence/CPAnimationProgram.h: -------------------------------------------------------------------------------- 1 | 2 | // Created by Karsten Litsche on 25.03.12. 3 | // Copyright (c) 2012 compeople AG. All rights reserved. 4 | 5 | #import 6 | #import "CPAnimationStep.h" 7 | 8 | /** 9 | A CPAnimationProgram defines a program of CPAnimationStep objects, which can 10 | be `-run` animatedly or non-animatedly. 11 | 12 | The delay property will be interpreted from start point of the program. 13 | 14 | CPAnimationProgram implements the Composite design pattern, with CPAnimationStep 15 | as the base class. 16 | */ 17 | @interface CPAnimationProgram : CPAnimationStep 18 | 19 | #pragma mark - constructors 20 | 21 | + (id) programWithSteps:(CPAnimationStep*)first, ... NS_REQUIRES_NIL_TERMINATION; 22 | 23 | #pragma mark - properties 24 | 25 | /** Animations steps */ 26 | @property (nonatomic, strong, readonly) NSArray* steps; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CPAnimationSequence/CPAnimationSequence.h: -------------------------------------------------------------------------------- 1 | 2 | // Created by Yang Meyer on 26.07.11. 3 | // Copyright 2011-2012 compeople AG. All rights reserved. 4 | 5 | #import 6 | #import "CPAnimationStep.h" 7 | 8 | /** 9 | A CPAnimationSequence defines a sequence of CPAnimationStep objects, which can 10 | be `-run` animatedly or non-animatedly. 11 | 12 | CPAnimationSequence implements the Composite design pattern, with CPAnimationStep 13 | as the base class. 14 | 15 | The delay property will be interpreted from end point of the previous step. 16 | */ 17 | @interface CPAnimationSequence : CPAnimationStep 18 | 19 | #pragma mark - constructors 20 | 21 | + (id) sequenceWithSteps:(CPAnimationStep*)first, ... NS_REQUIRES_NIL_TERMINATION; 22 | 23 | #pragma mark - properties 24 | 25 | /** Animations steps, from first to last. */ 26 | @property (nonatomic, strong, readonly) NSArray* steps; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CPAnimationSequence/CPAnimationStep.h: -------------------------------------------------------------------------------- 1 | 2 | // Created by Yang Meyer on 26.07.11. 3 | // Copyright 2011 compeople AG, 2013 Yang Meyer. All rights reserved. 4 | 5 | #import 6 | 7 | /** Generic block type */ 8 | typedef void (^CPAnimationStepBlock)(void); 9 | 10 | /** Backwards-compatibility */ 11 | typedef CPAnimationStepBlock AnimationStep __deprecated; 12 | 13 | /** 14 | A CPAnimationStep defines a single animation object with a delay, duration, execution block and animation options. 15 | */ 16 | @interface CPAnimationStep : NSObject 17 | 18 | #pragma mark - constructors 19 | 20 | + (id) after:(NSTimeInterval)delay 21 | animate:(CPAnimationStepBlock)step; 22 | 23 | + (id) for:(NSTimeInterval)duration 24 | animate:(CPAnimationStepBlock)step; 25 | 26 | + (id) after:(NSTimeInterval)delay 27 | for:(NSTimeInterval)duration 28 | animate:(CPAnimationStepBlock)step; 29 | 30 | + (id) after:(NSTimeInterval)delay 31 | for:(NSTimeInterval)duration 32 | options:(UIViewAnimationOptions)theOptions 33 | animate:(CPAnimationStepBlock)step; 34 | 35 | #pragma mark - properties (normally already set by the constructor) 36 | 37 | @property (nonatomic) NSTimeInterval delay; 38 | @property (nonatomic) NSTimeInterval duration; 39 | @property (nonatomic, copy) CPAnimationStepBlock step; 40 | @property (nonatomic) UIViewAnimationOptions options; 41 | 42 | #pragma mark - execution 43 | 44 | /** Starts the step execution. */ 45 | - (void) runAnimated:(BOOL)animated; 46 | /** Shortcut for [step runAnimated:YES] */ 47 | - (void) run; 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Categories/DDData.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface NSData (DDData) 4 | 5 | - (NSData *)md5Digest; 6 | 7 | - (NSData *)sha1Digest; 8 | 9 | - (NSString *)hexStringValue; 10 | 11 | - (NSString *)base64Encoded; 12 | - (NSData *)base64Decoded; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Categories/DDNumber.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | @interface NSNumber (DDNumber) 5 | 6 | + (BOOL)parseString:(NSString *)str intoSInt64:(SInt64 *)pNum; 7 | + (BOOL)parseString:(NSString *)str intoUInt64:(UInt64 *)pNum; 8 | 9 | + (BOOL)parseString:(NSString *)str intoNSInteger:(NSInteger *)pNum; 10 | + (BOOL)parseString:(NSString *)str intoNSUInteger:(NSUInteger *)pNum; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Categories/DDNumber.m: -------------------------------------------------------------------------------- 1 | #import "DDNumber.h" 2 | 3 | 4 | @implementation NSNumber (DDNumber) 5 | 6 | + (BOOL)parseString:(NSString *)str intoSInt64:(SInt64 *)pNum 7 | { 8 | if(str == nil) 9 | { 10 | *pNum = 0; 11 | return NO; 12 | } 13 | 14 | errno = 0; 15 | 16 | // On both 32-bit and 64-bit machines, long long = 64 bit 17 | 18 | *pNum = strtoll([str UTF8String], NULL, 10); 19 | 20 | if(errno != 0) 21 | return NO; 22 | else 23 | return YES; 24 | } 25 | 26 | + (BOOL)parseString:(NSString *)str intoUInt64:(UInt64 *)pNum 27 | { 28 | if(str == nil) 29 | { 30 | *pNum = 0; 31 | return NO; 32 | } 33 | 34 | errno = 0; 35 | 36 | // On both 32-bit and 64-bit machines, unsigned long long = 64 bit 37 | 38 | *pNum = strtoull([str UTF8String], NULL, 10); 39 | 40 | if(errno != 0) 41 | return NO; 42 | else 43 | return YES; 44 | } 45 | 46 | + (BOOL)parseString:(NSString *)str intoNSInteger:(NSInteger *)pNum 47 | { 48 | if(str == nil) 49 | { 50 | *pNum = 0; 51 | return NO; 52 | } 53 | 54 | errno = 0; 55 | 56 | // On LP64, NSInteger = long = 64 bit 57 | // Otherwise, NSInteger = int = long = 32 bit 58 | 59 | *pNum = strtol([str UTF8String], NULL, 10); 60 | 61 | if(errno != 0) 62 | return NO; 63 | else 64 | return YES; 65 | } 66 | 67 | + (BOOL)parseString:(NSString *)str intoNSUInteger:(NSUInteger *)pNum 68 | { 69 | if(str == nil) 70 | { 71 | *pNum = 0; 72 | return NO; 73 | } 74 | 75 | errno = 0; 76 | 77 | // On LP64, NSUInteger = unsigned long = 64 bit 78 | // Otherwise, NSUInteger = unsigned int = unsigned long = 32 bit 79 | 80 | *pNum = strtoul([str UTF8String], NULL, 10); 81 | 82 | if(errno != 0) 83 | return NO; 84 | else 85 | return YES; 86 | } 87 | 88 | @end 89 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/HTTPAuthenticationRequest.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #if TARGET_OS_IPHONE 4 | // Note: You may need to add the CFNetwork Framework to your project 5 | #import 6 | #endif 7 | 8 | @class HTTPMessage; 9 | 10 | 11 | @interface HTTPAuthenticationRequest : NSObject 12 | { 13 | BOOL isBasic; 14 | BOOL isDigest; 15 | 16 | NSString *base64Credentials; 17 | 18 | NSString *username; 19 | NSString *realm; 20 | NSString *nonce; 21 | NSString *uri; 22 | NSString *qop; 23 | NSString *nc; 24 | NSString *cnonce; 25 | NSString *response; 26 | } 27 | - (id)initWithRequest:(HTTPMessage *)request; 28 | 29 | - (BOOL)isBasic; 30 | - (BOOL)isDigest; 31 | 32 | // Basic 33 | - (NSString *)base64Credentials; 34 | 35 | // Digest 36 | - (NSString *)username; 37 | - (NSString *)realm; 38 | - (NSString *)nonce; 39 | - (NSString *)uri; 40 | - (NSString *)qop; 41 | - (NSString *)nc; 42 | - (NSString *)cnonce; 43 | - (NSString *)response; 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/HTTPMessage.h: -------------------------------------------------------------------------------- 1 | /** 2 | * The HTTPMessage class is a simple Objective-C wrapper around Apple's CFHTTPMessage class. 3 | **/ 4 | 5 | #import 6 | 7 | #if TARGET_OS_IPHONE 8 | // Note: You may need to add the CFNetwork Framework to your project 9 | #import 10 | #endif 11 | 12 | #define HTTPVersion1_0 ((NSString *)kCFHTTPVersion1_0) 13 | #define HTTPVersion1_1 ((NSString *)kCFHTTPVersion1_1) 14 | 15 | 16 | @interface HTTPMessage : NSObject 17 | { 18 | CFHTTPMessageRef message; 19 | } 20 | 21 | - (id)initEmptyRequest; 22 | 23 | - (id)initRequestWithMethod:(NSString *)method URL:(NSURL *)url version:(NSString *)version; 24 | 25 | - (id)initResponseWithStatusCode:(NSInteger)code description:(NSString *)description version:(NSString *)version; 26 | 27 | - (BOOL)appendData:(NSData *)data; 28 | 29 | - (BOOL)isHeaderComplete; 30 | 31 | - (NSString *)version; 32 | 33 | - (NSString *)method; 34 | - (NSURL *)url; 35 | 36 | - (NSInteger)statusCode; 37 | 38 | - (NSDictionary *)allHeaderFields; 39 | - (NSString *)headerField:(NSString *)headerField; 40 | 41 | - (void)setHeaderField:(NSString *)headerField value:(NSString *)headerFieldValue; 42 | 43 | - (NSData *)messageData; 44 | 45 | - (NSData *)body; 46 | - (void)setBody:(NSData *)body; 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Mime/MultipartMessageHeader.h: -------------------------------------------------------------------------------- 1 | // 2 | // MultipartMessagePart.h 3 | // HttpServer 4 | // 5 | // Created by Валерий Гаврилов on 29.03.12. 6 | // Copyright (c) 2012 LLC "Online Publishing Partners" (onlinepp.ru). All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | //----------------------------------------------------------------- 13 | // interface MultipartMessageHeader 14 | //----------------------------------------------------------------- 15 | enum { 16 | contentTransferEncoding_unknown, 17 | contentTransferEncoding_7bit, 18 | contentTransferEncoding_8bit, 19 | contentTransferEncoding_binary, 20 | contentTransferEncoding_base64, 21 | contentTransferEncoding_quotedPrintable, 22 | }; 23 | 24 | @interface MultipartMessageHeader : NSObject { 25 | NSMutableDictionary* fields; 26 | int encoding; 27 | NSString* contentDispositionName; 28 | } 29 | @property (strong,readonly) NSDictionary* fields; 30 | @property (readonly) int encoding; 31 | 32 | - (id) initWithData:(NSData*) data formEncoding:(NSStringEncoding) encoding; 33 | @end 34 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Mime/MultipartMessageHeaderField.h: -------------------------------------------------------------------------------- 1 | 2 | #import 3 | 4 | //----------------------------------------------------------------- 5 | // interface MultipartMessageHeaderField 6 | //----------------------------------------------------------------- 7 | 8 | @interface MultipartMessageHeaderField : NSObject { 9 | NSString* name; 10 | NSString* value; 11 | NSMutableDictionary* params; 12 | } 13 | 14 | @property (strong, readonly) NSString* value; 15 | @property (strong, readonly) NSDictionary* params; 16 | @property (strong, readonly) NSString* name; 17 | 18 | //- (id) initWithLine:(NSString*) line; 19 | //- (id) initWithName:(NSString*) paramName value:(NSString*) paramValue; 20 | 21 | - (id) initWithData:(NSData*) data contentEncoding:(NSStringEncoding) encoding; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Responses/HTTPDataResponse.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "HTTPResponse.h" 3 | 4 | 5 | @interface HTTPDataResponse : NSObject 6 | { 7 | NSUInteger offset; 8 | NSData *data; 9 | } 10 | 11 | - (id)initWithData:(NSData *)data; 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Responses/HTTPErrorResponse.h: -------------------------------------------------------------------------------- 1 | #import "HTTPResponse.h" 2 | 3 | @interface HTTPErrorResponse : NSObject { 4 | NSInteger _status; 5 | } 6 | 7 | - (id)initWithErrorCode:(int)httpErrorCode; 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Responses/HTTPErrorResponse.m: -------------------------------------------------------------------------------- 1 | #import "HTTPErrorResponse.h" 2 | 3 | @implementation HTTPErrorResponse 4 | 5 | -(id)initWithErrorCode:(int)httpErrorCode 6 | { 7 | if ((self = [super init])) 8 | { 9 | _status = httpErrorCode; 10 | } 11 | 12 | return self; 13 | } 14 | 15 | - (UInt64) contentLength { 16 | return 0; 17 | } 18 | 19 | - (UInt64) offset { 20 | return 0; 21 | } 22 | 23 | - (void)setOffset:(UInt64)offset { 24 | ; 25 | } 26 | 27 | - (NSData*) readDataOfLength:(NSUInteger)length { 28 | return nil; 29 | } 30 | 31 | - (BOOL) isDone { 32 | return YES; 33 | } 34 | 35 | - (NSInteger) status { 36 | return _status; 37 | } 38 | @end 39 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Responses/HTTPFileResponse.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "HTTPResponse.h" 3 | 4 | @class HTTPConnection; 5 | 6 | 7 | @interface HTTPFileResponse : NSObject 8 | { 9 | HTTPConnection *connection; 10 | 11 | NSString *filePath; 12 | UInt64 fileLength; 13 | UInt64 fileOffset; 14 | 15 | BOOL aborted; 16 | 17 | int fileFD; 18 | void *buffer; 19 | NSUInteger bufferSize; 20 | } 21 | 22 | - (id)initWithFilePath:(NSString *)filePath forConnection:(HTTPConnection *)connection; 23 | - (NSString *)filePath; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Responses/HTTPRedirectResponse.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "HTTPResponse.h" 3 | 4 | 5 | @interface HTTPRedirectResponse : NSObject 6 | { 7 | NSString *redirectPath; 8 | } 9 | 10 | - (id)initWithPath:(NSString *)redirectPath; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Responses/HTTPRedirectResponse.m: -------------------------------------------------------------------------------- 1 | #import "HTTPRedirectResponse.h" 2 | #import "HTTPLogging.h" 3 | 4 | #if ! __has_feature(objc_arc) 5 | #warning This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC). 6 | #endif 7 | 8 | // Log levels : off, error, warn, info, verbose 9 | // Other flags: trace 10 | static const int httpLogLevel = HTTP_LOG_LEVEL_OFF; // | HTTP_LOG_FLAG_TRACE; 11 | 12 | 13 | @implementation HTTPRedirectResponse 14 | 15 | - (id)initWithPath:(NSString *)path 16 | { 17 | if ((self = [super init])) 18 | { 19 | HTTPLogTrace(); 20 | 21 | redirectPath = [path copy]; 22 | } 23 | return self; 24 | } 25 | 26 | - (UInt64)contentLength 27 | { 28 | return 0; 29 | } 30 | 31 | - (UInt64)offset 32 | { 33 | return 0; 34 | } 35 | 36 | - (void)setOffset:(UInt64)offset 37 | { 38 | // Nothing to do 39 | } 40 | 41 | - (NSData *)readDataOfLength:(NSUInteger)length 42 | { 43 | HTTPLogTrace(); 44 | 45 | return nil; 46 | } 47 | 48 | - (BOOL)isDone 49 | { 50 | return YES; 51 | } 52 | 53 | - (NSDictionary *)httpHeaders 54 | { 55 | HTTPLogTrace(); 56 | 57 | return [NSDictionary dictionaryWithObject:redirectPath forKey:@"Location"]; 58 | } 59 | 60 | - (NSInteger)status 61 | { 62 | HTTPLogTrace(); 63 | 64 | return 302; 65 | } 66 | 67 | - (void)dealloc 68 | { 69 | HTTPLogTrace(); 70 | 71 | } 72 | 73 | @end 74 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Extensions/WebDAV/DAVConnection.h: -------------------------------------------------------------------------------- 1 | #import "HTTPConnection.h" 2 | 3 | @interface DAVConnection : HTTPConnection { 4 | id requestContentBody; 5 | NSOutputStream* requestContentStream; 6 | } 7 | @end 8 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Extensions/WebDAV/DAVResponse.h: -------------------------------------------------------------------------------- 1 | #import "HTTPResponse.h" 2 | 3 | @interface DAVResponse : NSObject { 4 | @private 5 | UInt64 _offset; 6 | NSMutableDictionary* _headers; 7 | NSData* _data; 8 | NSInteger _status; 9 | } 10 | - (id) initWithMethod:(NSString*)method headers:(NSDictionary*)headers bodyData:(NSData*)body resourcePath:(NSString*)resourcePath rootPath:(NSString*)rootPath; 11 | @end 12 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Extensions/WebDAV/DELETEResponse.h: -------------------------------------------------------------------------------- 1 | #import "HTTPResponse.h" 2 | 3 | @interface DELETEResponse : NSObject { 4 | NSInteger _status; 5 | } 6 | - (id) initWithFilePath:(NSString*)path; 7 | @end 8 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Extensions/WebDAV/DELETEResponse.m: -------------------------------------------------------------------------------- 1 | #import "DELETEResponse.h" 2 | #import "HTTPLogging.h" 3 | 4 | // HTTP methods: http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html 5 | // HTTP headers: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html 6 | // HTTP status codes: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html 7 | 8 | static const int httpLogLevel = HTTP_LOG_LEVEL_WARN; 9 | 10 | @implementation DELETEResponse 11 | 12 | - (id) initWithFilePath:(NSString*)path { 13 | if ((self = [super init])) { 14 | BOOL exists = [[NSFileManager defaultManager] fileExistsAtPath:path]; 15 | if ([[NSFileManager defaultManager] removeItemAtPath:path error:NULL]) { 16 | _status = exists ? 200 : 204; 17 | } else { 18 | HTTPLogError(@"Failed deleting \"%@\"", path); 19 | _status = 404; 20 | } 21 | } 22 | return self; 23 | } 24 | 25 | - (UInt64) contentLength { 26 | return 0; 27 | } 28 | 29 | - (UInt64) offset { 30 | return 0; 31 | } 32 | 33 | - (void)setOffset:(UInt64)offset { 34 | ; 35 | } 36 | 37 | - (NSData*) readDataOfLength:(NSUInteger)length { 38 | return nil; 39 | } 40 | 41 | - (BOOL) isDone { 42 | return YES; 43 | } 44 | 45 | - (NSInteger) status { 46 | return _status; 47 | } 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Extensions/WebDAV/PUTResponse.h: -------------------------------------------------------------------------------- 1 | #import "HTTPResponse.h" 2 | 3 | @interface PUTResponse : NSObject { 4 | NSInteger _status; 5 | } 6 | - (id) initWithFilePath:(NSString*)path headers:(NSDictionary*)headers bodyData:(NSData*)body; 7 | - (id) initWithFilePath:(NSString*)path headers:(NSDictionary*)headers bodyFile:(NSString*)body; 8 | @end 9 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/DCIntrospect/DCCrossHairView.h: -------------------------------------------------------------------------------- 1 | // 2 | // DCCrossHairView.h 3 | // 4 | // Created by Domestic Cat on 3/05/11. 5 | // 6 | 7 | 8 | @interface DCCrossHairView : UIView 9 | { 10 | } 11 | 12 | @property (nonatomic, retain) UIColor *color; 13 | 14 | - (id)initWithFrame:(CGRect)frame color:(UIColor *)aColor; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/DCIntrospect/DCCrossHairView.m: -------------------------------------------------------------------------------- 1 | // 2 | // DCCrossHairView.m 3 | // 4 | // Created by Domestic Cat on 3/05/11. 5 | // 6 | 7 | #import "DCCrossHairView.h" 8 | 9 | @implementation DCCrossHairView 10 | @synthesize color; 11 | 12 | - (void)dealloc 13 | { 14 | [color release]; 15 | [super dealloc]; 16 | } 17 | 18 | - (id)initWithFrame:(CGRect)frame color:(UIColor *)aColor 19 | { 20 | if ((self = [super initWithFrame:frame])) 21 | { 22 | self.color = aColor; 23 | self.backgroundColor = [UIColor clearColor]; 24 | self.opaque = NO; 25 | } 26 | 27 | return self; 28 | } 29 | 30 | - (void)drawRect:(CGRect)rect 31 | { 32 | CGContextRef context = UIGraphicsGetCurrentContext(); 33 | [self.color set]; 34 | CGContextMoveToPoint(context, floorf(self.bounds.size.width / 2.0f) + 0.5f, 0.0f); 35 | CGContextAddLineToPoint(context, floorf(self.bounds.size.width / 2.0f) + 0.5f, self.bounds.size.height); 36 | CGContextStrokePath(context); 37 | 38 | CGContextMoveToPoint(context, 0, floorf(self.bounds.size.height / 2.0f) + 0.5f); 39 | CGContextAddLineToPoint(context, self.bounds.size.width, floorf(self.bounds.size.height / 2.0f) + 0.5f); 40 | CGContextStrokePath(context); 41 | } 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/DCIntrospect/DCFrameView.h: -------------------------------------------------------------------------------- 1 | // 2 | // DCFrameView.h 3 | // 4 | // Created by Domestic Cat on 29/04/11. 5 | // 6 | 7 | #import 8 | #import "DCCrossHairView.h" 9 | 10 | @protocol DCFrameViewDelegate 11 | 12 | @required 13 | 14 | - (void)touchAtPoint:(CGPoint)point; 15 | 16 | @end 17 | 18 | @interface DCFrameView : UIView 19 | { 20 | 21 | } 22 | 23 | @property (nonatomic, assign) id delegate; 24 | @property (nonatomic) CGRect mainRect; 25 | @property (nonatomic) CGRect superRect; 26 | @property (nonatomic, retain) UILabel *touchPointLabel; 27 | @property (nonatomic, retain) NSMutableArray *rectsToOutline; 28 | @property (nonatomic, retain) DCCrossHairView *touchPointView; 29 | 30 | /////////// 31 | // Setup // 32 | /////////// 33 | 34 | - (id)initWithFrame:(CGRect)frame delegate:(id)aDelegate; 35 | 36 | //////////////////// 37 | // Custom Setters // 38 | //////////////////// 39 | 40 | - (void)setMainRect:(CGRect)newMainRect; 41 | - (void)setSuperRect:(CGRect)newSuperRect; 42 | 43 | ///////////////////// 44 | // Drawing/Display // 45 | ///////////////////// 46 | 47 | - (void)drawRect:(CGRect)rect; 48 | 49 | //////////////////// 50 | // Touch Handling // 51 | //////////////////// 52 | 53 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event; 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/DCIntrospect/DCStatusBarOverlay.h: -------------------------------------------------------------------------------- 1 | // 2 | // DCStatusBarOverlay.h 3 | // 4 | // Copyright 2011 Domestic Cat. All rights reserved. 5 | // 6 | 7 | // Based mainly on @myellow's excellent MTStatusBarOverlay: https://github.com/myell0w/MTStatusBarOverlay 8 | 9 | 10 | #import "DCIntrospectSettings.h" 11 | 12 | #define kDCIntrospectNotificationStatusBarTapped @"kDCIntrospectNotificationStatusBarTapped" 13 | 14 | @interface DCStatusBarOverlay : UIWindow 15 | { 16 | } 17 | 18 | @property (nonatomic, retain) UILabel *leftLabel; 19 | @property (nonatomic, retain) UILabel *rightLabel; 20 | 21 | /////////// 22 | // Setup // 23 | /////////// 24 | 25 | - (id)init; 26 | - (void)updateBarFrame; 27 | 28 | ///////////// 29 | // Actions // 30 | ///////////// 31 | 32 | - (void)tapped; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/Lumberjack/DDASLLogger.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | #import "DDLog.h" 5 | 6 | /** 7 | * Welcome to Cocoa Lumberjack! 8 | * 9 | * The project page has a wealth of documentation if you have any questions. 10 | * https://github.com/robbiehanson/CocoaLumberjack 11 | * 12 | * If you're new to the project you may wish to read the "Getting Started" wiki. 13 | * https://github.com/robbiehanson/CocoaLumberjack/wiki/GettingStarted 14 | * 15 | * 16 | * This class provides a logger for the Apple System Log facility. 17 | * 18 | * As described in the "Getting Started" page, 19 | * the traditional NSLog() function directs it's output to two places: 20 | * 21 | * - Apple System Log 22 | * - StdErr (if stderr is a TTY) so log statements show up in Xcode console 23 | * 24 | * To duplicate NSLog() functionality you can simply add this logger and a tty logger. 25 | * However, if you instead choose to use file logging (for faster performance), 26 | * you may choose to use a file logger and a tty logger. 27 | **/ 28 | 29 | @interface DDASLLogger : DDAbstractLogger 30 | { 31 | aslclient client; 32 | } 33 | 34 | + (DDASLLogger *)sharedInstance; 35 | 36 | // Inherited from DDAbstractLogger 37 | 38 | // - (id )logFormatter; 39 | // - (void)setLogFormatter:(id )formatter; 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/Objective-C-HMTL-Parser/HTMLParser.h: -------------------------------------------------------------------------------- 1 | // 2 | // HTMLParser.h 3 | // StackOverflow 4 | // 5 | // Created by Ben Reeves on 09/03/2010. 6 | // Copyright 2010 Ben Reeves. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import "HTMLNode.h" 12 | 13 | @class HTMLNode; 14 | 15 | @interface HTMLParser : NSObject 16 | { 17 | @public 18 | htmlDocPtr _doc; 19 | } 20 | 21 | -(id)initWithContentsOfURL:(NSURL*)url error:(NSError**)error; 22 | -(id)initWithData:(NSData*)data error:(NSError**)error; 23 | -(id)initWithString:(NSString*)string error:(NSError**)error; 24 | 25 | //Returns the doc tag 26 | -(HTMLNode*)doc; 27 | 28 | //Returns the body tag 29 | -(HTMLNode*)body; 30 | 31 | //Returns the html tag 32 | -(HTMLNode*)html; 33 | 34 | //Returns the head tag 35 | - (HTMLNode*)head; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/ObjectiveMixin/Mixin.h: -------------------------------------------------------------------------------- 1 | // 2 | // Mixin.h 3 | // ObjectiveMixin 4 | // 5 | // Created by Vladimir Mitrovic on 24/02/2011. 6 | // Copyright 2011 Vladimir Mitrovic. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface Mixin : NSObject 13 | 14 | + (void) from:(Class)sourceClass into:(Class)destinationClass; 15 | + (void) from:(Class)sourceClass into:(Class)destinationClass followInheritance:(BOOL)followInheritance force:(BOOL)force; 16 | 17 | @end 18 | 19 | 20 | // A category on NSObject, for convenience. It uses the Mixin class internally. 21 | @interface NSObject (Mixin) 22 | 23 | + (void) mixinFrom:(Class)sourceClass; 24 | + (void) mixinFrom:(Class)sourceClass followInheritance:(BOOL)followInheritance force:(BOOL)force; 25 | 26 | - (void) mixinFrom:(Class)sourceClass; 27 | - (void) mixinFrom:(Class)sourceClass followInheritance:(BOOL)followInheritance force:(BOOL)force; 28 | 29 | 30 | + (id) allocWithSuperclass:(Class)superClass; 31 | + (Class) classWithSuperclass:(Class)superClass; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/ObjectiveSugar/NSArray+ObjectiveSugar.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+ObjectiveSugar.h 3 | // WidgetPush 4 | // 5 | // Created by Marin Usalj on 5/7/12. 6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | 10 | 11 | @interface NSArray (ObjectiveSugar) 12 | 13 | @property(readonly) id first; 14 | @property(readonly) id last; 15 | 16 | - (void)each:(void (^)(id object))block; 17 | - (void)eachWithIndex:(void (^)(id object, int index))block; 18 | - (BOOL)includes:(id)object; 19 | 20 | - (NSArray *)take:(NSUInteger)numberOfElements; 21 | - (NSArray *)takeWhile:(BOOL (^)(id object))block; 22 | 23 | - (NSArray *)map:(id (^)(id object))block; 24 | - (NSArray *)select:(BOOL (^)(id object))block; 25 | - (NSArray *)reject:(BOOL (^)(id object))block; 26 | - (NSArray *)flatten; 27 | - (NSString *)join; 28 | - (NSString *)join:(NSString *)separator; 29 | 30 | // Alias for Ruby's & operator 31 | - (NSArray *)intersectionWithArray:(NSArray *)array; 32 | // Alias for Ruby's | operator 33 | - (NSArray *)unionWithArray:(NSArray *)array; 34 | // Alias for Ruby's - operator 35 | - (NSArray *)relativeComplement:(NSArray *)array; 36 | // Alias for Ruby's ^ operator. Equivalent of a - b | b - a 37 | - (NSArray *)symmetricDifference:(NSArray *)array; 38 | 39 | @end -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/ObjectiveSugar/NSDictionary+ObjectiveSugar.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+ObjectiveSugar.h 3 | // SampleProject 4 | // 5 | // Created by Marin Usalj on 11/23/12. 6 | // Copyright (c) 2012 @mneorr | mneorr.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSDictionary (ObjectiveSugar) 12 | 13 | - (void)each:(void (^)(id key, id value))block; 14 | - (void)eachKey:(void (^)(id key))block; 15 | - (void)eachValue:(void (^)(id value))block; 16 | - (NSArray *)map:(id (^)(id key, id value))block; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/ObjectiveSugar/NSDictionary+ObjectiveSugar.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+ObjectiveSugar.m 3 | // SampleProject 4 | // 5 | // Created by Marin Usalj on 11/23/12. 6 | // Copyright (c) 2012 @mneorr | mneorr.com. All rights reserved. 7 | // 8 | 9 | #import "NSDictionary+ObjectiveSugar.h" 10 | 11 | @implementation NSDictionary (Rubyfy) 12 | 13 | - (void)each:(void (^)(id k, id v))block { 14 | [self enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) { 15 | block(key, obj); 16 | }]; 17 | } 18 | 19 | - (void)eachKey:(void (^)(id k))block { 20 | [self enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) { 21 | block(key); 22 | }]; 23 | } 24 | 25 | - (void)eachValue:(void (^)(id v))block { 26 | [self enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) { 27 | block(obj); 28 | }]; 29 | } 30 | 31 | - (NSArray *)map:(id (^)(id key, id value))block { 32 | NSMutableArray *array = [NSMutableArray array]; 33 | 34 | [self enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) { 35 | id object = block(key, obj); 36 | [array addObject:object]; 37 | }]; 38 | 39 | return array; 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/ObjectiveSugar/NSMutableArray+ObjectiveSugar.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSMutableArray+ObjectiveSugar.h 3 | // SampleProject 4 | // 5 | // Created by Marin Usalj on 11/23/12. 6 | // Copyright (c) 2012 @mneorr | mneorr.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSMutableArray (ObjectiveSugar) 12 | 13 | - (void)push:(id)object; 14 | - (id)pop; 15 | - (NSArray *)pop:(NSUInteger)numberOfElements; 16 | - (void)concat:(NSArray *)array; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/ObjectiveSugar/NSMutableArray+ObjectiveSugar.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSMutableArray+ObjectiveSugar.m 3 | // SampleProject 4 | // 5 | // Created by Marin Usalj on 11/23/12. 6 | // Copyright (c) 2012 @mneorr | mneorr.com. All rights reserved. 7 | // 8 | 9 | #import "NSMutableArray+ObjectiveSugar.h" 10 | 11 | @implementation NSMutableArray (ObjectiveSugar) 12 | 13 | - (void)push:(id)object { 14 | [self addObject:object]; 15 | } 16 | 17 | - (id)pop { 18 | id object = [self lastObject]; 19 | [self removeLastObject]; 20 | 21 | return object; 22 | } 23 | 24 | - (NSArray *)pop:(NSUInteger)numberOfElements { 25 | NSMutableArray *array = [NSMutableArray arrayWithCapacity:numberOfElements]; 26 | 27 | for (int i = 0; i < numberOfElements; i++) 28 | [array insertObject:[self pop] atIndex:0]; 29 | 30 | return array; 31 | } 32 | 33 | - (void)concat:(NSArray *)array { 34 | [self addObjectsFromArray:array]; 35 | } 36 | 37 | @end -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/ObjectiveSugar/NSNumber+ObjectiveSugar.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSNumber+Rubyfy.h 3 | // Domainchy 4 | // 5 | // Created by Marin Usalj on 11/15/12. 6 | // Copyright (c) 2012 mneorr.com | @mneorr | mneorr@gmail.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSNumber (ObjectiveSugar) 12 | 13 | - (void)times:(void(^)(void))block; 14 | - (void)timesWithIndex:(void(^)(int index))block; 15 | 16 | - (void)upto:(int)number do:(void(^)(int number))block; 17 | - (void)downto:(int)number do:(void(^)(int number))block; 18 | 19 | // Numeric inflections 20 | - (NSNumber *)seconds; 21 | - (NSNumber *)minutes; 22 | - (NSNumber *)hours; 23 | - (NSNumber *)days; 24 | - (NSNumber *)weeks; 25 | - (NSNumber *)fortnights; 26 | - (NSNumber *)months; 27 | - (NSNumber *)years; 28 | 29 | // There are singular aliases for the above methods 30 | - (NSNumber *)second; 31 | - (NSNumber *)minute; 32 | - (NSNumber *)hour; 33 | - (NSNumber *)day; 34 | - (NSNumber *)week; 35 | - (NSNumber *)fortnight; 36 | - (NSNumber *)month; 37 | - (NSNumber *)year; 38 | 39 | - (NSDate *)ago; 40 | - (NSDate *)ago:(NSDate *)time; 41 | - (NSDate *)since:(NSDate *)time; 42 | - (NSDate *)until:(NSDate *)time; 43 | - (NSDate *)fromNow; 44 | 45 | @end -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/ObjectiveSugar/NSSet+ObjectiveSugar.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSSet+Accessors.h 3 | // SampleProject 4 | // 5 | // Created by Marin Usalj on 11/23/12. 6 | // Copyright (c) 2012 @mneorr | mneorr.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSSet (Accessors) 12 | 13 | @property(readonly) id first; 14 | @property(readonly) id last; 15 | 16 | - (void)each:(void (^)(id object))block; 17 | - (void)eachWithIndex:(void (^)(id object, int index))block; 18 | 19 | - (NSArray *)map:(id (^)(id object))block; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/ObjectiveSugar/NSSet+ObjectiveSugar.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSSet+ObjectiveSugar.m 3 | // SampleProject 4 | // 5 | // Created by Marin Usalj on 11/23/12. 6 | // Copyright (c) 2012 @mneorr | mneorr.com. All rights reserved. 7 | // 8 | 9 | #import "NSSet+ObjectiveSugar.h" 10 | 11 | @implementation NSSet (ObjectiveSugar) 12 | 13 | - (id)first { 14 | NSArray *allObjects = self.allObjects; 15 | 16 | if (allObjects.count > 0) 17 | return allObjects[0]; 18 | return nil; 19 | } 20 | 21 | - (id)last { 22 | return self.allObjects.lastObject; 23 | } 24 | 25 | - (void)each:(void (^)(id))block { 26 | [self enumerateObjectsUsingBlock:^(id obj, BOOL *stop) { 27 | block(obj); 28 | }]; 29 | } 30 | 31 | - (void)eachWithIndex:(void (^)(id, int))block { 32 | __block int counter = 0; 33 | [self enumerateObjectsUsingBlock:^(id obj, BOOL *stop) { 34 | block(obj, counter); 35 | counter ++; 36 | }]; 37 | } 38 | 39 | - (NSArray *)map:(id (^)(id object))block { 40 | NSMutableArray *array = [NSMutableArray arrayWithCapacity:self.count]; 41 | 42 | for (id object in self) { 43 | id newObject = block(object); 44 | [array addObject:newObject]; 45 | } 46 | 47 | return array; 48 | } 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/ObjectiveSugar/NSString+ObjectiveSugar.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+ObjectiveSugar.h 3 | // SampleProject 4 | // 5 | // Created by Neil on 05/12/2012. 6 | // Copyright (c) 2012 @mneorr | mneorr.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NSString *NSStringWithFormat(NSString *format, ...) NS_FORMAT_FUNCTION(1,2); 12 | 13 | @interface NSString(ObjectiveSugar) 14 | - (NSArray *)split; 15 | - (NSArray *)split:(NSString *)delimiter; 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/ObjectiveSugar/NSString+ObjectiveSugar.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+ObjectiveSugar.m 3 | // SampleProject 4 | // 5 | // Created by Neil on 05/12/2012. 6 | // Copyright (c) 2012 @mneorr | mneorr.com. All rights reserved. 7 | // 8 | 9 | #import "NSString+ObjectiveSugar.h" 10 | #import "NSArray+ObjectiveSugar.h" 11 | 12 | NSString *NSStringWithFormat(NSString *formatString, ...) { 13 | va_list args; 14 | va_start(args, formatString); 15 | 16 | NSString *string = [[NSString alloc] initWithFormat:formatString arguments:args]; 17 | 18 | va_end(args); 19 | 20 | #if defined(__has_feature) && __has_feature(objc_arc) 21 | return string; 22 | #else 23 | return [string autorelease]; 24 | #endif 25 | } 26 | 27 | 28 | @implementation NSString(Additions) 29 | 30 | - (NSArray *)split { 31 | return [self split:@" "]; 32 | } 33 | 34 | - (NSArray *)split:(NSString *)delimiter { 35 | NSArray *result = [self componentsSeparatedByCharactersInSet: 36 | [NSCharacterSet characterSetWithCharactersInString:delimiter]]; 37 | 38 | return [result select:^BOOL(NSString *string) { 39 | return string.length > 0; 40 | }]; 41 | } 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/ObjectiveSugar/ObjectiveSugar.h: -------------------------------------------------------------------------------- 1 | // C SUGAR 2 | #define unless(condition) if(!(condition)) 3 | 4 | // OBJC SUGAR 5 | #import "NSNumber+ObjectiveSugar.h" 6 | #import "NSArray+ObjectiveSugar.h" 7 | #import "NSMutableArray+ObjectiveSugar.h" 8 | #import "NSDictionary+ObjectiveSugar.h" 9 | #import "NSSet+ObjectiveSugar.h" 10 | #import "NSString+ObjectiveSugar.h" -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/Helpers/NSString+Versioning.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString-Versioning.h 3 | // SubjectiveScript.m 4 | // 5 | // Created by Kevin Malakoff on 7/22/12. 6 | // Copyright (c) 2012 Kevin Malakoff. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person 9 | // obtaining a copy of this software and associated documentation 10 | // files (the "Software"), to deal in the Software without 11 | // restriction, including without limitation the rights to use, 12 | // copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the 14 | // Software is furnished to do so, subject to the following 15 | // conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 22 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 24 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 25 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 26 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 27 | // OTHER DEALINGS IN THE SOFTWARE. 28 | // 29 | 30 | #import "SSTypes.h" 31 | 32 | @interface NSString (Versioning) 33 | 34 | // version should be in the form @"3.1.1" or @"4.0" 35 | - (B(^)(NSS* version))VersionEqualTo; 36 | - (B(^)(NSS* version))VersionGreaterThan; 37 | - (B(^)(NSS* version))VersionGreaterThanOrEqualTo; 38 | - (B(^)(NSS* version))VersionLessThan; 39 | - (B(^)(NSS* version))VersionLessThanOrEqualTo; 40 | 41 | @end -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/Helpers/SS+Functions.h: -------------------------------------------------------------------------------- 1 | // 2 | // SS+Functions.h 3 | // SubjectiveScript.m 4 | // 5 | // Created by Kevin Malakoff on 7/29/12. 6 | // Copyright (c) 2012 Kevin Malakoff. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person 9 | // obtaining a copy of this software and associated documentation 10 | // files (the "Software"), to deal in the Software without 11 | // restriction, including without limitation the rights to use, 12 | // copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the 14 | // Software is furnished to do so, subject to the following 15 | // conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 22 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 24 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 25 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 26 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 27 | // OTHER DEALINGS IN THE SOFTWARE. 28 | // 29 | 30 | #import "SS.h" 31 | 32 | @interface SS (Functions) 33 | 34 | + (A*(^)(NSO* obj))functionNames; 35 | + (id(^)(id target, NSS* functionName))resolveFunction; 36 | + (id(^)(id block, NSA* arguments))callFunction; 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/Helpers/SS+System.h: -------------------------------------------------------------------------------- 1 | // 2 | // SS-System.h 3 | // SubjectiveScript.m 4 | // 5 | // Created by Kevin Malakoff on 7/22/12. 6 | // Copyright (c) 2012 Kevin Malakoff. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person 9 | // obtaining a copy of this software and associated documentation 10 | // files (the "Software"), to deal in the Software without 11 | // restriction, including without limitation the rights to use, 12 | // copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the 14 | // Software is furnished to do so, subject to the following 15 | // conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 22 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 24 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 25 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 26 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 27 | // OTHER DEALINGS IN THE SOFTWARE. 28 | // 29 | 30 | #import "SS.h" 31 | 32 | @interface SS (System) 33 | 34 | + (NSS*)systemVersion; 35 | + (B)macSystem; 36 | + (B)iOSSystem; 37 | 38 | + (SSTaskId*(^)(SSTaskIdBlock block, I waitNS, BOOL background))addTask; 39 | + (void(^)(SSTaskId* taskId))stopTask; 40 | 41 | @end -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/JavaScript/NSArray+JavaScript.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+JavaScript.h 3 | // SubjectiveScript.m 4 | // 5 | // Created by Kevin Malakoff on 7/29/12. 6 | // Copyright (c) 2012 Kevin Malakoff. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person 9 | // obtaining a copy of this software and associated documentation 10 | // files (the "Software"), to deal in the Software without 11 | // restriction, including without limitation the rights to use, 12 | // copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the 14 | // Software is furnished to do so, subject to the following 15 | // conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 22 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 24 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 25 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 26 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 27 | // OTHER DEALINGS IN THE SOFTWARE. 28 | // 29 | 30 | #import "SSTypes.h" 31 | 32 | @interface NSArray (JavaScript) 33 | 34 | - (NSS*(^)())toString; 35 | - (UI)length; 36 | - (B(^)(id key))hasOwnProperty; 37 | 38 | // accessor Array functions 39 | - (A*(^)(NSA* other))concat; 40 | - (S*(^)(NSS* separator))join; 41 | - (NSA*(^)(I start, I count))slice; // TODO: test with negative parameters 42 | 43 | - (A*(^)())reverse; 44 | - (A*(^)(B shallow))flatten; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/JavaScript/NSDate+JavaScript.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDate+JavaScript.h 3 | // SubjectiveScript.m 4 | // 5 | // Created by Kevin Malakoff on 7/29/12. 6 | // Copyright (c) 2012 Kevin Malakoff. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person 9 | // obtaining a copy of this software and associated documentation 10 | // files (the "Software"), to deal in the Software without 11 | // restriction, including without limitation the rights to use, 12 | // copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the 14 | // Software is furnished to do so, subject to the following 15 | // conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 22 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 24 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 25 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 26 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 27 | // OTHER DEALINGS IN THE SOFTWARE. 28 | // 29 | 30 | #import "SSTypes.h" 31 | 32 | @interface NSDate (JavaScript) 33 | 34 | // note the month is 0-indexed based like JavaScript 35 | + (Date*(^)(I year, I month, I day))newYMD_JS; 36 | 37 | - (NSS*(^)())toString; 38 | 39 | + (NSDateFormatter*)ISO8601Writter; 40 | //+ (NSDateFormatter*)ISO8601Parser; 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/JavaScript/NSDictionary+JavaScript.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+JavaScript.h 3 | // SubjectiveScript.m 4 | // 5 | // Created by Kevin Malakoff on 7/29/12. 6 | // Copyright (c) 2012 Kevin Malakoff. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person 9 | // obtaining a copy of this software and associated documentation 10 | // files (the "Software"), to deal in the Software without 11 | // restriction, including without limitation the rights to use, 12 | // copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the 14 | // Software is furnished to do so, subject to the following 15 | // conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 22 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 24 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 25 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 26 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 27 | // OTHER DEALINGS IN THE SOFTWARE. 28 | // 29 | 30 | #import "SSTypes.h" 31 | 32 | @interface NSDictionary (JavaScript) 33 | 34 | - (NSS*(^)())toString; 35 | 36 | - (B(^)(id key))hasOwnProperty; 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/JavaScript/NSDictionary+JavaScript.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+JavaScript.m 3 | // SubjectiveScript.m 4 | // 5 | // Created by Kevin Malakoff on 7/29/12. 6 | // Copyright (c) 2012 Kevin Malakoff. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person 9 | // obtaining a copy of this software and associated documentation 10 | // files (the "Software"), to deal in the Software without 11 | // restriction, including without limitation the rights to use, 12 | // copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the 14 | // Software is furnished to do so, subject to the following 15 | // conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 22 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 24 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 25 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 26 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 27 | // OTHER DEALINGS IN THE SOFTWARE. 28 | // 29 | 30 | #import "NSDictionary+JavaScript.h" 31 | 32 | @implementation NSDictionary (JavaScript) 33 | 34 | - (NSS*(^)())toString { return ^{ return @"[object Object]"; }; } 35 | 36 | - (B(^)(id key))hasOwnProperty { return ^B(id key) { return [self objectForKey:key] != nil; }; } 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/JavaScript/NSMutableDictionary+JavaScript.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSMutableDictionary+JavaScript.h 3 | // SubjectiveScript.m 4 | // 5 | // Created by Kevin Malakoff on 7/29/12. 6 | // Copyright (c) 2012 Kevin Malakoff. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person 9 | // obtaining a copy of this software and associated documentation 10 | // files (the "Software"), to deal in the Software without 11 | // restriction, including without limitation the rights to use, 12 | // copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the 14 | // Software is furnished to do so, subject to the following 15 | // conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 22 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 24 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 25 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 26 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 27 | // OTHER DEALINGS IN THE SOFTWARE. 28 | // 29 | 30 | #import "SSTypes.h" 31 | 32 | @interface NSMutableDictionary (JavaScript) 33 | 34 | - (O*(^)(id key))delete_; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/JavaScript/NSMutableDictionary+JavaScript.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSMutableDictionary+JavaScript.m 3 | // SubjectiveScript.m 4 | // 5 | // Created by Kevin Malakoff on 7/29/12. 6 | // Copyright (c) 2012 Kevin Malakoff. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person 9 | // obtaining a copy of this software and associated documentation 10 | // files (the "Software"), to deal in the Software without 11 | // restriction, including without limitation the rights to use, 12 | // copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the 14 | // Software is furnished to do so, subject to the following 15 | // conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 22 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 24 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 25 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 26 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 27 | // OTHER DEALINGS IN THE SOFTWARE. 28 | // 29 | 30 | #import "NSMutableDictionary+JavaScript.h" 31 | 32 | @implementation NSMutableDictionary (JavaScript) 33 | 34 | - (O*(^)(id key))delete_ 35 | { 36 | return ^(id key) { 37 | [self removeObjectForKey:key]; 38 | return self; 39 | }; 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/JavaScript/NSMutableString+JavaScript.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSMutableString+JavaScript.h 3 | // SubjectiveScript.m 4 | // 5 | // Created by Kevin Malakoff on 7/29/12. 6 | // Copyright (c) 2012 Kevin Malakoff. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person 9 | // obtaining a copy of this software and associated documentation 10 | // files (the "Software"), to deal in the Software without 11 | // restriction, including without limitation the rights to use, 12 | // copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the 14 | // Software is furnished to do so, subject to the following 15 | // conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 22 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 24 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 25 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 26 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 27 | // OTHER DEALINGS IN THE SOFTWARE. 28 | // 29 | 30 | #import "SSTypes.h" 31 | 32 | @interface NSMutableString (JavaScript) 33 | 34 | - (S*(^)(NSS* value))append; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/JavaScript/NSMutableString+JavaScript.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSMutableString+JavaScript.m 3 | // SubjectiveScript.m 4 | // 5 | // Created by Kevin Malakoff on 7/29/12. 6 | // Copyright (c) 2012 Kevin Malakoff. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person 9 | // obtaining a copy of this software and associated documentation 10 | // files (the "Software"), to deal in the Software without 11 | // restriction, including without limitation the rights to use, 12 | // copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the 14 | // Software is furnished to do so, subject to the following 15 | // conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 22 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 24 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 25 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 26 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 27 | // OTHER DEALINGS IN THE SOFTWARE. 28 | // 29 | 30 | #import "NSMutableString+JavaScript.h" 31 | 32 | @implementation NSMutableString (JavaScript) 33 | 34 | - (S*(^)(NSS* value))append 35 | { 36 | return ^(NSS* value) { 37 | [self appendString:value]; 38 | return self; 39 | }; 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/JavaScript/NSNumber+JavaScript.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSNumber+JavaScript.h 3 | // SubjectiveScript.m 4 | // 5 | // Created by Kevin Malakoff on 7/29/12. 6 | // Copyright (c) 2012 Kevin Malakoff. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person 9 | // obtaining a copy of this software and associated documentation 10 | // files (the "Software"), to deal in the Software without 11 | // restriction, including without limitation the rights to use, 12 | // copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the 14 | // Software is furnished to do so, subject to the following 15 | // conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 22 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 24 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 25 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 26 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 27 | // OTHER DEALINGS IN THE SOFTWARE. 28 | // 29 | 30 | #import "SSTypes.h" 31 | 32 | @interface NSNumber (JavaScript) 33 | 34 | - (NSS*(^)())toString; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/JavaScript/NSNumber+JavaScript.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSNumber+JavaScript.m 3 | // SubjectiveScript.m 4 | // 5 | // Created by Kevin Malakoff on 7/29/12. 6 | // Copyright (c) 2012 Kevin Malakoff. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person 9 | // obtaining a copy of this software and associated documentation 10 | // files (the "Software"), to deal in the Software without 11 | // restriction, including without limitation the rights to use, 12 | // copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the 14 | // Software is furnished to do so, subject to the following 15 | // conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 22 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 24 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 25 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 26 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 27 | // OTHER DEALINGS IN THE SOFTWARE. 28 | // 29 | 30 | #import "NSNumber+JavaScript.h" 31 | #import "NSNumber+SS.h" 32 | 33 | @implementation NSNumber (JavaScript) 34 | 35 | - (NSS*(^)())toString { 36 | return ^{ 37 | if (self.isBoolean()) 38 | return self.boolValue ? @"true" : @"false"; 39 | else 40 | return self.description; 41 | }; 42 | } 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/JavaScript/NSString+JavaScript.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+JavaScript.h 3 | // SubjectiveScript.m 4 | // 5 | // Created by Kevin Malakoff on 7/29/12. 6 | // Copyright (c) 2012 Kevin Malakoff. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person 9 | // obtaining a copy of this software and associated documentation 10 | // files (the "Software"), to deal in the Software without 11 | // restriction, including without limitation the rights to use, 12 | // copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the 14 | // Software is furnished to do so, subject to the following 15 | // conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 22 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 24 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 25 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 26 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 27 | // OTHER DEALINGS IN THE SOFTWARE. 28 | // 29 | 30 | #import "SSTypes.h" 31 | 32 | @interface NSString (JavaScript) 33 | 34 | - (NSS*(^)())toString; 35 | 36 | - (NSA*(^)(NSS* separator))split; 37 | - (S*(^)(NSS* value))add; 38 | 39 | // function calling of form @"functionName".call(object, arg1, nil) and @"functionName".apply(object, arguments) 40 | - (id(^)(id target, id arg1, ... /* NIL_TERMINATED*/))call; 41 | - (id(^)(id target, NSA* arguments))apply; 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/JavaScript/SS+Types.h: -------------------------------------------------------------------------------- 1 | // 2 | // SSTypes.h 3 | // SubjectiveScript.m 4 | // 5 | // Created by Kevin Malakoff on 7/17/12. 6 | // Copyright (c) 2012 Kevin Malakoff. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person 9 | // obtaining a copy of this software and associated documentation 10 | // files (the "Software"), to deal in the Software without 11 | // restriction, including without limitation the rights to use, 12 | // copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the 14 | // Software is furnished to do so, subject to the following 15 | // conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 22 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 24 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 25 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 26 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 27 | // OTHER DEALINGS IN THE SOFTWARE. 28 | // 29 | 30 | #import "SS.h" 31 | 32 | @interface SS (Types) 33 | 34 | + (B(^)(id obj))isArray; 35 | + (B(^)(id obj))isObject; 36 | + (B(^)(id obj))isString; 37 | + (B(^)(id obj))isNumber; 38 | + (B(^)(id obj))isDate; 39 | + (B(^)(id obj))isNull; 40 | + (B(^)(id obj))isBlock; 41 | 42 | @end -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/NSDictionary+NamedProperties.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+NamedProperties.h 3 | // SubjectiveScript.m 4 | // 5 | // Created by Kevin Malakoff on 7/31/12. 6 | // Copyright (c) 2012 Kevin Malakoff. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person 9 | // obtaining a copy of this software and associated documentation 10 | // files (the "Software"), to deal in the Software without 11 | // restriction, including without limitation the rights to use, 12 | // copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the 14 | // Software is furnished to do so, subject to the following 15 | // conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 22 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 24 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 25 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 26 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 27 | // OTHER DEALINGS IN THE SOFTWARE. 28 | // 29 | 30 | #import 31 | 32 | @interface NSDictionary (NamedProperties) 33 | 34 | + (void)setupNamedProperties; 35 | + (BOOL)resolveNamedProperties:(SEL)selector; 36 | 37 | @end 38 | 39 | #define IMPLEMENT_NAMED_PROPERTIES \ 40 | +(void)initialize { [self setupNamedProperties]; } \ 41 | +(BOOL)resolveInstanceMethod:(SEL)selector { return [self resolveNamedProperties:selector]; } 42 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/SS.h: -------------------------------------------------------------------------------- 1 | // 2 | // SS.h 3 | // SubjectiveScript.m 4 | // 5 | // Created by Kevin Malakoff on 7/17/12. 6 | // Copyright (c) 2012 Kevin Malakoff. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person 9 | // obtaining a copy of this software and associated documentation 10 | // files (the "Software"), to deal in the Software without 11 | // restriction, including without limitation the rights to use, 12 | // copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the 14 | // Software is furnished to do so, subject to the following 15 | // conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 22 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 24 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 25 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 26 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 27 | // OTHER DEALINGS IN THE SOFTWARE. 28 | // 29 | 30 | #import "SSTypes.h" 31 | 32 | @interface SS : NSObject 33 | 34 | + (NSS*)VERSION; 35 | 36 | @end -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/SS.m: -------------------------------------------------------------------------------- 1 | // 2 | // SS.m 3 | // SubjectiveScript.m 4 | // 5 | // Created by Kevin Malakoff on 7/17/12. 6 | // Copyright (c) 2012 Kevin Malakoff. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person 9 | // obtaining a copy of this software and associated documentation 10 | // files (the "Software"), to deal in the Software without 11 | // restriction, including without limitation the rights to use, 12 | // copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the 14 | // Software is furnished to do so, subject to the following 15 | // conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 22 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 24 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 25 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 26 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 27 | // OTHER DEALINGS IN THE SOFTWARE. 28 | // 29 | 30 | #import "SS.h" 31 | 32 | static NSS* SSVERSION = @"0.1.1"; 33 | 34 | @implementation SS 35 | 36 | + (NSS*)VERSION { return SSVERSION; } 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/SubjectiveScript.m: -------------------------------------------------------------------------------- 1 | // 2 | // SubjectiveScript.m 3 | // SubjectiveScript.m 4 | // 5 | // Created by Kevin Malakoff on 7/17/12. 6 | // Copyright (c) 2012 Kevin Malakoff. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person 9 | // obtaining a copy of this software and associated documentation 10 | // files (the "Software"), to deal in the Software without 11 | // restriction, including without limitation the rights to use, 12 | // copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the 14 | // Software is furnished to do so, subject to the following 15 | // conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 22 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 24 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 25 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 26 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 27 | // OTHER DEALINGS IN THE SOFTWARE. 28 | // 29 | 30 | #import "SubjectiveScript.h" 31 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/Types/NSDate+SS.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDate+SS.h 3 | // SubjectiveScript.m 4 | // 5 | // Created by Kevin Malakoff on 7/17/12. 6 | // Copyright (c) 2012 Kevin Malakoff. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person 9 | // obtaining a copy of this software and associated documentation 10 | // files (the "Software"), to deal in the Software without 11 | // restriction, including without limitation the rights to use, 12 | // copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the 14 | // Software is furnished to do so, subject to the following 15 | // conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 22 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 24 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 25 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 26 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 27 | // OTHER DEALINGS IN THE SOFTWARE. 28 | // 29 | 30 | #import "SSTypes.h" 31 | 32 | @interface NSDate (SS) 33 | 34 | // note the month is 0-indexed based like JavaScript 35 | + (Date*(^)(I year, I month, I day))newYMD; 36 | 37 | @end -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/Types/NSDictionary+SS.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+SS.h 3 | // SubjectiveScript.m 4 | // 5 | // Created by Kevin Malakoff on 7/17/12. 6 | // Copyright (c) 2012 Kevin Malakoff. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person 9 | // obtaining a copy of this software and associated documentation 10 | // files (the "Software"), to deal in the Software without 11 | // restriction, including without limitation the rights to use, 12 | // copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the 14 | // Software is furnished to do so, subject to the following 15 | // conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 22 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 24 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 25 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 26 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 27 | // OTHER DEALINGS IN THE SOFTWARE. 28 | // 29 | 30 | #import "SSTypes.h" 31 | 32 | @interface NSDictionary (SS) 33 | 34 | - (id)initWithKV:(const KV*) values /* NIL_TERMINATED */; 35 | + (O*(^)(NSD* other))newO; 36 | 37 | - (NSS*)mutableClassName; 38 | - (O*(^)())toMutable; 39 | 40 | - (B(^)())isEmpty; 41 | - (NSO*(^)(NSO* key))get; 42 | 43 | @end 44 | 45 | #define OTKV(_T, ...) ((_T*)[[_T alloc] initWithKV:(KV[]){__VA_ARGS__, /* NIL_TERMINATION */ nil}]) -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/Types/NSMutableArray+SS.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSMutableArray+SS.h 3 | // SubjectiveScript.m 4 | // 5 | // Created by Kevin Malakoff on 7/17/12. 6 | // Copyright (c) 2012 Kevin Malakoff. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person 9 | // obtaining a copy of this software and associated documentation 10 | // files (the "Software"), to deal in the Software without 11 | // restriction, including without limitation the rights to use, 12 | // copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the 14 | // Software is furnished to do so, subject to the following 15 | // conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 22 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 24 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 25 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 26 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 27 | // OTHER DEALINGS IN THE SOFTWARE. 28 | // 29 | 30 | #import "SSTypes.h" 31 | 32 | @interface NSMutableArray (SS) 33 | 34 | + (A*)newArguments; 35 | + (A*(^)(UI capacity))newC; 36 | + (A*(^)(id obj))newNSO; 37 | 38 | - (A*(^)())toMutable; 39 | 40 | - (A*(^)(id indexNumber, id value))set; 41 | - (A*(^)(I index, id value))setAt; 42 | 43 | @end -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/Types/NSMutableString+SS.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSMutableString+SS.h 3 | // SubjectiveScript.m 4 | // 5 | // Created by Kevin Malakoff on 7/17/12. 6 | // Copyright (c) 2012 Kevin Malakoff. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person 9 | // obtaining a copy of this software and associated documentation 10 | // files (the "Software"), to deal in the Software without 11 | // restriction, including without limitation the rights to use, 12 | // copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the 14 | // Software is furnished to do so, subject to the following 15 | // conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 22 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 24 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 25 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 26 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 27 | // OTHER DEALINGS IN THE SOFTWARE. 28 | // 29 | 30 | #import "SSTypes.h" 31 | 32 | @interface NSMutableString (SS) 33 | 34 | + (S*(^)(UI capacity))newC; 35 | + (S*(^)(NSS* value))newS; 36 | + (S*(^)(NSA* array))newA; 37 | + (S*(^)(NSS* format, ...))newFormatted; 38 | 39 | - (NSS*)mutableClassName; 40 | - (S*(^)())toMutable; 41 | 42 | @end -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/Types/NSNumber+SS.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSNumber+SS.h 3 | // SubjectiveScript.m 4 | // 5 | // Created by Kevin Malakoff on 7/17/12. 6 | // Copyright (c) 2012 Kevin Malakoff. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person 9 | // obtaining a copy of this software and associated documentation 10 | // files (the "Software"), to deal in the Software without 11 | // restriction, including without limitation the rights to use, 12 | // copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the 14 | // Software is furnished to do so, subject to the following 15 | // conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 22 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 24 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 25 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 26 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 27 | // OTHER DEALINGS IN THE SOFTWARE. 28 | // 29 | 30 | #import "SSTypes.h" 31 | 32 | @interface NSNumber (SS) 33 | 34 | + (N*(^)(B value))B; 35 | - (B)B; 36 | 37 | + (N*(^)(I value))I; 38 | - (I)I; 39 | 40 | + (N*(^)(UI value))UI; 41 | - (UI)UI; 42 | 43 | + (N*(^)(F value))F; 44 | - (F)F; 45 | 46 | + (N*(^)(D value))D; 47 | - (D)D; 48 | 49 | - (B(^)())isBoolean; 50 | 51 | @end -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/Types/NSString+SS.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+SS.h 3 | // SubjectiveScript.m 4 | // 5 | // Created by Kevin Malakoff on 7/17/12. 6 | // Copyright (c) 2012 Kevin Malakoff. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person 9 | // obtaining a copy of this software and associated documentation 10 | // files (the "Software"), to deal in the Software without 11 | // restriction, including without limitation the rights to use, 12 | // copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the 14 | // Software is furnished to do so, subject to the following 15 | // conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 22 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 24 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 25 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 26 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 27 | // OTHER DEALINGS IN THE SOFTWARE. 28 | // 29 | 30 | #import "SSTypes.h" 31 | 32 | @interface NSString (SS) 33 | 34 | + (NSS*(^)(NSS* value))newS; 35 | + (NSS*(^)(NSA* array))newA; 36 | + (NSS*(^)(NSS* format, ...))newFormatted; 37 | 38 | - (S*(^)())toMutable; 39 | - (UI)count; 40 | 41 | - (NSS*(^)(UI index))getAt; 42 | 43 | - (B(^)(NSS* string))startsWith; 44 | - (B(^)(NSS* string))endsWith; 45 | 46 | @end -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/Underscore/USConstants.h: -------------------------------------------------------------------------------- 1 | // 2 | // USConstants.h 3 | // Underscore 4 | // 5 | // Created by Robert Böhnke on 5/14/12. 6 | // Copyright (C) 2012 Robert Böhnke 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files (the "Software"), to 10 | // deal in the Software without restriction, including without limitation the 11 | // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 12 | // sell copies of the Software, and to permit persons to whom the Software is 13 | // furnished to do so, subject to the following conditions: 14 | // 15 | // The above copyright notice and this permission notice shall be included in 16 | // all copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 24 | // IN THE SOFTWARE. 25 | // 26 | 27 | #import 28 | 29 | typedef BOOL (^UnderscoreTestBlock)(id obj); 30 | typedef id (^UnderscoreReduceBlock)(id memo, id obj); 31 | 32 | typedef void (^UnderscoreArrayIteratorBlock)(id obj); 33 | typedef id (^UnderscoreArrayMapBlock)(id obj); 34 | 35 | typedef void (^UnderscoreDictionaryIteratorBlock)(id key, id obj); 36 | typedef id (^UnderscoreDictionaryMapBlock)(id key, id obj); 37 | 38 | typedef NSComparisonResult (^UnderscoreSortBlock)(id a, id b); 39 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/Underscore/Underscore-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'Underscore' target in the 'Underscore' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/hpple/XPathQuery.h: -------------------------------------------------------------------------------- 1 | // 2 | // XPathQuery.h 3 | // FuelFinder 4 | // 5 | // Created by Matt Gallagher on 4/08/08. 6 | // Copyright 2008 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | NSArray *PerformHTMLXPathQuery(NSData *document, NSString *query); 10 | NSArray *PerformXMLXPathQuery(NSData *document, NSString *query); 11 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplication/main.m.tt: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // <%= @project_name %> 4 | // 5 | // Created by <%= @developer.capitalize %> on <%= @created_on %> 6 | // Copyright(c) <%= Time.now.year %>, 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 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplicationTests/EiffelApplicationTests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.company.ios.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplicationTests/EiffelApplicationTests.h.tt: -------------------------------------------------------------------------------- 1 | // 2 | // <%= @project_name %>Tests.h 3 | // <%= @project_name %>Tests 4 | // 5 | // Created by <%= @developer.capitalize %> on <%= @created_on %> 6 | // Copyright(c) <%= Time.now.year %>, All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface <%= @project_name %>Tests : SenTestCase 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplicationTests/EiffelApplicationTests.m.tt: -------------------------------------------------------------------------------- 1 | // 2 | // <%= @project_name %>Tests.m 3 | // <%= @project_name %>Tests 4 | // 5 | // Created by <%= @developer.capitalize %> on <%= @created_on %> 6 | // Copyright(c) <%= Time.now.year %>, All rights reserved. 7 | // 8 | 9 | #import "<%= @project_name %>Tests.h" 10 | 11 | @implementation <%= @project_name %>Tests 12 | 13 | - (void)setUp 14 | { 15 | [super setUp]; 16 | 17 | // Set-up code here. 18 | } 19 | 20 | - (void)tearDown 21 | { 22 | // Tear-down code here. 23 | 24 | [super tearDown]; 25 | } 26 | 27 | - (void)testExample 28 | { 29 | STFail(@"Unit tests are not implemented yet in <%= @project_name %>Tests"); 30 | } 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/blank/EiffelApplicationTests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /lib/appjam/generators/templates/resources/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiffelqiu/appjam/00252dac003b3dc5ede0b2613f82fda093c04096/lib/appjam/generators/templates/resources/Default-568h@2x.png -------------------------------------------------------------------------------- /lib/appjam/generators/templates/resources/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiffelqiu/appjam/00252dac003b3dc5ede0b2613f82fda093c04096/lib/appjam/generators/templates/resources/Default.png -------------------------------------------------------------------------------- /lib/appjam/generators/templates/resources/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiffelqiu/appjam/00252dac003b3dc5ede0b2613f82fda093c04096/lib/appjam/generators/templates/resources/Default@2x.png -------------------------------------------------------------------------------- /lib/appjam/generators/templates/resources/contents.tt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /lib/appjam/tasks.rb: -------------------------------------------------------------------------------- 1 | module Appjam 2 | 3 | ## 4 | # This module it's used for bootstrap with padrino rake 5 | # thirdy party tasks 6 | # 7 | # ==== Examples 8 | # 9 | # Appjam::Tasks.files << yourtask.rb 10 | # Appjam::Tasks.files.concat(Dir["/path/to/all/my/tasks/*.rb"]) 11 | # Appjam::Tasks.files.unshift("yourtask.rb") 12 | # 13 | module Tasks 14 | 15 | ## 16 | # Returns a list of files to handle with appjam rake 17 | # 18 | def self.files 19 | @files ||= Dir[File.dirname(__FILE__) + "/tasks/**/*.rb"] 20 | end 21 | end # Tasks 22 | end # Appjam -------------------------------------------------------------------------------- /lib/appjam/utility.rb: -------------------------------------------------------------------------------- 1 | module Appjam 2 | 3 | module Utility 4 | class XcodeUUIDGenerator 5 | 6 | def initialize 7 | @num = [Time.now.to_i, Process.pid, getMAC] 8 | end 9 | 10 | # Get the ethernet hardware address ("MAC"). This version 11 | # works on Mac OS X 10.6 (Snow Leopard); it has not been tested 12 | # on other versions. 13 | 14 | def getMAC(interface='en0') 15 | addrMAC = `ifconfig #{interface} ether`.split("\n")[1] 16 | addrMAC ? addrMAC.strip.split[1].gsub(':','').to_i(16) : 0 17 | end 18 | 19 | def generate 20 | @num[0] += 1 21 | self 22 | end 23 | 24 | def to_s 25 | "%08X%04X%012X" % @num 26 | end 27 | end 28 | end 29 | 30 | end -------------------------------------------------------------------------------- /lib/appjam/version.rb: -------------------------------------------------------------------------------- 1 | module Appjam 2 | module Version 3 | MAJOR = 0 4 | MINOR = 1 5 | PATCH = 8 6 | BUILD = '11' 7 | 8 | STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.').chomp('.') 9 | end 10 | end -------------------------------------------------------------------------------- /lib/appjam/view.rb: -------------------------------------------------------------------------------- 1 | module Appjam 2 | module View 3 | extend self 4 | 5 | # Enables hirb and reads a config file from the main repo's config/hirb.yml. 6 | def enable 7 | unless @enabled 8 | Hirb::View.enable(:config_file=>File.join(Appjam.repo.config_dir, 'hirb.yml')) 9 | Hirb::Helpers::Table.filter_any = true 10 | end 11 | @enabled = true 12 | end 13 | 14 | # Renders any object via Hirb. Options are passed directly to 15 | # {Hirb::Console.render_output}[http://tagaholic.me/hirb/doc/classes/Hirb/Console.html#M000011]. 16 | def render(object, options={}, return_obj=false) 17 | if options[:inspect] 18 | puts(object.inspect) 19 | else 20 | render_object(object, options, return_obj) unless silent_object?(object) 21 | end 22 | end 23 | 24 | #:stopdoc: 25 | def class_config(klass) 26 | opts = (Hirb::View.formatter_config[klass] || {}).dup 27 | opts.delete(:ancestor) 28 | opts.merge!((opts.delete(:options) || {}).dup) 29 | OptionParser.make_mergeable!(opts) 30 | opts 31 | end 32 | 33 | def toggle_pager 34 | Hirb::View.toggle_pager 35 | end 36 | 37 | def silent_object?(obj) 38 | [nil,false,true].include?(obj) 39 | end 40 | 41 | def render_object(object, options={}, return_obj=false) 42 | options[:class] ||= :auto_table 43 | render_result = Hirb::Console.render_output(object, options) 44 | return_obj ? object : render_result 45 | end 46 | #:startdoc: 47 | end 48 | end 49 | -------------------------------------------------------------------------------- /test/test_model_generator.rb: -------------------------------------------------------------------------------- 1 | require File.expand_path(File.dirname(__FILE__) + '/helper') 2 | 3 | class TestProjectGenerator < Test::Unit::TestCase 4 | def setup 5 | @apptmp = "#{Dir.tmpdir}/appjam-tests/#{UUID.new.generate}" 6 | `mkdir -p #{@apptmp}` 7 | end 8 | 9 | def teardown 10 | `rm -rf #{@apptmp}` 11 | `rm -rf /tmp/project` 12 | end 13 | 14 | context 'the project generator' do 15 | 16 | should "do not allow create model outside iphone project folder" do 17 | assert_nothing_raised { silence_logger { generate(:project, 'sample_project', "--root=#{@apptmp}") } } 18 | assert_raise(::NameError) { silence_logger { generate(:model, "user") } } 19 | end 20 | 21 | should "raise an Error when given invalid constant names for model" do 22 | assert_raise(::NameError) { silence_logger { generate(:model, "123asdf") } } 23 | assert_raise(::NameError) { silence_logger { generate(:model, "./sample_project") } } 24 | end 25 | 26 | end 27 | 28 | end -------------------------------------------------------------------------------- /test/test_project_generator.rb: -------------------------------------------------------------------------------- 1 | require File.expand_path(File.dirname(__FILE__) + '/helper') 2 | 3 | class TestProjectGenerator < Test::Unit::TestCase 4 | def setup 5 | @apptmp = "#{Dir.tmpdir}/appjam-tests/#{UUID.new.generate}" 6 | `mkdir -p #{@apptmp}` 7 | end 8 | 9 | def teardown 10 | `rm -rf #{@apptmp}` 11 | `rm -rf /tmp/project` 12 | end 13 | 14 | context 'the project generator' do 15 | 16 | should "display the right path" do 17 | buffer = silence_logger { generate(:project, 'project', "--root=/tmp") } 18 | assert_file_exists("/tmp/project") 19 | end 20 | 21 | should "allow simple generator to run and create base_app with no options" do 22 | assert_nothing_raised { silence_logger { generate(:project, 'sample_project', "--root=#{@apptmp}") } } 23 | assert_file_exists("#{@apptmp}/sample_project") 24 | assert_file_exists("#{@apptmp}/sample_project/Classes") 25 | # assert_file_exists("#{@apptmp}/sample_project/Contacts_Prefix.pch") 26 | # assert_file_exists("#{@apptmp}/sample_project/Contacts-Info.plist") 27 | # assert_file_exists("#{@apptmp}/sample_project/Contacts.xcodeproj") 28 | # assert_file_exists("#{@apptmp}/sample_project/main.m") 29 | end 30 | 31 | should "raise an Error when given invalid constant names for project" do 32 | assert_raise(::NameError) { silence_logger { generate(:project, "123asdf", "--root=#{@apptmp}") } } 33 | assert_raise(::NameError) { silence_logger { generate(:project, "./sample_project", "--root=#{@apptmp}") } } 34 | end 35 | 36 | end 37 | 38 | end --------------------------------------------------------------------------------