diff --git a/512_taplove.png b/512_taplove.png new file mode 100644 index 0000000..797d8f3 Binary files /dev/null and b/512_taplove.png differ diff --git a/57_taplove.png b/57_taplove.png new file mode 100644 index 0000000..e1d85ee Binary files /dev/null and b/57_taplove.png differ diff --git a/Classes/.DS_Store b/Classes/.DS_Store new file mode 100644 index 0000000..6f59623 Binary files /dev/null and b/Classes/.DS_Store differ diff --git a/Classes/CardController.h b/Classes/CardController.h new file mode 100644 index 0000000..21a1f6d --- /dev/null +++ b/Classes/CardController.h @@ -0,0 +1,20 @@ +// +// CardController.h +// iValentine +// +// Created by MacPro on 2/8/11. +// Copyright 2011 __MyCompanyName__. All rights reserved. +// + +#import + + +@interface CardController : UIViewController { + IBOutlet UIImageView *cardView; + id delegate; + NSString *fileName; +} +@property (nonatomic, retain) UIImageView *cardView; +@property (nonatomic, retain) NSString *fileName; +- (id)initCardVC:(NSString*)imageName setDelegate:(id)new_delegate; +@end diff --git a/Classes/CardController.m b/Classes/CardController.m new file mode 100644 index 0000000..a35fa81 --- /dev/null +++ b/Classes/CardController.m @@ -0,0 +1,66 @@ +// +// CardController.m +// iValentine +// +// Created by MacPro on 2/8/11. +// Copyright 2011 __MyCompanyName__. All rights reserved. +// + +#import "CardController.h" + + +@implementation CardController +@synthesize cardView,fileName; +// The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad. +- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { + self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; + if (self) { + // Custom initialization. + } + return self; +} + +// Implement viewDidLoad to do additional setup after loading the view, typically from a nib. +- (void)viewDidLoad { + [super viewDidLoad]; + NSString* path = [[NSBundle mainBundle] pathForResource:self.fileName ofType:@"png"]; + cardView.image = [UIImage imageWithContentsOfFile:path]; +} + +/* +// Override to allow orientations other than the default portrait orientation. +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + // Return YES for supported orientations. + return (interfaceOrientation == UIInterfaceOrientationPortrait); +} +*/ +- (id)initCardVC:(NSString*)imageName setDelegate:(id)new_delegate; +{ + if (self = [super initWithNibName:@"CardController" bundle:nil]) { + delegate = new_delegate; + self.fileName = imageName; + } + 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. +} + +- (void)viewDidUnload { + [super viewDidUnload]; + // Release any retained subviews of the main view. + // e.g. self.myOutlet = nil; +} + + +- (void)dealloc { + [cardView release]; + cardView = nil; + [super dealloc]; +} + + +@end diff --git a/Classes/CardController.xib b/Classes/CardController.xib new file mode 100644 index 0000000..ad253a5 --- /dev/null +++ b/Classes/CardController.xib @@ -0,0 +1,397 @@ + + + + 1056 + 10J567 + 823 + 1038.35 + 462.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 132 + + + YES + + + + YES + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + YES + + YES + + + YES + + + + YES + + IBFilesOwner + IBCocoaTouchFramework + + + IBFirstResponder + IBCocoaTouchFramework + + + + 274 + + YES + + + 274 + {225, 334} + + NO + IBCocoaTouchFramework + + + {225, 334} + + + 1 + MCAwIDAgMAA + + IBCocoaTouchFramework + + + + + YES + + + view + + + + 3 + + + + cardView + + + + 5 + + + + + YES + + 0 + + + + + + 1 + + + YES + + + + + + -1 + + + File's Owner + + + -2 + + + + + 4 + + + + + + + YES + + YES + -1.CustomClassName + -2.CustomClassName + 1.IBEditorWindowLastContentRect + 1.IBPluginDependency + 4.IBPluginDependency + + + YES + CardController + UIResponder + {{555, 422}, {225, 334}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + YES + + + YES + + + + + YES + + + YES + + + + 5 + + + + YES + + CardController + UIViewController + + YES + + YES + cardView + delegate + + + YES + UIImageView + id + + + + YES + + YES + cardView + delegate + + + YES + + cardView + UIImageView + + + delegate + id + + + + + IBProjectSource + Classes/CardController.h + + + + + YES + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIAccessibility.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UINibLoading.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIResponder.h + + + + UIImageView + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIImageView.h + + + + UIResponder + NSObject + + + + UISearchBar + UIView + + IBFrameworkSource + UIKit.framework/Headers/UISearchBar.h + + + + UISearchDisplayController + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UISearchDisplayController.h + + + + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIPrintFormatter.h + + + + UIView + + IBFrameworkSource + UIKit.framework/Headers/UITextField.h + + + + UIView + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIView.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UINavigationController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UIPopoverController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UISplitViewController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UITabBarController.h + + + + UIViewController + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIViewController.h + + + + + 0 + IBCocoaTouchFramework + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 + + + YES + ../iValentine.xcodeproj + 3 + 132 + + diff --git a/Classes/CardsCollection.h b/Classes/CardsCollection.h new file mode 100644 index 0000000..ef8facd --- /dev/null +++ b/Classes/CardsCollection.h @@ -0,0 +1,40 @@ +// +// CardsCollection.h +// iValentine +// +// Created by MacPro on 2/8/11. +// Copyright 2011 __MyCompanyName__. All rights reserved. +// + +#import + + +@interface CardsCollection : UIViewController { + IBOutlet UIScrollView *scroller; + IBOutlet UIPageControl *pagecontroller; + int currentpagenumber; + int totalpages; + BOOL ispagecontrolused; + + NSMutableArray *cardsViewsCollection; //it contains Environment Views + NSMutableArray *cardslist; //it contains Cards List. + + IBOutlet UIImageView *heartview; +} +@property (nonatomic, retain) NSMutableArray *cardsViewsCollection; +@property (nonatomic, retain) UIImageView *heartview; +@property (nonatomic, retain) NSMutableArray *cardslist; +-(void)loadScrollerSettings; +-(void)displayCardAtIndex:(int)page; +-(void)removeAllContents:(id)sender; +-(void)heartAnimation; + + +-(IBAction)nextCard; +-(IBAction)previousCard; + + +-(IBAction)nextMove:(id)sender; +-(IBAction)popView:(id)sender; +-(IBAction)gotoMenu:(id)sender; +@end diff --git a/Classes/CardsCollection.m b/Classes/CardsCollection.m new file mode 100644 index 0000000..5d49bd5 --- /dev/null +++ b/Classes/CardsCollection.m @@ -0,0 +1,263 @@ +// +// CardsCollection.m +// iValentine +// +// Created by MacPro on 2/8/11. +// Copyright 2011 __MyCompanyName__. All rights reserved. +// + +#import "CardsCollection.h" +#import "CardController.h" +#import "CustomCardController.h" +#import "iValentineViewController.h" +const CGFloat kScrollHeight = 334;//32.0;//32.0; + +@implementation CardsCollection +@synthesize cardsViewsCollection,cardslist; +@synthesize heartview; +// The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad. + +- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { + self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; + if (self) { + // Custom initialization. + } + return self; +} + + + +// Implement viewDidLoad to do additional setup after loading the view, typically from a nib. +- (void)viewDidLoad { + [super viewDidLoad]; + cardsViewsCollection = [[NSMutableArray alloc] init]; + cardslist = [[NSMutableArray alloc] initWithObjects:@"S1",@"S2",@"S3",@"S4",@"S5",@"S6", + @"S7",@"S8",@"S9",@"S10",@"S11",nil]; + [self loadScrollerSettings]; + [self heartAnimation]; +} + +-(void)heartAnimation; +{ + NSArray *heartArray = [[NSArray alloc] initWithObjects:[UIImage imageNamed:@"Heart_Frame_1.png"], + [UIImage imageNamed:@"Heart_Frame_2.png"], + [UIImage imageNamed:@"Heart_Frame_3.png"], + [UIImage imageNamed:@"Heart_Frame_4.png"], + [UIImage imageNamed:@"Heart_Frame_5.png"], + [UIImage imageNamed:@"Heart_Frame_5.png"], + [UIImage imageNamed:@"Heart_Frame_4.png"], + [UIImage imageNamed:@"Heart_Frame_3.png"], + [UIImage imageNamed:@"Heart_Frame_2.png"], + [UIImage imageNamed:@"Heart_Frame_1.png"],nil]; heartview.animationImages = heartArray; + heartview.alpha = 0.7; + heartview.animationDuration = 0.70; //1.1 2 + heartview.animationRepeatCount = 0; + [heartview startAnimating]; +} +/* +// 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 { + [scroller release]; + scroller = nil; + [pagecontroller release]; + pagecontroller = nil; + [cardsViewsCollection removeAllObjects]; + [cardsViewsCollection release]; + cardsViewsCollection = nil; + [cardslist removeAllObjects]; + [cardslist release]; + cardslist = nil; + [super dealloc]; +} + +-(void)loadScrollerSettings; +{ + totalpages = [cardslist count]; + currentpagenumber = 0; + NSMutableArray *controllers = [[NSMutableArray alloc] init]; + for (unsigned i = 0; i < totalpages; i++) { + [controllers addObject:[NSNull null]]; + } + self.cardsViewsCollection = controllers; + + CardController *controller; + for (int j=0; j<[cardsViewsCollection count]; j++) { + controller = [cardsViewsCollection objectAtIndex:j]; + if ((NSNull *)controller == [NSNull null]) { + controller = [[CardController alloc] initCardVC:[cardslist objectAtIndex:j] setDelegate:self]; + [controller viewDidLoad]; + [cardsViewsCollection replaceObjectAtIndex:j withObject:controller]; + [controller release]; + } + + } + + + // a page is the width of the scroll view + scroller.pagingEnabled = YES; + scroller.scrollEnabled = YES; + scroller.contentSize = CGSizeMake(scroller.frame.size.width * totalpages, kScrollHeight); + + //Change1 YES to NO + scroller.showsHorizontalScrollIndicator = NO; + + scroller.showsVerticalScrollIndicator = NO; + scroller.scrollsToTop = NO; + scroller.delegate = self; + scroller.bounces = NO; + + pagecontroller.numberOfPages = totalpages; + + pagecontroller.currentPage = 0; + + // pages are created on demand + // load the visible page + // load the page on either side to avoid flashes when the user starts scrolling + [self displayCardAtIndex:currentpagenumber]; + + // update the scroll view to the appropriate page + CGRect frame = scroller.frame; + frame.origin.x = frame.size.width * currentpagenumber; + frame.origin.y = 0; + [scroller scrollRectToVisible:frame animated:YES]; +} + +- (void)displayCardAtIndex:(int)page { + if (page < 0) return; + if (page >= totalpages) return; + + // replace the placeholder if necessary + if( ([cardsViewsCollection count] -1 )< page){ + return; + } + CardController *controller = [cardsViewsCollection objectAtIndex:page]; + if ((NSNull *)controller == [NSNull null]) { + controller = [[CardController alloc] initCardVC:[cardslist objectAtIndex:page] setDelegate:self]; + [controller view]; + [cardsViewsCollection replaceObjectAtIndex:page withObject:controller]; + [controller release]; + } + + // add the controller's view to the scroll view + if (nil == controller.view.superview) { + CGRect frame = scroller.frame; + frame.origin.x = frame.size.width * page; + frame.origin.y = 0; + frame.size.height = kScrollHeight; + controller.view.frame = frame; + [scroller addSubview:controller.view]; + + currentpagenumber = page; + } +} + +#pragma mark UIScrollViewDelegate + +- (void)scrollViewDidScroll:(UIScrollView *)sender { + // We don't want a "feedback loop" between the UIPageControl and the scroll delegate in + // which a scroll event generated from the user hitting the page control triggers updates from + // the delegate method. We use a boolean to disable the delegate logic when the page control is used. + if (ispagecontrolused) { + // do nothing - the scroll was initiated from the page control, not the user dragging + return; + } + // Switch the indicator when more than 50% of the previous/next page is visible + CGFloat pageWidth = scroller.frame.size.width; + + int page = floor(scroller.contentOffset.x / pageWidth) ; + pagecontroller.currentPage = page; + currentpagenumber = page; + // load the visible page and the page on either side of it (to avoid flashes when the user starts scrolling) + [self displayCardAtIndex:currentpagenumber]; +} +// At the end of scroll animation, reset the boolean used when scrolls originate from the UIPageControl +- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView { + //EnvironmentPage *controller = [bfenvironmentviews objectAtIndex:bfcurrentpagenumber]; +// [controller loadpositions]; + + ispagecontrolused = NO; + NSLog(@"scrollViewDidEndDecelerating..........."); + +} + + +-(void)removeAllContents:(id)sender; +{ + NSArray *array = self.view.subviews; + NSLog(@"Total Number of views : %d",[array count]); + for (int i=2; i<[array count]; i++) { + UIView *v = [array objectAtIndex:i]; + [v removeFromSuperview]; + } +} +-(IBAction)nextCard; +{ + if (currentpagenumber+1=0) { + currentpagenumber--; + CGRect frame = scroller.frame; + frame.origin.x = frame.size.width * currentpagenumber; + frame.origin.y = 0; + [scroller scrollRectToVisible:frame animated:YES]; + //[self displayCardAtIndex:currentpagenumber]; + } +} + +-(IBAction)nextMove:(id)sender; +{ + CustomCardController *cusCardController = [[CustomCardController alloc] initWithNibName:@"CustomCardController" bundle:[NSBundle mainBundle]]; + [cusCardController setIIndex:currentpagenumber]; + [self.navigationController pushViewController:cusCardController animated:YES]; + [cusCardController loadCardImage:currentpagenumber]; + + [cusCardController release]; +} +-(IBAction)popView:(id)sender; +{ + [self.navigationController popViewControllerAnimated:YES]; +} +-(IBAction)gotoMenu:(id)sender; +{ + iValentineViewController *menuController; + NSArray *controllers = [self.navigationController viewControllers]; + for (int i = 0; i< [controllers count]; i++) { + menuController = [controllers objectAtIndex:i]; + if ([menuController isKindOfClass:[iValentineViewController class]] ) { + menuController = (iValentineViewController*)menuController; + [self.navigationController popToViewController:menuController animated:YES]; + return; + } + } +} + +@end diff --git a/Classes/CardsCollection.xib b/Classes/CardsCollection.xib new file mode 100644 index 0000000..db638d9 --- /dev/null +++ b/Classes/CardsCollection.xib @@ -0,0 +1,776 @@ + + + + 1056 + 10F2108 + 740 + 1038.29 + 461.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 62 + + + YES + + + + YES + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + YES + + YES + + + YES + + + + YES + + IBFilesOwner + + + IBFirstResponder + + + + 274 + + YES + + + 274 + {320, 480} + + NO + + NSImage + Menu_BG.png + + + + + 292 + {{124, 439}, {72, 36}} + + NO + 0 + 0 + + Helvetica-Bold + 15 + 16 + + + 3 + MQA + + + 1 + MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA + + + 3 + MC41AA + + + NSImage + Next_button.png + + + + + 268 + + YES + + + 1316 + + {{96, 305}, {38, 36}} + + NO + 0 + 0 + 3 + + + {{47.5, 98}, {225, 334}} + + YES + YES + + + + 292 + {{277, 237}, {43, 63}} + + NO + 0 + 0 + + + + 1 + MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA + + + + NSImage + right_arrow.png + + + + + 292 + {{0, 237}, {43, 63}} + + NO + 0 + 0 + + + + 1 + MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA + + + + NSImage + left_arrow.png + + + + + 292 + {320, 41} + + NO + + NSImage + top_bar.png + + + + + 292 + {{222, 1}, {72, 35}} + + NO + 0 + 0 + + + + 1 + MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA + + + + NSImage + Menu_button.png + + + + + 292 + {{37, 1}, {72, 34}} + + NO + 0 + 0 + + + + 1 + MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA + + + + NSImage + back_button.png + + + + + 292 + {{134.5, 0}, {51, 46}} + + NO + + NSImage + Heart_Frame_1.png + + + + + 292 + {{23, 49}, {274, 41}} + + NO + NO + 4 + NO + + NSImage + select_card_text.png + + + + {320, 480} + + + + + + + YES + + + view + + + + 3 + + + + pagecontroller + + + + 14 + + + + scroller + + + + 15 + + + + delegate + + + + 16 + + + + nextCard + + + 7 + + 17 + + + + previousCard + + + 7 + + 18 + + + + nextMove: + + + 7 + + 19 + + + + popView: + + + 7 + + 20 + + + + gotoMenu: + + + 7 + + 21 + + + + heartview + + + + 22 + + + + + YES + + 0 + + + + + + 1 + + + YES + + + + + + + + + + + + + + + -1 + + + File's Owner + + + -2 + + + + + 4 + + + + + 5 + + + + + 6 + + + + + 7 + + + + + 8 + + + YES + + + + + + 9 + + + + + 10 + + + + + 11 + + + + + 12 + + + + + 13 + + + + + 23 + + + + + + + YES + + YES + -1.CustomClassName + -2.CustomClassName + 1.IBEditorWindowLastContentRect + 1.IBPluginDependency + 10.IBPluginDependency + 11.IBPluginDependency + 11.IBViewBoundsToFrameTransform + 12.IBPluginDependency + 12.IBViewBoundsToFrameTransform + 13.IBPluginDependency + 13.IBViewBoundsToFrameTransform + 23.IBPluginDependency + 4.IBPluginDependency + 4.IBViewBoundsToFrameTransform + 5.IBPluginDependency + 5.IBViewBoundsToFrameTransform + 6.IBPluginDependency + 7.IBPluginDependency + 8.IBPluginDependency + 9.IBPluginDependency + + + YES + CardsCollection + UIResponder + {{329, 252}, {320, 480}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAAAAAAAAwzkAAA + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAABCIAAAwjAAAA + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAABAoAAAwhwAAA + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAAAAAAAAw+8AAA + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAABAoAAAwxcAAA + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + YES + + + YES + + + + + YES + + + YES + + + + 23 + + + + YES + + CardsCollection + UIViewController + + YES + + YES + gotoMenu: + nextCard + nextMove: + popView: + previousCard + removeAllContents: + + + YES + id + id + id + id + id + id + + + + YES + + YES + heartview + pagecontroller + scroller + + + YES + UIImageView + UIPageControl + UIScrollView + + + + IBProjectSource + Classes/CardsCollection.h + + + + + YES + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSNetServices.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSPort.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSStream.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSXMLParser.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIAccessibility.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UINibLoading.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIResponder.h + + + + UIButton + UIControl + + IBFrameworkSource + UIKit.framework/Headers/UIButton.h + + + + UIControl + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIControl.h + + + + UIImageView + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIImageView.h + + + + UIPageControl + UIControl + + IBFrameworkSource + UIKit.framework/Headers/UIPageControl.h + + + + UIResponder + NSObject + + + + UIScrollView + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIScrollView.h + + + + UISearchBar + UIView + + IBFrameworkSource + UIKit.framework/Headers/UISearchBar.h + + + + UISearchDisplayController + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UISearchDisplayController.h + + + + UIView + + IBFrameworkSource + UIKit.framework/Headers/UITextField.h + + + + UIView + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIView.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UINavigationController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UITabBarController.h + + + + UIViewController + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIViewController.h + + + + + 0 + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 + + + YES + ../iValentine.xcodeproj + 3 + 3.1 + + diff --git a/Classes/CreditsVC.h b/Classes/CreditsVC.h new file mode 100644 index 0000000..9857e46 --- /dev/null +++ b/Classes/CreditsVC.h @@ -0,0 +1,26 @@ +// +// CreditsVC.h +// iValentine +// +// Created by MacPro on 2/10/11. +// Copyright 2011 __MyCompanyName__. All rights reserved. +// + +#import + + +@interface CreditsVC : UIViewController { + IBOutlet UIImageView *heart_animation; +} +@property (nonatomic, retain)UIImageView *heart_animation; +-(IBAction)openUrl; +-(IBAction)sendEmail; +-(IBAction)popView; +-(void)heartAnimation; +-(IBAction)gotoMenu:(id)sender; + +-(IBAction) creativeBugsClicked; +-(IBAction) feedbackClicked; +-(IBAction) spell09Clicked; + +@end diff --git a/Classes/CreditsVC.m b/Classes/CreditsVC.m new file mode 100644 index 0000000..d52858f --- /dev/null +++ b/Classes/CreditsVC.m @@ -0,0 +1,113 @@ +// +// CreditsVC.m +// iValentine +// +// Created by MacPro on 2/10/11. +// Copyright 2011 __MyCompanyName__. All rights reserved. +// + +#import "CreditsVC.h" +#import "iValentineViewController.h" + +@implementation CreditsVC +@synthesize heart_animation; +// The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad. + +- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { + self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; + if (self) { + // Custom initialization. + } + return self; +} + + + +// Implement viewDidLoad to do additional setup after loading the view, typically from a nib. +- (void)viewDidLoad { + [super viewDidLoad]; + [self heartAnimation]; +} +-(void)heartAnimation; +{ + NSArray *heartArray = [[NSArray alloc] initWithObjects:[UIImage imageNamed:@"Heart_Frame_1.png"], + [UIImage imageNamed:@"Heart_Frame_2.png"], + [UIImage imageNamed:@"Heart_Frame_3.png"], + [UIImage imageNamed:@"Heart_Frame_4.png"], + [UIImage imageNamed:@"Heart_Frame_5.png"], + [UIImage imageNamed:@"Heart_Frame_5.png"], + [UIImage imageNamed:@"Heart_Frame_4.png"], + [UIImage imageNamed:@"Heart_Frame_3.png"], + [UIImage imageNamed:@"Heart_Frame_2.png"], + [UIImage imageNamed:@"Heart_Frame_1.png"],nil]; heart_animation.animationImages = heartArray; + heart_animation.alpha = 0.7; + heart_animation.animationDuration = 0.70; //1.1 2 + heart_animation.animationRepeatCount = 0; + [heart_animation startAnimating]; +} +-(IBAction)gotoMenu:(id)sender; +{ + iValentineViewController *menuController; + NSArray *controllers = [self.navigationController viewControllers]; + for (int i = 0; i< [controllers count]; i++) { + menuController = [controllers objectAtIndex:i]; + if ([menuController isKindOfClass:[iValentineViewController class]] ) { + menuController = (iValentineViewController*)menuController; + [self.navigationController popToViewController:menuController animated:YES]; + return; + } + } +} +/* +// 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; +} + +-(IBAction)openUrl; +{ +} +-(IBAction)sendEmail; +{ +} +-(IBAction)popView; +{ + [self.navigationController popViewControllerAnimated:YES]; +} +- (void)dealloc { + [super dealloc]; +} + +-(IBAction) creativeBugsClicked +{ + [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.creativebugs.net"]]; +} + +-(IBAction) spell09Clicked +{ + //[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.azosh.net"]]; +} + +-(IBAction) feedbackClicked +{ + NSString *stringURL = @"mailto:feedback@creativebugs.net"; + NSURL *url = [NSURL URLWithString:stringURL]; + [[UIApplication sharedApplication] openURL:url]; +} + +@end diff --git a/Classes/CreditsVC.xib b/Classes/CreditsVC.xib new file mode 100644 index 0000000..94d92ae --- /dev/null +++ b/Classes/CreditsVC.xib @@ -0,0 +1,634 @@ + + + + 1056 + 10F2108 + 740 + 1038.29 + 461.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 62 + + + YES + + + + YES + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + YES + + YES + + + YES + + + + YES + + IBFilesOwner + + + IBFirstResponder + + + + 274 + + YES + + + 274 + {320, 480} + + NO + + NSImage + background.png + + + + + 292 + {{105, 340}, {120, 14}} + + NO + 0 + 0 + + Helvetica-Bold + 15 + 16 + + + 3 + MQA + + + 1 + MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA + + + 3 + MC41AA + + + + + 292 + {{105, 359}, {120, 16}} + + NO + 0 + 0 + + + + 1 + MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA + + + + + + 292 + {{42, 4}, {72, 37}} + + NO + 0 + 0 + + + + 1 + MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA + + + + NSImage + back_button.png + + + + + 292 + {{137, 0}, {51, 45}} + + NO + NO + + NSImage + Heart_Frame_1.png + + + + + 292 + {{13, 203}, {144, 98}} + + NO + NO + 0 + 0 + + + + 1 + MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA + + + + + + 292 + {{91, 338}, {145, 37}} + + NO + NO + 0 + 0 + + + + 1 + MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA + + + + + {320, 480} + + + 3 + MQA + + 2 + + + + + + + YES + + + view + + + + 3 + + + + openUrl + + + 7 + + 7 + + + + sendEmail + + + 7 + + 8 + + + + popView + + + 7 + + 10 + + + + heart_animation + + + + 12 + + + + creativeBugsClicked + + + 7 + + 14 + + + + feedbackClicked + + + 7 + + 16 + + + + + YES + + 0 + + + + + + 1 + + + YES + + + + + + + + + + + + -1 + + + File's Owner + + + -2 + + + + + 4 + + + + + 5 + + + + + 6 + + + + + 9 + + + + + 11 + + + + + 13 + + + + + 15 + + + + + + + YES + + YES + -1.CustomClassName + -2.CustomClassName + 1.IBEditorWindowLastContentRect + 1.IBPluginDependency + 11.IBPluginDependency + 11.IBViewBoundsToFrameTransform + 13.IBPluginDependency + 15.IBPluginDependency + 4.IBPluginDependency + 4.IBViewBoundsToFrameTransform + 5.IBPluginDependency + 5.IBViewBoundsToFrameTransform + 6.IBPluginDependency + 9.IBPluginDependency + 9.IBViewBoundsToFrameTransform + + + YES + CreditsVC + UIResponder + {{564, 150}, {320, 480}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAABDCgAAwiQAAA + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAABBoAAAw6iAAA + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + AULSAABDoQAAA + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAABByAAAwhgAAA + + + + + YES + + + YES + + + + + YES + + + YES + + + + 16 + + + + YES + + CreditsVC + UIViewController + + YES + + YES + creativeBugsClicked + feedbackClicked + gotoMenu: + openUrl + popView + sendEmail + spell09Clicked + + + YES + id + id + id + id + id + id + id + + + + heart_animation + UIImageView + + + IBProjectSource + Classes/CreditsVC.h + + + + + YES + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSNetServices.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSPort.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSStream.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSXMLParser.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIAccessibility.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UINibLoading.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIResponder.h + + + + UIButton + UIControl + + IBFrameworkSource + UIKit.framework/Headers/UIButton.h + + + + UIControl + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIControl.h + + + + UIImageView + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIImageView.h + + + + UIResponder + NSObject + + + + UISearchBar + UIView + + IBFrameworkSource + UIKit.framework/Headers/UISearchBar.h + + + + UISearchDisplayController + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UISearchDisplayController.h + + + + UIView + + IBFrameworkSource + UIKit.framework/Headers/UITextField.h + + + + UIView + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIView.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UINavigationController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UITabBarController.h + + + + UIViewController + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIViewController.h + + + + + 0 + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 + + + YES + ../iValentine.xcodeproj + 3 + 3.1 + + diff --git a/Classes/CustomCardController.h b/Classes/CustomCardController.h new file mode 100644 index 0000000..93ca82d --- /dev/null +++ b/Classes/CustomCardController.h @@ -0,0 +1,44 @@ +// +// CustomCardController.h +// iValentine +// +// Created by MacPro on 2/9/11. +// Copyright 2011 __MyCompanyName__. All rights reserved. +// + +#import +#import +#import + +@interface CustomCardController : UIViewController { + UIImageView *cardImage; + UILabel *yourname; + UILabel *lovername; + UILabel *lovepercentage; + IBOutlet UIImageView *backgroundImage; + + UIImage *viewImage; + IBOutlet UIImageView *heartview; + + int iIndex; + +} +@property (nonatomic) int iIndex; +@property (nonatomic, retain) UIImageView *heartview; + +@property (nonatomic, retain) IBOutlet UIImageView *cardImage; +@property (nonatomic, retain) IBOutlet UILabel *yourname; +@property (nonatomic, retain) IBOutlet UILabel *lovername; +@property (nonatomic, retain) IBOutlet UILabel *lovepercentage; +@property (nonatomic, retain) UIImage *viewImage; +@property (nonatomic, retain) UIImageView *backgroundImage; +-(void)loadCardImage:(int)index; +-(UIImage*)captureScreen; +-(void)displayComposerSheet ; +-(void)heartAnimation; + + +-(IBAction)shareAction; +-(IBAction)popView:(id)sender; +-(IBAction)gotoMenu:(id)sender; +@end diff --git a/Classes/CustomCardController.m b/Classes/CustomCardController.m new file mode 100644 index 0000000..4871563 --- /dev/null +++ b/Classes/CustomCardController.m @@ -0,0 +1,291 @@ +// +// CustomCardController.m +// iValentine +// +// Created by MacPro on 2/9/11. +// Copyright 2011 __MyCompanyName__. All rights reserved. +// + +#import "CustomCardController.h" +#import "FacebookAgent.h" +#import "iValentineAppDelegate.h" +#import "iValentineViewController.h" +#import "iValentineConstants.h" +#import "QuartzCore/QuartzCore.h" + +@implementation CustomCardController +@synthesize cardImage; +@synthesize yourname, +lovername, +lovepercentage,backgroundImage, +viewImage,heartview; +@synthesize iIndex; + +// The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad. + +- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { + self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; + if (self) { + // Custom initialization. + } + return self; +} + +-(void) viewWillAppear:(BOOL)animated +{ + [super viewWillAppear:animated]; + iValentineAppDelegate *appDelegate = [[UIApplication sharedApplication] delegate]; + + if(iIndex == 9) + { + self.yourname.textColor = [UIColor whiteColor]; + self.lovername.textColor = [UIColor whiteColor]; + self.lovepercentage.textColor = [UIColor whiteColor]; + } + self.yourname.text = appDelegate.yourname; + self.lovername.text = appDelegate.lovername; + self.lovepercentage.text = [NSString stringWithFormat:@"%@ %%",appDelegate.percentage]; + [self heartAnimation]; +} + +// Implement viewDidLoad to do additional setup after loading the view, typically from a nib. +- (void)viewDidLoad { + [super viewDidLoad]; + +} + +-(void)heartAnimation; +{ + NSArray *heartArray = [[NSArray alloc] initWithObjects:[UIImage imageNamed:@"Heart_Frame_1.png"], + [UIImage imageNamed:@"Heart_Frame_2.png"], + [UIImage imageNamed:@"Heart_Frame_3.png"], + [UIImage imageNamed:@"Heart_Frame_4.png"], + [UIImage imageNamed:@"Heart_Frame_5.png"], + [UIImage imageNamed:@"Heart_Frame_5.png"], + [UIImage imageNamed:@"Heart_Frame_4.png"], + [UIImage imageNamed:@"Heart_Frame_3.png"], + [UIImage imageNamed:@"Heart_Frame_2.png"], + [UIImage imageNamed:@"Heart_Frame_1.png"],nil]; + heartview.animationImages = heartArray; + heartview.alpha = 0.7; + heartview.animationDuration = 0.70; //1.1 2 + heartview.animationRepeatCount = 0; + [heartview startAnimating]; +} + +/* +// 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 { + [cardImage release]; + cardImage = nil; + [yourname release]; + yourname = nil; + [lovername release]; + lovername = nil; + [lovepercentage release]; + lovepercentage = nil; + [backgroundImage release]; + backgroundImage = nil; + [viewImage release]; + viewImage = nil; + + [super dealloc]; +} +-(void)loadCardImage:(int)index; +{ + NSString* path = [[NSBundle mainBundle] pathForResource:[NSString stringWithFormat:@"L%d",index+1] ofType:@"png"]; + cardImage.image = [UIImage imageWithContentsOfFile:path]; +} +-(IBAction)shareAction; +{ + [self captureScreen]; + UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Action Sheet" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:@"Save As for MMS",@"Share on Facebook",@"Email Card",nil]; + actionSheet.delegate = self; + [actionSheet showInView:self.view]; +} + +- (void)actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger)buttonIndex +{ + // NSLog(@"%d",buttonIndex); + if(buttonIndex==0){ + NSData* myData = UIImagePNGRepresentation(viewImage); + UIImage *image = [UIImage imageWithData:myData]; + UIImageWriteToSavedPhotosAlbum(image, nil,nil,nil); + } + else if(buttonIndex == 1) + { + FacebookAgent *agent = [[FacebookAgent alloc] initWithApiKey:FB_API_KEY ApiSecret:FB_API_SECRET ApiProxy:nil]; + [agent uploadPhotoAsData:UIImagePNGRepresentation(viewImage) + withStatus:nil + caption:[NSString stringWithFormat:@"I am sharing my %@ love for %@ via Tap Love - www.creativebugs.net/apps/taplove",lovepercentage.text,lovername.text] + toAlbum:nil]; + } + else if(buttonIndex ==2) + { + [self displayComposerSheet]; + // EmailClient *emailClient = [[EmailClient alloc] init]; +// [emailClient showPicker:testUIControlView :self._msharingText]; + } + +} + +#pragma mark - +#pragma mark Compose Mail + +// Displays an email composition interface inside the application. Populates all the Mail fields. +-(void)displayComposerSheet +{ + + MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init]; + picker.mailComposeDelegate = self; + + [picker setSubject:CC_SUBJECT]; + + + // Set up recipients + /*NSArray *toRecipients = [NSArray arrayWithObject:@"first@example.com"]; + NSArray *ccRecipients = [NSArray arrayWithObjects:@"second@example.com", @"third@example.com", nil]; + NSArray *bccRecipients = [NSArray arrayWithObject:@"fourth@example.com"]; + + [picker setToRecipients:toRecipients]; + [picker setCcRecipients:ccRecipients]; + [picker setBccRecipients:bccRecipients];*/ + + // Attach an image to the email + //NSString *path = [[NSBundle mainBundle] pathForResource:@"rainy" ofType:@"png"]; + //UIImage *image = [viewImage retain]; + // NSData *myData = (NSData*)image;// [NSData dataWithContentsOfFile:path]; + //UIImage *image = [UIImage imageWithData:viewImageData]; + NSData* myData = UIImagePNGRepresentation(viewImage); + [picker addAttachmentData:myData mimeType:@"image/png" fileName:@"LoveCard"]; + + // Fill out the email body text + //NSString *emailBody = ; + [picker setMessageBody:CC_DEFAULT_MSG_BODY isHTML:NO]; + + [self presentModalViewController:picker animated:YES]; + [picker release]; +} + + +// Dismisses the email composition interface when users tap Cancel or Send. Proceeds to update the message field with the result of the operation. +- (void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error +{ + NSString *message; + // Notifies users about errors associated with the interface + switch (result) + { + case MFMailComposeResultCancelled: + message = @"Result: canceled"; + break; + case MFMailComposeResultSaved: + message = @"Result: saved"; + break; + case MFMailComposeResultSent: + message = @"Result: sent"; + break; + case MFMailComposeResultFailed: + message = @"Result: failed"; + break; + default: + message = @"Result: not sent"; + break; + } + UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Message" message:message delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; + [alertView show]; + [alertView release]; + [self dismissModalViewControllerAnimated:YES]; +} + + +-(UIImage*)captureScreen; +{ [self.view bringSubviewToFront:self.backgroundImage]; + [self.view bringSubviewToFront:self.cardImage]; + [self.view bringSubviewToFront:self.lovername]; + [self.view bringSubviewToFront:self.yourname]; + [self.view bringSubviewToFront:self.lovepercentage]; + UIGraphicsBeginImageContext(self.view.frame.size); + [self.view.layer renderInContext:UIGraphicsGetCurrentContext()]; + //if (self.viewImage) { +// [self.viewImage release]; +// self.viewImage = nil; +// } + self.viewImage = UIGraphicsGetImageFromCurrentImageContext(); + UIGraphicsEndImageContext(); + + [self.view sendSubviewToBack:self.lovername]; + [self.view sendSubviewToBack:self.yourname]; + [self.view sendSubviewToBack:self.lovepercentage]; + [self.view sendSubviewToBack:self.cardImage]; + [self.view sendSubviewToBack:self.backgroundImage]; + + //[self.view sendSubviewToBack:self.cardImage]; + //UIImageWriteToSavedPhotosAlbum(viewImage, nil, nil, nil); + return viewImage; +} +#pragma mark Clock Hands controlling via Touch count + +-(void)touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event +{ +} + + +- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event +{ + UITouch *toucheA = [[event allTouches] anyObject]; + + if ([toucheA view] == yourname) { + CGPoint location = [toucheA locationInView:self.view]; + yourname.center = location; + }else if ([toucheA view] == lovername) { + CGPoint location = [toucheA locationInView:self.view]; + lovername.center = location; + }else if ([toucheA view] == lovepercentage) { + CGPoint location = [toucheA locationInView:self.view]; + lovepercentage.center = location; + } +} + + +- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event +{ +} + +-(IBAction)popView:(id)sender; +{ + [self.navigationController popViewControllerAnimated:YES]; +} +-(IBAction)gotoMenu:(id)sender; +{ + iValentineViewController *menuController; + NSArray *controllers = [self.navigationController viewControllers]; + for (int i = 0; i< [controllers count]; i++) { + menuController = [controllers objectAtIndex:i]; + if ([menuController isKindOfClass:[iValentineViewController class]] ) { + menuController = (iValentineViewController*)menuController; + [self.navigationController popToViewController:menuController animated:YES]; + return; + } + } +} +@end diff --git a/Classes/CustomCardController.xib b/Classes/CustomCardController.xib new file mode 100644 index 0000000..03e090d --- /dev/null +++ b/Classes/CustomCardController.xib @@ -0,0 +1,769 @@ + + + + 1056 + 10F2108 + 740 + 1038.29 + 461.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 62 + + + YES + + + + YES + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + YES + + YES + + + YES + + + + YES + + IBFilesOwner + + + IBFirstResponder + + + + 274 + + YES + + + 292 + {320, 480} + + NO + + NSImage + Menu_BG.png + + + + + 274 + {320, 480} + + NO + 4 + NO + + NSImage + S9.png + + + + + 292 + {320, 41} + + NO + + NSImage + top_bar.png + + + + + 292 + {{22, 77}, {275, 75}} + + NO + YES + 4 + YES + Ahmad Iftikhar + + MarkerFelt-Thin + 24 + 16 + + + 1 + MCAwIDAAA + + + 3 + MQA + + 1 + 10 + 2 + 1 + + + + 292 + {{182, 300}, {89, 53}} + + NO + YES + 4 + YES + 90% + + MarkerFelt-Thin + 48 + 16 + + + 1 + 10 + 1 + + + + 292 + {{10, 361}, {294, 75}} + + NO + YES + 7 + YES + Mrs. Ahmad + + + 1 + 10 + 2 + 1 + + + + 292 + {{38, -2}, {72, 37}} + + NO + 0 + 0 + + Helvetica-Bold + 15 + 16 + + + + 1 + MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA + + + 3 + MC41AA + + + NSImage + back_button.png + + + + + 292 + {{223, -2}, {72, 37}} + + NO + 0 + 0 + + + + 1 + MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA + + + + NSImage + Menu_button.png + + + + + 292 + {{138, -1}, {49, 41}} + + NO + NO + + NSImage + Heart_Frame_1.png + + + + + 292 + {{218, 444}, {92, 40}} + + NO + 0 + 0 + + + + 1 + MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA + + + + NSImage + Share_button.png + + + + {320, 480} + + + 3 + MQA + + 2 + + + + + + + YES + + + view + + + + 5 + + + + cardImage + + + + 9 + + + + lovepercentage + + + + 10 + + + + lovername + + + + 11 + + + + yourname + + + + 12 + + + + shareAction + + + 7 + + 18 + + + + gotoMenu: + + + 7 + + 19 + + + + popView: + + + 7 + + 20 + + + + backgroundImage + + + + 22 + + + + heartview + + + + 23 + + + + + YES + + 0 + + + + + + 1 + + + YES + + + + + + + + + + + + + + + -1 + + + File's Owner + + + -2 + + + + + 3 + + + + + 4 + + + + + 6 + + + + + 7 + + + + + 8 + + + + + 13 + + + + + 15 + + + + + 16 + + + + + 17 + + + + + 21 + + + + + + + YES + + YES + -1.CustomClassName + -2.CustomClassName + 1.IBEditorWindowLastContentRect + 1.IBPluginDependency + 13.IBPluginDependency + 13.IBViewBoundsToFrameTransform + 15.IBPluginDependency + 16.IBPluginDependency + 17.IBPluginDependency + 17.IBViewBoundsToFrameTransform + 21.IBPluginDependency + 3.IBPluginDependency + 3.IBViewBoundsToFrameTransform + 4.IBPluginDependency + 4.IBViewBoundsToFrameTransform + 6.IBPluginDependency + 6.IBViewBoundsToFrameTransform + 7.IBPluginDependency + 7.IBViewBoundsToFrameTransform + 8.IBPluginDependency + 8.IBViewBoundsToFrameTransform + + + YES + CustomCardController + UIResponder + {{448, 232}, {320, 480}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAABC5AAAw+CAAA + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAABDCgAAwhgAAA + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAABBIAAAw+oAAA + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAAAAAAAAwhwAAA + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAABBoAAAwvIAAA + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAABDAQAAw3gAAA + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAABDLQAAw82AAA + + + + + YES + + + YES + + + + + YES + + + YES + + + + 23 + + + + YES + + CustomCardController + UIViewController + + YES + + YES + gotoMenu: + popView: + shareAction + + + YES + id + id + id + + + + YES + + YES + backgroundImage + cardImage + heartview + lovepercentage + lovername + yourname + + + YES + UIImageView + UIImageView + UIImageView + UILabel + UILabel + UILabel + + + + IBProjectSource + Classes/CustomCardController.h + + + + + YES + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSNetServices.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSPort.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSStream.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSXMLParser.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIAccessibility.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UINibLoading.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIResponder.h + + + + UIButton + UIControl + + IBFrameworkSource + UIKit.framework/Headers/UIButton.h + + + + UIControl + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIControl.h + + + + UIImageView + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIImageView.h + + + + UILabel + UIView + + IBFrameworkSource + UIKit.framework/Headers/UILabel.h + + + + UIResponder + NSObject + + + + UISearchBar + UIView + + IBFrameworkSource + UIKit.framework/Headers/UISearchBar.h + + + + UISearchDisplayController + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UISearchDisplayController.h + + + + UIView + + IBFrameworkSource + UIKit.framework/Headers/UITextField.h + + + + UIView + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIView.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UINavigationController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UITabBarController.h + + + + UIViewController + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIViewController.h + + + + + 0 + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 + + + YES + ../iValentine.xcodeproj + 3 + 3.1 + + diff --git a/Classes/InstructionVC.h b/Classes/InstructionVC.h new file mode 100644 index 0000000..a749f55 --- /dev/null +++ b/Classes/InstructionVC.h @@ -0,0 +1,20 @@ +// +// InstructionVC.h +// +// Created by MacPro on 2/10/11. +// Copyright 2011 __MyCompanyName__. All rights reserved. +// + +#import +#import + +@interface InstructionVC : UIViewController { + IBOutlet UIImageView *heartview; +} +@property (nonatomic,retain) UIImageView *heartview; +-(IBAction)popView; +-(IBAction)startAction; +-(void)heartAnimation; +-(IBAction)gotoMenu:(id)sender; + +@end diff --git a/Classes/InstructionVC.m b/Classes/InstructionVC.m new file mode 100644 index 0000000..1cdd99c --- /dev/null +++ b/Classes/InstructionVC.m @@ -0,0 +1,96 @@ +// +// InstructionVC.m +// +// Created by MacPro on 2/10/11. +// Copyright 2011 __MyCompanyName__. All rights reserved. +// + +#import "InstructionVC.h" +#import "LoveMeterVC.h" +#import "iValentineViewController.h" + +@implementation InstructionVC +@synthesize heartview; +- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { + self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; + if (self) { + // Custom initialization. + } + return self; +} + + + +// Implement viewDidLoad to do additional setup after loading the view, typically from a nib. +- (void)viewDidLoad { + [super viewDidLoad]; + [self heartAnimation]; +} + + +/* + // 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)heartAnimation; +{ + NSArray *heartArray = [[NSArray alloc] initWithObjects:[UIImage imageNamed:@"Heart_Frame_1.png"], + [UIImage imageNamed:@"Heart_Frame_2.png"], + [UIImage imageNamed:@"Heart_Frame_3.png"], + [UIImage imageNamed:@"Heart_Frame_4.png"], + [UIImage imageNamed:@"Heart_Frame_5.png"], + [UIImage imageNamed:@"Heart_Frame_5.png"], + [UIImage imageNamed:@"Heart_Frame_4.png"], + [UIImage imageNamed:@"Heart_Frame_3.png"], + [UIImage imageNamed:@"Heart_Frame_2.png"], + [UIImage imageNamed:@"Heart_Frame_1.png"],nil]; + heartview.animationImages = heartArray; + heartview.alpha = 0.7; + heartview.animationDuration = 0.70; //1.1 2 + heartview.animationRepeatCount = 0; + [heartview startAnimating]; +} +- (void)dealloc { + [super dealloc]; +} +-(IBAction)gotoMenu:(id)sender; +{ + iValentineViewController *menuController; + NSArray *controllers = [self.navigationController viewControllers]; + for (int i = 0; i< [controllers count]; i++) { + menuController = [controllers objectAtIndex:i]; + if ([menuController isKindOfClass:[iValentineViewController class]] ) { + menuController = (iValentineViewController*)menuController; + [self.navigationController popToViewController:menuController animated:YES]; + return; + } + } +} +-(IBAction)popView; +{ + [self.navigationController popViewControllerAnimated:YES]; +} +-(IBAction)startAction; +{ + LoveMeterVC *lovemeter = [[LoveMeterVC alloc] initWithNibName:@"LoveMeterVC" bundle:[NSBundle mainBundle]]; + [self.navigationController pushViewController:lovemeter animated:YES]; + [lovemeter release]; +} +@end diff --git a/Classes/InstructionVC.xib b/Classes/InstructionVC.xib new file mode 100644 index 0000000..fdc42bf --- /dev/null +++ b/Classes/InstructionVC.xib @@ -0,0 +1,637 @@ + + + + 1056 + 10J567 + 823 + 1038.35 + 462.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 132 + + + YES + + + + YES + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + YES + + YES + + + YES + + + + YES + + IBFilesOwner + IBCocoaTouchFramework + + + IBFirstResponder + IBCocoaTouchFramework + + + + 274 + + YES + + + 292 + {320, 41} + + NO + IBCocoaTouchFramework + + NSImage + top_bar.png + + + + + 274 + {320, 480} + + 0.64084506034851074 + NO + IBCocoaTouchFramework + + NSImage + Inst_background.png + + + + + 292 + {{36, 0}, {72, 37}} + + NO + IBCocoaTouchFramework + 0 + 0 + + Helvetica-Bold + 15 + 16 + + + 3 + MQA + + + 1 + MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA + + + 3 + MC41AA + + + NSImage + back_button.png + + + + + 292 + {{138, -1}, {49, 46}} + + NO + IBCocoaTouchFramework + + NSImage + Heart_Frame_1.png + + + + + 292 + {{103, 431}, {119, 44}} + + NO + IBCocoaTouchFramework + 0 + 0 + + + + 1 + MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA + + + + NSImage + start_button.png + + + + + 292 + {{48, 47}, {230, 50}} + + NO + IBCocoaTouchFramework + + NSImage + instructions_text.png + + + + + 292 + {{6, 94}, {309, 338}} + + NO + IBCocoaTouchFramework + + NSImage + Instructions_box.png + + + + {320, 480} + + + 3 + MQA + + 2 + + + IBCocoaTouchFramework + + + + + YES + + + popView + + + 7 + + 11 + + + + startAction + + + 7 + + 12 + + + + view + + + + 13 + + + + heartview + + + + 14 + + + + + YES + + 0 + + + + + + 1 + + + YES + + + + + + + + + + + + -1 + + + File's Owner + + + -2 + + + + + 3 + + + + + 4 + + + + + 5 + + + + + 6 + + + + + 8 + + + + + 9 + + + + + 10 + + + + + + + YES + + YES + -1.CustomClassName + -2.CustomClassName + 1.IBEditorWindowLastContentRect + 1.IBPluginDependency + 10.IBPluginDependency + 10.IBViewBoundsToFrameTransform + 3.IBPluginDependency + 3.IBViewBoundsToFrameTransform + 4.IBPluginDependency + 5.IBPluginDependency + 6.IBPluginDependency + 6.IBViewBoundsToFrameTransform + 8.IBPluginDependency + 9.IBPluginDependency + 9.IBViewBoundsToFrameTransform + + + YES + InstructionVC + UIResponder + {{521, 267}, {320, 480}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAABCGAAAw/aAAA + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAAAAAAAAw+8AAA + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAABCqgAAwjQAAA + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAABCEAAAwtYAAA + + + + + YES + + + YES + + + + + YES + + + YES + + + + 14 + + + + YES + + InstructionVC + UIViewController + + YES + + YES + popView + startAction + + + YES + id + id + + + + YES + + YES + popView + startAction + + + YES + + popView + id + + + startAction + id + + + + + heartview + UIImageView + + + heartview + + heartview + UIImageView + + + + IBProjectSource + Classes/InstructionVC.h + + + + + YES + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIAccessibility.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UINibLoading.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIResponder.h + + + + UIButton + UIControl + + IBFrameworkSource + UIKit.framework/Headers/UIButton.h + + + + UIControl + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIControl.h + + + + UIImageView + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIImageView.h + + + + UIResponder + NSObject + + + + UISearchBar + UIView + + IBFrameworkSource + UIKit.framework/Headers/UISearchBar.h + + + + UISearchDisplayController + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UISearchDisplayController.h + + + + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIPrintFormatter.h + + + + UIView + + IBFrameworkSource + UIKit.framework/Headers/UITextField.h + + + + UIView + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIView.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UINavigationController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UIPopoverController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UISplitViewController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UITabBarController.h + + + + UIViewController + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIViewController.h + + + + + 0 + IBCocoaTouchFramework + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 + + + YES + ../iValentine.xcodeproj + 3 + + YES + + YES + Heart_Frame_1.png + Inst_background.png + Instructions_box.png + back_button.png + instructions_text.png + start_button.png + top_bar.png + + + YES + {51, 46} + {320, 480} + {309, 338} + {66, 32} + {232, 47} + {118, 40} + {320, 43} + + + 132 + + diff --git a/Classes/InstructionViewController/.DS_Store b/Classes/InstructionViewController/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/Classes/InstructionViewController/.DS_Store differ diff --git a/Classes/LMViewController/.DS_Store b/Classes/LMViewController/.DS_Store new file mode 100644 index 0000000..80cc149 Binary files /dev/null and b/Classes/LMViewController/.DS_Store differ diff --git a/Classes/LMViewController/LoveMeterVC.h b/Classes/LMViewController/LoveMeterVC.h new file mode 100644 index 0000000..77a356f --- /dev/null +++ b/Classes/LMViewController/LoveMeterVC.h @@ -0,0 +1,41 @@ +// +// LoveMeterVC.h +// iValentine +// +// Created by MacPro on 1/17/11. +// Copyright 2011 __MyCompanyName__. All rights reserved. +// + +#import + + +@interface LoveMeterVC : UIViewController { + IBOutlet UITextField *nametf1; + IBOutlet UITextField *nametf2; + NSString *notAllowedCharacters; + CGFloat lovePercentage; + IBOutlet UIImageView *loveNiddle; + IBOutlet UIImageView *heartview; + + CGFloat fDegree; + CGFloat fStartAngle; + +} +@property (nonatomic, retain) UITextField *nametf1; +@property (nonatomic, retain) UITextField *nametf2; +@property (nonatomic, retain) NSString *notAllowedCharacters; +@property (nonatomic, retain) UIImageView *loveNiddle; +@property (nonatomic, retain) UIImageView *heartview; +-(void)animateNiddle:(CGFloat)degree; +-(BOOL)isValidName:(NSString*)name; +-(void)heartAnimation; + + +-(IBAction)calculateLove:(id)sender; +-(IBAction)resetAction:(id)sender; +-(IBAction)nextMove:(id)sender; +-(IBAction)popView:(id)sender; +-(IBAction)gotoMenu:(id)sender; +-(IBAction)resignFirstResponder:(id)sender; + +@end diff --git a/Classes/LMViewController/LoveMeterVC.m b/Classes/LMViewController/LoveMeterVC.m new file mode 100644 index 0000000..a672ede --- /dev/null +++ b/Classes/LMViewController/LoveMeterVC.m @@ -0,0 +1,296 @@ +// +// LoveMeterVC.m +// iValentine +// +// Created by MacPro on 1/17/11. +// Copyright 2011 __MyCompanyName__. All rights reserved. +// + +#import "LoveMeterVC.h" +#import "CardsCollection.h" +#import "iValentineAppDelegate.h" +#import "iValentineViewController.h" + + +@implementation LoveMeterVC + +@synthesize nametf1,nametf2; +@synthesize notAllowedCharacters; +@synthesize loveNiddle,heartview; + // The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad. +- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { + if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) { + // Custom initialization + } + return self; +} + + + +// Implement viewDidLoad to do additional setup after loading the view, typically from a nib. +- (void)viewDidLoad { + [super viewDidLoad]; + self.notAllowedCharacters = @"!`~@#$%^7*()_-+=|\\}]{[\"':;/?.>,<1234567890"; + [self resetAction:nil]; + [self heartAnimation]; +} +-(void)heartAnimation; +{ + NSArray *heartArray = [[NSArray alloc] initWithObjects:[UIImage imageNamed:@"Heart_Frame_1.png"], + [UIImage imageNamed:@"Heart_Frame_2.png"], + [UIImage imageNamed:@"Heart_Frame_3.png"], + [UIImage imageNamed:@"Heart_Frame_4.png"], + [UIImage imageNamed:@"Heart_Frame_5.png"], + [UIImage imageNamed:@"Heart_Frame_5.png"], + [UIImage imageNamed:@"Heart_Frame_4.png"], + [UIImage imageNamed:@"Heart_Frame_3.png"], + [UIImage imageNamed:@"Heart_Frame_2.png"], + [UIImage imageNamed:@"Heart_Frame_1.png"],nil]; + heartview.animationImages = heartArray; + heartview.alpha = 0.7; + heartview.animationDuration = 0.70; //1.1 2 + heartview.animationRepeatCount = 0; + [heartview startAnimating]; +} + +/* +// 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)textFieldDidBeginEditing:(UITextField *)textField; // became first responder +{ + +} +- (void)textFieldDidEndEditing:(UITextField *)textField; +{ + if (textField==nametf1) { + NSLog(@"Do Calculation of FirstName"); + [self isValidName:nametf1.text]; + }else if (textField == nametf2) { + NSLog(@"Do Calculation of SecondName"); + } +} +-(void)checkNameValidation:(NSString*)name; +{ + if (![self isValidName:name]) { + UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Alert!" + message:@"Please enter a valid name." + delegate:self cancelButtonTitle:@"OK" + otherButtonTitles:nil]; + [alertView show]; + [alertView release]; + } +} +-(BOOL)isValidName:(NSString*)name; +{ + NSString *nameChar; + for (int i=0; i<[name length]; i++) { + nameChar = [name substringWithRange: NSMakeRange (i, 1)]; + + NSRange match; + + match = [self.notAllowedCharacters rangeOfString: nameChar]; + + if (match.location != NSNotFound) + return NO; + } + + return YES; +} +-(int)loveCount:(NSString*)name; +{ + name = [name uppercaseString]; + NSString *letter = @""; + int loveCountVal = 0; + int extrapoint = 0; + for (int count=0; count<[name length]; count++) { + letter = [name substringWithRange:NSMakeRange(count,1)]; + if ([letter isEqualToString:@"I"]) + loveCountVal += 2; + else if ([letter isEqualToString:@"L"]) + loveCountVal +=2; + else if ([letter isEqualToString:@"O"]) + loveCountVal +=3; + else if ([letter isEqualToString:@"V"]) + loveCountVal +=2; + else if ([letter isEqualToString:@"E"]) + loveCountVal +=2; + else if ([letter isEqualToString:@"Y"]) + loveCountVal +=2; + else if ([letter isEqualToString:@"U"]) + loveCountVal +=2; + else { +// loveCountVal +=1; + extrapoint++; + if (extrapoint==2) { + loveCountVal +=1; + extrapoint = 0; + } + } + } + return loveCountVal; +} +-(int)getPercentage:(int)accumulatedLove; +{ + int loverpercentage = 0; + int name1Length = [nametf1.text length]; + int name2Length = [nametf2.text length]; + if(accumulatedLove>0) loverpercentage = 5-((name1Length+name2Length)/2); + if(accumulatedLove>2) loverpercentage = 10-((name1Length+name2Length)/2); + if(accumulatedLove>4) loverpercentage = 20-((name1Length+name2Length)/2); + if(accumulatedLove>6) loverpercentage = 30-((name1Length+name2Length)/2); + if(accumulatedLove>8) loverpercentage = 40-((name1Length+name2Length)/2); + if(accumulatedLove>10) loverpercentage = 50-((name1Length+name2Length)/2); + if(accumulatedLove>12) loverpercentage = 60-((name1Length+name2Length)/2); + if(accumulatedLove>14) loverpercentage = 70-((name1Length+name2Length)/2); + if(accumulatedLove>16) loverpercentage = 80-((name1Length+name2Length)/2); + if(accumulatedLove>18) loverpercentage = 90-((name1Length+name2Length)/2); + if(accumulatedLove>20) loverpercentage = 100-((name1Length+name2Length)/2); + if(accumulatedLove>22) loverpercentage = 110-((name1Length+name2Length)/2); + + if (loverpercentage < 0) { + return 0; + }else if (loverpercentage > 99) { + return 99; + } + return loverpercentage; +} +-(IBAction)calculateLove:(id)sender; +{ + int name1LoveCount = [self loveCount:nametf1.text]; + int name2LoveCount = [self loveCount:nametf2.text]; + lovePercentage = [self getPercentage:name1LoveCount+name2LoveCount]; +// CGFloat degrees = 0.0; + int degrees = 0; + if (lovePercentage<50.0) { + degrees = (int)(1.38*lovePercentage) - 70; + }else { + degrees = abs((1.38*lovePercentage) - 70); + } + + [self animateNiddle:degrees]; +} + +-(void)performAnimation +{ + if(fStartAngle == fDegree) + { + if(fDegree != 0) + { + UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Alert!" + message:[NSString stringWithFormat:@"%@ & %@ has %.0f%% Love",nametf1.text,nametf2.text,lovePercentage] + delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; + [alertView show]; + [alertView release]; + } + + iValentineAppDelegate *appDelegate = [[UIApplication sharedApplication] delegate]; + appDelegate.yourname = self.nametf1.text; + appDelegate.lovername = self.nametf2.text; + int d = lovePercentage; + appDelegate.percentage = [NSString stringWithFormat:@"%d",d]; + } + else { + fStartAngle++; + CGAffineTransform rotate = CGAffineTransformMakeRotation( fStartAngle / 180.0 * 3.14159265); + [loveNiddle setTransform:rotate]; + [NSTimer scheduledTimerWithTimeInterval:0.01 + target:self + selector:@selector(performAnimation) + userInfo:nil + repeats:NO]; + } +} + +-(void)animateNiddle:(CGFloat)degree; +{ + [nametf2 resignFirstResponder]; + + fDegree = degree; + fStartAngle = -70; + [NSTimer scheduledTimerWithTimeInterval:0.1 + target:self + selector:@selector(performAnimation) + userInfo:nil + repeats:NO]; + +} +-(IBAction)resignFirstResponder:(id)sender +{ + if ([sender respondsToSelector:@selector(resignFirstResponder)]) + [sender resignFirstResponder]; +} +-(IBAction)resetAction:(id)sender; +{ + lovePercentage = 0.0; + [nametf1 setText:@""]; + [nametf2 setText:@""]; +// [self animateNiddle:-70.0]; + fStartAngle = 0; + fDegree = 0; + [self performAnimation]; + + fStartAngle = -70; + CGAffineTransform rotate = CGAffineTransformMakeRotation( -70.0 / 180.0 * 3.14159265); + [loveNiddle setTransform:rotate]; +} +-(IBAction)nextMove:(id)sender; +{ + CardsCollection *collection = [[CardsCollection alloc] + initWithNibName:@"CardsCollection" bundle:[NSBundle mainBundle]]; + [self.navigationController pushViewController:collection animated:YES]; + [collection release]; +} +-(IBAction)popView:(id)sender; +{ + [self.navigationController popViewControllerAnimated:YES]; +} +-(IBAction)gotoMenu:(id)sender; +{ + iValentineViewController *menuController; + NSArray *controllers = [self.navigationController viewControllers]; + for (int i = 0; i< [controllers count]; i++) { + menuController = [controllers objectAtIndex:i]; + if ([menuController isKindOfClass:[iValentineViewController class]] ) { + menuController = (iValentineViewController*)menuController; + [self.navigationController popToViewController:menuController animated:YES]; + return; + } + } +} +- (void)dealloc { + [heartview stopAnimating]; + [heartview.animationImages release]; + [heartview release]; + heartview = nil; + [nametf1 release]; + nametf1 = nil; + [nametf2 release]; + nametf2 = nil; + [notAllowedCharacters release]; + notAllowedCharacters = nil; + [loveNiddle release]; + loveNiddle = nil; + + [super dealloc]; +} + + +@end diff --git a/Classes/LMViewController/LoveMeterVC.xib b/Classes/LMViewController/LoveMeterVC.xib new file mode 100644 index 0000000..50ad0e7 --- /dev/null +++ b/Classes/LMViewController/LoveMeterVC.xib @@ -0,0 +1,900 @@ + + + + 1056 + 10F2108 + 740 + 1038.29 + 461.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 62 + + + YES + + + + YES + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + YES + + YES + + + YES + + + + YES + + IBFilesOwner + + + IBFirstResponder + + + + 274 + + YES + + + 292 + {320, 480} + + NO + + NSImage + LoveMeter_Background.png + + + + + 292 + {{10, 103}, {131, 31}} + + NO + YES + 0 + + 3 + + 3 + MAA + + 2 + + + YES + 17 + + + + + 292 + {320, 43} + + NO + + NSImage + top_bar.png + + + + + 292 + {{157, 304}, {30, 31}} + + NO + NO + + NSImage + Needle_Controler.png + + + + + 292 + {{171, 103}, {134, 31}} + + NO + YES + 0 + + 3 + + 3 + MAA + + + YES + 17 + + + + + 292 + {{10, 77}, {131, 24}} + + NO + 4 + NO + + NSImage + Your_Name.png + + + + + 292 + {{171, 77}, {134, 24}} + + NO + 4 + NO + + NSImage + Lovers_Name.png + + + + + 292 + {{206, 399}, {109, 37}} + + NO + 0 + 0 + + Helvetica-Bold + 15 + 16 + + + 3 + MQA + + + 1 + MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA + + + 3 + MC41AA + + + NSImage + Calculate_button.png + + + + + 292 + {{-6, 399}, {99, 37}} + + NO + 0 + 0 + + + + 1 + MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA + + + + NSImage + Reset_button.png + + + + + 292 + {{124, 439}, {72, 36}} + + NO + 0 + 0 + + + + 1 + MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA + + + + NSImage + Next_button.png + + + + + 292 + {{38, 3}, {66, 32}} + + NO + 0 + 0 + + + + 1 + MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA + + + + NSImage + back_button.png + + + + + 292 + {{221, 3}, {70, 32}} + + NO + 0 + 0 + + + + 1 + MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA + + + + NSImage + Menu_button.png + + + + + 292 + {{134, 0}, {51, 46}} + + NO + + + + 292 + {{155, 236}, {34, 167}} + + NO + NO + + NSImage + Needle_double_size.png + + + + {320, 480} + + + 3 + MQA + + + + + + + YES + + + view + + + + 3 + + + + nametf1 + + + + 6 + + + + nametf2 + + + + 7 + + + + calculateLove: + + + 7 + + 10 + + + + resetAction: + + + 7 + + 11 + + + + delegate + + + + 12 + + + + delegate + + + + 13 + + + + loveNiddle + + + + 15 + + + + gotoMenu: + + + 7 + + 25 + + + + nextMove: + + + 7 + + 26 + + + + popView: + + + 7 + + 27 + + + + resignFirstResponder: + + + 20 + + 30 + + + + resignFirstResponder: + + + 20 + + 31 + + + + heartview + + + + 33 + + + + + YES + + 0 + + + + + + 1 + + + YES + + + + + + + + + + + + + + + + + + + -1 + + + File's Owner + + + -2 + + + + + 4 + + + + + 5 + + + + + 8 + + + + + 9 + + + + + 14 + + + + + 16 + + + + + 17 + + + + + 18 + + + + + 19 + + + + + 20 + + + + + 22 + + + + + 23 + + + + + 24 + + + + + 32 + + + + + + + YES + + YES + -1.CustomClassName + -2.CustomClassName + 1.IBEditorWindowLastContentRect + 1.IBPluginDependency + 14.IBPluginDependency + 14.IBViewBoundsToFrameTransform + 16.IBPluginDependency + 16.IBViewBoundsToFrameTransform + 17.IBPluginDependency + 17.IBViewBoundsToFrameTransform + 18.IBPluginDependency + 19.IBPluginDependency + 20.IBPluginDependency + 20.IBViewBoundsToFrameTransform + 22.IBPluginDependency + 22.IBViewBoundsToFrameTransform + 23.IBPluginDependency + 23.IBViewBoundsToFrameTransform + 24.IBPluginDependency + 24.IBViewBoundsToFrameTransform + 32.IBPluginDependency + 32.IBViewBoundsToFrameTransform + 4.IBPluginDependency + 4.IBViewBoundsToFrameTransform + 5.IBPluginDependency + 5.IBViewBoundsToFrameTransform + 8.IBPluginDependency + 9.IBPluginDependency + 9.IBViewBoundsToFrameTransform + + + YES + LoveMeterVC + UIResponder + {{480, 276}, {320, 480}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAABCswAAw4AAAA + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAAAAAAAAw+UAAA + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAADCIAAAwjgAAA + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAABDFgAAw7AAAA + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + AUGoAABCmgAAA + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAABB0AAAwtAAAA + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + AUL6AABD24AAA + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAABCUAAAwjAAAA + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAABBoAAAwr4AAA + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAABDKwAAwwQAAA + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAABDUgAAw0QAAA + + + + + YES + + + YES + + + + + YES + + + YES + + + + 33 + + + + YES + + LoveMeterVC + UIViewController + + YES + + YES + calculateLove: + gotoMenu: + nextMove: + popView: + resetAction: + resignFirstResponder: + + + YES + id + id + id + id + id + id + + + + YES + + YES + heartview + loveNiddle + nametf1 + nametf2 + + + YES + UIImageView + UIImageView + UITextField + UITextField + + + + IBProjectSource + Classes/LMViewController/LoveMeterVC.h + + + + + YES + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSNetServices.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSPort.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSStream.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSXMLParser.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIAccessibility.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UINibLoading.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIResponder.h + + + + UIButton + UIControl + + IBFrameworkSource + UIKit.framework/Headers/UIButton.h + + + + UIControl + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIControl.h + + + + UIImageView + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIImageView.h + + + + UIResponder + NSObject + + + + UISearchBar + UIView + + IBFrameworkSource + UIKit.framework/Headers/UISearchBar.h + + + + UISearchDisplayController + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UISearchDisplayController.h + + + + UITextField + UIControl + + IBFrameworkSource + UIKit.framework/Headers/UITextField.h + + + + UIView + + + + UIView + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIView.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UINavigationController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UITabBarController.h + + + + UIViewController + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIViewController.h + + + + + 0 + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 + + + YES + ../../iValentine.xcodeproj + 3 + 3.1 + + diff --git a/Classes/Libraries/.DS_Store b/Classes/Libraries/.DS_Store new file mode 100644 index 0000000..c0abdff Binary files /dev/null and b/Classes/Libraries/.DS_Store differ diff --git a/Classes/Libraries/FacebookAgent/.DS_Store b/Classes/Libraries/FacebookAgent/.DS_Store new file mode 100644 index 0000000..23764af Binary files /dev/null and b/Classes/Libraries/FacebookAgent/.DS_Store differ diff --git a/Classes/Libraries/FacebookAgent/.svn/all-wcprops b/Classes/Libraries/FacebookAgent/.svn/all-wcprops new file mode 100644 index 0000000..cc1df36 --- /dev/null +++ b/Classes/Libraries/FacebookAgent/.svn/all-wcprops @@ -0,0 +1,17 @@ +K 25 +svn:wc:ra_dav:version-url +V 51 +/uc2/!svn/ver/10/iphone/trunk/Classes/FacebookAgent +END +FacebookAgent.m +K 25 +svn:wc:ra_dav:version-url +V 67 +/uc2/!svn/ver/10/iphone/trunk/Classes/FacebookAgent/FacebookAgent.m +END +FacebookAgent.h +K 25 +svn:wc:ra_dav:version-url +V 67 +/uc2/!svn/ver/10/iphone/trunk/Classes/FacebookAgent/FacebookAgent.h +END diff --git a/Classes/Libraries/FacebookAgent/.svn/entries b/Classes/Libraries/FacebookAgent/.svn/entries new file mode 100644 index 0000000..0da68d6 --- /dev/null +++ b/Classes/Libraries/FacebookAgent/.svn/entries @@ -0,0 +1,55 @@ +8 + +dir +10 +https://geniteam1@geniteam.svn.cvsdude.com/uc2/iphone/trunk/Classes/FacebookAgent +https://geniteam1@geniteam.svn.cvsdude.com/uc2 + + + +2010-03-02T06:40:08.984918Z +10 +rizwanyousaf + + +svn:special svn:externals svn:needs-lock + + + + + + + + + + + +77bba3fe-c5a6-4b36-a80a-631b2adb4aff + +FacebookAgent.m +file + + + + +2010-03-02T06:46:30.000000Z +d034e0c9929cdc72d3aa8983e4044de8 +2010-03-02T06:40:08.984918Z +10 +rizwanyousaf + +src +dir + +FacebookAgent.h +file + + + + +2010-03-02T06:46:30.000000Z +15f10eb75982e1091aa1139b3970231c +2010-03-02T06:40:08.984918Z +10 +rizwanyousaf + diff --git a/Classes/Libraries/FacebookAgent/.svn/format b/Classes/Libraries/FacebookAgent/.svn/format new file mode 100644 index 0000000..45a4fb7 --- /dev/null +++ b/Classes/Libraries/FacebookAgent/.svn/format @@ -0,0 +1 @@ +8 diff --git a/Classes/Libraries/FacebookAgent/.svn/text-base/FacebookAgent.h.svn-base b/Classes/Libraries/FacebookAgent/.svn/text-base/FacebookAgent.h.svn-base new file mode 100644 index 0000000..589f1c3 --- /dev/null +++ b/Classes/Libraries/FacebookAgent/.svn/text-base/FacebookAgent.h.svn-base @@ -0,0 +1,284 @@ +// +// FacebookAgent.h +// Pagination +// +// Created by Shaikh Sonny Aman on 1/6/10. +// Copyright 2010 SHAIKH SONNY AMAN :) . All rights reserved. +// + +#import +#import "FBConnect.h" + +@class FacebookAgent; + +typedef enum { + FacebookAgentActionNone = 0, + FacebookAgentActionPublishFeed, + FacebookAgentActionSetStatus, + FacebookAgentActionAskPermission, + FacebookAgentActionUploadPhoto, + FacebookAgentActionUploadPhotoAskPermission, +}FacebookAgentAction; + +/** + * Implement this protocol to use FacebokAgent + */ +@protocol FacebookAgentDelegate + +@optional + +/** + * Must define this method if setStatus is called + * + * This method is called when user status is changed either successfully or not + */ +- (void) facebookAgent:(FacebookAgent*)agent statusChanged:(BOOL) success; + +/** + * Must define this method if shouldFetchUsernameAfterLogin is set YES + * + * This method is called after the agent fetched facebook profile name + */ +- (void) facebookAgent:(FacebookAgent*)agent didLoadName:(NSString*) name; + +/** + * Must define this method if uploadPhoto is called + * + * This method is called after photo is uploaded + */ +- (void) facebookAgent:(FacebookAgent*)agent photoUploaded:(NSString*) pid; + +/** + * Must impement this method if any of the above method is defined + * + * This method is called if the agent fails to perform any of the above three actions + */ +- (void) facebookAgent:(FacebookAgent*)agent requestFaild:(NSString*) message; + +@required + +/** + * This method is called if after login or logout + */ +- (void) facebookAgent:(FacebookAgent*)agent loginStatus:(BOOL) loggedIn; +@end + +/** + * FacebookAgent is a simple class to help integrate facebook connect into your app. + * + * We often need to use facebook share in our apps which requires some repeatative + * work such as update copy the facebook connect source, update,project settings, + * write delegate methods etc. + * + * This class will minimize those hastle. Just add this folder, you don't need to + * update any project settings! + * + * TODO How to use: + */ +@interface FacebookAgent : NSObject { + + /** + * Delegate + */ + id delegate; + + /** + * Facebook application api key + */ + NSString* FBApiKey; + + /** + * Facebook application api secret + */ + NSString* FBApiSecret; + + /** + * Facebook application proxy, optional + */ + NSString* FBApiProxy; + + /** + * Facebook session + */ + FBSession* _session; + + /** + * Flag indicating session login status + */ + BOOL isLoggedIn; + + /** + * Flag indicating if fb username should be fetched after log in + */ + BOOL shouldFetchUsernameAfterLogin; + + + /** + * Variables related to feed posting + */ + NSString* attachment; + NSString* userPrompt; + NSString* targetUserId; + + /** + * Stores the action type. This is used if the user is not logged in. + * Then agent first logs in and calls the last action + */ + FacebookAgentAction pendingAction; + NSString* newStatus; + + // needed for uploading image + NSData* uploadImageData; + NSString* uploadImageCaption; + NSString* uploadImageAlbum; + + /** + * Flag indicating if permission is asked for update status + */ + BOOL updateStatusPending; + + /** + * Flag indicating if permission is asked for upload photo to an album + */ + BOOL uploadPhotoPending; + + /** + * Try to resume the session first before login? + */ + BOOL shouldResumeSession; +} + +/** + * Login to facebook + */ + +- (void) login; + + +/** + * Logout from facebook + */ +-(void) logout; + +/** + * You must initize using this method. + */ +- (id)initWithApiKey:(NSString*)key ApiSecret:(NSString*) secret ApiProxy:(NSString*)proxy; + +/** + * Use this method to obtain extended permission by the user + */ +- (void) askPermission; + +/** + * Make your own attachment and publish feed. + * + * User prompt will be: What's on your mind? + */ +- (void) publishFeed:(NSString*)attachement; + +/** + * Make your own attachment and publish feed with the user prompt. + * + */ +- (void) publishFeed:(NSString*)attachement + userMessagePrompt:(NSString*)prompt ; + +/** + * Make your own attachment and publish feed with the user prompt to the target user id. + * + */ +- (void) publishFeed:(NSString*)attachement + userMessagePrompt:(NSString*)prompt + targetId:(NSString*)target; + +/** + * Let the agent make attachement for you. You just pass the information + * + */ +- (void) publishFeedWithName:(NSString*)name + captionText:(NSString*)caption + imageurl:(NSString*)url + linkurl:(NSString*)href + userMessagePrompt:(NSString*)prompt; + + +/** + * Let the agent make attachement for you. You just pass the information + * + * The feed will be targetted to the target user id + */ +- (void) publishFeedWithName:(NSString*)name + captionText:(NSString*)caption + imageurl:(NSString*)url + linkurl:(NSString*)href + userMessagePrompt:(NSString*)prompt + targetId:(NSString*)target; + +// UPDATE: Support for action link. One action link can be added. +/** + * Let the agent make attachement for you. You just pass the information + * + */ +- (void) publishFeedWithName:(NSString*)name + captionText:(NSString*)caption + imageurl:(NSString*)url + linkurl:(NSString*)href + userMessagePrompt:(NSString*)prompt + actionLabel:(NSString*)label + actionText:(NSString*)text + actionLink:(NSString*)link; + +/** + * Let the agent make attachement for you. You just pass the information + * + */ +- (void) publishFeedWithName:(NSString*)name + captionText:(NSString*)caption + imageurl:(NSString*)url + linkurl:(NSString*)href + userMessagePrompt:(NSString*)prompt + actionLabel:(NSString*)label + actionText:(NSString*)text + actionLink:(NSString*)link + targetId:(NSString*)target; + + +- (void) setStatus:(NSString*)status; + +/** + * Upload photo + */ +- (void) uploadPhoto:(NSString*)imageurl; +- (void) uploadPhotoAtURL:(NSString*)imageurl withCaption:(NSString*)captionOrNil toAlbum:(NSString*)aidOrNil; +- (void) uploadPhotoAsData:(NSData*)imagedata withCaption:(NSString*)captionOrNil toAlbum:(NSString*)aidOrNil; + +/** + * Upload photo with status + */ +- (void) uploadPhoto:(NSString*)imageurl withStatus:(NSString*)status; +- (void) uploadPhotoAtURL:(NSString*)imageurl withStatus:(NSString*)status caption:(NSString*)captionOrNil toAlbum:(NSString*)aidOrNil; +- (void) uploadPhotoAsData:(NSData*)imagedata withStatus:(NSString*)status caption:(NSString*)captionOrNil toAlbum:(NSString*)aidOrNil; + + +/** + * Ask permission to auto approve uploaded photo and add photo to an album. + */ +- (void) askUplaoadPhotoToAlbumPermission; +- (void) getAlbumList; + + +@property (nonatomic, assign) BOOL isLoggedIn; +@property (nonatomic, assign) BOOL shouldResumeSession; +@property (nonatomic, assign) BOOL shouldFetchUsernameAfterLogin; +@property (nonatomic,assign) id delegate; + +@property (nonatomic, retain) NSString* attachment; +@property (nonatomic, retain) NSString* targetUserId; +@property (nonatomic, retain) NSString* userPrompt; + +@property (nonatomic, retain) NSString* newStatus; +@property (nonatomic, retain) NSData* uploadImageData; +@property (nonatomic, retain) NSString* uploadImageCaption; +@property (nonatomic, retain) NSString* uploadImageAlbum; +@end diff --git a/Classes/Libraries/FacebookAgent/.svn/text-base/FacebookAgent.m.svn-base b/Classes/Libraries/FacebookAgent/.svn/text-base/FacebookAgent.m.svn-base new file mode 100644 index 0000000..403556f --- /dev/null +++ b/Classes/Libraries/FacebookAgent/.svn/text-base/FacebookAgent.m.svn-base @@ -0,0 +1,517 @@ +// +// FacebookAgent.m +// Pagination +// +// Created by Shaikh Sonny Aman on 1/6/10. +// Copyright 2010 SHAIKH SONNY AMAN :) . All rights reserved. +// + +#import "FacebookAgent.h" + +/** + * Private methods + */ +@interface FacebookAgent() +-(void)postFeed; +-(void)uploadImage; +@end + +@implementation FacebookAgent + +@synthesize isLoggedIn; +@synthesize shouldFetchUsernameAfterLogin; +@synthesize delegate; +@synthesize userPrompt; +@synthesize targetUserId; +@synthesize attachment; +@synthesize newStatus; +@synthesize uploadImageData; +@synthesize uploadImageCaption; +@synthesize uploadImageAlbum; +@synthesize shouldResumeSession; + +- (id)init{ + UIAlertView* alert = [[UIAlertView alloc] initWithTitle:@"FacebookAgent Intialization error!" + message:@"Please don't use init or new method to initialze. Only use this method:- (id)initWithApiKey:(NSString*)key ApiSecret:(NSString*) secret ApiProxy:(NSString*)proxy;" + delegate:nil + cancelButtonTitle:@"Close" + otherButtonTitles:nil]; + [alert show]; + [alert release]; + return nil; +} +- (id)initWithApiKey:(NSString*)key ApiSecret:(NSString*)secret ApiProxy:(NSString*)proxy{ + if( (self = [super init]) ){ + + // Initialize + pendingAction = FacebookAgentActionNone; + + FBApiKey = [key retain]; + FBApiSecret = [secret retain]; + FBApiProxy = [proxy retain]; + + isLoggedIn = NO; + updateStatusPending = NO; + + if (FBApiProxy) { + _session = [[FBSession sessionForApplication:FBApiKey getSessionProxy:FBApiProxy + delegate:self] retain]; + } else { + _session = [[FBSession sessionForApplication:FBApiKey secret:FBApiSecret delegate:self] retain]; + } + + return self; + } + return nil; +} + +- (void)dealloc{ + [FBApiKey release]; + [FBApiSecret release]; + [FBApiProxy release]; + [_session release]; + + [attachment release]; + [userPrompt release]; + [targetUserId release]; + + [newStatus release]; + + [uploadImageData release]; + [uploadImageCaption release]; + [uploadImageAlbum release]; + + [super dealloc]; +} + + + +- (void) login{ + if(shouldResumeSession){ // try to resume first + if(! [_session resume] ){ + if(_session.isConnected){ + // Alert already logged in? + }else{ + FBLoginDialog* dialog = [[[FBLoginDialog alloc] initWithSession:_session] autorelease]; + [dialog show]; + } + } + }else { + if(_session.isConnected){ + // Alert already logged in? + }else{ + FBLoginDialog* dialog = [[[FBLoginDialog alloc] initWithSession:_session] autorelease]; + [dialog show]; + } + } +} +-(void) logout{ + if(_session.isConnected){ + [_session logout]; + }else{ + //alert already logged out? + } +} +- (void) askPermission{ + if(!isLoggedIn){ + pendingAction = FacebookAgentActionAskPermission; + [self login]; + return; + } + FBPermissionDialog* dialog = [[[FBPermissionDialog alloc] init] autorelease]; + dialog.delegate = self; + dialog.permission = @"status_update"; + [dialog show]; +} + +- (void) setStatus:(NSString*)status{ + self.newStatus = status; + + if(!isLoggedIn){ + pendingAction = FacebookAgentActionSetStatus; + [self login]; + return; + } + + updateStatusPending = YES; + [self askPermission]; +} +- (void) uploadPhoto:(NSString*)imageurl{ + NSURL *url = [NSURL URLWithString:imageurl]; + NSData *data = [NSData dataWithContentsOfURL:url]; + UIImage *img = [[UIImage alloc] initWithData:data]; + + self.uploadImageData = (NSData*)img; + self.uploadImageCaption = nil; + self.uploadImageAlbum = nil; + + [self uploadPhotoAsData:uploadImageData withCaption:uploadImageCaption toAlbum:uploadImageAlbum]; +} + +- (void) uploadPhotoAtURL:(NSString*)imageurl withCaption:(NSString*)captionOrNil toAlbum:(NSString*)aidOrNil{ + NSURL *url = [NSURL URLWithString:imageurl]; + NSData *data = [NSData dataWithContentsOfURL:url]; + //UIImage *img = [[UIImage alloc] initWithData:data]; + + self.uploadImageData = data; + self.uploadImageCaption = captionOrNil; + self.uploadImageAlbum = aidOrNil; + + [self uploadPhotoAsData:uploadImageData withCaption:uploadImageCaption toAlbum:uploadImageAlbum]; +} +- (void) uploadPhotoAsData:(NSData*)imagedata withCaption:(NSString*)captionOrNil toAlbum:(NSString*)aidOrNil{ + if(!uploadImageData){ + self.uploadImageData = imagedata; + } + + if(!uploadImageCaption){ + self.uploadImageCaption = captionOrNil; + } + if(!uploadImageAlbum){ + self.uploadImageAlbum = aidOrNil; + } + + + if(!isLoggedIn){ + pendingAction = FacebookAgentActionUploadPhoto; + [self login]; + return; + } + + if(uploadImageAlbum){ + uploadPhotoPending = YES; + [self askUplaoadPhotoToAlbumPermission]; + return; + } + [self uploadImage]; +} + +- (void) uploadPhoto:(NSString*)imageurl withStatus:(NSString*)status{ + self.newStatus = status; + [self uploadPhoto:imageurl]; +} +- (void) uploadPhotoAtURL:(NSString*)imageurl withStatus:(NSString*)status caption:(NSString*)captionOrNil toAlbum:(NSString*)aidOrNil{ + self.newStatus = status; + [self uploadPhotoAtURL:imageurl withCaption:captionOrNil toAlbum:aidOrNil]; +} +- (void) uploadPhotoAsData:(NSData*)imagedata withStatus:(NSString*)status caption:(NSString*)captionOrNil toAlbum:(NSString*)aidOrNil{ + self.newStatus = status; + [self uploadPhotoAsData:imagedata withCaption:captionOrNil toAlbum:aidOrNil]; +} + +-(void)uploadImage{ + NSDictionary *params; + if(uploadImageCaption){ + params = [NSDictionary dictionaryWithObjectsAndKeys:uploadImageCaption,@"caption",nil]; + if(uploadImageAlbum){ + [params setValue:uploadImageAlbum forKey:@"aid"]; + } + }else { + if(uploadImageAlbum){ + [params setValue:uploadImageAlbum forKey:@"aid"]; + } + } + + [[FBRequest requestWithDelegate:self] call:@"facebook.photos.upload" params:params dataParam:uploadImageData]; +} + +- (void) askUplaoadPhotoToAlbumPermission{ + if(!isLoggedIn){ + pendingAction = FacebookAgentActionUploadPhotoAskPermission; + [self login]; + return; + } + FBPermissionDialog* dialog = [[[FBPermissionDialog alloc] init] autorelease]; + dialog.delegate = self; + dialog.permission = @"photo_upload"; + [dialog show]; +} +- (void) getAlbumList{ + // TBD +} + + + +-(void)postFeed{ + if(!userPrompt){ + self.userPrompt = @"What's on your mind?"; + } + + if(isLoggedIn){ + FBStreamDialog* dialog = [[[FBStreamDialog alloc] init] autorelease]; + dialog.delegate = self; + dialog.attachment = attachment; + dialog.userMessagePrompt = userPrompt; + if(targetUserId){ + dialog.targetId = targetUserId; + } + [dialog show]; + }else { + pendingAction = FacebookAgentActionPublishFeed; + [self login]; + } + +} +- (void) postFeedWithName:(NSString*)name + captionText:(NSString*)caption + imageurl:(NSString*)url + linkurl:(NSString*)href + userMessagePrompt:(NSString*)prompt + actionLabel:(NSString*)label + actionText:(NSString*)text + actionLink:(NSString*)link + targetId:(NSString*)target{ + + url = [url stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; + href = [href stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; + NSString* att; + if( label && text){ + if(link){ // text as action link + att = [NSString stringWithFormat:@"{\"name\":\"%@\",\"caption\":\"%@\",\"description\":\"%@\",\"media\":[{\"type\":\"image\",\"src\":\"%@\",\"href\":\"%@\"}]," "\"properties\":{\"%@\":{\"text\":\"%@\",\"href\":\"%@\"}}}",name,caption,@"",url,href,label,text,link]; + }else { // only text but how? + //att = [NSString stringWithFormat:@"{\"name\":\"%@\",\"caption\":\"%@\",\"description\":\"%@\",\"media\":[{\"type\":\"image\",\"src\":\"%@\",\"href\":\"%@\"}]," "\"properties\":\"%@\":\"text\"}",name,caption,@"",url,href,label,text]; + return; + } + + + }else { + att = [NSString stringWithFormat:@"{\"name\":\"%@\",\"caption\":\"%@\",\"description\":\"%@\",\"media\":[{\"type\":\"image\",\"src\":\"%@\",\"href\":\"%@\"}]}",name,caption,@"",url,href]; + } + + + self.attachment = att; + self.userPrompt = prompt; + self.targetUserId = target; + [self postFeed]; + +} + +- (void) publishFeed:(NSString*)attachement{ + + self.attachment = attachement; + [self postFeed]; +} + + +- (void) publishFeed:(NSString*)attachement + userMessagePrompt:(NSString*)prompt{ + + self.attachment = attachement; + self.userPrompt = prompt; + [self postFeed]; +} + + +- (void) publishFeed:(NSString*)attachement + userMessagePrompt:(NSString*)prompt + targetId:(NSString*)target{ + + self.attachment = attachement; + self.userPrompt = prompt; + self.targetUserId = target; + [self postFeed]; +} + + +- (void) publishFeedWithName:(NSString*)name + captionText:(NSString*)caption + imageurl:(NSString*)url + linkurl:(NSString*)href + userMessagePrompt:(NSString*)prompt{ + + [self postFeedWithName:name + captionText:caption + imageurl:url + linkurl:href + userMessagePrompt:prompt + actionLabel:nil + actionText:nil + actionLink:nil + targetId:nil]; +} + + +- (void) publishFeedWithName:(NSString*)name + captionText:(NSString*)caption + imageurl:(NSString*)url + linkurl:(NSString*)href + userMessagePrompt:(NSString*)prompt + targetId:(NSString*)target{ + + [self postFeedWithName:name + captionText:caption + imageurl:url + linkurl:href + userMessagePrompt:prompt + actionLabel:nil + actionText:nil + actionLink:nil + targetId:target]; +} + +- (void) publishFeedWithName:(NSString*)name + captionText:(NSString*)caption + imageurl:(NSString*)url + linkurl:(NSString*)href + userMessagePrompt:(NSString*)prompt + actionLabel:(NSString*)label + actionText:(NSString*)text + actionLink:(NSString*)link{ + [self postFeedWithName:name + captionText:caption + imageurl:url + linkurl:href + userMessagePrompt:prompt + actionLabel:label + actionText:text + actionLink:link + targetId:nil]; +} + +- (void) publishFeedWithName:(NSString*)name + captionText:(NSString*)caption + imageurl:(NSString*)url + linkurl:(NSString*)href + userMessagePrompt:(NSString*)prompt + actionLabel:(NSString*)label + actionText:(NSString*)text + actionLink:(NSString*)link + targetId:(NSString*)target{ + [self postFeedWithName:name + captionText:caption + imageurl:url + linkurl:href + userMessagePrompt:prompt + actionLabel:label + actionText:text + actionLink:link + targetId:target]; +} + +#pragma mark FBSessionDelegate +- (void)session:(FBSession*)session didLogin:(FBUID)uid { + isLoggedIn = YES; + + [delegate facebookAgent:self loginStatus:YES]; + + if(shouldFetchUsernameAfterLogin){ + NSString* fql = [NSString stringWithFormat: + @"select uid,name from user where uid == %lld", session.uid]; + NSDictionary* params = [NSDictionary dictionaryWithObject:fql forKey:@"query"]; + [[FBRequest requestWithDelegate:self] call:@"facebook.fql.query" params:params]; + } + + if(pendingAction != FacebookAgentActionNone){ + switch (pendingAction) { + case FacebookAgentActionPublishFeed:{ + pendingAction = FacebookAgentActionNone; + [self postFeed]; + break; + } + case FacebookAgentActionAskPermission:{ + pendingAction = FacebookAgentActionNone; + [self askPermission]; + break; + } + case FacebookAgentActionSetStatus:{ + pendingAction = FacebookAgentActionNone; + [self setStatus:self.newStatus]; + break; + } + case FacebookAgentActionUploadPhoto:{ + pendingAction = FacebookAgentActionNone; + [self uploadImage]; + break; + } + case FacebookAgentActionUploadPhotoAskPermission:{ + pendingAction = FacebookAgentActionNone; + [self askUplaoadPhotoToAlbumPermission]; + break; + } + default: + break; + } + } +} +- (void)sessionDidNotLogin:(FBSession*)session { + isLoggedIn = NO; + [delegate facebookAgent:self loginStatus:NO]; +} + +- (void)sessionDidLogout:(FBSession*)session { + isLoggedIn = NO; + [delegate facebookAgent:self loginStatus:NO]; +} + +#pragma mark FBRequestDelegate +- (void)request:(FBRequest*)request didLoad:(id)result { + if ([request.method isEqualToString:@"facebook.fql.query"]) { + NSArray* users = result; + NSDictionary* user = [users objectAtIndex:0]; + NSString* name = [user objectForKey:@"name"]; + + // Calling the delegate callback + [delegate facebookAgent:self didLoadName:name]; + + } else if ([request.method isEqualToString:@"facebook.users.setStatus"]) { + newStatus = nil; + NSString* success = result; + if ([success isEqualToString:@"1"]) { + + // Calling the delegate callback + [delegate facebookAgent:self statusChanged:YES]; + + } else { + [delegate facebookAgent:self statusChanged:NO]; + } + } else if ([request.method isEqualToString:@"facebook.photos.upload"]) { + NSDictionary* photoInfo = result; + NSString* pid = [photoInfo objectForKey:@"pid"]; + + self.uploadImageData = nil; + self.uploadImageCaption = nil; + self.uploadImageAlbum = nil; + [delegate facebookAgent:self photoUploaded:pid]; + + if(newStatus){ + [self setStatus:newStatus]; + } + } +} + +- (void)request:(FBRequest*)request didFailWithError:(NSError*)error { + newStatus = nil; + NSString* msg = [NSString stringWithFormat:@"Error(%d) %@", error.code, + error.localizedDescription]; + + [delegate facebookAgent:self requestFaild:msg]; +} + + +#pragma mark FBDialogDelegate +- (void)dialogDidSucceed:(FBDialog*)dialog{ + if(updateStatusPending){ + updateStatusPending = NO; + NSDictionary *params = [NSDictionary dictionaryWithObjectsAndKeys: + self.newStatus, @"status", + @"true", @"status_includes_verb", + nil]; + [[FBRequest requestWithDelegate:self] call:@"facebook.users.setStatus" params:params]; + self.newStatus = nil; + return; + } + + if(uploadPhotoPending){ + uploadPhotoPending = NO; + [self uploadImage]; + } +} + +- (void)dialogDidCancel:(FBDialog*)dialog{ +} + +- (void)dialog:(FBDialog*)dialog didFailWithError:(NSError*)error{ +} + + +@end diff --git a/Classes/Libraries/FacebookAgent/FacebookAgent.h b/Classes/Libraries/FacebookAgent/FacebookAgent.h new file mode 100644 index 0000000..048d861 --- /dev/null +++ b/Classes/Libraries/FacebookAgent/FacebookAgent.h @@ -0,0 +1,285 @@ +// +// FacebookAgent.h +// Pagination +// +// Created by Shaikh Sonny Aman on 1/6/10. +// Copyright 2010 SHAIKH SONNY AMAN :) . All rights reserved. +// + +#import +#import "FBConnect.h" + +@class FacebookAgent; + +typedef enum { + FacebookAgentActionNone = 0, + FacebookAgentActionPublishFeed, + FacebookAgentActionSetStatus, + FacebookAgentActionAskPermission, + FacebookAgentActionUploadPhoto, + FacebookAgentActionUploadPhotoAskPermission, +}FacebookAgentAction; + +/** + * Implement this protocol to use FacebokAgent + */ +@protocol FacebookAgentDelegate + +@optional + +/** + * Must define this method if setStatus is called + * + * This method is called when user status is changed either successfully or not + */ +- (void) facebookAgent:(FacebookAgent*)agent statusChanged:(BOOL) success; + +/** + * Must define this method if shouldFetchUsernameAfterLogin is set YES + * + * This method is called after the agent fetched facebook profile name + */ +- (void) facebookAgent:(FacebookAgent*)agent didLoadName:(NSString*) name; + +/** + * Must define this method if uploadPhoto is called + * + * This method is called after photo is uploaded + */ +- (void) facebookAgent:(FacebookAgent*)agent photoUploaded:(NSString*) pid; + +/** + * Must impement this method if any of the above method is defined + * + * This method is called if the agent fails to perform any of the above three actions + */ +- (void) facebookAgent:(FacebookAgent*)agent requestFaild:(NSString*) message; + +@required + +/** + * This method is called if after login or logout + */ +- (void) facebookAgent:(FacebookAgent*)agent loginStatus:(BOOL) loggedIn; +@end + +/** + * FacebookAgent is a simple class to help integrate facebook connect into your app. + * + * We often need to use facebook share in our apps which requires some repeatative + * work such as update copy the facebook connect source, update,project settings, + * write delegate methods etc. + * + * This class will minimize those hastle. Just add this folder, you don't need to + * update any project settings! + * + * TODO How to use: + */ +@interface FacebookAgent : NSObject { + + /** + * Delegate + */ + id delegate; + + /** + * Facebook application api key + */ + NSString* FBApiKey; + + /** + * Facebook application api secret + */ + NSString* FBApiSecret; + + /** + * Facebook application proxy, optional + */ + NSString* FBApiProxy; + + /** + * Facebook session + */ + FBSession* _session; + + /** + * Flag indicating session login status + */ + BOOL isLoggedIn; + + /** + * Flag indicating if fb username should be fetched after log in + */ + BOOL shouldFetchUsernameAfterLogin; + + + /** + * Variables related to feed posting + */ + NSString* attachment; + NSString* userPrompt; + NSString* targetUserId; + + /** + * Stores the action type. This is used if the user is not logged in. + * Then agent first logs in and calls the last action + */ + FacebookAgentAction pendingAction; + NSString* newStatus; + + // needed for uploading image + NSData* uploadImageData; + NSString* uploadImageCaption; + NSString* uploadImageAlbum; + + /** + * Flag indicating if permission is asked for update status + */ + BOOL updateStatusPending; + + /** + * Flag indicating if permission is asked for upload photo to an album + */ + BOOL uploadPhotoPending; + + /** + * Try to resume the session first before login? + */ + BOOL shouldResumeSession; +} + +/** + * Login to facebook + */ + +- (void) login; + + +/** + * Logout from facebook + */ +-(void) logout; + +/** + * You must initize using this method. + */ +- (id)initWithApiKey:(NSString*)key ApiSecret:(NSString*) secret ApiProxy:(NSString*)proxy; + +/** + * Use this method to obtain extended permission by the user + */ +- (void) askPermission; + +/** + * Make your own attachment and publish feed. + * + * User prompt will be: What's on your mind? + */ +- (void) publishFeed:(NSString*)attachement; + +/** + * Make your own attachment and publish feed with the user prompt. + * + */ +- (void) publishFeed:(NSString*)attachement + userMessagePrompt:(NSString*)prompt ; + +/** + * Make your own attachment and publish feed with the user prompt to the target user id. + * + */ +- (void) publishFeed:(NSString*)attachement + userMessagePrompt:(NSString*)prompt + targetId:(NSString*)target; + +/** + * Let the agent make attachement for you. You just pass the information + * + */ +- (void) publishFeedWithName:(NSString*)name + captionText:(NSString*)caption + imageurl:(NSString*)url + linkurl:(NSString*)href + userMessagePrompt:(NSString*)prompt; + + +/** + * Let the agent make attachement for you. You just pass the information + * + * The feed will be targetted to the target user id + */ +- (void) publishFeedWithName:(NSString*)name + captionText:(NSString*)caption + imageurl:(NSString*)url + linkurl:(NSString*)href + userMessagePrompt:(NSString*)prompt + targetId:(NSString*)target; + +// UPDATE: Support for action link. One action link can be added. +/** + * Let the agent make attachement for you. You just pass the information + * + */ +- (void) publishFeedWithName:(NSString*)name + captionText:(NSString*)caption + imageurl:(NSString*)url + linkurl:(NSString*)href + userMessagePrompt:(NSString*)prompt + actionLabel:(NSString*)label + actionText:(NSString*)text + actionLink:(NSString*)link; + +/** + * Let the agent make attachement for you. You just pass the information + * + */ +- (void) publishFeedWithName:(NSString*)name + captionText:(NSString*)caption + imageurl:(NSString*)url + linkurl:(NSString*)href + userMessagePrompt:(NSString*)prompt + actionLabel:(NSString*)label + actionText:(NSString*)text + actionLink:(NSString*)link + targetId:(NSString*)target; + + +- (void) setStatus:(NSString*)status; + +/** + * Upload photo + */ +- (void) uploadPhoto:(NSString*)imageurl; +- (void) uploadPhoto1:(UIImage*)img; +- (void) uploadPhotoAtURL:(NSString*)imageurl withCaption:(NSString*)captionOrNil toAlbum:(NSString*)aidOrNil; +- (void) uploadPhotoAsData:(NSData*)imagedata withCaption:(NSString*)captionOrNil toAlbum:(NSString*)aidOrNil; + +/** + * Upload photo with status + */ +- (void) uploadPhoto:(NSString*)imageurl withStatus:(NSString*)status; +- (void) uploadPhotoAtURL:(NSString*)imageurl withStatus:(NSString*)status caption:(NSString*)captionOrNil toAlbum:(NSString*)aidOrNil; +- (void) uploadPhotoAsData:(NSData*)imagedata withStatus:(NSString*)status caption:(NSString*)captionOrNil toAlbum:(NSString*)aidOrNil; + + +/** + * Ask permission to auto approve uploaded photo and add photo to an album. + */ +- (void) askUplaoadPhotoToAlbumPermission; +- (void) getAlbumList; + + +@property (nonatomic, assign) BOOL isLoggedIn; +@property (nonatomic, assign) BOOL shouldResumeSession; +@property (nonatomic, assign) BOOL shouldFetchUsernameAfterLogin; +@property (nonatomic,assign) id delegate; + +@property (nonatomic, retain) NSString* attachment; +@property (nonatomic, retain) NSString* targetUserId; +@property (nonatomic, retain) NSString* userPrompt; + +@property (nonatomic, retain) NSString* newStatus; +@property (nonatomic, retain) NSData* uploadImageData; +@property (nonatomic, retain) NSString* uploadImageCaption; +@property (nonatomic, retain) NSString* uploadImageAlbum; +@end diff --git a/Classes/Libraries/FacebookAgent/FacebookAgent.m b/Classes/Libraries/FacebookAgent/FacebookAgent.m new file mode 100644 index 0000000..88c06e8 --- /dev/null +++ b/Classes/Libraries/FacebookAgent/FacebookAgent.m @@ -0,0 +1,531 @@ +// +// FacebookAgent.m +// Pagination +// +// Created by Shaikh Sonny Aman on 1/6/10. +// Copyright 2010 SHAIKH SONNY AMAN :) . All rights reserved. +// + +#import "FacebookAgent.h" + +/** + * Private methods + */ +@interface FacebookAgent() +-(void)postFeed; +-(void)uploadImage; +@end + +@implementation FacebookAgent + +@synthesize isLoggedIn; +@synthesize shouldFetchUsernameAfterLogin; +@synthesize delegate; +@synthesize userPrompt; +@synthesize targetUserId; +@synthesize attachment; +@synthesize newStatus; +@synthesize uploadImageData; +@synthesize uploadImageCaption; +@synthesize uploadImageAlbum; +@synthesize shouldResumeSession; + +- (id)init{ + UIAlertView* alert = [[UIAlertView alloc] initWithTitle:@"FacebookAgent Intialization error!" + message:@"Please don't use init or new method to initialze. Only use this method:- (id)initWithApiKey:(NSString*)key ApiSecret:(NSString*) secret ApiProxy:(NSString*)proxy;" + delegate:nil + cancelButtonTitle:@"Close" + otherButtonTitles:nil]; + [alert show]; + [alert release]; + return nil; +} +- (id)initWithApiKey:(NSString*)key ApiSecret:(NSString*)secret ApiProxy:(NSString*)proxy{ + if( (self = [super init]) ){ + + // Initialize + pendingAction = FacebookAgentActionNone; + + FBApiKey = [key retain]; + FBApiSecret = [secret retain]; + FBApiProxy = [proxy retain]; + + isLoggedIn = NO; + updateStatusPending = NO; + + if (FBApiProxy) { + _session = [[FBSession sessionForApplication:FBApiKey getSessionProxy:FBApiProxy + delegate:self] retain]; + } else { + _session = [[FBSession sessionForApplication:FBApiKey secret:FBApiSecret delegate:self] retain]; + } + + return self; + } + return nil; +} + +- (void)dealloc{ + [FBApiKey release]; + [FBApiSecret release]; + [FBApiProxy release]; + [_session release]; + + [attachment release]; + [userPrompt release]; + [targetUserId release]; + + [newStatus release]; + + [uploadImageData release]; + [uploadImageCaption release]; + [uploadImageAlbum release]; + + [super dealloc]; +} + + + +- (void) login{ + if(shouldResumeSession){ // try to resume first + if(! [_session resume] ){ + if(_session.isConnected){ + // Alert already logged in? + }else{ + FBLoginDialog* dialog = [[[FBLoginDialog alloc] initWithSession:_session] autorelease]; + [dialog show]; + } + } + }else { + if(_session.isConnected){ + // Alert already logged in? + }else{ + FBLoginDialog* dialog = [[[FBLoginDialog alloc] initWithSession:_session] autorelease]; + [dialog show]; + } + } +} +-(void) logout{ + if(_session.isConnected){ + [_session logout]; + }else{ + //alert already logged out? + } +} +- (void) askPermission{ + if(!isLoggedIn){ + pendingAction = FacebookAgentActionAskPermission; + [self login]; + return; + } + FBPermissionDialog* dialog = [[[FBPermissionDialog alloc] init] autorelease]; + dialog.delegate = self; + dialog.permission = @"status_update"; + [dialog show]; +} + +- (void) setStatus:(NSString*)status{ + self.newStatus = status; + + if(!isLoggedIn){ + pendingAction = FacebookAgentActionSetStatus; + [self login]; + return; + } + + updateStatusPending = YES; + [self askPermission]; +} + +- (void) uploadPhoto:(NSString*)imageurl{ + //NSURL *url = [NSURL URLWithString:imageurl]; +// NSData *data = [NSData dataWithContentsOfURL:url]; + NSData *data = [NSData dataWithContentsOfFile:imageurl]; + UIImage *img = [[UIImage alloc] initWithData:data]; + + self.uploadImageData = (NSData*)img; + self.uploadImageCaption = nil; + self.uploadImageAlbum = nil; + + [self uploadPhotoAsData:uploadImageData withCaption:uploadImageCaption toAlbum:uploadImageAlbum]; +} +- (void) uploadPhoto1:(UIImage*)img +{ + //NSURL *url = [NSURL URLWithString:imageurl]; + // NSData *data = [NSData dataWithContentsOfURL:url]; + //NSData *data = [NSData dataWithContentsOfFile:imageurl]; +// UIImage *img = [[UIImage alloc] initWithData:data]; + + self.uploadImageData = (NSData*)img; + self.uploadImageCaption = nil; + self.uploadImageAlbum = nil; + + [self uploadPhotoAsData:uploadImageData withCaption:uploadImageCaption toAlbum:uploadImageAlbum]; +} +- (void) uploadPhotoAtURL:(NSString*)imageurl withCaption:(NSString*)captionOrNil toAlbum:(NSString*)aidOrNil{ + NSURL *url = [NSURL URLWithString:imageurl]; + NSData *data = [NSData dataWithContentsOfURL:url]; + //UIImage *img = [[UIImage alloc] initWithData:data]; + + self.uploadImageData = data; + self.uploadImageCaption = captionOrNil; + self.uploadImageAlbum = aidOrNil; + + [self uploadPhotoAsData:uploadImageData withCaption:uploadImageCaption toAlbum:uploadImageAlbum]; +} +- (void) uploadPhotoAsData:(NSData*)imagedata withCaption:(NSString*)captionOrNil toAlbum:(NSString*)aidOrNil{ + if(!uploadImageData){ + self.uploadImageData = imagedata; + } + + if(!uploadImageCaption){ + self.uploadImageCaption = captionOrNil; + } + if(!uploadImageAlbum){ + self.uploadImageAlbum = aidOrNil; + } + + + if(!isLoggedIn){ + pendingAction = FacebookAgentActionUploadPhoto; + [self login]; + return; + } + + if(uploadImageAlbum){ + uploadPhotoPending = YES; + [self askUplaoadPhotoToAlbumPermission]; + return; + } + [self uploadImage]; +} + +- (void) uploadPhoto:(NSString*)imageurl withStatus:(NSString*)status{ + self.newStatus = status; + [self uploadPhoto:imageurl]; +} +- (void) uploadPhotoAtURL:(NSString*)imageurl withStatus:(NSString*)status caption:(NSString*)captionOrNil toAlbum:(NSString*)aidOrNil{ + self.newStatus = status; + [self uploadPhotoAtURL:imageurl withCaption:captionOrNil toAlbum:aidOrNil]; +} +- (void) uploadPhotoAsData:(NSData*)imagedata withStatus:(NSString*)status caption:(NSString*)captionOrNil toAlbum:(NSString*)aidOrNil{ + self.newStatus = status; + [self uploadPhotoAsData:imagedata withCaption:captionOrNil toAlbum:aidOrNil]; +} + +-(void)uploadImage{ + NSDictionary *params; + if(uploadImageCaption){ + params = [NSDictionary dictionaryWithObjectsAndKeys:uploadImageCaption,@"caption",nil]; + if(uploadImageAlbum){ + [params setValue:uploadImageAlbum forKey:@"aid"]; + } + }else { + if(uploadImageAlbum){ + [params setValue:uploadImageAlbum forKey:@"aid"]; + } + } + + [[FBRequest requestWithDelegate:self] call:@"facebook.photos.upload" params:params dataParam:uploadImageData]; +} + +- (void) askUplaoadPhotoToAlbumPermission{ + if(!isLoggedIn){ + pendingAction = FacebookAgentActionUploadPhotoAskPermission; + [self login]; + return; + } + FBPermissionDialog* dialog = [[[FBPermissionDialog alloc] init] autorelease]; + dialog.delegate = self; + dialog.permission = @"photo_upload"; + [dialog show]; +} +- (void) getAlbumList{ + // TBD +} + + + +-(void)postFeed{ + if(!userPrompt){ + self.userPrompt = @"What's on your mind?"; + } + + if(isLoggedIn){ + FBStreamDialog* dialog = [[[FBStreamDialog alloc] init] autorelease]; + dialog.delegate = self; + dialog.attachment = attachment; + dialog.userMessagePrompt = userPrompt; + if(targetUserId){ + dialog.targetId = targetUserId; + } + [dialog show]; + }else { + pendingAction = FacebookAgentActionPublishFeed; + [self login]; + } + +} +- (void) postFeedWithName:(NSString*)name + captionText:(NSString*)caption + imageurl:(NSString*)url + linkurl:(NSString*)href + userMessagePrompt:(NSString*)prompt + actionLabel:(NSString*)label + actionText:(NSString*)text + actionLink:(NSString*)link + targetId:(NSString*)target{ + + url = [url stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; + href = [href stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; + NSString* att; + if( label && text){ + if(link){ // text as action link + att = [NSString stringWithFormat:@"{\"name\":\"%@\",\"caption\":\"%@\",\"description\":\"%@\",\"media\":[{\"type\":\"image\",\"src\":\"%@\",\"href\":\"%@\"}]," "\"properties\":{\"%@\":{\"text\":\"%@\",\"href\":\"%@\"}}}",name,caption,@"",url,href,label,text,link]; + }else { // only text but how? + //att = [NSString stringWithFormat:@"{\"name\":\"%@\",\"caption\":\"%@\",\"description\":\"%@\",\"media\":[{\"type\":\"image\",\"src\":\"%@\",\"href\":\"%@\"}]," "\"properties\":\"%@\":\"text\"}",name,caption,@"",url,href,label,text]; + return; + } + + + }else { + att = [NSString stringWithFormat:@"{\"name\":\"%@\",\"caption\":\"%@\",\"description\":\"%@\",\"media\":[{\"type\":\"image\",\"src\":\"%@\",\"href\":\"%@\"}]}",name,caption,@"",url,href]; + } + + + self.attachment = att; + self.userPrompt = prompt; + self.targetUserId = target; + [self postFeed]; + +} + +- (void) publishFeed:(NSString*)attachement{ + + self.attachment = attachement; + [self postFeed]; +} + + +- (void) publishFeed:(NSString*)attachement + userMessagePrompt:(NSString*)prompt{ + + self.attachment = attachement; + self.userPrompt = prompt; + [self postFeed]; +} + + +- (void) publishFeed:(NSString*)attachement + userMessagePrompt:(NSString*)prompt + targetId:(NSString*)target{ + + self.attachment = attachement; + self.userPrompt = prompt; + self.targetUserId = target; + [self postFeed]; +} + + +- (void) publishFeedWithName:(NSString*)name + captionText:(NSString*)caption + imageurl:(NSString*)url + linkurl:(NSString*)href + userMessagePrompt:(NSString*)prompt{ + + [self postFeedWithName:name + captionText:caption + imageurl:url + linkurl:href + userMessagePrompt:prompt + actionLabel:nil + actionText:nil + actionLink:nil + targetId:nil]; +} + + +- (void) publishFeedWithName:(NSString*)name + captionText:(NSString*)caption + imageurl:(NSString*)url + linkurl:(NSString*)href + userMessagePrompt:(NSString*)prompt + targetId:(NSString*)target{ + + [self postFeedWithName:name + captionText:caption + imageurl:url + linkurl:href + userMessagePrompt:prompt + actionLabel:nil + actionText:nil + actionLink:nil + targetId:target]; +} + +- (void) publishFeedWithName:(NSString*)name + captionText:(NSString*)caption + imageurl:(NSString*)url + linkurl:(NSString*)href + userMessagePrompt:(NSString*)prompt + actionLabel:(NSString*)label + actionText:(NSString*)text + actionLink:(NSString*)link{ + [self postFeedWithName:name + captionText:caption + imageurl:url + linkurl:href + userMessagePrompt:prompt + actionLabel:label + actionText:text + actionLink:link + targetId:nil]; +} + +- (void) publishFeedWithName:(NSString*)name + captionText:(NSString*)caption + imageurl:(NSString*)url + linkurl:(NSString*)href + userMessagePrompt:(NSString*)prompt + actionLabel:(NSString*)label + actionText:(NSString*)text + actionLink:(NSString*)link + targetId:(NSString*)target{ + [self postFeedWithName:name + captionText:caption + imageurl:url + linkurl:href + userMessagePrompt:prompt + actionLabel:label + actionText:text + actionLink:link + targetId:target]; +} + +#pragma mark FBSessionDelegate +- (void)session:(FBSession*)session didLogin:(FBUID)uid { + isLoggedIn = YES; + + [delegate facebookAgent:self loginStatus:YES]; + + if(shouldFetchUsernameAfterLogin){ + NSString* fql = [NSString stringWithFormat: + @"select uid,name from user where uid == %lld", session.uid]; + NSDictionary* params = [NSDictionary dictionaryWithObject:fql forKey:@"query"]; + [[FBRequest requestWithDelegate:self] call:@"facebook.fql.query" params:params]; + } + + if(pendingAction != FacebookAgentActionNone){ + switch (pendingAction) { + case FacebookAgentActionPublishFeed:{ + pendingAction = FacebookAgentActionNone; + [self postFeed]; + break; + } + case FacebookAgentActionAskPermission:{ + pendingAction = FacebookAgentActionNone; + [self askPermission]; + break; + } + case FacebookAgentActionSetStatus:{ + pendingAction = FacebookAgentActionNone; + [self setStatus:self.newStatus]; + break; + } + case FacebookAgentActionUploadPhoto:{ + pendingAction = FacebookAgentActionNone; + [self uploadImage]; + break; + } + case FacebookAgentActionUploadPhotoAskPermission:{ + pendingAction = FacebookAgentActionNone; + [self askUplaoadPhotoToAlbumPermission]; + break; + } + default: + break; + } + } +} +- (void)sessionDidNotLogin:(FBSession*)session { + isLoggedIn = NO; + [delegate facebookAgent:self loginStatus:NO]; +} + +- (void)sessionDidLogout:(FBSession*)session { + isLoggedIn = NO; + [delegate facebookAgent:self loginStatus:NO]; +} + +#pragma mark FBRequestDelegate +- (void)request:(FBRequest*)request didLoad:(id)result { + if ([request.method isEqualToString:@"facebook.fql.query"]) { + NSArray* users = result; + NSDictionary* user = [users objectAtIndex:0]; + NSString* name = [user objectForKey:@"name"]; + + // Calling the delegate callback + [delegate facebookAgent:self didLoadName:name]; + + } else if ([request.method isEqualToString:@"facebook.users.setStatus"]) { + newStatus = nil; + NSString* success = result; + if ([success isEqualToString:@"1"]) { + + // Calling the delegate callback + [delegate facebookAgent:self statusChanged:YES]; + + } else { + [delegate facebookAgent:self statusChanged:NO]; + } + } else if ([request.method isEqualToString:@"facebook.photos.upload"]) { + NSDictionary* photoInfo = result; + NSString* pid = [photoInfo objectForKey:@"pid"]; + + self.uploadImageData = nil; + self.uploadImageCaption = nil; + self.uploadImageAlbum = nil; + [delegate facebookAgent:self photoUploaded:pid]; + + if(newStatus){ + [self setStatus:newStatus]; + } + } +} + +- (void)request:(FBRequest*)request didFailWithError:(NSError*)error { + newStatus = nil; + NSString* msg = [NSString stringWithFormat:@"Error(%d) %@", error.code, + error.localizedDescription]; + + [delegate facebookAgent:self requestFaild:msg]; +} + + +#pragma mark FBDialogDelegate +- (void)dialogDidSucceed:(FBDialog*)dialog{ + if(updateStatusPending){ + updateStatusPending = NO; + NSDictionary *params = [NSDictionary dictionaryWithObjectsAndKeys: + self.newStatus, @"status", + @"true", @"status_includes_verb", + nil]; + [[FBRequest requestWithDelegate:self] call:@"facebook.users.setStatus" params:params]; + self.newStatus = nil; + return; + } + + if(uploadPhotoPending){ + uploadPhotoPending = NO; + [self uploadImage]; + } +} + +- (void)dialogDidCancel:(FBDialog*)dialog{ +} + +- (void)dialog:(FBDialog*)dialog didFailWithError:(NSError*)error{ +} + + +@end diff --git a/Classes/Libraries/FacebookAgent/src/.svn/all-wcprops b/Classes/Libraries/FacebookAgent/src/.svn/all-wcprops new file mode 100644 index 0000000..b280ae7 --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/.svn/all-wcprops @@ -0,0 +1,71 @@ +K 25 +svn:wc:ra_dav:version-url +V 55 +/uc2/!svn/ver/10/iphone/trunk/Classes/FacebookAgent/src +END +FBXMLHandler.m +K 25 +svn:wc:ra_dav:version-url +V 70 +/uc2/!svn/ver/10/iphone/trunk/Classes/FacebookAgent/src/FBXMLHandler.m +END +FBDialog.m +K 25 +svn:wc:ra_dav:version-url +V 66 +/uc2/!svn/ver/10/iphone/trunk/Classes/FacebookAgent/src/FBDialog.m +END +FBFeedDialog.m +K 25 +svn:wc:ra_dav:version-url +V 70 +/uc2/!svn/ver/10/iphone/trunk/Classes/FacebookAgent/src/FBFeedDialog.m +END +FBSession.m +K 25 +svn:wc:ra_dav:version-url +V 67 +/uc2/!svn/ver/10/iphone/trunk/Classes/FacebookAgent/src/FBSession.m +END +FBLoginButton.m +K 25 +svn:wc:ra_dav:version-url +V 71 +/uc2/!svn/ver/10/iphone/trunk/Classes/FacebookAgent/src/FBLoginButton.m +END +FBLoginDialog.m +K 25 +svn:wc:ra_dav:version-url +V 71 +/uc2/!svn/ver/10/iphone/trunk/Classes/FacebookAgent/src/FBLoginDialog.m +END +FBPermissionDialog.m +K 25 +svn:wc:ra_dav:version-url +V 76 +/uc2/!svn/ver/10/iphone/trunk/Classes/FacebookAgent/src/FBPermissionDialog.m +END +FBRequest.m +K 25 +svn:wc:ra_dav:version-url +V 67 +/uc2/!svn/ver/10/iphone/trunk/Classes/FacebookAgent/src/FBRequest.m +END +FBXMLHandler.h +K 25 +svn:wc:ra_dav:version-url +V 70 +/uc2/!svn/ver/10/iphone/trunk/Classes/FacebookAgent/src/FBXMLHandler.h +END +FBConnectGlobal.m +K 25 +svn:wc:ra_dav:version-url +V 73 +/uc2/!svn/ver/10/iphone/trunk/Classes/FacebookAgent/src/FBConnectGlobal.m +END +FBStreamDialog.m +K 25 +svn:wc:ra_dav:version-url +V 72 +/uc2/!svn/ver/10/iphone/trunk/Classes/FacebookAgent/src/FBStreamDialog.m +END diff --git a/Classes/Libraries/FacebookAgent/src/.svn/entries b/Classes/Libraries/FacebookAgent/src/.svn/entries new file mode 100644 index 0000000..bdebbdb --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/.svn/entries @@ -0,0 +1,163 @@ +8 + +dir +10 +https://geniteam1@geniteam.svn.cvsdude.com/uc2/iphone/trunk/Classes/FacebookAgent/src +https://geniteam1@geniteam.svn.cvsdude.com/uc2 + + + +2010-03-02T06:40:08.984918Z +10 +rizwanyousaf + + +svn:special svn:externals svn:needs-lock + + + + + + + + + + + +77bba3fe-c5a6-4b36-a80a-631b2adb4aff + +FBConnect +dir + +FBXMLHandler.m +file + + + + +2010-03-02T06:46:30.000000Z +407652bca608aa8799dc4327178a7cf7 +2010-03-02T06:40:08.984918Z +10 +rizwanyousaf + +FBDialog.m +file + + + + +2010-03-02T06:46:30.000000Z +4c241d08a32306b471dcd27a3ac36325 +2010-03-02T06:40:08.984918Z +10 +rizwanyousaf + +FBFeedDialog.m +file + + + + +2010-03-02T06:46:30.000000Z +2c9d48192e073e41f2a8d24cea6c54af +2010-03-02T06:40:08.984918Z +10 +rizwanyousaf + +FBSession.m +file + + + + +2010-03-02T06:46:30.000000Z +45daf8b56328a644f361972e121874c4 +2010-03-02T06:40:08.984918Z +10 +rizwanyousaf + +FBLoginButton.m +file + + + + +2010-03-02T06:46:30.000000Z +f18c33f60e7ab1cbd646508e17ac1c8e +2010-03-02T06:40:08.984918Z +10 +rizwanyousaf + +FBLoginDialog.m +file + + + + +2010-03-02T06:46:30.000000Z +598130cfa0b391327cfb6181cccef6ff +2010-03-02T06:40:08.984918Z +10 +rizwanyousaf + +FBPermissionDialog.m +file + + + + +2010-03-02T06:46:30.000000Z +950813652832c1ec75d672e6981c52f0 +2010-03-02T06:40:08.984918Z +10 +rizwanyousaf + +FBRequest.m +file + + + + +2010-03-02T06:46:30.000000Z +682e544b0d381f7e3c45fe6701eddd57 +2010-03-02T06:40:08.984918Z +10 +rizwanyousaf + +FBXMLHandler.h +file + + + + +2010-03-02T06:46:30.000000Z +9248e7f15ad06825853dce9280c951b5 +2010-03-02T06:40:08.984918Z +10 +rizwanyousaf + +FBConnectGlobal.m +file + + + + +2010-03-02T06:46:30.000000Z +c2ebe62a411cf45347260af1bf7dfb92 +2010-03-02T06:40:08.984918Z +10 +rizwanyousaf + +FBStreamDialog.m +file + + + + +2010-03-02T06:46:30.000000Z +a4272e16072538c89b064bd27d18115f +2010-03-02T06:40:08.984918Z +10 +rizwanyousaf + diff --git a/Classes/Libraries/FacebookAgent/src/.svn/format b/Classes/Libraries/FacebookAgent/src/.svn/format new file mode 100644 index 0000000..45a4fb7 --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/.svn/format @@ -0,0 +1 @@ +8 diff --git a/Classes/Libraries/FacebookAgent/src/.svn/text-base/FBConnectGlobal.m.svn-base b/Classes/Libraries/FacebookAgent/src/.svn/text-base/FBConnectGlobal.m.svn-base new file mode 100644 index 0000000..4fa6307 --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/.svn/text-base/FBConnectGlobal.m.svn-base @@ -0,0 +1,35 @@ +/* + * Copyright 2009 Facebook + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ + +#import "FBConnectGlobal.h" + +const NSString* kFB_SDK_VersionNumber = @"iphone/1.1"; + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// private + +const void* RetainNoOp(CFAllocatorRef allocator, const void *value) { return value; } +void ReleaseNoOp(CFAllocatorRef allocator, const void *value) { } + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// public + +NSMutableArray* FBCreateNonRetainingArray() { + CFArrayCallBacks callbacks = kCFTypeArrayCallBacks; + callbacks.retain = RetainNoOp; + callbacks.release = ReleaseNoOp; + return (NSMutableArray*)CFArrayCreateMutable(nil, 0, &callbacks); +} diff --git a/Classes/Libraries/FacebookAgent/src/.svn/text-base/FBDialog.m.svn-base b/Classes/Libraries/FacebookAgent/src/.svn/text-base/FBDialog.m.svn-base new file mode 100644 index 0000000..3c0dcf5 --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/.svn/text-base/FBDialog.m.svn-base @@ -0,0 +1,606 @@ +/* + * Copyright 2009 Facebook + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ + +#import "FBDialog.h" +#import "FBSession.h" + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// global + +static NSString* kDefaultTitle = @"Connect to Facebook"; +static NSString* kStringBoundary = @"3i2ndDfv2rTHiSisAbouNdArYfORhtTPEefj3q2f"; + +static CGFloat kFacebookBlue[4] = {0.42578125, 0.515625, 0.703125, 1.0}; +static CGFloat kBorderGray[4] = {0.3, 0.3, 0.3, 0.8}; +static CGFloat kBorderBlack[4] = {0.3, 0.3, 0.3, 1}; +static CGFloat kBorderBlue[4] = {0.23, 0.35, 0.6, 1.0}; + +static CGFloat kTransitionDuration = 0.3; + +static CGFloat kTitleMarginX = 8; +static CGFloat kTitleMarginY = 4; +static CGFloat kPadding = 10; +static CGFloat kBorderWidth = 10; + +/////////////////////////////////////////////////////////////////////////////////////////////////// + +@implementation FBDialog + +@synthesize session = _session, delegate = _delegate; + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// private + +- (void)addRoundedRectToPath:(CGContextRef)context rect:(CGRect)rect radius:(float)radius { + CGContextBeginPath(context); + CGContextSaveGState(context); + + if (radius == 0) { + CGContextTranslateCTM(context, CGRectGetMinX(rect), CGRectGetMinY(rect)); + CGContextAddRect(context, rect); + } else { + rect = CGRectOffset(CGRectInset(rect, 0.5, 0.5), 0.5, 0.5); + CGContextTranslateCTM(context, CGRectGetMinX(rect)-0.5, CGRectGetMinY(rect)-0.5); + CGContextScaleCTM(context, radius, radius); + float fw = CGRectGetWidth(rect) / radius; + float fh = CGRectGetHeight(rect) / radius; + + CGContextMoveToPoint(context, fw, fh/2); + CGContextAddArcToPoint(context, fw, fh, fw/2, fh, 1); + CGContextAddArcToPoint(context, 0, fh, 0, fh/2, 1); + CGContextAddArcToPoint(context, 0, 0, fw/2, 0, 1); + CGContextAddArcToPoint(context, fw, 0, fw, fh/2, 1); + } + + CGContextClosePath(context); + CGContextRestoreGState(context); +} + +- (void)drawRect:(CGRect)rect fill:(const CGFloat*)fillColors radius:(CGFloat)radius { + CGContextRef context = UIGraphicsGetCurrentContext(); + CGColorSpaceRef space = CGColorSpaceCreateDeviceRGB(); + + if (fillColors) { + CGContextSaveGState(context); + CGContextSetFillColor(context, fillColors); + if (radius) { + [self addRoundedRectToPath:context rect:rect radius:radius]; + CGContextFillPath(context); + } else { + CGContextFillRect(context, rect); + } + CGContextRestoreGState(context); + } + + CGColorSpaceRelease(space); +} + +- (void)strokeLines:(CGRect)rect stroke:(const CGFloat*)strokeColor { + CGContextRef context = UIGraphicsGetCurrentContext(); + CGColorSpaceRef space = CGColorSpaceCreateDeviceRGB(); + + CGContextSaveGState(context); + CGContextSetStrokeColorSpace(context, space); + CGContextSetStrokeColor(context, strokeColor); + CGContextSetLineWidth(context, 1.0); + + { + CGPoint points[] = {rect.origin.x+0.5, rect.origin.y-0.5, + rect.origin.x+rect.size.width, rect.origin.y-0.5}; + CGContextStrokeLineSegments(context, points, 2); + } + { + CGPoint points[] = {rect.origin.x+0.5, rect.origin.y+rect.size.height-0.5, + rect.origin.x+rect.size.width-0.5, rect.origin.y+rect.size.height-0.5}; + CGContextStrokeLineSegments(context, points, 2); + } + { + CGPoint points[] = {rect.origin.x+rect.size.width-0.5, rect.origin.y, + rect.origin.x+rect.size.width-0.5, rect.origin.y+rect.size.height}; + CGContextStrokeLineSegments(context, points, 2); + } + { + CGPoint points[] = {rect.origin.x+0.5, rect.origin.y, + rect.origin.x+0.5, rect.origin.y+rect.size.height}; + CGContextStrokeLineSegments(context, points, 2); + } + + CGContextRestoreGState(context); + + CGColorSpaceRelease(space); +} + +- (BOOL)shouldRotateToOrientation:(UIDeviceOrientation)orientation { + if (orientation == _orientation) { + return NO; + } else { + return orientation == UIDeviceOrientationLandscapeLeft + || orientation == UIDeviceOrientationLandscapeRight + || orientation == UIDeviceOrientationPortrait + || orientation == UIDeviceOrientationPortraitUpsideDown; + } +} + +- (CGAffineTransform)transformForOrientation { + UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation; + if (orientation == UIInterfaceOrientationLandscapeLeft) { + return CGAffineTransformMakeRotation(M_PI*1.5); + } else if (orientation == UIInterfaceOrientationLandscapeRight) { + return CGAffineTransformMakeRotation(M_PI/2); + } else if (orientation == UIInterfaceOrientationPortraitUpsideDown) { + return CGAffineTransformMakeRotation(-M_PI); + } else { + return CGAffineTransformIdentity; + } +} + +- (void)sizeToFitOrientation:(BOOL)transform { + if (transform) { + self.transform = CGAffineTransformIdentity; + } + + CGRect frame = [UIScreen mainScreen].applicationFrame; + CGPoint center = CGPointMake( + frame.origin.x + ceil(frame.size.width/2), + frame.origin.y + ceil(frame.size.height/2)); + + CGFloat width = frame.size.width - kPadding * 2; + CGFloat height = frame.size.height - kPadding * 2; + + _orientation = [UIApplication sharedApplication].statusBarOrientation; + if (UIInterfaceOrientationIsLandscape(_orientation)) { + self.frame = CGRectMake(kPadding, kPadding, height, width); + } else { + self.frame = CGRectMake(kPadding, kPadding, width, height); + } + self.center = center; + + if (transform) { + self.transform = [self transformForOrientation]; + } +} + +- (void)updateWebOrientation { + UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation; + if (UIInterfaceOrientationIsLandscape(orientation)) { + [_webView stringByEvaluatingJavaScriptFromString: + @"document.body.setAttribute('orientation', 90);"]; + } else { + [_webView stringByEvaluatingJavaScriptFromString: + @"document.body.removeAttribute('orientation');"]; + } +} + +- (void)bounce1AnimationStopped { + [UIView beginAnimations:nil context:nil]; + [UIView setAnimationDuration:kTransitionDuration/2]; + [UIView setAnimationDelegate:self]; + [UIView setAnimationDidStopSelector:@selector(bounce2AnimationStopped)]; + self.transform = CGAffineTransformScale([self transformForOrientation], 0.9, 0.9); + [UIView commitAnimations]; +} + +- (void)bounce2AnimationStopped { + [UIView beginAnimations:nil context:nil]; + [UIView setAnimationDuration:kTransitionDuration/2]; + self.transform = [self transformForOrientation]; + [UIView commitAnimations]; +} + +- (NSURL*)generateURL:(NSString*)baseURL params:(NSDictionary*)params { + if (params) { + NSMutableArray* pairs = [NSMutableArray array]; + for (NSString* key in params.keyEnumerator) { + NSString* value = [params objectForKey:key]; + NSString* val = [value stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; + NSString* pair = [NSString stringWithFormat:@"%@=%@", key, val]; + [pairs addObject:pair]; + } + + NSString* query = [pairs componentsJoinedByString:@"&"]; + NSString* url = [NSString stringWithFormat:@"%@?%@", baseURL, query]; + return [NSURL URLWithString:url]; + } else { + return [NSURL URLWithString:baseURL]; + } +} + +- (NSMutableData*)generatePostBody:(NSDictionary*)params { + if (!params) { + return nil; + } + + NSMutableData* body = [NSMutableData data]; + NSString* endLine = [NSString stringWithFormat:@"\r\n--%@\r\n", kStringBoundary]; + + [body appendData:[[NSString stringWithFormat:@"--%@\r\n", kStringBoundary] + dataUsingEncoding:NSUTF8StringEncoding]]; + + for (id key in [params keyEnumerator]) { + [body appendData:[[NSString + stringWithFormat:@"Content-Disposition: form-data; name=\"%@\"\r\n\r\n", key] + dataUsingEncoding:NSUTF8StringEncoding]]; + [body appendData:[[params valueForKey:key] dataUsingEncoding:NSUTF8StringEncoding]]; + [body appendData:[endLine dataUsingEncoding:NSUTF8StringEncoding]]; + } + + return body; +} + +- (void)addObservers { + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(deviceOrientationDidChange:) + name:@"UIDeviceOrientationDidChangeNotification" object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(keyboardWillShow:) name:@"UIKeyboardWillShowNotification" object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(keyboardWillHide:) name:@"UIKeyboardWillHideNotification" object:nil]; +} + +- (void)removeObservers { + [[NSNotificationCenter defaultCenter] removeObserver:self + name:@"UIDeviceOrientationDidChangeNotification" object:nil]; + [[NSNotificationCenter defaultCenter] removeObserver:self + name:@"UIKeyboardWillShowNotification" object:nil]; + [[NSNotificationCenter defaultCenter] removeObserver:self + name:@"UIKeyboardWillHideNotification" object:nil]; +} + +- (void)postDismissCleanup { + [self removeObservers]; + [self removeFromSuperview]; +} + +- (void)dismiss:(BOOL)animated { + [self dialogWillDisappear]; + + [_loadingURL release]; + _loadingURL = nil; + + if (animated) { + [UIView beginAnimations:nil context:nil]; + [UIView setAnimationDuration:kTransitionDuration]; + [UIView setAnimationDelegate:self]; + [UIView setAnimationDidStopSelector:@selector(postDismissCleanup)]; + self.alpha = 0; + [UIView commitAnimations]; + } else { + [self postDismissCleanup]; + } +} + +- (void)cancel { + [self dismissWithSuccess:NO animated:YES]; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// NSObject + +- (id)init { + return [self initWithSession:[FBSession session]]; +} + +- (id)initWithSession:(FBSession*)session { + if (self = [super initWithFrame:CGRectZero]) { + _delegate = nil; + _session = [session retain]; + _loadingURL = nil; + _orientation = UIDeviceOrientationUnknown; + _showingKeyboard = NO; + + self.backgroundColor = [UIColor clearColor]; + self.autoresizesSubviews = YES; + self.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; + self.contentMode = UIViewContentModeRedraw; + + UIImage* iconImage = [UIImage imageNamed:@"FBConnect.bundle/images/fbicon.png"]; + UIImage* closeImage = [UIImage imageNamed:@"FBConnect.bundle/images/close.png"]; + + _iconView = [[UIImageView alloc] initWithImage:iconImage]; + [self addSubview:_iconView]; + + UIColor* color = [UIColor colorWithRed:167.0/255 green:184.0/255 blue:216.0/255 alpha:1]; + _closeButton = [[UIButton buttonWithType:UIButtonTypeCustom] retain]; + [_closeButton setImage:closeImage forState:UIControlStateNormal]; + [_closeButton setTitleColor:color forState:UIControlStateNormal]; + [_closeButton setTitleColor:[UIColor whiteColor] forState:UIControlStateHighlighted]; + [_closeButton addTarget:self action:@selector(cancel) + forControlEvents:UIControlEventTouchUpInside]; + _closeButton.font = [UIFont boldSystemFontOfSize:12]; + _closeButton.showsTouchWhenHighlighted = YES; + _closeButton.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin + | UIViewAutoresizingFlexibleBottomMargin; + [self addSubview:_closeButton]; + + _titleLabel = [[UILabel alloc] initWithFrame:CGRectZero]; + _titleLabel.text = kDefaultTitle; + _titleLabel.backgroundColor = [UIColor clearColor]; + _titleLabel.textColor = [UIColor whiteColor]; + _titleLabel.font = [UIFont boldSystemFontOfSize:14]; + _titleLabel.autoresizingMask = UIViewAutoresizingFlexibleRightMargin + | UIViewAutoresizingFlexibleBottomMargin; + [self addSubview:_titleLabel]; + + _webView = [[UIWebView alloc] initWithFrame:CGRectZero]; + _webView.delegate = self; + _webView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; + [self addSubview:_webView]; + + _spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle: + UIActivityIndicatorViewStyleWhiteLarge]; + _spinner.autoresizingMask = + UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin + | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin; + [self addSubview:_spinner]; + } + return self; +} + +- (void)dealloc { + _webView.delegate = nil; + [_webView release]; + [_spinner release]; + [_titleLabel release]; + [_iconView release]; + [_closeButton release]; + [_loadingURL release]; + [_session release]; + [super dealloc]; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// UIView + +- (void)drawRect:(CGRect)rect { + CGRect grayRect = CGRectOffset(rect, -0.5, -0.5); + [self drawRect:grayRect fill:kBorderGray radius:10]; + + CGRect headerRect = CGRectMake( + ceil(rect.origin.x + kBorderWidth), ceil(rect.origin.y + kBorderWidth), + rect.size.width - kBorderWidth*2, _titleLabel.frame.size.height); + [self drawRect:headerRect fill:kFacebookBlue radius:0]; + [self strokeLines:headerRect stroke:kBorderBlue]; + + CGRect webRect = CGRectMake( + ceil(rect.origin.x + kBorderWidth), headerRect.origin.y + headerRect.size.height, + rect.size.width - kBorderWidth*2, _webView.frame.size.height+1); + [self strokeLines:webRect stroke:kBorderBlack]; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// UIWebViewDelegate + +- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request + navigationType:(UIWebViewNavigationType)navigationType { + NSURL* url = request.URL; + if ([url.scheme isEqualToString:@"fbconnect"]) { + if ([url.resourceSpecifier isEqualToString:@"cancel"]) { + [self dismissWithSuccess:NO animated:YES]; + } else { + [self dialogDidSucceed:url]; + } + return NO; + } else if ([_loadingURL isEqual:url]) { + return YES; + } else if (navigationType == UIWebViewNavigationTypeLinkClicked) { + if ([_delegate respondsToSelector:@selector(dialog:shouldOpenURLInExternalBrowser:)]) { + if (![_delegate dialog:self shouldOpenURLInExternalBrowser:url]) { + return NO; + } + } + + [[UIApplication sharedApplication] openURL:request.URL]; + return NO; + } else { + return YES; + } +} + +- (void)webViewDidFinishLoad:(UIWebView *)webView { + [_spinner stopAnimating]; + _spinner.hidden = YES; + + self.title = [_webView stringByEvaluatingJavaScriptFromString:@"document.title"]; + [self updateWebOrientation]; +} + +- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error { + // 102 == WebKitErrorFrameLoadInterruptedByPolicyChange + if (!([error.domain isEqualToString:@"WebKitErrorDomain"] && error.code == 102)) { + [self dismissWithError:error animated:YES]; + } +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// UIDeviceOrientationDidChangeNotification + +- (void)deviceOrientationDidChange:(void*)object { + UIDeviceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation; + if (!_showingKeyboard && [self shouldRotateToOrientation:orientation]) { + [self updateWebOrientation]; + + CGFloat duration = [UIApplication sharedApplication].statusBarOrientationAnimationDuration; + [UIView beginAnimations:nil context:nil]; + [UIView setAnimationDuration:duration]; + [self sizeToFitOrientation:YES]; + [UIView commitAnimations]; + } +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// UIKeyboardNotifications + +- (void)keyboardWillShow:(NSNotification*)notification { + UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation; + if (UIInterfaceOrientationIsLandscape(orientation)) { + _webView.frame = CGRectInset(_webView.frame, + -(kPadding + kBorderWidth), + -(kPadding + kBorderWidth) - _titleLabel.frame.size.height); + } + + _showingKeyboard = YES; +} + +- (void)keyboardWillHide:(NSNotification*)notification { + UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation; + if (UIInterfaceOrientationIsLandscape(orientation)) { + _webView.frame = CGRectInset(_webView.frame, + kPadding + kBorderWidth, + kPadding + kBorderWidth + _titleLabel.frame.size.height); + } + + _showingKeyboard = NO; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// public + +- (NSString*)title { + return _titleLabel.text; +} + +- (void)setTitle:(NSString*)title { + _titleLabel.text = title; +} + +- (void)show { + [self load]; + [self sizeToFitOrientation:NO]; + + CGFloat innerWidth = self.frame.size.width - (kBorderWidth+1)*2; + [_iconView sizeToFit]; + [_titleLabel sizeToFit]; + [_closeButton sizeToFit]; + + _titleLabel.frame = CGRectMake( + kBorderWidth + kTitleMarginX + _iconView.frame.size.width + kTitleMarginX, + kBorderWidth, + innerWidth - (_titleLabel.frame.size.height + _iconView.frame.size.width + kTitleMarginX*2), + _titleLabel.frame.size.height + kTitleMarginY*2); + + _iconView.frame = CGRectMake( + kBorderWidth + kTitleMarginX, + kBorderWidth + floor(_titleLabel.frame.size.height/2 - _iconView.frame.size.height/2), + _iconView.frame.size.width, + _iconView.frame.size.height); + + _closeButton.frame = CGRectMake( + self.frame.size.width - (_titleLabel.frame.size.height + kBorderWidth), + kBorderWidth, + _titleLabel.frame.size.height, + _titleLabel.frame.size.height); + + _webView.frame = CGRectMake( + kBorderWidth+1, + kBorderWidth + _titleLabel.frame.size.height, + innerWidth, + self.frame.size.height - (_titleLabel.frame.size.height + 1 + kBorderWidth*2)); + + [_spinner sizeToFit]; + [_spinner startAnimating]; + _spinner.center = _webView.center; + + UIWindow* window = [UIApplication sharedApplication].keyWindow; + if (!window) { + window = [[UIApplication sharedApplication].windows objectAtIndex:0]; + } + [window addSubview:self]; + + [self dialogWillAppear]; + + self.transform = CGAffineTransformScale([self transformForOrientation], 0.001, 0.001); + [UIView beginAnimations:nil context:nil]; + [UIView setAnimationDuration:kTransitionDuration/1.5]; + [UIView setAnimationDelegate:self]; + [UIView setAnimationDidStopSelector:@selector(bounce1AnimationStopped)]; + self.transform = CGAffineTransformScale([self transformForOrientation], 1.1, 1.1); + [UIView commitAnimations]; + + [self addObservers]; +} + +- (void)dismissWithSuccess:(BOOL)success animated:(BOOL)animated { + if (success) { + if ([_delegate respondsToSelector:@selector(dialogDidSucceed:)]) { + [_delegate dialogDidSucceed:self]; + } + } else { + if ([_delegate respondsToSelector:@selector(dialogDidCancel:)]) { + [_delegate dialogDidCancel:self]; + } + } + + [self dismiss:animated]; +} + +- (void)dismissWithError:(NSError*)error animated:(BOOL)animated { + if ([_delegate respondsToSelector:@selector(dialog:didFailWithError:)]) { + [_delegate dialog:self didFailWithError:error]; + } + + [self dismiss:animated]; +} + +- (void)load { + // Intended for subclasses to override +} + +- (void)loadURL:(NSString*)url method:(NSString*)method get:(NSDictionary*)getParams + post:(NSDictionary*)postParams { + // This "test cookie" is required by login.php, or it complains that you need to enable JavaScript + NSHTTPCookieStorage* cookies = [NSHTTPCookieStorage sharedHTTPCookieStorage]; + NSHTTPCookie* testCookie = [NSHTTPCookie cookieWithProperties: + [NSDictionary dictionaryWithObjectsAndKeys: + @"1", NSHTTPCookieValue, + @"test_cookie", NSHTTPCookieName, + @".facebook.com", NSHTTPCookieDomain, + @"/", NSHTTPCookiePath, + nil]]; + [cookies setCookie:testCookie]; + + [_loadingURL release]; + _loadingURL = [[self generateURL:url params:getParams] retain]; + NSMutableURLRequest* request = [NSMutableURLRequest requestWithURL:_loadingURL]; + + if (method) { + [request setHTTPMethod:method]; + + if ([[method uppercaseString] isEqualToString:@"POST"]) { + NSString* contentType = [NSString + stringWithFormat:@"multipart/form-data; boundary=%@", kStringBoundary]; + [request setValue:contentType forHTTPHeaderField:@"Content-Type"]; + + NSData* body = [self generatePostBody:postParams]; + if (body) { + [request setHTTPBody:body]; + } + } + } + + [_webView loadRequest:request]; +} + +- (void)dialogWillAppear { +} + +- (void)dialogWillDisappear { +} + +- (void)dialogDidSucceed:(NSURL*)url { + [self dismissWithSuccess:YES animated:YES]; +} + +@end diff --git a/Classes/Libraries/FacebookAgent/src/.svn/text-base/FBFeedDialog.m.svn-base b/Classes/Libraries/FacebookAgent/src/.svn/text-base/FBFeedDialog.m.svn-base new file mode 100644 index 0000000..07f918a --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/.svn/text-base/FBFeedDialog.m.svn-base @@ -0,0 +1,93 @@ +/* + * Copyright 2009 Facebook + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ + +#import "FBFeedDialog.h" +#import "FBSession.h" + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// global + +static NSString* kFeedURL = @"http://www.facebook.com/connect/prompt_feed.php"; + +/////////////////////////////////////////////////////////////////////////////////////////////////// + +@implementation FBFeedDialog + +@synthesize templateBundleId = _templateBundleId, + templateData = _templateData, + bodyGeneral = _bodyGeneral, + userMessagePrompt = _userMessagePrompt; + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// private + +- (NSString*)generateFeedInfo { + NSMutableArray* pairs = [NSMutableArray array]; + + if (_templateBundleId) { + [pairs addObject:[NSString stringWithFormat:@"\"template_id\": %lld", _templateBundleId]]; + } + if (_templateData) { + [pairs addObject:[NSString stringWithFormat:@"\"template_data\": %@", _templateData]]; + } + if (_bodyGeneral) { + [pairs addObject:[NSString stringWithFormat:@"\"body_general\": \"%@\"", _bodyGeneral]]; + } + + return [NSString stringWithFormat:@"{%@}", [pairs componentsJoinedByString:@","]]; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// NSObject + +- (id)initWithSession:(FBSession*)session { + if (self = [super initWithSession:session]) { + _templateBundleId = 0; + _templateData = nil; + _bodyGeneral = nil; + } + return self; +} + +- (void)dealloc { + [_templateData release]; + [_bodyGeneral release]; + [super dealloc]; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// FBDialog + +- (void)load { + NSDictionary* getParams = [NSDictionary dictionaryWithObjectsAndKeys: + @"touch", @"display", nil]; + + NSString* feedInfo = [self generateFeedInfo]; + NSDictionary* postParams = [NSDictionary dictionaryWithObjectsAndKeys: + _session.apiKey, @"api_key", + _session.sessionKey, @"session_key", + @"1", @"preview", + @"fbconnect:success", @"callback", + @"fbconnect:cancel", @"cancel", + feedInfo, @"feed_info", + @"self_feed", @"feed_target_type", + _userMessagePrompt, @"user_message_prompt", + nil]; + + [self loadURL:kFeedURL method:@"POST" get:getParams post:postParams]; +} + +@end diff --git a/Classes/Libraries/FacebookAgent/src/.svn/text-base/FBLoginButton.m.svn-base b/Classes/Libraries/FacebookAgent/src/.svn/text-base/FBLoginButton.m.svn-base new file mode 100644 index 0000000..92bfb27 --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/.svn/text-base/FBLoginButton.m.svn-base @@ -0,0 +1,162 @@ +/* + * Copyright 2009 Facebook + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ + +#import "FBLoginButton.h" +#import "FBLoginDialog.h" + +/////////////////////////////////////////////////////////////////////////////////////////////////// + +@implementation FBLoginButton + +@synthesize session = _session, style = _style; + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// private + +- (UIImage*)buttonImage { + if (_session.isConnected) { + return [UIImage imageNamed:@"FBConnect.bundle/images/logout.png"]; + } else { + if (_style == FBLoginButtonStyleNormal) { + return [UIImage imageNamed:@"FBConnect.bundle/images/login.png"]; + } else if (_style == FBLoginButtonStyleWide) { + return [UIImage imageNamed:@"FBConnect.bundle/images/login2.png"]; + } else { + return nil; + } + } +} + +- (UIImage*)buttonHighlightedImage { + if (_session.isConnected) { + return [UIImage imageNamed:@"FBConnect.bundle/images/logout_down.png"]; + } else { + if (_style == FBLoginButtonStyleNormal) { + return [UIImage imageNamed:@"FBConnect.bundle/images/login_down.png"]; + } else if (_style == FBLoginButtonStyleWide) { + return [UIImage imageNamed:@"FBConnect.bundle/images/login2_down.png"]; + } else { + return nil; + } + } +} + +- (void)updateImage { + if (self.highlighted) { + _imageView.image = [self buttonHighlightedImage]; + } else { + _imageView.image = [self buttonImage]; + } +} + +- (void)touchUpInside { + if (_session.isConnected) { + [_session logout]; + } else { + FBLoginDialog* dialog = [[[FBLoginDialog alloc] initWithSession:_session] autorelease]; + [dialog show]; + } +} + +- (void)initButton { + _style = FBLoginButtonStyleNormal; + + _imageView = [[UIImageView alloc] initWithFrame:CGRectZero]; + _imageView.contentMode = UIViewContentModeCenter; + [self addSubview:_imageView]; + + self.backgroundColor = [UIColor clearColor]; + [self addTarget:self action:@selector(touchUpInside) + forControlEvents:UIControlEventTouchUpInside]; + + self.session = [FBSession session]; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// NSObject + +- (id)initWithFrame:(CGRect)frame { + if (self = [super initWithFrame:frame]) { + [self initButton]; + if (CGRectIsEmpty(frame)) { + [self sizeToFit]; + } + } + return self; +} + +- (void)awakeFromNib { + [self initButton]; +} + +- (void)dealloc { + [_session.delegates removeObject:self]; + [_session release]; + [_imageView release]; + [super dealloc]; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// UIView + +- (CGSize)sizeThatFits:(CGSize)size { + return _imageView.image.size; +} + +- (void)layoutSubviews { + _imageView.frame = self.bounds; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// UIControl + +- (void)setHighlighted:(BOOL)highlighted { + [super setHighlighted:highlighted]; + [self updateImage]; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// FBSessionDelegate + +- (void)session:(FBSession*)session didLogin:(FBUID)uid { + [self updateImage]; +} + +- (void)sessionDidLogout:(FBSession*)session { + [self updateImage]; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// public + +- (void)setSession:(FBSession*)session { + if (session != _session) { + [_session.delegates removeObject:self]; + [_session release]; + _session = [session retain]; + [_session.delegates addObject:self]; + + [self updateImage]; + } +} + +- (void)setStyle:(FBLoginButtonStyle)style { + _style = style; + + [self updateImage]; +} + +@end diff --git a/Classes/Libraries/FacebookAgent/src/.svn/text-base/FBLoginDialog.m.svn-base b/Classes/Libraries/FacebookAgent/src/.svn/text-base/FBLoginDialog.m.svn-base new file mode 100644 index 0000000..9d49f60 --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/.svn/text-base/FBLoginDialog.m.svn-base @@ -0,0 +1,131 @@ +/* + * Copyright 2009 Facebook + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ + +#import "FBLoginDialog.h" +#import "FBSession.h" +#import "FBRequest.h" + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// global + +static NSString* kLoginURL = @"http://www.facebook.com/login.php"; + +/////////////////////////////////////////////////////////////////////////////////////////////////// + +@implementation FBLoginDialog + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// private + +- (void)connectToGetSession:(NSString*)token { + _getSessionRequest = [[FBRequest requestWithSession:_session delegate:self] retain]; + NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObject:token forKey:@"auth_token"]; + if (!_session.apiSecret) { + [params setObject:@"1" forKey:@"generate_session_secret"]; + } + + if (_session.getSessionProxy) { + [_getSessionRequest post:_session.getSessionProxy params:params]; + } else { + [_getSessionRequest call:@"facebook.auth.getSession" params:params]; + } +} + +- (void)loadLoginPage { + NSDictionary* params = [NSDictionary dictionaryWithObjectsAndKeys: + @"1", @"fbconnect", @"touch", @"connect_display", _session.apiKey, @"api_key", + @"fbconnect://success", @"next", nil]; + + [self loadURL:kLoginURL method:@"GET" get:params post:nil]; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// NSObject + +- (id)initWithSession:(FBSession*)session { + if (self = [super initWithSession:session]) { + _getSessionRequest = nil; + } + return self; +} + +- (void)dealloc { + _getSessionRequest.delegate = nil; + [_getSessionRequest release]; + [super dealloc]; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// FBDialog + +- (void)load { + [self loadLoginPage]; +} + +- (void)dialogWillDisappear { + [_webView stringByEvaluatingJavaScriptFromString:@"email.blur();"]; + + [_getSessionRequest cancel]; + + if (![_session isConnected]) { + [_session cancelLogin]; + } +} + +- (void)dialogDidSucceed:(NSURL*)url { + NSString* q = url.query; + NSRange start = [q rangeOfString:@"auth_token="]; + if (start.location != NSNotFound) { + NSRange end = [q rangeOfString:@"&"]; + NSUInteger offset = start.location+start.length; + NSString* token = end.location == NSNotFound + ? [q substringFromIndex:offset] + : [q substringWithRange:NSMakeRange(offset, end.location-offset)]; + + if (token) { + [self connectToGetSession:token]; + } + } +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// FBRequestDelegate + +- (void)request:(FBRequest*)request didLoad:(id)result { + NSDictionary* object = result; + FBUID uid = [[object objectForKey:@"uid"] longLongValue]; + NSString* sessionKey = [object objectForKey:@"session_key"]; + NSString* sessionSecret = [object objectForKey:@"secret"]; + NSTimeInterval expires = [[object objectForKey:@"expires"] floatValue]; + NSDate* expiration = expires ? [NSDate dateWithTimeIntervalSince1970:expires] : nil; + + [_getSessionRequest release]; + _getSessionRequest = nil; + + [_session begin:uid sessionKey:sessionKey sessionSecret:sessionSecret expires:expiration]; + [_session resume]; + + [self dismissWithSuccess:YES animated:YES]; +} + +- (void)request:(FBRequest*)request didFailWithError:(NSError*)error { + [_getSessionRequest release]; + _getSessionRequest = nil; + + [self dismissWithError:error animated:YES]; +} + +@end diff --git a/Classes/Libraries/FacebookAgent/src/.svn/text-base/FBPermissionDialog.m.svn-base b/Classes/Libraries/FacebookAgent/src/.svn/text-base/FBPermissionDialog.m.svn-base new file mode 100644 index 0000000..794964a --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/.svn/text-base/FBPermissionDialog.m.svn-base @@ -0,0 +1,100 @@ +/* + * Copyright 2009 Facebook + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ + +#import "FBPermissionDialog.h" +#import "FBSession.h" + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// global + +static NSString* kPermissionURL = @"http://www.facebook.com/connect/prompt_permission.php"; + +/////////////////////////////////////////////////////////////////////////////////////////////////// + +@implementation FBPermissionDialog + +@synthesize permission = _permission; + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// private + +- (void)redirectToLogin { + _redirectTimer = [NSTimer scheduledTimerWithTimeInterval:0.01 target:self + selector:@selector(redirectToLoginDelayed) userInfo:nil repeats:NO]; +} + +- (void)redirectToLoginDelayed { + _redirectTimer = nil; + + // This loads the login page, which will just redirect back to the callback url + // since the login cookies are set + [super load]; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// NSObject + +- (id)initWithSession:(FBSession*)session { + if (self = [super initWithSession:session]) { + _permission = nil; + _redirectTimer = nil; + } + return self; +} + +- (void)dealloc { + [_redirectTimer invalidate]; + [_permission release]; + [super dealloc]; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// FBDialog + +- (void)load { + NSDictionary* params = [NSDictionary dictionaryWithObjectsAndKeys: + @"touch", @"display", _session.apiKey, @"api_key", _session.sessionKey, @"session_key", + _permission, @"ext_perm", @"fbconnect:success", @"next", @"fbconnect:cancel", @"cancel", nil]; + + [self loadURL:kPermissionURL method:@"GET" get:params post:nil]; +} + +- (void)dialogDidSucceed:(NSURL*)url { + if ([_permission isEqualToString:@"offline_access"]) { + [super dialogDidSucceed:url]; + } else { + [self dismissWithSuccess:YES animated:YES]; + } +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// UIWebViewDelegate + +- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request + navigationType:(UIWebViewNavigationType)navigationType { + if ([_permission isEqualToString:@"offline_access"]) { + NSURL* url = request.URL; + if ([url.scheme isEqualToString:@"fbconnect"]) { + if ([url.resourceSpecifier isEqualToString:@"success"]) { + [self redirectToLogin]; + return NO; + } + } + } + return [super webView:webView shouldStartLoadWithRequest:request navigationType:navigationType]; +} + +@end diff --git a/Classes/Libraries/FacebookAgent/src/.svn/text-base/FBRequest.m.svn-base b/Classes/Libraries/FacebookAgent/src/.svn/text-base/FBRequest.m.svn-base new file mode 100644 index 0000000..621a66a --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/.svn/text-base/FBRequest.m.svn-base @@ -0,0 +1,378 @@ +/* + * Copyright 2009 Facebook + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ + +#import "FBRequest.h" +#import "FBSession.h" +#import "FBXMLHandler.h" +#import + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// global + +static NSString* kAPIVersion = @"1.0"; +static NSString* kAPIFormat = @"XML"; +static NSString* kUserAgent = @"FacebookConnect"; +static NSString* kStringBoundary = @"3i2ndDfv2rTHiSisAbouNdArYfORhtTPEefj3q2f"; + +static const NSTimeInterval kTimeoutInterval = 180.0; + +/////////////////////////////////////////////////////////////////////////////////////////////////// + +@implementation FBRequest + +@synthesize delegate = _delegate, + url = _url, + method = _method, + params = _params, + dataParam = _dataParam, + userInfo = _userInfo, + timestamp = _timestamp; + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// class public + ++ (FBRequest*)request { + return [self requestWithSession:[FBSession session]]; +} + ++ (FBRequest*)requestWithDelegate:(id)delegate { + return [self requestWithSession:[FBSession session] delegate:delegate]; +} + ++ (FBRequest*)requestWithSession:(FBSession*)session { + return [[[FBRequest alloc] initWithSession:session] autorelease]; +} + ++ (FBRequest*)requestWithSession:(FBSession*)session delegate:(id)delegate { + FBRequest* request = [[[FBRequest alloc] initWithSession:session] autorelease]; + request.delegate = delegate; + return request; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// private + +- (NSString*)md5HexDigest:(NSString*)input { + const char* str = [input UTF8String]; + unsigned char result[CC_MD5_DIGEST_LENGTH]; + CC_MD5(str, strlen(str), result); + + return [NSString stringWithFormat: + @"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", + result[0], result[1], result[2], result[3], result[4], result[5], result[6], result[7], + result[8], result[9], result[10], result[11], result[12], result[13], result[14], result[15] + ]; +} + +- (BOOL)isSpecialMethod { + return [_method isEqualToString:@"facebook.auth.getSession"] + || [_method isEqualToString:@"facebook.auth.createToken"]; +} + +- (NSString*)urlForMethod:(NSString*)method { + if ([method isEqualToString:@"facebook.video.upload"]) { + return @"http://api-video.facebook.com/restserver.php"; + } + + return _session.apiURL; +} + +- (NSString*)generateGetURL { + NSURL* parsedURL = [NSURL URLWithString:_url]; + NSString* queryPrefix = parsedURL.query ? @"&" : @"?"; + + NSMutableArray* pairs = [NSMutableArray array]; + for (NSString* key in [_params keyEnumerator]) { + NSString* value = [_params objectForKey:key]; + [pairs addObject:[NSString stringWithFormat:@"%@=%@", key, value]]; + } + NSString* params = [pairs componentsJoinedByString:@"&"]; + + return [NSString stringWithFormat:@"%@%@%@", _url, queryPrefix, params]; +} + +- (NSString*)generateCallId { + return [NSString stringWithFormat:@"%.0f", [[NSDate date] timeIntervalSince1970]]; +} + +- (NSString*)generateSig { + NSMutableString* joined = [NSMutableString string]; + + NSArray* keys = [_params.allKeys sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)]; + for (id obj in [keys objectEnumerator]) { + id value = [_params valueForKey:obj]; + if ([value isKindOfClass:[NSString class]]) { + [joined appendString:obj]; + [joined appendString:@"="]; + [joined appendString:value]; + } + } + + if ([self isSpecialMethod]) { + if (_session.apiSecret) { + [joined appendString:_session.apiSecret]; + } + } else if (_session.sessionSecret) { + [joined appendString:_session.sessionSecret]; + } else if (_session.apiSecret) { + [joined appendString:_session.apiSecret]; + } + + return [self md5HexDigest:joined]; +} + +- (void)utfAppendBody:(NSMutableData*)body data:(NSString*)data { + [body appendData:[data dataUsingEncoding:NSUTF8StringEncoding]]; +} + +- (NSMutableData*)generatePostBody { + NSMutableData* body = [NSMutableData data]; + NSString* endLine = [NSString stringWithFormat:@"\r\n--%@\r\n", kStringBoundary]; + + [self utfAppendBody:body data:[NSString stringWithFormat:@"--%@\r\n", kStringBoundary]]; + + for (id key in [_params keyEnumerator]) { + [self utfAppendBody:body + data:[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"%@\"\r\n\r\n", key]]; + [self utfAppendBody:body data:[_params valueForKey:key]]; + [self utfAppendBody:body data:endLine]; + } + + if (_dataParam != nil) { + if ([_dataParam isKindOfClass:[UIImage class]]) { + NSData* imageData = UIImagePNGRepresentation((UIImage*)_dataParam); + [self utfAppendBody:body + data:[NSString stringWithFormat:@"Content-Disposition: form-data; filename=\"photo\"\r\n"]]; + [self utfAppendBody:body + data:[NSString stringWithString:@"Content-Type: image/png\r\n\r\n"]]; + [body appendData:imageData]; + } else { + NSAssert([_dataParam isKindOfClass:[NSData class]], @"dataParam must be a UIImage or NSData"); + [self utfAppendBody:body + data:[NSString stringWithFormat:@"Content-Disposition: form-data; filename=\"data\"\r\n"]]; + [self utfAppendBody:body + data:[NSString stringWithString:@"Content-Type: content/unknown\r\n\r\n"]]; + [body appendData:(NSData*)_dataParam]; + } + [self utfAppendBody:body data:endLine]; + } + + FBLOG2(@"Sending %s", [body bytes]); + return body; +} + +- (id)parseXMLResponse:(NSData*)data error:(NSError**)error { + FBXMLHandler* handler = [[[FBXMLHandler alloc] init] autorelease]; + NSXMLParser* parser = [[[NSXMLParser alloc] initWithData:data] autorelease]; + parser.delegate = handler; + [parser parse]; + + if (handler.parseError) { + if (error) { + *error = [[handler.parseError retain] autorelease]; + } + return nil; + } else if ([handler.rootName isEqualToString:@"error_response"]) { + NSDictionary* errorDict = handler.rootObject; + NSInteger code = [[errorDict objectForKey:@"error_code"] intValue]; + NSDictionary* info = [NSDictionary dictionaryWithObjectsAndKeys: + [errorDict objectForKey:@"error_msg"], NSLocalizedDescriptionKey, + [errorDict objectForKey:@"request_args"], @"request_args", + nil]; + if (error) { + *error = [NSError errorWithDomain:FBAPI_ERROR_DOMAIN code:code userInfo:info]; + } + return nil; + } else { + return [[handler.rootObject retain] autorelease]; + } +} + +- (void)failWithError:(NSError*)error { + if ([_delegate respondsToSelector:@selector(request:didFailWithError:)]) { + [_delegate request:self didFailWithError:error]; + } +} + +- (void)handleResponseData:(NSData*)data { + FBLOG2(@"DATA: %s", data.bytes); + NSError* error = nil; + id result = [self parseXMLResponse:data error:&error]; + if (error) { + [self failWithError:error]; + } else if ([_delegate respondsToSelector:@selector(request:didLoad:)]) { + [_delegate request:self didLoad:result]; + } +} + +- (void)connect { + FBLOG(@"Connecting to %@ %@", _url, _params); + + if ([_delegate respondsToSelector:@selector(requestLoading:)]) { + [_delegate requestLoading:self]; + } + + NSString* url = _method ? _url : [self generateGetURL]; + NSMutableURLRequest* request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:url] + cachePolicy:NSURLRequestReloadIgnoringLocalCacheData + timeoutInterval:kTimeoutInterval]; + [request setValue:kUserAgent forHTTPHeaderField:@"User-Agent"]; + + if (_method) { + [request setHTTPMethod:@"POST"]; + + NSString* contentType = [NSString + stringWithFormat:@"multipart/form-data; boundary=%@", kStringBoundary]; + [request setValue:contentType forHTTPHeaderField:@"Content-Type"]; + + [request setHTTPBody:[self generatePostBody]]; + } + + _timestamp = [[NSDate date] retain]; + _connection = [[NSURLConnection alloc] initWithRequest:request delegate:self]; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// NSObject + +- (id)initWithSession:(FBSession*)session { + _session = session; + _delegate = nil; + _url = nil; + _method = nil; + _params = nil; + _userInfo = nil; + _timestamp = nil; + _connection = nil; + _responseText = nil; + return self; +} + +- (void)dealloc { + [_connection cancel]; + [_connection release]; + [_responseText release]; + [_url release]; + [_method release]; + [_params release]; + [_userInfo release]; + [_timestamp release]; + [super dealloc]; +} + +- (NSString*)description { + return [NSString stringWithFormat:@"", _method ? _method : _url]; +} + +////////////////////////////////////////////////////////////////////////////////////////////////// +// NSURLConnectionDelegate + +- (void)connection:(NSURLConnection*)connection didReceiveResponse:(NSURLResponse*)response { + _responseText = [[NSMutableData alloc] init]; + + NSHTTPURLResponse* httpResponse = (NSHTTPURLResponse*)response; + if ([_delegate respondsToSelector:@selector(request:didReceiveResponse:)]) { + [_delegate request:self didReceiveResponse:httpResponse]; + } +} + +-(void)connection:(NSURLConnection*)connection didReceiveData:(NSData*)data { + [_responseText appendData:data]; +} + +- (NSCachedURLResponse*)connection:(NSURLConnection*)connection + willCacheResponse:(NSCachedURLResponse*)cachedResponse { + return nil; +} + +-(void)connectionDidFinishLoading:(NSURLConnection*)connection { + [self handleResponseData:_responseText]; + + [_responseText release]; + _responseText = nil; + [_connection release]; + _connection = nil; +} + +- (void)connection:(NSURLConnection*)connection didFailWithError:(NSError*)error { + [self failWithError:error]; + + [_responseText release]; + _responseText = nil; + [_connection release]; + _connection = nil; +} + +////////////////////////////////////////////////////////////////////////////////////////////////// +// public + +- (BOOL)loading { + return !!_connection; +} + +- (void)call:(NSString*)method params:(NSDictionary*)params { + [self call:method params:params dataParam:nil]; +} + +- (void)call:(NSString*)method params:(NSDictionary*)params dataParam:(NSData*)dataParam { + _url = [[self urlForMethod:method] retain]; + _method = [method copy]; + _params = params + ? [[NSMutableDictionary alloc] initWithDictionary:params] + : [[NSMutableDictionary alloc] init]; + _dataParam = dataParam; + + [_params setObject:_method forKey:@"method"]; + [_params setObject:_session.apiKey forKey:@"api_key"]; + [_params setObject:kAPIVersion forKey:@"v"]; + [_params setObject:kAPIFormat forKey:@"format"]; + + if (![self isSpecialMethod]) { + [_params setObject:_session.sessionKey forKey:@"session_key"]; + [_params setObject:[self generateCallId] forKey:@"call_id"]; + + if (_session.sessionSecret) { + [_params setObject:@"1" forKey:@"ss"]; + } + } + + [_params setObject:[self generateSig] forKey:@"sig"]; + + [_session send:self]; +} + +- (void)post:(NSString*)url params:(NSDictionary*)params { + _url = [url retain]; + _params = params + ? [[NSMutableDictionary alloc] initWithDictionary:params] + : [[NSMutableDictionary alloc] init]; + + [_session send:self]; +} + +- (void)cancel { + if (_connection) { + [_connection cancel]; + [_connection release]; + _connection = nil; + + if ([_delegate respondsToSelector:@selector(requestWasCancelled:)]) { + [_delegate requestWasCancelled:self]; + } + } +} + +@end diff --git a/Classes/Libraries/FacebookAgent/src/.svn/text-base/FBSession.m.svn-base b/Classes/Libraries/FacebookAgent/src/.svn/text-base/FBSession.m.svn-base new file mode 100644 index 0000000..6366895 --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/.svn/text-base/FBSession.m.svn-base @@ -0,0 +1,296 @@ +/* + * Copyright 2009 Facebook + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ + +#import "FBSession.h" +#import "FBRequest.h" + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// global + +static NSString* kAPIRestURL = @"http://api.facebook.com/restserver.php"; +static NSString* kAPIRestSecureURL = @"https://api.facebook.com/restserver.php"; + +static const int kMaxBurstRequests = 3; +static const NSTimeInterval kBurstDuration = 2; + +static FBSession* sharedSession = nil; + +/////////////////////////////////////////////////////////////////////////////////////////////////// + +@implementation FBSession + +@synthesize delegates = _delegates, apiKey = _apiKey, apiSecret = _apiSecret, + getSessionProxy = _getSessionProxy, uid = _uid, sessionKey = _sessionKey, + sessionSecret = _sessionSecret, expirationDate = _expirationDate; + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// class public + ++ (FBSession*)session { + return sharedSession; +} + ++ (void)setSession:(FBSession*)session { + sharedSession = session; +} + ++ (FBSession*)sessionForApplication:(NSString*)key secret:(NSString*)secret + delegate:(id)delegate { + FBSession* session = [[[FBSession alloc] initWithKey:key secret:secret + getSessionProxy:nil] autorelease]; + [session.delegates addObject:delegate]; + return session; +} + ++ (FBSession*)sessionForApplication:(NSString*)key getSessionProxy:(NSString*)getSessionProxy + delegate:(id)delegate { + FBSession* session = [[[FBSession alloc] initWithKey:key secret:nil + getSessionProxy:getSessionProxy] autorelease]; + [session.delegates addObject:delegate]; + return session; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// private + +- (void)save { + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + if (_uid) { + [defaults setObject:[NSNumber numberWithLongLong:_uid] forKey:@"FBUserId"]; + } else { + [defaults removeObjectForKey:@"FBUserId"]; + } + + if (_sessionKey) { + [defaults setObject:_sessionKey forKey:@"FBSessionKey"]; + } else { + [defaults removeObjectForKey:@"FBSessionKey"]; + } + + if (_sessionSecret) { + [defaults setObject:_sessionSecret forKey:@"FBSessionSecret"]; + } else { + [defaults removeObjectForKey:@"FBSessionSecret"]; + } + + if (_expirationDate) { + [defaults setObject:_expirationDate forKey:@"FBSessionExpires"]; + } else { + [defaults removeObjectForKey:@"FBSessionExpires"]; + } + + [defaults synchronize]; +} + +- (void)unsave { + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + [defaults removeObjectForKey:@"FBUserId"]; + [defaults removeObjectForKey:@"FBSessionKey"]; + [defaults removeObjectForKey:@"FBSessionSecret"]; + [defaults removeObjectForKey:@"FBSessionExpires"]; + [defaults synchronize]; +} + +- (void)startFlushTimer { + if (!_requestTimer) { + NSTimeInterval t = kBurstDuration + [_lastRequestTime timeIntervalSinceNow]; + _requestTimer = [NSTimer scheduledTimerWithTimeInterval:t target:self + selector:@selector(requestTimerReady) userInfo:nil repeats:NO]; + } +} + +- (void)enqueueRequest:(FBRequest*)request { + [_requestQueue addObject:request]; + [self startFlushTimer]; +} + +- (BOOL)performRequest:(FBRequest*)request enqueue:(BOOL)enqueue { + // Stagger requests that happen in short bursts to prevent the server from rejecting + // them for making too many requests in a short time + NSTimeInterval t = [_lastRequestTime timeIntervalSinceNow]; + BOOL burst = t && t > -kBurstDuration; + if (burst && ++_requestBurstCount > kMaxBurstRequests) { + if (enqueue) { + [self enqueueRequest:request]; + } + return NO; + } else { + [request performSelector:@selector(connect)]; + + if (!burst) { + _requestBurstCount = 1; + [_lastRequestTime release]; + _lastRequestTime = [[request timestamp] retain]; + } + } + return YES; +} + +- (void)flushRequestQueue { + while (_requestQueue.count) { + FBRequest* request = [_requestQueue objectAtIndex:0]; + if ([self performRequest:request enqueue:NO]) { + [_requestQueue removeObjectAtIndex:0]; + } else { + [self startFlushTimer]; + break; + } + } +} + +- (void)requestTimerReady { + _requestTimer = nil; + [self flushRequestQueue]; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// NSObject + +- (FBSession*)initWithKey:(NSString*)key secret:(NSString*)secret + getSessionProxy:(NSString*)getSessionProxy { + if (self = [super init]) { + if (!sharedSession) { + sharedSession = self; + } + + _delegates = FBCreateNonRetainingArray(); + _apiKey = [key copy]; + _apiSecret = [secret copy]; + _getSessionProxy = [getSessionProxy copy]; + _uid = 0; + _sessionKey = nil; + _sessionSecret = nil; + _expirationDate = nil; + _requestQueue = [[NSMutableArray alloc] init]; + _lastRequestTime = nil; + _requestBurstCount = 0; + _requestTimer = nil; + } + return self; +} + +- (void)dealloc { + if (sharedSession == self) { + sharedSession = nil; + } + + [_delegates release]; + [_requestQueue release]; + [_apiKey release]; + [_apiSecret release]; + [_getSessionProxy release]; + [_sessionKey release]; + [_sessionSecret release]; + [_expirationDate release]; + [_lastRequestTime release]; + [super dealloc]; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// public + +- (NSString*)apiURL { + return kAPIRestURL; +} + +- (NSString*)apiSecureURL { + return kAPIRestSecureURL; +} + +- (BOOL)isConnected { + return !!_sessionKey; +} + +- (void)begin:(FBUID)uid sessionKey:(NSString*)sessionKey + sessionSecret:(NSString*)sessionSecret expires:(NSDate*)expires { + _uid = uid; + _sessionKey = [sessionKey copy]; + _sessionSecret = [sessionSecret copy]; + _expirationDate = [expires retain]; + + [self save]; +} + +- (BOOL)resume { + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + FBUID uid = [[defaults objectForKey:@"FBUserId"] longLongValue]; + if (uid) { + NSDate* expirationDate = [defaults objectForKey:@"FBSessionExpires"]; + if (!expirationDate || [expirationDate timeIntervalSinceNow] > 0) { + _uid = uid; + _sessionKey = [[defaults stringForKey:@"FBSessionKey"] copy]; + _sessionSecret = [[defaults stringForKey:@"FBSessionSecret"] copy]; + _expirationDate = [expirationDate retain]; + + for (id delegate in _delegates) { + [delegate session:self didLogin:_uid]; + } + return YES; + } + } + return NO; +} + +- (void)cancelLogin { + if (![self isConnected]) { + for (id delegate in _delegates) { + if ([delegate respondsToSelector:@selector(sessionDidNotLogin:)]) { + [delegate sessionDidNotLogin:self]; + } + } + } +} + +- (void)logout { + if (_sessionKey) { + for (id delegate in _delegates) { + if ([delegate respondsToSelector:@selector(session:willLogout:)]) { + [delegate session:self willLogout:_uid]; + } + } + + // Remove cookies that UIWebView may have stored + NSHTTPCookieStorage* cookies = [NSHTTPCookieStorage sharedHTTPCookieStorage]; + NSArray* facebookCookies = [cookies cookiesForURL: + [NSURL URLWithString:@"http://login.facebook.com"]]; + for (NSHTTPCookie* cookie in facebookCookies) { + [cookies deleteCookie:cookie]; + } + + _uid = 0; + [_sessionKey release]; + _sessionKey = nil; + [_sessionSecret release]; + _sessionSecret = nil; + [_expirationDate release]; + _expirationDate = nil; + [self unsave]; + + for (id delegate in _delegates) { + if ([delegate respondsToSelector:@selector(sessionDidLogout:)]) { + [delegate sessionDidLogout:self]; + } + } + } else { + [self unsave]; + } +} + +- (void)send:(FBRequest*)request { + [self performRequest:request enqueue:YES]; +} + +@end diff --git a/Classes/Libraries/FacebookAgent/src/.svn/text-base/FBStreamDialog.m.svn-base b/Classes/Libraries/FacebookAgent/src/.svn/text-base/FBStreamDialog.m.svn-base new file mode 100644 index 0000000..99fdf14 --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/.svn/text-base/FBStreamDialog.m.svn-base @@ -0,0 +1,77 @@ +/* + * Copyright 2009 Facebook + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import "FBStreamDialog.h" +#import "FBSession.h" + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// global + +static NSString* kStreamURL = @"http://www.facebook.com/connect/prompt_feed.php"; + +/////////////////////////////////////////////////////////////////////////////////////////////////// + +@implementation FBStreamDialog + +@synthesize attachment = _attachment, + actionLinks = _actionLinks, + targetId = _targetId, + userMessagePrompt = _userMessagePrompt; + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// NSObject + +- (id)initWithSession:(FBSession*)session { + if (self = [super initWithSession:session]) { + _attachment = @""; + _actionLinks = @""; + _targetId = @""; + _userMessagePrompt = @""; + } + return self; +} + +- (void)dealloc { + [_attachment release]; + [_actionLinks release]; + [_targetId release]; + [_userMessagePrompt release]; + [super dealloc]; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// FBDialog + +- (void)load { + NSDictionary* getParams = [NSDictionary dictionaryWithObjectsAndKeys: + @"touch", @"display", nil]; + + NSDictionary* postParams = [NSDictionary dictionaryWithObjectsAndKeys: + _session.apiKey, @"api_key", + _session.sessionKey, @"session_key", + @"1", @"preview", + @"fbconnect:success", @"callback", + @"fbconnect:cancel", @"cancel", + _attachment, @"attachment", + _actionLinks, @"action_links", + _targetId, @"target_id", + _userMessagePrompt, @"user_message_prompt", + nil]; + + [self loadURL:kStreamURL method:@"POST" get:getParams post:postParams]; +} + +@end diff --git a/Classes/Libraries/FacebookAgent/src/.svn/text-base/FBXMLHandler.h.svn-base b/Classes/Libraries/FacebookAgent/src/.svn/text-base/FBXMLHandler.h.svn-base new file mode 100644 index 0000000..27b1607 --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/.svn/text-base/FBXMLHandler.h.svn-base @@ -0,0 +1,32 @@ +/* + * Copyright 2009 Facebook + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ + +#import "FBConnectGlobal.h" + +@interface FBXMLHandler : NSObject { + NSMutableArray* _stack; + NSMutableArray* _nameStack; + id _rootObject; + NSString* _rootName; + NSMutableString* _chars; + NSError* _parseError; +} + +@property(nonatomic,readonly) id rootObject; +@property(nonatomic,readonly) NSString* rootName; +@property(nonatomic,readonly) NSError* parseError; + +@end diff --git a/Classes/Libraries/FacebookAgent/src/.svn/text-base/FBXMLHandler.m.svn-base b/Classes/Libraries/FacebookAgent/src/.svn/text-base/FBXMLHandler.m.svn-base new file mode 100644 index 0000000..54de261 --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/.svn/text-base/FBXMLHandler.m.svn-base @@ -0,0 +1,152 @@ +/* + * Copyright 2009 Facebook + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ + +#import "FBXMLHandler.h" + +/////////////////////////////////////////////////////////////////////////////////////////////////// + +@implementation FBXMLHandler + +@synthesize rootObject = _rootObject, rootName = _rootName, parseError = _parseError; + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// private + +- (NSString*)topName { + return [_nameStack lastObject]; +} + +- (id)topObject:(BOOL)create { + id object = [_stack objectAtIndex:_stack.count-1]; + if (object == [NSNull null] && create) { + object = [NSMutableDictionary dictionary]; + [_stack replaceObjectAtIndex:_stack.count-1 withObject:object]; + } + return object; +} + +- (id)topContainer { + if (_stack.count < 2) { + return nil; + } else { + id object = [_stack objectAtIndex:_stack.count-2]; + if (object == [NSNull null]) { + object = [NSMutableDictionary dictionary]; + [_stack replaceObjectAtIndex:_stack.count-2 withObject:object]; + } + return object; + } +} + +- (void)flushCharacters { + NSCharacterSet* whitespace = [NSCharacterSet whitespaceAndNewlineCharacterSet]; + for (NSInteger i = 0; i < _chars.length; ++i) { + unichar c = [_chars characterAtIndex:i]; + if (![whitespace characterIsMember:c]) { + id topContainer = self.topContainer; + if ([topContainer isKindOfClass:[NSMutableArray class]]) { + id object = [NSDictionary dictionaryWithObject:_chars forKey:self.topName]; + [_stack replaceObjectAtIndex:_stack.count-1 withObject:object]; + } else { + [_stack replaceObjectAtIndex:_stack.count-1 withObject:_chars]; + } + break; + } + } + + [_chars release]; + _chars = nil; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// NSObject + +- (id)init { + if (self = [super init]) { + _stack = [[NSMutableArray alloc] init]; + _nameStack = [[NSMutableArray alloc] init]; + _rootObject = nil; + _rootName = nil; + _chars = nil; + _parseError = nil; + } + return self; +} + +- (void)dealloc { + [_stack release]; + [_nameStack release]; + [_rootObject release]; + [_rootName release]; + [_chars release]; + [_parseError release]; + [super dealloc]; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// NSXMLParserDelegate + +- (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName + namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qualifiedName + attributes:(NSDictionary *)attributeDict { + [self flushCharacters]; + + id object = nil; + if ([[attributeDict objectForKey:@"list"] isEqualToString:@"true"]) { + object = [NSMutableArray array]; + } else { + object = [NSNull null]; + } + + [_stack addObject:object]; + [_nameStack addObject:elementName]; +} + +- (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string { + if (!_chars) { + _chars = [string mutableCopy]; + } else { + [_chars appendString:string]; + } +} + +- (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName + namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName { + [self flushCharacters]; + + id object = [[[self topObject:NO] retain] autorelease]; + NSString* name = [[self.topName retain] autorelease]; + [_stack removeLastObject]; + [_nameStack removeLastObject]; + + if (!_stack.count) { + _rootObject = [object retain]; + _rootName = [name retain]; + } else { + id topObject = [self topObject:YES]; + if ([topObject isKindOfClass:[NSMutableArray class]]) { + [topObject addObject:object]; + } else if ([topObject isKindOfClass:[NSMutableDictionary class]]) { + [topObject setObject:object forKey:name]; + } + } +} + +- (void)parser:(NSXMLParser *)parser parseErrorOccurred:(NSError *)error { + _parseError = [error retain]; +} + +@end diff --git a/Classes/Libraries/FacebookAgent/src/FBConnect/.svn/all-wcprops b/Classes/Libraries/FacebookAgent/src/FBConnect/.svn/all-wcprops new file mode 100644 index 0000000..0b74115 --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/FBConnect/.svn/all-wcprops @@ -0,0 +1,65 @@ +K 25 +svn:wc:ra_dav:version-url +V 65 +/uc2/!svn/ver/10/iphone/trunk/Classes/FacebookAgent/src/FBConnect +END +FBFeedDialog.h +K 25 +svn:wc:ra_dav:version-url +V 80 +/uc2/!svn/ver/10/iphone/trunk/Classes/FacebookAgent/src/FBConnect/FBFeedDialog.h +END +FBSession.h +K 25 +svn:wc:ra_dav:version-url +V 77 +/uc2/!svn/ver/10/iphone/trunk/Classes/FacebookAgent/src/FBConnect/FBSession.h +END +FBLoginButton.h +K 25 +svn:wc:ra_dav:version-url +V 81 +/uc2/!svn/ver/10/iphone/trunk/Classes/FacebookAgent/src/FBConnect/FBLoginButton.h +END +FBLoginDialog.h +K 25 +svn:wc:ra_dav:version-url +V 81 +/uc2/!svn/ver/10/iphone/trunk/Classes/FacebookAgent/src/FBConnect/FBLoginDialog.h +END +FBPermissionDialog.h +K 25 +svn:wc:ra_dav:version-url +V 86 +/uc2/!svn/ver/10/iphone/trunk/Classes/FacebookAgent/src/FBConnect/FBPermissionDialog.h +END +FBRequest.h +K 25 +svn:wc:ra_dav:version-url +V 77 +/uc2/!svn/ver/10/iphone/trunk/Classes/FacebookAgent/src/FBConnect/FBRequest.h +END +FBConnect.h +K 25 +svn:wc:ra_dav:version-url +V 77 +/uc2/!svn/ver/10/iphone/trunk/Classes/FacebookAgent/src/FBConnect/FBConnect.h +END +FBConnectGlobal.h +K 25 +svn:wc:ra_dav:version-url +V 83 +/uc2/!svn/ver/10/iphone/trunk/Classes/FacebookAgent/src/FBConnect/FBConnectGlobal.h +END +FBStreamDialog.h +K 25 +svn:wc:ra_dav:version-url +V 82 +/uc2/!svn/ver/10/iphone/trunk/Classes/FacebookAgent/src/FBConnect/FBStreamDialog.h +END +FBDialog.h +K 25 +svn:wc:ra_dav:version-url +V 76 +/uc2/!svn/ver/10/iphone/trunk/Classes/FacebookAgent/src/FBConnect/FBDialog.h +END diff --git a/Classes/Libraries/FacebookAgent/src/FBConnect/.svn/entries b/Classes/Libraries/FacebookAgent/src/FBConnect/.svn/entries new file mode 100644 index 0000000..f11b6bb --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/FBConnect/.svn/entries @@ -0,0 +1,148 @@ +8 + +dir +10 +https://geniteam1@geniteam.svn.cvsdude.com/uc2/iphone/trunk/Classes/FacebookAgent/src/FBConnect +https://geniteam1@geniteam.svn.cvsdude.com/uc2 + + + +2010-03-02T06:40:08.984918Z +10 +rizwanyousaf + + +svn:special svn:externals svn:needs-lock + + + + + + + + + + + +77bba3fe-c5a6-4b36-a80a-631b2adb4aff + +FBFeedDialog.h +file + + + + +2010-03-02T06:46:30.000000Z +658711b250eae5540b6798d2c4ebb797 +2010-03-02T06:40:08.984918Z +10 +rizwanyousaf + +FBSession.h +file + + + + +2010-03-02T06:46:30.000000Z +71a31d7169c095798119b926a64f41d1 +2010-03-02T06:40:08.984918Z +10 +rizwanyousaf + +FBLoginButton.h +file + + + + +2010-03-02T06:46:30.000000Z +9da153c9702187276ac07749e156efd9 +2010-03-02T06:40:08.984918Z +10 +rizwanyousaf + +FBLoginDialog.h +file + + + + +2010-03-02T06:46:30.000000Z +78bb50c218bf751c445c56c1fdc98451 +2010-03-02T06:40:08.984918Z +10 +rizwanyousaf + +FBPermissionDialog.h +file + + + + +2010-03-02T06:46:30.000000Z +565108bb42b7e548abd2fc138a12c62a +2010-03-02T06:40:08.984918Z +10 +rizwanyousaf + +FBRequest.h +file + + + + +2010-03-02T06:46:30.000000Z +d2ce3dede96c951d45611ed995e457b6 +2010-03-02T06:40:08.984918Z +10 +rizwanyousaf + +FBConnect.h +file + + + + +2010-03-02T06:46:30.000000Z +d6b633503cf18ba3d0af1d2b6016dcb6 +2010-03-02T06:40:08.984918Z +10 +rizwanyousaf + +FBConnectGlobal.h +file + + + + +2010-03-02T06:46:30.000000Z +764affd636be0856e35db97d3bb4ae35 +2010-03-02T06:40:08.984918Z +10 +rizwanyousaf + +FBStreamDialog.h +file + + + + +2010-03-02T06:46:30.000000Z +f0774dadb7fc3950d92e77d7827ff222 +2010-03-02T06:40:08.984918Z +10 +rizwanyousaf + +FBDialog.h +file + + + + +2010-03-02T06:46:30.000000Z +c29e21e93545777129675e6f5285ffa3 +2010-03-02T06:40:08.984918Z +10 +rizwanyousaf + diff --git a/Classes/Libraries/FacebookAgent/src/FBConnect/.svn/format b/Classes/Libraries/FacebookAgent/src/FBConnect/.svn/format new file mode 100644 index 0000000..45a4fb7 --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/FBConnect/.svn/format @@ -0,0 +1 @@ +8 diff --git a/Classes/Libraries/FacebookAgent/src/FBConnect/.svn/text-base/FBConnect.h.svn-base b/Classes/Libraries/FacebookAgent/src/FBConnect/.svn/text-base/FBConnect.h.svn-base new file mode 100644 index 0000000..df98757 --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/FBConnect/.svn/text-base/FBConnect.h.svn-base @@ -0,0 +1,23 @@ +/* + * Copyright 2009 Facebook + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ + +#import "FBSession.h" +#import "FBRequest.h" +#import "FBLoginButton.h" +#import "FBLoginDialog.h" +#import "FBPermissionDialog.h" +#import "FBFeedDialog.h" +#import "FBStreamDialog.h" diff --git a/Classes/Libraries/FacebookAgent/src/FBConnect/.svn/text-base/FBConnectGlobal.h.svn-base b/Classes/Libraries/FacebookAgent/src/FBConnect/.svn/text-base/FBConnectGlobal.h.svn-base new file mode 100644 index 0000000..4d34b73 --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/FBConnect/.svn/text-base/FBConnectGlobal.h.svn-base @@ -0,0 +1,217 @@ +/* + * Copyright 2009 Facebook + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ + +#import +#import + +/////////////////////////////////////////////////////////////////////////////////////////////////// + +extern const NSString* kFB_SDK_VersionNumber; + +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef DEBUG +#define FBLOG +#define FBLOG2 +#else +#define FBLOG +#define FBLOG2 +#endif + +/////////////////////////////////////////////////////////////////////////////////////////////////// + +typedef unsigned long long FBUID; +typedef unsigned long long FBID; + +#define FBAPI_ERROR_DOMAIN @"api.facebook.com" + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Error codes + +#define FBAPI_EC_SUCCESS 0 +#define FBAPI_EC_UNKNOWN 1 +#define FBAPI_EC_SERVICE 2 +#define FBAPI_EC_METHOD 3 +#define FBAPI_EC_TOO_MANY_CALLS 4 +#define FBAPI_EC_BAD_IP 5 +#define FBAPI_EC_HOST_API 6 +#define FBAPI_EC_HOST_UP 7 +#define FBAPI_EC_SECURE 8 +#define FBAPI_EC_RATE 9 +#define FBAPI_EC_PERMISSION_DENIED 10 +#define FBAPI_EC_DEPRECATED 11 +#define FBAPI_EC_VERSION 12 + +#define FBAPI_EC_PARAM 100 +#define FBAPI_EC_PARAM_FBAPI_KEY 101 +#define FBAPI_EC_PARAM_SESSION_KEY 102 +#define FBAPI_EC_PARAM_CALL_ID 103 +#define FBAPI_EC_PARAM_SIGNATURE 104 +#define FBAPI_EC_PARAM_TOO_MANY 105 +#define FBAPI_EC_PARAM_USER_ID 110 +#define FBAPI_EC_PARAM_USER_FIELD 111 +#define FBAPI_EC_PARAM_SOCIAL_FIELD 112 +#define FBAPI_EC_PARAM_EMAIL 113 +#define FBAPI_EC_PARAM_ALBUM_ID 120 +#define FBAPI_EC_PARAM_PHOTO_ID 121 +#define FBAPI_EC_PARAM_FEED_PRIORITY 130 +#define FBAPI_EC_PARAM_CATEGORY 140 +#define FBAPI_EC_PARAM_SUBCATEGORY 141 +#define FBAPI_EC_PARAM_TITLE 142 +#define FBAPI_EC_PARAM_DESCRIPTION 143 +#define FBAPI_EC_PARAM_BAD_JSON 144 +#define FBAPI_EC_PARAM_BAD_EID 150 +#define FBAPI_EC_PARAM_UNKNOWN_CITY 151 +#define FBAPI_EC_PARAM_BAD_PAGE_TYPE 152 + +#define FBAPI_EC_PERMISSION 200 +#define FBAPI_EC_PERMISSION_USER 210 +#define FBAPI_EC_PERMISSION_ALBUM 220 +#define FBAPI_EC_PERMISSION_PHOTO 221 +#define FBAPI_EC_PERMISSION_MESSAGE 230 +#define FBAPI_EC_PERMISSION_MARKUP_OTHER_USER 240 +#define FBAPI_EC_PERMISSION_STATUS_UPDATE 250 +#define FBAPI_EC_PERMISSION_PHOTO_UPLOAD 260 +#define FBAPI_EC_PERMISSION_SMS 270 +#define FBAPI_EC_PERMISSION_CREATE_LISTING 280 +#define FBAPI_EC_PERMISSION_EVENT 290 +#define FBAPI_EC_PERMISSION_LARGE_FBML_TEMPLATE 291 +#define FBAPI_EC_PERMISSION_LIVEMESSAGE 292 +#define FBAPI_EC_PERMISSION_RSVP_EVENT 299 + +#define FBAPI_EC_EDIT 300 +#define FBAPI_EC_EDIT_USER_DATA 310 +#define FBAPI_EC_EDIT_PHOTO 320 +#define FBAPI_EC_EDIT_ALBUM_SIZE 321 +#define FBAPI_EC_EDIT_PHOTO_TAG_SUBJECT 322 +#define FBAPI_EC_EDIT_PHOTO_TAG_PHOTO 323 +#define FBAPI_EC_EDIT_PHOTO_FILE 324 +#define FBAPI_EC_EDIT_PHOTO_PENDING_LIMIT 325 +#define FBAPI_EC_EDIT_PHOTO_TAG_LIMIT 326 +#define FBAPI_EC_EDIT_ALBUM_REORDER_PHOTO_NOT_IN_ALBUM 327 +#define FBAPI_EC_EDIT_ALBUM_REORDER_TOO_FEW_PHOTOS 328 +#define FBAPI_EC_MALFORMED_MARKUP 329 +#define FBAPI_EC_EDIT_MARKUP 330 +#define FBAPI_EC_EDIT_FEED_TOO_MANY_USER_CALLS 340 +#define FBAPI_EC_EDIT_FEED_TOO_MANY_USER_ACTION_CALLS 341 +#define FBAPI_EC_EDIT_FEED_TITLE_LINK 342 +#define FBAPI_EC_EDIT_FEED_TITLE_LENGTH 343 +#define FBAPI_EC_EDIT_FEED_TITLE_NAME 344 +#define FBAPI_EC_EDIT_FEED_TITLE_BLANK 345 +#define FBAPI_EC_EDIT_FEED_BODY_LENGTH 346 +#define FBAPI_EC_EDIT_FEED_PHOTO_SRC 347 +#define FBAPI_EC_EDIT_FEED_PHOTO_LINK 348 +#define FBAPI_EC_EDIT_VIDEO_SIZE 350 +#define FBAPI_EC_EDIT_VIDEO_INVALID_FILE 351 +#define FBAPI_EC_EDIT_VIDEO_INVALID_TYPE 352 +#define FBAPI_EC_EDIT_FEED_TITLE_ARRAY 360 +#define FBAPI_EC_EDIT_FEED_TITLE_PARAMS 361 +#define FBAPI_EC_EDIT_FEED_BODY_ARRAY 362 +#define FBAPI_EC_EDIT_FEED_BODY_PARAMS 363 +#define FBAPI_EC_EDIT_FEED_PHOTO 364 +#define FBAPI_EC_EDIT_FEED_TEMPLATE 365 +#define FBAPI_EC_EDIT_FEED_TARGET 366 +#define FBAPI_EC_USERS_CREATE_INVALID_EMAIL 370 +#define FBAPI_EC_USERS_CREATE_EXISTING_EMAIL 371 +#define FBAPI_EC_USERS_CREATE_BIRTHDAY 372 +#define FBAPI_EC_USERS_CREATE_PASSWORD 373 +#define FBAPI_EC_USERS_REGISTER_INVALID_CREDENTIAL 374 +#define FBAPI_EC_USERS_REGISTER_CONF_FAILURE 375 +#define FBAPI_EC_USERS_REGISTER_EXISTING 376 +#define FBAPI_EC_USERS_REGISTER_DEFAULT_ERROR 377 +#define FBAPI_EC_USERS_REGISTER_PASSWORD_BLANK 378 +#define FBAPI_EC_USERS_REGISTER_PASSWORD_INVALID_CHARS 379 +#define FBAPI_EC_USERS_REGISTER_PASSWORD_SHORT 380 +#define FBAPI_EC_USERS_REGISTER_PASSWORD_WEAK 381 +#define FBAPI_EC_USERS_REGISTER_USERNAME_ERROR 382 +#define FBAPI_EC_USERS_REGISTER_MISSING_INPUT 383 +#define FBAPI_EC_USERS_REGISTER_INCOMPLETE_BDAY 384 +#define FBAPI_EC_USERS_REGISTER_INVALID_EMAIL 385 +#define FBAPI_EC_USERS_REGISTER_EMAIL_DISABLED 386 +#define FBAPI_EC_USERS_REGISTER_ADD_USER_FAILED 387 +#define FBAPI_EC_USERS_REGISTER_NO_GENDER 388 + +#define FBAPI_EC_AUTH_EMAIL 400 +#define FBAPI_EC_AUTH_LOGIN 401 +#define FBAPI_EC_AUTH_SIG 402 +#define FBAPI_EC_AUTH_TIME 403 + +#define FBAPI_EC_SESSION_METHOD 451 +#define FBAPI_EC_SESSION_REQUIRED 453 +#define FBAPI_EC_SESSION_REQUIRED_FOR_SECRET 454 +#define FBAPI_EC_SESSION_CANNOT_USE_SESSION_SECRET 455 + +#define FBAPI_EC_MESG_BANNED 500 +#define FBAPI_EC_MESG_NO_BODY 501 +#define FBAPI_EC_MESG_TOO_LONG 502 +#define FBAPI_EC_MESG_RATE 503 +#define FBAPI_EC_MESG_INVALID_THREAD 504 +#define FBAPI_EC_MESG_INVALID_RECIP 505 +#define FBAPI_EC_POKE_INVALID_RECIP 510 +#define FBAPI_EC_POKE_OUTSTANDING 511 +#define FBAPI_EC_POKE_RATE 512 + +#define FQL_EC_UNKNOWN_ERROR 600 +#define FQL_EC_PARSER_ERROR 601 +#define FQL_EC_UNKNOWN_FIELD 602 +#define FQL_EC_UNKNOWN_TABLE 603 +#define FQL_EC_NO_INDEX 604 +#define FQL_EC_UNKNOWN_FUNCTION 605 +#define FQL_EC_INVALID_PARAM 606 +#define FQL_EC_INVALID_FIELD 607 +#define FQL_EC_INVALID_SESSION 608 + +#define FBAPI_EC_REF_SET_FAILED 700 +#define FBAPI_EC_FB_APP_UNKNOWN_ERROR 750 +#define FBAPI_EC_FB_APP_FETCH_FAILED 751 +#define FBAPI_EC_FB_APP_NO_DATA 752 +#define FBAPI_EC_FB_APP_NO_PERMISSIONS 753 +#define FBAPI_EC_FB_APP_TAG_MISSING 754 + +#define FBAPI_EC_DATA_UNKNOWN_ERROR 800 +#define FBAPI_EC_DATA_INVALID_OPERATION 801 +#define FBAPI_EC_DATA_QUOTA_EXCEEDED 802 +#define FBAPI_EC_DATA_OBJECT_NOT_FOUND 803 +#define FBAPI_EC_DATA_OBJECT_ALREADY_EXISTS 804 +#define FBAPI_EC_DATA_DATABASE_ERROR 805 +#define FBAPI_EC_DATA_CREATE_TEMPLATE_ERROR 806 +#define FBAPI_EC_DATA_TEMPLATE_EXISTS_ERROR 807 +#define FBAPI_EC_DATA_TEMPLATE_HANDLE_TOO_LONG 808 +#define FBAPI_EC_DATA_TEMPLATE_HANDLE_ALREADY_IN_USE 809 +#define FBAPI_EC_DATA_TOO_MANY_TEMPLATE_BUNDLES 810 +#define FBAPI_EC_DATA_MALFORMED_ACTION_LINK 811 +#define FBAPI_EC_DATA_TEMPLATE_USES_RESERVED_TOKEN 812 + +#define FBAPI_EC_NO_SUCH_APP 900 +#define FBAPI_BATCH_TOO_MANY_ITEMS 950 +#define FBAPI_EC_BATCH_ALREADY_STARTED 951 +#define FBAPI_EC_BATCH_NOT_STARTED 952 +#define FBAPI_EC_BATCH_METHOD_NOT_ALLOWED_IN_BATCH_MODE 953 + +#define FBAPI_EC_EVENT_INVALID_TIME 1000 +#define FBAPI_EC_INFO_NO_INFORMATION 1050 +#define FBAPI_EC_INFO_SET_FAILED 1051 + +#define FBAPI_EC_LIVEMESSAGE_SEND_FAILED 1100 +#define FBAPI_EC_LIVEMESSAGE_EVENT_NAME_TOO_LONG 1101 +#define FBAPI_EC_LIVEMESSAGE_MESSAGE_TOO_LONG 1102 + +#define FBAPI_EC_PAGES_CREATE 1201 + +/////////////////////////////////////////////////////////////////////////////////////////////////// + +NSMutableArray* FBCreateNonRetainingArray(); + diff --git a/Classes/Libraries/FacebookAgent/src/FBConnect/.svn/text-base/FBDialog.h.svn-base b/Classes/Libraries/FacebookAgent/src/FBConnect/.svn/text-base/FBDialog.h.svn-base new file mode 100644 index 0000000..9820548 --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/FBConnect/.svn/text-base/FBDialog.h.svn-base @@ -0,0 +1,137 @@ +/* + * Copyright 2009 Facebook + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ + +#import "FBConnectGlobal.h" + +@protocol FBDialogDelegate; +@class FBSession; + +@interface FBDialog : UIView { + id _delegate; + FBSession* _session; + NSURL* _loadingURL; + UIWebView* _webView; + UIActivityIndicatorView* _spinner; + UIImageView* _iconView; + UILabel* _titleLabel; + UIButton* _closeButton; + UIDeviceOrientation _orientation; + BOOL _showingKeyboard; +} + +/** + * The delegate. + */ +@property(nonatomic,assign) id delegate; + +/** + * The session for which the login is taking place. + */ +@property(nonatomic,assign) FBSession* session; + +/** + * The title that is shown in the header atop the view; + */ +@property(nonatomic,copy) NSString* title; + +/** + * Creates the view but does not display it. + */ +- (id)initWithSession:(FBSession*)session; + +/** + * Displays the view with an animation. + * + * The view will be added to the top of the current key window. + */ +- (void)show; + +/** + * Displays the first page of the dialog. + * + * Do not ever call this directly. It is intended to be overriden by subclasses. + */ +- (void)load; + +/** + * Displays a URL in the dialog. + */ +- (void)loadURL:(NSString*)url method:(NSString*)method get:(NSDictionary*)getParams + post:(NSDictionary*)postParams; + +/** + * Hides the view and notifies delegates of success or cancellation. + */ +- (void)dismissWithSuccess:(BOOL)success animated:(BOOL)animated; + +/** + * Hides the view and notifies delegates of an error. + */ +- (void)dismissWithError:(NSError*)error animated:(BOOL)animated; + +/** + * Subclasses may override to perform actions just prior to showing the dialog. + */ +- (void)dialogWillAppear; + +/** + * Subclasses may override to perform actions just after the dialog is hidden. + */ +- (void)dialogWillDisappear; + +/** + * Subclasses should override to process data returned from the server in a 'fbconnect' url. + * + * Implementations must call dismissWithSuccess:YES at some point to hide the dialog. + */ +- (void)dialogDidSucceed:(NSURL*)url; + +@end + +/////////////////////////////////////////////////////////////////////////////////////////////////// + +@protocol FBDialogDelegate + +@optional + +/** + * Called when the dialog succeeds and is about to be dismissed. + */ +- (void)dialogDidSucceed:(FBDialog*)dialog; + +/** + * Called when the dialog is cancelled and is about to be dismissed. + */ +- (void)dialogDidCancel:(FBDialog*)dialog; + +/** + * Called when dialog failed to load due to an error. + */ +- (void)dialog:(FBDialog*)dialog didFailWithError:(NSError*)error; + +/** + * Asks if a link touched by a user should be opened in an external browser. + * + * If a user touches a link, the default behavior is to open the link in the Safari browser, + * which will cause your app to quit. You may want to prevent this from happening, open the link + * in your own internal browser, or perhaps warn the user that they are about to leave your app. + * If so, implement this method on your delegate and return NO. If you warn the user, you + * should hold onto the URL and once you have received their acknowledgement open the URL yourself + * using [[UIApplication sharedApplication] openURL:]. + */ +- (BOOL)dialog:(FBDialog*)dialog shouldOpenURLInExternalBrowser:(NSURL*)url; + +@end diff --git a/Classes/Libraries/FacebookAgent/src/FBConnect/.svn/text-base/FBFeedDialog.h.svn-base b/Classes/Libraries/FacebookAgent/src/FBConnect/.svn/text-base/FBFeedDialog.h.svn-base new file mode 100644 index 0000000..da52f57 --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/FBConnect/.svn/text-base/FBFeedDialog.h.svn-base @@ -0,0 +1,50 @@ +/* + * Copyright 2009 Facebook + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ + +#import "FBDialog.h" + +@interface FBFeedDialog : FBDialog { + long long _templateBundleId; + NSString* _templateData; + NSString* _bodyGeneral; + NSString* _userMessagePrompt; +} + +/** + * The id for a previously registered template bundle. + */ +@property(nonatomic) long long templateBundleId; + +/** + * A JSON string containing template data. + * + * See http://wiki.developers.facebook.com/index.php/Template_Data + */ +@property(nonatomic,copy) NSString* templateData; + +/** + * Additional markup for a short story. + */ +@property(nonatomic,copy) NSString* bodyGeneral; + +/** + * Text you provide the user as a prompt to specify a userMessage. This appears + * above the box where the user enters a custom message. + * For example, "What's on your mind?" + */ +@property(nonatomic,copy) NSString* userMessagePrompt; + +@end diff --git a/Classes/Libraries/FacebookAgent/src/FBConnect/.svn/text-base/FBLoginButton.h.svn-base b/Classes/Libraries/FacebookAgent/src/FBConnect/.svn/text-base/FBLoginButton.h.svn-base new file mode 100644 index 0000000..4f98f4f --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/FBConnect/.svn/text-base/FBLoginButton.h.svn-base @@ -0,0 +1,49 @@ +/* + * Copyright 2009 Facebook + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ + +#import "FBSession.h" + +typedef enum { + FBLoginButtonStyleNormal, + FBLoginButtonStyleWide, +} FBLoginButtonStyle; + +/** + * Standard button which lets the user log in or out of the session. + * + * The button will automatically change to reflect the state of the session, showing + * "login" if the session is not connected, and "logout" if the session is connected. + */ +@interface FBLoginButton : UIControl { + FBLoginButtonStyle _style; + FBSession* _session; + UIImageView* _imageView; +} + +/** + * The visual style of the button. + */ +@property(nonatomic) FBLoginButtonStyle style; + +/** + * The session object that the button will log in and out of. + * + * The default value is the global session singleton, so there is usually no need to + * set this property yourself. + */ +@property(nonatomic,retain) FBSession* session; + +@end diff --git a/Classes/Libraries/FacebookAgent/src/FBConnect/.svn/text-base/FBLoginDialog.h.svn-base b/Classes/Libraries/FacebookAgent/src/FBConnect/.svn/text-base/FBLoginDialog.h.svn-base new file mode 100644 index 0000000..8eb0b90 --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/FBConnect/.svn/text-base/FBLoginDialog.h.svn-base @@ -0,0 +1,24 @@ +/* + * Copyright 2009 Facebook + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ + +#import "FBDialog.h" +#import "FBRequest.h" + +@interface FBLoginDialog : FBDialog { + FBRequest* _getSessionRequest; +} + +@end diff --git a/Classes/Libraries/FacebookAgent/src/FBConnect/.svn/text-base/FBPermissionDialog.h.svn-base b/Classes/Libraries/FacebookAgent/src/FBConnect/.svn/text-base/FBPermissionDialog.h.svn-base new file mode 100644 index 0000000..d203ddb --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/FBConnect/.svn/text-base/FBPermissionDialog.h.svn-base @@ -0,0 +1,31 @@ +/* + * Copyright 2009 Facebook + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ + +#import "FBLoginDialog.h" + +@interface FBPermissionDialog : FBLoginDialog { + NSString* _permission; + NSTimer* _redirectTimer; +} + +/** + * The extended permission to request. + * + * See http://wiki.developers.facebook.com/index.php/Extended_permissions + */ +@property(nonatomic,copy) NSString* permission; + +@end diff --git a/Classes/Libraries/FacebookAgent/src/FBConnect/.svn/text-base/FBRequest.h.svn-base b/Classes/Libraries/FacebookAgent/src/FBConnect/.svn/text-base/FBRequest.h.svn-base new file mode 100644 index 0000000..1c5852b --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/FBConnect/.svn/text-base/FBRequest.h.svn-base @@ -0,0 +1,165 @@ +/* + * Copyright 2009 Facebook + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ + +#import "FBConnectGlobal.h" + +@protocol FBRequestDelegate; +@class FBSession; + +@interface FBRequest : NSObject { + FBSession* _session; + id _delegate; + NSString* _url; + NSString* _method; + id _userInfo; + NSMutableDictionary* _params; + NSObject* _dataParam; + NSDate* _timestamp; + NSURLConnection* _connection; + NSMutableData* _responseText; +} + +/** + * Creates a new API request for the global session. + */ ++ (FBRequest*)request; + +/** + * Creates a new API request for the global session with a delegate. + */ ++ (FBRequest*)requestWithDelegate:(id)delegate; + +/** + * Creates a new API request for a particular session. + */ ++ (FBRequest*)requestWithSession:(FBSession*)session; + +/** + * Creates a new API request for the global session with a delegate. + */ ++ (FBRequest*)requestWithSession:(FBSession*)session delegate:(id)delegate; + +@property(nonatomic,assign) id delegate; + +/** + * The URL which will be contacted to execute the request. + */ +@property(nonatomic,readonly) NSString* url; + +/** + * The API method which will be called. + */ +@property(nonatomic,readonly) NSString* method; + +/** + * An object used by the user of the request to help identify the meaning of the request. + */ +@property(nonatomic,retain) id userInfo; + +/** + * The dictionary of parameters to pass to the method. + * + * These values in the dictionary will be converted to strings using the + * standard Objective-C object-to-string conversion facilities. + */ +@property(nonatomic,readonly) NSDictionary* params; + +/** + * A data parameter. + * + * Used for methods such as photos.upload, video.upload, events.create, and + * events.edit. + */ +@property(nonatomic,readonly) NSObject* dataParam; + +/** + * The timestamp of when the request was sent to the server. + */ +@property(nonatomic,readonly) NSDate* timestamp; + +/** + * Indicates if the request has been sent and is awaiting a response. + */ +@property(nonatomic,readonly) BOOL loading; + +/** + * Creates a new request paired to a session. + */ +- (id)initWithSession:(FBSession*)session; + +/** + * Calls a method on the server asynchronously. + * + * The delegate will be called for each stage of the loading process. + */ +- (void)call:(NSString*)method params:(NSDictionary*)params; + +/** + * Calls a method on the server asynchronously, with a file upload component. + * + * The delegate will be called for each stage of the loading process. + */ +- (void)call:(NSString*)method params:(NSDictionary*)params dataParam:(NSData*)dataParam; + +/** + * Calls a URL on the server asynchronously. + * + * The delegate will be called for each stage of the loading process. + */ +- (void)post:(NSString*)url params:(NSDictionary*)params; + +/** + * Stops an active request before the response has returned. + */ +- (void)cancel; + +@end + +/////////////////////////////////////////////////////////////////////////////////////////////////// + +@protocol FBRequestDelegate + +@optional + +/** + * Called just before the request is sent to the server. + */ +- (void)requestLoading:(FBRequest*)request; + +/** + * Called when the server responds and begins to send back data. + */ +- (void)request:(FBRequest*)request didReceiveResponse:(NSURLResponse*)response; + +/** + * Called when an error prevents the request from completing successfully. + */ +- (void)request:(FBRequest*)request didFailWithError:(NSError*)error; + +/** + * Called when a request returns and its response has been parsed into an object. + * + * The resulting object may be a dictionary, an array, a string, or a number, depending + * on thee format of the API response. + */ +- (void)request:(FBRequest*)request didLoad:(id)result; + +/** + * Called when the request was cancelled. + */ +- (void)requestWasCancelled:(FBRequest*)request; + +@end diff --git a/Classes/Libraries/FacebookAgent/src/FBConnect/.svn/text-base/FBSession.h.svn-base b/Classes/Libraries/FacebookAgent/src/FBConnect/.svn/text-base/FBSession.h.svn-base new file mode 100644 index 0000000..3526899 --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/FBConnect/.svn/text-base/FBSession.h.svn-base @@ -0,0 +1,198 @@ +/* + * Copyright 2009 Facebook + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ + +#import "FBConnectGlobal.h" + +@protocol FBSessionDelegate; +@class FBRequest; + +/** + * An FBSession represents a single user's authenticated session for a Facebook application. + * + * To create a session, you must use the session key of your application (which can + * be found on the Facebook developer website). You may then use the login dialog to ask + * the user to enter their email address and password. If successful, you will get back a + * session key which can be used to make requests to the Facebook API. + * + * Session keys are cached and stored on the disk of the device so that you do not need to ask + * the user to login every time they launch the app. To restore the last active session, call the + * resume method after instantiating your session. + */ +@interface FBSession : NSObject { + NSMutableArray* _delegates; + NSString* _apiKey; + NSString* _apiSecret; + NSString* _getSessionProxy; + FBUID _uid; + NSString* _sessionKey; + NSString* _sessionSecret; + NSDate* _expirationDate; + NSMutableArray* _requestQueue; + NSDate* _lastRequestTime; + int _requestBurstCount; + NSTimer* _requestTimer; +} + +/** + * Delegates which implement FBSessionDelegate. + */ +@property(nonatomic,readonly) NSMutableArray* delegates; + +/** + * The URL used for API HTTP requests. + */ +@property(nonatomic,readonly) NSString* apiURL; + +/** + * The URL used for secure API HTTP requests. + */ +@property(nonatomic,readonly) NSString* apiSecureURL; + +/** + * Your application's API key, as passed to the constructor. + */ +@property(nonatomic,readonly) NSString* apiKey; + +/** + * Your application's API secret, as passed to the constructor. + */ +@property(nonatomic,readonly) NSString* apiSecret; + +/** + * The URL to call to create a session key after login. + * + * This is an alternative to calling auth.getSession directly using the secret key. + */ +@property(nonatomic,readonly) NSString* getSessionProxy; + +/** + * The current user's Facebook id. + */ +@property(nonatomic,readonly) FBUID uid; + +/** + * The current user's session key. + */ +@property(nonatomic,readonly) NSString* sessionKey; + +/** + * The current user's session secret. + */ +@property(nonatomic,readonly) NSString* sessionSecret; + +/** + * The expiration date of the session key. + */ +@property(nonatomic,readonly) NSDate* expirationDate; + +/** + * Determines if the session is active and connected to a user. + */ +@property(nonatomic,readonly) BOOL isConnected; + +/** + * The globally shared session instance. + */ ++ (FBSession*)session; + +/** + * Sets the globally shared session instance. + * + * This session is not retained, so you are still responsible for retaining it yourself. The + * first session that is created is automatically stored here. + */ ++ (void)setSession:(FBSession*)session; + +/** + * Constructs a session and stores it as the globally shared session instance. + * + * @param secret the application secret (optional) + */ ++ (FBSession*)sessionForApplication:(NSString*)key secret:(NSString*)secret + delegate:(id)delegate; + +/** + * Constructs a session and stores it as the global singleton. + * + * @param getSessionProxy a url to that proxies auth.getSession (optional) + */ ++ (FBSession*)sessionForApplication:(NSString*)key getSessionProxy:(NSString*)getSessionProxy + delegate:(id)delegate; + +/** + * Constructs a session for an application. + * + * @param secret the application secret (optional) + * @param getSessionProxy a url to that proxies auth.getSession (optional) + */ +- (FBSession*)initWithKey:(NSString*)key secret:(NSString*)secret + getSessionProxy:(NSString*)getSessionProxy; + +/** + * Begins a session for a user with a given key and secret. + */ +- (void)begin:(FBUID)uid sessionKey:(NSString*)sessionKey sessionSecret:(NSString*)sessionSecret + expires:(NSDate*)expires; + +/** + * Resumes a previous session whose uid, session key, and secret are cached on disk. + */ +- (BOOL)resume; + +/** + * Cancels a login (no-op if the login is already complete). + */ +- (void)cancelLogin; + +/** + * Ends the current session and deletes the uid, session key, and secret from disk. + */ +- (void)logout; + +/** + * Sends a fully configured request to the server for execution. + */ +- (void)send:(FBRequest*)request; + +@end + +/////////////////////////////////////////////////////////////////////////////////////////////////// + +@protocol FBSessionDelegate + +/** + * Called when a user has successfully logged in and begun a session. + */ +- (void)session:(FBSession*)session didLogin:(FBUID)uid; + +@optional + +/** + * Called when a user closes the login dialog without logging in. + */ +- (void)sessionDidNotLogin:(FBSession*)session; + +/** + * Called when a session is about to log out. + */ +- (void)session:(FBSession*)session willLogout:(FBUID)uid; + +/** + * Called when a session has logged out. + */ +- (void)sessionDidLogout:(FBSession*)session; + +@end diff --git a/Classes/Libraries/FacebookAgent/src/FBConnect/.svn/text-base/FBStreamDialog.h.svn-base b/Classes/Libraries/FacebookAgent/src/FBConnect/.svn/text-base/FBStreamDialog.h.svn-base new file mode 100644 index 0000000..b926a01 --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/FBConnect/.svn/text-base/FBStreamDialog.h.svn-base @@ -0,0 +1,62 @@ +/* + * Copyright 2009 Facebook + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import "FBDialog.h" + +@interface FBStreamDialog : FBDialog { + NSString* _attachment; + NSString* _actionLinks; + NSString* _targetId; + NSString* _userMessagePrompt; +} + +/** + * A JSON-encoded object containing the text of the post, relevant links, a + * media type (image, video, mp3, flash), as well as any other key/value pairs + * you may want to add. + * + * Note: If you want to use this call to update a user's status, don't pass an + * attachment; the content of the userMessage parameter will become the user's + * new status and will appear at the top of the user's profile. + * + * For more info, see http://wiki.developers.facebook.com/index.php/Attachment_(Streams) + */ +@property(nonatomic,copy) NSString* attachment; + +/** + * A JSON-encoded array of action link objects, containing the link text and a + * hyperlink. + */ +@property(nonatomic,copy) NSString* actionLinks; + +/** + * The ID of the user or the Page where you are publishing the content. If this + * is specified, the post appears on the Wall of the target user, not on the + * Wall of the user who published the post. This mimics the action of posting + * on a friend's Wall on Facebook itself. + * + * Note: To post on the user's own wall, leave this blank. + */ +@property(nonatomic,copy) NSString* targetId; + +/** + * Text you provide the user as a prompt to specify a userMessage. This appears + * above the box where the user enters a custom message. + * For example, "What's on your mind?" + */ +@property(nonatomic,copy) NSString* userMessagePrompt; + +@end diff --git a/Classes/Libraries/FacebookAgent/src/FBConnect/FBConnect.h b/Classes/Libraries/FacebookAgent/src/FBConnect/FBConnect.h new file mode 100644 index 0000000..df98757 --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/FBConnect/FBConnect.h @@ -0,0 +1,23 @@ +/* + * Copyright 2009 Facebook + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ + +#import "FBSession.h" +#import "FBRequest.h" +#import "FBLoginButton.h" +#import "FBLoginDialog.h" +#import "FBPermissionDialog.h" +#import "FBFeedDialog.h" +#import "FBStreamDialog.h" diff --git a/Classes/Libraries/FacebookAgent/src/FBConnect/FBConnectGlobal.h b/Classes/Libraries/FacebookAgent/src/FBConnect/FBConnectGlobal.h new file mode 100644 index 0000000..4d34b73 --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/FBConnect/FBConnectGlobal.h @@ -0,0 +1,217 @@ +/* + * Copyright 2009 Facebook + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ + +#import +#import + +/////////////////////////////////////////////////////////////////////////////////////////////////// + +extern const NSString* kFB_SDK_VersionNumber; + +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef DEBUG +#define FBLOG +#define FBLOG2 +#else +#define FBLOG +#define FBLOG2 +#endif + +/////////////////////////////////////////////////////////////////////////////////////////////////// + +typedef unsigned long long FBUID; +typedef unsigned long long FBID; + +#define FBAPI_ERROR_DOMAIN @"api.facebook.com" + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Error codes + +#define FBAPI_EC_SUCCESS 0 +#define FBAPI_EC_UNKNOWN 1 +#define FBAPI_EC_SERVICE 2 +#define FBAPI_EC_METHOD 3 +#define FBAPI_EC_TOO_MANY_CALLS 4 +#define FBAPI_EC_BAD_IP 5 +#define FBAPI_EC_HOST_API 6 +#define FBAPI_EC_HOST_UP 7 +#define FBAPI_EC_SECURE 8 +#define FBAPI_EC_RATE 9 +#define FBAPI_EC_PERMISSION_DENIED 10 +#define FBAPI_EC_DEPRECATED 11 +#define FBAPI_EC_VERSION 12 + +#define FBAPI_EC_PARAM 100 +#define FBAPI_EC_PARAM_FBAPI_KEY 101 +#define FBAPI_EC_PARAM_SESSION_KEY 102 +#define FBAPI_EC_PARAM_CALL_ID 103 +#define FBAPI_EC_PARAM_SIGNATURE 104 +#define FBAPI_EC_PARAM_TOO_MANY 105 +#define FBAPI_EC_PARAM_USER_ID 110 +#define FBAPI_EC_PARAM_USER_FIELD 111 +#define FBAPI_EC_PARAM_SOCIAL_FIELD 112 +#define FBAPI_EC_PARAM_EMAIL 113 +#define FBAPI_EC_PARAM_ALBUM_ID 120 +#define FBAPI_EC_PARAM_PHOTO_ID 121 +#define FBAPI_EC_PARAM_FEED_PRIORITY 130 +#define FBAPI_EC_PARAM_CATEGORY 140 +#define FBAPI_EC_PARAM_SUBCATEGORY 141 +#define FBAPI_EC_PARAM_TITLE 142 +#define FBAPI_EC_PARAM_DESCRIPTION 143 +#define FBAPI_EC_PARAM_BAD_JSON 144 +#define FBAPI_EC_PARAM_BAD_EID 150 +#define FBAPI_EC_PARAM_UNKNOWN_CITY 151 +#define FBAPI_EC_PARAM_BAD_PAGE_TYPE 152 + +#define FBAPI_EC_PERMISSION 200 +#define FBAPI_EC_PERMISSION_USER 210 +#define FBAPI_EC_PERMISSION_ALBUM 220 +#define FBAPI_EC_PERMISSION_PHOTO 221 +#define FBAPI_EC_PERMISSION_MESSAGE 230 +#define FBAPI_EC_PERMISSION_MARKUP_OTHER_USER 240 +#define FBAPI_EC_PERMISSION_STATUS_UPDATE 250 +#define FBAPI_EC_PERMISSION_PHOTO_UPLOAD 260 +#define FBAPI_EC_PERMISSION_SMS 270 +#define FBAPI_EC_PERMISSION_CREATE_LISTING 280 +#define FBAPI_EC_PERMISSION_EVENT 290 +#define FBAPI_EC_PERMISSION_LARGE_FBML_TEMPLATE 291 +#define FBAPI_EC_PERMISSION_LIVEMESSAGE 292 +#define FBAPI_EC_PERMISSION_RSVP_EVENT 299 + +#define FBAPI_EC_EDIT 300 +#define FBAPI_EC_EDIT_USER_DATA 310 +#define FBAPI_EC_EDIT_PHOTO 320 +#define FBAPI_EC_EDIT_ALBUM_SIZE 321 +#define FBAPI_EC_EDIT_PHOTO_TAG_SUBJECT 322 +#define FBAPI_EC_EDIT_PHOTO_TAG_PHOTO 323 +#define FBAPI_EC_EDIT_PHOTO_FILE 324 +#define FBAPI_EC_EDIT_PHOTO_PENDING_LIMIT 325 +#define FBAPI_EC_EDIT_PHOTO_TAG_LIMIT 326 +#define FBAPI_EC_EDIT_ALBUM_REORDER_PHOTO_NOT_IN_ALBUM 327 +#define FBAPI_EC_EDIT_ALBUM_REORDER_TOO_FEW_PHOTOS 328 +#define FBAPI_EC_MALFORMED_MARKUP 329 +#define FBAPI_EC_EDIT_MARKUP 330 +#define FBAPI_EC_EDIT_FEED_TOO_MANY_USER_CALLS 340 +#define FBAPI_EC_EDIT_FEED_TOO_MANY_USER_ACTION_CALLS 341 +#define FBAPI_EC_EDIT_FEED_TITLE_LINK 342 +#define FBAPI_EC_EDIT_FEED_TITLE_LENGTH 343 +#define FBAPI_EC_EDIT_FEED_TITLE_NAME 344 +#define FBAPI_EC_EDIT_FEED_TITLE_BLANK 345 +#define FBAPI_EC_EDIT_FEED_BODY_LENGTH 346 +#define FBAPI_EC_EDIT_FEED_PHOTO_SRC 347 +#define FBAPI_EC_EDIT_FEED_PHOTO_LINK 348 +#define FBAPI_EC_EDIT_VIDEO_SIZE 350 +#define FBAPI_EC_EDIT_VIDEO_INVALID_FILE 351 +#define FBAPI_EC_EDIT_VIDEO_INVALID_TYPE 352 +#define FBAPI_EC_EDIT_FEED_TITLE_ARRAY 360 +#define FBAPI_EC_EDIT_FEED_TITLE_PARAMS 361 +#define FBAPI_EC_EDIT_FEED_BODY_ARRAY 362 +#define FBAPI_EC_EDIT_FEED_BODY_PARAMS 363 +#define FBAPI_EC_EDIT_FEED_PHOTO 364 +#define FBAPI_EC_EDIT_FEED_TEMPLATE 365 +#define FBAPI_EC_EDIT_FEED_TARGET 366 +#define FBAPI_EC_USERS_CREATE_INVALID_EMAIL 370 +#define FBAPI_EC_USERS_CREATE_EXISTING_EMAIL 371 +#define FBAPI_EC_USERS_CREATE_BIRTHDAY 372 +#define FBAPI_EC_USERS_CREATE_PASSWORD 373 +#define FBAPI_EC_USERS_REGISTER_INVALID_CREDENTIAL 374 +#define FBAPI_EC_USERS_REGISTER_CONF_FAILURE 375 +#define FBAPI_EC_USERS_REGISTER_EXISTING 376 +#define FBAPI_EC_USERS_REGISTER_DEFAULT_ERROR 377 +#define FBAPI_EC_USERS_REGISTER_PASSWORD_BLANK 378 +#define FBAPI_EC_USERS_REGISTER_PASSWORD_INVALID_CHARS 379 +#define FBAPI_EC_USERS_REGISTER_PASSWORD_SHORT 380 +#define FBAPI_EC_USERS_REGISTER_PASSWORD_WEAK 381 +#define FBAPI_EC_USERS_REGISTER_USERNAME_ERROR 382 +#define FBAPI_EC_USERS_REGISTER_MISSING_INPUT 383 +#define FBAPI_EC_USERS_REGISTER_INCOMPLETE_BDAY 384 +#define FBAPI_EC_USERS_REGISTER_INVALID_EMAIL 385 +#define FBAPI_EC_USERS_REGISTER_EMAIL_DISABLED 386 +#define FBAPI_EC_USERS_REGISTER_ADD_USER_FAILED 387 +#define FBAPI_EC_USERS_REGISTER_NO_GENDER 388 + +#define FBAPI_EC_AUTH_EMAIL 400 +#define FBAPI_EC_AUTH_LOGIN 401 +#define FBAPI_EC_AUTH_SIG 402 +#define FBAPI_EC_AUTH_TIME 403 + +#define FBAPI_EC_SESSION_METHOD 451 +#define FBAPI_EC_SESSION_REQUIRED 453 +#define FBAPI_EC_SESSION_REQUIRED_FOR_SECRET 454 +#define FBAPI_EC_SESSION_CANNOT_USE_SESSION_SECRET 455 + +#define FBAPI_EC_MESG_BANNED 500 +#define FBAPI_EC_MESG_NO_BODY 501 +#define FBAPI_EC_MESG_TOO_LONG 502 +#define FBAPI_EC_MESG_RATE 503 +#define FBAPI_EC_MESG_INVALID_THREAD 504 +#define FBAPI_EC_MESG_INVALID_RECIP 505 +#define FBAPI_EC_POKE_INVALID_RECIP 510 +#define FBAPI_EC_POKE_OUTSTANDING 511 +#define FBAPI_EC_POKE_RATE 512 + +#define FQL_EC_UNKNOWN_ERROR 600 +#define FQL_EC_PARSER_ERROR 601 +#define FQL_EC_UNKNOWN_FIELD 602 +#define FQL_EC_UNKNOWN_TABLE 603 +#define FQL_EC_NO_INDEX 604 +#define FQL_EC_UNKNOWN_FUNCTION 605 +#define FQL_EC_INVALID_PARAM 606 +#define FQL_EC_INVALID_FIELD 607 +#define FQL_EC_INVALID_SESSION 608 + +#define FBAPI_EC_REF_SET_FAILED 700 +#define FBAPI_EC_FB_APP_UNKNOWN_ERROR 750 +#define FBAPI_EC_FB_APP_FETCH_FAILED 751 +#define FBAPI_EC_FB_APP_NO_DATA 752 +#define FBAPI_EC_FB_APP_NO_PERMISSIONS 753 +#define FBAPI_EC_FB_APP_TAG_MISSING 754 + +#define FBAPI_EC_DATA_UNKNOWN_ERROR 800 +#define FBAPI_EC_DATA_INVALID_OPERATION 801 +#define FBAPI_EC_DATA_QUOTA_EXCEEDED 802 +#define FBAPI_EC_DATA_OBJECT_NOT_FOUND 803 +#define FBAPI_EC_DATA_OBJECT_ALREADY_EXISTS 804 +#define FBAPI_EC_DATA_DATABASE_ERROR 805 +#define FBAPI_EC_DATA_CREATE_TEMPLATE_ERROR 806 +#define FBAPI_EC_DATA_TEMPLATE_EXISTS_ERROR 807 +#define FBAPI_EC_DATA_TEMPLATE_HANDLE_TOO_LONG 808 +#define FBAPI_EC_DATA_TEMPLATE_HANDLE_ALREADY_IN_USE 809 +#define FBAPI_EC_DATA_TOO_MANY_TEMPLATE_BUNDLES 810 +#define FBAPI_EC_DATA_MALFORMED_ACTION_LINK 811 +#define FBAPI_EC_DATA_TEMPLATE_USES_RESERVED_TOKEN 812 + +#define FBAPI_EC_NO_SUCH_APP 900 +#define FBAPI_BATCH_TOO_MANY_ITEMS 950 +#define FBAPI_EC_BATCH_ALREADY_STARTED 951 +#define FBAPI_EC_BATCH_NOT_STARTED 952 +#define FBAPI_EC_BATCH_METHOD_NOT_ALLOWED_IN_BATCH_MODE 953 + +#define FBAPI_EC_EVENT_INVALID_TIME 1000 +#define FBAPI_EC_INFO_NO_INFORMATION 1050 +#define FBAPI_EC_INFO_SET_FAILED 1051 + +#define FBAPI_EC_LIVEMESSAGE_SEND_FAILED 1100 +#define FBAPI_EC_LIVEMESSAGE_EVENT_NAME_TOO_LONG 1101 +#define FBAPI_EC_LIVEMESSAGE_MESSAGE_TOO_LONG 1102 + +#define FBAPI_EC_PAGES_CREATE 1201 + +/////////////////////////////////////////////////////////////////////////////////////////////////// + +NSMutableArray* FBCreateNonRetainingArray(); + diff --git a/Classes/Libraries/FacebookAgent/src/FBConnect/FBDialog.h b/Classes/Libraries/FacebookAgent/src/FBConnect/FBDialog.h new file mode 100644 index 0000000..9820548 --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/FBConnect/FBDialog.h @@ -0,0 +1,137 @@ +/* + * Copyright 2009 Facebook + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ + +#import "FBConnectGlobal.h" + +@protocol FBDialogDelegate; +@class FBSession; + +@interface FBDialog : UIView { + id _delegate; + FBSession* _session; + NSURL* _loadingURL; + UIWebView* _webView; + UIActivityIndicatorView* _spinner; + UIImageView* _iconView; + UILabel* _titleLabel; + UIButton* _closeButton; + UIDeviceOrientation _orientation; + BOOL _showingKeyboard; +} + +/** + * The delegate. + */ +@property(nonatomic,assign) id delegate; + +/** + * The session for which the login is taking place. + */ +@property(nonatomic,assign) FBSession* session; + +/** + * The title that is shown in the header atop the view; + */ +@property(nonatomic,copy) NSString* title; + +/** + * Creates the view but does not display it. + */ +- (id)initWithSession:(FBSession*)session; + +/** + * Displays the view with an animation. + * + * The view will be added to the top of the current key window. + */ +- (void)show; + +/** + * Displays the first page of the dialog. + * + * Do not ever call this directly. It is intended to be overriden by subclasses. + */ +- (void)load; + +/** + * Displays a URL in the dialog. + */ +- (void)loadURL:(NSString*)url method:(NSString*)method get:(NSDictionary*)getParams + post:(NSDictionary*)postParams; + +/** + * Hides the view and notifies delegates of success or cancellation. + */ +- (void)dismissWithSuccess:(BOOL)success animated:(BOOL)animated; + +/** + * Hides the view and notifies delegates of an error. + */ +- (void)dismissWithError:(NSError*)error animated:(BOOL)animated; + +/** + * Subclasses may override to perform actions just prior to showing the dialog. + */ +- (void)dialogWillAppear; + +/** + * Subclasses may override to perform actions just after the dialog is hidden. + */ +- (void)dialogWillDisappear; + +/** + * Subclasses should override to process data returned from the server in a 'fbconnect' url. + * + * Implementations must call dismissWithSuccess:YES at some point to hide the dialog. + */ +- (void)dialogDidSucceed:(NSURL*)url; + +@end + +/////////////////////////////////////////////////////////////////////////////////////////////////// + +@protocol FBDialogDelegate + +@optional + +/** + * Called when the dialog succeeds and is about to be dismissed. + */ +- (void)dialogDidSucceed:(FBDialog*)dialog; + +/** + * Called when the dialog is cancelled and is about to be dismissed. + */ +- (void)dialogDidCancel:(FBDialog*)dialog; + +/** + * Called when dialog failed to load due to an error. + */ +- (void)dialog:(FBDialog*)dialog didFailWithError:(NSError*)error; + +/** + * Asks if a link touched by a user should be opened in an external browser. + * + * If a user touches a link, the default behavior is to open the link in the Safari browser, + * which will cause your app to quit. You may want to prevent this from happening, open the link + * in your own internal browser, or perhaps warn the user that they are about to leave your app. + * If so, implement this method on your delegate and return NO. If you warn the user, you + * should hold onto the URL and once you have received their acknowledgement open the URL yourself + * using [[UIApplication sharedApplication] openURL:]. + */ +- (BOOL)dialog:(FBDialog*)dialog shouldOpenURLInExternalBrowser:(NSURL*)url; + +@end diff --git a/Classes/Libraries/FacebookAgent/src/FBConnect/FBFeedDialog.h b/Classes/Libraries/FacebookAgent/src/FBConnect/FBFeedDialog.h new file mode 100644 index 0000000..da52f57 --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/FBConnect/FBFeedDialog.h @@ -0,0 +1,50 @@ +/* + * Copyright 2009 Facebook + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ + +#import "FBDialog.h" + +@interface FBFeedDialog : FBDialog { + long long _templateBundleId; + NSString* _templateData; + NSString* _bodyGeneral; + NSString* _userMessagePrompt; +} + +/** + * The id for a previously registered template bundle. + */ +@property(nonatomic) long long templateBundleId; + +/** + * A JSON string containing template data. + * + * See http://wiki.developers.facebook.com/index.php/Template_Data + */ +@property(nonatomic,copy) NSString* templateData; + +/** + * Additional markup for a short story. + */ +@property(nonatomic,copy) NSString* bodyGeneral; + +/** + * Text you provide the user as a prompt to specify a userMessage. This appears + * above the box where the user enters a custom message. + * For example, "What's on your mind?" + */ +@property(nonatomic,copy) NSString* userMessagePrompt; + +@end diff --git a/Classes/Libraries/FacebookAgent/src/FBConnect/FBLoginButton.h b/Classes/Libraries/FacebookAgent/src/FBConnect/FBLoginButton.h new file mode 100644 index 0000000..4f98f4f --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/FBConnect/FBLoginButton.h @@ -0,0 +1,49 @@ +/* + * Copyright 2009 Facebook + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ + +#import "FBSession.h" + +typedef enum { + FBLoginButtonStyleNormal, + FBLoginButtonStyleWide, +} FBLoginButtonStyle; + +/** + * Standard button which lets the user log in or out of the session. + * + * The button will automatically change to reflect the state of the session, showing + * "login" if the session is not connected, and "logout" if the session is connected. + */ +@interface FBLoginButton : UIControl { + FBLoginButtonStyle _style; + FBSession* _session; + UIImageView* _imageView; +} + +/** + * The visual style of the button. + */ +@property(nonatomic) FBLoginButtonStyle style; + +/** + * The session object that the button will log in and out of. + * + * The default value is the global session singleton, so there is usually no need to + * set this property yourself. + */ +@property(nonatomic,retain) FBSession* session; + +@end diff --git a/Classes/Libraries/FacebookAgent/src/FBConnect/FBLoginDialog.h b/Classes/Libraries/FacebookAgent/src/FBConnect/FBLoginDialog.h new file mode 100644 index 0000000..8eb0b90 --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/FBConnect/FBLoginDialog.h @@ -0,0 +1,24 @@ +/* + * Copyright 2009 Facebook + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ + +#import "FBDialog.h" +#import "FBRequest.h" + +@interface FBLoginDialog : FBDialog { + FBRequest* _getSessionRequest; +} + +@end diff --git a/Classes/Libraries/FacebookAgent/src/FBConnect/FBPermissionDialog.h b/Classes/Libraries/FacebookAgent/src/FBConnect/FBPermissionDialog.h new file mode 100644 index 0000000..d203ddb --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/FBConnect/FBPermissionDialog.h @@ -0,0 +1,31 @@ +/* + * Copyright 2009 Facebook + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ + +#import "FBLoginDialog.h" + +@interface FBPermissionDialog : FBLoginDialog { + NSString* _permission; + NSTimer* _redirectTimer; +} + +/** + * The extended permission to request. + * + * See http://wiki.developers.facebook.com/index.php/Extended_permissions + */ +@property(nonatomic,copy) NSString* permission; + +@end diff --git a/Classes/Libraries/FacebookAgent/src/FBConnect/FBRequest.h b/Classes/Libraries/FacebookAgent/src/FBConnect/FBRequest.h new file mode 100644 index 0000000..1c5852b --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/FBConnect/FBRequest.h @@ -0,0 +1,165 @@ +/* + * Copyright 2009 Facebook + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ + +#import "FBConnectGlobal.h" + +@protocol FBRequestDelegate; +@class FBSession; + +@interface FBRequest : NSObject { + FBSession* _session; + id _delegate; + NSString* _url; + NSString* _method; + id _userInfo; + NSMutableDictionary* _params; + NSObject* _dataParam; + NSDate* _timestamp; + NSURLConnection* _connection; + NSMutableData* _responseText; +} + +/** + * Creates a new API request for the global session. + */ ++ (FBRequest*)request; + +/** + * Creates a new API request for the global session with a delegate. + */ ++ (FBRequest*)requestWithDelegate:(id)delegate; + +/** + * Creates a new API request for a particular session. + */ ++ (FBRequest*)requestWithSession:(FBSession*)session; + +/** + * Creates a new API request for the global session with a delegate. + */ ++ (FBRequest*)requestWithSession:(FBSession*)session delegate:(id)delegate; + +@property(nonatomic,assign) id delegate; + +/** + * The URL which will be contacted to execute the request. + */ +@property(nonatomic,readonly) NSString* url; + +/** + * The API method which will be called. + */ +@property(nonatomic,readonly) NSString* method; + +/** + * An object used by the user of the request to help identify the meaning of the request. + */ +@property(nonatomic,retain) id userInfo; + +/** + * The dictionary of parameters to pass to the method. + * + * These values in the dictionary will be converted to strings using the + * standard Objective-C object-to-string conversion facilities. + */ +@property(nonatomic,readonly) NSDictionary* params; + +/** + * A data parameter. + * + * Used for methods such as photos.upload, video.upload, events.create, and + * events.edit. + */ +@property(nonatomic,readonly) NSObject* dataParam; + +/** + * The timestamp of when the request was sent to the server. + */ +@property(nonatomic,readonly) NSDate* timestamp; + +/** + * Indicates if the request has been sent and is awaiting a response. + */ +@property(nonatomic,readonly) BOOL loading; + +/** + * Creates a new request paired to a session. + */ +- (id)initWithSession:(FBSession*)session; + +/** + * Calls a method on the server asynchronously. + * + * The delegate will be called for each stage of the loading process. + */ +- (void)call:(NSString*)method params:(NSDictionary*)params; + +/** + * Calls a method on the server asynchronously, with a file upload component. + * + * The delegate will be called for each stage of the loading process. + */ +- (void)call:(NSString*)method params:(NSDictionary*)params dataParam:(NSData*)dataParam; + +/** + * Calls a URL on the server asynchronously. + * + * The delegate will be called for each stage of the loading process. + */ +- (void)post:(NSString*)url params:(NSDictionary*)params; + +/** + * Stops an active request before the response has returned. + */ +- (void)cancel; + +@end + +/////////////////////////////////////////////////////////////////////////////////////////////////// + +@protocol FBRequestDelegate + +@optional + +/** + * Called just before the request is sent to the server. + */ +- (void)requestLoading:(FBRequest*)request; + +/** + * Called when the server responds and begins to send back data. + */ +- (void)request:(FBRequest*)request didReceiveResponse:(NSURLResponse*)response; + +/** + * Called when an error prevents the request from completing successfully. + */ +- (void)request:(FBRequest*)request didFailWithError:(NSError*)error; + +/** + * Called when a request returns and its response has been parsed into an object. + * + * The resulting object may be a dictionary, an array, a string, or a number, depending + * on thee format of the API response. + */ +- (void)request:(FBRequest*)request didLoad:(id)result; + +/** + * Called when the request was cancelled. + */ +- (void)requestWasCancelled:(FBRequest*)request; + +@end diff --git a/Classes/Libraries/FacebookAgent/src/FBConnect/FBSession.h b/Classes/Libraries/FacebookAgent/src/FBConnect/FBSession.h new file mode 100644 index 0000000..3526899 --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/FBConnect/FBSession.h @@ -0,0 +1,198 @@ +/* + * Copyright 2009 Facebook + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ + +#import "FBConnectGlobal.h" + +@protocol FBSessionDelegate; +@class FBRequest; + +/** + * An FBSession represents a single user's authenticated session for a Facebook application. + * + * To create a session, you must use the session key of your application (which can + * be found on the Facebook developer website). You may then use the login dialog to ask + * the user to enter their email address and password. If successful, you will get back a + * session key which can be used to make requests to the Facebook API. + * + * Session keys are cached and stored on the disk of the device so that you do not need to ask + * the user to login every time they launch the app. To restore the last active session, call the + * resume method after instantiating your session. + */ +@interface FBSession : NSObject { + NSMutableArray* _delegates; + NSString* _apiKey; + NSString* _apiSecret; + NSString* _getSessionProxy; + FBUID _uid; + NSString* _sessionKey; + NSString* _sessionSecret; + NSDate* _expirationDate; + NSMutableArray* _requestQueue; + NSDate* _lastRequestTime; + int _requestBurstCount; + NSTimer* _requestTimer; +} + +/** + * Delegates which implement FBSessionDelegate. + */ +@property(nonatomic,readonly) NSMutableArray* delegates; + +/** + * The URL used for API HTTP requests. + */ +@property(nonatomic,readonly) NSString* apiURL; + +/** + * The URL used for secure API HTTP requests. + */ +@property(nonatomic,readonly) NSString* apiSecureURL; + +/** + * Your application's API key, as passed to the constructor. + */ +@property(nonatomic,readonly) NSString* apiKey; + +/** + * Your application's API secret, as passed to the constructor. + */ +@property(nonatomic,readonly) NSString* apiSecret; + +/** + * The URL to call to create a session key after login. + * + * This is an alternative to calling auth.getSession directly using the secret key. + */ +@property(nonatomic,readonly) NSString* getSessionProxy; + +/** + * The current user's Facebook id. + */ +@property(nonatomic,readonly) FBUID uid; + +/** + * The current user's session key. + */ +@property(nonatomic,readonly) NSString* sessionKey; + +/** + * The current user's session secret. + */ +@property(nonatomic,readonly) NSString* sessionSecret; + +/** + * The expiration date of the session key. + */ +@property(nonatomic,readonly) NSDate* expirationDate; + +/** + * Determines if the session is active and connected to a user. + */ +@property(nonatomic,readonly) BOOL isConnected; + +/** + * The globally shared session instance. + */ ++ (FBSession*)session; + +/** + * Sets the globally shared session instance. + * + * This session is not retained, so you are still responsible for retaining it yourself. The + * first session that is created is automatically stored here. + */ ++ (void)setSession:(FBSession*)session; + +/** + * Constructs a session and stores it as the globally shared session instance. + * + * @param secret the application secret (optional) + */ ++ (FBSession*)sessionForApplication:(NSString*)key secret:(NSString*)secret + delegate:(id)delegate; + +/** + * Constructs a session and stores it as the global singleton. + * + * @param getSessionProxy a url to that proxies auth.getSession (optional) + */ ++ (FBSession*)sessionForApplication:(NSString*)key getSessionProxy:(NSString*)getSessionProxy + delegate:(id)delegate; + +/** + * Constructs a session for an application. + * + * @param secret the application secret (optional) + * @param getSessionProxy a url to that proxies auth.getSession (optional) + */ +- (FBSession*)initWithKey:(NSString*)key secret:(NSString*)secret + getSessionProxy:(NSString*)getSessionProxy; + +/** + * Begins a session for a user with a given key and secret. + */ +- (void)begin:(FBUID)uid sessionKey:(NSString*)sessionKey sessionSecret:(NSString*)sessionSecret + expires:(NSDate*)expires; + +/** + * Resumes a previous session whose uid, session key, and secret are cached on disk. + */ +- (BOOL)resume; + +/** + * Cancels a login (no-op if the login is already complete). + */ +- (void)cancelLogin; + +/** + * Ends the current session and deletes the uid, session key, and secret from disk. + */ +- (void)logout; + +/** + * Sends a fully configured request to the server for execution. + */ +- (void)send:(FBRequest*)request; + +@end + +/////////////////////////////////////////////////////////////////////////////////////////////////// + +@protocol FBSessionDelegate + +/** + * Called when a user has successfully logged in and begun a session. + */ +- (void)session:(FBSession*)session didLogin:(FBUID)uid; + +@optional + +/** + * Called when a user closes the login dialog without logging in. + */ +- (void)sessionDidNotLogin:(FBSession*)session; + +/** + * Called when a session is about to log out. + */ +- (void)session:(FBSession*)session willLogout:(FBUID)uid; + +/** + * Called when a session has logged out. + */ +- (void)sessionDidLogout:(FBSession*)session; + +@end diff --git a/Classes/Libraries/FacebookAgent/src/FBConnect/FBStreamDialog.h b/Classes/Libraries/FacebookAgent/src/FBConnect/FBStreamDialog.h new file mode 100644 index 0000000..b926a01 --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/FBConnect/FBStreamDialog.h @@ -0,0 +1,62 @@ +/* + * Copyright 2009 Facebook + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import "FBDialog.h" + +@interface FBStreamDialog : FBDialog { + NSString* _attachment; + NSString* _actionLinks; + NSString* _targetId; + NSString* _userMessagePrompt; +} + +/** + * A JSON-encoded object containing the text of the post, relevant links, a + * media type (image, video, mp3, flash), as well as any other key/value pairs + * you may want to add. + * + * Note: If you want to use this call to update a user's status, don't pass an + * attachment; the content of the userMessage parameter will become the user's + * new status and will appear at the top of the user's profile. + * + * For more info, see http://wiki.developers.facebook.com/index.php/Attachment_(Streams) + */ +@property(nonatomic,copy) NSString* attachment; + +/** + * A JSON-encoded array of action link objects, containing the link text and a + * hyperlink. + */ +@property(nonatomic,copy) NSString* actionLinks; + +/** + * The ID of the user or the Page where you are publishing the content. If this + * is specified, the post appears on the Wall of the target user, not on the + * Wall of the user who published the post. This mimics the action of posting + * on a friend's Wall on Facebook itself. + * + * Note: To post on the user's own wall, leave this blank. + */ +@property(nonatomic,copy) NSString* targetId; + +/** + * Text you provide the user as a prompt to specify a userMessage. This appears + * above the box where the user enters a custom message. + * For example, "What's on your mind?" + */ +@property(nonatomic,copy) NSString* userMessagePrompt; + +@end diff --git a/Classes/Libraries/FacebookAgent/src/FBConnectGlobal.m b/Classes/Libraries/FacebookAgent/src/FBConnectGlobal.m new file mode 100644 index 0000000..4fa6307 --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/FBConnectGlobal.m @@ -0,0 +1,35 @@ +/* + * Copyright 2009 Facebook + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ + +#import "FBConnectGlobal.h" + +const NSString* kFB_SDK_VersionNumber = @"iphone/1.1"; + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// private + +const void* RetainNoOp(CFAllocatorRef allocator, const void *value) { return value; } +void ReleaseNoOp(CFAllocatorRef allocator, const void *value) { } + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// public + +NSMutableArray* FBCreateNonRetainingArray() { + CFArrayCallBacks callbacks = kCFTypeArrayCallBacks; + callbacks.retain = RetainNoOp; + callbacks.release = ReleaseNoOp; + return (NSMutableArray*)CFArrayCreateMutable(nil, 0, &callbacks); +} diff --git a/Classes/Libraries/FacebookAgent/src/FBDialog.m b/Classes/Libraries/FacebookAgent/src/FBDialog.m new file mode 100644 index 0000000..5dec7e7 --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/FBDialog.m @@ -0,0 +1,606 @@ +/* + * Copyright 2009 Facebook + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ + +#import "FBDialog.h" +#import "FBSession.h" + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// global + +static NSString* kDefaultTitle = @"Connect to Facebook"; +static NSString* kStringBoundary = @"3i2ndDfv2rTHiSisAbouNdArYfORhtTPEefj3q2f"; + +static CGFloat kFacebookBlue[4] = {0.42578125, 0.515625, 0.703125, 1.0}; +static CGFloat kBorderGray[4] = {0.3, 0.3, 0.3, 0.8}; +static CGFloat kBorderBlack[4] = {0.3, 0.3, 0.3, 1}; +static CGFloat kBorderBlue[4] = {0.23, 0.35, 0.6, 1.0}; + +static CGFloat kTransitionDuration = 0.3; + +static CGFloat kTitleMarginX = 8; +static CGFloat kTitleMarginY = 4; +static CGFloat kPadding = 10; +static CGFloat kBorderWidth = 10; + +/////////////////////////////////////////////////////////////////////////////////////////////////// + +@implementation FBDialog + +@synthesize session = _session, delegate = _delegate; + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// private + +- (void)addRoundedRectToPath:(CGContextRef)context rect:(CGRect)rect radius:(float)radius { + CGContextBeginPath(context); + CGContextSaveGState(context); + + if (radius == 0) { + CGContextTranslateCTM(context, CGRectGetMinX(rect), CGRectGetMinY(rect)); + CGContextAddRect(context, rect); + } else { + rect = CGRectOffset(CGRectInset(rect, 0.5, 0.5), 0.5, 0.5); + CGContextTranslateCTM(context, CGRectGetMinX(rect)-0.5, CGRectGetMinY(rect)-0.5); + CGContextScaleCTM(context, radius, radius); + float fw = CGRectGetWidth(rect) / radius; + float fh = CGRectGetHeight(rect) / radius; + + CGContextMoveToPoint(context, fw, fh/2); + CGContextAddArcToPoint(context, fw, fh, fw/2, fh, 1); + CGContextAddArcToPoint(context, 0, fh, 0, fh/2, 1); + CGContextAddArcToPoint(context, 0, 0, fw/2, 0, 1); + CGContextAddArcToPoint(context, fw, 0, fw, fh/2, 1); + } + + CGContextClosePath(context); + CGContextRestoreGState(context); +} + +- (void)drawRect:(CGRect)rect fill:(const CGFloat*)fillColors radius:(CGFloat)radius { + CGContextRef context = UIGraphicsGetCurrentContext(); + CGColorSpaceRef space = CGColorSpaceCreateDeviceRGB(); + + if (fillColors) { + CGContextSaveGState(context); + CGContextSetFillColor(context, fillColors); + if (radius) { + [self addRoundedRectToPath:context rect:rect radius:radius]; + CGContextFillPath(context); + } else { + CGContextFillRect(context, rect); + } + CGContextRestoreGState(context); + } + + CGColorSpaceRelease(space); +} + +- (void)strokeLines:(CGRect)rect stroke:(const CGFloat*)strokeColor { + CGContextRef context = UIGraphicsGetCurrentContext(); + CGColorSpaceRef space = CGColorSpaceCreateDeviceRGB(); + + CGContextSaveGState(context); + CGContextSetStrokeColorSpace(context, space); + CGContextSetStrokeColor(context, strokeColor); + CGContextSetLineWidth(context, 1.0); + + { + CGPoint points[] = {rect.origin.x+0.5, rect.origin.y-0.5, + rect.origin.x+rect.size.width, rect.origin.y-0.5}; + CGContextStrokeLineSegments(context, points, 2); + } + { + CGPoint points[] = {rect.origin.x+0.5, rect.origin.y+rect.size.height-0.5, + rect.origin.x+rect.size.width-0.5, rect.origin.y+rect.size.height-0.5}; + CGContextStrokeLineSegments(context, points, 2); + } + { + CGPoint points[] = {rect.origin.x+rect.size.width-0.5, rect.origin.y, + rect.origin.x+rect.size.width-0.5, rect.origin.y+rect.size.height}; + CGContextStrokeLineSegments(context, points, 2); + } + { + CGPoint points[] = {rect.origin.x+0.5, rect.origin.y, + rect.origin.x+0.5, rect.origin.y+rect.size.height}; + CGContextStrokeLineSegments(context, points, 2); + } + + CGContextRestoreGState(context); + + CGColorSpaceRelease(space); +} + +- (BOOL)shouldRotateToOrientation:(UIDeviceOrientation)orientation { + if (orientation == _orientation) { + return NO; + } else { + return orientation == UIDeviceOrientationLandscapeLeft + || orientation == UIDeviceOrientationLandscapeRight + || orientation == UIDeviceOrientationPortrait + || orientation == UIDeviceOrientationPortraitUpsideDown; + } +} + +- (CGAffineTransform)transformForOrientation { + UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation; + if (orientation == UIInterfaceOrientationLandscapeLeft) { + return CGAffineTransformMakeRotation(M_PI*1.5); + } else if (orientation == UIInterfaceOrientationLandscapeRight) { + return CGAffineTransformMakeRotation(M_PI/2); + } else if (orientation == UIInterfaceOrientationPortraitUpsideDown) { + return CGAffineTransformMakeRotation(-M_PI); + } else { + return CGAffineTransformIdentity; + } +} + +- (void)sizeToFitOrientation:(BOOL)transform { + if (transform) { + self.transform = CGAffineTransformIdentity; + } + + CGRect frame = [UIScreen mainScreen].applicationFrame; + CGPoint center = CGPointMake( + frame.origin.x + ceil(frame.size.width/2), + frame.origin.y + ceil(frame.size.height/2)); + + CGFloat width = frame.size.width - kPadding * 2; + CGFloat height = frame.size.height - kPadding * 2; + + _orientation = [UIApplication sharedApplication].statusBarOrientation; + if (UIInterfaceOrientationIsLandscape(_orientation)) { + self.frame = CGRectMake(kPadding, kPadding, height, width); + } else { + self.frame = CGRectMake(kPadding, kPadding, width, height); + } + self.center = center; + + if (transform) { + self.transform = [self transformForOrientation]; + } +} + +- (void)updateWebOrientation { + UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation; + if (UIInterfaceOrientationIsLandscape(orientation)) { + [_webView stringByEvaluatingJavaScriptFromString: + @"document.body.setAttribute('orientation', 90);"]; + } else { + [_webView stringByEvaluatingJavaScriptFromString: + @"document.body.removeAttribute('orientation');"]; + } +} + +- (void)bounce1AnimationStopped { + [UIView beginAnimations:nil context:nil]; + [UIView setAnimationDuration:kTransitionDuration/2]; + [UIView setAnimationDelegate:self]; + [UIView setAnimationDidStopSelector:@selector(bounce2AnimationStopped)]; + self.transform = CGAffineTransformScale([self transformForOrientation], 0.9, 0.9); + [UIView commitAnimations]; +} + +- (void)bounce2AnimationStopped { + [UIView beginAnimations:nil context:nil]; + [UIView setAnimationDuration:kTransitionDuration/2]; + self.transform = [self transformForOrientation]; + [UIView commitAnimations]; +} + +- (NSURL*)generateURL:(NSString*)baseURL params:(NSDictionary*)params { + if (params) { + NSMutableArray* pairs = [NSMutableArray array]; + for (NSString* key in params.keyEnumerator) { + NSString* value = [params objectForKey:key]; + NSString* val = [value stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; + NSString* pair = [NSString stringWithFormat:@"%@=%@", key, val]; + [pairs addObject:pair]; + } + + NSString* query = [pairs componentsJoinedByString:@"&"]; + NSString* url = [NSString stringWithFormat:@"%@?%@", baseURL, query]; + return [NSURL URLWithString:url]; + } else { + return [NSURL URLWithString:baseURL]; + } +} + +- (NSMutableData*)generatePostBody:(NSDictionary*)params { + if (!params) { + return nil; + } + + NSMutableData* body = [NSMutableData data]; + NSString* endLine = [NSString stringWithFormat:@"\r\n--%@\r\n", kStringBoundary]; + + [body appendData:[[NSString stringWithFormat:@"--%@\r\n", kStringBoundary] + dataUsingEncoding:NSUTF8StringEncoding]]; + + for (id key in [params keyEnumerator]) { + [body appendData:[[NSString + stringWithFormat:@"Content-Disposition: form-data; name=\"%@\"\r\n\r\n", key] + dataUsingEncoding:NSUTF8StringEncoding]]; + [body appendData:[[params valueForKey:key] dataUsingEncoding:NSUTF8StringEncoding]]; + [body appendData:[endLine dataUsingEncoding:NSUTF8StringEncoding]]; + } + + return body; +} + +- (void)addObservers { + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(deviceOrientationDidChange:) + name:@"UIDeviceOrientationDidChangeNotification" object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(keyboardWillShow:) name:@"UIKeyboardWillShowNotification" object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(keyboardWillHide:) name:@"UIKeyboardWillHideNotification" object:nil]; +} + +- (void)removeObservers { + [[NSNotificationCenter defaultCenter] removeObserver:self + name:@"UIDeviceOrientationDidChangeNotification" object:nil]; + [[NSNotificationCenter defaultCenter] removeObserver:self + name:@"UIKeyboardWillShowNotification" object:nil]; + [[NSNotificationCenter defaultCenter] removeObserver:self + name:@"UIKeyboardWillHideNotification" object:nil]; +} + +- (void)postDismissCleanup { + [self removeObservers]; + [self removeFromSuperview]; +} + +- (void)dismiss:(BOOL)animated { + [self dialogWillDisappear]; + + [_loadingURL release]; + _loadingURL = nil; + + if (animated) { + [UIView beginAnimations:nil context:nil]; + [UIView setAnimationDuration:kTransitionDuration]; + [UIView setAnimationDelegate:self]; + [UIView setAnimationDidStopSelector:@selector(postDismissCleanup)]; + self.alpha = 0; + [UIView commitAnimations]; + } else { + [self postDismissCleanup]; + } +} + +- (void)cancel { + [self dismissWithSuccess:NO animated:YES]; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// NSObject + +- (id)init { + return [self initWithSession:[FBSession session]]; +} + +- (id)initWithSession:(FBSession*)session { + if (self = [super initWithFrame:CGRectZero]) { + _delegate = nil; + _session = [session retain]; + _loadingURL = nil; + _orientation = UIDeviceOrientationUnknown; + _showingKeyboard = NO; + + self.backgroundColor = [UIColor clearColor]; + self.autoresizesSubviews = YES; + self.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; + self.contentMode = UIViewContentModeRedraw; + + UIImage* iconImage = [UIImage imageNamed:@"FBConnect.bundle/images/fbicon.png"]; + UIImage* closeImage = [UIImage imageNamed:@"FBConnect.bundle/images/close.png"]; + + _iconView = [[UIImageView alloc] initWithImage:iconImage]; + [self addSubview:_iconView]; + + UIColor* color = [UIColor colorWithRed:167.0/255 green:184.0/255 blue:216.0/255 alpha:1]; + _closeButton = [[UIButton buttonWithType:UIButtonTypeCustom] retain]; + [_closeButton setImage:closeImage forState:UIControlStateNormal]; + [_closeButton setTitleColor:color forState:UIControlStateNormal]; + [_closeButton setTitleColor:[UIColor whiteColor] forState:UIControlStateHighlighted]; + [_closeButton addTarget:self action:@selector(cancel) + forControlEvents:UIControlEventTouchUpInside]; +// _closeButton.font = [UIFont boldSystemFontOfSize:12]; + _closeButton.showsTouchWhenHighlighted = YES; + _closeButton.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin + | UIViewAutoresizingFlexibleBottomMargin; + [self addSubview:_closeButton]; + + _titleLabel = [[UILabel alloc] initWithFrame:CGRectZero]; + _titleLabel.text = kDefaultTitle; + _titleLabel.backgroundColor = [UIColor clearColor]; + _titleLabel.textColor = [UIColor whiteColor]; + _titleLabel.font = [UIFont boldSystemFontOfSize:14]; + _titleLabel.autoresizingMask = UIViewAutoresizingFlexibleRightMargin + | UIViewAutoresizingFlexibleBottomMargin; + [self addSubview:_titleLabel]; + + _webView = [[UIWebView alloc] initWithFrame:CGRectZero]; + _webView.delegate = self; + _webView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; + [self addSubview:_webView]; + + _spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle: + UIActivityIndicatorViewStyleWhiteLarge]; + _spinner.autoresizingMask = + UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin + | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin; + [self addSubview:_spinner]; + } + return self; +} + +- (void)dealloc { + _webView.delegate = nil; + [_webView release]; + [_spinner release]; + [_titleLabel release]; + [_iconView release]; + [_closeButton release]; + [_loadingURL release]; + [_session release]; + [super dealloc]; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// UIView + +- (void)drawRect:(CGRect)rect { + CGRect grayRect = CGRectOffset(rect, -0.5, -0.5); + [self drawRect:grayRect fill:kBorderGray radius:10]; + + CGRect headerRect = CGRectMake( + ceil(rect.origin.x + kBorderWidth), ceil(rect.origin.y + kBorderWidth), + rect.size.width - kBorderWidth*2, _titleLabel.frame.size.height); + [self drawRect:headerRect fill:kFacebookBlue radius:0]; + [self strokeLines:headerRect stroke:kBorderBlue]; + + CGRect webRect = CGRectMake( + ceil(rect.origin.x + kBorderWidth), headerRect.origin.y + headerRect.size.height, + rect.size.width - kBorderWidth*2, _webView.frame.size.height+1); + [self strokeLines:webRect stroke:kBorderBlack]; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// UIWebViewDelegate + +- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request + navigationType:(UIWebViewNavigationType)navigationType { + NSURL* url = request.URL; + if ([url.scheme isEqualToString:@"fbconnect"]) { + if ([url.resourceSpecifier isEqualToString:@"cancel"]) { + [self dismissWithSuccess:NO animated:YES]; + } else { + [self dialogDidSucceed:url]; + } + return NO; + } else if ([_loadingURL isEqual:url]) { + return YES; + } else if (navigationType == UIWebViewNavigationTypeLinkClicked) { + if ([_delegate respondsToSelector:@selector(dialog:shouldOpenURLInExternalBrowser:)]) { + if (![_delegate dialog:self shouldOpenURLInExternalBrowser:url]) { + return NO; + } + } + + [[UIApplication sharedApplication] openURL:request.URL]; + return NO; + } else { + return YES; + } +} + +- (void)webViewDidFinishLoad:(UIWebView *)webView { + [_spinner stopAnimating]; + _spinner.hidden = YES; + + self.title = [_webView stringByEvaluatingJavaScriptFromString:@"document.title"]; + [self updateWebOrientation]; +} + +- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error { + // 102 == WebKitErrorFrameLoadInterruptedByPolicyChange + if (!([error.domain isEqualToString:@"WebKitErrorDomain"] && error.code == 102)) { + [self dismissWithError:error animated:YES]; + } +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// UIDeviceOrientationDidChangeNotification + +- (void)deviceOrientationDidChange:(void*)object { + UIDeviceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation; + if (!_showingKeyboard && [self shouldRotateToOrientation:orientation]) { + [self updateWebOrientation]; + + CGFloat duration = [UIApplication sharedApplication].statusBarOrientationAnimationDuration; + [UIView beginAnimations:nil context:nil]; + [UIView setAnimationDuration:duration]; + [self sizeToFitOrientation:YES]; + [UIView commitAnimations]; + } +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// UIKeyboardNotifications + +- (void)keyboardWillShow:(NSNotification*)notification { + UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation; + if (UIInterfaceOrientationIsLandscape(orientation)) { + _webView.frame = CGRectInset(_webView.frame, + -(kPadding + kBorderWidth), + -(kPadding + kBorderWidth) - _titleLabel.frame.size.height); + } + + _showingKeyboard = YES; +} + +- (void)keyboardWillHide:(NSNotification*)notification { + UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation; + if (UIInterfaceOrientationIsLandscape(orientation)) { + _webView.frame = CGRectInset(_webView.frame, + kPadding + kBorderWidth, + kPadding + kBorderWidth + _titleLabel.frame.size.height); + } + + _showingKeyboard = NO; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// public + +- (NSString*)title { + return _titleLabel.text; +} + +- (void)setTitle:(NSString*)title { + _titleLabel.text = title; +} + +- (void)show { + [self load]; + [self sizeToFitOrientation:NO]; + + CGFloat innerWidth = self.frame.size.width - (kBorderWidth+1)*2; + [_iconView sizeToFit]; + [_titleLabel sizeToFit]; + [_closeButton sizeToFit]; + + _titleLabel.frame = CGRectMake( + kBorderWidth + kTitleMarginX + _iconView.frame.size.width + kTitleMarginX, + kBorderWidth, + innerWidth - (_titleLabel.frame.size.height + _iconView.frame.size.width + kTitleMarginX*2), + _titleLabel.frame.size.height + kTitleMarginY*2); + + _iconView.frame = CGRectMake( + kBorderWidth + kTitleMarginX, + kBorderWidth + floor(_titleLabel.frame.size.height/2 - _iconView.frame.size.height/2), + _iconView.frame.size.width, + _iconView.frame.size.height); + + _closeButton.frame = CGRectMake( + self.frame.size.width - (_titleLabel.frame.size.height + kBorderWidth), + kBorderWidth, + _titleLabel.frame.size.height, + _titleLabel.frame.size.height); + + _webView.frame = CGRectMake( + kBorderWidth+1, + kBorderWidth + _titleLabel.frame.size.height, + innerWidth, + self.frame.size.height - (_titleLabel.frame.size.height + 1 + kBorderWidth*2)); + + [_spinner sizeToFit]; + [_spinner startAnimating]; + _spinner.center = _webView.center; + + UIWindow* window = [UIApplication sharedApplication].keyWindow; + if (!window) { + window = [[UIApplication sharedApplication].windows objectAtIndex:0]; + } + [window addSubview:self]; + + [self dialogWillAppear]; + + self.transform = CGAffineTransformScale([self transformForOrientation], 0.001, 0.001); + [UIView beginAnimations:nil context:nil]; + [UIView setAnimationDuration:kTransitionDuration/1.5]; + [UIView setAnimationDelegate:self]; + [UIView setAnimationDidStopSelector:@selector(bounce1AnimationStopped)]; + self.transform = CGAffineTransformScale([self transformForOrientation], 1.1, 1.1); + [UIView commitAnimations]; + + [self addObservers]; +} + +- (void)dismissWithSuccess:(BOOL)success animated:(BOOL)animated { + if (success) { + if ([_delegate respondsToSelector:@selector(dialogDidSucceed:)]) { + [_delegate dialogDidSucceed:self]; + } + } else { + if ([_delegate respondsToSelector:@selector(dialogDidCancel:)]) { + [_delegate dialogDidCancel:self]; + } + } + + [self dismiss:animated]; +} + +- (void)dismissWithError:(NSError*)error animated:(BOOL)animated { + if ([_delegate respondsToSelector:@selector(dialog:didFailWithError:)]) { + [_delegate dialog:self didFailWithError:error]; + } + + [self dismiss:animated]; +} + +- (void)load { + // Intended for subclasses to override +} + +- (void)loadURL:(NSString*)url method:(NSString*)method get:(NSDictionary*)getParams + post:(NSDictionary*)postParams { + // This "test cookie" is required by login.php, or it complains that you need to enable JavaScript + NSHTTPCookieStorage* cookies = [NSHTTPCookieStorage sharedHTTPCookieStorage]; + NSHTTPCookie* testCookie = [NSHTTPCookie cookieWithProperties: + [NSDictionary dictionaryWithObjectsAndKeys: + @"1", NSHTTPCookieValue, + @"test_cookie", NSHTTPCookieName, + @".facebook.com", NSHTTPCookieDomain, + @"/", NSHTTPCookiePath, + nil]]; + [cookies setCookie:testCookie]; + + [_loadingURL release]; + _loadingURL = [[self generateURL:url params:getParams] retain]; + NSMutableURLRequest* request = [NSMutableURLRequest requestWithURL:_loadingURL]; + + if (method) { + [request setHTTPMethod:method]; + + if ([[method uppercaseString] isEqualToString:@"POST"]) { + NSString* contentType = [NSString + stringWithFormat:@"multipart/form-data; boundary=%@", kStringBoundary]; + [request setValue:contentType forHTTPHeaderField:@"Content-Type"]; + + NSData* body = [self generatePostBody:postParams]; + if (body) { + [request setHTTPBody:body]; + } + } + } + + [_webView loadRequest:request]; +} + +- (void)dialogWillAppear { +} + +- (void)dialogWillDisappear { +} + +- (void)dialogDidSucceed:(NSURL*)url { + [self dismissWithSuccess:YES animated:YES]; +} + +@end diff --git a/Classes/Libraries/FacebookAgent/src/FBFeedDialog.m b/Classes/Libraries/FacebookAgent/src/FBFeedDialog.m new file mode 100644 index 0000000..07f918a --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/FBFeedDialog.m @@ -0,0 +1,93 @@ +/* + * Copyright 2009 Facebook + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ + +#import "FBFeedDialog.h" +#import "FBSession.h" + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// global + +static NSString* kFeedURL = @"http://www.facebook.com/connect/prompt_feed.php"; + +/////////////////////////////////////////////////////////////////////////////////////////////////// + +@implementation FBFeedDialog + +@synthesize templateBundleId = _templateBundleId, + templateData = _templateData, + bodyGeneral = _bodyGeneral, + userMessagePrompt = _userMessagePrompt; + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// private + +- (NSString*)generateFeedInfo { + NSMutableArray* pairs = [NSMutableArray array]; + + if (_templateBundleId) { + [pairs addObject:[NSString stringWithFormat:@"\"template_id\": %lld", _templateBundleId]]; + } + if (_templateData) { + [pairs addObject:[NSString stringWithFormat:@"\"template_data\": %@", _templateData]]; + } + if (_bodyGeneral) { + [pairs addObject:[NSString stringWithFormat:@"\"body_general\": \"%@\"", _bodyGeneral]]; + } + + return [NSString stringWithFormat:@"{%@}", [pairs componentsJoinedByString:@","]]; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// NSObject + +- (id)initWithSession:(FBSession*)session { + if (self = [super initWithSession:session]) { + _templateBundleId = 0; + _templateData = nil; + _bodyGeneral = nil; + } + return self; +} + +- (void)dealloc { + [_templateData release]; + [_bodyGeneral release]; + [super dealloc]; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// FBDialog + +- (void)load { + NSDictionary* getParams = [NSDictionary dictionaryWithObjectsAndKeys: + @"touch", @"display", nil]; + + NSString* feedInfo = [self generateFeedInfo]; + NSDictionary* postParams = [NSDictionary dictionaryWithObjectsAndKeys: + _session.apiKey, @"api_key", + _session.sessionKey, @"session_key", + @"1", @"preview", + @"fbconnect:success", @"callback", + @"fbconnect:cancel", @"cancel", + feedInfo, @"feed_info", + @"self_feed", @"feed_target_type", + _userMessagePrompt, @"user_message_prompt", + nil]; + + [self loadURL:kFeedURL method:@"POST" get:getParams post:postParams]; +} + +@end diff --git a/Classes/Libraries/FacebookAgent/src/FBLoginButton.m b/Classes/Libraries/FacebookAgent/src/FBLoginButton.m new file mode 100644 index 0000000..92bfb27 --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/FBLoginButton.m @@ -0,0 +1,162 @@ +/* + * Copyright 2009 Facebook + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ + +#import "FBLoginButton.h" +#import "FBLoginDialog.h" + +/////////////////////////////////////////////////////////////////////////////////////////////////// + +@implementation FBLoginButton + +@synthesize session = _session, style = _style; + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// private + +- (UIImage*)buttonImage { + if (_session.isConnected) { + return [UIImage imageNamed:@"FBConnect.bundle/images/logout.png"]; + } else { + if (_style == FBLoginButtonStyleNormal) { + return [UIImage imageNamed:@"FBConnect.bundle/images/login.png"]; + } else if (_style == FBLoginButtonStyleWide) { + return [UIImage imageNamed:@"FBConnect.bundle/images/login2.png"]; + } else { + return nil; + } + } +} + +- (UIImage*)buttonHighlightedImage { + if (_session.isConnected) { + return [UIImage imageNamed:@"FBConnect.bundle/images/logout_down.png"]; + } else { + if (_style == FBLoginButtonStyleNormal) { + return [UIImage imageNamed:@"FBConnect.bundle/images/login_down.png"]; + } else if (_style == FBLoginButtonStyleWide) { + return [UIImage imageNamed:@"FBConnect.bundle/images/login2_down.png"]; + } else { + return nil; + } + } +} + +- (void)updateImage { + if (self.highlighted) { + _imageView.image = [self buttonHighlightedImage]; + } else { + _imageView.image = [self buttonImage]; + } +} + +- (void)touchUpInside { + if (_session.isConnected) { + [_session logout]; + } else { + FBLoginDialog* dialog = [[[FBLoginDialog alloc] initWithSession:_session] autorelease]; + [dialog show]; + } +} + +- (void)initButton { + _style = FBLoginButtonStyleNormal; + + _imageView = [[UIImageView alloc] initWithFrame:CGRectZero]; + _imageView.contentMode = UIViewContentModeCenter; + [self addSubview:_imageView]; + + self.backgroundColor = [UIColor clearColor]; + [self addTarget:self action:@selector(touchUpInside) + forControlEvents:UIControlEventTouchUpInside]; + + self.session = [FBSession session]; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// NSObject + +- (id)initWithFrame:(CGRect)frame { + if (self = [super initWithFrame:frame]) { + [self initButton]; + if (CGRectIsEmpty(frame)) { + [self sizeToFit]; + } + } + return self; +} + +- (void)awakeFromNib { + [self initButton]; +} + +- (void)dealloc { + [_session.delegates removeObject:self]; + [_session release]; + [_imageView release]; + [super dealloc]; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// UIView + +- (CGSize)sizeThatFits:(CGSize)size { + return _imageView.image.size; +} + +- (void)layoutSubviews { + _imageView.frame = self.bounds; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// UIControl + +- (void)setHighlighted:(BOOL)highlighted { + [super setHighlighted:highlighted]; + [self updateImage]; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// FBSessionDelegate + +- (void)session:(FBSession*)session didLogin:(FBUID)uid { + [self updateImage]; +} + +- (void)sessionDidLogout:(FBSession*)session { + [self updateImage]; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// public + +- (void)setSession:(FBSession*)session { + if (session != _session) { + [_session.delegates removeObject:self]; + [_session release]; + _session = [session retain]; + [_session.delegates addObject:self]; + + [self updateImage]; + } +} + +- (void)setStyle:(FBLoginButtonStyle)style { + _style = style; + + [self updateImage]; +} + +@end diff --git a/Classes/Libraries/FacebookAgent/src/FBLoginDialog.m b/Classes/Libraries/FacebookAgent/src/FBLoginDialog.m new file mode 100644 index 0000000..9d49f60 --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/FBLoginDialog.m @@ -0,0 +1,131 @@ +/* + * Copyright 2009 Facebook + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ + +#import "FBLoginDialog.h" +#import "FBSession.h" +#import "FBRequest.h" + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// global + +static NSString* kLoginURL = @"http://www.facebook.com/login.php"; + +/////////////////////////////////////////////////////////////////////////////////////////////////// + +@implementation FBLoginDialog + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// private + +- (void)connectToGetSession:(NSString*)token { + _getSessionRequest = [[FBRequest requestWithSession:_session delegate:self] retain]; + NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObject:token forKey:@"auth_token"]; + if (!_session.apiSecret) { + [params setObject:@"1" forKey:@"generate_session_secret"]; + } + + if (_session.getSessionProxy) { + [_getSessionRequest post:_session.getSessionProxy params:params]; + } else { + [_getSessionRequest call:@"facebook.auth.getSession" params:params]; + } +} + +- (void)loadLoginPage { + NSDictionary* params = [NSDictionary dictionaryWithObjectsAndKeys: + @"1", @"fbconnect", @"touch", @"connect_display", _session.apiKey, @"api_key", + @"fbconnect://success", @"next", nil]; + + [self loadURL:kLoginURL method:@"GET" get:params post:nil]; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// NSObject + +- (id)initWithSession:(FBSession*)session { + if (self = [super initWithSession:session]) { + _getSessionRequest = nil; + } + return self; +} + +- (void)dealloc { + _getSessionRequest.delegate = nil; + [_getSessionRequest release]; + [super dealloc]; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// FBDialog + +- (void)load { + [self loadLoginPage]; +} + +- (void)dialogWillDisappear { + [_webView stringByEvaluatingJavaScriptFromString:@"email.blur();"]; + + [_getSessionRequest cancel]; + + if (![_session isConnected]) { + [_session cancelLogin]; + } +} + +- (void)dialogDidSucceed:(NSURL*)url { + NSString* q = url.query; + NSRange start = [q rangeOfString:@"auth_token="]; + if (start.location != NSNotFound) { + NSRange end = [q rangeOfString:@"&"]; + NSUInteger offset = start.location+start.length; + NSString* token = end.location == NSNotFound + ? [q substringFromIndex:offset] + : [q substringWithRange:NSMakeRange(offset, end.location-offset)]; + + if (token) { + [self connectToGetSession:token]; + } + } +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// FBRequestDelegate + +- (void)request:(FBRequest*)request didLoad:(id)result { + NSDictionary* object = result; + FBUID uid = [[object objectForKey:@"uid"] longLongValue]; + NSString* sessionKey = [object objectForKey:@"session_key"]; + NSString* sessionSecret = [object objectForKey:@"secret"]; + NSTimeInterval expires = [[object objectForKey:@"expires"] floatValue]; + NSDate* expiration = expires ? [NSDate dateWithTimeIntervalSince1970:expires] : nil; + + [_getSessionRequest release]; + _getSessionRequest = nil; + + [_session begin:uid sessionKey:sessionKey sessionSecret:sessionSecret expires:expiration]; + [_session resume]; + + [self dismissWithSuccess:YES animated:YES]; +} + +- (void)request:(FBRequest*)request didFailWithError:(NSError*)error { + [_getSessionRequest release]; + _getSessionRequest = nil; + + [self dismissWithError:error animated:YES]; +} + +@end diff --git a/Classes/Libraries/FacebookAgent/src/FBPermissionDialog.m b/Classes/Libraries/FacebookAgent/src/FBPermissionDialog.m new file mode 100644 index 0000000..794964a --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/FBPermissionDialog.m @@ -0,0 +1,100 @@ +/* + * Copyright 2009 Facebook + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ + +#import "FBPermissionDialog.h" +#import "FBSession.h" + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// global + +static NSString* kPermissionURL = @"http://www.facebook.com/connect/prompt_permission.php"; + +/////////////////////////////////////////////////////////////////////////////////////////////////// + +@implementation FBPermissionDialog + +@synthesize permission = _permission; + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// private + +- (void)redirectToLogin { + _redirectTimer = [NSTimer scheduledTimerWithTimeInterval:0.01 target:self + selector:@selector(redirectToLoginDelayed) userInfo:nil repeats:NO]; +} + +- (void)redirectToLoginDelayed { + _redirectTimer = nil; + + // This loads the login page, which will just redirect back to the callback url + // since the login cookies are set + [super load]; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// NSObject + +- (id)initWithSession:(FBSession*)session { + if (self = [super initWithSession:session]) { + _permission = nil; + _redirectTimer = nil; + } + return self; +} + +- (void)dealloc { + [_redirectTimer invalidate]; + [_permission release]; + [super dealloc]; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// FBDialog + +- (void)load { + NSDictionary* params = [NSDictionary dictionaryWithObjectsAndKeys: + @"touch", @"display", _session.apiKey, @"api_key", _session.sessionKey, @"session_key", + _permission, @"ext_perm", @"fbconnect:success", @"next", @"fbconnect:cancel", @"cancel", nil]; + + [self loadURL:kPermissionURL method:@"GET" get:params post:nil]; +} + +- (void)dialogDidSucceed:(NSURL*)url { + if ([_permission isEqualToString:@"offline_access"]) { + [super dialogDidSucceed:url]; + } else { + [self dismissWithSuccess:YES animated:YES]; + } +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// UIWebViewDelegate + +- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request + navigationType:(UIWebViewNavigationType)navigationType { + if ([_permission isEqualToString:@"offline_access"]) { + NSURL* url = request.URL; + if ([url.scheme isEqualToString:@"fbconnect"]) { + if ([url.resourceSpecifier isEqualToString:@"success"]) { + [self redirectToLogin]; + return NO; + } + } + } + return [super webView:webView shouldStartLoadWithRequest:request navigationType:navigationType]; +} + +@end diff --git a/Classes/Libraries/FacebookAgent/src/FBRequest.m b/Classes/Libraries/FacebookAgent/src/FBRequest.m new file mode 100644 index 0000000..621a66a --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/FBRequest.m @@ -0,0 +1,378 @@ +/* + * Copyright 2009 Facebook + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ + +#import "FBRequest.h" +#import "FBSession.h" +#import "FBXMLHandler.h" +#import + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// global + +static NSString* kAPIVersion = @"1.0"; +static NSString* kAPIFormat = @"XML"; +static NSString* kUserAgent = @"FacebookConnect"; +static NSString* kStringBoundary = @"3i2ndDfv2rTHiSisAbouNdArYfORhtTPEefj3q2f"; + +static const NSTimeInterval kTimeoutInterval = 180.0; + +/////////////////////////////////////////////////////////////////////////////////////////////////// + +@implementation FBRequest + +@synthesize delegate = _delegate, + url = _url, + method = _method, + params = _params, + dataParam = _dataParam, + userInfo = _userInfo, + timestamp = _timestamp; + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// class public + ++ (FBRequest*)request { + return [self requestWithSession:[FBSession session]]; +} + ++ (FBRequest*)requestWithDelegate:(id)delegate { + return [self requestWithSession:[FBSession session] delegate:delegate]; +} + ++ (FBRequest*)requestWithSession:(FBSession*)session { + return [[[FBRequest alloc] initWithSession:session] autorelease]; +} + ++ (FBRequest*)requestWithSession:(FBSession*)session delegate:(id)delegate { + FBRequest* request = [[[FBRequest alloc] initWithSession:session] autorelease]; + request.delegate = delegate; + return request; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// private + +- (NSString*)md5HexDigest:(NSString*)input { + const char* str = [input UTF8String]; + unsigned char result[CC_MD5_DIGEST_LENGTH]; + CC_MD5(str, strlen(str), result); + + return [NSString stringWithFormat: + @"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", + result[0], result[1], result[2], result[3], result[4], result[5], result[6], result[7], + result[8], result[9], result[10], result[11], result[12], result[13], result[14], result[15] + ]; +} + +- (BOOL)isSpecialMethod { + return [_method isEqualToString:@"facebook.auth.getSession"] + || [_method isEqualToString:@"facebook.auth.createToken"]; +} + +- (NSString*)urlForMethod:(NSString*)method { + if ([method isEqualToString:@"facebook.video.upload"]) { + return @"http://api-video.facebook.com/restserver.php"; + } + + return _session.apiURL; +} + +- (NSString*)generateGetURL { + NSURL* parsedURL = [NSURL URLWithString:_url]; + NSString* queryPrefix = parsedURL.query ? @"&" : @"?"; + + NSMutableArray* pairs = [NSMutableArray array]; + for (NSString* key in [_params keyEnumerator]) { + NSString* value = [_params objectForKey:key]; + [pairs addObject:[NSString stringWithFormat:@"%@=%@", key, value]]; + } + NSString* params = [pairs componentsJoinedByString:@"&"]; + + return [NSString stringWithFormat:@"%@%@%@", _url, queryPrefix, params]; +} + +- (NSString*)generateCallId { + return [NSString stringWithFormat:@"%.0f", [[NSDate date] timeIntervalSince1970]]; +} + +- (NSString*)generateSig { + NSMutableString* joined = [NSMutableString string]; + + NSArray* keys = [_params.allKeys sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)]; + for (id obj in [keys objectEnumerator]) { + id value = [_params valueForKey:obj]; + if ([value isKindOfClass:[NSString class]]) { + [joined appendString:obj]; + [joined appendString:@"="]; + [joined appendString:value]; + } + } + + if ([self isSpecialMethod]) { + if (_session.apiSecret) { + [joined appendString:_session.apiSecret]; + } + } else if (_session.sessionSecret) { + [joined appendString:_session.sessionSecret]; + } else if (_session.apiSecret) { + [joined appendString:_session.apiSecret]; + } + + return [self md5HexDigest:joined]; +} + +- (void)utfAppendBody:(NSMutableData*)body data:(NSString*)data { + [body appendData:[data dataUsingEncoding:NSUTF8StringEncoding]]; +} + +- (NSMutableData*)generatePostBody { + NSMutableData* body = [NSMutableData data]; + NSString* endLine = [NSString stringWithFormat:@"\r\n--%@\r\n", kStringBoundary]; + + [self utfAppendBody:body data:[NSString stringWithFormat:@"--%@\r\n", kStringBoundary]]; + + for (id key in [_params keyEnumerator]) { + [self utfAppendBody:body + data:[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"%@\"\r\n\r\n", key]]; + [self utfAppendBody:body data:[_params valueForKey:key]]; + [self utfAppendBody:body data:endLine]; + } + + if (_dataParam != nil) { + if ([_dataParam isKindOfClass:[UIImage class]]) { + NSData* imageData = UIImagePNGRepresentation((UIImage*)_dataParam); + [self utfAppendBody:body + data:[NSString stringWithFormat:@"Content-Disposition: form-data; filename=\"photo\"\r\n"]]; + [self utfAppendBody:body + data:[NSString stringWithString:@"Content-Type: image/png\r\n\r\n"]]; + [body appendData:imageData]; + } else { + NSAssert([_dataParam isKindOfClass:[NSData class]], @"dataParam must be a UIImage or NSData"); + [self utfAppendBody:body + data:[NSString stringWithFormat:@"Content-Disposition: form-data; filename=\"data\"\r\n"]]; + [self utfAppendBody:body + data:[NSString stringWithString:@"Content-Type: content/unknown\r\n\r\n"]]; + [body appendData:(NSData*)_dataParam]; + } + [self utfAppendBody:body data:endLine]; + } + + FBLOG2(@"Sending %s", [body bytes]); + return body; +} + +- (id)parseXMLResponse:(NSData*)data error:(NSError**)error { + FBXMLHandler* handler = [[[FBXMLHandler alloc] init] autorelease]; + NSXMLParser* parser = [[[NSXMLParser alloc] initWithData:data] autorelease]; + parser.delegate = handler; + [parser parse]; + + if (handler.parseError) { + if (error) { + *error = [[handler.parseError retain] autorelease]; + } + return nil; + } else if ([handler.rootName isEqualToString:@"error_response"]) { + NSDictionary* errorDict = handler.rootObject; + NSInteger code = [[errorDict objectForKey:@"error_code"] intValue]; + NSDictionary* info = [NSDictionary dictionaryWithObjectsAndKeys: + [errorDict objectForKey:@"error_msg"], NSLocalizedDescriptionKey, + [errorDict objectForKey:@"request_args"], @"request_args", + nil]; + if (error) { + *error = [NSError errorWithDomain:FBAPI_ERROR_DOMAIN code:code userInfo:info]; + } + return nil; + } else { + return [[handler.rootObject retain] autorelease]; + } +} + +- (void)failWithError:(NSError*)error { + if ([_delegate respondsToSelector:@selector(request:didFailWithError:)]) { + [_delegate request:self didFailWithError:error]; + } +} + +- (void)handleResponseData:(NSData*)data { + FBLOG2(@"DATA: %s", data.bytes); + NSError* error = nil; + id result = [self parseXMLResponse:data error:&error]; + if (error) { + [self failWithError:error]; + } else if ([_delegate respondsToSelector:@selector(request:didLoad:)]) { + [_delegate request:self didLoad:result]; + } +} + +- (void)connect { + FBLOG(@"Connecting to %@ %@", _url, _params); + + if ([_delegate respondsToSelector:@selector(requestLoading:)]) { + [_delegate requestLoading:self]; + } + + NSString* url = _method ? _url : [self generateGetURL]; + NSMutableURLRequest* request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:url] + cachePolicy:NSURLRequestReloadIgnoringLocalCacheData + timeoutInterval:kTimeoutInterval]; + [request setValue:kUserAgent forHTTPHeaderField:@"User-Agent"]; + + if (_method) { + [request setHTTPMethod:@"POST"]; + + NSString* contentType = [NSString + stringWithFormat:@"multipart/form-data; boundary=%@", kStringBoundary]; + [request setValue:contentType forHTTPHeaderField:@"Content-Type"]; + + [request setHTTPBody:[self generatePostBody]]; + } + + _timestamp = [[NSDate date] retain]; + _connection = [[NSURLConnection alloc] initWithRequest:request delegate:self]; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// NSObject + +- (id)initWithSession:(FBSession*)session { + _session = session; + _delegate = nil; + _url = nil; + _method = nil; + _params = nil; + _userInfo = nil; + _timestamp = nil; + _connection = nil; + _responseText = nil; + return self; +} + +- (void)dealloc { + [_connection cancel]; + [_connection release]; + [_responseText release]; + [_url release]; + [_method release]; + [_params release]; + [_userInfo release]; + [_timestamp release]; + [super dealloc]; +} + +- (NSString*)description { + return [NSString stringWithFormat:@"", _method ? _method : _url]; +} + +////////////////////////////////////////////////////////////////////////////////////////////////// +// NSURLConnectionDelegate + +- (void)connection:(NSURLConnection*)connection didReceiveResponse:(NSURLResponse*)response { + _responseText = [[NSMutableData alloc] init]; + + NSHTTPURLResponse* httpResponse = (NSHTTPURLResponse*)response; + if ([_delegate respondsToSelector:@selector(request:didReceiveResponse:)]) { + [_delegate request:self didReceiveResponse:httpResponse]; + } +} + +-(void)connection:(NSURLConnection*)connection didReceiveData:(NSData*)data { + [_responseText appendData:data]; +} + +- (NSCachedURLResponse*)connection:(NSURLConnection*)connection + willCacheResponse:(NSCachedURLResponse*)cachedResponse { + return nil; +} + +-(void)connectionDidFinishLoading:(NSURLConnection*)connection { + [self handleResponseData:_responseText]; + + [_responseText release]; + _responseText = nil; + [_connection release]; + _connection = nil; +} + +- (void)connection:(NSURLConnection*)connection didFailWithError:(NSError*)error { + [self failWithError:error]; + + [_responseText release]; + _responseText = nil; + [_connection release]; + _connection = nil; +} + +////////////////////////////////////////////////////////////////////////////////////////////////// +// public + +- (BOOL)loading { + return !!_connection; +} + +- (void)call:(NSString*)method params:(NSDictionary*)params { + [self call:method params:params dataParam:nil]; +} + +- (void)call:(NSString*)method params:(NSDictionary*)params dataParam:(NSData*)dataParam { + _url = [[self urlForMethod:method] retain]; + _method = [method copy]; + _params = params + ? [[NSMutableDictionary alloc] initWithDictionary:params] + : [[NSMutableDictionary alloc] init]; + _dataParam = dataParam; + + [_params setObject:_method forKey:@"method"]; + [_params setObject:_session.apiKey forKey:@"api_key"]; + [_params setObject:kAPIVersion forKey:@"v"]; + [_params setObject:kAPIFormat forKey:@"format"]; + + if (![self isSpecialMethod]) { + [_params setObject:_session.sessionKey forKey:@"session_key"]; + [_params setObject:[self generateCallId] forKey:@"call_id"]; + + if (_session.sessionSecret) { + [_params setObject:@"1" forKey:@"ss"]; + } + } + + [_params setObject:[self generateSig] forKey:@"sig"]; + + [_session send:self]; +} + +- (void)post:(NSString*)url params:(NSDictionary*)params { + _url = [url retain]; + _params = params + ? [[NSMutableDictionary alloc] initWithDictionary:params] + : [[NSMutableDictionary alloc] init]; + + [_session send:self]; +} + +- (void)cancel { + if (_connection) { + [_connection cancel]; + [_connection release]; + _connection = nil; + + if ([_delegate respondsToSelector:@selector(requestWasCancelled:)]) { + [_delegate requestWasCancelled:self]; + } + } +} + +@end diff --git a/Classes/Libraries/FacebookAgent/src/FBSession.m b/Classes/Libraries/FacebookAgent/src/FBSession.m new file mode 100644 index 0000000..6366895 --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/FBSession.m @@ -0,0 +1,296 @@ +/* + * Copyright 2009 Facebook + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ + +#import "FBSession.h" +#import "FBRequest.h" + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// global + +static NSString* kAPIRestURL = @"http://api.facebook.com/restserver.php"; +static NSString* kAPIRestSecureURL = @"https://api.facebook.com/restserver.php"; + +static const int kMaxBurstRequests = 3; +static const NSTimeInterval kBurstDuration = 2; + +static FBSession* sharedSession = nil; + +/////////////////////////////////////////////////////////////////////////////////////////////////// + +@implementation FBSession + +@synthesize delegates = _delegates, apiKey = _apiKey, apiSecret = _apiSecret, + getSessionProxy = _getSessionProxy, uid = _uid, sessionKey = _sessionKey, + sessionSecret = _sessionSecret, expirationDate = _expirationDate; + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// class public + ++ (FBSession*)session { + return sharedSession; +} + ++ (void)setSession:(FBSession*)session { + sharedSession = session; +} + ++ (FBSession*)sessionForApplication:(NSString*)key secret:(NSString*)secret + delegate:(id)delegate { + FBSession* session = [[[FBSession alloc] initWithKey:key secret:secret + getSessionProxy:nil] autorelease]; + [session.delegates addObject:delegate]; + return session; +} + ++ (FBSession*)sessionForApplication:(NSString*)key getSessionProxy:(NSString*)getSessionProxy + delegate:(id)delegate { + FBSession* session = [[[FBSession alloc] initWithKey:key secret:nil + getSessionProxy:getSessionProxy] autorelease]; + [session.delegates addObject:delegate]; + return session; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// private + +- (void)save { + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + if (_uid) { + [defaults setObject:[NSNumber numberWithLongLong:_uid] forKey:@"FBUserId"]; + } else { + [defaults removeObjectForKey:@"FBUserId"]; + } + + if (_sessionKey) { + [defaults setObject:_sessionKey forKey:@"FBSessionKey"]; + } else { + [defaults removeObjectForKey:@"FBSessionKey"]; + } + + if (_sessionSecret) { + [defaults setObject:_sessionSecret forKey:@"FBSessionSecret"]; + } else { + [defaults removeObjectForKey:@"FBSessionSecret"]; + } + + if (_expirationDate) { + [defaults setObject:_expirationDate forKey:@"FBSessionExpires"]; + } else { + [defaults removeObjectForKey:@"FBSessionExpires"]; + } + + [defaults synchronize]; +} + +- (void)unsave { + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + [defaults removeObjectForKey:@"FBUserId"]; + [defaults removeObjectForKey:@"FBSessionKey"]; + [defaults removeObjectForKey:@"FBSessionSecret"]; + [defaults removeObjectForKey:@"FBSessionExpires"]; + [defaults synchronize]; +} + +- (void)startFlushTimer { + if (!_requestTimer) { + NSTimeInterval t = kBurstDuration + [_lastRequestTime timeIntervalSinceNow]; + _requestTimer = [NSTimer scheduledTimerWithTimeInterval:t target:self + selector:@selector(requestTimerReady) userInfo:nil repeats:NO]; + } +} + +- (void)enqueueRequest:(FBRequest*)request { + [_requestQueue addObject:request]; + [self startFlushTimer]; +} + +- (BOOL)performRequest:(FBRequest*)request enqueue:(BOOL)enqueue { + // Stagger requests that happen in short bursts to prevent the server from rejecting + // them for making too many requests in a short time + NSTimeInterval t = [_lastRequestTime timeIntervalSinceNow]; + BOOL burst = t && t > -kBurstDuration; + if (burst && ++_requestBurstCount > kMaxBurstRequests) { + if (enqueue) { + [self enqueueRequest:request]; + } + return NO; + } else { + [request performSelector:@selector(connect)]; + + if (!burst) { + _requestBurstCount = 1; + [_lastRequestTime release]; + _lastRequestTime = [[request timestamp] retain]; + } + } + return YES; +} + +- (void)flushRequestQueue { + while (_requestQueue.count) { + FBRequest* request = [_requestQueue objectAtIndex:0]; + if ([self performRequest:request enqueue:NO]) { + [_requestQueue removeObjectAtIndex:0]; + } else { + [self startFlushTimer]; + break; + } + } +} + +- (void)requestTimerReady { + _requestTimer = nil; + [self flushRequestQueue]; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// NSObject + +- (FBSession*)initWithKey:(NSString*)key secret:(NSString*)secret + getSessionProxy:(NSString*)getSessionProxy { + if (self = [super init]) { + if (!sharedSession) { + sharedSession = self; + } + + _delegates = FBCreateNonRetainingArray(); + _apiKey = [key copy]; + _apiSecret = [secret copy]; + _getSessionProxy = [getSessionProxy copy]; + _uid = 0; + _sessionKey = nil; + _sessionSecret = nil; + _expirationDate = nil; + _requestQueue = [[NSMutableArray alloc] init]; + _lastRequestTime = nil; + _requestBurstCount = 0; + _requestTimer = nil; + } + return self; +} + +- (void)dealloc { + if (sharedSession == self) { + sharedSession = nil; + } + + [_delegates release]; + [_requestQueue release]; + [_apiKey release]; + [_apiSecret release]; + [_getSessionProxy release]; + [_sessionKey release]; + [_sessionSecret release]; + [_expirationDate release]; + [_lastRequestTime release]; + [super dealloc]; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// public + +- (NSString*)apiURL { + return kAPIRestURL; +} + +- (NSString*)apiSecureURL { + return kAPIRestSecureURL; +} + +- (BOOL)isConnected { + return !!_sessionKey; +} + +- (void)begin:(FBUID)uid sessionKey:(NSString*)sessionKey + sessionSecret:(NSString*)sessionSecret expires:(NSDate*)expires { + _uid = uid; + _sessionKey = [sessionKey copy]; + _sessionSecret = [sessionSecret copy]; + _expirationDate = [expires retain]; + + [self save]; +} + +- (BOOL)resume { + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + FBUID uid = [[defaults objectForKey:@"FBUserId"] longLongValue]; + if (uid) { + NSDate* expirationDate = [defaults objectForKey:@"FBSessionExpires"]; + if (!expirationDate || [expirationDate timeIntervalSinceNow] > 0) { + _uid = uid; + _sessionKey = [[defaults stringForKey:@"FBSessionKey"] copy]; + _sessionSecret = [[defaults stringForKey:@"FBSessionSecret"] copy]; + _expirationDate = [expirationDate retain]; + + for (id delegate in _delegates) { + [delegate session:self didLogin:_uid]; + } + return YES; + } + } + return NO; +} + +- (void)cancelLogin { + if (![self isConnected]) { + for (id delegate in _delegates) { + if ([delegate respondsToSelector:@selector(sessionDidNotLogin:)]) { + [delegate sessionDidNotLogin:self]; + } + } + } +} + +- (void)logout { + if (_sessionKey) { + for (id delegate in _delegates) { + if ([delegate respondsToSelector:@selector(session:willLogout:)]) { + [delegate session:self willLogout:_uid]; + } + } + + // Remove cookies that UIWebView may have stored + NSHTTPCookieStorage* cookies = [NSHTTPCookieStorage sharedHTTPCookieStorage]; + NSArray* facebookCookies = [cookies cookiesForURL: + [NSURL URLWithString:@"http://login.facebook.com"]]; + for (NSHTTPCookie* cookie in facebookCookies) { + [cookies deleteCookie:cookie]; + } + + _uid = 0; + [_sessionKey release]; + _sessionKey = nil; + [_sessionSecret release]; + _sessionSecret = nil; + [_expirationDate release]; + _expirationDate = nil; + [self unsave]; + + for (id delegate in _delegates) { + if ([delegate respondsToSelector:@selector(sessionDidLogout:)]) { + [delegate sessionDidLogout:self]; + } + } + } else { + [self unsave]; + } +} + +- (void)send:(FBRequest*)request { + [self performRequest:request enqueue:YES]; +} + +@end diff --git a/Classes/Libraries/FacebookAgent/src/FBStreamDialog.m b/Classes/Libraries/FacebookAgent/src/FBStreamDialog.m new file mode 100644 index 0000000..99fdf14 --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/FBStreamDialog.m @@ -0,0 +1,77 @@ +/* + * Copyright 2009 Facebook + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import "FBStreamDialog.h" +#import "FBSession.h" + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// global + +static NSString* kStreamURL = @"http://www.facebook.com/connect/prompt_feed.php"; + +/////////////////////////////////////////////////////////////////////////////////////////////////// + +@implementation FBStreamDialog + +@synthesize attachment = _attachment, + actionLinks = _actionLinks, + targetId = _targetId, + userMessagePrompt = _userMessagePrompt; + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// NSObject + +- (id)initWithSession:(FBSession*)session { + if (self = [super initWithSession:session]) { + _attachment = @""; + _actionLinks = @""; + _targetId = @""; + _userMessagePrompt = @""; + } + return self; +} + +- (void)dealloc { + [_attachment release]; + [_actionLinks release]; + [_targetId release]; + [_userMessagePrompt release]; + [super dealloc]; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// FBDialog + +- (void)load { + NSDictionary* getParams = [NSDictionary dictionaryWithObjectsAndKeys: + @"touch", @"display", nil]; + + NSDictionary* postParams = [NSDictionary dictionaryWithObjectsAndKeys: + _session.apiKey, @"api_key", + _session.sessionKey, @"session_key", + @"1", @"preview", + @"fbconnect:success", @"callback", + @"fbconnect:cancel", @"cancel", + _attachment, @"attachment", + _actionLinks, @"action_links", + _targetId, @"target_id", + _userMessagePrompt, @"user_message_prompt", + nil]; + + [self loadURL:kStreamURL method:@"POST" get:getParams post:postParams]; +} + +@end diff --git a/Classes/Libraries/FacebookAgent/src/FBXMLHandler.h b/Classes/Libraries/FacebookAgent/src/FBXMLHandler.h new file mode 100644 index 0000000..27b1607 --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/FBXMLHandler.h @@ -0,0 +1,32 @@ +/* + * Copyright 2009 Facebook + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ + +#import "FBConnectGlobal.h" + +@interface FBXMLHandler : NSObject { + NSMutableArray* _stack; + NSMutableArray* _nameStack; + id _rootObject; + NSString* _rootName; + NSMutableString* _chars; + NSError* _parseError; +} + +@property(nonatomic,readonly) id rootObject; +@property(nonatomic,readonly) NSString* rootName; +@property(nonatomic,readonly) NSError* parseError; + +@end diff --git a/Classes/Libraries/FacebookAgent/src/FBXMLHandler.m b/Classes/Libraries/FacebookAgent/src/FBXMLHandler.m new file mode 100644 index 0000000..54de261 --- /dev/null +++ b/Classes/Libraries/FacebookAgent/src/FBXMLHandler.m @@ -0,0 +1,152 @@ +/* + * Copyright 2009 Facebook + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ + +#import "FBXMLHandler.h" + +/////////////////////////////////////////////////////////////////////////////////////////////////// + +@implementation FBXMLHandler + +@synthesize rootObject = _rootObject, rootName = _rootName, parseError = _parseError; + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// private + +- (NSString*)topName { + return [_nameStack lastObject]; +} + +- (id)topObject:(BOOL)create { + id object = [_stack objectAtIndex:_stack.count-1]; + if (object == [NSNull null] && create) { + object = [NSMutableDictionary dictionary]; + [_stack replaceObjectAtIndex:_stack.count-1 withObject:object]; + } + return object; +} + +- (id)topContainer { + if (_stack.count < 2) { + return nil; + } else { + id object = [_stack objectAtIndex:_stack.count-2]; + if (object == [NSNull null]) { + object = [NSMutableDictionary dictionary]; + [_stack replaceObjectAtIndex:_stack.count-2 withObject:object]; + } + return object; + } +} + +- (void)flushCharacters { + NSCharacterSet* whitespace = [NSCharacterSet whitespaceAndNewlineCharacterSet]; + for (NSInteger i = 0; i < _chars.length; ++i) { + unichar c = [_chars characterAtIndex:i]; + if (![whitespace characterIsMember:c]) { + id topContainer = self.topContainer; + if ([topContainer isKindOfClass:[NSMutableArray class]]) { + id object = [NSDictionary dictionaryWithObject:_chars forKey:self.topName]; + [_stack replaceObjectAtIndex:_stack.count-1 withObject:object]; + } else { + [_stack replaceObjectAtIndex:_stack.count-1 withObject:_chars]; + } + break; + } + } + + [_chars release]; + _chars = nil; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// NSObject + +- (id)init { + if (self = [super init]) { + _stack = [[NSMutableArray alloc] init]; + _nameStack = [[NSMutableArray alloc] init]; + _rootObject = nil; + _rootName = nil; + _chars = nil; + _parseError = nil; + } + return self; +} + +- (void)dealloc { + [_stack release]; + [_nameStack release]; + [_rootObject release]; + [_rootName release]; + [_chars release]; + [_parseError release]; + [super dealloc]; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// NSXMLParserDelegate + +- (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName + namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qualifiedName + attributes:(NSDictionary *)attributeDict { + [self flushCharacters]; + + id object = nil; + if ([[attributeDict objectForKey:@"list"] isEqualToString:@"true"]) { + object = [NSMutableArray array]; + } else { + object = [NSNull null]; + } + + [_stack addObject:object]; + [_nameStack addObject:elementName]; +} + +- (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string { + if (!_chars) { + _chars = [string mutableCopy]; + } else { + [_chars appendString:string]; + } +} + +- (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName + namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName { + [self flushCharacters]; + + id object = [[[self topObject:NO] retain] autorelease]; + NSString* name = [[self.topName retain] autorelease]; + [_stack removeLastObject]; + [_nameStack removeLastObject]; + + if (!_stack.count) { + _rootObject = [object retain]; + _rootName = [name retain]; + } else { + id topObject = [self topObject:YES]; + if ([topObject isKindOfClass:[NSMutableArray class]]) { + [topObject addObject:object]; + } else if ([topObject isKindOfClass:[NSMutableDictionary class]]) { + [topObject setObject:object forKey:name]; + } + } +} + +- (void)parser:(NSXMLParser *)parser parseErrorOccurred:(NSError *)error { + _parseError = [error retain]; +} + +@end diff --git a/Classes/iValentineAppDelegate.h b/Classes/iValentineAppDelegate.h new file mode 100644 index 0000000..d28029c --- /dev/null +++ b/Classes/iValentineAppDelegate.h @@ -0,0 +1,29 @@ +// +// iValentineAppDelegate.h +// iValentine +// +// Created by MacPro on 1/17/11. +// Copyright __MyCompanyName__ 2011. All rights reserved. +// + +#import + +@class iValentineViewController; + +@interface iValentineAppDelegate : NSObject { + UIWindow *window; + iValentineViewController *viewController; + UINavigationController *navController; + NSString *yourname; + NSString *lovername; + NSString *percentage; +} +@property (nonatomic, retain) NSString *yourname; +@property (nonatomic, retain) NSString *lovername; +@property (nonatomic, retain) NSString *percentage; +@property (nonatomic, retain) IBOutlet UIWindow *window; +@property (nonatomic, retain) IBOutlet iValentineViewController *viewController; +@property (nonatomic, retain) UINavigationController *navController;; + +@end + diff --git a/Classes/iValentineAppDelegate.m b/Classes/iValentineAppDelegate.m new file mode 100644 index 0000000..b9b5c94 --- /dev/null +++ b/Classes/iValentineAppDelegate.m @@ -0,0 +1,97 @@ +// +// iValentineAppDelegate.m +// iValentine +// +// Created by MacPro on 1/17/11. +// Copyright __MyCompanyName__ 2011. All rights reserved. +// + +#import "iValentineAppDelegate.h" +#import "iValentineViewController.h" + +@implementation iValentineAppDelegate + +@synthesize window; +@synthesize viewController; +@synthesize navController; +@synthesize yourname, +lovername, +percentage; +#pragma mark - +#pragma mark Application lifecycle + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + + // Override point for customization after application launch. + + // Add the view controller's view to the window and display. + self.yourname = @""; + self.lovername = @""; + self.percentage = @""; + navController = [[UINavigationController alloc] initWithRootViewController:viewController]; + navController.hidesBottomBarWhenPushed = YES; + navController.navigationBarHidden = YES; + navController; + [window addSubview:navController.view]; + [window makeKeyAndVisible]; + + return YES; +} + + +- (void)applicationWillResignActive:(UIApplication *)application { + /* + Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. + */ +} + + +- (void)applicationDidEnterBackground:(UIApplication *)application { + /* + Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + If your application supports background execution, called instead of applicationWillTerminate: when the user quits. + */ +} + + +- (void)applicationWillEnterForeground:(UIApplication *)application { + /* + Called as part of transition from the background to the inactive state: here you can undo many of the changes made on entering the background. + */ +} + + +- (void)applicationDidBecomeActive:(UIApplication *)application { + /* + Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. + */ +} + + +- (void)applicationWillTerminate:(UIApplication *)application { + /* + Called when the application is about to terminate. + See also applicationDidEnterBackground:. + */ +} + + +#pragma mark - +#pragma mark Memory management + +- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application { + /* + Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later. + */ +} + + +- (void)dealloc { + [viewController release]; + [window release]; + [super dealloc]; +} + + +@end diff --git a/Classes/iValentineConstants.h b/Classes/iValentineConstants.h new file mode 100644 index 0000000..b36055c --- /dev/null +++ b/Classes/iValentineConstants.h @@ -0,0 +1,22 @@ +/* + * iValentineConstants.h + * iValentine + * + * Created by MacPro on 2/11/11. + * Copyright 2011 __MyCompanyName__. All rights reserved. + * + */ + +/* + FACEBOOK CONNECTIVITY : + */ +#define FB_API_KEY @"d329219f04400862a8253520029d263c" +#define FB_API_SECRET @"40baa22ffdeaac81ae57023b64b87309" + + +/* + CUSTOM CARD(CC) MESSAGE + */ + +#define CC_SUBJECT @"Special card for my Beloved!" +#define CC_DEFAULT_MSG_BODY @"Message Body!" \ No newline at end of file diff --git a/Classes/iValentineViewController.h b/Classes/iValentineViewController.h new file mode 100644 index 0000000..c835da3 --- /dev/null +++ b/Classes/iValentineViewController.h @@ -0,0 +1,21 @@ +// +// iValentineViewController.h +// iValentine +// +// Created by MacPro on 1/17/11. +// Copyright __MyCompanyName__ 2011. All rights reserved. +// + +#import + +@interface iValentineViewController : UIViewController { + IBOutlet UIButton *startBtn; + IBOutlet UIButton *instructionBtn; + IBOutlet UIButton *creditBtn; +} + +-(IBAction)startAction:(id)sender; +-(IBAction)instructionAction:(id)sender; +-(IBAction)creditAction:(id)sender; +@end + diff --git a/Classes/iValentineViewController.m b/Classes/iValentineViewController.m new file mode 100644 index 0000000..c4cad3c --- /dev/null +++ b/Classes/iValentineViewController.m @@ -0,0 +1,96 @@ +// +// iValentineViewController.m +// iValentine +// +// Created by MacPro on 1/17/11. +// Copyright __MyCompanyName__ 2011. All rights reserved. +// + +#import "iValentineViewController.h" +#import "LoveMeterVC.h" +#import "InstructionVC.h" +#import "CreditsVC.h" + +@implementation iValentineViewController + + +// The designated initializer. Override to perform setup that is required before the view is loaded. +- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { + if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) { + // Custom initialization + } + return self; +} + + +/* +// Implement loadView to create a view hierarchy programmatically, without using a nib. +- (void)loadView { +} +*/ + + +// Implement viewDidLoad to do additional setup after loading the view, typically from a nib. +- (void)viewDidLoad { + [super viewDidLoad]; +// [agent login]; + //return [NSData dataWithContentsOfFile:filePath options:0 error:nil]; +// +// UIImage *newImage = [UIImage imageNamed:@"Needle_Controler.png"]; +// NSData *data = UIImagePNGRepresentation(newImage); + + + + //[agent uploadPhoto:@"http://www.nasa.gov/images/content/312934main_image_1283-946.jpg" withStatus:@""]; +// [agent uploadPhotoAsData:data withCaption:@"" toAlbum:@""]; + //NSMutableDictionary *args = [[[NSMutableDictionary alloc] init] autorelease]; +// [args setObject:@"caption" forKey:@"caption"]; +// FBRequest *uploadPhotoRequest = [FBRequest requestWithDelegate:self]; +// [uploadPhotoRequest call:@"photos.upload" params:args dataParam:data]; +} + + +/* +// 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 { + // Release any retained subviews of the main view. + // e.g. self.myOutlet = nil; +} + +-(IBAction)startAction:(id)sender; +{ + + LoveMeterVC *loveMeter = [[LoveMeterVC alloc] initWithNibName:@"LoveMeterVC" bundle:[NSBundle mainBundle]]; + [self.navigationController pushViewController:loveMeter animated:YES]; + [loveMeter release]; +} +-(IBAction)instructionAction:(id)sender; +{ + InstructionVC *instruction = [[InstructionVC alloc] initWithNibName:@"InstructionVC" bundle:[NSBundle mainBundle]]; + [self.navigationController pushViewController:instruction animated:YES]; + [instruction release]; +} +-(IBAction)creditAction:(id)sender; +{ + CreditsVC *creditController = [[CreditsVC alloc] initWithNibName:@"CreditsVC" bundle:[NSBundle mainBundle]]; + [self.navigationController pushViewController:creditController animated:YES]; + [creditController release]; +} +- (void)dealloc { + [super dealloc]; +} + +@end diff --git a/Entitlements.plist b/Entitlements.plist new file mode 100644 index 0000000..ce373e1 --- /dev/null +++ b/Entitlements.plist @@ -0,0 +1,8 @@ + + + + + get-task-allow + + + diff --git a/Images/.DS_Store b/Images/.DS_Store new file mode 100644 index 0000000..97d6e24 Binary files /dev/null and b/Images/.DS_Store differ diff --git a/Images/Cards/Full_vuew.png b/Images/Cards/Full_vuew.png new file mode 100755 index 0000000..d1be8b0 Binary files /dev/null and b/Images/Cards/Full_vuew.png differ diff --git a/Images/Cards/Share_button.png b/Images/Cards/Share_button.png new file mode 100755 index 0000000..6af5c5b Binary files /dev/null and b/Images/Cards/Share_button.png differ diff --git a/Images/Cards/largeCards/.DS_Store b/Images/Cards/largeCards/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/Images/Cards/largeCards/.DS_Store differ diff --git a/Images/Cards/largeCards/L1.png b/Images/Cards/largeCards/L1.png new file mode 100755 index 0000000..3d1a6eb Binary files /dev/null and b/Images/Cards/largeCards/L1.png differ diff --git a/Images/Cards/largeCards/L10.png b/Images/Cards/largeCards/L10.png new file mode 100755 index 0000000..9850e3b Binary files /dev/null and b/Images/Cards/largeCards/L10.png differ diff --git a/Images/Cards/largeCards/L11.png b/Images/Cards/largeCards/L11.png new file mode 100755 index 0000000..91f0614 Binary files /dev/null and b/Images/Cards/largeCards/L11.png differ diff --git a/Images/Cards/largeCards/L2.png b/Images/Cards/largeCards/L2.png new file mode 100755 index 0000000..4acb93d Binary files /dev/null and b/Images/Cards/largeCards/L2.png differ diff --git a/Images/Cards/largeCards/L3.png b/Images/Cards/largeCards/L3.png new file mode 100755 index 0000000..a503e07 Binary files /dev/null and b/Images/Cards/largeCards/L3.png differ diff --git a/Images/Cards/largeCards/L4.png b/Images/Cards/largeCards/L4.png new file mode 100755 index 0000000..9934859 Binary files /dev/null and b/Images/Cards/largeCards/L4.png differ diff --git a/Images/Cards/largeCards/L5.png b/Images/Cards/largeCards/L5.png new file mode 100755 index 0000000..ea74d4d Binary files /dev/null and b/Images/Cards/largeCards/L5.png differ diff --git a/Images/Cards/largeCards/L6.png b/Images/Cards/largeCards/L6.png new file mode 100755 index 0000000..a85e4be Binary files /dev/null and b/Images/Cards/largeCards/L6.png differ diff --git a/Images/Cards/largeCards/L7.png b/Images/Cards/largeCards/L7.png new file mode 100755 index 0000000..b9abbdb Binary files /dev/null and b/Images/Cards/largeCards/L7.png differ diff --git a/Images/Cards/largeCards/L8.png b/Images/Cards/largeCards/L8.png new file mode 100755 index 0000000..2530ff1 Binary files /dev/null and b/Images/Cards/largeCards/L8.png differ diff --git a/Images/Cards/largeCards/L9.png b/Images/Cards/largeCards/L9.png new file mode 100755 index 0000000..5c53ce4 Binary files /dev/null and b/Images/Cards/largeCards/L9.png differ diff --git a/Images/Cards/left_arrow.png b/Images/Cards/left_arrow.png new file mode 100755 index 0000000..010a49a Binary files /dev/null and b/Images/Cards/left_arrow.png differ diff --git a/Images/Cards/right_arrow.png b/Images/Cards/right_arrow.png new file mode 100755 index 0000000..56383a2 Binary files /dev/null and b/Images/Cards/right_arrow.png differ diff --git a/Images/Cards/smallCards/.DS_Store b/Images/Cards/smallCards/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/Images/Cards/smallCards/.DS_Store differ diff --git a/Images/Cards/smallCards/S1.png b/Images/Cards/smallCards/S1.png new file mode 100755 index 0000000..3daa85f Binary files /dev/null and b/Images/Cards/smallCards/S1.png differ diff --git a/Images/Cards/smallCards/S10.png b/Images/Cards/smallCards/S10.png new file mode 100755 index 0000000..a688cfe Binary files /dev/null and b/Images/Cards/smallCards/S10.png differ diff --git a/Images/Cards/smallCards/S11.png b/Images/Cards/smallCards/S11.png new file mode 100755 index 0000000..5aba595 Binary files /dev/null and b/Images/Cards/smallCards/S11.png differ diff --git a/Images/Cards/smallCards/S2.png b/Images/Cards/smallCards/S2.png new file mode 100755 index 0000000..485f5e9 Binary files /dev/null and b/Images/Cards/smallCards/S2.png differ diff --git a/Images/Cards/smallCards/S3.png b/Images/Cards/smallCards/S3.png new file mode 100755 index 0000000..13b5baf Binary files /dev/null and b/Images/Cards/smallCards/S3.png differ diff --git a/Images/Cards/smallCards/S4.png b/Images/Cards/smallCards/S4.png new file mode 100755 index 0000000..060f5c0 Binary files /dev/null and b/Images/Cards/smallCards/S4.png differ diff --git a/Images/Cards/smallCards/S5.png b/Images/Cards/smallCards/S5.png new file mode 100755 index 0000000..fa3d033 Binary files /dev/null and b/Images/Cards/smallCards/S5.png differ diff --git a/Images/Cards/smallCards/S6.png b/Images/Cards/smallCards/S6.png new file mode 100755 index 0000000..fb60ca3 Binary files /dev/null and b/Images/Cards/smallCards/S6.png differ diff --git a/Images/Cards/smallCards/S7.png b/Images/Cards/smallCards/S7.png new file mode 100755 index 0000000..e4de873 Binary files /dev/null and b/Images/Cards/smallCards/S7.png differ diff --git a/Images/Cards/smallCards/S8.png b/Images/Cards/smallCards/S8.png new file mode 100755 index 0000000..11c3694 Binary files /dev/null and b/Images/Cards/smallCards/S8.png differ diff --git a/Images/Cards/smallCards/S9.png b/Images/Cards/smallCards/S9.png new file mode 100755 index 0000000..70ee1ee Binary files /dev/null and b/Images/Cards/smallCards/S9.png differ diff --git a/Images/CreditView/.DS_Store b/Images/CreditView/.DS_Store new file mode 100644 index 0000000..a2de245 Binary files /dev/null and b/Images/CreditView/.DS_Store differ diff --git a/Images/CreditView/background.png b/Images/CreditView/background.png new file mode 100644 index 0000000..8ad1f36 Binary files /dev/null and b/Images/CreditView/background.png differ diff --git a/Images/CreditView/credits_fullview.png b/Images/CreditView/credits_fullview.png new file mode 100755 index 0000000..5af23f6 Binary files /dev/null and b/Images/CreditView/credits_fullview.png differ diff --git a/Images/Default.png b/Images/Default.png new file mode 100644 index 0000000..f4c689e Binary files /dev/null and b/Images/Default.png differ diff --git a/Images/Heart_Animation/Heart_Frame_1.png b/Images/Heart_Animation/Heart_Frame_1.png new file mode 100644 index 0000000..8abe899 Binary files /dev/null and b/Images/Heart_Animation/Heart_Frame_1.png differ diff --git a/Images/Heart_Animation/Heart_Frame_2.png b/Images/Heart_Animation/Heart_Frame_2.png new file mode 100644 index 0000000..70f82ec Binary files /dev/null and b/Images/Heart_Animation/Heart_Frame_2.png differ diff --git a/Images/Heart_Animation/Heart_Frame_3.png b/Images/Heart_Animation/Heart_Frame_3.png new file mode 100644 index 0000000..fae1c38 Binary files /dev/null and b/Images/Heart_Animation/Heart_Frame_3.png differ diff --git a/Images/Heart_Animation/Heart_Frame_4.png b/Images/Heart_Animation/Heart_Frame_4.png new file mode 100644 index 0000000..feac662 Binary files /dev/null and b/Images/Heart_Animation/Heart_Frame_4.png differ diff --git a/Images/Heart_Animation/Heart_Frame_5.png b/Images/Heart_Animation/Heart_Frame_5.png new file mode 100644 index 0000000..4accb96 Binary files /dev/null and b/Images/Heart_Animation/Heart_Frame_5.png differ diff --git a/Images/Inst_background.png b/Images/Inst_background.png new file mode 100755 index 0000000..f29afa8 Binary files /dev/null and b/Images/Inst_background.png differ diff --git a/Images/InstructionView/.DS_Store b/Images/InstructionView/.DS_Store new file mode 100644 index 0000000..939edd7 Binary files /dev/null and b/Images/InstructionView/.DS_Store differ diff --git a/Images/InstructionView/Inst_background.png b/Images/InstructionView/Inst_background.png new file mode 100755 index 0000000..f29afa8 Binary files /dev/null and b/Images/InstructionView/Inst_background.png differ diff --git a/Images/InstructionView/Instructions_fullview.png b/Images/InstructionView/Instructions_fullview.png new file mode 100755 index 0000000..bffb5b8 Binary files /dev/null and b/Images/InstructionView/Instructions_fullview.png differ diff --git a/Images/InstructionView/instructions_box.png b/Images/InstructionView/instructions_box.png new file mode 100644 index 0000000..606e447 Binary files /dev/null and b/Images/InstructionView/instructions_box.png differ diff --git a/Images/InstructionView/instructions_text.png b/Images/InstructionView/instructions_text.png new file mode 100755 index 0000000..4a51317 Binary files /dev/null and b/Images/InstructionView/instructions_text.png differ diff --git a/Images/InstructionView/start_button.png b/Images/InstructionView/start_button.png new file mode 100644 index 0000000..54d901b Binary files /dev/null and b/Images/InstructionView/start_button.png differ diff --git a/Images/LoveMeter/Box1.png b/Images/LoveMeter/Box1.png new file mode 100755 index 0000000..11c60ac Binary files /dev/null and b/Images/LoveMeter/Box1.png differ diff --git a/Images/LoveMeter/Box2.png b/Images/LoveMeter/Box2.png new file mode 100755 index 0000000..503bed7 Binary files /dev/null and b/Images/LoveMeter/Box2.png differ diff --git a/Images/LoveMeter/Calculate_button.png b/Images/LoveMeter/Calculate_button.png new file mode 100755 index 0000000..21e867a Binary files /dev/null and b/Images/LoveMeter/Calculate_button.png differ diff --git a/Images/LoveMeter/LoveMeter_Background.png b/Images/LoveMeter/LoveMeter_Background.png new file mode 100755 index 0000000..494ed0d Binary files /dev/null and b/Images/LoveMeter/LoveMeter_Background.png differ diff --git a/Images/LoveMeter/LoveMeter_Mockup.png b/Images/LoveMeter/LoveMeter_Mockup.png new file mode 100755 index 0000000..c478503 Binary files /dev/null and b/Images/LoveMeter/LoveMeter_Mockup.png differ diff --git a/Images/LoveMeter/Lovers_Name.png b/Images/LoveMeter/Lovers_Name.png new file mode 100755 index 0000000..60f7c79 Binary files /dev/null and b/Images/LoveMeter/Lovers_Name.png differ diff --git a/Images/LoveMeter/Menu_button.png b/Images/LoveMeter/Menu_button.png new file mode 100755 index 0000000..527c02d Binary files /dev/null and b/Images/LoveMeter/Menu_button.png differ diff --git a/Images/LoveMeter/Needle.png b/Images/LoveMeter/Needle.png new file mode 100755 index 0000000..047ce66 Binary files /dev/null and b/Images/LoveMeter/Needle.png differ diff --git a/Images/LoveMeter/Needle_Controler.png b/Images/LoveMeter/Needle_Controler.png new file mode 100755 index 0000000..ef51e7f Binary files /dev/null and b/Images/LoveMeter/Needle_Controler.png differ diff --git a/Images/LoveMeter/Needle_double_size.png b/Images/LoveMeter/Needle_double_size.png new file mode 100755 index 0000000..cf04de1 Binary files /dev/null and b/Images/LoveMeter/Needle_double_size.png differ diff --git a/Images/LoveMeter/Next_button.png b/Images/LoveMeter/Next_button.png new file mode 100755 index 0000000..ae968d7 Binary files /dev/null and b/Images/LoveMeter/Next_button.png differ diff --git a/Images/LoveMeter/Reset_button.png b/Images/LoveMeter/Reset_button.png new file mode 100755 index 0000000..b010c8d Binary files /dev/null and b/Images/LoveMeter/Reset_button.png differ diff --git a/Images/LoveMeter/XY Values.txt b/Images/LoveMeter/XY Values.txt new file mode 100755 index 0000000..9f46dfd --- /dev/null +++ b/Images/LoveMeter/XY Values.txt @@ -0,0 +1,13 @@ + +Back Button 72.3 / 17.8 +Heart Animation Frames 162.2 / 22.6 +Menu Button 258.2 / 17.8 +Your Lovers Name Text 241.5 , 90.2 +Your Name Text 81 / 90.2 +Box 1 79 , 116.7 +Box 2 241.2 / 116.7 +Needle 164 / 267.6 +Needle Controller Circle 165.2 / 304.6 +Calcuelate Button 263 / 417.3 +Reset Button 46.3 / 417.3 +Next Button 163.3 / 456.5 \ No newline at end of file diff --git a/Images/LoveMeter/Your_Name.png b/Images/LoveMeter/Your_Name.png new file mode 100755 index 0000000..f7e69c8 Binary files /dev/null and b/Images/LoveMeter/Your_Name.png differ diff --git a/Images/LoveMeter/back_button.png b/Images/LoveMeter/back_button.png new file mode 100755 index 0000000..31f16f4 Binary files /dev/null and b/Images/LoveMeter/back_button.png differ diff --git a/Images/LoveMeter/top_bar.png b/Images/LoveMeter/top_bar.png new file mode 100755 index 0000000..bd8c005 Binary files /dev/null and b/Images/LoveMeter/top_bar.png differ diff --git a/Images/Menu/.DS_Store b/Images/Menu/.DS_Store new file mode 100644 index 0000000..8af4b05 Binary files /dev/null and b/Images/Menu/.DS_Store differ diff --git a/Images/Menu/Menu Buttons/Credtis_Button_Normal.png b/Images/Menu/Menu Buttons/Credtis_Button_Normal.png new file mode 100755 index 0000000..cffa3ba Binary files /dev/null and b/Images/Menu/Menu Buttons/Credtis_Button_Normal.png differ diff --git a/Images/Menu/Menu Buttons/Credtis_Button_Selected.png b/Images/Menu/Menu Buttons/Credtis_Button_Selected.png new file mode 100755 index 0000000..c150135 Binary files /dev/null and b/Images/Menu/Menu Buttons/Credtis_Button_Selected.png differ diff --git a/Images/Menu/Menu Buttons/Instructions_Button_Normal.png b/Images/Menu/Menu Buttons/Instructions_Button_Normal.png new file mode 100755 index 0000000..2ff8c5b Binary files /dev/null and b/Images/Menu/Menu Buttons/Instructions_Button_Normal.png differ diff --git a/Images/Menu/Menu Buttons/Instructions_Button_Selected.png b/Images/Menu/Menu Buttons/Instructions_Button_Selected.png new file mode 100755 index 0000000..e774652 Binary files /dev/null and b/Images/Menu/Menu Buttons/Instructions_Button_Selected.png differ diff --git a/Images/Menu/Menu Buttons/Start_Button_Normal.png b/Images/Menu/Menu Buttons/Start_Button_Normal.png new file mode 100755 index 0000000..958acca Binary files /dev/null and b/Images/Menu/Menu Buttons/Start_Button_Normal.png differ diff --git a/Images/Menu/Menu Buttons/Start_Button_Selected.png b/Images/Menu/Menu Buttons/Start_Button_Selected.png new file mode 100755 index 0000000..971504c Binary files /dev/null and b/Images/Menu/Menu Buttons/Start_Button_Selected.png differ diff --git a/Images/Menu/Menu_Screen/Full_View.png b/Images/Menu/Menu_Screen/Full_View.png new file mode 100755 index 0000000..6eed76c Binary files /dev/null and b/Images/Menu/Menu_Screen/Full_View.png differ diff --git a/Images/Menu/Menu_Screen/Menu_BG.png b/Images/Menu/Menu_Screen/Menu_BG.png new file mode 100755 index 0000000..04d5df7 Binary files /dev/null and b/Images/Menu/Menu_Screen/Menu_BG.png differ diff --git a/Images/Menu/XY Values.txt b/Images/Menu/XY Values.txt new file mode 100755 index 0000000..66fe429 --- /dev/null +++ b/Images/Menu/XY Values.txt @@ -0,0 +1,7 @@ + +Back Button 72.3 / 17.8 +Heart Animation Frames 162.2 / 22.6 +Menu Button 258.2 / 17.8 +Start Button 159.8 / 162.5 +Instructions Button 159.8 / 245.5 +Credits Button 159.9 / 326.8 \ No newline at end of file diff --git a/Images/select_card_text.png b/Images/select_card_text.png new file mode 100644 index 0000000..6214abc Binary files /dev/null and b/Images/select_card_text.png differ diff --git a/MainWindow.xib b/MainWindow.xib new file mode 100644 index 0000000..7b5af93 --- /dev/null +++ b/MainWindow.xib @@ -0,0 +1,444 @@ + + + + 1024 + 10D571 + 786 + 1038.29 + 460.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 112 + + + YES + + + + YES + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + YES + + YES + + + YES + + + + YES + + IBFilesOwner + IBCocoaTouchFramework + + + IBFirstResponder + IBCocoaTouchFramework + + + IBCocoaTouchFramework + + + iValentineViewController + + + 1 + + IBCocoaTouchFramework + NO + + + + 292 + {320, 480} + + 1 + MSAxIDEAA + + NO + NO + + IBCocoaTouchFramework + YES + + + + + YES + + + delegate + + + + 4 + + + + viewController + + + + 11 + + + + window + + + + 14 + + + + + YES + + 0 + + + + + + -1 + + + File's Owner + + + 3 + + + iValentine App Delegate + + + -2 + + + + + 10 + + + + + 12 + + + + + + + YES + + YES + -1.CustomClassName + -2.CustomClassName + 10.CustomClassName + 10.IBEditorWindowLastContentRect + 10.IBPluginDependency + 12.IBEditorWindowLastContentRect + 12.IBPluginDependency + 3.CustomClassName + 3.IBPluginDependency + + + YES + UIApplication + UIResponder + iValentineViewController + {{234, 376}, {320, 480}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + {{525, 346}, {320, 480}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + iValentineAppDelegate + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + YES + + + YES + + + + + YES + + + YES + + + + 15 + + + + YES + + UIWindow + UIView + + IBUserSource + + + + + iValentineAppDelegate + NSObject + + YES + + YES + viewController + window + + + YES + iValentineViewController + UIWindow + + + + YES + + YES + viewController + window + + + YES + + viewController + iValentineViewController + + + window + UIWindow + + + + + IBProjectSource + Classes/iValentineAppDelegate.h + + + + iValentineAppDelegate + NSObject + + IBUserSource + + + + + iValentineViewController + UIViewController + + IBProjectSource + Classes/iValentineViewController.h + + + + + YES + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIAccessibility.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UINibLoading.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIResponder.h + + + + UIApplication + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIApplication.h + + + + UIResponder + NSObject + + + + UISearchBar + UIView + + IBFrameworkSource + UIKit.framework/Headers/UISearchBar.h + + + + UISearchDisplayController + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UISearchDisplayController.h + + + + UIView + + IBFrameworkSource + UIKit.framework/Headers/UITextField.h + + + + UIView + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIView.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UINavigationController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UIPopoverController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UISplitViewController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UITabBarController.h + + + + UIViewController + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIViewController.h + + + + UIWindow + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIWindow.h + + + + + 0 + IBCocoaTouchFramework + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 + + + YES + iValentine.xcodeproj + 3 + 112 + + diff --git a/Needle.png b/Needle.png new file mode 100755 index 0000000..83d21ab Binary files /dev/null and b/Needle.png differ diff --git a/iValentine-Info.plist b/iValentine-Info.plist new file mode 100644 index 0000000..82bec4a --- /dev/null +++ b/iValentine-Info.plist @@ -0,0 +1,32 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleDisplayName + ${PRODUCT_NAME} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + 57_taplove.png + CFBundleIdentifier + iValentine + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1.0 + LSRequiresIPhoneOS + + UIStatusBarHidden + + NSMainNibFile + MainWindow + + diff --git a/iValentine.xcodeproj/mwaqas.mode1v3 b/iValentine.xcodeproj/mwaqas.mode1v3 new file mode 100644 index 0000000..83a9f75 --- /dev/null +++ b/iValentine.xcodeproj/mwaqas.mode1v3 @@ -0,0 +1,1486 @@ + + + + + ActivePerspectiveName + Project + AllowedModules + + + BundleLoadPath + + MaxInstances + n + Module + PBXSmartGroupTreeModule + Name + Groups and Files Outline View + + + BundleLoadPath + + MaxInstances + n + Module + PBXNavigatorGroup + Name + Editor + + + BundleLoadPath + + MaxInstances + n + Module + XCTaskListModule + Name + Task List + + + BundleLoadPath + + MaxInstances + n + Module + XCDetailModule + Name + File and Smart Group Detail Viewer + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXBuildResultsModule + Name + Detailed Build Results Viewer + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXProjectFindModule + Name + Project Batch Find Tool + + + BundleLoadPath + + MaxInstances + n + Module + XCProjectFormatConflictsModule + Name + Project Format Conflicts List + + + BundleLoadPath + + MaxInstances + n + Module + PBXBookmarksModule + Name + Bookmarks Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXClassBrowserModule + Name + Class Browser + + + BundleLoadPath + + MaxInstances + n + Module + PBXCVSModule + Name + Source Code Control Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXDebugBreakpointsModule + Name + Debug Breakpoints Tool + + + BundleLoadPath + + MaxInstances + n + Module + XCDockableInspector + Name + Inspector + + + BundleLoadPath + + MaxInstances + n + Module + PBXOpenQuicklyModule + Name + Open Quickly Tool + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXDebugSessionModule + Name + Debugger + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXDebugCLIModule + Name + Debug Console + + + BundleLoadPath + + MaxInstances + n + Module + XCSnapshotModule + Name + Snapshots Tool + + + BundlePath + /Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources + Description + DefaultDescriptionKey + DockingSystemVisible + + Extension + mode1v3 + FavBarConfig + + PBXProjectModuleGUID + E2F5F58412E38781008D07F6 + XCBarModuleItemNames + + XCBarModuleItems + + + FirstTimeWindowDisplayed + + Identifier + com.apple.perspectives.project.mode1v3 + MajorVersion + 33 + MinorVersion + 0 + Name + Default + Notifications + + OpenEditors + + PerspectiveWidths + + -1 + -1 + + Perspectives + + + ChosenToolbarItems + + active-combo-popup + action + NSToolbarFlexibleSpaceItem + debugger-enable-breakpoints + build-and-go + com.apple.ide.PBXToolbarStopButton + get-info + NSToolbarFlexibleSpaceItem + com.apple.pbx.toolbar.searchfield + + ControllerClassBaseName + + IconName + WindowOfProjectWithEditor + Identifier + perspective.project + IsVertical + + Layout + + + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C37FBAC04509CD000000102 + 1C37FAAC04509CD000000102 + 1C37FABC05509CD000000102 + 1C37FABC05539CD112110102 + E2644B35053B69B200211256 + 1C37FABC04509CD000100104 + 1CC0EA4004350EF90044410B + 1CC0EA4004350EF90041110B + + PBXProjectModuleGUID + 1CE0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + yes + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 320 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 29B97314FDCFA39411CA2CEA + 080E96DDFE201D6D7F000001 + E20FD63B130081760041DAE3 + E2F5F59012E38946008D07F6 + 29B97317FDCFA39411CA2CEA + E2C92C3E12FB20F40071BB8D + E29E99BA1301A788008C0D9C + E29E99BC1301A788008C0D9C + E2DB858D12FF1C54005B1F7D + E2DB859012FF1C54005B1F7D + E2DB859412FF1C54005B1F7D + E2C92C3F12FB20F40071BB8D + E2DB855412FF1685005B1F7D + E2DB855512FF1685005B1F7D + E2DB855C12FF1685005B1F7D + 29B97323FDCFA39411CA2CEA + 1C37FBAC04509CD000000102 + 1C37FABC05509CD000000102 + 1CC0EA4004350EF90041110B + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 6 + 4 + 1 + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {320, 660}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + + XCSharingToken + com.apple.Xcode.GFSharingToken + + GeometryConfiguration + + Frame + {{0, 0}, {337, 678}} + GroupTreeTableConfiguration + + MainColumn + 320 + + RubberWindowFrame + 0 59 1280 719 0 0 1280 778 + + Module + PBXSmartGroupTreeModule + Proportion + 337pt + + + Dock + + + BecomeActive + + ContentConfiguration + + PBXProjectModuleGUID + 1CE0B20306471E060097A5F4 + PBXProjectModuleLabel + LoveMeterVC.m + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1CE0B20406471E060097A5F4 + PBXProjectModuleLabel + LoveMeterVC.m + _historyCapacity + 0 + bookmark + E2933C0113059F5A0050C0C7 + history + + E2BEA36312E8DEDE00ABB777 + E2BEA36612E8DEDE00ABB777 + E2449E4A12F9EDEA0052F5DF + E20FD682130083020041DAE3 + E20FD6A11300862E0041DAE3 + E20FD712130095AE0041DAE3 + E29E9A201301AC07008C0D9C + E29E9AA01301C3BA008C0D9C + E29E9AA21301C3BA008C0D9C + E29E9AA31301C3BA008C0D9C + E29E9AA41301C3BA008C0D9C + E29E9AA51301C3BA008C0D9C + E29E9AA61301C3BA008C0D9C + E29E9AA71301C3BA008C0D9C + E29E9AA81301C3BA008C0D9C + E29E9AAA1301C3BA008C0D9C + E29E9AAB1301C3BA008C0D9C + E29E9AB11301C3BA008C0D9C + E29E9AB21301C3BA008C0D9C + E29E9AB31301C3BA008C0D9C + E29E9AB41301C3BA008C0D9C + E29E9AB51301C3BA008C0D9C + E29E9AB61301C3BA008C0D9C + E29E9AB71301C3BA008C0D9C + E29E9AB81301C3BA008C0D9C + E29E9AB91301C3BA008C0D9C + E29E9ABA1301C3BA008C0D9C + E29E9ABB1301C3BA008C0D9C + E29E9ABC1301C3BA008C0D9C + E29E9ABD1301C3BA008C0D9C + E29E9ABE1301C3BA008C0D9C + E29E9ABF1301C3BA008C0D9C + E29E9AC01301C3BA008C0D9C + E29E9AC11301C3BA008C0D9C + E29E9AC21301C3BA008C0D9C + E29E9AC31301C3BA008C0D9C + E29E9AC41301C3BA008C0D9C + E29E9AC51301C3BA008C0D9C + E29E9AC61301C3BA008C0D9C + E29E9AC71301C3BA008C0D9C + E29E9AC81301C3BA008C0D9C + E29E9AC91301C3BA008C0D9C + E29E9BB91301DEF8008C0D9C + E2A20BA8130311F3001DDEC9 + E2A4B2961304448D00BAF88F + E2A4B2971304448D00BAF88F + E2A4B2981304448D00BAF88F + E29004C013046587006B396B + E29004C113046587006B396B + E29004C413046587006B396B + E29004C513046587006B396B + E290052F13047277006B396B + E290053113047277006B396B + E2900562130482A5006B396B + E290059313048950006B396B + E290059413048950006B396B + E29005BB13048A85006B396B + E29005CB13048B2E006B396B + E29005D013048B99006B396B + E29005D613048C01006B396B + E29005E213048C8D006B396B + E29005E613048CE3006B396B + E29005E713048CE3006B396B + E29005E813048CE3006B396B + E29005E913048CE3006B396B + E2933BDE130597890050C0C7 + E2933BDF130597890050C0C7 + E2933BE0130597890050C0C7 + E2933BE1130597890050C0C7 + E2933BF513059F510050C0C7 + + + SplitCount + 1 + + StatusBarVisibility + + + GeometryConfiguration + + Frame + {{0, 0}, {938, 542}} + RubberWindowFrame + 0 59 1280 719 0 0 1280 778 + + Module + PBXNavigatorGroup + Proportion + 542pt + + + ContentConfiguration + + PBXProjectModuleGUID + 1CE0B20506471E060097A5F4 + PBXProjectModuleLabel + Detail + + GeometryConfiguration + + Frame + {{0, 547}, {938, 131}} + RubberWindowFrame + 0 59 1280 719 0 0 1280 778 + + Module + XCDetailModule + Proportion + 131pt + + + Proportion + 938pt + + + Name + Project + ServiceClasses + + XCModuleDock + PBXSmartGroupTreeModule + XCModuleDock + PBXNavigatorGroup + XCDetailModule + + TableOfContents + + E2933BDB130596960050C0C7 + 1CE0B1FE06471DED0097A5F4 + E2933BDC130596960050C0C7 + 1CE0B20306471E060097A5F4 + 1CE0B20506471E060097A5F4 + + ToolbarConfigUserDefaultsMinorVersion + 2 + ToolbarConfiguration + xcode.toolbar.config.defaultV3 + + + ControllerClassBaseName + + IconName + WindowOfProject + Identifier + perspective.morph + IsVertical + 0 + Layout + + + BecomeActive + 1 + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C37FBAC04509CD000000102 + 1C37FAAC04509CD000000102 + 1C08E77C0454961000C914BD + 1C37FABC05509CD000000102 + 1C37FABC05539CD112110102 + E2644B35053B69B200211256 + 1C37FABC04509CD000100104 + 1CC0EA4004350EF90044410B + 1CC0EA4004350EF90041110B + + PBXProjectModuleGUID + 11E0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + yes + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 186 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 29B97314FDCFA39411CA2CEA + 1C37FABC05509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {186, 337}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + 1 + XCSharingToken + com.apple.Xcode.GFSharingToken + + GeometryConfiguration + + Frame + {{0, 0}, {203, 355}} + GroupTreeTableConfiguration + + MainColumn + 186 + + RubberWindowFrame + 373 269 690 397 0 0 1440 878 + + Module + PBXSmartGroupTreeModule + Proportion + 100% + + + Name + Morph + PreferredWidth + 300 + ServiceClasses + + XCModuleDock + PBXSmartGroupTreeModule + + TableOfContents + + 11E0B1FE06471DED0097A5F4 + + ToolbarConfiguration + xcode.toolbar.config.default.shortV3 + + + PerspectivesBarVisible + + ShelfIsVisible + + SourceDescription + file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecificationMode1.xcperspec' + StatusbarIsVisible + + TimeStamp + 0.0 + ToolbarConfigUserDefaultsMinorVersion + 2 + ToolbarDisplayMode + 1 + ToolbarIsVisible + + ToolbarSizeMode + 1 + Type + Perspectives + UpdateMessage + The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the "Metro-Morph" feature). You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature. Do you wish to update to the latest Workspace defaults for project '%@'? + WindowJustification + 5 + WindowOrderList + + 1CD10A99069EF8BA00B06720 + E2F5F58512E38781008D07F6 + /Users/mwaqas/My_Computer/Waqas_Drive/Freelance/01-Creative Bug/Love Meter/SourceCode/iValentine/iValentine.xcodeproj + 1C78EAAD065D492600B07095 + + WindowString + 0 59 1280 719 0 0 1280 778 + WindowToolsV3 + + + FirstTimeWindowDisplayed + + Identifier + windowTool.build + IsVertical + + Layout + + + Dock + + + BecomeActive + + ContentConfiguration + + PBXProjectModuleGUID + 1CD0528F0623707200166675 + PBXProjectModuleLabel + LoveMeterVC.m + StatusBarVisibility + + + GeometryConfiguration + + Frame + {{0, 0}, {753, 239}} + RubberWindowFrame + 267 180 753 521 0 0 1280 778 + + Module + PBXNavigatorGroup + Proportion + 239pt + + + ContentConfiguration + + PBXProjectModuleGUID + XCMainBuildResultsModuleGUID + PBXProjectModuleLabel + Build Results + XCBuildResultsTrigger_Collapse + 1021 + XCBuildResultsTrigger_Open + 1011 + + GeometryConfiguration + + Frame + {{0, 244}, {753, 236}} + RubberWindowFrame + 267 180 753 521 0 0 1280 778 + + Module + PBXBuildResultsModule + Proportion + 236pt + + + Proportion + 480pt + + + Name + Build Results + ServiceClasses + + PBXBuildResultsModule + + StatusbarIsVisible + + TableOfContents + + E2F5F58512E38781008D07F6 + E2933BDD130596960050C0C7 + 1CD0528F0623707200166675 + XCMainBuildResultsModuleGUID + + ToolbarConfiguration + xcode.toolbar.config.buildV3 + WindowContentMinSize + 486 300 + WindowString + 267 180 753 521 0 0 1280 778 + WindowToolGUID + E2F5F58512E38781008D07F6 + WindowToolIsVisible + + + + FirstTimeWindowDisplayed + + Identifier + windowTool.debugger + IsVertical + + Layout + + + Dock + + + ContentConfiguration + + Debugger + + HorizontalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {316, 203}} + {{316, 0}, {378, 203}} + + + VerticalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {694, 203}} + {{0, 203}, {694, 178}} + + + + LauncherConfigVersion + 8 + PBXProjectModuleGUID + 1C162984064C10D400B95A72 + PBXProjectModuleLabel + Debug - GLUTExamples (Underwater) + + GeometryConfiguration + + DebugConsoleVisible + None + DebugConsoleWindowFrame + {{200, 200}, {500, 300}} + DebugSTDIOWindowFrame + {{200, 200}, {500, 300}} + Frame + {{0, 0}, {694, 381}} + PBXDebugSessionStackFrameViewKey + + DebugVariablesTableConfiguration + + Name + 120 + Value + 85 + Summary + 148 + + Frame + {{316, 0}, {378, 203}} + RubberWindowFrame + 21 333 694 422 0 0 1280 778 + + RubberWindowFrame + 21 333 694 422 0 0 1280 778 + + Module + PBXDebugSessionModule + Proportion + 381pt + + + Proportion + 381pt + + + Name + Debugger + ServiceClasses + + PBXDebugSessionModule + + StatusbarIsVisible + + TableOfContents + + 1CD10A99069EF8BA00B06720 + E2933BF713059F510050C0C7 + 1C162984064C10D400B95A72 + E2933BF813059F510050C0C7 + E2933BF913059F510050C0C7 + E2933BFA13059F510050C0C7 + E2933BFB13059F510050C0C7 + E2933BFC13059F510050C0C7 + + ToolbarConfiguration + xcode.toolbar.config.debugV3 + WindowString + 21 333 694 422 0 0 1280 778 + WindowToolGUID + 1CD10A99069EF8BA00B06720 + WindowToolIsVisible + + + + Identifier + windowTool.find + Layout + + + Dock + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CDD528C0622207200134675 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1CD0528D0623707200166675 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {781, 167}} + RubberWindowFrame + 62 385 781 470 0 0 1440 878 + + Module + PBXNavigatorGroup + Proportion + 781pt + + + Proportion + 50% + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1CD0528E0623707200166675 + PBXProjectModuleLabel + Project Find + + GeometryConfiguration + + Frame + {{8, 0}, {773, 254}} + RubberWindowFrame + 62 385 781 470 0 0 1440 878 + + Module + PBXProjectFindModule + Proportion + 50% + + + Proportion + 428pt + + + Name + Project Find + ServiceClasses + + PBXProjectFindModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C530D57069F1CE1000CFCEE + 1C530D58069F1CE1000CFCEE + 1C530D59069F1CE1000CFCEE + 1CDD528C0622207200134675 + 1C530D5A069F1CE1000CFCEE + 1CE0B1FE06471DED0097A5F4 + 1CD0528E0623707200166675 + + WindowString + 62 385 781 470 0 0 1440 878 + WindowToolGUID + 1C530D57069F1CE1000CFCEE + WindowToolIsVisible + 0 + + + Identifier + MENUSEPARATOR + + + FirstTimeWindowDisplayed + + Identifier + windowTool.debuggerConsole + IsVertical + + Layout + + + Dock + + + BecomeActive + + ContentConfiguration + + PBXProjectModuleGUID + 1C78EAAC065D492600B07095 + PBXProjectModuleLabel + Debugger Console + + GeometryConfiguration + + Frame + {{0, 0}, {650, 209}} + RubberWindowFrame + 0 509 650 250 0 0 1280 778 + + Module + PBXDebugCLIModule + Proportion + 209pt + + + Proportion + 209pt + + + Name + Debugger Console + ServiceClasses + + PBXDebugCLIModule + + StatusbarIsVisible + + TableOfContents + + 1C78EAAD065D492600B07095 + E2933BFD13059F510050C0C7 + 1C78EAAC065D492600B07095 + + ToolbarConfiguration + xcode.toolbar.config.consoleV3 + WindowString + 0 509 650 250 0 0 1280 778 + WindowToolGUID + 1C78EAAD065D492600B07095 + WindowToolIsVisible + + + + Identifier + windowTool.snapshots + Layout + + + Dock + + + Module + XCSnapshotModule + Proportion + 100% + + + Proportion + 100% + + + Name + Snapshots + ServiceClasses + + XCSnapshotModule + + StatusbarIsVisible + Yes + ToolbarConfiguration + xcode.toolbar.config.snapshots + WindowString + 315 824 300 550 0 0 1440 878 + WindowToolIsVisible + Yes + + + Identifier + windowTool.scm + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1C78EAB2065D492600B07095 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1C78EAB3065D492600B07095 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {452, 0}} + RubberWindowFrame + 743 379 452 308 0 0 1280 1002 + + Module + PBXNavigatorGroup + Proportion + 0pt + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1CD052920623707200166675 + PBXProjectModuleLabel + SCM + + GeometryConfiguration + + ConsoleFrame + {{0, 259}, {452, 0}} + Frame + {{0, 7}, {452, 259}} + RubberWindowFrame + 743 379 452 308 0 0 1280 1002 + TableConfiguration + + Status + 30 + FileName + 199 + Path + 197.0950012207031 + + TableFrame + {{0, 0}, {452, 250}} + + Module + PBXCVSModule + Proportion + 262pt + + + Proportion + 266pt + + + Name + SCM + ServiceClasses + + PBXCVSModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C78EAB4065D492600B07095 + 1C78EAB5065D492600B07095 + 1C78EAB2065D492600B07095 + 1CD052920623707200166675 + + ToolbarConfiguration + xcode.toolbar.config.scm + WindowString + 743 379 452 308 0 0 1280 1002 + + + FirstTimeWindowDisplayed + + Identifier + windowTool.breakpoints + IsVertical + + Layout + + + Dock + + + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C77FABC04509CD000000102 + + PBXProjectModuleGUID + 1CE0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + no + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 168 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 1C77FABC04509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {168, 350}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + + + GeometryConfiguration + + Frame + {{0, 0}, {185, 368}} + GroupTreeTableConfiguration + + MainColumn + 168 + + RubberWindowFrame + 31 346 744 409 0 0 1280 778 + + Module + PBXSmartGroupTreeModule + Proportion + 185pt + + + BecomeActive + + ContentConfiguration + + PBXProjectModuleGUID + 1CA1AED706398EBD00589147 + PBXProjectModuleLabel + Detail + + GeometryConfiguration + + Frame + {{190, 0}, {554, 368}} + RubberWindowFrame + 31 346 744 409 0 0 1280 778 + + Module + XCDetailModule + Proportion + 554pt + + + Proportion + 368pt + + + MajorVersion + 3 + MinorVersion + 0 + Name + Breakpoints + ServiceClasses + + PBXSmartGroupTreeModule + XCDetailModule + + StatusbarIsVisible + + TableOfContents + + E290055213048143006B396B + E290055313048143006B396B + 1CE0B1FE06471DED0097A5F4 + 1CA1AED706398EBD00589147 + + ToolbarConfiguration + xcode.toolbar.config.breakpointsV3 + WindowString + 31 346 744 409 0 0 1280 778 + WindowToolGUID + E290055213048143006B396B + WindowToolIsVisible + + + + Identifier + windowTool.debugAnimator + Layout + + + Dock + + + Module + PBXNavigatorGroup + Proportion + 100% + + + Proportion + 100% + + + Name + Debug Visualizer + ServiceClasses + + PBXNavigatorGroup + + StatusbarIsVisible + 1 + ToolbarConfiguration + xcode.toolbar.config.debugAnimatorV3 + WindowString + 100 100 700 500 0 0 1280 1002 + + + Identifier + windowTool.bookmarks + Layout + + + Dock + + + Module + PBXBookmarksModule + Proportion + 100% + + + Proportion + 100% + + + Name + Bookmarks + ServiceClasses + + PBXBookmarksModule + + StatusbarIsVisible + 0 + WindowString + 538 42 401 187 0 0 1280 1002 + + + Identifier + windowTool.projectFormatConflicts + Layout + + + Dock + + + Module + XCProjectFormatConflictsModule + Proportion + 100% + + + Proportion + 100% + + + Name + Project Format Conflicts + ServiceClasses + + XCProjectFormatConflictsModule + + StatusbarIsVisible + 0 + WindowContentMinSize + 450 300 + WindowString + 50 850 472 307 0 0 1440 877 + + + Identifier + windowTool.classBrowser + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + OptionsSetName + Hierarchy, all classes + PBXProjectModuleGUID + 1CA6456E063B45B4001379D8 + PBXProjectModuleLabel + Class Browser - NSObject + + GeometryConfiguration + + ClassesFrame + {{0, 0}, {374, 96}} + ClassesTreeTableConfiguration + + PBXClassNameColumnIdentifier + 208 + PBXClassBookColumnIdentifier + 22 + + Frame + {{0, 0}, {630, 331}} + MembersFrame + {{0, 105}, {374, 395}} + MembersTreeTableConfiguration + + PBXMemberTypeIconColumnIdentifier + 22 + PBXMemberNameColumnIdentifier + 216 + PBXMemberTypeColumnIdentifier + 97 + PBXMemberBookColumnIdentifier + 22 + + PBXModuleWindowStatusBarHidden2 + 1 + RubberWindowFrame + 385 179 630 352 0 0 1440 878 + + Module + PBXClassBrowserModule + Proportion + 332pt + + + Proportion + 332pt + + + Name + Class Browser + ServiceClasses + + PBXClassBrowserModule + + StatusbarIsVisible + 0 + TableOfContents + + 1C0AD2AF069F1E9B00FABCE6 + 1C0AD2B0069F1E9B00FABCE6 + 1CA6456E063B45B4001379D8 + + ToolbarConfiguration + xcode.toolbar.config.classbrowser + WindowString + 385 179 630 352 0 0 1440 878 + WindowToolGUID + 1C0AD2AF069F1E9B00FABCE6 + WindowToolIsVisible + 0 + + + Identifier + windowTool.refactoring + IncludeInToolsMenu + 0 + Layout + + + Dock + + + BecomeActive + 1 + GeometryConfiguration + + Frame + {0, 0}, {500, 335} + RubberWindowFrame + {0, 0}, {500, 335} + + Module + XCRefactoringModule + Proportion + 100% + + + Proportion + 100% + + + Name + Refactoring + ServiceClasses + + XCRefactoringModule + + WindowString + 200 200 500 356 0 0 1920 1200 + + + + diff --git a/iValentine.xcodeproj/mwaqas.pbxuser b/iValentine.xcodeproj/mwaqas.pbxuser new file mode 100644 index 0000000..e2845a4 --- /dev/null +++ b/iValentine.xcodeproj/mwaqas.pbxuser @@ -0,0 +1,1186 @@ +// !$*UTF8*$! +{ + 1D3623240D0F684500981E51 /* iValentineAppDelegate.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {877, 491}}"; + sepNavSelRange = "{491, 8}"; + sepNavVisRange = "{0, 819}"; + }; + }; + 1D3623250D0F684500981E51 /* iValentineAppDelegate.m */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {1965, 1183}}"; + sepNavSelRange = "{748, 0}"; + sepNavVisRange = "{218, 1342}"; + }; + }; + 1D6058900D05DD3D006BFB54 /* iValentine */ = { + activeExec = 0; + executables = ( + E2F5F57A12E3876A008D07F6 /* iValentine */, + ); + }; + 28D7ACF60DDB3853001CB0EB /* iValentineViewController.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {877, 489}}"; + sepNavSelRange = "{174, 0}"; + sepNavVisRange = "{0, 458}"; + }; + }; + 28D7ACF70DDB3853001CB0EB /* iValentineViewController.m */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {877, 1131}}"; + sepNavSelRange = "{252, 0}"; + sepNavVisRange = "{0, 1162}"; + sepNavWindowFrame = "{{15, 182}, {1172, 591}}"; + }; + }; + 29B97313FDCFA39411CA2CEA /* Project object */ = { + activeBuildConfigurationName = Debug; + activeExecutable = E2F5F57A12E3876A008D07F6 /* iValentine */; + activeSDKPreference = iphonesimulator4.2; + activeTarget = 1D6058900D05DD3D006BFB54 /* iValentine */; + addToTargets = ( + ); + breakpoints = ( + E290055413048146006B396B /* LoveMeterVC.m:243 */, + ); + codeSenseManager = E2F5F58812E38781008D07F6 /* Code sense */; + executables = ( + E2F5F57A12E3876A008D07F6 /* iValentine */, + ); + perUserDictionary = { + "PBXConfiguration.PBXBreakpointsDataSource.v1:1CA1AED706398EBD00589147" = { + PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; + PBXFileTableDataSourceColumnSortingKey = PBXBreakpointsDataSource_BreakpointID; + PBXFileTableDataSourceColumnWidthsKey = ( + 20, + 20, + 198, + 20, + 99, + 99, + 29, + 20, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXBreakpointsDataSource_ActionID, + PBXBreakpointsDataSource_TypeID, + PBXBreakpointsDataSource_BreakpointID, + PBXBreakpointsDataSource_UseID, + PBXBreakpointsDataSource_LocationID, + PBXBreakpointsDataSource_ConditionID, + PBXBreakpointsDataSource_IgnoreCountID, + PBXBreakpointsDataSource_ContinueID, + ); + }; + PBXConfiguration.PBXFileTableDataSource3.PBXBookmarksDataSource = { + PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; + PBXFileTableDataSourceColumnSortingKey = PBXBookmarksDataSource_NameID; + PBXFileTableDataSourceColumnWidthsKey = ( + 200, + 200, + 509, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXBookmarksDataSource_LocationID, + PBXBookmarksDataSource_NameID, + PBXBookmarksDataSource_CommentsID, + ); + }; + PBXConfiguration.PBXFileTableDataSource3.PBXExecutablesDataSource = { + PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; + PBXFileTableDataSourceColumnSortingKey = PBXExecutablesDataSource_NameID; + PBXFileTableDataSourceColumnWidthsKey = ( + 22, + 300, + 587, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXExecutablesDataSource_ActiveFlagID, + PBXExecutablesDataSource_NameID, + PBXExecutablesDataSource_CommentsID, + ); + }; + PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = { + PBXFileTableDataSourceColumnSortingDirectionKey = 1; + PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; + PBXFileTableDataSourceColumnWidthsKey = ( + 20, + 699, + 20, + 48, + 43, + 43, + 20, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXFileDataSource_FiletypeID, + PBXFileDataSource_Filename_ColumnID, + PBXFileDataSource_Built_ColumnID, + PBXFileDataSource_ObjectSize_ColumnID, + PBXFileDataSource_Errors_ColumnID, + PBXFileDataSource_Warnings_ColumnID, + PBXFileDataSource_Target_ColumnID, + ); + }; + PBXConfiguration.PBXFileTableDataSource3.PBXFindDataSource = { + PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; + PBXFileTableDataSourceColumnSortingKey = PBXFindDataSource_LocationID; + PBXFileTableDataSourceColumnWidthsKey = ( + 200, + 713, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXFindDataSource_MessageID, + PBXFindDataSource_LocationID, + ); + }; + PBXConfiguration.PBXFileTableDataSource3.PBXSymbolsDataSource = { + PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; + PBXFileTableDataSourceColumnSortingKey = PBXSymbolsDataSource_SymbolNameID; + PBXFileTableDataSourceColumnWidthsKey = ( + 16, + 200, + 50, + 639, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXSymbolsDataSource_SymbolTypeIconID, + PBXSymbolsDataSource_SymbolNameID, + PBXSymbolsDataSource_SymbolTypeID, + PBXSymbolsDataSource_ReferenceNameID, + ); + }; + PBXConfiguration.PBXFileTableDataSource3.XCSCMDataSource = { + PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; + PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; + PBXFileTableDataSourceColumnWidthsKey = ( + 20, + 20, + 675, + 20, + 48.16259765625, + 43, + 43, + 20, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXFileDataSource_SCM_ColumnID, + PBXFileDataSource_FiletypeID, + PBXFileDataSource_Filename_ColumnID, + PBXFileDataSource_Built_ColumnID, + PBXFileDataSource_ObjectSize_ColumnID, + PBXFileDataSource_Errors_ColumnID, + PBXFileDataSource_Warnings_ColumnID, + PBXFileDataSource_Target_ColumnID, + ); + }; + PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = { + PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; + PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; + PBXFileTableDataSourceColumnWidthsKey = ( + 20, + 659, + 60, + 20, + 48, + 43, + 43, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXFileDataSource_FiletypeID, + PBXFileDataSource_Filename_ColumnID, + PBXTargetDataSource_PrimaryAttribute, + PBXFileDataSource_Built_ColumnID, + PBXFileDataSource_ObjectSize_ColumnID, + PBXFileDataSource_Errors_ColumnID, + PBXFileDataSource_Warnings_ColumnID, + ); + }; + PBXPerProjectTemplateStateSaveDate = 319133327; + PBXWorkspaceStateSaveDate = 319133327; + }; + perUserProjectItems = { + E20FD682130083020041DAE3 = E20FD682130083020041DAE3 /* PBXTextBookmark */; + E20FD6A11300862E0041DAE3 = E20FD6A11300862E0041DAE3 /* PBXTextBookmark */; + E20FD712130095AE0041DAE3 = E20FD712130095AE0041DAE3 /* PBXTextBookmark */; + E2449E4A12F9EDEA0052F5DF = E2449E4A12F9EDEA0052F5DF /* PBXBookmark */; + E29004C013046587006B396B = E29004C013046587006B396B /* PBXBookmark */; + E29004C113046587006B396B = E29004C113046587006B396B /* PBXBookmark */; + E29004C413046587006B396B = E29004C413046587006B396B /* PBXTextBookmark */; + E29004C513046587006B396B = E29004C513046587006B396B /* PBXTextBookmark */; + E290052F13047277006B396B = E290052F13047277006B396B /* PBXTextBookmark */; + E290053113047277006B396B = E290053113047277006B396B /* PBXTextBookmark */; + E2900562130482A5006B396B = E2900562130482A5006B396B /* PBXTextBookmark */; + E290059213048950006B396B = E290059213048950006B396B /* PBXTextBookmark */; + E290059313048950006B396B = E290059313048950006B396B /* PBXBookmark */; + E290059413048950006B396B = E290059413048950006B396B /* PBXTextBookmark */; + E29005BB13048A85006B396B = E29005BB13048A85006B396B /* PBXTextBookmark */; + E29005CA13048B2E006B396B = E29005CA13048B2E006B396B /* PBXTextBookmark */; + E29005CB13048B2E006B396B = E29005CB13048B2E006B396B /* PBXTextBookmark */; + E29005D013048B99006B396B = E29005D013048B99006B396B /* PBXTextBookmark */; + E29005D213048B99006B396B = E29005D213048B99006B396B /* PBXTextBookmark */; + E29005D613048C01006B396B = E29005D613048C01006B396B /* PBXTextBookmark */; + E29005E213048C8D006B396B = E29005E213048C8D006B396B /* PBXTextBookmark */; + E29005E613048CE3006B396B = E29005E613048CE3006B396B /* PBXTextBookmark */; + E29005E713048CE3006B396B = E29005E713048CE3006B396B /* PBXTextBookmark */; + E29005E813048CE3006B396B = E29005E813048CE3006B396B /* PBXTextBookmark */; + E29005E913048CE3006B396B = E29005E913048CE3006B396B /* PBXTextBookmark */; + E29005EA13048CE3006B396B = E29005EA13048CE3006B396B /* PBXTextBookmark */; + E29005EC13049185006B396B = E29005EC13049185006B396B /* PBXTextBookmark */; + E2933BDA130596960050C0C7 /* PBXTextBookmark */ = E2933BDA130596960050C0C7 /* PBXTextBookmark */; + E2933BDE130597890050C0C7 /* PBXTextBookmark */ = E2933BDE130597890050C0C7 /* PBXTextBookmark */; + E2933BDF130597890050C0C7 /* PBXTextBookmark */ = E2933BDF130597890050C0C7 /* PBXTextBookmark */; + E2933BE0130597890050C0C7 /* PBXTextBookmark */ = E2933BE0130597890050C0C7 /* PBXTextBookmark */; + E2933BE1130597890050C0C7 /* PBXTextBookmark */ = E2933BE1130597890050C0C7 /* PBXTextBookmark */; + E2933BE3130597890050C0C7 /* PBXTextBookmark */ = E2933BE3130597890050C0C7 /* PBXTextBookmark */; + E2933BE4130597890050C0C7 /* PBXTextBookmark */ = E2933BE4130597890050C0C7 /* PBXTextBookmark */; + E2933BE513059D060050C0C7 /* PBXTextBookmark */ = E2933BE513059D060050C0C7 /* PBXTextBookmark */; + E2933BE613059DE20050C0C7 /* PBXTextBookmark */ = E2933BE613059DE20050C0C7 /* PBXTextBookmark */; + E2933BF513059F510050C0C7 /* XCBuildMessageTextBookmark */ = E2933BF513059F510050C0C7 /* XCBuildMessageTextBookmark */; + E2933BF613059F510050C0C7 /* PBXTextBookmark */ = E2933BF613059F510050C0C7 /* PBXTextBookmark */; + E2933BFF13059F520050C0C7 /* XCBuildMessageTextBookmark */ = E2933BFF13059F520050C0C7 /* XCBuildMessageTextBookmark */; + E2933C0013059F520050C0C7 /* PBXTextBookmark */ = E2933C0013059F520050C0C7 /* PBXTextBookmark */; + E2933C0113059F5A0050C0C7 /* PBXTextBookmark */ = E2933C0113059F5A0050C0C7 /* PBXTextBookmark */; + E29E9A201301AC07008C0D9C = E29E9A201301AC07008C0D9C /* PlistBookmark */; + E29E9AA01301C3BA008C0D9C = E29E9AA01301C3BA008C0D9C /* PBXBookmark */; + E29E9AA21301C3BA008C0D9C = E29E9AA21301C3BA008C0D9C /* PBXBookmark */; + E29E9AA31301C3BA008C0D9C = E29E9AA31301C3BA008C0D9C /* PBXBookmark */; + E29E9AA41301C3BA008C0D9C = E29E9AA41301C3BA008C0D9C /* PBXBookmark */; + E29E9AA51301C3BA008C0D9C = E29E9AA51301C3BA008C0D9C /* PBXTextBookmark */; + E29E9AA61301C3BA008C0D9C = E29E9AA61301C3BA008C0D9C /* PBXBookmark */; + E29E9AA71301C3BA008C0D9C = E29E9AA71301C3BA008C0D9C /* PBXBookmark */; + E29E9AA81301C3BA008C0D9C = E29E9AA81301C3BA008C0D9C /* PBXBookmark */; + E29E9AAA1301C3BA008C0D9C = E29E9AAA1301C3BA008C0D9C /* PBXBookmark */; + E29E9AAB1301C3BA008C0D9C = E29E9AAB1301C3BA008C0D9C /* PBXBookmark */; + E29E9AB11301C3BA008C0D9C = E29E9AB11301C3BA008C0D9C /* PBXTextBookmark */; + E29E9AB21301C3BA008C0D9C = E29E9AB21301C3BA008C0D9C /* PBXBookmark */; + E29E9AB31301C3BA008C0D9C = E29E9AB31301C3BA008C0D9C /* PBXBookmark */; + E29E9AB41301C3BA008C0D9C = E29E9AB41301C3BA008C0D9C /* PBXBookmark */; + E29E9AB51301C3BA008C0D9C = E29E9AB51301C3BA008C0D9C /* PBXBookmark */; + E29E9AB61301C3BA008C0D9C = E29E9AB61301C3BA008C0D9C /* PBXBookmark */; + E29E9AB71301C3BA008C0D9C = E29E9AB71301C3BA008C0D9C /* PBXBookmark */; + E29E9AB81301C3BA008C0D9C = E29E9AB81301C3BA008C0D9C /* PBXBookmark */; + E29E9AB91301C3BA008C0D9C = E29E9AB91301C3BA008C0D9C /* PBXBookmark */; + E29E9ABA1301C3BA008C0D9C = E29E9ABA1301C3BA008C0D9C /* PBXBookmark */; + E29E9ABB1301C3BA008C0D9C = E29E9ABB1301C3BA008C0D9C /* PBXBookmark */; + E29E9ABC1301C3BA008C0D9C = E29E9ABC1301C3BA008C0D9C /* PBXBookmark */; + E29E9ABD1301C3BA008C0D9C = E29E9ABD1301C3BA008C0D9C /* PBXBookmark */; + E29E9ABE1301C3BA008C0D9C = E29E9ABE1301C3BA008C0D9C /* PBXBookmark */; + E29E9ABF1301C3BA008C0D9C = E29E9ABF1301C3BA008C0D9C /* PBXBookmark */; + E29E9AC01301C3BA008C0D9C = E29E9AC01301C3BA008C0D9C /* PBXBookmark */; + E29E9AC11301C3BA008C0D9C = E29E9AC11301C3BA008C0D9C /* PBXBookmark */; + E29E9AC21301C3BA008C0D9C = E29E9AC21301C3BA008C0D9C /* PBXBookmark */; + E29E9AC31301C3BA008C0D9C = E29E9AC31301C3BA008C0D9C /* PBXBookmark */; + E29E9AC41301C3BA008C0D9C = E29E9AC41301C3BA008C0D9C /* PBXBookmark */; + E29E9AC51301C3BA008C0D9C = E29E9AC51301C3BA008C0D9C /* PBXBookmark */; + E29E9AC61301C3BA008C0D9C = E29E9AC61301C3BA008C0D9C /* PBXBookmark */; + E29E9AC71301C3BA008C0D9C = E29E9AC71301C3BA008C0D9C /* PBXBookmark */; + E29E9AC81301C3BA008C0D9C = E29E9AC81301C3BA008C0D9C /* PBXTextBookmark */; + E29E9AC91301C3BA008C0D9C = E29E9AC91301C3BA008C0D9C /* PBXBookmark */; + E29E9BB91301DEF8008C0D9C = E29E9BB91301DEF8008C0D9C /* PBXBookmark */; + E2A20BA8130311F3001DDEC9 = E2A20BA8130311F3001DDEC9 /* PBXBookmark */; + E2A4B2961304448D00BAF88F = E2A4B2961304448D00BAF88F /* PBXBookmark */; + E2A4B2971304448D00BAF88F = E2A4B2971304448D00BAF88F /* PBXBookmark */; + E2A4B2981304448D00BAF88F = E2A4B2981304448D00BAF88F /* PBXBookmark */; + E2BEA36312E8DEDE00ABB777 = E2BEA36312E8DEDE00ABB777 /* PBXTextBookmark */; + E2BEA36612E8DEDE00ABB777 = E2BEA36612E8DEDE00ABB777 /* PBXTextBookmark */; + }; + sourceControlManager = E2F5F58712E38781008D07F6 /* Source Control */; + userBuildSettings = { + }; + }; + E20FD648130081760041DAE3 /* FBRequest.h */ = { + isa = PBXFileReference; + fileEncoding = 4; + lastKnownFileType = sourcecode.c.h; + name = FBRequest.h; + path = "/Users/mwaqas/My_Computer/Waqas_Drive/Freelance/01-Creative Bug/Love Meter/SourceCode/iValentine/Classes/Libraries/FacebookAgent/src/FBConnect/FBRequest.h"; + sourceTree = ""; + }; + E20FD651130081760041DAE3 /* FBRequest.m */ = { + isa = PBXFileReference; + fileEncoding = 4; + lastKnownFileType = sourcecode.c.objc; + name = FBRequest.m; + path = "/Users/mwaqas/My_Computer/Waqas_Drive/Freelance/01-Creative Bug/Love Meter/SourceCode/iValentine/Classes/Libraries/FacebookAgent/src/FBRequest.m"; + sourceTree = ""; + }; + E20FD682130083020041DAE3 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E20FD648130081760041DAE3 /* FBRequest.h */; + name = "FBRequest.h: 133"; + rLen = 39; + rLoc = 3579; + rType = 0; + vrLen = 1018; + vrLoc = 3031; + }; + E20FD6A11300862E0041DAE3 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E20FD6A21300862E0041DAE3 /* UIImage.h */; + name = "UIImage.h: 71"; + rLen = 0; + rLoc = 3355; + rType = 0; + vrLen = 2739; + vrLoc = 982; + }; + E20FD6A21300862E0041DAE3 /* UIImage.h */ = { + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = UIImage.h; + path = /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIImage.h; + sourceTree = ""; + }; + E20FD712130095AE0041DAE3 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E20FD651130081760041DAE3 /* FBRequest.m */; + name = "FBRequest.m: 330"; + rLen = 91; + rLoc = 10776; + rType = 0; + vrLen = 1070; + vrLoc = 8831; + }; + E2449E4712F9EDBA0052F5DF /* Needle.png */ = { + isa = PBXFileReference; + lastKnownFileType = image.png; + name = Needle.png; + path = "/Users/mwaqas/My_Computer/Waqas_Drive/freelance/01-Creative Bug/Love Meter/SourceCode/iValentine/Needle.png"; + sourceTree = ""; + }; + E2449E4A12F9EDEA0052F5DF /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = E2449E4712F9EDBA0052F5DF /* Needle.png */; + }; + E290042F13045034006B396B /* CreditsVC.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {877, 487}}"; + sepNavSelRange = "{424, 0}"; + sepNavVisRange = "{0, 429}"; + }; + }; + E290043013045034006B396B /* CreditsVC.m */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {1342, 1183}}"; + sepNavSelRange = "{192, 0}"; + sepNavVisRange = "{0, 1266}"; + }; + }; + E29004C013046587006B396B /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = E2DB859912FF1C54005B1F7D /* start_button.png */; + }; + E29004C113046587006B396B /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = E290043913045351006B396B /* Instructions_box.png */; + }; + E29004C413046587006B396B /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 1D3623240D0F684500981E51 /* iValentineAppDelegate.h */; + name = "iValentineAppDelegate.h: 21"; + rLen = 8; + rLoc = 491; + rType = 0; + vrLen = 819; + vrLoc = 0; + }; + E29004C513046587006B396B /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 1D3623250D0F684500981E51 /* iValentineAppDelegate.m */; + name = "iValentineAppDelegate.m: 30"; + rLen = 0; + rLoc = 748; + rType = 0; + vrLen = 1342; + vrLoc = 218; + }; + E290052F13047277006B396B /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E2A20B4D1302FEF1001DDEC9 /* FacebookAgent.h */; + name = "FacebookAgent.h: 253"; + rLen = 37; + rLoc = 5833; + rType = 0; + vrLen = 1299; + vrLoc = 5327; + }; + E290053113047277006B396B /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E2A20B4E1302FEF1001DDEC9 /* FacebookAgent.m */; + name = "FacebookAgent.m: 152"; + rLen = 36; + rLoc = 3564; + rType = 0; + vrLen = 1346; + vrLoc = 2961; + }; + E290055413048146006B396B /* LoveMeterVC.m:243 */ = { + isa = PBXFileBreakpoint; + actions = ( + ); + breakpointStyle = 0; + continueAfterActions = 0; + countType = 0; + delayBeforeContinue = 0; + fileReference = E2F5F59212E38961008D07F6 /* LoveMeterVC.m */; + functionName = "-dealloc"; + hitCount = 0; + ignoreCount = 0; + lineNumber = 243; + location = iValentine; + modificationTime = 319064463.891148; + originalNumberOfMultipleMatches = 1; + state = 1; + }; + E2900562130482A5006B396B /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E29E9A751301BC2E008C0D9C /* CardController.m */; + name = "CardController.m: 61"; + rLen = 0; + rLoc = 1824; + rType = 0; + vrLen = 940; + vrLoc = 910; + }; + E290059213048950006B396B /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E2B15A9B12EC08A200F9CE7B /* iValentineViewController.m */; + name = "iValentineViewController.m: 13"; + rLen = 0; + rLoc = 258; + rType = 0; + vrLen = 1341; + vrLoc = 1104; + }; + E290059313048950006B396B /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = E2DB859112FF1C54005B1F7D /* Heart_Frame_1.png */; + }; + E290059413048950006B396B /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 28D7ACF60DDB3853001CB0EB /* iValentineViewController.h */; + name = "iValentineViewController.h: 11"; + rLen = 0; + rLoc = 174; + rType = 0; + vrLen = 458; + vrLoc = 0; + }; + E29005BB13048A85006B396B /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E29005BC13048A85006B396B /* UIImageView.h */; + name = "UIImageView.h: 34"; + rLen = 98; + rLoc = 1548; + rType = 0; + vrLen = 1671; + vrLoc = 0; + }; + E29005BC13048A85006B396B /* UIImageView.h */ = { + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = UIImageView.h; + path = /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIImageView.h; + sourceTree = ""; + }; + E29005CA13048B2E006B396B /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E2F5F59212E38961008D07F6 /* LoveMeterVC.m */; + name = "LoveMeterVC.m: 35"; + rLen = 392; + rLoc = 1044; + rType = 0; + vrLen = 1213; + vrLoc = 734; + }; + E29005CB13048B2E006B396B /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E2F5F59112E38961008D07F6 /* LoveMeterVC.h */; + name = "LoveMeterVC.h: 18"; + rLen = 38; + rLoc = 410; + rType = 0; + vrLen = 1045; + vrLoc = 3; + }; + E29005D013048B99006B396B /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E29E9A741301BC2E008C0D9C /* CardController.h */; + name = "CardController.h: 13"; + rLen = 8; + rLoc = 237; + rType = 0; + vrLen = 474; + vrLoc = 0; + }; + E29005D213048B99006B396B /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E29E9B271301CCB7008C0D9C /* CardsCollection.m */; + name = "CardsCollection.m: 39"; + rLen = 393; + rLoc = 1195; + rType = 0; + vrLen = 1306; + vrLoc = 767; + }; + E29005D613048C01006B396B /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E2A20B351302FAD8001DDEC9 /* CustomCardController.m */; + name = "CustomCardController.m: 40"; + rLen = 394; + rLoc = 1248; + rType = 0; + vrLen = 1343; + vrLoc = 757; + }; + E29005E213048C8D006B396B /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E2A4B2831304403D00BAF88F /* InstructionVC.m */; + name = "InstructionVC.m: 51"; + rLen = 392; + rLoc = 1303; + rType = 0; + vrLen = 1178; + vrLoc = 631; + }; + E29005E613048CE3006B396B /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E290043013045034006B396B /* CreditsVC.m */; + name = "CreditsVC.m: 31"; + rLen = 23; + rLoc = 811; + rType = 0; + vrLen = 1202; + vrLoc = 546; + }; + E29005E713048CE3006B396B /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E290042F13045034006B396B /* CreditsVC.h */; + name = "CreditsVC.h: 20"; + rLen = 0; + rLoc = 424; + rType = 0; + vrLen = 398; + vrLoc = 0; + }; + E29005E813048CE3006B396B /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E2A4B2821304403D00BAF88F /* InstructionVC.h */; + name = "InstructionVC.h: 18"; + rLen = 0; + rLoc = 418; + rType = 0; + vrLen = 392; + vrLoc = 0; + }; + E29005E913048CE3006B396B /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E2A20B111302F9E3001DDEC9 /* CustomCardController.h */; + name = "CustomCardController.h: 36"; + rLen = 0; + rLoc = 1105; + rType = 0; + vrLen = 1190; + vrLoc = 3; + }; + E29005EA13048CE3006B396B /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E29E9A6D1301B858008C0D9C /* CardsCollection.h */; + name = "CardsCollection.h: 17"; + rLen = 0; + rLoc = 390; + rType = 0; + vrLen = 1031; + vrLoc = 0; + }; + E29005EC13049185006B396B /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E29E9A6D1301B858008C0D9C /* CardsCollection.h */; + name = "CardsCollection.h: 31"; + rLen = 0; + rLoc = 905; + rType = 0; + vrLen = 1050; + vrLoc = 0; + }; + E2933BDA130596960050C0C7 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E29E9A6D1301B858008C0D9C /* CardsCollection.h */; + name = "CardsCollection.h: 31"; + rLen = 0; + rLoc = 905; + rType = 0; + vrLen = 1055; + vrLoc = 0; + }; + E2933BDE130597890050C0C7 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E2B15A9B12EC08A200F9CE7B /* iValentineViewController.m */; + name = "iValentineViewController.m: 9"; + rLen = 24; + rLoc = 158; + rType = 0; + vrLen = 1099; + vrLoc = 0; + }; + E2933BDF130597890050C0C7 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E29E9B271301CCB7008C0D9C /* CardsCollection.m */; + name = "CardsCollection.m: 39"; + rLen = 393; + rLoc = 1195; + rType = 0; + vrLen = 1350; + vrLoc = 750; + }; + E2933BE0130597890050C0C7 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E29E9A6D1301B858008C0D9C /* CardsCollection.h */; + name = "CardsCollection.h: 31"; + rLen = 0; + rLoc = 905; + rType = 0; + vrLen = 1055; + vrLoc = 0; + }; + E2933BE1130597890050C0C7 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E2933BE2130597890050C0C7 /* UINavigationController.h */; + name = "UINavigationController.h: 82"; + rLen = 90; + rLoc = 3693; + rType = 0; + vrLen = 3627; + vrLoc = 2634; + }; + E2933BE2130597890050C0C7 /* UINavigationController.h */ = { + isa = PBXFileReference; + name = UINavigationController.h; + path = /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UINavigationController.h; + sourceTree = ""; + }; + E2933BE3130597890050C0C7 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E2F5F59212E38961008D07F6 /* LoveMeterVC.m */; + name = "LoveMeterVC.m: 216"; + rLen = 15; + rLoc = 7012; + rType = 0; + vrLen = 914; + vrLoc = 6358; + }; + E2933BE4130597890050C0C7 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E2F5F59212E38961008D07F6 /* LoveMeterVC.m */; + name = "LoveMeterVC.m: 216"; + rLen = 0; + rLoc = 6982; + rType = 0; + vrLen = 986; + vrLoc = 6292; + }; + E2933BE513059D060050C0C7 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E2F5F59212E38961008D07F6 /* LoveMeterVC.m */; + name = "LoveMeterVC.m: 220"; + rLen = 62; + rLoc = 7134; + rType = 0; + vrLen = 1106; + vrLoc = 6292; + }; + E2933BE613059DE20050C0C7 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E2F5F59212E38961008D07F6 /* LoveMeterVC.m */; + name = "LoveMeterVC.m: 224"; + rLen = 0; + rLoc = 7359; + rType = 0; + vrLen = 1229; + vrLoc = 6292; + }; + E2933BF513059F510050C0C7 /* XCBuildMessageTextBookmark */ = { + isa = PBXTextBookmark; + comments = "Expected ']' before ')' token"; + fRef = E2F5F59212E38961008D07F6 /* LoveMeterVC.m */; + fallbackIsa = XCBuildMessageTextBookmark; + rLen = 1; + rLoc = 221; + rType = 1; + }; + E2933BF613059F510050C0C7 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E2F5F59212E38961008D07F6 /* LoveMeterVC.m */; + name = "LoveMeterVC.m: 222"; + rLen = 0; + rLoc = 7128; + rType = 0; + vrLen = 1166; + vrLoc = 6523; + }; + E2933BFF13059F520050C0C7 /* XCBuildMessageTextBookmark */ = { + isa = PBXTextBookmark; + comments = "Expected ']' before ')' token"; + fRef = E2F5F59212E38961008D07F6 /* LoveMeterVC.m */; + fallbackIsa = XCBuildMessageTextBookmark; + rLen = 1; + rLoc = 221; + rType = 1; + }; + E2933C0013059F520050C0C7 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E2F5F59212E38961008D07F6 /* LoveMeterVC.m */; + name = "LoveMeterVC.m: 222"; + rLen = 0; + rLoc = 7199; + rType = 0; + vrLen = 480; + vrLoc = 7030; + }; + E2933C0113059F5A0050C0C7 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E2F5F59212E38961008D07F6 /* LoveMeterVC.m */; + name = "LoveMeterVC.m: 223"; + rLen = 0; + rLoc = 7221; + rType = 0; + vrLen = 1165; + vrLoc = 6523; + }; + E29E99D71301A789008C0D9C /* XY_Values_Cards_SelectionScreen.txt */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {877, 529}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRange = "{0, 132}"; + }; + }; + E29E9A201301AC07008C0D9C /* PlistBookmark */ = { + isa = PlistBookmark; + fRef = 8D1107310486CEB800E47090 /* iValentine-Info.plist */; + fallbackIsa = PBXBookmark; + isK = 0; + kPath = ( + UIStatusBarHidden, + ); + name = "/Users/mwaqas/My_Computer/Waqas_Drive/freelance/01-Creative Bug/Love Meter/SourceCode/iValentine/iValentine-Info.plist"; + rLen = 0; + rLoc = 9223372036854775808; + }; + E29E9A6D1301B858008C0D9C /* CardsCollection.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {877, 533}}"; + sepNavSelRange = "{905, 0}"; + sepNavVisRange = "{40, 1015}"; + }; + }; + E29E9A6E1301B858008C0D9C /* CardsCollection.m */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {1055, 2847}}"; + sepNavSelRange = "{6846, 0}"; + sepNavVisRange = "{5927, 1084}"; + }; + }; + E29E9A741301BC2E008C0D9C /* CardController.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {877, 489}}"; + sepNavSelRange = "{237, 8}"; + sepNavVisRange = "{0, 474}"; + }; + }; + E29E9A751301BC2E008C0D9C /* CardController.m */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {1139, 871}}"; + sepNavSelRange = "{1824, 0}"; + sepNavVisRange = "{910, 940}"; + }; + }; + E29E9AA01301C3BA008C0D9C /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = E29E99F51301AB61008C0D9C /* Default.png */; + }; + E29E9AA21301C3BA008C0D9C /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = E29E99C81301A789008C0D9C /* left_arrow.png */; + }; + E29E9AA31301C3BA008C0D9C /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = E29E99C91301A789008C0D9C /* right_arrow.png */; + }; + E29E9AA41301C3BA008C0D9C /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = E29E99CA1301A789008C0D9C /* Share_button.png */; + }; + E29E9AA51301C3BA008C0D9C /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E29E99D71301A789008C0D9C /* XY_Values_Cards_SelectionScreen.txt */; + name = "XY_Values_Cards_SelectionScreen.txt: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 132; + vrLoc = 0; + }; + E29E9AA61301C3BA008C0D9C /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = E20FD7A71300A3780041DAE3 /* abc2.jpg */; + }; + E29E9AA71301C3BA008C0D9C /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = E2DB858E12FF1C54005B1F7D /* background.png */; + }; + E29E9AA81301C3BA008C0D9C /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = E2DB858F12FF1C54005B1F7D /* credits_fullview.png */; + }; + E29E9AAA1301C3BA008C0D9C /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = E2DB859212FF1C54005B1F7D /* Heart_Frame_2.png */; + }; + E29E9AAB1301C3BA008C0D9C /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = E2DB859312FF1C54005B1F7D /* Heart_Frame_3.png */; + }; + E29E9AB11301C3BA008C0D9C /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E2DB859A12FF1C54005B1F7D /* XY Values.txt */; + name = "XY Values.txt: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 90; + vrLoc = 0; + }; + E29E9AB21301C3BA008C0D9C /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = E29E99F31301AB51008C0D9C /* LoveMeter_Mockup.png */; + }; + E29E9AB31301C3BA008C0D9C /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = E2C92C9512FB4CEB0071BB8D /* back_button.png */; + }; + E29E9AB41301C3BA008C0D9C /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = E2C92C9612FB4CEB0071BB8D /* Box1.png */; + }; + E29E9AB51301C3BA008C0D9C /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = E2C92C9712FB4CEB0071BB8D /* Box2.png */; + }; + E29E9AB61301C3BA008C0D9C /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = E2C92C9812FB4CEB0071BB8D /* Calculate_button.png */; + }; + E29E9AB71301C3BA008C0D9C /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = E2C92C9912FB4CEB0071BB8D /* Lovers_Name.png */; + }; + E29E9AB81301C3BA008C0D9C /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = E2C92C9A12FB4CEB0071BB8D /* Menu_button.png */; + }; + E29E9AB91301C3BA008C0D9C /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = E2C92C9B12FB4CEB0071BB8D /* Needle_Controler.png */; + }; + E29E9ABA1301C3BA008C0D9C /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = E2C92C9C12FB4CEB0071BB8D /* Next_button.png */; + }; + E29E9ABB1301C3BA008C0D9C /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = E2C92C9D12FB4CEB0071BB8D /* Reset_button.png */; + }; + E29E9ABC1301C3BA008C0D9C /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = E2C92C9E12FB4CEB0071BB8D /* top_bar.png */; + }; + E29E9ABD1301C3BA008C0D9C /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = E2C92C9F12FB4CEB0071BB8D /* Your_Name.png */; + }; + E29E9ABE1301C3BA008C0D9C /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = E2C92C4012FB20F40071BB8D /* LoveMeter_Background.png */; + }; + E29E9ABF1301C3BA008C0D9C /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = E2C92C4112FB20F40071BB8D /* Needle.png */; + }; + E29E9AC01301C3BA008C0D9C /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = E2C92C4212FB20F40071BB8D /* Needle_double_size.png */; + }; + E29E9AC11301C3BA008C0D9C /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = E2DB855612FF1685005B1F7D /* Credtis_Button_Normal.png */; + }; + E29E9AC21301C3BA008C0D9C /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = E2DB855712FF1685005B1F7D /* Credtis_Button_Selected.png */; + }; + E29E9AC31301C3BA008C0D9C /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = E2DB855812FF1685005B1F7D /* Instructions_Button_Normal.png */; + }; + E29E9AC41301C3BA008C0D9C /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = E2DB855912FF1685005B1F7D /* Instructions_Button_Selected.png */; + }; + E29E9AC51301C3BA008C0D9C /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = E2DB855A12FF1685005B1F7D /* Start_Button_Normal.png */; + }; + E29E9AC61301C3BA008C0D9C /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = E2DB855B12FF1685005B1F7D /* Start_Button_Selected.png */; + }; + E29E9AC71301C3BA008C0D9C /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = E2DB855D12FF1685005B1F7D /* Full_View.png */; + }; + E29E9AC81301C3BA008C0D9C /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E2DB855F12FF1685005B1F7D /* XY Values.txt */; + name = "XY Values.txt: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 191; + vrLoc = 0; + }; + E29E9AC91301C3BA008C0D9C /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = E2DB855E12FF1685005B1F7D /* Menu_BG.png */; + }; + E29E9B271301CCB7008C0D9C /* CardsCollection.m */ = { + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.objc; + name = CardsCollection.m; + path = "/Users/mwaqas/My_Computer/Waqas_Drive/Freelance/01-Creative Bug/Love Meter/SourceCode/iValentine/Classes/CardsCollection.m"; + sourceTree = ""; + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {1342, 3328}}"; + sepNavSelRange = "{263, 0}"; + sepNavVisRange = "{0, 1194}"; + }; + }; + E29E9B361301D095008C0D9C /* CustomCardController.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {877, 526}}"; + sepNavSelRange = "{709, 0}"; + sepNavVisRange = "{0, 709}"; + }; + }; + E29E9B371301D095008C0D9C /* CustomCardController.m */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {1636, 2873}}"; + sepNavSelRange = "{2775, 12}"; + sepNavVisRange = "{2012, 1243}"; + }; + }; + E29E9BB91301DEF8008C0D9C /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = E29E99BB1301A788008C0D9C /* Full_vuew.png */; + }; + E2A20B111302F9E3001DDEC9 /* CustomCardController.h */ = { + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = CustomCardController.h; + path = "/Users/mwaqas/My_Computer/Waqas_Drive/Freelance/01-Creative Bug/Love Meter/SourceCode/iValentine/Classes/CustomCardController.h"; + sourceTree = ""; + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {877, 533}}"; + sepNavSelRange = "{1105, 0}"; + sepNavVisRange = "{45, 1153}"; + }; + }; + E2A20B351302FAD8001DDEC9 /* CustomCardController.m */ = { + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.objc; + name = CustomCardController.m; + path = "/Users/mwaqas/My_Computer/Waqas_Drive/Freelance/01-Creative Bug/Love Meter/SourceCode/iValentine/Classes/CustomCardController.m"; + sourceTree = ""; + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {1076, 3536}}"; + sepNavSelRange = "{8560, 0}"; + sepNavVisRange = "{7432, 1134}"; + }; + }; + E2A20B4D1302FEF1001DDEC9 /* FacebookAgent.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {957, 3601}}"; + sepNavSelRange = "{5870, 0}"; + sepNavVisRange = "{5766, 707}"; + }; + }; + E2A20B4E1302FEF1001DDEC9 /* FacebookAgent.m */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {1587, 6877}}"; + sepNavSelRange = "{3564, 36}"; + sepNavVisRange = "{2961, 1346}"; + }; + }; + E2A20BA8130311F3001DDEC9 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = E29E99C01301A788008C0D9C /* L2.png */; + }; + E2A4B2821304403D00BAF88F /* InstructionVC.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {877, 487}}"; + sepNavSelRange = "{418, 0}"; + sepNavVisRange = "{0, 424}"; + }; + }; + E2A4B2831304403D00BAF88F /* InstructionVC.m */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {877, 1261}}"; + sepNavSelRange = "{210, 0}"; + sepNavVisRange = "{0, 960}"; + }; + }; + E2A4B2961304448D00BAF88F /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = E2DB859812FF1C54005B1F7D /* instructions_text.png */; + }; + E2A4B2971304448D00BAF88F /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = E2DB859712FF1C54005B1F7D /* Instructions_fullview.png */; + }; + E2A4B2981304448D00BAF88F /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = E2A4B28F1304444600BAF88F /* Inst_background.png */; + }; + E2B15A9B12EC08A200F9CE7B /* iValentineViewController.m */ = { + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.objc; + name = iValentineViewController.m; + path = "/Users/mwaqas/My_Computer/Waqas_Drive/Freelance/01-Creative Bug/Love Meter/SourceCode/iValentine/Classes/iValentineViewController.m"; + sourceTree = ""; + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {877, 1235}}"; + sepNavSelRange = "{158, 24}"; + sepNavVisRange = "{0, 1099}"; + }; + }; + E2BEA36312E8DEDE00ABB777 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E2BEA36412E8DEDE00ABB777 /* UITextField.h */; + name = "UITextField.h: 181"; + rLen = 445; + rLoc = 7608; + rType = 0; + vrLen = 1812; + vrLoc = 7024; + }; + E2BEA36412E8DEDE00ABB777 /* UITextField.h */ = { + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = UITextField.h; + path = /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UITextField.h; + sourceTree = ""; + }; + E2BEA36612E8DEDE00ABB777 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E2BEA36712E8DEDE00ABB777 /* NSString.h */; + name = "NSString.h: 124"; + rLen = 13; + rLoc = 6835; + rType = 0; + vrLen = 2581; + vrLoc = 4856; + }; + E2BEA36712E8DEDE00ABB777 /* NSString.h */ = { + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = NSString.h; + path = /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSString.h; + sourceTree = ""; + }; + E2C92C4012FB20F40071BB8D /* LoveMeter_Background.png */ = { + uiCtxt = { + sepNavWindowFrame = "{{15, 182}, {1172, 591}}"; + }; + }; + E2C92C4212FB20F40071BB8D /* Needle_double_size.png */ = { + uiCtxt = { + sepNavWindowFrame = "{{15, 182}, {1172, 591}}"; + }; + }; + E2DB855F12FF1685005B1F7D /* XY Values.txt */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {877, 529}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRange = "{0, 191}"; + }; + }; + E2DB859A12FF1C54005B1F7D /* XY Values.txt */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {877, 529}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRange = "{0, 90}"; + }; + }; + E2F5F57A12E3876A008D07F6 /* iValentine */ = { + isa = PBXExecutable; + activeArgIndices = ( + ); + argumentStrings = ( + ); + autoAttachOnCrash = 1; + breakpointsEnabled = 0; + configStateDict = { + }; + customDataFormattersEnabled = 1; + dataTipCustomDataFormattersEnabled = 1; + dataTipShowTypeColumn = 1; + dataTipSortType = 0; + debuggerPlugin = GDBDebugging; + disassemblyDisplayState = 0; + dylibVariantSuffix = ""; + enableDebugStr = 1; + environmentEntries = ( + ); + executableSystemSymbolLevel = 0; + executableUserSymbolLevel = 0; + libgmallocEnabled = 0; + name = iValentine; + savedGlobals = { + }; + showTypeColumn = 0; + sourceDirectories = ( + ); + variableFormatDictionary = { + }; + }; + E2F5F58712E38781008D07F6 /* Source Control */ = { + isa = PBXSourceControlManager; + fallbackIsa = XCSourceControlManager; + isSCMEnabled = 0; + scmConfiguration = { + repositoryNamesForRoots = { + "" = ""; + }; + }; + }; + E2F5F58812E38781008D07F6 /* Code sense */ = { + isa = PBXCodeSenseManager; + indexTemplatePath = ""; + }; + E2F5F59112E38961008D07F6 /* LoveMeterVC.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {877, 494}}"; + sepNavSelRange = "{410, 38}"; + sepNavVisRange = "{3, 1045}"; + }; + }; + E2F5F59212E38961008D07F6 /* LoveMeterVC.m */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {1209, 3081}}"; + sepNavSelRange = "{6884, 480}"; + sepNavVisRange = "{6523, 1165}"; + }; + }; +} diff --git a/iValentine.xcodeproj/project.pbxproj b/iValentine.xcodeproj/project.pbxproj new file mode 100755 index 0000000..f795db1 --- /dev/null +++ b/iValentine.xcodeproj/project.pbxproj @@ -0,0 +1,811 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 45; + objects = { + +/* Begin PBXBuildFile section */ + 1D3623260D0F684500981E51 /* iValentineAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* iValentineAppDelegate.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 */; }; + 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; }; + 2899E5220DE3E06400AC0155 /* iValentineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2899E5210DE3E06400AC0155 /* iValentineViewController.xib */; }; + 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD733E0D9D9553002E5188 /* MainWindow.xib */; }; + 28D7ACF80DDB3853001CB0EB /* iValentineViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28D7ACF70DDB3853001CB0EB /* iValentineViewController.m */; }; + 56904D6E130660D900477BA5 /* Full_vuew.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D23130660D900477BA5 /* Full_vuew.png */; }; + 56904D6F130660D900477BA5 /* L1.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D25130660D900477BA5 /* L1.png */; }; + 56904D70130660D900477BA5 /* L10.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D26130660D900477BA5 /* L10.png */; }; + 56904D71130660D900477BA5 /* L11.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D27130660D900477BA5 /* L11.png */; }; + 56904D72130660D900477BA5 /* L2.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D28130660D900477BA5 /* L2.png */; }; + 56904D73130660D900477BA5 /* L3.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D29130660D900477BA5 /* L3.png */; }; + 56904D74130660D900477BA5 /* L4.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D2A130660D900477BA5 /* L4.png */; }; + 56904D75130660D900477BA5 /* L5.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D2B130660D900477BA5 /* L5.png */; }; + 56904D76130660D900477BA5 /* L6.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D2C130660D900477BA5 /* L6.png */; }; + 56904D77130660D900477BA5 /* L7.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D2D130660D900477BA5 /* L7.png */; }; + 56904D78130660D900477BA5 /* L8.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D2E130660D900477BA5 /* L8.png */; }; + 56904D79130660D900477BA5 /* L9.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D2F130660D900477BA5 /* L9.png */; }; + 56904D7A130660D900477BA5 /* left_arrow.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D30130660D900477BA5 /* left_arrow.png */; }; + 56904D7B130660D900477BA5 /* right_arrow.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D31130660D900477BA5 /* right_arrow.png */; }; + 56904D7C130660D900477BA5 /* Share_button.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D32130660D900477BA5 /* Share_button.png */; }; + 56904D7D130660D900477BA5 /* S1.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D34130660D900477BA5 /* S1.png */; }; + 56904D7E130660D900477BA5 /* S10.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D35130660D900477BA5 /* S10.png */; }; + 56904D7F130660D900477BA5 /* S11.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D36130660D900477BA5 /* S11.png */; }; + 56904D80130660D900477BA5 /* S2.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D37130660D900477BA5 /* S2.png */; }; + 56904D81130660D900477BA5 /* S3.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D38130660D900477BA5 /* S3.png */; }; + 56904D82130660D900477BA5 /* S4.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D39130660D900477BA5 /* S4.png */; }; + 56904D83130660D900477BA5 /* S5.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D3A130660D900477BA5 /* S5.png */; }; + 56904D84130660D900477BA5 /* S6.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D3B130660D900477BA5 /* S6.png */; }; + 56904D85130660D900477BA5 /* S7.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D3C130660D900477BA5 /* S7.png */; }; + 56904D86130660D900477BA5 /* S8.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D3D130660D900477BA5 /* S8.png */; }; + 56904D87130660D900477BA5 /* S9.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D3E130660D900477BA5 /* S9.png */; }; + 56904D89130660D900477BA5 /* background.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D41130660D900477BA5 /* background.png */; }; + 56904D8A130660D900477BA5 /* credits_fullview.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D42130660D900477BA5 /* credits_fullview.png */; }; + 56904D8B130660D900477BA5 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D43130660D900477BA5 /* Default.png */; }; + 56904D8C130660D900477BA5 /* Heart_Frame_1.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D45130660D900477BA5 /* Heart_Frame_1.png */; }; + 56904D8D130660D900477BA5 /* Heart_Frame_2.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D46130660D900477BA5 /* Heart_Frame_2.png */; }; + 56904D8E130660D900477BA5 /* Heart_Frame_3.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D47130660D900477BA5 /* Heart_Frame_3.png */; }; + 56904D90130660D900477BA5 /* Inst_background.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D4A130660D900477BA5 /* Inst_background.png */; }; + 56904D91130660D900477BA5 /* Instructions_box.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D4B130660D900477BA5 /* Instructions_box.png */; }; + 56904D92130660D900477BA5 /* Instructions_fullview.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D4C130660D900477BA5 /* Instructions_fullview.png */; }; + 56904D93130660D900477BA5 /* instructions_text.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D4D130660D900477BA5 /* instructions_text.png */; }; + 56904D94130660D900477BA5 /* start_button.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D4E130660D900477BA5 /* start_button.png */; }; + 56904D96130660D900477BA5 /* back_button.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D51130660D900477BA5 /* back_button.png */; }; + 56904D97130660D900477BA5 /* Box1.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D52130660D900477BA5 /* Box1.png */; }; + 56904D98130660D900477BA5 /* Box2.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D53130660D900477BA5 /* Box2.png */; }; + 56904D99130660D900477BA5 /* Calculate_button.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D54130660D900477BA5 /* Calculate_button.png */; }; + 56904D9A130660D900477BA5 /* LoveMeter_Background.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D55130660D900477BA5 /* LoveMeter_Background.png */; }; + 56904D9B130660D900477BA5 /* LoveMeter_Mockup.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D56130660D900477BA5 /* LoveMeter_Mockup.png */; }; + 56904D9C130660D900477BA5 /* Lovers_Name.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D57130660D900477BA5 /* Lovers_Name.png */; }; + 56904D9D130660D900477BA5 /* Menu_button.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D58130660D900477BA5 /* Menu_button.png */; }; + 56904D9E130660D900477BA5 /* Needle.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D59130660D900477BA5 /* Needle.png */; }; + 56904D9F130660D900477BA5 /* Needle_Controler.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D5A130660D900477BA5 /* Needle_Controler.png */; }; + 56904DA0130660D900477BA5 /* Needle_double_size.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D5B130660D900477BA5 /* Needle_double_size.png */; }; + 56904DA1130660D900477BA5 /* Next_button.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D5C130660D900477BA5 /* Next_button.png */; }; + 56904DA2130660D900477BA5 /* Reset_button.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D5D130660D900477BA5 /* Reset_button.png */; }; + 56904DA3130660D900477BA5 /* top_bar.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D5E130660D900477BA5 /* top_bar.png */; }; + 56904DA5130660D900477BA5 /* Your_Name.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D60130660D900477BA5 /* Your_Name.png */; }; + 56904DA6130660D900477BA5 /* Credtis_Button_Normal.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D63130660D900477BA5 /* Credtis_Button_Normal.png */; }; + 56904DA7130660D900477BA5 /* Credtis_Button_Selected.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D64130660D900477BA5 /* Credtis_Button_Selected.png */; }; + 56904DA8130660D900477BA5 /* Instructions_Button_Normal.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D65130660D900477BA5 /* Instructions_Button_Normal.png */; }; + 56904DA9130660D900477BA5 /* Instructions_Button_Selected.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D66130660D900477BA5 /* Instructions_Button_Selected.png */; }; + 56904DAA130660D900477BA5 /* Start_Button_Normal.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D67130660D900477BA5 /* Start_Button_Normal.png */; }; + 56904DAB130660D900477BA5 /* Start_Button_Selected.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D68130660D900477BA5 /* Start_Button_Selected.png */; }; + 56904DAC130660D900477BA5 /* Full_View.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D6A130660D900477BA5 /* Full_View.png */; }; + 56904DAD130660D900477BA5 /* Menu_BG.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904D6B130660D900477BA5 /* Menu_BG.png */; }; + 56904DC91306613600477BA5 /* FacebookAgent.m in Sources */ = {isa = PBXBuildFile; fileRef = 56904DB11306613600477BA5 /* FacebookAgent.m */; }; + 56904DCA1306613600477BA5 /* FBConnectGlobal.m in Sources */ = {isa = PBXBuildFile; fileRef = 56904DBE1306613600477BA5 /* FBConnectGlobal.m */; }; + 56904DCB1306613600477BA5 /* FBDialog.m in Sources */ = {isa = PBXBuildFile; fileRef = 56904DBF1306613600477BA5 /* FBDialog.m */; }; + 56904DCC1306613600477BA5 /* FBFeedDialog.m in Sources */ = {isa = PBXBuildFile; fileRef = 56904DC01306613600477BA5 /* FBFeedDialog.m */; }; + 56904DCD1306613600477BA5 /* FBLoginButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 56904DC11306613600477BA5 /* FBLoginButton.m */; }; + 56904DCE1306613600477BA5 /* FBLoginDialog.m in Sources */ = {isa = PBXBuildFile; fileRef = 56904DC21306613600477BA5 /* FBLoginDialog.m */; }; + 56904DCF1306613600477BA5 /* FBPermissionDialog.m in Sources */ = {isa = PBXBuildFile; fileRef = 56904DC31306613600477BA5 /* FBPermissionDialog.m */; }; + 56904DD01306613600477BA5 /* FBRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56904DC41306613600477BA5 /* FBRequest.m */; }; + 56904DD11306613600477BA5 /* FBSession.m in Sources */ = {isa = PBXBuildFile; fileRef = 56904DC51306613600477BA5 /* FBSession.m */; }; + 56904DD21306613600477BA5 /* FBStreamDialog.m in Sources */ = {isa = PBXBuildFile; fileRef = 56904DC61306613600477BA5 /* FBStreamDialog.m */; }; + 56904DD31306613600477BA5 /* FBXMLHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 56904DC81306613600477BA5 /* FBXMLHandler.m */; }; + 56904EE21306936A00477BA5 /* Heart_Frame_4.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904EE01306936A00477BA5 /* Heart_Frame_4.png */; }; + 56904EE31306936A00477BA5 /* Heart_Frame_5.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904EE11306936A00477BA5 /* Heart_Frame_5.png */; }; + 56904F2313069FFF00477BA5 /* select_card_text.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904F2213069FFF00477BA5 /* select_card_text.png */; }; + 56904F3C1306A91100477BA5 /* 57_taplove.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904F3A1306A91100477BA5 /* 57_taplove.png */; }; + 56904F3D1306A91100477BA5 /* 512_taplove.png in Resources */ = {isa = PBXBuildFile; fileRef = 56904F3B1306A91100477BA5 /* 512_taplove.png */; }; + 569050251306C45F00477BA5 /* Entitlements.plist in Resources */ = {isa = PBXBuildFile; fileRef = 569050241306C45F00477BA5 /* Entitlements.plist */; }; + E290043213045034006B396B /* CreditsVC.m in Sources */ = {isa = PBXBuildFile; fileRef = E290043013045034006B396B /* CreditsVC.m */; }; + E290043313045034006B396B /* CreditsVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = E290043113045034006B396B /* CreditsVC.xib */; }; + E290049C130464D8006B396B /* MessageUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E290049B130464D8006B396B /* MessageUI.framework */; }; + E29E9A701301B858008C0D9C /* CardsCollection.m in Sources */ = {isa = PBXBuildFile; fileRef = E29E9A6E1301B858008C0D9C /* CardsCollection.m */; }; + E29E9A711301B858008C0D9C /* CardsCollection.xib in Resources */ = {isa = PBXBuildFile; fileRef = E29E9A6F1301B858008C0D9C /* CardsCollection.xib */; }; + E29E9A771301BC2E008C0D9C /* CardController.m in Sources */ = {isa = PBXBuildFile; fileRef = E29E9A751301BC2E008C0D9C /* CardController.m */; }; + E29E9A781301BC2E008C0D9C /* CardController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E29E9A761301BC2E008C0D9C /* CardController.xib */; }; + E29E9B391301D095008C0D9C /* CustomCardController.m in Sources */ = {isa = PBXBuildFile; fileRef = E29E9B371301D095008C0D9C /* CustomCardController.m */; }; + E2A20AD71302F40F001DDEC9 /* CustomCardController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E2A20AD61302F40F001DDEC9 /* CustomCardController.xib */; }; + E2A4B2851304403D00BAF88F /* InstructionVC.m in Sources */ = {isa = PBXBuildFile; fileRef = E2A4B2831304403D00BAF88F /* InstructionVC.m */; }; + E2A4B28E130442A000BAF88F /* InstructionVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = E2A4B28D130442A000BAF88F /* InstructionVC.xib */; }; + E2F5F59412E38961008D07F6 /* LoveMeterVC.m in Sources */ = {isa = PBXBuildFile; fileRef = E2F5F59212E38961008D07F6 /* LoveMeterVC.m */; }; + E2F5F59512E38961008D07F6 /* LoveMeterVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = E2F5F59312E38961008D07F6 /* LoveMeterVC.xib */; }; +/* 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 /* iValentineAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iValentineAppDelegate.h; sourceTree = ""; }; + 1D3623250D0F684500981E51 /* iValentineAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = iValentineAppDelegate.m; sourceTree = ""; }; + 1D6058910D05DD3D006BFB54 /* Tap Love.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Tap Love.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + 288765A40DF7441C002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + 2899E5210DE3E06400AC0155 /* iValentineViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = iValentineViewController.xib; sourceTree = ""; }; + 28AD733E0D9D9553002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = ""; }; + 28D7ACF60DDB3853001CB0EB /* iValentineViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iValentineViewController.h; sourceTree = ""; }; + 28D7ACF70DDB3853001CB0EB /* iValentineViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = iValentineViewController.m; sourceTree = ""; }; + 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 32CA4F630368D1EE00C91783 /* iValentine_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iValentine_Prefix.pch; sourceTree = ""; }; + 56904D23130660D900477BA5 /* Full_vuew.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Full_vuew.png; sourceTree = ""; }; + 56904D25130660D900477BA5 /* L1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = L1.png; sourceTree = ""; }; + 56904D26130660D900477BA5 /* L10.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = L10.png; sourceTree = ""; }; + 56904D27130660D900477BA5 /* L11.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = L11.png; sourceTree = ""; }; + 56904D28130660D900477BA5 /* L2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = L2.png; sourceTree = ""; }; + 56904D29130660D900477BA5 /* L3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = L3.png; sourceTree = ""; }; + 56904D2A130660D900477BA5 /* L4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = L4.png; sourceTree = ""; }; + 56904D2B130660D900477BA5 /* L5.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = L5.png; sourceTree = ""; }; + 56904D2C130660D900477BA5 /* L6.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = L6.png; sourceTree = ""; }; + 56904D2D130660D900477BA5 /* L7.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = L7.png; sourceTree = ""; }; + 56904D2E130660D900477BA5 /* L8.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = L8.png; sourceTree = ""; }; + 56904D2F130660D900477BA5 /* L9.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = L9.png; sourceTree = ""; }; + 56904D30130660D900477BA5 /* left_arrow.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = left_arrow.png; sourceTree = ""; }; + 56904D31130660D900477BA5 /* right_arrow.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = right_arrow.png; sourceTree = ""; }; + 56904D32130660D900477BA5 /* Share_button.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Share_button.png; sourceTree = ""; }; + 56904D34130660D900477BA5 /* S1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = S1.png; sourceTree = ""; }; + 56904D35130660D900477BA5 /* S10.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = S10.png; sourceTree = ""; }; + 56904D36130660D900477BA5 /* S11.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = S11.png; sourceTree = ""; }; + 56904D37130660D900477BA5 /* S2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = S2.png; sourceTree = ""; }; + 56904D38130660D900477BA5 /* S3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = S3.png; sourceTree = ""; }; + 56904D39130660D900477BA5 /* S4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = S4.png; sourceTree = ""; }; + 56904D3A130660D900477BA5 /* S5.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = S5.png; sourceTree = ""; }; + 56904D3B130660D900477BA5 /* S6.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = S6.png; sourceTree = ""; }; + 56904D3C130660D900477BA5 /* S7.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = S7.png; sourceTree = ""; }; + 56904D3D130660D900477BA5 /* S8.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = S8.png; sourceTree = ""; }; + 56904D3E130660D900477BA5 /* S9.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = S9.png; sourceTree = ""; }; + 56904D41130660D900477BA5 /* background.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = background.png; sourceTree = ""; }; + 56904D42130660D900477BA5 /* credits_fullview.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = credits_fullview.png; sourceTree = ""; }; + 56904D43130660D900477BA5 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default.png; path = Images/Default.png; sourceTree = ""; }; + 56904D45130660D900477BA5 /* Heart_Frame_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Heart_Frame_1.png; sourceTree = ""; }; + 56904D46130660D900477BA5 /* Heart_Frame_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Heart_Frame_2.png; sourceTree = ""; }; + 56904D47130660D900477BA5 /* Heart_Frame_3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Heart_Frame_3.png; sourceTree = ""; }; + 56904D4A130660D900477BA5 /* Inst_background.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Inst_background.png; sourceTree = ""; }; + 56904D4B130660D900477BA5 /* Instructions_box.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Instructions_box.png; sourceTree = ""; }; + 56904D4C130660D900477BA5 /* Instructions_fullview.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Instructions_fullview.png; sourceTree = ""; }; + 56904D4D130660D900477BA5 /* instructions_text.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = instructions_text.png; sourceTree = ""; }; + 56904D4E130660D900477BA5 /* start_button.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = start_button.png; sourceTree = ""; }; + 56904D51130660D900477BA5 /* back_button.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = back_button.png; sourceTree = ""; }; + 56904D52130660D900477BA5 /* Box1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Box1.png; sourceTree = ""; }; + 56904D53130660D900477BA5 /* Box2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Box2.png; sourceTree = ""; }; + 56904D54130660D900477BA5 /* Calculate_button.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Calculate_button.png; sourceTree = ""; }; + 56904D55130660D900477BA5 /* LoveMeter_Background.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = LoveMeter_Background.png; sourceTree = ""; }; + 56904D56130660D900477BA5 /* LoveMeter_Mockup.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = LoveMeter_Mockup.png; sourceTree = ""; }; + 56904D57130660D900477BA5 /* Lovers_Name.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Lovers_Name.png; sourceTree = ""; }; + 56904D58130660D900477BA5 /* Menu_button.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Menu_button.png; sourceTree = ""; }; + 56904D59130660D900477BA5 /* Needle.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Needle.png; sourceTree = ""; }; + 56904D5A130660D900477BA5 /* Needle_Controler.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Needle_Controler.png; sourceTree = ""; }; + 56904D5B130660D900477BA5 /* Needle_double_size.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Needle_double_size.png; sourceTree = ""; }; + 56904D5C130660D900477BA5 /* Next_button.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Next_button.png; sourceTree = ""; }; + 56904D5D130660D900477BA5 /* Reset_button.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Reset_button.png; sourceTree = ""; }; + 56904D5E130660D900477BA5 /* top_bar.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = top_bar.png; sourceTree = ""; }; + 56904D60130660D900477BA5 /* Your_Name.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Your_Name.png; sourceTree = ""; }; + 56904D63130660D900477BA5 /* Credtis_Button_Normal.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Credtis_Button_Normal.png; sourceTree = ""; }; + 56904D64130660D900477BA5 /* Credtis_Button_Selected.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Credtis_Button_Selected.png; sourceTree = ""; }; + 56904D65130660D900477BA5 /* Instructions_Button_Normal.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Instructions_Button_Normal.png; sourceTree = ""; }; + 56904D66130660D900477BA5 /* Instructions_Button_Selected.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Instructions_Button_Selected.png; sourceTree = ""; }; + 56904D67130660D900477BA5 /* Start_Button_Normal.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Start_Button_Normal.png; sourceTree = ""; }; + 56904D68130660D900477BA5 /* Start_Button_Selected.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Start_Button_Selected.png; sourceTree = ""; }; + 56904D6A130660D900477BA5 /* Full_View.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Full_View.png; sourceTree = ""; }; + 56904D6B130660D900477BA5 /* Menu_BG.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Menu_BG.png; sourceTree = ""; }; + 56904DB01306613600477BA5 /* FacebookAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FacebookAgent.h; sourceTree = ""; }; + 56904DB11306613600477BA5 /* FacebookAgent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FacebookAgent.m; sourceTree = ""; }; + 56904DB41306613600477BA5 /* FBConnect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBConnect.h; sourceTree = ""; }; + 56904DB51306613600477BA5 /* FBConnectGlobal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBConnectGlobal.h; sourceTree = ""; }; + 56904DB61306613600477BA5 /* FBDialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBDialog.h; sourceTree = ""; }; + 56904DB71306613600477BA5 /* FBFeedDialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBFeedDialog.h; sourceTree = ""; }; + 56904DB81306613600477BA5 /* FBLoginButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBLoginButton.h; sourceTree = ""; }; + 56904DB91306613600477BA5 /* FBLoginDialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBLoginDialog.h; sourceTree = ""; }; + 56904DBA1306613600477BA5 /* FBPermissionDialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBPermissionDialog.h; sourceTree = ""; }; + 56904DBB1306613600477BA5 /* FBRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBRequest.h; sourceTree = ""; }; + 56904DBC1306613600477BA5 /* FBSession.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBSession.h; sourceTree = ""; }; + 56904DBD1306613600477BA5 /* FBStreamDialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBStreamDialog.h; sourceTree = ""; }; + 56904DBE1306613600477BA5 /* FBConnectGlobal.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FBConnectGlobal.m; sourceTree = ""; }; + 56904DBF1306613600477BA5 /* FBDialog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FBDialog.m; sourceTree = ""; }; + 56904DC01306613600477BA5 /* FBFeedDialog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FBFeedDialog.m; sourceTree = ""; }; + 56904DC11306613600477BA5 /* FBLoginButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FBLoginButton.m; sourceTree = ""; }; + 56904DC21306613600477BA5 /* FBLoginDialog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FBLoginDialog.m; sourceTree = ""; }; + 56904DC31306613600477BA5 /* FBPermissionDialog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FBPermissionDialog.m; sourceTree = ""; }; + 56904DC41306613600477BA5 /* FBRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FBRequest.m; sourceTree = ""; }; + 56904DC51306613600477BA5 /* FBSession.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FBSession.m; sourceTree = ""; }; + 56904DC61306613600477BA5 /* FBStreamDialog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FBStreamDialog.m; sourceTree = ""; }; + 56904DC71306613600477BA5 /* FBXMLHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBXMLHandler.h; sourceTree = ""; }; + 56904DC81306613600477BA5 /* FBXMLHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FBXMLHandler.m; sourceTree = ""; }; + 56904EE01306936A00477BA5 /* Heart_Frame_4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Heart_Frame_4.png; sourceTree = ""; }; + 56904EE11306936A00477BA5 /* Heart_Frame_5.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Heart_Frame_5.png; sourceTree = ""; }; + 56904F2213069FFF00477BA5 /* select_card_text.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = select_card_text.png; sourceTree = ""; }; + 56904F3A1306A91100477BA5 /* 57_taplove.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 57_taplove.png; sourceTree = ""; }; + 56904F3B1306A91100477BA5 /* 512_taplove.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 512_taplove.png; sourceTree = ""; }; + 569050241306C45F00477BA5 /* Entitlements.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Entitlements.plist; sourceTree = ""; }; + 8D1107310486CEB800E47090 /* iValentine-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "iValentine-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; + E290042F13045034006B396B /* CreditsVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CreditsVC.h; sourceTree = ""; }; + E290043013045034006B396B /* CreditsVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CreditsVC.m; sourceTree = ""; }; + E290043113045034006B396B /* CreditsVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CreditsVC.xib; sourceTree = ""; }; + E290049B130464D8006B396B /* MessageUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MessageUI.framework; path = System/Library/Frameworks/MessageUI.framework; sourceTree = SDKROOT; }; + E2933C091305A12D0050C0C7 /* iValentineConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iValentineConstants.h; sourceTree = ""; }; + E29E9A6D1301B858008C0D9C /* CardsCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CardsCollection.h; sourceTree = ""; }; + E29E9A6E1301B858008C0D9C /* CardsCollection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CardsCollection.m; sourceTree = ""; }; + E29E9A6F1301B858008C0D9C /* CardsCollection.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CardsCollection.xib; sourceTree = ""; }; + E29E9A741301BC2E008C0D9C /* CardController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CardController.h; sourceTree = ""; }; + E29E9A751301BC2E008C0D9C /* CardController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CardController.m; sourceTree = ""; }; + E29E9A761301BC2E008C0D9C /* CardController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CardController.xib; sourceTree = ""; }; + E29E9B361301D095008C0D9C /* CustomCardController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomCardController.h; sourceTree = ""; }; + E29E9B371301D095008C0D9C /* CustomCardController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomCardController.m; sourceTree = ""; }; + E2A20AD61302F40F001DDEC9 /* CustomCardController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CustomCardController.xib; sourceTree = ""; }; + E2A4B2821304403D00BAF88F /* InstructionVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InstructionVC.h; sourceTree = ""; }; + E2A4B2831304403D00BAF88F /* InstructionVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InstructionVC.m; sourceTree = ""; }; + E2A4B28D130442A000BAF88F /* InstructionVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = InstructionVC.xib; sourceTree = ""; }; + E2F5F59112E38961008D07F6 /* LoveMeterVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoveMeterVC.h; sourceTree = ""; }; + E2F5F59212E38961008D07F6 /* LoveMeterVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LoveMeterVC.m; sourceTree = ""; }; + E2F5F59312E38961008D07F6 /* LoveMeterVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoveMeterVC.xib; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, + 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, + 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */, + E290049C130464D8006B396B /* MessageUI.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 080E96DDFE201D6D7F000001 /* Classes */ = { + isa = PBXGroup; + children = ( + 56904DAF1306613600477BA5 /* FacebookAgent */, + E2F5F59012E38946008D07F6 /* LMViewController */, + 1D3623240D0F684500981E51 /* iValentineAppDelegate.h */, + 1D3623250D0F684500981E51 /* iValentineAppDelegate.m */, + 28D7ACF60DDB3853001CB0EB /* iValentineViewController.h */, + 28D7ACF70DDB3853001CB0EB /* iValentineViewController.m */, + E29E9A6D1301B858008C0D9C /* CardsCollection.h */, + E29E9A6E1301B858008C0D9C /* CardsCollection.m */, + E29E9A6F1301B858008C0D9C /* CardsCollection.xib */, + E29E9A741301BC2E008C0D9C /* CardController.h */, + E29E9A751301BC2E008C0D9C /* CardController.m */, + E29E9A761301BC2E008C0D9C /* CardController.xib */, + E29E9B361301D095008C0D9C /* CustomCardController.h */, + E29E9B371301D095008C0D9C /* CustomCardController.m */, + E2A20AD61302F40F001DDEC9 /* CustomCardController.xib */, + E2A4B2821304403D00BAF88F /* InstructionVC.h */, + E2A4B2831304403D00BAF88F /* InstructionVC.m */, + E2A4B28D130442A000BAF88F /* InstructionVC.xib */, + E290042F13045034006B396B /* CreditsVC.h */, + E290043013045034006B396B /* CreditsVC.m */, + E290043113045034006B396B /* CreditsVC.xib */, + E2933C091305A12D0050C0C7 /* iValentineConstants.h */, + ); + path = Classes; + sourceTree = ""; + }; + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 1D6058910D05DD3D006BFB54 /* Tap Love.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 /* iValentine_Prefix.pch */, + 29B97316FDCFA39411CA2CEA /* main.m */, + 569050241306C45F00477BA5 /* Entitlements.plist */, + ); + name = "Other Sources"; + sourceTree = ""; + }; + 29B97317FDCFA39411CA2CEA /* Resources */ = { + isa = PBXGroup; + children = ( + 56904D43130660D900477BA5 /* Default.png */, + 56904F3A1306A91100477BA5 /* 57_taplove.png */, + 56904F3B1306A91100477BA5 /* 512_taplove.png */, + 56904D20130660D900477BA5 /* Images */, + 2899E5210DE3E06400AC0155 /* iValentineViewController.xib */, + 28AD733E0D9D9553002E5188 /* MainWindow.xib */, + 8D1107310486CEB800E47090 /* iValentine-Info.plist */, + ); + name = Resources; + sourceTree = ""; + }; + 29B97323FDCFA39411CA2CEA /* Frameworks */ = { + isa = PBXGroup; + children = ( + E290049B130464D8006B396B /* MessageUI.framework */, + 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, + 1D30AB110D05D00D00671497 /* Foundation.framework */, + 288765A40DF7441C002DB57D /* CoreGraphics.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 56904D20130660D900477BA5 /* Images */ = { + isa = PBXGroup; + children = ( + 56904F2213069FFF00477BA5 /* select_card_text.png */, + 56904D22130660D900477BA5 /* Cards */, + 56904D40130660D900477BA5 /* CreditView */, + 56904D44130660D900477BA5 /* Heart_Animation */, + 56904D49130660D900477BA5 /* InstructionView */, + 56904D50130660D900477BA5 /* LoveMeter */, + 56904D61130660D900477BA5 /* Menu */, + ); + path = Images; + sourceTree = ""; + }; + 56904D22130660D900477BA5 /* Cards */ = { + isa = PBXGroup; + children = ( + 56904D23130660D900477BA5 /* Full_vuew.png */, + 56904D24130660D900477BA5 /* largeCards */, + 56904D30130660D900477BA5 /* left_arrow.png */, + 56904D31130660D900477BA5 /* right_arrow.png */, + 56904D32130660D900477BA5 /* Share_button.png */, + 56904D33130660D900477BA5 /* smallCards */, + ); + path = Cards; + sourceTree = ""; + }; + 56904D24130660D900477BA5 /* largeCards */ = { + isa = PBXGroup; + children = ( + 56904D25130660D900477BA5 /* L1.png */, + 56904D26130660D900477BA5 /* L10.png */, + 56904D27130660D900477BA5 /* L11.png */, + 56904D28130660D900477BA5 /* L2.png */, + 56904D29130660D900477BA5 /* L3.png */, + 56904D2A130660D900477BA5 /* L4.png */, + 56904D2B130660D900477BA5 /* L5.png */, + 56904D2C130660D900477BA5 /* L6.png */, + 56904D2D130660D900477BA5 /* L7.png */, + 56904D2E130660D900477BA5 /* L8.png */, + 56904D2F130660D900477BA5 /* L9.png */, + ); + path = largeCards; + sourceTree = ""; + }; + 56904D33130660D900477BA5 /* smallCards */ = { + isa = PBXGroup; + children = ( + 56904D34130660D900477BA5 /* S1.png */, + 56904D35130660D900477BA5 /* S10.png */, + 56904D36130660D900477BA5 /* S11.png */, + 56904D37130660D900477BA5 /* S2.png */, + 56904D38130660D900477BA5 /* S3.png */, + 56904D39130660D900477BA5 /* S4.png */, + 56904D3A130660D900477BA5 /* S5.png */, + 56904D3B130660D900477BA5 /* S6.png */, + 56904D3C130660D900477BA5 /* S7.png */, + 56904D3D130660D900477BA5 /* S8.png */, + 56904D3E130660D900477BA5 /* S9.png */, + ); + path = smallCards; + sourceTree = ""; + }; + 56904D40130660D900477BA5 /* CreditView */ = { + isa = PBXGroup; + children = ( + 56904D41130660D900477BA5 /* background.png */, + 56904D42130660D900477BA5 /* credits_fullview.png */, + ); + path = CreditView; + sourceTree = ""; + }; + 56904D44130660D900477BA5 /* Heart_Animation */ = { + isa = PBXGroup; + children = ( + 56904EE01306936A00477BA5 /* Heart_Frame_4.png */, + 56904EE11306936A00477BA5 /* Heart_Frame_5.png */, + 56904D45130660D900477BA5 /* Heart_Frame_1.png */, + 56904D46130660D900477BA5 /* Heart_Frame_2.png */, + 56904D47130660D900477BA5 /* Heart_Frame_3.png */, + ); + path = Heart_Animation; + sourceTree = ""; + }; + 56904D49130660D900477BA5 /* InstructionView */ = { + isa = PBXGroup; + children = ( + 56904D4A130660D900477BA5 /* Inst_background.png */, + 56904D4B130660D900477BA5 /* Instructions_box.png */, + 56904D4C130660D900477BA5 /* Instructions_fullview.png */, + 56904D4D130660D900477BA5 /* instructions_text.png */, + 56904D4E130660D900477BA5 /* start_button.png */, + ); + path = InstructionView; + sourceTree = ""; + }; + 56904D50130660D900477BA5 /* LoveMeter */ = { + isa = PBXGroup; + children = ( + 56904D51130660D900477BA5 /* back_button.png */, + 56904D52130660D900477BA5 /* Box1.png */, + 56904D53130660D900477BA5 /* Box2.png */, + 56904D54130660D900477BA5 /* Calculate_button.png */, + 56904D55130660D900477BA5 /* LoveMeter_Background.png */, + 56904D56130660D900477BA5 /* LoveMeter_Mockup.png */, + 56904D57130660D900477BA5 /* Lovers_Name.png */, + 56904D58130660D900477BA5 /* Menu_button.png */, + 56904D59130660D900477BA5 /* Needle.png */, + 56904D5A130660D900477BA5 /* Needle_Controler.png */, + 56904D5B130660D900477BA5 /* Needle_double_size.png */, + 56904D5C130660D900477BA5 /* Next_button.png */, + 56904D5D130660D900477BA5 /* Reset_button.png */, + 56904D5E130660D900477BA5 /* top_bar.png */, + 56904D60130660D900477BA5 /* Your_Name.png */, + ); + path = LoveMeter; + sourceTree = ""; + }; + 56904D61130660D900477BA5 /* Menu */ = { + isa = PBXGroup; + children = ( + 56904D62130660D900477BA5 /* Menu Buttons */, + 56904D69130660D900477BA5 /* Menu_Screen */, + ); + path = Menu; + sourceTree = ""; + }; + 56904D62130660D900477BA5 /* Menu Buttons */ = { + isa = PBXGroup; + children = ( + 56904D63130660D900477BA5 /* Credtis_Button_Normal.png */, + 56904D64130660D900477BA5 /* Credtis_Button_Selected.png */, + 56904D65130660D900477BA5 /* Instructions_Button_Normal.png */, + 56904D66130660D900477BA5 /* Instructions_Button_Selected.png */, + 56904D67130660D900477BA5 /* Start_Button_Normal.png */, + 56904D68130660D900477BA5 /* Start_Button_Selected.png */, + ); + path = "Menu Buttons"; + sourceTree = ""; + }; + 56904D69130660D900477BA5 /* Menu_Screen */ = { + isa = PBXGroup; + children = ( + 56904D6A130660D900477BA5 /* Full_View.png */, + 56904D6B130660D900477BA5 /* Menu_BG.png */, + ); + path = Menu_Screen; + sourceTree = ""; + }; + 56904DAF1306613600477BA5 /* FacebookAgent */ = { + isa = PBXGroup; + children = ( + 56904DB01306613600477BA5 /* FacebookAgent.h */, + 56904DB11306613600477BA5 /* FacebookAgent.m */, + 56904DB21306613600477BA5 /* src */, + ); + name = FacebookAgent; + path = Libraries/FacebookAgent; + sourceTree = ""; + }; + 56904DB21306613600477BA5 /* src */ = { + isa = PBXGroup; + children = ( + 56904DB31306613600477BA5 /* FBConnect */, + 56904DBE1306613600477BA5 /* FBConnectGlobal.m */, + 56904DBF1306613600477BA5 /* FBDialog.m */, + 56904DC01306613600477BA5 /* FBFeedDialog.m */, + 56904DC11306613600477BA5 /* FBLoginButton.m */, + 56904DC21306613600477BA5 /* FBLoginDialog.m */, + 56904DC31306613600477BA5 /* FBPermissionDialog.m */, + 56904DC41306613600477BA5 /* FBRequest.m */, + 56904DC51306613600477BA5 /* FBSession.m */, + 56904DC61306613600477BA5 /* FBStreamDialog.m */, + 56904DC71306613600477BA5 /* FBXMLHandler.h */, + 56904DC81306613600477BA5 /* FBXMLHandler.m */, + ); + path = src; + sourceTree = ""; + }; + 56904DB31306613600477BA5 /* FBConnect */ = { + isa = PBXGroup; + children = ( + 56904DB41306613600477BA5 /* FBConnect.h */, + 56904DB51306613600477BA5 /* FBConnectGlobal.h */, + 56904DB61306613600477BA5 /* FBDialog.h */, + 56904DB71306613600477BA5 /* FBFeedDialog.h */, + 56904DB81306613600477BA5 /* FBLoginButton.h */, + 56904DB91306613600477BA5 /* FBLoginDialog.h */, + 56904DBA1306613600477BA5 /* FBPermissionDialog.h */, + 56904DBB1306613600477BA5 /* FBRequest.h */, + 56904DBC1306613600477BA5 /* FBSession.h */, + 56904DBD1306613600477BA5 /* FBStreamDialog.h */, + ); + path = FBConnect; + sourceTree = ""; + }; + E2F5F59012E38946008D07F6 /* LMViewController */ = { + isa = PBXGroup; + children = ( + E2F5F59112E38961008D07F6 /* LoveMeterVC.h */, + E2F5F59212E38961008D07F6 /* LoveMeterVC.m */, + E2F5F59312E38961008D07F6 /* LoveMeterVC.xib */, + ); + path = LMViewController; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 1D6058900D05DD3D006BFB54 /* iValentine */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "iValentine" */; + buildPhases = ( + 1D60588D0D05DD3D006BFB54 /* Resources */, + 1D60588E0D05DD3D006BFB54 /* Sources */, + 1D60588F0D05DD3D006BFB54 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = iValentine; + productName = iValentine; + productReference = 1D6058910D05DD3D006BFB54 /* Tap Love.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29B97313FDCFA39411CA2CEA /* Project object */ = { + isa = PBXProject; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "iValentine" */; + compatibilityVersion = "Xcode 3.1"; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 1D6058900D05DD3D006BFB54 /* iValentine */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 1D60588D0D05DD3D006BFB54 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */, + 2899E5220DE3E06400AC0155 /* iValentineViewController.xib in Resources */, + E2F5F59512E38961008D07F6 /* LoveMeterVC.xib in Resources */, + E29E9A711301B858008C0D9C /* CardsCollection.xib in Resources */, + E29E9A781301BC2E008C0D9C /* CardController.xib in Resources */, + E2A20AD71302F40F001DDEC9 /* CustomCardController.xib in Resources */, + E2A4B28E130442A000BAF88F /* InstructionVC.xib in Resources */, + E290043313045034006B396B /* CreditsVC.xib in Resources */, + 56904D6E130660D900477BA5 /* Full_vuew.png in Resources */, + 56904D6F130660D900477BA5 /* L1.png in Resources */, + 56904D70130660D900477BA5 /* L10.png in Resources */, + 56904D71130660D900477BA5 /* L11.png in Resources */, + 56904D72130660D900477BA5 /* L2.png in Resources */, + 56904D73130660D900477BA5 /* L3.png in Resources */, + 56904D74130660D900477BA5 /* L4.png in Resources */, + 56904D75130660D900477BA5 /* L5.png in Resources */, + 56904D76130660D900477BA5 /* L6.png in Resources */, + 56904D77130660D900477BA5 /* L7.png in Resources */, + 56904D78130660D900477BA5 /* L8.png in Resources */, + 56904D79130660D900477BA5 /* L9.png in Resources */, + 56904D7A130660D900477BA5 /* left_arrow.png in Resources */, + 56904D7B130660D900477BA5 /* right_arrow.png in Resources */, + 56904D7C130660D900477BA5 /* Share_button.png in Resources */, + 56904D7D130660D900477BA5 /* S1.png in Resources */, + 56904D7E130660D900477BA5 /* S10.png in Resources */, + 56904D7F130660D900477BA5 /* S11.png in Resources */, + 56904D80130660D900477BA5 /* S2.png in Resources */, + 56904D81130660D900477BA5 /* S3.png in Resources */, + 56904D82130660D900477BA5 /* S4.png in Resources */, + 56904D83130660D900477BA5 /* S5.png in Resources */, + 56904D84130660D900477BA5 /* S6.png in Resources */, + 56904D85130660D900477BA5 /* S7.png in Resources */, + 56904D86130660D900477BA5 /* S8.png in Resources */, + 56904D87130660D900477BA5 /* S9.png in Resources */, + 56904D89130660D900477BA5 /* background.png in Resources */, + 56904D8A130660D900477BA5 /* credits_fullview.png in Resources */, + 56904D8B130660D900477BA5 /* Default.png in Resources */, + 56904D8C130660D900477BA5 /* Heart_Frame_1.png in Resources */, + 56904D8D130660D900477BA5 /* Heart_Frame_2.png in Resources */, + 56904D8E130660D900477BA5 /* Heart_Frame_3.png in Resources */, + 56904D90130660D900477BA5 /* Inst_background.png in Resources */, + 56904D91130660D900477BA5 /* Instructions_box.png in Resources */, + 56904D92130660D900477BA5 /* Instructions_fullview.png in Resources */, + 56904D93130660D900477BA5 /* instructions_text.png in Resources */, + 56904D94130660D900477BA5 /* start_button.png in Resources */, + 56904D96130660D900477BA5 /* back_button.png in Resources */, + 56904D97130660D900477BA5 /* Box1.png in Resources */, + 56904D98130660D900477BA5 /* Box2.png in Resources */, + 56904D99130660D900477BA5 /* Calculate_button.png in Resources */, + 56904D9A130660D900477BA5 /* LoveMeter_Background.png in Resources */, + 56904D9B130660D900477BA5 /* LoveMeter_Mockup.png in Resources */, + 56904D9C130660D900477BA5 /* Lovers_Name.png in Resources */, + 56904D9D130660D900477BA5 /* Menu_button.png in Resources */, + 56904D9E130660D900477BA5 /* Needle.png in Resources */, + 56904D9F130660D900477BA5 /* Needle_Controler.png in Resources */, + 56904DA0130660D900477BA5 /* Needle_double_size.png in Resources */, + 56904DA1130660D900477BA5 /* Next_button.png in Resources */, + 56904DA2130660D900477BA5 /* Reset_button.png in Resources */, + 56904DA3130660D900477BA5 /* top_bar.png in Resources */, + 56904DA5130660D900477BA5 /* Your_Name.png in Resources */, + 56904DA6130660D900477BA5 /* Credtis_Button_Normal.png in Resources */, + 56904DA7130660D900477BA5 /* Credtis_Button_Selected.png in Resources */, + 56904DA8130660D900477BA5 /* Instructions_Button_Normal.png in Resources */, + 56904DA9130660D900477BA5 /* Instructions_Button_Selected.png in Resources */, + 56904DAA130660D900477BA5 /* Start_Button_Normal.png in Resources */, + 56904DAB130660D900477BA5 /* Start_Button_Selected.png in Resources */, + 56904DAC130660D900477BA5 /* Full_View.png in Resources */, + 56904DAD130660D900477BA5 /* Menu_BG.png in Resources */, + 56904EE21306936A00477BA5 /* Heart_Frame_4.png in Resources */, + 56904EE31306936A00477BA5 /* Heart_Frame_5.png in Resources */, + 56904F2313069FFF00477BA5 /* select_card_text.png in Resources */, + 56904F3C1306A91100477BA5 /* 57_taplove.png in Resources */, + 56904F3D1306A91100477BA5 /* 512_taplove.png in Resources */, + 569050251306C45F00477BA5 /* Entitlements.plist in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 1D60588E0D05DD3D006BFB54 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1D60589B0D05DD56006BFB54 /* main.m in Sources */, + 1D3623260D0F684500981E51 /* iValentineAppDelegate.m in Sources */, + 28D7ACF80DDB3853001CB0EB /* iValentineViewController.m in Sources */, + E2F5F59412E38961008D07F6 /* LoveMeterVC.m in Sources */, + E29E9A701301B858008C0D9C /* CardsCollection.m in Sources */, + E29E9A771301BC2E008C0D9C /* CardController.m in Sources */, + E29E9B391301D095008C0D9C /* CustomCardController.m in Sources */, + E2A4B2851304403D00BAF88F /* InstructionVC.m in Sources */, + E290043213045034006B396B /* CreditsVC.m in Sources */, + 56904DC91306613600477BA5 /* FacebookAgent.m in Sources */, + 56904DCA1306613600477BA5 /* FBConnectGlobal.m in Sources */, + 56904DCB1306613600477BA5 /* FBDialog.m in Sources */, + 56904DCC1306613600477BA5 /* FBFeedDialog.m in Sources */, + 56904DCD1306613600477BA5 /* FBLoginButton.m in Sources */, + 56904DCE1306613600477BA5 /* FBLoginDialog.m in Sources */, + 56904DCF1306613600477BA5 /* FBPermissionDialog.m in Sources */, + 56904DD01306613600477BA5 /* FBRequest.m in Sources */, + 56904DD11306613600477BA5 /* FBSession.m in Sources */, + 56904DD21306613600477BA5 /* FBStreamDialog.m in Sources */, + 56904DD31306613600477BA5 /* FBXMLHandler.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 = iValentine_Prefix.pch; + INFOPLIST_FILE = "iValentine-Info.plist"; + PRODUCT_NAME = iValentine; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 1D6058950D05DD3E006BFB54 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = YES; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = iValentine_Prefix.pch; + INFOPLIST_FILE = "iValentine-Info.plist"; + PRODUCT_NAME = iValentine; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 56904F5F1306B0D200477BA5 /* Distribution */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + CODE_SIGN_ENTITLEMENTS = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Ahmad Iftikhar"; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 3.1.2; + OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; + PREBINDING = NO; + "PROVISIONING_PROFILE[sdk=iphoneos*]" = "DD99A408-AC10-40FA-A73B-7AB976B2D5D3"; + SDKROOT = iphoneos3.1.2; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Distribution; + }; + 56904F601306B0D200477BA5 /* Distribution */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = YES; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = iValentine_Prefix.pch; + INFOPLIST_FILE = "iValentine-Info.plist"; + PRODUCT_NAME = "Tap Love"; + VALIDATE_PRODUCT = YES; + }; + name = Distribution; + }; + C01FCF4F08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Don't Code Sign"; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PREBINDING = NO; + "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; + SDKROOT = iphoneos3.1.2; + }; + 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; + OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; + PREBINDING = NO; + SDKROOT = iphoneos4.0; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "iValentine" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1D6058940D05DD3E006BFB54 /* Debug */, + 1D6058950D05DD3E006BFB54 /* Release */, + 56904F601306B0D200477BA5 /* Distribution */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "iValentine" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4F08A954540054247B /* Debug */, + C01FCF5008A954540054247B /* Release */, + 56904F5F1306B0D200477BA5 /* Distribution */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; +} diff --git a/iValentine.xcodeproj/ranahammad.mode1v3 b/iValentine.xcodeproj/ranahammad.mode1v3 new file mode 100644 index 0000000..c3bbd35 --- /dev/null +++ b/iValentine.xcodeproj/ranahammad.mode1v3 @@ -0,0 +1,1467 @@ + + + + + ActivePerspectiveName + Project + AllowedModules + + + BundleLoadPath + + MaxInstances + n + Module + PBXSmartGroupTreeModule + Name + Groups and Files Outline View + + + BundleLoadPath + + MaxInstances + n + Module + PBXNavigatorGroup + Name + Editor + + + BundleLoadPath + + MaxInstances + n + Module + XCTaskListModule + Name + Task List + + + BundleLoadPath + + MaxInstances + n + Module + XCDetailModule + Name + File and Smart Group Detail Viewer + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXBuildResultsModule + Name + Detailed Build Results Viewer + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXProjectFindModule + Name + Project Batch Find Tool + + + BundleLoadPath + + MaxInstances + n + Module + XCProjectFormatConflictsModule + Name + Project Format Conflicts List + + + BundleLoadPath + + MaxInstances + n + Module + PBXBookmarksModule + Name + Bookmarks Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXClassBrowserModule + Name + Class Browser + + + BundleLoadPath + + MaxInstances + n + Module + PBXCVSModule + Name + Source Code Control Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXDebugBreakpointsModule + Name + Debug Breakpoints Tool + + + BundleLoadPath + + MaxInstances + n + Module + XCDockableInspector + Name + Inspector + + + BundleLoadPath + + MaxInstances + n + Module + PBXOpenQuicklyModule + Name + Open Quickly Tool + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXDebugSessionModule + Name + Debugger + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXDebugCLIModule + Name + Debug Console + + + BundleLoadPath + + MaxInstances + n + Module + XCSnapshotModule + Name + Snapshots Tool + + + BundlePath + /Developer/xCode 3.1/Library/PrivateFrameworks/DevToolsInterface.framework/Resources + Description + DefaultDescriptionKey + DockingSystemVisible + + Extension + mode1v3 + FavBarConfig + + PBXProjectModuleGUID + 56904CF413065EE600477BA5 + XCBarModuleItemNames + + XCBarModuleItems + + + FirstTimeWindowDisplayed + + Identifier + com.apple.perspectives.project.mode1v3 + MajorVersion + 33 + MinorVersion + 0 + Name + Default + Notifications + + OpenEditors + + PerspectiveWidths + + -1 + -1 + + Perspectives + + + ChosenToolbarItems + + active-combo-popup + action + NSToolbarFlexibleSpaceItem + debugger-enable-breakpoints + build-and-go + com.apple.ide.PBXToolbarStopButton + get-info + NSToolbarFlexibleSpaceItem + com.apple.pbx.toolbar.searchfield + + ControllerClassBaseName + + IconName + WindowOfProjectWithEditor + Identifier + perspective.project + IsVertical + + Layout + + + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C37FBAC04509CD000000102 + 1C37FAAC04509CD000000102 + 1C37FABC05509CD000000102 + 1C37FABC05539CD112110102 + E2644B35053B69B200211256 + 1C37FABC04509CD000100104 + 1CC0EA4004350EF90044410B + 1CC0EA4004350EF90041110B + + PBXProjectModuleGUID + 1CE0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + yes + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 276 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 29B97314FDCFA39411CA2CEA + 080E96DDFE201D6D7F000001 + E2F5F59012E38946008D07F6 + 29B97315FDCFA39411CA2CEA + 29B97317FDCFA39411CA2CEA + 29B97323FDCFA39411CA2CEA + 19C28FACFE9D520D11CA2CBB + 1C37FBAC04509CD000000102 + 1C37FABC05509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 18 + 1 + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 251}, {276, 607}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + + XCSharingToken + com.apple.Xcode.GFSharingToken + + GeometryConfiguration + + Frame + {{0, 0}, {293, 625}} + GroupTreeTableConfiguration + + MainColumn + 276 + + RubberWindowFrame + 0 112 1280 666 0 0 1280 778 + + Module + PBXSmartGroupTreeModule + Proportion + 293pt + + + Dock + + + BecomeActive + + ContentConfiguration + + PBXProjectModuleGUID + 1CE0B20306471E060097A5F4 + PBXProjectModuleLabel + iValentineConstants.h + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1CE0B20406471E060097A5F4 + PBXProjectModuleLabel + iValentineConstants.h + _historyCapacity + 0 + bookmark + 56F121891349CD3000F9B894 + history + + 56904DE0130661C900477BA5 + 56904E8F130691B400477BA5 + 56904E90130691B400477BA5 + 56904E91130691B400477BA5 + 56904E92130691B400477BA5 + 56904E93130691B400477BA5 + 56904E94130691B400477BA5 + 56904E95130691B400477BA5 + 56904E96130691B400477BA5 + 56904E97130691B400477BA5 + 56904E98130691B400477BA5 + 56904E99130691B400477BA5 + 56904E9A130691B400477BA5 + 56904E9B130691B400477BA5 + 56904E9D130691B400477BA5 + 56904E9F130691B400477BA5 + 56904EA1130691B400477BA5 + 56904EA2130691B400477BA5 + 56904EA3130691B400477BA5 + 56904EA7130691B400477BA5 + 56904EA8130691B400477BA5 + 56904EAA130691B400477BA5 + 56904EAC130691B400477BA5 + 56904EAD130691B400477BA5 + 56904EC0130691F000477BA5 + 56904EC1130691F000477BA5 + 56904ED4130692BE00477BA5 + 56904F421306A94700477BA5 + 56904F431306A94700477BA5 + 56904F461306A94700477BA5 + 56904F481306A94700477BA5 + 56904F491306A94700477BA5 + 56904F4A1306A94700477BA5 + 56904F4B1306A94700477BA5 + 56904F4C1306A94700477BA5 + 56904F4E1306A94700477BA5 + 56904F4F1306A94700477BA5 + 56904F501306A94700477BA5 + 56904F511306A94700477BA5 + 56904F521306A94700477BA5 + 56904F531306A94700477BA5 + 56904F541306A94700477BA5 + 56904F611306B0FF00477BA5 + 56904F681306B16100477BA5 + 5690501B1306BFE700477BA5 + 569050301306C93100477BA5 + 569050331306C93100477BA5 + 569050421306CA2600477BA5 + 569050431306CA2600477BA5 + 569050441306CA2600477BA5 + 569050451306CA2600477BA5 + 569050461306CA2600477BA5 + 569050471306CA2600477BA5 + 569050481306CA2600477BA5 + 569050491306CA2600477BA5 + 5690504A1306CA2600477BA5 + 5690504B1306CA2600477BA5 + 5690504C1306CA2600477BA5 + 5690504D1306CA2600477BA5 + 5690508A1306D4FB00477BA5 + 569050BB1306E16100477BA5 + 569051661307105400477BA5 + 56905183130717F200477BA5 + 569051C213071CAB00477BA5 + 56B1839213111A6C009F9AEB + 564976ED13112DC9007562D4 + 564976EE13112DC9007562D4 + 564976EF13112DC9007562D4 + 56F121861349CD3000F9B894 + 56F121871349CD3000F9B894 + 56F121881349CD3000F9B894 + + + SplitCount + 1 + + StatusBarVisibility + + + GeometryConfiguration + + Frame + {{0, 0}, {982, 530}} + RubberWindowFrame + 0 112 1280 666 0 0 1280 778 + + Module + PBXNavigatorGroup + Proportion + 530pt + + + ContentConfiguration + + PBXProjectModuleGUID + 1CE0B20506471E060097A5F4 + PBXProjectModuleLabel + Detail + + GeometryConfiguration + + Frame + {{0, 535}, {982, 90}} + RubberWindowFrame + 0 112 1280 666 0 0 1280 778 + + Module + XCDetailModule + Proportion + 90pt + + + Proportion + 982pt + + + Name + Project + ServiceClasses + + XCModuleDock + PBXSmartGroupTreeModule + XCModuleDock + PBXNavigatorGroup + XCDetailModule + + TableOfContents + + 56F121821348DA2000F9B894 + 1CE0B1FE06471DED0097A5F4 + 56F121831348DA2000F9B894 + 1CE0B20306471E060097A5F4 + 1CE0B20506471E060097A5F4 + + ToolbarConfigUserDefaultsMinorVersion + 2 + ToolbarConfiguration + xcode.toolbar.config.defaultV3 + + + ControllerClassBaseName + + IconName + WindowOfProject + Identifier + perspective.morph + IsVertical + 0 + Layout + + + BecomeActive + 1 + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C37FBAC04509CD000000102 + 1C37FAAC04509CD000000102 + 1C08E77C0454961000C914BD + 1C37FABC05509CD000000102 + 1C37FABC05539CD112110102 + E2644B35053B69B200211256 + 1C37FABC04509CD000100104 + 1CC0EA4004350EF90044410B + 1CC0EA4004350EF90041110B + + PBXProjectModuleGUID + 11E0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + yes + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 186 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 29B97314FDCFA39411CA2CEA + 1C37FABC05509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {186, 337}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + 1 + XCSharingToken + com.apple.Xcode.GFSharingToken + + GeometryConfiguration + + Frame + {{0, 0}, {203, 355}} + GroupTreeTableConfiguration + + MainColumn + 186 + + RubberWindowFrame + 373 269 690 397 0 0 1440 878 + + Module + PBXSmartGroupTreeModule + Proportion + 100% + + + Name + Morph + PreferredWidth + 300 + ServiceClasses + + XCModuleDock + PBXSmartGroupTreeModule + + TableOfContents + + 11E0B1FE06471DED0097A5F4 + + ToolbarConfiguration + xcode.toolbar.config.default.shortV3 + + + PerspectivesBarVisible + + ShelfIsVisible + + SourceDescription + file at '/Developer/xCode 3.1/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecificationMode1.xcperspec' + StatusbarIsVisible + + TimeStamp + 0.0 + ToolbarConfigUserDefaultsMinorVersion + 2 + ToolbarDisplayMode + 1 + ToolbarIsVisible + + ToolbarSizeMode + 1 + Type + Perspectives + UpdateMessage + The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the "Metro-Morph" feature). You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature. Do you wish to update to the latest Workspace defaults for project '%@'? + WindowJustification + 5 + WindowOrderList + + 56904CF513065EE600477BA5 + + WindowString + 0 112 1280 666 0 0 1280 778 + WindowToolsV3 + + + FirstTimeWindowDisplayed + + Identifier + windowTool.build + IsVertical + + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CD0528F0623707200166675 + PBXProjectModuleLabel + + StatusBarVisibility + + + GeometryConfiguration + + Frame + {{0, 0}, {1056, 266}} + RubberWindowFrame + 42 184 1056 548 0 0 1280 778 + + Module + PBXNavigatorGroup + Proportion + 266pt + + + ContentConfiguration + + PBXProjectModuleGUID + XCMainBuildResultsModuleGUID + PBXProjectModuleLabel + Build Results + XCBuildResultsTrigger_Collapse + 1021 + XCBuildResultsTrigger_Open + 1011 + + GeometryConfiguration + + Frame + {{0, 271}, {1056, 236}} + RubberWindowFrame + 42 184 1056 548 0 0 1280 778 + + Module + PBXBuildResultsModule + Proportion + 236pt + + + Proportion + 507pt + + + Name + Build Results + ServiceClasses + + PBXBuildResultsModule + + StatusbarIsVisible + + TableOfContents + + 56904CF513065EE600477BA5 + 56F121841348DA2000F9B894 + 1CD0528F0623707200166675 + XCMainBuildResultsModuleGUID + + ToolbarConfiguration + xcode.toolbar.config.buildV3 + WindowContentMinSize + 486 300 + WindowString + 42 184 1056 548 0 0 1280 778 + WindowToolGUID + 56904CF513065EE600477BA5 + WindowToolIsVisible + + + + FirstTimeWindowDisplayed + + Identifier + windowTool.debugger + IsVertical + + Layout + + + Dock + + + ContentConfiguration + + Debugger + + HorizontalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {316, 201}} + {{316, 0}, {378, 201}} + + + VerticalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {694, 201}} + {{0, 201}, {694, 180}} + + + + LauncherConfigVersion + 8 + PBXProjectModuleGUID + 1C162984064C10D400B95A72 + PBXProjectModuleLabel + Debug - GLUTExamples (Underwater) + + GeometryConfiguration + + DebugConsoleVisible + None + DebugConsoleWindowFrame + {{200, 200}, {500, 300}} + DebugSTDIOWindowFrame + {{200, 200}, {500, 300}} + Frame + {{0, 0}, {694, 381}} + PBXDebugSessionStackFrameViewKey + + DebugVariablesTableConfiguration + + Name + 120 + Value + 85 + Summary + 148 + + Frame + {{316, 0}, {378, 201}} + RubberWindowFrame + 21 333 694 422 0 0 1280 778 + + RubberWindowFrame + 21 333 694 422 0 0 1280 778 + + Module + PBXDebugSessionModule + Proportion + 381pt + + + Proportion + 381pt + + + Name + Debugger + ServiceClasses + + PBXDebugSessionModule + + StatusbarIsVisible + + TableOfContents + + 1CD10A99069EF8BA00B06720 + 564976211311253D007562D4 + 1C162984064C10D400B95A72 + 564976221311253D007562D4 + 564976231311253D007562D4 + 564976241311253D007562D4 + 564976251311253D007562D4 + 564976261311253D007562D4 + + ToolbarConfiguration + xcode.toolbar.config.debugV3 + WindowString + 21 333 694 422 0 0 1280 778 + WindowToolGUID + 1CD10A99069EF8BA00B06720 + WindowToolIsVisible + + + + Identifier + windowTool.find + Layout + + + Dock + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CDD528C0622207200134675 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1CD0528D0623707200166675 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {781, 167}} + RubberWindowFrame + 62 385 781 470 0 0 1440 878 + + Module + PBXNavigatorGroup + Proportion + 781pt + + + Proportion + 50% + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1CD0528E0623707200166675 + PBXProjectModuleLabel + Project Find + + GeometryConfiguration + + Frame + {{8, 0}, {773, 254}} + RubberWindowFrame + 62 385 781 470 0 0 1440 878 + + Module + PBXProjectFindModule + Proportion + 50% + + + Proportion + 428pt + + + Name + Project Find + ServiceClasses + + PBXProjectFindModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C530D57069F1CE1000CFCEE + 1C530D58069F1CE1000CFCEE + 1C530D59069F1CE1000CFCEE + 1CDD528C0622207200134675 + 1C530D5A069F1CE1000CFCEE + 1CE0B1FE06471DED0097A5F4 + 1CD0528E0623707200166675 + + WindowString + 62 385 781 470 0 0 1440 878 + WindowToolGUID + 1C530D57069F1CE1000CFCEE + WindowToolIsVisible + 0 + + + Identifier + MENUSEPARATOR + + + FirstTimeWindowDisplayed + + Identifier + windowTool.debuggerConsole + IsVertical + + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1C78EAAC065D492600B07095 + PBXProjectModuleLabel + Debugger Console + + GeometryConfiguration + + Frame + {{0, 0}, {650, 209}} + RubberWindowFrame + 21 505 650 250 0 0 1280 778 + + Module + PBXDebugCLIModule + Proportion + 209pt + + + Proportion + 209pt + + + Name + Debugger Console + ServiceClasses + + PBXDebugCLIModule + + StatusbarIsVisible + + TableOfContents + + 1C78EAAD065D492600B07095 + 564976271311253D007562D4 + 1C78EAAC065D492600B07095 + + ToolbarConfiguration + xcode.toolbar.config.consoleV3 + WindowString + 21 505 650 250 0 0 1280 778 + WindowToolGUID + 1C78EAAD065D492600B07095 + WindowToolIsVisible + + + + Identifier + windowTool.snapshots + Layout + + + Dock + + + Module + XCSnapshotModule + Proportion + 100% + + + Proportion + 100% + + + Name + Snapshots + ServiceClasses + + XCSnapshotModule + + StatusbarIsVisible + Yes + ToolbarConfiguration + xcode.toolbar.config.snapshots + WindowString + 315 824 300 550 0 0 1440 878 + WindowToolIsVisible + Yes + + + Identifier + windowTool.scm + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1C78EAB2065D492600B07095 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1C78EAB3065D492600B07095 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {452, 0}} + RubberWindowFrame + 743 379 452 308 0 0 1280 1002 + + Module + PBXNavigatorGroup + Proportion + 0pt + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1CD052920623707200166675 + PBXProjectModuleLabel + SCM + + GeometryConfiguration + + ConsoleFrame + {{0, 259}, {452, 0}} + Frame + {{0, 7}, {452, 259}} + RubberWindowFrame + 743 379 452 308 0 0 1280 1002 + TableConfiguration + + Status + 30 + FileName + 199 + Path + 197.0950012207031 + + TableFrame + {{0, 0}, {452, 250}} + + Module + PBXCVSModule + Proportion + 262pt + + + Proportion + 266pt + + + Name + SCM + ServiceClasses + + PBXCVSModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C78EAB4065D492600B07095 + 1C78EAB5065D492600B07095 + 1C78EAB2065D492600B07095 + 1CD052920623707200166675 + + ToolbarConfiguration + xcode.toolbar.config.scm + WindowString + 743 379 452 308 0 0 1280 1002 + + + Identifier + windowTool.breakpoints + IsVertical + 0 + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C77FABC04509CD000000102 + + PBXProjectModuleGUID + 1CE0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + no + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 168 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 1C77FABC04509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {168, 350}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + 0 + + GeometryConfiguration + + Frame + {{0, 0}, {185, 368}} + GroupTreeTableConfiguration + + MainColumn + 168 + + RubberWindowFrame + 315 424 744 409 0 0 1440 878 + + Module + PBXSmartGroupTreeModule + Proportion + 185pt + + + ContentConfiguration + + PBXProjectModuleGUID + 1CA1AED706398EBD00589147 + PBXProjectModuleLabel + Detail + + GeometryConfiguration + + Frame + {{190, 0}, {554, 368}} + RubberWindowFrame + 315 424 744 409 0 0 1440 878 + + Module + XCDetailModule + Proportion + 554pt + + + Proportion + 368pt + + + MajorVersion + 3 + MinorVersion + 0 + Name + Breakpoints + ServiceClasses + + PBXSmartGroupTreeModule + XCDetailModule + + StatusbarIsVisible + 1 + TableOfContents + + 1CDDB66807F98D9800BB5817 + 1CDDB66907F98D9800BB5817 + 1CE0B1FE06471DED0097A5F4 + 1CA1AED706398EBD00589147 + + ToolbarConfiguration + xcode.toolbar.config.breakpointsV3 + WindowString + 315 424 744 409 0 0 1440 878 + WindowToolGUID + 1CDDB66807F98D9800BB5817 + WindowToolIsVisible + 1 + + + Identifier + windowTool.debugAnimator + Layout + + + Dock + + + Module + PBXNavigatorGroup + Proportion + 100% + + + Proportion + 100% + + + Name + Debug Visualizer + ServiceClasses + + PBXNavigatorGroup + + StatusbarIsVisible + 1 + ToolbarConfiguration + xcode.toolbar.config.debugAnimatorV3 + WindowString + 100 100 700 500 0 0 1280 1002 + + + Identifier + windowTool.bookmarks + Layout + + + Dock + + + Module + PBXBookmarksModule + Proportion + 100% + + + Proportion + 100% + + + Name + Bookmarks + ServiceClasses + + PBXBookmarksModule + + StatusbarIsVisible + 0 + WindowString + 538 42 401 187 0 0 1280 1002 + + + Identifier + windowTool.projectFormatConflicts + Layout + + + Dock + + + Module + XCProjectFormatConflictsModule + Proportion + 100% + + + Proportion + 100% + + + Name + Project Format Conflicts + ServiceClasses + + XCProjectFormatConflictsModule + + StatusbarIsVisible + 0 + WindowContentMinSize + 450 300 + WindowString + 50 850 472 307 0 0 1440 877 + + + Identifier + windowTool.classBrowser + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + OptionsSetName + Hierarchy, all classes + PBXProjectModuleGUID + 1CA6456E063B45B4001379D8 + PBXProjectModuleLabel + Class Browser - NSObject + + GeometryConfiguration + + ClassesFrame + {{0, 0}, {374, 96}} + ClassesTreeTableConfiguration + + PBXClassNameColumnIdentifier + 208 + PBXClassBookColumnIdentifier + 22 + + Frame + {{0, 0}, {630, 331}} + MembersFrame + {{0, 105}, {374, 395}} + MembersTreeTableConfiguration + + PBXMemberTypeIconColumnIdentifier + 22 + PBXMemberNameColumnIdentifier + 216 + PBXMemberTypeColumnIdentifier + 97 + PBXMemberBookColumnIdentifier + 22 + + PBXModuleWindowStatusBarHidden2 + 1 + RubberWindowFrame + 385 179 630 352 0 0 1440 878 + + Module + PBXClassBrowserModule + Proportion + 332pt + + + Proportion + 332pt + + + Name + Class Browser + ServiceClasses + + PBXClassBrowserModule + + StatusbarIsVisible + 0 + TableOfContents + + 1C0AD2AF069F1E9B00FABCE6 + 1C0AD2B0069F1E9B00FABCE6 + 1CA6456E063B45B4001379D8 + + ToolbarConfiguration + xcode.toolbar.config.classbrowser + WindowString + 385 179 630 352 0 0 1440 878 + WindowToolGUID + 1C0AD2AF069F1E9B00FABCE6 + WindowToolIsVisible + 0 + + + Identifier + windowTool.refactoring + IncludeInToolsMenu + 0 + Layout + + + Dock + + + BecomeActive + 1 + GeometryConfiguration + + Frame + {0, 0}, {500, 335} + RubberWindowFrame + {0, 0}, {500, 335} + + Module + XCRefactoringModule + Proportion + 100% + + + Proportion + 100% + + + Name + Refactoring + ServiceClasses + + XCRefactoringModule + + WindowString + 200 200 500 356 0 0 1920 1200 + + + + diff --git a/iValentine.xcodeproj/ranahammad.pbxuser b/iValentine.xcodeproj/ranahammad.pbxuser new file mode 100644 index 0000000..0985b6d --- /dev/null +++ b/iValentine.xcodeproj/ranahammad.pbxuser @@ -0,0 +1,722 @@ +// !$*UTF8*$! +{ + 1D3623250D0F684500981E51 /* iValentineAppDelegate.m */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {2244, 1455}}"; + sepNavSelRange = "{2675, 0}"; + sepNavVisRange = "{2220, 824}"; + }; + }; + 1D6058900D05DD3D006BFB54 /* iValentine */ = { + activeExec = 0; + executables = ( + 56904CEA13065ED500477BA5 /* iValentine */, + ); + }; + 28D7ACF60DDB3853001CB0EB /* iValentineViewController.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {921, 515}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRange = "{0, 458}"; + }; + }; + 28D7ACF70DDB3853001CB0EB /* iValentineViewController.m */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {964, 1455}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRange = "{0, 883}"; + }; + }; + 29B97313FDCFA39411CA2CEA /* Project object */ = { + activeBuildConfigurationName = Distribution; + activeExecutable = 56904CEA13065ED500477BA5 /* iValentine */; + activeSDKPreference = iphonesimulator3.1.2; + activeTarget = 1D6058900D05DD3D006BFB54 /* iValentine */; + addToTargets = ( + 1D6058900D05DD3D006BFB54 /* iValentine */, + ); + breakpoints = ( + ); + codeSenseManager = 56904CF813065EE600477BA5 /* Code sense */; + executables = ( + 56904CEA13065ED500477BA5 /* iValentine */, + ); + perUserDictionary = { + PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = { + PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; + PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; + PBXFileTableDataSourceColumnWidthsKey = ( + 20, + 743, + 20, + 48, + 43, + 43, + 20, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXFileDataSource_FiletypeID, + PBXFileDataSource_Filename_ColumnID, + PBXFileDataSource_Built_ColumnID, + PBXFileDataSource_ObjectSize_ColumnID, + PBXFileDataSource_Errors_ColumnID, + PBXFileDataSource_Warnings_ColumnID, + PBXFileDataSource_Target_ColumnID, + ); + }; + PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = { + PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; + PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; + PBXFileTableDataSourceColumnWidthsKey = ( + 20, + 703, + 60, + 20, + 48, + 43, + 43, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXFileDataSource_FiletypeID, + PBXFileDataSource_Filename_ColumnID, + PBXTargetDataSource_PrimaryAttribute, + PBXFileDataSource_Built_ColumnID, + PBXFileDataSource_ObjectSize_ColumnID, + PBXFileDataSource_Errors_ColumnID, + PBXFileDataSource_Warnings_ColumnID, + ); + }; + PBXPerProjectTemplateStateSaveDate = 323541517; + PBXWorkspaceStateSaveDate = 323541517; + }; + perUserProjectItems = { + 564976ED13112DC9007562D4 /* PBXBookmark */ = 564976ED13112DC9007562D4 /* PBXBookmark */; + 564976EE13112DC9007562D4 /* PBXTextBookmark */ = 564976EE13112DC9007562D4 /* PBXTextBookmark */; + 564976EF13112DC9007562D4 /* PBXTextBookmark */ = 564976EF13112DC9007562D4 /* PBXTextBookmark */; + 56904DE0130661C900477BA5 /* PBXTextBookmark */ = 56904DE0130661C900477BA5 /* PBXTextBookmark */; + 56904E8F130691B400477BA5 /* PBXBookmark */ = 56904E8F130691B400477BA5 /* PBXBookmark */; + 56904E90130691B400477BA5 /* PBXBookmark */ = 56904E90130691B400477BA5 /* PBXBookmark */; + 56904E91130691B400477BA5 /* PBXBookmark */ = 56904E91130691B400477BA5 /* PBXBookmark */; + 56904E92130691B400477BA5 /* PBXBookmark */ = 56904E92130691B400477BA5 /* PBXBookmark */; + 56904E93130691B400477BA5 /* PBXBookmark */ = 56904E93130691B400477BA5 /* PBXBookmark */; + 56904E94130691B400477BA5 /* PBXBookmark */ = 56904E94130691B400477BA5 /* PBXBookmark */; + 56904E95130691B400477BA5 /* PBXBookmark */ = 56904E95130691B400477BA5 /* PBXBookmark */; + 56904E96130691B400477BA5 /* PBXBookmark */ = 56904E96130691B400477BA5 /* PBXBookmark */; + 56904E97130691B400477BA5 /* PBXBookmark */ = 56904E97130691B400477BA5 /* PBXBookmark */; + 56904E98130691B400477BA5 /* PBXBookmark */ = 56904E98130691B400477BA5 /* PBXBookmark */; + 56904E99130691B400477BA5 /* PBXBookmark */ = 56904E99130691B400477BA5 /* PBXBookmark */; + 56904E9A130691B400477BA5 /* PBXBookmark */ = 56904E9A130691B400477BA5 /* PBXBookmark */; + 56904E9B130691B400477BA5 /* PBXBookmark */ = 56904E9B130691B400477BA5 /* PBXBookmark */; + 56904E9D130691B400477BA5 /* PBXBookmark */ = 56904E9D130691B400477BA5 /* PBXBookmark */; + 56904E9F130691B400477BA5 /* PBXBookmark */ = 56904E9F130691B400477BA5 /* PBXBookmark */; + 56904EA1130691B400477BA5 /* PBXBookmark */ = 56904EA1130691B400477BA5 /* PBXBookmark */; + 56904EA2130691B400477BA5 /* PBXBookmark */ = 56904EA2130691B400477BA5 /* PBXBookmark */; + 56904EA3130691B400477BA5 /* PBXBookmark */ = 56904EA3130691B400477BA5 /* PBXBookmark */; + 56904EA7130691B400477BA5 /* PBXBookmark */ = 56904EA7130691B400477BA5 /* PBXBookmark */; + 56904EA8130691B400477BA5 /* PBXBookmark */ = 56904EA8130691B400477BA5 /* PBXBookmark */; + 56904EAA130691B400477BA5 /* PBXTextBookmark */ = 56904EAA130691B400477BA5 /* PBXTextBookmark */; + 56904EAC130691B400477BA5 /* PBXTextBookmark */ = 56904EAC130691B400477BA5 /* PBXTextBookmark */; + 56904EAD130691B400477BA5 /* PBXBookmark */ = 56904EAD130691B400477BA5 /* PBXBookmark */; + 56904EC0130691F000477BA5 /* PBXTextBookmark */ = 56904EC0130691F000477BA5 /* PBXTextBookmark */; + 56904EC1130691F000477BA5 /* PBXTextBookmark */ = 56904EC1130691F000477BA5 /* PBXTextBookmark */; + 56904ED4130692BE00477BA5 /* PBXTextBookmark */ = 56904ED4130692BE00477BA5 /* PBXTextBookmark */; + 56904F421306A94700477BA5 /* PBXBookmark */ = 56904F421306A94700477BA5 /* PBXBookmark */; + 56904F431306A94700477BA5 /* PBXBookmark */ = 56904F431306A94700477BA5 /* PBXBookmark */; + 56904F461306A94700477BA5 /* PBXBookmark */ = 56904F461306A94700477BA5 /* PBXBookmark */; + 56904F481306A94700477BA5 /* PBXBookmark */ = 56904F481306A94700477BA5 /* PBXBookmark */; + 56904F491306A94700477BA5 /* PBXBookmark */ = 56904F491306A94700477BA5 /* PBXBookmark */; + 56904F4A1306A94700477BA5 /* PBXBookmark */ = 56904F4A1306A94700477BA5 /* PBXBookmark */; + 56904F4B1306A94700477BA5 /* PBXBookmark */ = 56904F4B1306A94700477BA5 /* PBXBookmark */; + 56904F4C1306A94700477BA5 /* PBXBookmark */ = 56904F4C1306A94700477BA5 /* PBXBookmark */; + 56904F4E1306A94700477BA5 /* PBXBookmark */ = 56904F4E1306A94700477BA5 /* PBXBookmark */; + 56904F4F1306A94700477BA5 /* PBXBookmark */ = 56904F4F1306A94700477BA5 /* PBXBookmark */; + 56904F501306A94700477BA5 /* PBXBookmark */ = 56904F501306A94700477BA5 /* PBXBookmark */; + 56904F511306A94700477BA5 /* PBXBookmark */ = 56904F511306A94700477BA5 /* PBXBookmark */; + 56904F521306A94700477BA5 /* PBXBookmark */ = 56904F521306A94700477BA5 /* PBXBookmark */; + 56904F531306A94700477BA5 /* PBXBookmark */ = 56904F531306A94700477BA5 /* PBXBookmark */; + 56904F541306A94700477BA5 /* PBXBookmark */ = 56904F541306A94700477BA5 /* PBXBookmark */; + 56904F611306B0FF00477BA5 /* PBXBookmark */ = 56904F611306B0FF00477BA5 /* PBXBookmark */; + 56904F681306B16100477BA5 /* PlistBookmark */ = 56904F681306B16100477BA5 /* PlistBookmark */; + 5690501B1306BFE700477BA5 /* PBXTextBookmark */ = 5690501B1306BFE700477BA5 /* PBXTextBookmark */; + 569050301306C93100477BA5 /* PlistBookmark */ = 569050301306C93100477BA5 /* PlistBookmark */; + 569050331306C93100477BA5 /* PBXTextBookmark */ = 569050331306C93100477BA5 /* PBXTextBookmark */; + 569050421306CA2600477BA5 /* PBXBookmark */ = 569050421306CA2600477BA5 /* PBXBookmark */; + 569050431306CA2600477BA5 /* PBXBookmark */ = 569050431306CA2600477BA5 /* PBXBookmark */; + 569050441306CA2600477BA5 /* PBXBookmark */ = 569050441306CA2600477BA5 /* PBXBookmark */; + 569050451306CA2600477BA5 /* PBXBookmark */ = 569050451306CA2600477BA5 /* PBXBookmark */; + 569050461306CA2600477BA5 /* PBXBookmark */ = 569050461306CA2600477BA5 /* PBXBookmark */; + 569050471306CA2600477BA5 /* PBXBookmark */ = 569050471306CA2600477BA5 /* PBXBookmark */; + 569050481306CA2600477BA5 /* PBXBookmark */ = 569050481306CA2600477BA5 /* PBXBookmark */; + 569050491306CA2600477BA5 /* PBXBookmark */ = 569050491306CA2600477BA5 /* PBXBookmark */; + 5690504A1306CA2600477BA5 /* PBXBookmark */ = 5690504A1306CA2600477BA5 /* PBXBookmark */; + 5690504B1306CA2600477BA5 /* PBXBookmark */ = 5690504B1306CA2600477BA5 /* PBXBookmark */; + 5690504C1306CA2600477BA5 /* PBXBookmark */ = 5690504C1306CA2600477BA5 /* PBXBookmark */; + 5690504D1306CA2600477BA5 /* PBXBookmark */ = 5690504D1306CA2600477BA5 /* PBXBookmark */; + 5690508A1306D4FB00477BA5 /* PBXTextBookmark */ = 5690508A1306D4FB00477BA5 /* PBXTextBookmark */; + 569050BB1306E16100477BA5 /* PBXTextBookmark */ = 569050BB1306E16100477BA5 /* PBXTextBookmark */; + 569051661307105400477BA5 /* PBXBookmark */ = 569051661307105400477BA5 /* PBXBookmark */; + 56905183130717F200477BA5 /* PBXTextBookmark */ = 56905183130717F200477BA5 /* PBXTextBookmark */; + 569051C213071CAB00477BA5 /* PBXTextBookmark */ = 569051C213071CAB00477BA5 /* PBXTextBookmark */; + 56B1839213111A6C009F9AEB /* PBXBookmark */ = 56B1839213111A6C009F9AEB /* PBXBookmark */; + 56F121861349CD3000F9B894 /* PBXTextBookmark */ = 56F121861349CD3000F9B894 /* PBXTextBookmark */; + 56F121871349CD3000F9B894 /* PBXTextBookmark */ = 56F121871349CD3000F9B894 /* PBXTextBookmark */; + 56F121881349CD3000F9B894 /* PBXTextBookmark */ = 56F121881349CD3000F9B894 /* PBXTextBookmark */; + 56F121891349CD3000F9B894 /* PBXTextBookmark */ = 56F121891349CD3000F9B894 /* PBXTextBookmark */; + }; + sourceControlManager = 56904CF713065EE600477BA5 /* Source Control */; + userBuildSettings = { + }; + }; + 564976ED13112DC9007562D4 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D6B130660D900477BA5 /* Menu_BG.png */; + }; + 564976EE13112DC9007562D4 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 56904DB11306613600477BA5 /* FacebookAgent.m */; + name = "FacebookAgent.m: 227"; + rLen = 0; + rLoc = 6006; + rType = 0; + vrLen = 801; + vrLoc = 1066; + }; + 564976EF13112DC9007562D4 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 56904DB01306613600477BA5 /* FacebookAgent.h */; + name = "FacebookAgent.h: 255"; + rLen = 0; + rLoc = 5993; + rType = 0; + vrLen = 1179; + vrLoc = 5550; + }; + 56904CEA13065ED500477BA5 /* iValentine */ = { + isa = PBXExecutable; + activeArgIndices = ( + ); + argumentStrings = ( + ); + autoAttachOnCrash = 1; + breakpointsEnabled = 1; + configStateDict = { + }; + customDataFormattersEnabled = 1; + dataTipCustomDataFormattersEnabled = 1; + dataTipShowTypeColumn = 1; + dataTipSortType = 0; + debuggerPlugin = GDBDebugging; + disassemblyDisplayState = 0; + dylibVariantSuffix = ""; + enableDebugStr = 1; + environmentEntries = ( + ); + executableSystemSymbolLevel = 0; + executableUserSymbolLevel = 0; + libgmallocEnabled = 0; + name = iValentine; + savedGlobals = { + }; + showTypeColumn = 0; + sourceDirectories = ( + ); + variableFormatDictionary = { + }; + }; + 56904CF713065EE600477BA5 /* Source Control */ = { + isa = PBXSourceControlManager; + fallbackIsa = XCSourceControlManager; + isSCMEnabled = 0; + scmConfiguration = { + repositoryNamesForRoots = { + "" = ""; + }; + }; + }; + 56904CF813065EE600477BA5 /* Code sense */ = { + isa = PBXCodeSenseManager; + indexTemplatePath = ""; + }; + 56904DB01306613600477BA5 /* FacebookAgent.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {1092, 4035}}"; + sepNavSelRange = "{5993, 0}"; + sepNavVisRange = "{5550, 1179}"; + }; + }; + 56904DB11306613600477BA5 /* FacebookAgent.m */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {1812, 8025}}"; + sepNavSelRange = "{6006, 0}"; + sepNavVisRange = "{1066, 801}"; + }; + }; + 56904DBF1306613600477BA5 /* FBDialog.m */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {921, 8760}}"; + sepNavSelRange = "{8554, 0}"; + sepNavVisRange = "{8439, 1109}"; + }; + }; + 56904DE0130661C900477BA5 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E29E9A741301BC2E008C0D9C /* CardController.h */; + name = "CardController.h: 18"; + rLen = 0; + rLoc = 399; + rType = 0; + vrLen = 474; + vrLoc = 0; + }; + 56904E8F130691B400477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D52130660D900477BA5 /* Box1.png */; + }; + 56904E90130691B400477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D53130660D900477BA5 /* Box2.png */; + }; + 56904E91130691B400477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D54130660D900477BA5 /* Calculate_button.png */; + }; + 56904E92130691B400477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D55130660D900477BA5 /* LoveMeter_Background.png */; + }; + 56904E93130691B400477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D57130660D900477BA5 /* Lovers_Name.png */; + }; + 56904E94130691B400477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D58130660D900477BA5 /* Menu_button.png */; + }; + 56904E95130691B400477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D59130660D900477BA5 /* Needle.png */; + }; + 56904E96130691B400477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D5A130660D900477BA5 /* Needle_Controler.png */; + }; + 56904E97130691B400477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D5B130660D900477BA5 /* Needle_double_size.png */; + }; + 56904E98130691B400477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D5C130660D900477BA5 /* Next_button.png */; + }; + 56904E99130691B400477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D5D130660D900477BA5 /* Reset_button.png */; + }; + 56904E9A130691B400477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D5E130660D900477BA5 /* top_bar.png */; + }; + 56904E9B130691B400477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D60130660D900477BA5 /* Your_Name.png */; + }; + 56904E9D130691B400477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D64130660D900477BA5 /* Credtis_Button_Selected.png */; + }; + 56904E9F130691B400477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D66130660D900477BA5 /* Instructions_Button_Selected.png */; + }; + 56904EA1130691B400477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D68130660D900477BA5 /* Start_Button_Selected.png */; + }; + 56904EA2130691B400477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D67130660D900477BA5 /* Start_Button_Normal.png */; + }; + 56904EA3130691B400477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D56130660D900477BA5 /* LoveMeter_Mockup.png */; + }; + 56904EA7130691B400477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D47130660D900477BA5 /* Heart_Frame_3.png */; + }; + 56904EA8130691B400477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D45130660D900477BA5 /* Heart_Frame_1.png */; + }; + 56904EAA130691B400477BA5 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 28D7ACF60DDB3853001CB0EB /* iValentineViewController.h */; + name = "iValentineViewController.h: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 458; + vrLoc = 0; + }; + 56904EAC130691B400477BA5 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E290042F13045034006B396B /* CreditsVC.h */; + name = "CreditsVC.h: 24"; + rLen = 14; + rLoc = 499; + rType = 0; + vrLen = 521; + vrLoc = 0; + }; + 56904EAD130691B400477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D46130660D900477BA5 /* Heart_Frame_2.png */; + }; + 56904EC0130691F000477BA5 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 28D7ACF70DDB3853001CB0EB /* iValentineViewController.m */; + name = "iValentineViewController.m: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 883; + vrLoc = 0; + }; + 56904EC1130691F000477BA5 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 1D3623250D0F684500981E51 /* iValentineAppDelegate.m */; + name = "iValentineAppDelegate.m: 76"; + rLen = 0; + rLoc = 2675; + rType = 0; + vrLen = 824; + vrLoc = 2220; + }; + 56904ED4130692BE00477BA5 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E290043013045034006B396B /* CreditsVC.m */; + name = "CreditsVC.m: 38"; + rLen = 0; + rLoc = 1174; + rType = 0; + vrLen = 1319; + vrLoc = 616; + }; + 56904F421306A94700477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D63130660D900477BA5 /* Credtis_Button_Normal.png */; + }; + 56904F431306A94700477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D65130660D900477BA5 /* Instructions_Button_Normal.png */; + }; + 56904F461306A94700477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D23130660D900477BA5 /* Full_vuew.png */; + }; + 56904F481306A94700477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D31130660D900477BA5 /* right_arrow.png */; + }; + 56904F491306A94700477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D32130660D900477BA5 /* Share_button.png */; + }; + 56904F4A1306A94700477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D41130660D900477BA5 /* background.png */; + }; + 56904F4B1306A94700477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D42130660D900477BA5 /* credits_fullview.png */; + }; + 56904F4C1306A94700477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904EE01306936A00477BA5 /* Heart_Frame_4.png */; + }; + 56904F4E1306A94700477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D4B130660D900477BA5 /* Instructions_box.png */; + }; + 56904F4F1306A94700477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D4C130660D900477BA5 /* Instructions_fullview.png */; + }; + 56904F501306A94700477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D4D130660D900477BA5 /* instructions_text.png */; + }; + 56904F511306A94700477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D4E130660D900477BA5 /* start_button.png */; + }; + 56904F521306A94700477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D51130660D900477BA5 /* back_button.png */; + }; + 56904F531306A94700477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904F3A1306A91100477BA5 /* 57_taplove.png */; + }; + 56904F541306A94700477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904F3B1306A91100477BA5 /* 512_taplove.png */; + }; + 56904F611306B0FF00477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D43130660D900477BA5 /* Default.png */; + }; + 56904F681306B16100477BA5 /* PlistBookmark */ = { + isa = PlistBookmark; + fRef = 8D1107310486CEB800E47090 /* iValentine-Info.plist */; + fallbackIsa = PBXBookmark; + isK = 0; + kPath = ( + ); + name = "/Users/ranahammad/RanaHammad/Development/SourceCode(s)/iPhone:ipad/FL/AhmadIftikhar/iValentine/iValentine-Info.plist"; + rLen = 0; + rLoc = 9223372036854775808; + }; + 5690501B1306BFE700477BA5 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 56904DBF1306613600477BA5 /* FBDialog.m */; + name = "FBDialog.m: 245"; + rLen = 0; + rLoc = 8554; + rType = 0; + vrLen = 1109; + vrLoc = 8439; + }; + 569050301306C93100477BA5 /* PlistBookmark */ = { + isa = PlistBookmark; + fRef = 569050241306C45F00477BA5 /* Entitlements.plist */; + fallbackIsa = PBXBookmark; + isK = 0; + kPath = ( + "get-task-allow", + ); + name = "/Users/ranahammad/RanaHammad/Development/SourceCode(s)/iPhone:ipad/FL/AhmadIftikhar/iValentine/Entitlements.plist"; + rLen = 0; + rLoc = 9223372036854775808; + }; + 569050331306C93100477BA5 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E29E9A751301BC2E008C0D9C /* CardController.m */; + name = "CardController.m: 34"; + rLen = 0; + rLoc = 1163; + rType = 0; + vrLen = 1064; + vrLoc = 561; + }; + 569050421306CA2600477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D30130660D900477BA5 /* left_arrow.png */; + }; + 569050431306CA2600477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D25130660D900477BA5 /* L1.png */; + }; + 569050441306CA2600477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D2F130660D900477BA5 /* L9.png */; + }; + 569050451306CA2600477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D2E130660D900477BA5 /* L8.png */; + }; + 569050461306CA2600477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D2D130660D900477BA5 /* L7.png */; + }; + 569050471306CA2600477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D2C130660D900477BA5 /* L6.png */; + }; + 569050481306CA2600477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D2B130660D900477BA5 /* L5.png */; + }; + 569050491306CA2600477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D2A130660D900477BA5 /* L4.png */; + }; + 5690504A1306CA2600477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D29130660D900477BA5 /* L3.png */; + }; + 5690504B1306CA2600477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D28130660D900477BA5 /* L2.png */; + }; + 5690504C1306CA2600477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D27130660D900477BA5 /* L11.png */; + }; + 5690504D1306CA2600477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D26130660D900477BA5 /* L10.png */; + }; + 5690508A1306D4FB00477BA5 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E29E9A6E1301B858008C0D9C /* CardsCollection.m */; + name = "CardsCollection.m: 234"; + rLen = 0; + rLoc = 7654; + rType = 0; + vrLen = 1243; + vrLoc = 7379; + }; + 569050BB1306E16100477BA5 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E2A4B2831304403D00BAF88F /* InstructionVC.m */; + name = "InstructionVC.m: 62"; + rLen = 0; + rLoc = 1796; + rType = 0; + vrLen = 1293; + vrLoc = 1300; + }; + 569051661307105400477BA5 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D4A130660D900477BA5 /* Inst_background.png */; + }; + 56905183130717F200477BA5 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E2F5F59112E38961008D07F6 /* LoveMeterVC.h */; + name = "LoveMeterVC.h: 21"; + rLen = 0; + rLoc = 490; + rType = 0; + vrLen = 912; + vrLoc = 0; + }; + 569051C213071CAB00477BA5 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E2F5F59212E38961008D07F6 /* LoveMeterVC.m */; + name = "LoveMeterVC.m: 219"; + rLen = 0; + rLoc = 6917; + rType = 0; + vrLen = 805; + vrLoc = 6712; + }; + 56B1839213111A6C009F9AEB /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 56904D6A130660D900477BA5 /* Full_View.png */; + }; + 56F121861349CD3000F9B894 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E29E9B361301D095008C0D9C /* CustomCardController.h */; + name = "CustomCardController.h: 13"; + rLen = 35; + rLoc = 325; + rType = 0; + vrLen = 1049; + vrLoc = 200; + }; + 56F121871349CD3000F9B894 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E29E9B371301D095008C0D9C /* CustomCardController.m */; + name = "CustomCardController.m: 162"; + rLen = 10; + rLoc = 5117; + rType = 0; + vrLen = 1326; + vrLoc = 4843; + }; + 56F121881349CD3000F9B894 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E2933C091305A12D0050C0C7 /* iValentineConstants.h */; + rLen = 1; + rLoc = 20; + rType = 1; + }; + 56F121891349CD3000F9B894 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = E2933C091305A12D0050C0C7 /* iValentineConstants.h */; + name = "iValentineConstants.h: 21"; + rLen = 95; + rLoc = 329; + rType = 0; + vrLen = 424; + vrLoc = 0; + }; + E290042F13045034006B396B /* CreditsVC.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {921, 515}}"; + sepNavSelRange = "{499, 14}"; + sepNavVisRange = "{0, 521}"; + }; + }; + E290043013045034006B396B /* CreditsVC.m */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {1300, 1530}}"; + sepNavSelRange = "{1174, 0}"; + sepNavVisRange = "{616, 1319}"; + }; + }; + E2933C091305A12D0050C0C7 /* iValentineConstants.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {921, 498}}"; + sepNavSelRange = "{329, 95}"; + sepNavVisRange = "{0, 424}"; + }; + }; + E29E9A6E1301B858008C0D9C /* CardsCollection.m */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {1204, 3915}}"; + sepNavSelRange = "{7654, 0}"; + sepNavVisRange = "{7379, 1243}"; + }; + }; + E29E9A741301BC2E008C0D9C /* CardController.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {848, 390}}"; + sepNavSelRange = "{399, 0}"; + sepNavVisRange = "{0, 474}"; + }; + }; + E29E9A751301BC2E008C0D9C /* CardController.m */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {1300, 915}}"; + sepNavSelRange = "{1163, 0}"; + sepNavVisRange = "{561, 1064}"; + }; + }; + E29E9B361301D095008C0D9C /* CustomCardController.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {921, 675}}"; + sepNavSelRange = "{325, 35}"; + sepNavVisRange = "{200, 1049}"; + }; + }; + E29E9B371301D095008C0D9C /* CustomCardController.m */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {1868, 4380}}"; + sepNavSelRange = "{5117, 10}"; + sepNavVisRange = "{4843, 1326}"; + }; + }; + E2A4B2831304403D00BAF88F /* InstructionVC.m */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {921, 1470}}"; + sepNavSelRange = "{1796, 0}"; + sepNavVisRange = "{1300, 1293}"; + }; + }; + E2F5F59112E38961008D07F6 /* LoveMeterVC.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {921, 630}}"; + sepNavSelRange = "{490, 0}"; + sepNavVisRange = "{0, 912}"; + }; + }; + E2F5F59212E38961008D07F6 /* LoveMeterVC.m */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {1356, 4335}}"; + sepNavSelRange = "{6917, 0}"; + sepNavVisRange = "{6712, 805}"; + }; + }; +} diff --git a/iValentineViewController.xib b/iValentineViewController.xib new file mode 100644 index 0000000..b0f1b07 --- /dev/null +++ b/iValentineViewController.xib @@ -0,0 +1,634 @@ + + + + 1056 + 10J567 + 823 + 1038.35 + 462.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 132 + + + YES + + + + YES + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + YES + + YES + + + YES + + + + YES + + IBFilesOwner + IBCocoaTouchFramework + + + IBFirstResponder + IBCocoaTouchFramework + + + + 274 + + YES + + + 292 + {320, 480} + + NO + IBCocoaTouchFramework + + NSImage + Menu_BG.png + + + + + 292 + {{40, 122}, {240, 80}} + + NO + IBCocoaTouchFramework + 0 + 0 + + Helvetica-Bold + 15 + 16 + + + 3 + MQA + + + 1 + MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA + + + 3 + MC41AA + + + NSImage + Start_Button_Selected.png + + + + NSImage + Start_Button_Normal.png + + + + + 292 + {{40, 205}, {240, 80}} + + NO + IBCocoaTouchFramework + 0 + 0 + + + + 1 + MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA + + + + NSImage + Instructions_Button_Selected.png + + + + NSImage + Instructions_Button_Normal.png + + + + + 292 + {{40, 286}, {240, 80}} + + NO + IBCocoaTouchFramework + 0 + 0 + + + + 1 + MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA + + + + NSImage + Credtis_Button_Selected.png + + + + NSImage + Credtis_Button_Normal.png + + + + {320, 480} + + + 1 + MSAxIDEAA + + NO + IBCocoaTouchFramework + + + + + YES + + + view + + + + 7 + + + + creditAction: + + + 7 + + 11 + + + + instructionAction: + + + 7 + + 12 + + + + startAction: + + + 7 + + 13 + + + + + YES + + 0 + + + + + + -1 + + + File's Owner + + + -2 + + + + + 6 + + + YES + + + + + + + + + 8 + + + + + 9 + + + + + 10 + + + + + 14 + + + + + + + YES + + YES + -1.CustomClassName + -2.CustomClassName + 10.IBPluginDependency + 10.IBViewBoundsToFrameTransform + 14.IBPluginDependency + 14.IBViewBoundsToFrameTransform + 6.IBEditorWindowLastContentRect + 6.IBPluginDependency + 8.IBPluginDependency + 8.IBViewBoundsToFrameTransform + 9.IBPluginDependency + 9.IBViewBoundsToFrameTransform + + + YES + iValentineViewController + UIResponder + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAABCIAAAw7YAAA + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAADDIAAAwsoAAA + + {{439, 276}, {320, 480}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAABBiAAAwzkAAA + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAABBoAAAw4GAAA + + + + + YES + + + YES + + + + + YES + + + YES + + + + 15 + + + + YES + + iValentineViewController + UIViewController + + YES + + YES + creditAction: + instructionAction: + startAction: + + + YES + id + id + id + + + + YES + + YES + creditAction: + instructionAction: + startAction: + + + YES + + creditAction: + id + + + instructionAction: + id + + + startAction: + id + + + + + YES + + YES + creditBtn + instructionBtn + startBtn + + + YES + UIButton + UIButton + UIButton + + + + YES + + YES + creditBtn + instructionBtn + startBtn + + + YES + + creditBtn + UIButton + + + instructionBtn + UIButton + + + startBtn + UIButton + + + + + IBProjectSource + Classes/iValentineViewController.h + + + + + YES + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIAccessibility.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UINibLoading.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIResponder.h + + + + UIButton + UIControl + + IBFrameworkSource + UIKit.framework/Headers/UIButton.h + + + + UIControl + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIControl.h + + + + UIImageView + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIImageView.h + + + + UIResponder + NSObject + + + + UISearchBar + UIView + + IBFrameworkSource + UIKit.framework/Headers/UISearchBar.h + + + + UISearchDisplayController + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UISearchDisplayController.h + + + + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIPrintFormatter.h + + + + UIView + + IBFrameworkSource + UIKit.framework/Headers/UITextField.h + + + + UIView + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIView.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UINavigationController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UIPopoverController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UISplitViewController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UITabBarController.h + + + + UIViewController + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIViewController.h + + + + + 0 + IBCocoaTouchFramework + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 + + + YES + iValentine.xcodeproj + 3 + + YES + + YES + Credtis_Button_Normal.png + Credtis_Button_Selected.png + Instructions_Button_Normal.png + Instructions_Button_Selected.png + Menu_BG.png + Start_Button_Normal.png + Start_Button_Selected.png + + + YES + {240, 80} + {240, 80} + {240, 83} + {240, 83} + {320, 480} + {240, 83} + {240, 83} + + + 132 + + diff --git a/iValentine_Prefix.pch b/iValentine_Prefix.pch new file mode 100644 index 0000000..2111a23 --- /dev/null +++ b/iValentine_Prefix.pch @@ -0,0 +1,8 @@ +// +// Prefix header for all source files of the 'iValentine' target in the 'iValentine' project +// + +#ifdef __OBJC__ + #import + #import +#endif diff --git a/main.m b/main.m new file mode 100644 index 0000000..1150c34 --- /dev/null +++ b/main.m @@ -0,0 +1,17 @@ +// +// main.m +// iValentine +// +// Created by MacPro on 1/17/11. +// Copyright __MyCompanyName__ 2011. 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; +}