From ed20ecb40521b6521ae23d1efbc847f389ea7bbf Mon Sep 17 00:00:00 2001 From: Stoyan Stefanov Date: Thu, 15 Dec 2011 04:41:01 -0800 Subject: [PATCH] initial commit --- Classes/Blob.h | 15 + Classes/Blob.m | 52 +++ Classes/Blob.xib | 180 ++++++++++ Classes/CacheMonitor.h | 22 ++ Classes/CacheMonitor.m | 129 +++++++ Classes/CellData.h | 17 + Classes/CellData.m | 30 ++ Classes/Component.h | 30 ++ Classes/Component.m | 136 +++++++ Classes/ComponentDetails.h | 15 + Classes/ComponentDetails.m | 163 +++++++++ Classes/ComponentDetails.xib | 266 ++++++++++++++ Classes/ComponentList.xib | 241 +++++++++++++ Classes/ComponentsList.h | 15 + Classes/ComponentsList.m | 102 ++++++ Classes/Image.h | 12 + Classes/Image.m | 49 +++ Classes/Image.xib | 166 +++++++++ Classes/WebBrowser.h | 17 + Classes/WebBrowser.m | 155 ++++++++ Classes/icyAppDelegate.h | 14 + Classes/icyAppDelegate.m | 39 ++ MainWindow.xib | 198 ++++++++++ icons/icon-css.png | Bin 0 -> 1057 bytes icons/icon-html.png | Bin 0 -> 979 bytes icons/icon-js.png | Bin 0 -> 859 bytes icons/icon-whatever.png | Bin 0 -> 378 bytes icy-Info.plist | 30 ++ icy.xcodeproj/project.pbxproj | 339 ++++++++++++++++++ .../contents.xcworkspacedata | 7 + icy_Prefix.pch | 8 + main.m | 17 + 32 files changed, 2464 insertions(+) create mode 100644 Classes/Blob.h create mode 100644 Classes/Blob.m create mode 100644 Classes/Blob.xib create mode 100644 Classes/CacheMonitor.h create mode 100644 Classes/CacheMonitor.m create mode 100644 Classes/CellData.h create mode 100644 Classes/CellData.m create mode 100644 Classes/Component.h create mode 100644 Classes/Component.m create mode 100644 Classes/ComponentDetails.h create mode 100644 Classes/ComponentDetails.m create mode 100644 Classes/ComponentDetails.xib create mode 100644 Classes/ComponentList.xib create mode 100644 Classes/ComponentsList.h create mode 100644 Classes/ComponentsList.m create mode 100644 Classes/Image.h create mode 100644 Classes/Image.m create mode 100644 Classes/Image.xib create mode 100644 Classes/WebBrowser.h create mode 100644 Classes/WebBrowser.m create mode 100644 Classes/icyAppDelegate.h create mode 100644 Classes/icyAppDelegate.m create mode 100644 MainWindow.xib create mode 100644 icons/icon-css.png create mode 100644 icons/icon-html.png create mode 100644 icons/icon-js.png create mode 100644 icons/icon-whatever.png create mode 100644 icy-Info.plist create mode 100755 icy.xcodeproj/project.pbxproj create mode 100644 icy.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 icy_Prefix.pch create mode 100644 main.m diff --git a/Classes/Blob.h b/Classes/Blob.h new file mode 100644 index 0000000..7840f40 --- /dev/null +++ b/Classes/Blob.h @@ -0,0 +1,15 @@ +// +// Blob.h +// + +#import + +@interface Blob : UIViewController + +@property (nonatomic, retain) IBOutlet UITextView *blob; +@property (nonatomic, retain) NSString *key; +@property (nonatomic, retain) NSString *value; + + + +@end diff --git a/Classes/Blob.m b/Classes/Blob.m new file mode 100644 index 0000000..8efb7ec --- /dev/null +++ b/Classes/Blob.m @@ -0,0 +1,52 @@ +// +// Blob.m +// + +#import "Blob.h" + +@implementation Blob + +@synthesize blob, key, value; + +- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil +{ + self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; + if (self) { + // Custom initialization + } + return self; +} + +- (void)didReceiveMemoryWarning +{ + // Releases the view if it doesn't have a superview. + [super didReceiveMemoryWarning]; + + // Release any cached data, images, etc that aren't in use. +} + +#pragma mark - View lifecycle + +- (void)viewDidLoad +{ + [super viewDidLoad]; + blob.text = value; + self.title = key; + + +} + +- (void)viewDidUnload +{ + [super viewDidUnload]; + // Release any retained subviews of the main view. + // e.g. self.myOutlet = nil; +} + +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation +{ + // Return YES for supported orientations + return (interfaceOrientation == UIInterfaceOrientationPortrait); +} + +@end diff --git a/Classes/Blob.xib b/Classes/Blob.xib new file mode 100644 index 0000000..997e52e --- /dev/null +++ b/Classes/Blob.xib @@ -0,0 +1,180 @@ + + + + 1280 + 10K549 + 1938 + 1038.36 + 461.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 933 + + + IBProxyObject + IBUIView + IBUITextView + + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + PluginDependencyRecalculationVersion + + + + + IBFilesOwner + IBCocoaTouchFramework + + + IBFirstResponder + IBCocoaTouchFramework + + + + 274 + + + + 274 + {320, 460} + + + + + 1 + MSAxIDEAA + + YES + YES + IBCocoaTouchFramework + NO + a + + 1 + IBCocoaTouchFramework + + + 1 + 14 + + + Helvetica + 14 + 16 + + + + {{0, 20}, {320, 460}} + + + + + 3 + MQA + + 2 + + + + IBCocoaTouchFramework + + + + + + + view + + + + 3 + + + + blob + + + + 7 + + + + + + 0 + + + + + + 1 + + + + + + + + -1 + + + File's Owner + + + -2 + + + + + 6 + + + + + + + Blob + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + UIResponder + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + + + 7 + + + + + Blob + UIViewController + + blob + UITextView + + + blob + + blob + UITextView + + + + IBProjectSource + ./Classes/Blob.h + + + + + 0 + IBCocoaTouchFramework + YES + 3 + 933 + + diff --git a/Classes/CacheMonitor.h b/Classes/CacheMonitor.h new file mode 100644 index 0000000..3653608 --- /dev/null +++ b/Classes/CacheMonitor.h @@ -0,0 +1,22 @@ +// +// CacheMonitor.h +// + +#import + + +@interface CacheMonitor : NSURLCache {} + +@property (nonatomic, retain) NSMutableArray *components; +@property (nonatomic, retain) NSMutableArray *urls; + +@property (nonatomic, retain) NSMutableArray *requests; +@property (nonatomic, retain) NSMutableArray *responses; +@property (nonatomic, retain) NSMutableArray *endtimes; + ++ (CacheMonitor *)getCache; + +- (void) populate; +- (void) clearLog; + +@end diff --git a/Classes/CacheMonitor.m b/Classes/CacheMonitor.m new file mode 100644 index 0000000..5e8caf3 --- /dev/null +++ b/Classes/CacheMonitor.m @@ -0,0 +1,129 @@ +// +// CacheMonitor.m +// + +#import "CacheMonitor.h" +#import "Component.h" + + +@implementation CacheMonitor + +@synthesize requests, responses, endtimes, components, urls; + ++ (CacheMonitor *)getCache +{ + static CacheMonitor *cache = nil; + + if (!cache) { + // setup cache + NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); + cache = [[CacheMonitor alloc] initWithMemoryCapacity: 512*1024 + diskCapacity: 10*1024*1024 + diskPath: [[paths objectAtIndex:0] stringByAppendingPathComponent:@"URLCache"]]; + [NSURLCache setSharedURLCache:cache]; + } + + return cache; +} + + +- (NSCachedURLResponse*)cachedResponseForRequest:(NSURLRequest*)request +{ + // lazy init + if (!requests) { + components = [[NSMutableArray alloc] init]; + } + + NSString *url = request.URL.absoluteString; + + if (![url hasPrefix:@"data"]) { + + NSLog(@"[Q] %@", url); + + Component *c = [[Component alloc] init]; + c.request = request; + c.start = [NSDate date]; + [components addObject:c]; + + } + + return [super cachedResponseForRequest:request]; +} + +- (void)storeCachedResponse:(NSCachedURLResponse *)response forRequest:(NSURLRequest *)request { + + // lazy init + if (!requests) { + requests = [[NSMutableArray alloc] init]; + responses = [[NSMutableArray alloc] init]; + endtimes = [[NSMutableArray alloc] init]; + urls = [[NSMutableArray alloc] init]; + + } + + NSString *url = request.URL.absoluteString; + + if (![url hasPrefix:@"data"]) { + [requests addObject:request]; + [responses addObject:response]; + [endtimes addObject:[NSDate date]]; + [urls addObject:url]; + + + + NSLog(@"[A] %@", url); + + } + + [super storeCachedResponse:response forRequest:request]; + +} + + +- (void) populate { + for (int i = 0; i < [components count]; i++) { + Component *c = [components objectAtIndex:i]; + + if (c.response) { + continue; + } + int index = [requests indexOfObject:c.request]; + + // sometimes (redirect) the two request objects don't match + // so we'll try to match them by url + if (index == NSNotFound) { + index = [urls indexOfObject:c.request.URL.absoluteString]; + } + if (index == NSNotFound) { + continue; // give up + } + + c.response = [responses objectAtIndex:index]; + c.end = [endtimes objectAtIndex:index]; + c.duration = [c.end timeIntervalSinceDate:c.start]; + } +} + +- (void) clearLog { + [requests removeAllObjects]; + [responses removeAllObjects]; + [endtimes removeAllObjects]; + [components removeAllObjects]; + [urls removeAllObjects]; + + + [[NSURLCache sharedURLCache] removeAllCachedResponses]; + +} + +- (void)dealloc +{ + [requests release]; + [responses release]; + [endtimes release]; + [components release]; + [urls release]; + [super dealloc]; +} + +@end diff --git a/Classes/CellData.h b/Classes/CellData.h new file mode 100644 index 0000000..c794ae3 --- /dev/null +++ b/Classes/CellData.h @@ -0,0 +1,17 @@ +// +// CellData.h +// + +#import + +@interface CellData : NSObject{} + +@property (nonatomic, retain) NSString *text; +@property (nonatomic, retain) NSString *description; +@property (nonatomic, retain) UIImage *image; + ++(CellData *) initWithText:(NSString *)text; ++(CellData *) initWithText:(NSString *)text description:(NSString *)description; ++(CellData *) initWithImage:(UIImage *)image; + +@end diff --git a/Classes/CellData.m b/Classes/CellData.m new file mode 100644 index 0000000..f142fd0 --- /dev/null +++ b/Classes/CellData.m @@ -0,0 +1,30 @@ +// +// CellData.m +// + +#import "CellData.h" + +@implementation CellData + +@synthesize text, description, image; + ++(CellData *) initWithText:(NSString *)text { + CellData *cell = [[self alloc] init]; + cell.text = text; + return cell; +} + ++(CellData *) initWithText:(NSString *)text description:(NSString *)description { + CellData *cell = [[self alloc] init]; + cell.text = text; + cell.description = description; + return cell; +} + ++(CellData *) initWithImage:(UIImage *)image { + CellData *cell = [[self alloc] init]; + cell.image = image; + return cell; +} + +@end diff --git a/Classes/Component.h b/Classes/Component.h new file mode 100644 index 0000000..777e41a --- /dev/null +++ b/Classes/Component.h @@ -0,0 +1,30 @@ +// +// Component.h +// + +#import + + +@interface Component : NSObject { + +} +@property (nonatomic, retain) NSURLRequest *request; +@property (nonatomic, retain) NSCachedURLResponse *response; +@property (nonatomic) NSTimeInterval duration; +@property (nonatomic, retain) NSDate *start; +@property (nonatomic, retain) NSDate *end; + +@property (nonatomic, retain) NSString *responseBody; +@property (nonatomic, retain) NSString *requestBody; +@property (nonatomic, retain) NSString *requestMethod; +@property (nonatomic, retain) NSDictionary *responseHeaders; +@property (nonatomic, retain) NSDictionary *requestHeaders; + +@property (nonatomic, retain) NSMutableArray *sectionTitles; +@property (nonatomic, retain) NSMutableArray *data; + +- (NSString *) getType; +- (void) remodel; + + +@end diff --git a/Classes/Component.m b/Classes/Component.m new file mode 100644 index 0000000..c918e52 --- /dev/null +++ b/Classes/Component.m @@ -0,0 +1,136 @@ +// +// Component.m +// + +#import "Component.h" +#import "CellData.h" + +@implementation Component + +@synthesize request, response, start, end, duration; +@synthesize requestHeaders, responseHeaders, requestBody, responseBody, requestMethod; +@synthesize sectionTitles, data; + +- (NSString *) getType { + NSString *mime = response.response.MIMEType; + + if ([mime hasPrefix:@"image/"]) { + return @"image"; + } + if ([mime hasSuffix:@"css"]) { + return @"css"; + } + if ([mime hasSuffix:@"javascript"]) { + return @"js"; + } + if ([mime hasSuffix:@"html"]) { + return @"html"; + } + return @"whatever"; + +} + +- (NSDictionary *) getResponseHeaders { + return [(NSHTTPURLResponse *)response.response allHeaderFields]; +} + +- (NSString *) getResponseBody { + return [NSString stringWithUTF8String:[response.data bytes]]; +} + +- (NSDictionary *) getRequestHeaders { + return [request allHTTPHeaderFields]; +} + +- (NSString *) getRequestBody { + return [NSString stringWithUTF8String:[request.HTTPBody bytes]]; +} + +- (NSString *) getRequestMethod { + return request.HTTPMethod; +} + +- (void) remodel +{ + sectionTitles = [[NSMutableArray arrayWithObjects: @"Meta", @"Request headers", nil] retain]; + data = [[[NSMutableArray alloc] init] retain]; + + NSMutableArray *section = [[NSMutableArray alloc] init]; + + // Meta + [section addObject:[CellData initWithText:@"URL" description:request.URL.absoluteString]]; + [section addObject:[CellData initWithText:@"Method" description:request.HTTPMethod]]; + + if (response) { + [section addObject:[CellData initWithText:@"Status code" + description:[[NSNumber numberWithInt:[(NSHTTPURLResponse *)response.response statusCode]] stringValue] + ] + ]; + [section addObject:[CellData initWithText:@"Status description" + description:[NSHTTPURLResponse localizedStringForStatusCode:[(NSHTTPURLResponse *)response.response statusCode]] + ] + ]; + [section addObject:[CellData initWithText:@"Duration" + description:[NSString stringWithFormat: @"%f", duration] + ] + ]; + } + + [data addObject:section]; + + // Request headers + section = [[NSMutableArray alloc] init]; + NSDictionary *headers = request.allHTTPHeaderFields; + NSEnumerator *enumerator = [headers keyEnumerator]; + id key; + + while ((key = [enumerator nextObject])) { + [section addObject:[CellData initWithText:key description:[headers objectForKey:key]]]; + } + [data addObject:section]; + + + + + if (self.requestBody) { + [sectionTitles addObject:@"Request body"]; + + section = [[NSMutableArray alloc] init]; + [section addObject:[CellData initWithText:[NSString stringWithUTF8String:[request.HTTPBody bytes]]]]; + [data addObject:section]; + + } + + if (response) { + [sectionTitles addObject:@"Response headers"]; + [sectionTitles addObject:@"Response body"]; + + // Response headers + section = [[NSMutableArray alloc] init]; + headers = [(NSHTTPURLResponse *)response.response allHeaderFields]; + enumerator = [headers keyEnumerator]; + + while ((key = [enumerator nextObject])) { + [section addObject:[CellData initWithText:key description:[headers objectForKey:key]]]; + } + [data addObject:section]; + + // Response body + section = [[NSMutableArray alloc] init]; + if ([self getType] == @"image") { + [section addObject:[CellData initWithImage:[UIImage imageWithData:response.data]]]; + } else { + NSString *text = [NSString stringWithUTF8String:[response.data bytes]]; + [section addObject:[CellData initWithText:text]]; + } + [data addObject:section]; + + + + } + + // TODO: cookies + +} + +@end diff --git a/Classes/ComponentDetails.h b/Classes/ComponentDetails.h new file mode 100644 index 0000000..8add4c1 --- /dev/null +++ b/Classes/ComponentDetails.h @@ -0,0 +1,15 @@ +// +// ComponentDetails.h +// + +#import +#import "Component.h" + + +@interface ComponentDetails : UITableViewController {} + +@property (nonatomic, retain) Component *component; + +- (void) replay: (UIButton *)sender; + +@end diff --git a/Classes/ComponentDetails.m b/Classes/ComponentDetails.m new file mode 100644 index 0000000..58cda57 --- /dev/null +++ b/Classes/ComponentDetails.m @@ -0,0 +1,163 @@ +// +// ComponentDetails.m +// + +#import "ComponentDetails.h" +#import "Component.h" +#import "Blob.h" +#import "CellData.h" +#import "Image.h" + +@implementation ComponentDetails + +@synthesize component; + +#pragma mark - +#pragma mark View lifecycle + +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath +{ + CellData *cd = [[component.data objectAtIndex:indexPath.section] objectAtIndex:indexPath.row]; + + + if (cd.image) { + Image *i = [[Image alloc] initWithNibName:@"Image" bundle:nil]; + i.image = cd.image; + [self.navigationController pushViewController:i animated:YES]; + [i release]; + return; + } + + Blob *b = [[Blob alloc] initWithNibName:@"Blob" bundle:nil]; + + if (cd.description) { + b.key = cd.text; + b.value = cd.description; + } else { + b.key = @"Body"; + b.value = cd.text; + + } + [self.navigationController pushViewController:b animated:YES]; + [b release]; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + self.title = @"Details"; +} + + +- (void) replay: (UIButton *)sender { + NSLog(@"ouch"); +} + + +- (void)viewWillAppear:(BOOL)animated { + [super viewWillAppear:animated]; + + if (component.response) { + return; + } + + // toolbar + UIBarButtonItem *spaceItem = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil] autorelease]; + UIBarButtonItem *replay = [[[UIBarButtonItem alloc] initWithTitle:@"Refetch" style:UIBarButtonItemStyleBordered target:self action:@selector(replay:)] autorelease]; + self.toolbarItems = [NSArray arrayWithObjects: spaceItem, replay, nil]; + + [self.navigationController setToolbarHidden:NO animated:YES]; + +} + +/* +- (void)viewDidAppear:(BOOL)animated { + [super viewDidAppear:animated]; +} +*/ + +- (void)viewWillDisappear:(BOOL)animated { + [super viewWillDisappear:animated]; + [self.navigationController setToolbarHidden:YES animated:YES]; +} + +/* +- (void)viewDidDisappear:(BOOL)animated { + [super viewDidDisappear:animated]; +} +*/ +/* +// Override to allow orientations other than the default portrait orientation. +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + // Return YES for supported orientations. + return (interfaceOrientation == UIInterfaceOrientationPortrait); +} +*/ + + +#pragma mark - +#pragma mark Table view data source + +- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { + NSArray *secs = component.sectionTitles; + return [secs objectAtIndex:section]; +} + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { + return [component.sectionTitles count]; +} + + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + return [[component.data objectAtIndex:section] count]; +} + + +// Customize the appearance of table view cells. +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + + + CellData *cd = [[component.data objectAtIndex:indexPath.section] objectAtIndex:indexPath.row]; + UITableViewCell *cell; + + + if (cd.description) { + cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"withdesc"] autorelease]; + + cell.textLabel.text = cd.text; + cell.detailTextLabel.text = cd.description; + return cell; + } + + cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"default"] autorelease]; + if (cd.image) { + cell.imageView.image = cd.image; + } else { + cell.textLabel.text = cd.text; + } + + return cell; +} + +#pragma mark - +#pragma mark Memory management + +- (void)didReceiveMemoryWarning { + // Releases the view if it doesn't have a superview. + [super didReceiveMemoryWarning]; + + // Relinquish ownership any cached data, images, etc. that aren't in use. +} + +- (void)viewDidUnload { + // Relinquish ownership of anything that can be recreated in viewDidLoad or on demand. + // For example: self.myOutlet = nil; +} + + +- (void)dealloc { + [super dealloc]; +} + + +@end + diff --git a/Classes/ComponentDetails.xib b/Classes/ComponentDetails.xib new file mode 100644 index 0000000..c268b41 --- /dev/null +++ b/Classes/ComponentDetails.xib @@ -0,0 +1,266 @@ + + + + 1280 + 10K549 + 1938 + 1038.36 + 461.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 933 + + + YES + IBProxyObject + IBUIView + IBUITableView + + + YES + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + IBFilesOwner + IBCocoaTouchFramework + + + IBFirstResponder + IBCocoaTouchFramework + + + + 292 + + YES + + + 274 + {320, 460} + + + + + 10 + + 549453824 + {512, 1} + + YES + + YES + + + + TU0AKgAACAjFzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/ +y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/ +xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/ +xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/ +xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/ +xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/ +xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/ +y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/ +y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/ +xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/ +xczU/8XM1P/Fz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wAAAAEAAQAAAVIAAwAAAAEAAQAAAVMAAwAAAAQAAAiyAAAAAAAI +AAgACAAIAAEAAQABAAE + + + + + + 3 + MCAwAA + + + groupTableViewBackgroundColor + + YES + IBCocoaTouchFramework + YES + 1 + 1 + 0 + 44 + 10 + 10 + + + {320, 460} + + + + + 3 + MQA + + 2 + + + IBCocoaTouchFramework + + + + + YES + + + view + + + + 18 + + + + dataSource + + + + 16 + + + + delegate + + + + 17 + + + + + YES + + 0 + + YES + + + + + + -1 + + + File's Owner + + + -2 + + + + + 14 + + + YES + + + + + + 15 + + + YES + + + + + + + YES + + YES + -1.CustomClassName + -1.IBPluginDependency + -2.CustomClassName + -2.IBPluginDependency + 14.IBPluginDependency + 15.IBPluginDependency + + + YES + ComponentDetails + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + UIResponder + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + YES + + + + + + YES + + + + + 20 + + + + YES + + ComponentDetails + UITableViewController + + IBProjectSource + ./Classes/ComponentDetails.h + + + + + 0 + IBCocoaTouchFramework + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 + + + YES + 3 + 933 + + diff --git a/Classes/ComponentList.xib b/Classes/ComponentList.xib new file mode 100644 index 0000000..7dcaa9b --- /dev/null +++ b/Classes/ComponentList.xib @@ -0,0 +1,241 @@ + + + + 1280 + 10K549 + 1938 + 1038.36 + 461.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 933 + + + YES + IBProxyObject + IBUIView + IBUITableView + + + YES + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + IBFilesOwner + IBCocoaTouchFramework + + + IBFirstResponder + IBCocoaTouchFramework + + + + 292 + + YES + + + 274 + {320, 460} + + + + 10 + + 549453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M1P/FzNT/ +xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/ +xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/ +y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/ +y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/ +xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/ +xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/ +xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/ +xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/ +xczS/8vS2P/L0tj/xczU/wANAQAAAwAAAAECAAAAAQEAAwAAAAEAAQAAAQIAAwAAAAQAAAiqAQMAAwAA +AAEAAQAAAQYAAwAAAAEAAgAAAREABAAAAAEAAAAIARIAAwAAAAEAAQAAARUAAwAAAAEABAAAARYAAwAA +AAEAAQAAARcABAAAAAEAAAgAARwAAwAAAAEAAQAAAVIAAwAAAAEAAQAAAVMAAwAAAAQAAAiyAAAAAAAI +AAgACAAIAAEAAQABAAE + + + + + + 3 + MCAwAA + + + groupTableViewBackgroundColor + + YES + IBCocoaTouchFramework + YES + 1 + 1 + 0 + 44 + 10 + 10 + + + {320, 460} + + + + 3 + MQA + + 2 + + + IBCocoaTouchFramework + + + + + YES + + + dataSource + + + + 16 + + + + delegate + + + + 17 + + + + + YES + + 0 + + YES + + + + + + -1 + + + File's Owner + + + -2 + + + + + 14 + + + YES + + + + + + 15 + + + + + + + YES + + YES + -1.CustomClassName + -1.IBPluginDependency + -2.CustomClassName + -2.IBPluginDependency + 14.IBPluginDependency + 15.IBPluginDependency + + + YES + ComponentList + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + UIResponder + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + YES + + + + + + YES + + + + + 20 + + + 0 + IBCocoaTouchFramework + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 + + + YES + 3 + 933 + + diff --git a/Classes/ComponentsList.h b/Classes/ComponentsList.h new file mode 100644 index 0000000..d3eb6b2 --- /dev/null +++ b/Classes/ComponentsList.h @@ -0,0 +1,15 @@ +// +// ComponentsList.h +// + +#import +#import "CacheMonitor.h" + +@interface ComponentsList : UITableViewController { + IBOutlet UITableView *table; +} + +@property (nonatomic, retain) IBOutlet UITableView *table; + + +@end diff --git a/Classes/ComponentsList.m b/Classes/ComponentsList.m new file mode 100644 index 0000000..9518cd3 --- /dev/null +++ b/Classes/ComponentsList.m @@ -0,0 +1,102 @@ +// +// ComponentsList.m +// + +#import "ComponentsList.h" +#import "ComponentDetails.h" +#import "Component.h" + + +@implementation ComponentsList + +@synthesize table; + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section +{ + CacheMonitor *cache = [CacheMonitor getCache]; + return cache.components.count; +} + + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + static NSString *kCustomCellID = @"componentcell"; + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:kCustomCellID]; + if (cell == nil) + { + cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:kCustomCellID] autorelease]; + } + + CacheMonitor *cache = [CacheMonitor getCache]; + Component *comp = [cache.components objectAtIndex:indexPath.row]; + NSString* url = comp.request.URL.absoluteString; + NSString* title = comp.request.URL.lastPathComponent; + + if ([title isEqualToString:@"/"]) { + title = comp.request.URL.host; + } + cell.textLabel.text = title; + cell.detailTextLabel.text = url; + cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; + + NSString *type = [comp getType]; + if (type != @"image") { + NSString *img = [@"icon-" stringByAppendingString:type]; + cell.imageView.image = [UIImage imageNamed:img]; + } else { + cell.imageView.image = [UIImage imageWithData:comp.response.data]; + } + + + return cell; +} + +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath +{ + ComponentDetails *dits = [[ComponentDetails alloc] initWithNibName:@"ComponentDetails" bundle:nil]; + CacheMonitor *cache = [CacheMonitor getCache]; + dits.component = [cache.components objectAtIndex:indexPath.row]; + [dits.component remodel]; + [self.navigationController pushViewController:dits animated:YES]; + [dits release]; +} + + +- (void)viewDidLoad +{ + [super viewDidLoad]; + CacheMonitor *cache = [CacheMonitor getCache]; + self.title = [@"Components: " stringByAppendingString:[NSString stringWithFormat:@"%lu", [cache.components count]]]; +} + + +/* +// Override to allow orientations other than the default portrait orientation. +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + // Return YES for supported orientations. + return (interfaceOrientation == UIInterfaceOrientationPortrait); +} +*/ + +- (void)didReceiveMemoryWarning { + // Releases the view if it doesn't have a superview. + [super didReceiveMemoryWarning]; + + // Release any cached data, images, etc. that aren't in use. +} + +- (void)viewDidUnload { + [super viewDidUnload]; + // Release any retained subviews of the main view. + // e.g. self.myOutlet = nil; +} + + +- (void)dealloc { + [super dealloc]; + [table release]; +} + + +@end diff --git a/Classes/Image.h b/Classes/Image.h new file mode 100644 index 0000000..cdbe371 --- /dev/null +++ b/Classes/Image.h @@ -0,0 +1,12 @@ +// +// Image.h +// + +#import + +@interface Image : UIViewController +@property (nonatomic, retain) IBOutlet UIImageView *imageview; +@property (nonatomic, retain) UIImage *image; + + +@end diff --git a/Classes/Image.m b/Classes/Image.m new file mode 100644 index 0000000..38c92fa --- /dev/null +++ b/Classes/Image.m @@ -0,0 +1,49 @@ +// +// Image.m +// + +#import "Image.h" + +@implementation Image +@synthesize image, imageview; + +- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil +{ + self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; + if (self) { + // Custom initialization + } + return self; +} + +- (void)didReceiveMemoryWarning +{ + // Releases the view if it doesn't have a superview. + [super didReceiveMemoryWarning]; + + // Release any cached data, images, etc that aren't in use. +} + +#pragma mark - View lifecycle + +- (void)viewDidLoad +{ + [super viewDidLoad]; + imageview.image = self.image; + self.title = [NSString stringWithFormat:@"%d x %d", (int)image.size.width, (int)image.size.height]; +} + +- (void)viewDidUnload +{ + [super viewDidUnload]; + // Release any retained subviews of the main view. + // e.g. self.myOutlet = nil; +} + +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation +{ + // Return YES for supported orientations + return (interfaceOrientation == UIInterfaceOrientationPortrait); +} + +@end diff --git a/Classes/Image.xib b/Classes/Image.xib new file mode 100644 index 0000000..c129e62 --- /dev/null +++ b/Classes/Image.xib @@ -0,0 +1,166 @@ + + + + 1280 + 10K549 + 1938 + 1038.36 + 461.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 933 + + + IBProxyObject + IBUIView + IBUIImageView + + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + PluginDependencyRecalculationVersion + + + + + IBFilesOwner + IBCocoaTouchFramework + + + IBFirstResponder + IBCocoaTouchFramework + + + + 274 + + + + 274 + {320, 460} + + + + 3 + MAA + + 4 + YES + IBCocoaTouchFramework + + + {{0, 20}, {320, 460}} + + + + 3 + MQA + + 2 + + + + IBCocoaTouchFramework + + + + + + + view + + + + 3 + + + + imageview + + + + 6 + + + + + + 0 + + + + + + 1 + + + + + + + + -1 + + + File's Owner + + + -2 + + + + + 4 + + + + + + + Image + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + UIResponder + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + + + 6 + + + + + Image + UIViewController + + UIImage + UIImageView + + + + image + UIImage + + + imageview + UIImageView + + + + IBProjectSource + ./Classes/Image.h + + + + + 0 + IBCocoaTouchFramework + YES + 3 + 933 + + diff --git a/Classes/WebBrowser.h b/Classes/WebBrowser.h new file mode 100644 index 0000000..71c014b --- /dev/null +++ b/Classes/WebBrowser.h @@ -0,0 +1,17 @@ +// +// WebBrowser.h +// + +#import +#import "CacheMonitor.h" + +@interface WebBrowser : UIViewController {} + +@property (nonatomic, retain) UIWebView *webView; + +- (void)loadPage:(id)withUrl; +- (void)showComponents:(id)sender; +- (void)showComponents; +- (void)clearLog: (id)sender; + +@end diff --git a/Classes/WebBrowser.m b/Classes/WebBrowser.m new file mode 100644 index 0000000..7ea30c9 --- /dev/null +++ b/Classes/WebBrowser.m @@ -0,0 +1,155 @@ +// +// WebBrowser.m +// + +#import "WebBrowser.h" +#import "ComponentsList.h" +#import "icyAppDelegate.h" + +static bool clearinglog = false; + +@implementation WebBrowser + +@synthesize webView; + + +- (void)loadPage:(id)withUrl { + NSString *userURL = (NSString *)withUrl; + NSURL *url = [NSURL URLWithString:userURL]; + if (!url.scheme) { + NSString *myURL = [@"http://" stringByAppendingString:userURL]; + [url initWithString:myURL]; + } + NSURLRequest *requestObj = [NSURLRequest requestWithURL:url]; + [webView loadRequest:requestObj]; + +} + +// Implement viewDidLoad to do additional setup after loading the view, typically from a nib. +- (void)viewDidLoad { + [super viewDidLoad]; + + // address bar business + CGRect frame = CGRectMake(5, 7, 310, 31); + UITextField *urlField = [[UITextField alloc] initWithFrame:frame]; + urlField.borderStyle = UITextBorderStyleRoundedRect; + urlField.delegate = self; + urlField.placeholder = @"http://"; + urlField.autoresizingMask = UIViewAutoresizingFlexibleWidth; + urlField.returnKeyType = UIReturnKeyGo; + urlField.keyboardType = UIKeyboardTypeURL; // this makes the keyboard more friendly for typing URLs + urlField.autocapitalizationType = UITextAutocapitalizationTypeNone; // don't capitalize + urlField.autocorrectionType = UITextAutocorrectionTypeNo; // we don't like autocompletion while typing + urlField.clearButtonMode = UITextFieldViewModeAlways; + urlField.adjustsFontSizeToFitWidth = YES; + urlField.minimumFontSize = 17.0; + self.navigationItem.titleView = urlField; + + // toolbar + UIBarButtonItem *spaceItem = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil] autorelease]; + UIBarButtonItem *clearLog = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemTrash target:self action:@selector(clearLog:)] autorelease]; + UIBarButtonItem *spaceItem2 = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil] autorelease]; + spaceItem2.width = 30.0; + UIBarButtonItem *curlPage = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAction target:self action:@selector(showComponents:)] autorelease]; + self.toolbarItems = [NSArray arrayWithObjects: spaceItem, clearLog, spaceItem2, curlPage, nil]; + + [self.navigationController setToolbarHidden:NO animated:YES]; + + // for the back button on the next view + self.title = @"Browser"; + +} + +- (void)viewWillAppear:(BOOL)animated { + [self.navigationController setToolbarHidden:NO animated:YES]; + if (!self.webView) { + CGRect frame = [[UIScreen mainScreen] bounds]; + frame.size.height -= 108; + self.webView = [[[UIWebView alloc]initWithFrame:frame] autorelease]; + self.webView.scalesPageToFit = YES; + self.webView.delegate = self; + [self.view addSubview:self.webView]; + } + +} + +- (void) viewDidDisappear:(BOOL)animated { + [super viewDidDisappear:animated]; + [self.navigationController setToolbarHidden:YES animated:YES]; + + if (clearinglog) { + self.webView.delegate = nil; + [self.webView removeFromSuperview]; + self.webView = nil; + + } + clearinglog = false; +} + + +- (BOOL)textFieldShouldReturn:(UITextField *)txt { + [txt resignFirstResponder]; + [self loadPage:txt.text]; + return YES; +} + +- (void) clearLog: (UIButton *)sender { + + [[CacheMonitor getCache] clearLog]; + clearinglog = true; + [self showComponents]; + + +} + +- (void)showComponents { + ComponentsList *comps = [[ComponentsList alloc] init]; + + [[CacheMonitor getCache] populate]; + //comps.components = cache.components; + [self.navigationController pushViewController:comps animated:YES]; + [comps release]; +} + +- (void)showComponents:(id)sender { + [self showComponents]; +} + + +/* +// Override to allow orientations other than the default portrait orientation. +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + // Return YES for supported orientations. + //return (interfaceOrientation == UIInterfaceOrientationPortrait); +} +*/ + +- (void)didReceiveMemoryWarning { + // Releases the view if it doesn't have a superview. + [super didReceiveMemoryWarning]; + + // Release any cached data, images, etc. that aren't in use. +} + +- (void)viewDidUnload { + NSLog(@"did unload"); + [super viewDidUnload]; + // Release any retained subviews of the main view. + // e.g. self.myOutlet = nil; +} + + +- (void)webViewDidFinishLoad:(UIWebView *)wv { + NSLog(@"finish load"); + //[wv stringByEvaluatingJavaScriptFromString:@"alert(document.title)"]; + + +} + +- (void)dealloc { + NSLog(@"dalloc"); + [super dealloc]; +} + + +@end diff --git a/Classes/icyAppDelegate.h b/Classes/icyAppDelegate.h new file mode 100644 index 0000000..d0ef3f0 --- /dev/null +++ b/Classes/icyAppDelegate.h @@ -0,0 +1,14 @@ +// +// icyAppDelegate.h +// + +#import + +@interface icyAppDelegate : NSObject { + UIWindow *window; +} + +@property (nonatomic, retain) IBOutlet UIWindow *window; + +@end + diff --git a/Classes/icyAppDelegate.m b/Classes/icyAppDelegate.m new file mode 100644 index 0000000..b299f08 --- /dev/null +++ b/Classes/icyAppDelegate.m @@ -0,0 +1,39 @@ +// +// icyAppDelegate.m +// + +#import "icyAppDelegate.h" +#import "WebBrowser.h" +#import "CacheMonitor.h" + +@implementation icyAppDelegate +@synthesize window; + + +#pragma mark - +#pragma mark Application lifecycle + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + + [CacheMonitor getCache]; + + UINavigationController *nav = [[UINavigationController alloc] init]; + WebBrowser *uiweb = [[WebBrowser alloc] init]; + [nav pushViewController:uiweb animated:NO]; + [uiweb release]; + [window addSubview:nav.view]; + [self.window makeKeyAndVisible]; + return YES; +} + + +#pragma mark - +#pragma mark Memory management + +- (void)dealloc { + [window release]; + [super dealloc]; +} + + +@end diff --git a/MainWindow.xib b/MainWindow.xib new file mode 100644 index 0000000..fb46231 --- /dev/null +++ b/MainWindow.xib @@ -0,0 +1,198 @@ + + + + 800 + 10D540 + 760 + 1038.29 + 460.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 81 + + + YES + + + + YES + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + YES + + YES + + + YES + + + + YES + + IBFilesOwner + IBCocoaTouchFramework + + + IBFirstResponder + IBCocoaTouchFramework + + + IBCocoaTouchFramework + + + + 1316 + + {320, 480} + + + 1 + MSAxIDEAA + + NO + NO + + IBCocoaTouchFramework + YES + + + + + YES + + + delegate + + + + 4 + + + + window + + + + 5 + + + + + YES + + 0 + + + + + + 2 + + + YES + + + + + -1 + + + File's Owner + + + 3 + + + + + -2 + + + + + + + YES + + YES + -1.CustomClassName + -2.CustomClassName + 2.IBAttributePlaceholdersKey + 2.IBEditorWindowLastContentRect + 2.IBPluginDependency + 3.CustomClassName + 3.IBPluginDependency + + + YES + UIApplication + UIResponder + + YES + + + YES + + + {{198, 376}, {320, 480}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + icyAppDelegate + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + YES + + + YES + + + + + YES + + + YES + + + + 9 + + + + YES + + icyAppDelegate + NSObject + + window + UIWindow + + + IBProjectSource + Classes/icyAppDelegate.h + + + + icyAppDelegate + NSObject + + IBUserSource + + + + + + 0 + IBCocoaTouchFramework + + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 + + + YES + icy.xcodeproj + 3 + 81 + + diff --git a/icons/icon-css.png b/icons/icon-css.png new file mode 100644 index 0000000000000000000000000000000000000000..3782125d5d927a89bb076f1927241dba9e416e61 GIT binary patch literal 1057 zcmV++1m63JP)QQED_AE|aY6RB5w7sjDIE@n-RX2*3>EH^$8l(DYZGN(00jjFK|#gh0V6<; z-w3^|2ngQmbUM`6*Nb}kQUM4h(m!A{8iN)jZ8eesQ188qELhc#Cd&damh(MUo1|}n z@X*WFyLjF4oG5^W$t#hsD`fhbPxtZG`GT$lr!`^ejP*?as{IjcU#sbIWX0zrH))MG z0DepW1mxzXD=>e!irri(c%r-ZuGG`fcvQSE!;Z}36e-H>r$zmP<_joJJHmFl-FTLm z-B_euEiDBCfR~PY*pz+<#zd1C(!t*YaQ*IwIxGrmRV3!c84)`v0pZF>;&~0!p_36# z^r@O`XtLrliOjuPu`~ePgI_RJohZs20Yc~9gHBjJKg7A$d&q`S&=U|Vb;U4D%R_Bv zCCcjeGyPlw!Zc$Ori4wCRs+I@5n+=t`0Ix#H+H{an=hHZ4rlT!(f*?uAHLP0_KO)+ zpKfB;f|DrCtw2YA3tD<@uy#Gci}pL%p+6xFfDkeo`X?W+BQ=hL>(>Cv8%|+W%62?! zEhnCuact2IteCk4?fuQ{nX0y1usR>3gu9I8$wlZSK;U&6BuAi7zYq7D&SUS>WlX+Elwa}XP59~jXGWCIw>H(rWeGJv|eIyUd^?PYRCMg|%h8b-V@ zIyxGCeSJ(OcS*#?#s&l-xe?I|h_4qWlSy*R_38t>H-sr*cwK5}VU6rL0a!M`mVbP;c|{@muX(XaL+Qm8x}UXsCkR=OX;&OeTd;#|VEF6aY^@-oRJS_%Af! bf5(3Sh?jw294{}#00000NkvXXu0mjfgv;1q literal 0 HcmV?d00001 diff --git a/icons/icon-html.png b/icons/icon-html.png new file mode 100644 index 0000000000000000000000000000000000000000..5ef65594c825c3b18397eedd7329c01547db4302 GIT binary patch literal 979 zcmV;^11$WBP)%m9`O~WJ-5p0!Y{mIhZ)!BQSJL8PIv*Yg0S`>8Qa^~JMbIy0ZbMLu#EcnaK z@~;69va_?@rKP3$TRN>1LIj@YtxR$pCv45jQXPluB+2XMgsG{i4_>dgBNhOjQkvc0 z-`|r=G}5<*T>>FXyWQUM$5Nm=i3LJxHd6ow1_orgxVR`wx7&^B>1l1OkGi6wLer~b zCiC+0WGOYPDF7aiCu**spdcpQxw*MJrhuh*R}ARsuB@z#hpT+RD?nVSG$66?dNdWBOuip z6F}l;fj*My1rfJ<16U6#hI00D;nd>eSBh)hA`a&Qm#TpbTQmq}HX#7vAAOz|(f)Kj z>YdXig7%*KAcx@@#rD(!(DnpyWCAT7imcQm)&Tp!zd>;2@y{q->q!gBogAY`Gt45s zSOvVCpy-`Ye0Wzl+=$qv6;#1^S&q`&sLh50Z7yxE4 zMWAxTGd_a*uS6*&imvk=kvh;=L2=@c!bI159wW1njtesgnydUs-$S+*qe%wT6?`Cz z;%*}k?=r=`KB@tEJqc775!vv_?6#SreIYbe2IZ(#$ELTTQ5DNir?_>V;@c`k$6FqL zQQ3xSWJmKuxNtlOn}zJY4j2JYdrlff+qsaOb7hX8y?$M*is2C()B*DVb~@pBY&+vY zq8#sVA23&l1_uXaxwNz-&y|&xVRUpfqEcpNX3Bc@>~gshSu{A|4wXlb;zA%gf7}o{b$2hsHosDNrw! zv5wi=+S<6sa99xvBwUCRxn?J#*R}8Q07&1^HEHoYl%5?%ceo@QE0bQS`{Ds07K`PJ zD2m2yLW zmFnrSQ3(hp)IT5?3~Cl6ZZ*0AVDIHcrd9RB=2QSidA~$t$^z`JMr0_dN)wSHST01_*PP$idw98#wfC z87kK|6`vhB1!`fH^ei?ecJ>j^5sP4NBts020(8a=&qJ8XJO%^e z_OXl5zyOYi)EW^`1Hd6?P`<@8x4OE{zWVu9sGnK}?(0Y3ziqmI>u#u>TSa^qTGI}g%D*Cdl|G;^0&*k5;tGnw2QaS9 zlWMPqo{{yc?-B7DvuH3uW$8Zgek=g`K=89ry}Y)s9%}Zh@W*zg|1bpy4i12#5h?Tm zeE^clBpH`VB{KJTJdnv``V5*(CMcK7WRC8VV6|FRLFjHo_yRKMMKl`K-Ew7pKz}Dp zr_)5@D0GeV*09IfY?h48W;59%t>d}F;UHuDrKIkJUawcv+ejobv?i!iFpk0-NK1{n z5z&Gepr6A4pl8I2%jJ53#`8*dI7-4-u^q&F!vF|8℘UTCdT4Zbm6*l*C}iklfG& lfHq-|cf0&wXySjze*qh3;Jq+J3r_$5002ovPDHLkV1n@%iM{{; literal 0 HcmV?d00001 diff --git a/icons/icon-whatever.png b/icons/icon-whatever.png new file mode 100644 index 0000000000000000000000000000000000000000..2cd9e06b780c70ad9a6351d1adf0ffc76d0d2581 GIT binary patch literal 378 zcmV-=0fqjFP)HB!oLC%890>SI#29_0<@Fi-ljZ?`Xutj~ z1hkk~`riPeBuUm;mMx#&t2Ip%DWztnN-3k~^{)2k?;ce3aV;u};#8L9b_hVVZJXqI zexS?-?nN6wbTy9SjVl4N`ay;uKy!8gY^Jsbny~@6;|a) zOqRfy4Tt$4Ndlm3ILs#jP~)}$e8~zB8aL*dZoL4o4mlvam%!H9n7A=N7$6h^(`bMY z2yXz6xLFe5h9E5gCj>jdSf2#I2_dF>5%qo$00)Hl^^3^m2PeSr2;RK_m^a?Lt}Xz$ zr@f_Vx`X4DK)&IKGM{24w8{n0Xsyq6UGL#{Y9Wv{BTAZyK|MMFs;as`y)X^z)Z~B1 Y4`;2G>S333n*aa+07*qoM6N<$f`5^p3jhEB literal 0 HcmV?d00001 diff --git a/icy-Info.plist b/icy-Info.plist new file mode 100644 index 0000000..3289444 --- /dev/null +++ b/icy-Info.plist @@ -0,0 +1,30 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleDisplayName + ${PRODUCT_NAME} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + com.yourcompany.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1.0 + LSRequiresIPhoneOS + + NSMainNibFile + MainWindow + + diff --git a/icy.xcodeproj/project.pbxproj b/icy.xcodeproj/project.pbxproj new file mode 100755 index 0000000..ed98029 --- /dev/null +++ b/icy.xcodeproj/project.pbxproj @@ -0,0 +1,339 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 1D3623260D0F684500981E51 /* icyAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* icyAppDelegate.m */; }; + 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; + 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; + 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; + 288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765FC0DF74451002DB57D /* CoreGraphics.framework */; }; + 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD733E0D9D9553002E5188 /* MainWindow.xib */; }; + AA1B041C145DFA8900AC7BEB /* WebBrowser.m in Sources */ = {isa = PBXBuildFile; fileRef = AA1B041A145DFA8900AC7BEB /* WebBrowser.m */; }; + AA1B0424145DFB3300AC7BEB /* ComponentsList.m in Sources */ = {isa = PBXBuildFile; fileRef = AA1B0422145DFB3300AC7BEB /* ComponentsList.m */; }; + AA293E88148051C900A7D132 /* ComponentList.xib in Resources */ = {isa = PBXBuildFile; fileRef = AA293E87148051C900A7D132 /* ComponentList.xib */; }; + AA293E8C1480592B00A7D132 /* Blob.m in Sources */ = {isa = PBXBuildFile; fileRef = AA293E8A1480592B00A7D132 /* Blob.m */; }; + AA293E8D1480592B00A7D132 /* Blob.xib in Resources */ = {isa = PBXBuildFile; fileRef = AA293E8B1480592B00A7D132 /* Blob.xib */; }; + AA293E9014806A5100A7D132 /* CellData.m in Sources */ = {isa = PBXBuildFile; fileRef = AA293E8F14806A5100A7D132 /* CellData.m */; }; + AA293E961480C84F00A7D132 /* Image.m in Sources */ = {isa = PBXBuildFile; fileRef = AA293E941480C84F00A7D132 /* Image.m */; }; + AA293E971480C84F00A7D132 /* Image.xib in Resources */ = {isa = PBXBuildFile; fileRef = AA293E951480C84F00A7D132 /* Image.xib */; }; + AADBA08D14651E0C00DCFB6A /* CacheMonitor.m in Sources */ = {isa = PBXBuildFile; fileRef = AADBA08C14651E0C00DCFB6A /* CacheMonitor.m */; }; + AADBA1C51465EFB900DCFB6A /* ComponentDetails.m in Sources */ = {isa = PBXBuildFile; fileRef = AADBA1C31465EFB900DCFB6A /* ComponentDetails.m */; }; + AADBA1C61465EFB900DCFB6A /* ComponentDetails.xib in Resources */ = {isa = PBXBuildFile; fileRef = AADBA1C41465EFB900DCFB6A /* ComponentDetails.xib */; }; + AADBA2EE1466683300DCFB6A /* Component.m in Sources */ = {isa = PBXBuildFile; fileRef = AADBA2ED1466683300DCFB6A /* Component.m */; }; + AADBA48D146734A800DCFB6A /* icon-css.png in Resources */ = {isa = PBXBuildFile; fileRef = AADBA489146734A800DCFB6A /* icon-css.png */; }; + AADBA48E146734A800DCFB6A /* icon-html.png in Resources */ = {isa = PBXBuildFile; fileRef = AADBA48A146734A800DCFB6A /* icon-html.png */; }; + AADBA48F146734A800DCFB6A /* icon-js.png in Resources */ = {isa = PBXBuildFile; fileRef = AADBA48B146734A800DCFB6A /* icon-js.png */; }; + AADBA490146734A800DCFB6A /* icon-whatever.png in Resources */ = {isa = PBXBuildFile; fileRef = AADBA48C146734A800DCFB6A /* icon-whatever.png */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 1D3623240D0F684500981E51 /* icyAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = icyAppDelegate.h; sourceTree = ""; }; + 1D3623250D0F684500981E51 /* icyAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = icyAppDelegate.m; sourceTree = ""; }; + 1D6058910D05DD3D006BFB54 /* icy.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = icy.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + 288765FC0DF74451002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + 28AD733E0D9D9553002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = ""; }; + 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 32CA4F630368D1EE00C91783 /* icy_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = icy_Prefix.pch; sourceTree = ""; }; + 8D1107310486CEB800E47090 /* icy-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "icy-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; + AA1B0419145DFA8900AC7BEB /* WebBrowser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebBrowser.h; sourceTree = ""; }; + AA1B041A145DFA8900AC7BEB /* WebBrowser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WebBrowser.m; sourceTree = ""; }; + AA1B0421145DFB3300AC7BEB /* ComponentsList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ComponentsList.h; sourceTree = ""; }; + AA1B0422145DFB3300AC7BEB /* ComponentsList.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ComponentsList.m; sourceTree = ""; }; + AA293E87148051C900A7D132 /* ComponentList.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = ComponentList.xib; path = Classes/ComponentList.xib; sourceTree = ""; }; + AA293E891480592A00A7D132 /* Blob.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Blob.h; sourceTree = ""; }; + AA293E8A1480592B00A7D132 /* Blob.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Blob.m; sourceTree = ""; }; + AA293E8B1480592B00A7D132 /* Blob.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = Blob.xib; path = Classes/Blob.xib; sourceTree = ""; }; + AA293E8E14806A5000A7D132 /* CellData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CellData.h; sourceTree = ""; }; + AA293E8F14806A5100A7D132 /* CellData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CellData.m; sourceTree = ""; }; + AA293E931480C84F00A7D132 /* Image.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Image.h; sourceTree = ""; }; + AA293E941480C84F00A7D132 /* Image.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Image.m; sourceTree = ""; }; + AA293E951480C84F00A7D132 /* Image.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = Image.xib; path = Classes/Image.xib; sourceTree = ""; }; + AADBA08B14651E0C00DCFB6A /* CacheMonitor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CacheMonitor.h; sourceTree = ""; }; + AADBA08C14651E0C00DCFB6A /* CacheMonitor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CacheMonitor.m; sourceTree = ""; }; + AADBA1C21465EFB800DCFB6A /* ComponentDetails.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ComponentDetails.h; sourceTree = ""; }; + AADBA1C31465EFB900DCFB6A /* ComponentDetails.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ComponentDetails.m; sourceTree = ""; }; + AADBA1C41465EFB900DCFB6A /* ComponentDetails.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = ComponentDetails.xib; path = Classes/ComponentDetails.xib; sourceTree = ""; }; + AADBA2EC1466683300DCFB6A /* Component.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Component.h; sourceTree = ""; }; + AADBA2ED1466683300DCFB6A /* Component.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Component.m; sourceTree = ""; }; + AADBA489146734A800DCFB6A /* icon-css.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-css.png"; sourceTree = ""; }; + AADBA48A146734A800DCFB6A /* icon-html.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-html.png"; sourceTree = ""; }; + AADBA48B146734A800DCFB6A /* icon-js.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-js.png"; sourceTree = ""; }; + AADBA48C146734A800DCFB6A /* icon-whatever.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-whatever.png"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, + 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, + 288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 080E96DDFE201D6D7F000001 /* Classes */ = { + isa = PBXGroup; + children = ( + AADBA08B14651E0C00DCFB6A /* CacheMonitor.h */, + AADBA08C14651E0C00DCFB6A /* CacheMonitor.m */, + AADBA2EC1466683300DCFB6A /* Component.h */, + AADBA2ED1466683300DCFB6A /* Component.m */, + AA293E8E14806A5000A7D132 /* CellData.h */, + AA293E8F14806A5100A7D132 /* CellData.m */, + 1D3623240D0F684500981E51 /* icyAppDelegate.h */, + 1D3623250D0F684500981E51 /* icyAppDelegate.m */, + AA1B0419145DFA8900AC7BEB /* WebBrowser.h */, + AA1B041A145DFA8900AC7BEB /* WebBrowser.m */, + AA1B0421145DFB3300AC7BEB /* ComponentsList.h */, + AA1B0422145DFB3300AC7BEB /* ComponentsList.m */, + AADBA1C21465EFB800DCFB6A /* ComponentDetails.h */, + AADBA1C31465EFB900DCFB6A /* ComponentDetails.m */, + AA293E891480592A00A7D132 /* Blob.h */, + AA293E8A1480592B00A7D132 /* Blob.m */, + AA293E931480C84F00A7D132 /* Image.h */, + AA293E941480C84F00A7D132 /* Image.m */, + ); + path = Classes; + sourceTree = ""; + }; + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 1D6058910D05DD3D006BFB54 /* icy.app */, + ); + name = Products; + sourceTree = ""; + }; + 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { + isa = PBXGroup; + children = ( + 080E96DDFE201D6D7F000001 /* Classes */, + 29B97315FDCFA39411CA2CEA /* Other Sources */, + 29B97317FDCFA39411CA2CEA /* Resources */, + 29B97323FDCFA39411CA2CEA /* Frameworks */, + 19C28FACFE9D520D11CA2CBB /* Products */, + ); + name = CustomTemplate; + sourceTree = ""; + }; + 29B97315FDCFA39411CA2CEA /* Other Sources */ = { + isa = PBXGroup; + children = ( + 32CA4F630368D1EE00C91783 /* icy_Prefix.pch */, + 29B97316FDCFA39411CA2CEA /* main.m */, + ); + name = "Other Sources"; + sourceTree = ""; + }; + 29B97317FDCFA39411CA2CEA /* Resources */ = { + isa = PBXGroup; + children = ( + AADBA488146734A800DCFB6A /* icons */, + AADBA1C41465EFB900DCFB6A /* ComponentDetails.xib */, + AA293E87148051C900A7D132 /* ComponentList.xib */, + AA293E8B1480592B00A7D132 /* Blob.xib */, + AA293E951480C84F00A7D132 /* Image.xib */, + 28AD733E0D9D9553002E5188 /* MainWindow.xib */, + 8D1107310486CEB800E47090 /* icy-Info.plist */, + ); + name = Resources; + sourceTree = ""; + }; + 29B97323FDCFA39411CA2CEA /* Frameworks */ = { + isa = PBXGroup; + children = ( + 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, + 1D30AB110D05D00D00671497 /* Foundation.framework */, + 288765FC0DF74451002DB57D /* CoreGraphics.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + AADBA488146734A800DCFB6A /* icons */ = { + isa = PBXGroup; + children = ( + AADBA489146734A800DCFB6A /* icon-css.png */, + AADBA48A146734A800DCFB6A /* icon-html.png */, + AADBA48B146734A800DCFB6A /* icon-js.png */, + AADBA48C146734A800DCFB6A /* icon-whatever.png */, + ); + path = icons; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 1D6058900D05DD3D006BFB54 /* icy */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "icy" */; + buildPhases = ( + 1D60588D0D05DD3D006BFB54 /* Resources */, + 1D60588E0D05DD3D006BFB54 /* Sources */, + 1D60588F0D05DD3D006BFB54 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = icy; + productName = icy; + productReference = 1D6058910D05DD3D006BFB54 /* icy.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29B97313FDCFA39411CA2CEA /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0420; + }; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "icy" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 1D6058900D05DD3D006BFB54 /* icy */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 1D60588D0D05DD3D006BFB54 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */, + AADBA1C61465EFB900DCFB6A /* ComponentDetails.xib in Resources */, + AADBA48D146734A800DCFB6A /* icon-css.png in Resources */, + AADBA48E146734A800DCFB6A /* icon-html.png in Resources */, + AADBA48F146734A800DCFB6A /* icon-js.png in Resources */, + AADBA490146734A800DCFB6A /* icon-whatever.png in Resources */, + AA293E88148051C900A7D132 /* ComponentList.xib in Resources */, + AA293E8D1480592B00A7D132 /* Blob.xib in Resources */, + AA293E971480C84F00A7D132 /* Image.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 1D60588E0D05DD3D006BFB54 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1D60589B0D05DD56006BFB54 /* main.m in Sources */, + 1D3623260D0F684500981E51 /* icyAppDelegate.m in Sources */, + AA1B041C145DFA8900AC7BEB /* WebBrowser.m in Sources */, + AA1B0424145DFB3300AC7BEB /* ComponentsList.m in Sources */, + AADBA08D14651E0C00DCFB6A /* CacheMonitor.m in Sources */, + AADBA1C51465EFB900DCFB6A /* ComponentDetails.m in Sources */, + AADBA2EE1466683300DCFB6A /* Component.m in Sources */, + AA293E8C1480592B00A7D132 /* Blob.m in Sources */, + AA293E9014806A5100A7D132 /* CellData.m in Sources */, + AA293E961480C84F00A7D132 /* Image.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 1D6058940D05DD3E006BFB54 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = icy_Prefix.pch; + INFOPLIST_FILE = "icy-Info.plist"; + PRODUCT_NAME = icy; + }; + name = Debug; + }; + 1D6058950D05DD3E006BFB54 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = YES; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = icy_Prefix.pch; + INFOPLIST_FILE = "icy-Info.plist"; + PRODUCT_NAME = icy; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + C01FCF4F08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 5.0; + SDKROOT = iphoneos; + }; + name = Debug; + }; + C01FCF5008A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 5.0; + OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; + SDKROOT = iphoneos; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "icy" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1D6058940D05DD3E006BFB54 /* Debug */, + 1D6058950D05DD3E006BFB54 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "icy" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4F08A954540054247B /* Debug */, + C01FCF5008A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; +} diff --git a/icy.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/icy.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..4f205ee --- /dev/null +++ b/icy.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/icy_Prefix.pch b/icy_Prefix.pch new file mode 100644 index 0000000..43f8940 --- /dev/null +++ b/icy_Prefix.pch @@ -0,0 +1,8 @@ +// +// Prefix header for all source files of the 'icy' target in the 'icy' project +// + +#ifdef __OBJC__ + #import + #import +#endif diff --git a/main.m b/main.m new file mode 100644 index 0000000..1f63420 --- /dev/null +++ b/main.m @@ -0,0 +1,17 @@ +// +// main.m +// icy +// +// Created by Stoyan Stefanov on 10/30/11. +// Copyright 2011 __MyCompanyName__. All rights reserved. +// + +#import + +int main(int argc, char *argv[]) { + + NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; + int retVal = UIApplicationMain(argc, argv, nil, nil); + [pool release]; + return retVal; +}