diff --git a/CCLoader Plugins.xctemplate/CCSection-Protocol.h b/CCLoader Plugins.xctemplate/CCSection-Protocol.h new file mode 100644 index 0000000..6cba5f1 --- /dev/null +++ b/CCLoader Plugins.xctemplate/CCSection-Protocol.h @@ -0,0 +1,27 @@ +#import +#import + +@protocol CCSectionDelegate + +- (void)updateStatusText:(NSString *)text; +- (void)requestControlCenterDismissal; +- (void)sectionHeightChanged; +- (void)showViewController:(UIViewController *)vc animated:(BOOL)animated completion:(void (^)(void))completion; + +@end + +@protocol CCSection + +@required +- (UIView *)view; + +- (CGFloat)sectionHeight; + +@optional +- (void)setDelegate:(UIViewController *)delegate; + +- (void)controlCenterWillAppear; + +- (void)controlCenterDidDisappear; + +@end diff --git a/CCLoader Plugins.xctemplate/Info.plist b/CCLoader Plugins.xctemplate/Info.plist new file mode 100644 index 0000000..87a1bc8 --- /dev/null +++ b/CCLoader Plugins.xctemplate/Info.plist @@ -0,0 +1,32 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleName + ___PACKAGENAME___ + CFBundleIdentifier + ___VARIABLE_bundleIdentifierPrefix:bundleIdentifier___.___VARIABLE_productName:RFC1034Identifier___ + CFBundleDisplayName + ___PACKAGENAME___ + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + DTPlatformName + iphoneos + MinimumOSVersion + 7.0 + CCReplacingStockSectionID + ___VARIABLE_CCSECTION___ + NSPrincipalClass + ___PACKAGENAME___Section + + diff --git a/CCLoader Plugins.xctemplate/TemplateIcon.icns b/CCLoader Plugins.xctemplate/TemplateIcon.icns new file mode 100644 index 0000000..5b3e0db Binary files /dev/null and b/CCLoader Plugins.xctemplate/TemplateIcon.icns differ diff --git a/CCLoader Plugins.xctemplate/TemplateInfo.plist b/CCLoader Plugins.xctemplate/TemplateInfo.plist new file mode 100644 index 0000000..53568ce --- /dev/null +++ b/CCLoader Plugins.xctemplate/TemplateInfo.plist @@ -0,0 +1,155 @@ + + + + + Kind + Xcode.Xcode3.ProjectTemplateUnitKind + Identifier + com.imokhles.ccloaderPlugins + Concrete + + Description + This template builds a CCLoader-Plugins. + Ancestors + + com.kokoabim.iosopendev.base + com.kokoabim.iosopendev.unitTests + + Targets + + + ProductType + com.apple.product-type.library.dynamic + SharedSettings + + DYLIB_COMPATIBILITY_VERSION + 1 + DYLIB_CURRENT_VERSION + 1 + EXECUTABLE_NAME + ___PACKAGENAMEASIDENTIFIER___ + EXECUTABLE_EXTENSION + + INSTALL_PATH + /Library/CCLoader/Bundles/___PACKAGENAME___.bundle + GCC_PREFIX_HEADER + ___PACKAGENAME___/___PACKAGENAME___-Prefix.pch + GCC_PRECOMPILE_PREFIX_HEADER + YES + + BuildPhases + + + Class + Sources + + + Class + Frameworks + + + Class + Headers + + + ShellScript + /opt/iOSOpenDev/bin/iosod --xcbp + ShellPath + /bin/sh + RunOnlyForDeploymentPostprocessing + + Class + ShellScript + + + Frameworks + + Foundation + UIKit + + + + Nodes + + ___PACKAGENAME___-Prefix.pch:objC:importFoundation + ___PACKAGENAMEASIDENTIFIER___Section.h + ___PACKAGENAMEASIDENTIFIER___Section.m + ___PACKAGENAMEASIDENTIFIER___SectionView.h + ___PACKAGENAMEASIDENTIFIER___SectionView.m + Package/DEBIAN/control:debianControl:section + Package/DEBIAN/control:debianControl:depends + Package/Library/CCLoader/Bundles/___PACKAGENAME___.bundle/Info.plist + CCSection-Protocol.h + + Options + + + Identifier + CCSECTION + Required + + Name + CCSection + Description + Replace CCSection + Type + popup + Default + com.apple.controlcenter.settings + Values + + com.apple.controlcenter.brightness + com.apple.controlcenter.settings + com.apple.controlcenter.media-controls + com.apple.controlcenter.air-stuff + com.apple.controlcenter.quick-launch + + + + Definitions + + Package/Library/CCLoader/Bundles/___PACKAGENAME___.bundle/Info.plist + + Group + + Package + Library + CCLoader + Bundles + ___PACKAGENAME___.bundle + + Path + Info.plist + + ___PACKAGENAMEASIDENTIFIER___Section.h + + Path + ___PACKAGENAMEASIDENTIFIER___Section.h + + ___PACKAGENAMEASIDENTIFIER___Section.m + + Path + ___PACKAGENAMEASIDENTIFIER___Section.m + + ___PACKAGENAMEASIDENTIFIER___SectionView.h + + Path + ___PACKAGENAMEASIDENTIFIER___SectionView.h + + ___PACKAGENAMEASIDENTIFIER___SectionView.m + + Path + ___PACKAGENAMEASIDENTIFIER___SectionView.m + + CCSection-Protocol.h + + Path + CCSection-Protocol.h + + *:debianControl:section + Section: Addons (ControlCenter) + *:debianControl:depends + Depends: de.j-gessner.ccloader, firmware (>= 7.0) + + + diff --git a/CCLoader Plugins.xctemplate/___PACKAGENAMEASIDENTIFIER___Section.h b/CCLoader Plugins.xctemplate/___PACKAGENAMEASIDENTIFIER___Section.h new file mode 100644 index 0000000..b2537c8 --- /dev/null +++ b/CCLoader Plugins.xctemplate/___PACKAGENAMEASIDENTIFIER___Section.h @@ -0,0 +1,14 @@ +// +// ___FILENAME___ +// ___PACKAGENAME___ +// +// Created by ___FULLUSERNAME___ on ___DATE___. +// Copyright (c) ___YEAR___ ___ORGANIZATIONNAME___. All rights reserved. +// + +#import "CCSection-Protocol.h" +#import "___FILEBASENAMEASIDENTIFIER___View.h" + +@interface ___FILEBASENAMEASIDENTIFIER___ : NSObject + +@end diff --git a/CCLoader Plugins.xctemplate/___PACKAGENAMEASIDENTIFIER___Section.m b/CCLoader Plugins.xctemplate/___PACKAGENAMEASIDENTIFIER___Section.m new file mode 100644 index 0000000..f242365 --- /dev/null +++ b/CCLoader Plugins.xctemplate/___PACKAGENAMEASIDENTIFIER___Section.m @@ -0,0 +1,54 @@ +// +// ___FILENAME___ +// ___PACKAGENAME___ +// +// Created by ___FULLUSERNAME___ on ___DATE___. +// Copyright (c) ___YEAR___ ___ORGANIZATIONNAME___. All rights reserved. +// + +#import "___FILEBASENAMEASIDENTIFIER___.h" + +@interface ___FILEBASENAMEASIDENTIFIER___ () + +@property (nonatomic, strong) NSBundle *bundle; +@property (nonatomic, strong) ___FILEBASENAMEASIDENTIFIER___View *view; + +@property (nonatomic, weak) UIViewController *delegate; + +@end + +@implementation ___FILEBASENAMEASIDENTIFIER___ + +- (instancetype)init { + self = [super init]; + if (self) { + self.bundle = [NSBundle bundleForClass:[self class]]; + } + return self; +} + +- (CGFloat)sectionHeight { + return 50.0f; +} + +- (void)loadView { + self.view = [[___FILEBASENAMEASIDENTIFIER___View alloc] init]; +} + +- (UIView *)view { + if (!_view) { + [self loadView]; + } + + return _view; +} + +- (void)controlCenterWillAppear { + +} + +- (void)controlCenterDidDisappear { + +} + +@end diff --git a/CCLoader Plugins.xctemplate/___PACKAGENAMEASIDENTIFIER___SectionView.h b/CCLoader Plugins.xctemplate/___PACKAGENAMEASIDENTIFIER___SectionView.h new file mode 100644 index 0000000..214ff87 --- /dev/null +++ b/CCLoader Plugins.xctemplate/___PACKAGENAMEASIDENTIFIER___SectionView.h @@ -0,0 +1,14 @@ +// +// ___FILENAME___ +// ___PACKAGENAME___ +// +// Created by ___FULLUSERNAME___ on ___DATE___. +// Copyright (c) ___YEAR___ ___ORGANIZATIONNAME___. All rights reserved. +// + +#import +#import + +@interface ___FILEBASENAMEASIDENTIFIER___ : UIView + +@end diff --git a/CCLoader Plugins.xctemplate/___PACKAGENAMEASIDENTIFIER___SectionView.m b/CCLoader Plugins.xctemplate/___PACKAGENAMEASIDENTIFIER___SectionView.m new file mode 100644 index 0000000..23112b2 --- /dev/null +++ b/CCLoader Plugins.xctemplate/___PACKAGENAMEASIDENTIFIER___SectionView.m @@ -0,0 +1,26 @@ +// +// ___FILENAME___ +// ___PACKAGENAME___ +// +// Created by ___FULLUSERNAME___ on ___DATE___. +// Copyright (c) ___YEAR___ ___ORGANIZATIONNAME___. All rights reserved. +// + +#import "___FILEBASENAMEASIDENTIFIER___.h" + +@implementation ___FILEBASENAMEASIDENTIFIER___ + +- (instancetype)init { + self = [super init]; + if (self) { + //Load additional views + } + return self; +} + +- (void)layoutSubviews { + [super layoutSubviews]; + //Layout any subviews +} + +@end diff --git a/FlipSwitch Switch.xctemplate/FSSwitchDataSource.h b/FlipSwitch Switch.xctemplate/FSSwitchDataSource.h new file mode 100644 index 0000000..32f0715 --- /dev/null +++ b/FlipSwitch Switch.xctemplate/FSSwitchDataSource.h @@ -0,0 +1,54 @@ +#import +#import "FSSwitchState.h" + +@protocol FSSwitchDataSource +@optional + +- (FSSwitchState)stateForSwitchIdentifier:(NSString *)switchIdentifier; +// Gets the current state of the switch. +// Must override if building a settings-like switch. +// Return FSSwitchStateIndeterminate if switch is loading +// By default returns FSSwitchStateIndeterminate + +- (void)applyState:(FSSwitchState)newState forSwitchIdentifier:(NSString *)switchIdentifier; +// Sets the new state of the switch +// Must override if building a settings-like switch. +// By default calls through to applyActionForSwitchIdentifier: if newState is different from the current state + +- (void)applyActionForSwitchIdentifier:(NSString *)switchIdentifier; +// Runs the default action for the switch. +// Must override if building an action-like switch. +// By default calls through to applyState:forSwitchIdentifier: if state is not indeterminate + +- (NSString *)titleForSwitchIdentifier:(NSString *)switchIdentifier; +// Returns the localized title for the switch. +// By default reads the CFBundleDisplayName out of the switch's bundle. + +- (BOOL)shouldShowSwitchIdentifier:(NSString *)switchIdentifier; +// Returns wether the switch should be shown. +// By default returns YES or the value from GraphicsServices for the capability specified in the "required-capability-key" of the switch's bundle +// E.g. You would detect if the device has the required capability (3G, flash etc) + +- (id)glyphImageDescriptorOfState:(FSSwitchState)switchState size:(CGFloat)size scale:(CGFloat)scale forSwitchIdentifier:(NSString *)switchIdentifier; +// Provide an image descriptor that best displays at the requested size and scale +// By default looks through the bundle to find a glyph image + +- (NSBundle *)bundleForSwitchIdentifier:(NSString *)switchIdentifier; +// Provides a bundle to look for localizations/images in +// By default returns the bundle for the current class + +- (void)switchWasRegisteredForIdentifier:(NSString *)switchIdentifier; +// Called when switch is first registered + +- (void)switchWasUnregisteredForIdentifier:(NSString *)switchIdentifier; +// Called when switch is unregistered + +- (BOOL)hasAlternateActionForSwitchIdentifier:(NSString *)switchIdentifier; +// Gets whether the switch supports an alternate or "hold" action +// By default queries if switch responds to applyAlternateActionForSwitchIdentifier: or if it has a "alternate-action-url" key set + +- (void)applyAlternateActionForSwitchIdentifier:(NSString *)switchIdentifier; +// Applies the alternate or "hold" action +// By default launches the URL stored in the "alternate-action-url" key of the switch's bundle + +@end \ No newline at end of file diff --git a/FlipSwitch Switch.xctemplate/FSSwitchPanel.h b/FlipSwitch Switch.xctemplate/FSSwitchPanel.h new file mode 100755 index 0000000..84ed715 --- /dev/null +++ b/FlipSwitch Switch.xctemplate/FSSwitchPanel.h @@ -0,0 +1,58 @@ +#import +#import "FSSwitchState.h" + +@interface FSSwitchPanel : NSObject + ++ (FSSwitchPanel *)sharedPanel; + +@property (nonatomic, readonly, copy) NSArray *switchIdentifiers; +// Returns a list of identifying all switches installed on the device + +- (NSString *)titleForSwitchIdentifier:(NSString *)switchIdentifier; +// Returns the localized title for a specific switch + +- (UIButton *)buttonForSwitchIdentifier:(NSString *)switchIdentifier usingTemplate:(NSBundle *)templateBundle; +// Returns a UIButton for a specific switch +// The button automatically updates its style based on the user interaction and switch state changes, applies the standard action when pressed, and applies the alternate action when held + +- (UIImage *)imageOfSwitchState:(FSSwitchState)state controlState:(UIControlState)controlState forSwitchIdentifier:(NSString *)switchIdentifier usingTemplate:(NSBundle *)templateBundle; +- (UIImage *)imageOfSwitchState:(FSSwitchState)state controlState:(UIControlState)controlState scale:(CGFloat)scale forSwitchIdentifier:(NSString *)switchIdentifier usingTemplate:(NSBundle *)templateBundle; +// Returns an image representing how a specific switch would look in a particular state when styled with the provided template + +- (id)glyphImageDescriptorOfState:(FSSwitchState)switchState size:(CGFloat)size scale:(CGFloat)scale forSwitchIdentifier:(NSString *)switchIdentifier; +// Returns the raw glyph identifier as retrieved from the backing FSSwitch instance + +- (FSSwitchState)stateForSwitchIdentifier:(NSString *)switchIdentifier; +// Returns the current state of a particualr switch +- (void)setState:(FSSwitchState)state forSwitchIdentifier:(NSString *)switchIdentifier; +// Updates the state of a particular switch. If the switch accepts the change it will send a state change +- (void)applyActionForSwitchIdentifier:(NSString *)switchIdentifier; +// Applies the default action of a particular switch + +- (BOOL)hasAlternateActionForSwitchIdentifier:(NSString *)switchIdentifier; +// Queries whether a switch supports an alternate action. This is often triggered by a hold gesture +- (void)applyAlternateActionForSwitchIdentifier:(NSString *)switchIdentifier; +// Apply the alternate action of a particular switch + +- (void)openURLAsAlternateAction:(NSURL *)url; +// Helper method to open a particular URL as if it were launched from an alternate action + +@end + +@protocol FSSwitchDataSource; + +@interface FSSwitchPanel (SpringBoard) +- (void)registerDataSource:(id)dataSource forSwitchIdentifier:(NSString *)switchIdentifier; +// Registers a switch implementation for a specific identifier. Bundlee in /Library/Switches will have their principal class automatically loaded +- (void)unregisterSwitchIdentifier:(NSString *)switchIdentifier; +// Unregisters a switch +- (void)stateDidChangeForSwitchIdentifier:(NSString *)switchIdentifier; +// Informs the system when a switch changes its state. This will trigger any switch buttons to update their style +@end + +extern NSString * const FSSwitchPanelSwitchesChangedNotification; + +extern NSString * const FSSwitchPanelSwitchStateChangedNotification; +extern NSString * const FSSwitchPanelSwitchIdentifierKey; + +extern NSString * const FSSwitchPanelSwitchWillOpenURLNotification; diff --git a/FlipSwitch Switch.xctemplate/FSSwitchState.h b/FlipSwitch Switch.xctemplate/FSSwitchState.h new file mode 100644 index 0000000..64ba457 --- /dev/null +++ b/FlipSwitch Switch.xctemplate/FSSwitchState.h @@ -0,0 +1,10 @@ +#import + +typedef enum { + FSSwitchStateOff = 0, + FSSwitchStateOn = 1, + FSSwitchStateIndeterminate = -1 +} FSSwitchState; + +extern NSString *NSStringFromFSSwitchState(FSSwitchState state); +extern FSSwitchState FSSwitchStateFromNSString(NSString *stateString); diff --git a/FlipSwitch Switch.xctemplate/Info.plist b/FlipSwitch Switch.xctemplate/Info.plist new file mode 100644 index 0000000..91b46bd --- /dev/null +++ b/FlipSwitch Switch.xctemplate/Info.plist @@ -0,0 +1,32 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ___PACKAGENAME___ + CFBundleIdentifier + ___VARIABLE_bundleIdentifierPrefix:bundleIdentifier___.___VARIABLE_productName:RFC1034Identifier___ + CFBundleDisplayName + ___PACKAGENAME___ + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + DTPlatformName + iphoneos + MinimumOSVersion + 3.0 + NSPrincipalClass + ___PACKAGENAME___Switch + alternate-action-url + prefs: + + diff --git a/FlipSwitch Switch.xctemplate/TemplateIcon.icns b/FlipSwitch Switch.xctemplate/TemplateIcon.icns new file mode 100644 index 0000000..5b3e0db Binary files /dev/null and b/FlipSwitch Switch.xctemplate/TemplateIcon.icns differ diff --git a/FlipSwitch Switch.xctemplate/TemplateInfo.plist b/FlipSwitch Switch.xctemplate/TemplateInfo.plist new file mode 100644 index 0000000..1dec3b3 --- /dev/null +++ b/FlipSwitch Switch.xctemplate/TemplateInfo.plist @@ -0,0 +1,139 @@ + + + + + Kind + Xcode.Xcode3.ProjectTemplateUnitKind + Identifier + com.kokoabim.iosopendev.flipswitchs + Concrete + + Description + This template builds a FlipSwitch Switchs. + Ancestors + + com.kokoabim.iosopendev.base + com.kokoabim.iosopendev.unitTests + + Targets + + + ProductType + com.apple.product-type.library.dynamic + SharedSettings + + DYLIB_COMPATIBILITY_VERSION + 1 + DYLIB_CURRENT_VERSION + 1 + EXECUTABLE_NAME + ___PACKAGENAMEASIDENTIFIER___ + EXECUTABLE_EXTENSION + + INSTALL_PATH + /Library/Switches/___PACKAGENAME___.bundle/ + GCC_PREFIX_HEADER + ___PACKAGENAME___/___PACKAGENAME___-Prefix.pch + GCC_PRECOMPILE_PREFIX_HEADER + YES + + BuildPhases + + + ShellScript + /opt/iOSOpenDev/bin/iosod --xcbp-logos + ShellPath + /bin/sh + RunOnlyForDeploymentPostprocessing + + Class + ShellScript + + + Class + Sources + + + Class + Frameworks + + + Class + Headers + + + ShellScript + /opt/iOSOpenDev/bin/iosod --xcbp + ShellPath + /bin/sh + RunOnlyForDeploymentPostprocessing + + Class + ShellScript + + + Frameworks + + Foundation + UIKit + + + + Nodes + + ___PACKAGENAME___-Prefix.pch:objC:importFoundation + ___PACKAGENAMEASIDENTIFIER___.xm + ___PACKAGENAMEASIDENTIFIER___.mm + Package/DEBIAN/control:debianControl:section + Package/DEBIAN/control:debianControl:depends + Package/Library/Switches/___PACKAGENAME___.bundle/Info.plist + FSSwitchDataSource.h + FSSwitchPanel.h + FSSwitchState.h + + Definitions + + ___PACKAGENAMEASIDENTIFIER___.xm + + Path + ___PACKAGENAMEASIDENTIFIER___.xm + + ___PACKAGENAMEASIDENTIFIER___.mm + + Path + ___PACKAGENAMEASIDENTIFIER___.mm + + Package/Library/Switches/___PACKAGENAME___.bundle/Info.plist + + Group + + Package + Library + Switchs + ___PACKAGENAME___.bundle + + Path + Info.plist + + FSSwitchDataSource.h + + Path + FSSwitchDataSource.h + + FSSwitchPanel.h + + Path + FSSwitchPanel.h + + FSSwitchState.h + + Path + FSSwitchState.h + + *:debianControl:section + Section: Addons (Flipswitch) + *:debianControl:depends + Depends: firmware (>= 5.0), mobilesubstrate, com.a3tweaks.flipswitch + + + diff --git a/FlipSwitch Switch.xctemplate/___PACKAGENAMEASIDENTIFIER___.mm b/FlipSwitch Switch.xctemplate/___PACKAGENAMEASIDENTIFIER___.mm new file mode 100644 index 0000000..d8fe044 --- /dev/null +++ b/FlipSwitch Switch.xctemplate/___PACKAGENAMEASIDENTIFIER___.mm @@ -0,0 +1,6 @@ + +// *** DO NOT EDIT THIS FILE! *** +// This file is generated by Logos processing using ___PACKAGENAMEASIDENTIFIER___.xm during each build. + +// Logos by Dustin Howett +// See http://iphonedevwiki.net/index.php/Logos diff --git a/FlipSwitch Switch.xctemplate/___PACKAGENAMEASIDENTIFIER___.xm b/FlipSwitch Switch.xctemplate/___PACKAGENAMEASIDENTIFIER___.xm new file mode 100644 index 0000000..d16bd9d --- /dev/null +++ b/FlipSwitch Switch.xctemplate/___PACKAGENAMEASIDENTIFIER___.xm @@ -0,0 +1,25 @@ +#import "FSSwitchDataSource.h" +#import "FSSwitchPanel.h" + +#error iOSOpenDev post-project creation from template requirements (remove these lines after completed) -- \ + Link to libflipswitch.dylib: \ + (1) go to TARGETS > Build Phases > Link Binary With Libraries and add /opt/iOSOpenDev/lib/libflipswitch.dylib \ + (2) remove these lines from *.xm files (not *.mm files as they're automatically generated from *.xm files) + +@interface ___PACKAGENAME___Switch : NSObject +@end + +@implementation ___PACKAGENAME___Switch + +- (FSSwitchState)stateForSwitchIdentifier:(NSString *)switchIdentifier +{ + return FSSwitchStateOn; +} + +- (void)applyState:(FSSwitchState)newState forSwitchIdentifier:(NSString *)switchIdentifier +{ + if (newState == FSSwitchStateIndeterminate) + return; +} + +@end \ No newline at end of file diff --git a/Velox Plugin.xctemplate/Info.plist b/Velox Plugin.xctemplate/Info.plist new file mode 100644 index 0000000..ab4ca0d --- /dev/null +++ b/Velox Plugin.xctemplate/Info.plist @@ -0,0 +1,39 @@ + + + + + CFBundleName + ___PACKAGENAME___ + CFBundleIdentifier + ___VARIABLE_bundleIdentifierPrefix:bundleIdentifier___.___VARIABLE_productName:RFC1034Identifier___ + CFBundleInfoDictionaryVersion + 6.0 + CFBundleVersion + 1 + CFBundleDisplayName + ___PACKAGENAME___ + MinimumOSVersion + 5.0 + CFBundleSupportedPlatforms + + iPhoneOS + + CFBundlePackageType + BNDL + CFBundleSignature + ???? + NSPrincipalClass + ___PACKAGENAMEASIDENTIFIER___FolderView + VeloxAppIDs + + ___VARIABLE_FolderAppID___ + + UIDeviceFamily + + 1 + 2 + + CFBundleShortVersionString + 1.0 + + diff --git a/Velox Plugin.xctemplate/TemplateIcon.icns b/Velox Plugin.xctemplate/TemplateIcon.icns new file mode 100644 index 0000000..3a12262 Binary files /dev/null and b/Velox Plugin.xctemplate/TemplateIcon.icns differ diff --git a/Velox Plugin.xctemplate/TemplateInfo.plist b/Velox Plugin.xctemplate/TemplateInfo.plist new file mode 100644 index 0000000..07d02a1 --- /dev/null +++ b/Velox Plugin.xctemplate/TemplateInfo.plist @@ -0,0 +1,135 @@ + + + + + Kind + Xcode.Xcode3.ProjectTemplateUnitKind + Identifier + com.kokoabim.iosopendev.veloxplugin + Concrete + + Description + This template builds a Velox Plugin. + Ancestors + + com.kokoabim.iosopendev.base + com.kokoabim.iosopendev.unitTests + + Targets + + + ProductType + com.apple.product-type.library.dynamic + SharedSettings + + DYLIB_COMPATIBILITY_VERSION + 1 + DYLIB_CURRENT_VERSION + 1 + EXECUTABLE_NAME + ___PACKAGENAMEASIDENTIFIER___ + EXECUTABLE_EXTENSION + + INSTALL_PATH + /Library/Velox/Plugins/___PACKAGENAME___.bundle/ + GCC_PREFIX_HEADER + ___PACKAGENAME___/___PACKAGENAME___-Prefix.pch + GCC_PRECOMPILE_PREFIX_HEADER + YES + + BuildPhases + + + Class + Sources + + + Class + Frameworks + + + Class + Headers + + + ShellScript + /opt/iOSOpenDev/bin/iosod --xcbp + ShellPath + /bin/sh + RunOnlyForDeploymentPostprocessing + + Class + ShellScript + + + Frameworks + + Foundation + UIKit + + + + Nodes + + ___PACKAGENAME___-Prefix.pch:objC:importFoundation + VeloxFolderViewProtocol.h + ___PACKAGENAMEASIDENTIFIER___FolderView.m + Package/DEBIAN/control:debianControl:section + Package/DEBIAN/control:debianControl:depends + Package/Library/Velox/Plugins/___PACKAGENAME___.bundle/Info.plist + Velox.h + + Options + + + Identifier + FolderAppID + Required + + Name + App Identifier + Description + Folder App ID + EmptyReplacement + com.apple.Preferences + Type + text + + + Definitions + + Package/Library/Velox/Plugins/___PACKAGENAME___.bundle/Info.plist + + Group + + Package + Library + Velox + Plugins + ___PACKAGENAME___.bundle + + Path + Info.plist + + VeloxFolderViewProtocol.h + + Path + VeloxFolderViewProtocol.h + + ___PACKAGENAMEASIDENTIFIER___FolderView.m + + Path + ___PACKAGENAMEASIDENTIFIER___FolderView.m + + Velox.h + + Path + Velox.h + + *:debianControl:section + Section: Addons (Velox) + *:debianControl:depends + Depends: firmware (>= 6.0), com.apextweaks.velox + + + diff --git a/Velox Plugin.xctemplate/Velox.h b/Velox Plugin.xctemplate/Velox.h new file mode 100644 index 0000000..aaf36a1 --- /dev/null +++ b/Velox Plugin.xctemplate/Velox.h @@ -0,0 +1,13 @@ +/* This is the header of the Velox manager. + For use in Velox plugins. Calling these methods after -initWithFrame won't have any effect, you need to call them in your plugins -initwithFrame: method. + Mind the availability notes. Use objc_getClass("Velox"), because you can't link Velox. + Using any undocumented methods of the Velox classes is not supported and will result in undefined behavior. If you have API requests, contact us at support@apextweaks.com. + Copyright Apextweaks 2013.*/ +@class SBIconView; + +@interface Velox ++(Velox *)sharedManager; //Availability: 1.0+ //Get shared Instance of the Velox manager +-(SBIconView *)currentIcon; //Availability: 1.0+ //Get the icon the user swiped //Use e.x. to set badgeValue. +-(void)setAdjustsNotchShadow:(BOOL)adjusts; //Availability: 1.0+ //Makes the notch (triangle) shadow less hard, more transparent. +-(void)setCustomNotchImage:(UIImage *)image; //Availability: coming soon (-> 1.0.4) //Set a custom image for the folder arrow / triangle. +@end \ No newline at end of file diff --git a/Velox Plugin.xctemplate/VeloxFolderViewProtocol.h b/Velox Plugin.xctemplate/VeloxFolderViewProtocol.h new file mode 100644 index 0000000..14fb18e --- /dev/null +++ b/Velox Plugin.xctemplate/VeloxFolderViewProtocol.h @@ -0,0 +1,10 @@ +#import +#import + +@protocol VeloxFolderViewProtocol ++(int)folderHeight; +-(UIView *)initWithFrame:(CGRect)aFrame; +@optional +-(void)unregisterFromStuff; //Not necessary, use to unregister from notification centers +-(float)realHeight; //Optional, used to make a folder with a dynamic height. Called right after -initWithFrame +@end \ No newline at end of file diff --git a/Velox Plugin.xctemplate/___PACKAGENAMEASIDENTIFIER___FolderView.m b/Velox Plugin.xctemplate/___PACKAGENAMEASIDENTIFIER___FolderView.m new file mode 100644 index 0000000..cec5e3d --- /dev/null +++ b/Velox Plugin.xctemplate/___PACKAGENAMEASIDENTIFIER___FolderView.m @@ -0,0 +1,35 @@ +// +// ___FILENAME___ +// ___PACKAGENAME___ +// +// Created by ___FULLUSERNAME___ on ___DATE___. +// Copyright (c) ___YEAR___ ___ORGANIZATIONNAME___. All rights reserved. +// Velox Plugins Template Created By : @iMokhles +// + +#import "VeloxFolderViewProtocol.h" +/*Velox Folder Pugin*/ + + +@interface ___FILEBASENAMEASIDENTIFIER___ : UIView +//Add properties, iVars here +@end + + + +@implementation ___FILEBASENAMEASIDENTIFIER___ + +-(UIView *)initWithFrame:(CGRect)aFrame{ + self = [super initWithFrame:aFrame]; + if (self){ + //Add subviews, load data, etc. + } + return self; +} + + ++(int)folderHeight{ + return 100; //Make folder bigger on i5 devices? +} + +@end \ No newline at end of file diff --git a/iOS 7 NotificationCenter Widget.xctemplate/Icon.png b/iOS 7 NotificationCenter Widget.xctemplate/Icon.png new file mode 100644 index 0000000..9a499a0 Binary files /dev/null and b/iOS 7 NotificationCenter Widget.xctemplate/Icon.png differ diff --git a/iOS 7 NotificationCenter Widget.xctemplate/Icon@2x.png b/iOS 7 NotificationCenter Widget.xctemplate/Icon@2x.png new file mode 100644 index 0000000..a0a41b7 Binary files /dev/null and b/iOS 7 NotificationCenter Widget.xctemplate/Icon@2x.png differ diff --git a/iOS 7 NotificationCenter Widget.xctemplate/Info.plist b/iOS 7 NotificationCenter Widget.xctemplate/Info.plist new file mode 100644 index 0000000..72ab1e9 --- /dev/null +++ b/iOS 7 NotificationCenter Widget.xctemplate/Info.plist @@ -0,0 +1,44 @@ + + + + + CFBundleName + ___PACKAGENAME___ + CFBundleIdentifier + ___VARIABLE_bundleIdentifierPrefix:bundleIdentifier___.___VARIABLE_productName:RFC1034Identifier___ + CFBundleInfoDictionaryVersion + 6.0 + CFBundleVersion + 1 + CFBundleDisplayName + ___PACKAGENAME___ + MinimumOSVersion + 7.0 + CFBundleIconFile + icon.png + CFBundleDevelopmentRegion + English + CFBundleSupportedPlatforms + + iPhoneOS + + CFBundlePackageType + BNDL + CFBundleSignature + ???? + AppBundleID + com.apple.stocks + UIDeviceFamily + + 1 + 2 + + CFBundleShortVersionString + 1.0 + SBUIWidgetViewControllers + + ___VARIABLE_NCCENTERSECTION___ + ___PACKAGENAME___Controller + + + diff --git a/iOS 7 NotificationCenter Widget.xctemplate/InfoPlist.strings b/iOS 7 NotificationCenter Widget.xctemplate/InfoPlist.strings new file mode 100644 index 0000000..90e46b2 --- /dev/null +++ b/iOS 7 NotificationCenter Widget.xctemplate/InfoPlist.strings @@ -0,0 +1 @@ +"___PACKAGENAME____" = "___PACKAGENAME____"; \ No newline at end of file diff --git a/iOS 7 NotificationCenter Widget.xctemplate/TemplateIcon.icns b/iOS 7 NotificationCenter Widget.xctemplate/TemplateIcon.icns new file mode 100644 index 0000000..03e2b29 Binary files /dev/null and b/iOS 7 NotificationCenter Widget.xctemplate/TemplateIcon.icns differ diff --git a/iOS 7 NotificationCenter Widget.xctemplate/TemplateInfo.plist b/iOS 7 NotificationCenter Widget.xctemplate/TemplateInfo.plist new file mode 100644 index 0000000..45fc76e --- /dev/null +++ b/iOS 7 NotificationCenter Widget.xctemplate/TemplateInfo.plist @@ -0,0 +1,199 @@ + + + + + Kind + Xcode.Xcode3.ProjectTemplateUnitKind + Identifier + com.kokoabim.iosopendev.ios7notificationCenterWidget + Concrete + + Description + This template builds a iOS7 Notification Center Widget (WeeApp). + Ancestors + + com.kokoabim.iosopendev.base + com.kokoabim.iosopendev.unitTests + + Targets + + + ProductType + com.apple.product-type.library.dynamic + SharedSettings + + DYLIB_COMPATIBILITY_VERSION + 1 + DYLIB_CURRENT_VERSION + 1 + EXECUTABLE_NAME + ___PACKAGENAMEASIDENTIFIER___ + EXECUTABLE_EXTENSION + + INSTALL_PATH + /System/Library/WeeAppPlugins/___PACKAGENAME___.bundle + GCC_PREFIX_HEADER + ___PACKAGENAME___/___PACKAGENAME___-Prefix.pch + GCC_PRECOMPILE_PREFIX_HEADER + YES + + BuildPhases + + + Class + Sources + + + Class + Frameworks + + + Class + Headers + + + ShellScript + /opt/iOSOpenDev/bin/iosod --xcbp + ShellPath + /bin/sh + RunOnlyForDeploymentPostprocessing + + Class + ShellScript + + + Frameworks + + Foundation + UIKit + CoreGraphics + + Private Frameworks + + SpringBoardUIServices + + + + Nodes + + ___PACKAGENAME___-Prefix.pch:objC:importFoundation + ___PACKAGENAMEASIDENTIFIER___Controller.h + ___PACKAGENAMEASIDENTIFIER___Controller.m + Package/DEBIAN/control:debianControl:section + Package/DEBIAN/control:debianControl:depends + Package/System/Library/WeeAppPlugins/___PACKAGENAME___.bundle/Info.plist + Package/System/Library/WeeAppPlugins/___PACKAGENAME___.bundle/en.lproj/InfoPlist.strings + Package/System/Library/WeeAppPlugins/___PACKAGENAME___.bundle/ar.lproj/InfoPlist.strings + Package/System/Library/WeeAppPlugins/___PACKAGENAME___.bundle/icon.png + Package/System/Library/WeeAppPlugins/___PACKAGENAME___.bundle/icon@2x.png + _SBUIWidgetHost.h + _SBUIWidgetViewController.h + _SBUIWidgetViewController_Remote_IPC.h + + Options + + + Identifier + NCCENTERSECTION + Required + + Name + NCCenterSection + Description + Change NotificationCenter CenterSection + Type + popup + Default + SBUIWidgetIdiomNotificationCenterToday + Values + + SBUIWidgetIdiomNotificationCenterToday + SBUIWidgetIdiomNotificationCenter + + + + Definitions + + Package/System/Library/WeeAppPlugins/___PACKAGENAME___.bundle/Info.plist + + Group + + Package + System + Library + WeeAppPlugins + ___PACKAGENAME___ + + Path + Info.plist + + Package/System/Library/WeeAppPlugins/___PACKAGENAME___.bundle/en.lproj/InfoPlist.strings + + Group + + Package + System + Library + WeeAppPlugins + ___PACKAGENAME___ + en.lproj + + Path + InfoPlist.strings + + Package/System/Library/WeeAppPlugins/___PACKAGENAME___.bundle/ar.lproj/InfoPlist.strings + + Group + + Package + System + Library + WeeAppPlugins + ___PACKAGENAME___ + ar.lproj + + Path + InfoPlist.strings + + Package/System/Library/WeeAppPlugins/___PACKAGENAME___.bundle/icon.png + + Path + icon.png + + Package/System/Library/WeeAppPlugins/___PACKAGENAME___.bundle/icon@2x.png + + Path + icon@2x.png + + _SBUIWidgetViewController.h + + Path + _SBUIWidgetViewController.h + + ___PACKAGENAMEASIDENTIFIER___Controller.m + + Path + ___PACKAGENAMEASIDENTIFIER___Controller.m + + ___PACKAGENAMEASIDENTIFIER___Controller.h + + Path + ___PACKAGENAMEASIDENTIFIER___Controller.h + + _SBUIWidgetHost.h + + Path + _SBUIWidgetHost.h + + _SBUIWidgetViewController_Remote_IPC.h + + Path + _SBUIWidgetViewController_Remote_IPC.h + + *:debianControl:section + Section: Addons (NotificationCenter) + *:debianControl:depends + Depends: firmware (>= 5.0), com.saurik.substrate.safemode, com.chpwn.weeloader + + + diff --git a/iOS 7 NotificationCenter Widget.xctemplate/_SBUIWidgetHost.h b/iOS 7 NotificationCenter Widget.xctemplate/_SBUIWidgetHost.h new file mode 100644 index 0000000..d1e4dc8 --- /dev/null +++ b/iOS 7 NotificationCenter Widget.xctemplate/_SBUIWidgetHost.h @@ -0,0 +1,14 @@ +// +// Generated by class-dump 3.4 (64 bit) (Debug version compiled Oct 5 2013 12:36:13). +// +// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2012 by Steve Nygard. +// + +#import + +@protocol _SBUIWidgetHost +- (void)invalidatePreferredViewSize; +- (void)requestLaunchOfURL:(NSURL *)arg1; +- (void)requestPresentationOfViewController:(NSString *)arg1 presentationStyle:(long long)arg2 context:(NSDictionary *)arg3 completion:(void (^)(void))arg4; +@end + diff --git a/iOS 7 NotificationCenter Widget.xctemplate/_SBUIWidgetViewController.h b/iOS 7 NotificationCenter Widget.xctemplate/_SBUIWidgetViewController.h new file mode 100644 index 0000000..83b1e73 --- /dev/null +++ b/iOS 7 NotificationCenter Widget.xctemplate/_SBUIWidgetViewController.h @@ -0,0 +1,45 @@ +// +// Generated by class-dump 3.4 (64 bit) (Debug version compiled Oct 5 2013 12:36:13). +// +// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2012 by Steve Nygard. +// + +#import + +#import "_SBUIWidgetHost.h" +#import "_SBUIWidgetViewController_Remote_IPC.h" + +@class NSString; + +@interface _SBUIWidgetViewController : UIViewController <_SBUIWidgetHost, _SBUIWidgetViewController_Remote_IPC> +{ + long long _widgetIdiom; + NSString *_widgetidentifier; + id <_SBUIWidgetHost> _widgetHost; + NSString *_widgetIdentifier; +} + ++ (id)_exportedInterface; ++ (id)_remoteViewControllerInterface; +@property(nonatomic, assign) id <_SBUIWidgetHost> widgetHost; // @synthesize widgetHost=_widgetHost; +@property(copy, nonatomic) NSString *widgetIdentifier; // @synthesize widgetIdentifier=_widgetIdentifier; +@property(nonatomic, assign) long long widgetIdiom; // @synthesize widgetIdiom=_widgetIdiom; +- (void)__hostDidDismiss; +- (void)__hostWillDismiss; +- (void)__hostDidPresent; +- (void)__hostWillPresent; +- (void)__setWidgetIdiom:(long long)arg1; +- (void)__setWidgetIdentifier:(id)arg1; +- (void)__requestPreferredViewSizeWithReplyHandler:(id)arg1; +- (void)invalidatePreferredViewSize; +- (void)requestLaunchOfURL:(id)arg1; +- (void)requestPresentationOfViewController:(id)arg1 presentationStyle:(long long)arg2 context:(id)arg3 completion:(id)arg4; +- (void)hostDidDismiss; +- (void)hostWillDismiss; +- (void)hostDidPresent; +- (void)hostWillPresent; +@property(readonly, nonatomic) struct CGSize preferredViewSize; +- (void)dealloc; + +@end + diff --git a/iOS 7 NotificationCenter Widget.xctemplate/_SBUIWidgetViewController_Remote_IPC.h b/iOS 7 NotificationCenter Widget.xctemplate/_SBUIWidgetViewController_Remote_IPC.h new file mode 100644 index 0000000..b8168dd --- /dev/null +++ b/iOS 7 NotificationCenter Widget.xctemplate/_SBUIWidgetViewController_Remote_IPC.h @@ -0,0 +1,18 @@ +// +// Generated by class-dump 3.4 (64 bit) (Debug version compiled Oct 5 2013 12:36:13). +// +// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2012 by Steve Nygard. +// + +#import + +@protocol _SBUIWidgetViewController_Remote_IPC +- (void)__hostDidDismiss; +- (void)__hostWillDismiss; +- (void)__hostDidPresent; +- (void)__hostWillPresent; +- (void)__requestPreferredViewSizeWithReplyHandler:(void (^)(struct CGSize))arg1; +- (void)__setWidgetIdiom:(long long)arg1; +- (void)__setWidgetIdentifier:(NSString *)arg1; +@end + diff --git a/iOS 7 NotificationCenter Widget.xctemplate/___PACKAGENAMEASIDENTIFIER___Controller.h b/iOS 7 NotificationCenter Widget.xctemplate/___PACKAGENAMEASIDENTIFIER___Controller.h new file mode 100644 index 0000000..0e9cc76 --- /dev/null +++ b/iOS 7 NotificationCenter Widget.xctemplate/___PACKAGENAMEASIDENTIFIER___Controller.h @@ -0,0 +1,22 @@ +// +// ___FILENAME___ +// ___PACKAGENAME___ +// +// Created by ___FULLUSERNAME___ on ___DATE___. +// Copyright (c) ___YEAR___ ___ORGANIZATIONNAME___. All rights reserved. +// +// iOS 7 Notification Center Widget Template Code By WillFour20 +// +// iOS 7 Notification Center Widget Template Created By : @iMokhles +// + +#import +#import +#import "_SBUIWidgetViewController.h" + +@interface ___PACKAGENAMEASIDENTIFIER___Controller : _SBUIWidgetViewController +{ + +} + +@end \ No newline at end of file diff --git a/iOS 7 NotificationCenter Widget.xctemplate/___PACKAGENAMEASIDENTIFIER___Controller.m b/iOS 7 NotificationCenter Widget.xctemplate/___PACKAGENAMEASIDENTIFIER___Controller.m new file mode 100644 index 0000000..a592279 --- /dev/null +++ b/iOS 7 NotificationCenter Widget.xctemplate/___PACKAGENAMEASIDENTIFIER___Controller.m @@ -0,0 +1,38 @@ +// +// ___FILENAME___ +// ___PACKAGENAME___ +// +// Created by ___FULLUSERNAME___ on ___DATE___. +// Copyright (c) ___YEAR___ ___ORGANIZATIONNAME___. All rights reserved. +// +// iOS 7 Notification Center Widget Template Code By WillFour20 +// +// iOS 7 Notification Center Widget Template Created By : @iMokhles +// + +#import "___PACKAGENAMEASIDENTIFIER___Controller.h" + +#error iOSOpenDev post-project creation from template requirements (remove these lines after completed) -- \ +- Link to SpringBoardUIServices.framework: \ +- (1) go to TARGETS > Build Phases > Link Binary With Libraries and add SpringBoardUIServices \ +- (2) remove these lines from *.m files + +@implementation ___PACKAGENAMEASIDENTIFIER___Controller + +- (void)viewDidLoad +{ + UILabel *lbl = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 320, 80)]; + lbl.backgroundColor = [UIColor clearColor]; + lbl.textColor = [UIColor whiteColor]; + lbl.text = @"Hello World"; + lbl.textAlignment = NSTextAlignmentCenter; + [self.view addSubview:lbl]; + [lbl release]; +} + +- (CGSize)preferredViewSize +{ + return CGSizeMake(320, 80); +} + +@end \ No newline at end of file