Permalink
Browse files

first commit

  • Loading branch information...
0 parents commit ec987f50e90694a1c9c95b1999ef70908df8fcad Will Homer committed Jun 10, 2011
No changes.
@@ -0,0 +1 @@
+0.0.1-18
@@ -0,0 +1,26 @@
+/*
+ * Generated by class-dump 3.3.3 (64 bit).
+ *
+ * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2010 by Steve Nygard.
+ */
+
+@protocol BBWeeAppController <NSObject>
+- (id)view;
+
+@optional
+- (float)viewHeight;
+- (void)viewWillAppear;
+- (void)viewDidAppear;
+- (void)viewWillDisappear;
+- (void)viewDidDisappear;
+- (void)willRotateToInterfaceOrientation:(int)arg1;
+- (void)willAnimateRotationToInterfaceOrientation:(int)arg1;
+- (void)didRotateFromInterfaceOrientation:(int)arg1;
+- (void)loadPlaceholderView;
+- (void)loadFullView;
+- (void)unloadView;
+- (void)loadView;
+- (id)launchURL;
+- (id)launchURLForTapLocation:(struct CGPoint)arg1;
+@end
+
@@ -0,0 +1,14 @@
+export THEOS_DEVICE_IP=192.168.0.9
+SDKVERSION = 5.0
+include theos/makefiles/common.mk
+
+LIBRARY_NAME = WeeAppTest
+WeeAppTest_FILES = WeeAppTest.mm
+WeeAppTest_INSTALL_PATH = /System/Library/WeeAppPlugins/WeeAppTest.bundle
+WeeAppTest_FRAMEWORKS = UIKit CoreGraphics
+WeeAppTest_PRIVATE_FRAMEWORKS = BulletinBoard
+
+include $(THEOS_MAKE_PATH)/library.mk
+
+after-stage::
+ mv _/System/Library/WeeAppPlugins/WeeAppTest.bundle/WeeAppTest.dylib _/System/Library/WeeAppPlugins/WeeAppTest.bundle/WeeAppTest
16 README
@@ -0,0 +1,16 @@
+Custom Notification Center Widgets (WeeApps) by @WillFour20
+
+This is a very bare example of how to add a custom widget to the iOS 5 notification centre.
+
+All it really does is say 'Hello World' for now.
+
+Its pretty easy to understand, you create a class that implements the BBWeeAppController protocol. The only required function you must have is '- (UIView *)view' in which you must return the view that you want to appear. There are also other methods in the protocol for launching URLs when tapped and for rotation detection, view height, etc.
+
+I don't yet know how to set the name in the Settings.app but it seems that the icon shown is set by setting the app identifier in Info.plist of the app which icon you want. (e.g. to get your custom widget to have the Safari icon set the 'AppBundleID' in Info.plist to 'com.apple.mobilesafari')
+
+Custom bundles are placed in /System/Library/WeeAppPlugins/
+
+This is a pretty shitty example but i'm sure some great stuff can come out of this.
+
+Problems:
+This does not show up correctly in the Settings.app, it appears without a name and a messed up icon.
@@ -0,0 +1,57 @@
+#import <Foundation/Foundation.h>
+#import <UIKit/UIKit.h>
+#import "BBWeeAppController-Protocol.h"
+
+@interface WeeAppTestConroller : NSObject <BBWeeAppController>
+{
+ UIView *_view;
+}
+
++ (void)initialize;
+- (UIView *)view;
+
+@end
+
+@implementation WeeAppTestConroller
+
++ (void)initialize
+{
+
+}
+
+- (void)dealloc
+{
+ [_view release];
+ [super dealloc];
+}
+
+- (UIView *)view
+{
+ if (_view == nil)
+ {
+ _view = [[UIView alloc] initWithFrame:CGRectMake(2, 0, 316, 71)];
+
+ UIImage *bg = [[UIImage imageWithContentsOfFile:@"/System/Library/WeeAppPlugins/WeeAppTest.bundle/WeeAppBackground.png"] stretchableImageWithLeftCapWidth:5 topCapHeight:71];
+ UIImageView *bgView = [[UIImageView alloc] initWithImage:bg];
+ bgView.frame = CGRectMake(0, 0, 316, 71);
+ [_view addSubview:bgView];
+ [bgView release];
+
+ UILabel *lbl = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 316, 71)];
+ lbl.backgroundColor = [UIColor clearColor];
+ lbl.textColor = [UIColor whiteColor];
+ lbl.text = @"Hello World";
+ lbl.textAlignment = UITextAlignmentCenter;
+ [_view addSubview:lbl];
+ [lbl release];
+ }
+
+ return _view;
+}
+
+- (float)viewHeight
+{
+ return 71.0f;
+}
+
+@end
@@ -0,0 +1,9 @@
+Package: com.whomer.WeeAppTest
+Name: WeeAppTest
+Version: 0.0.1
+Architecture: iphoneos-arm
+Description: An awesome tool of some sort!!
+Maintainer: Will Homer
+Author: Will Homer
+Section: System
+Tag: role::hacker
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 theos

0 comments on commit ec987f5

Please sign in to comment.