Search Results

Search found 103 results on 5 pages for 'nsmutablestring'.

Page 4/5 | < Previous Page | 1 2 3 4 5  | Next Page >

  • NSXMLParser not parsing attributes. No NSXMLParser Error.

    - by Iris
    I am trying to parse the XML located at this URL: http://www.iglooseat.com/gis_iphone_xml.php?zip=06488 // 1) This method gets invoked when the user presses a button on the Iphone to retrieve the xml data (IBAction)getLocations:(id)sender { NSString *msg=nil; NSString *urlString= [[NSString alloc] initWithFormat:@"http://www.iglooseat.com/gis_iphone_xml.php?zip=%@",zipField.text]; // send the URL NSError *error; [siteList updateLocationsFromURL:urlString parseError:&error]; WPSite *w = [siteList siteAtIndex:0]; // alert user what's in the zipField msg = [[NSString alloc] initWithFormat: @"url to send: %@\n site name: %@" , urlString , w.name]; UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Debug" message:msg delegate:self cancelButtonTitle:@"Ok" otherButtonTitles:nil]; [urlString release]; [alert show]; [alert release]; [msg release]; } // 2) This function takes the URL and performs XML parsing on the data at that URL. (void)updateLocationsFromURL:(NSString )urlString parseError:(NSError *)error{ /* NSURL class that inherits from NSObject class that provides a way to manipulate URLs and the resources they reference. */ NSURL *url = [[NSURL alloc] initWithString:urlString]; /* initWithContentsOfURL: initializes a newly allocated data object initialized with the data from the location specified by a URL. */ NSXMLParser *parser = [[NSXMLParser alloc] initWithContentsOfURL:url]; // init bool to NO errorConnecting = NO; // release from mem the NSURfile://localhost/Users/icheung/Desktop/WPMap/Classes/WPSite.mL [url release]; // set parser delgate to self [parser setDelegate:self]; // don't process namespace [parser setShouldProcessNamespaces:YES]; // or namespace prefixes [parser setShouldReportNamespacePrefixes:NO]; /* don't care 'bout external (ex. don't perform I/O op's to load external DTD's (Document Type Definitions)) */ [parser setShouldResolveExternalEntities:NO]; // start the event-driven parsing operation [parser parse]; // get NSError object if an error occured during parsing NSError *parseError = [parser parserError]; if(parseError && error) { *error = parseError; NSLog(@"Error code:%d %@", parseError.code, parseError.domain); errorConnecting = YES; } // relase from mem the parser [parser release]; } // 3) In the parser:didStartElement:namespaceURI:qualifiedName:attributes: I attempt to extract the 'state' attribute from a 'marker' element in my xml. When I use the gdb debugger to inspect the contents of attributeDict it is empty and I'm not sure why. (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName attributes:(NSDictionary *)attributeDict { if(self.parserContentOfCurrentProperty == nil) { NSMutableString *tmp = [[NSMutableString alloc] init]; self.parserContentOfCurrentProperty = tmp; [tmp release]; } [self.parserContentOfCurrentProperty setString:@""]; self.parserNameOfCurrentProperty = elementName; if ([elementName isEqualToString:@"markers"]) { WPSite *tmp = [WPSite alloc]; self.parserCurrentSite = tmp; // retrive value for attribute NSString *stateAttribute = [attributeDict valueForKey:@"state"]; if (stateAttribute) { [self.parserCurrentSite setState:stateAttribute]; } // add this site to the site list [siteList addObject:self.parserCurrentSite]; return; } }

    Read the article

  • reading Twitter API with JSON framework

    - by iPixFolio
    Hi, I'm building a twitter reader into an app. I'm using this JSON library to parse the twitter API. I'm seeing some odd results on certain messages. I know that the Twitter API returns results in UTF8 format. I'm wondering if I'm doing something wrong when reading the JSON parsed fields. My code is spread out across multiple classes so it's hard to give a concise code drop with the symptoms, but here's what I've got: I am using ASIHTTP for async HTTP processing. Here is processing a response from ASIHTTP: ... NSMutableString* tempString = [[NSMutableString alloc] initWithString:[request responseString]]; NSError *error; SBJSON *json = [[SBJSON alloc] init]; id JSONresponse = [json objectWithString:tempString error:&error]; [tempString release]; [json release]; if (JSONresponse) { self.response = JSONresponse; ... self.response holds the JSON representation of the result from the Twitter call. Now, I will take the JSON response and write each tweet into a container object (Tweet). in the following code, the response from above is referenced as request.response: ... // save list of albums to local cache for (NSDictionary* response in request.response) { Tweet* tweet = [[Tweet alloc] init]; tweet.text = [response objectForKey:@"text"]; tweet.id = [response objectForKey:@"id"]; tweet.created = [response objectForKey:@"created_at"]; [Tweet addTweet:tweet]; [tweet release]; } ... at this point, I have a container holding the tweets. I'm only keeping 3 fields from the tweet: "id", "text", and "created_at". the "text" field is the problem field. To display the tweets, I build an HTML page from the container of tweets, like this: ... Tweet* tweet = nil; for (int i = 0; i < [Tweet tweetCount]; i++) { tweet = [Tweet tweetAtIndex:i]; [html appendString:@"<div class='tweet'>"]; [html appendFormat:@"<div class='tweet-date'>%@</div>", tweet.created ]; [html appendFormat:@"<div class='tweet-text'>%@</div>", tweet.text ]; [html appendString:@"</div>"]; } ... In another routine, I save the HTML page to a temp file. if (html && [html length] > 0 ) { NSString* uniqueString = [[NSProcessInfo processInfo] globallyUniqueString]; NSString* filename = [NSString stringWithFormat:@"%@.html", uniqueString ]; filename = [tempDir stringByAppendingPathComponent:filename]; NSError* error = nil; [html writeToFile:filename atomically:NO encoding:NSUTF8StringEncoding error:&error]; ... I then create a URLRequest from the file and load it into an UIWebview: NSURL* url = [NSURL fileURLWithPath:filename]; NSURLRequest* request = [NSURLRequest requestWithURL:url]; [self.webView loadRequest:request]; ... At this point, I can see the tweets in a browser window. some of the tweets will show invalid characters like this: iPhone 4 ad spoofed with Glee’s Jane Lynch ... Glee’s should be Glee's Can anybody shed any light on what I'm doing wrong and offer suggestions on how to fix? basically, to summarize: I'm reading a UTF8 feed with JSON I write the UTF8 strings into an HTML file I display the HTML file with UIWebview. some of the UTF8 strings are not properly decoded. I need to know where to decode them and how to do it. thanks! Mark

    Read the article

  • CoreData: managedObjectContext not being created

    - by PruitIgoe
    I had to add core data to an existing project but I am having issues with the managedObjectContext... in prefix.pch I have this: #import <Availability.h> #ifndef __IPHONE_5_0 #warning "This project uses features only available in iOS SDK 5.0 and later." #endif #ifdef __OBJC__ #import <UIKit/UIKit.h> #import <Foundation/Foundation.h> #import <CoreData/CoreData.h> #endif ... in my appDelegate.h I have this: #import <UIKit/UIKit.h> #import "AppViewController.h" #import "DDLog.h" #import "DDASLLogger.h" #import "DDFileLogger.h" #import "DDTTYLogger.h" #import "KIP_LogManager.h" @interface AppDelegate : UIResponder <UIApplicationDelegate> { DDFileLogger* fileLogger; /*coredata*/ NSManagedObjectModel* managedObjectModel; NSManagedObjectContext* managedObjectContext; NSPersistentStoreCoordinator* persistentStoreCoordinator; } @property (strong, nonatomic) UIWindow *window; @property (strong, nonatomic) AppViewController* viewController; @property (readonly, strong, nonatomic) NSManagedObjectContext* managedObjectContext; @property (readonly, strong, nonatomic) NSManagedObjectModel* managedObjectModel; @property (readonly, strong, nonatomic) NSPersistentStoreCoordinator* persistentStoreCoordinator; - (void)setupLogging; - (NSString *)applicationDocumentsDirectory; in appDelegate.m this: @synthesize managedObjectContext = _managedObjectContext; @synthesize managedObjectModel = _managedObjectModel; @synthesize persistentStoreCoordinator = _persistentStoreCoordinator; ... - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { //establish lumberjack logging [self setupLogging]; DDLogVerbose(@"\n\n*********************\nNEW LOG SESSION\n**********************\n\n"); //set root view controller self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; self.viewController = [[AppViewController alloc] init]; self.window.rootViewController = self.viewController; self.viewController.managedObjectContext = _managedObjectContext; return YES; } ... #pragma mark - CoreData Stack - (NSManagedObjectContext *)managedObjectContext { if (_managedObjectContext != nil) { return _managedObjectContext; } NSPersistentStoreCoordinator *coordinator = [self persistentStoreCoordinator]; if (coordinator != nil) { _managedObjectContext = [[NSManagedObjectContext alloc] init]; [_managedObjectContext setPersistentStoreCoordinator:coordinator]; } return _managedObjectContext; } // Returns the managed object model for the application. // If the model doesn't already exist, it is created from the application's model. - (NSManagedObjectModel *)managedObjectModel { if (_managedObjectModel != nil) { return _managedObjectModel; } NSURL *modelURL = [[NSBundle mainBundle] URLForResource:@"SPI_PAC" withExtension:@"momd"]; _managedObjectModel = [[NSManagedObjectModel alloc] initWithContentsOfURL:modelURL]; return _managedObjectModel; } - (NSPersistentStoreCoordinator *)persistentStoreCoordinator { if (persistentStoreCoordinator != nil) { return persistentStoreCoordinator; } NSMutableString* strDocsDirector = [[NSMutableString alloc] initWithString:[self applicationDocumentsDirectory]]; [strDocsDirector appendString:@"/SPI_PAC.sqlite"]; NSURL* storeURL = [NSURL URLWithString:strDocsDirector]; NSError *error = nil; persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:[self managedObjectModel]]; if(![persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeURL options:nil error:&error]) { /*Error for store creation should be handled in here*/ } return persistentStoreCoordinator; } - (NSString *)applicationDocumentsDirectory { return [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject]; } in the view controller, viewDidLoad I am logging the passed managedObjectContext and am getting null returned. Obviously I am missing something but not sure what? In viewcontroller.h I have: @property (nonatomic, retain) NSManagedObjectModel* managedObjectModel; @property (nonatomic, retain) NSManagedObjectContext* managedObjectContext; @property (nonatomic, retain) NSPersistentStoreCoordinator* persistentStoreCoordinator; and in the viewcontroller.m: @synthesize managedObjectContext = managedObjectContext; ... DDLogVerbose(@"%@", managedObjectContext);

    Read the article

  • Cant bind data to a table view

    - by sudhakarilla
    Hi, I have retrieved data from Json URL and displayed it in a table view. I have also inlcuced a button in table view. On clicking the button the data must be transferred to a another table view. The problem is that i could send the data to a view and could display it on a label. But i couldnt bind the dat to table view ... Here's some of the code snippets... Buy Button... -(IBAction)Buybutton{ /* UIAlertView *alert =[[UIAlertView alloc]initWithTitle:@"thank u" message:@"products" delegate:nil cancelButtonTitle:@"ok" otherButtonTitles:nil]; [alert show]; [alert release];*/ Product *selectedProduct = [[data products]objectAtIndex:0]; CartViewController *cartviewcontroller = [[[CartViewController alloc] initWithNibName:@"CartViewController" bundle:nil]autorelease]; cartviewcontroller.product= selectedProduct; //NSString *productname=[product ProductName]; //[currentproducts setproduct:productname]; [self.view addSubview:cartviewcontroller.view]; } CartView... // Implement viewDidLoad to do additional setup after loading the view, typically from a nib. - (void)viewDidLoad { [super viewDidLoad]; data = [GlobalData SharedData]; NSMutableArray *prod =[[NSMutableArray alloc]init]; prod = [data products]; for(NSDictionary *product in prod) { Cart *myprod = [[Cart alloc]init]; myprod.Description = [product Description]; myprod.ProductImage =[product ProductImage]; myprod.ProductName = [product ProductName]; myprod.SalePrice = [product SalePrice]; [data.carts addObject:myprod]; [myprod release]; } Cart *cart = [[data carts]objectAtIndex:0]; NSString *productname=[cart ProductName]; self.label.text =productname; NSLog(@"carts"); } (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 1; } (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return [data.carts count]; } -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { return 75; } (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { NSLog(@"cellforrow"); static NSString *CellIdentifier = @"Cell"; ProductCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if(cell ==nil) { cell = [[[ProductCell alloc]initWithFrame:CGRectZero reuseIdentifier:CellIdentifier]autorelease]; } NSUInteger row = [indexPath row]; Cart *cart = [[data carts]objectAtIndex:row]; cell.productNameLabel.text = [cart ProductName]; /*NSString *sale = [[NSString alloc]initWithFormat:@"SalePrice:%@",[cart SalePrice]]; cell.salePriceLabel.text = sale; cell.DescriptionLabel.text = [cart Description]; NSMutableString imageUrl =[NSMutableString string]; [imageUrl appendFormat:@"http://demo.s2commerce.net/DesktopModules/S2Commerce/Images/Products/%@",[product ProductImage]]; NSLog(@"imageurl:%@",imageUrl); NSString mapURL = [imageUrl stringByReplacingPercentEscapesUsingEncoding:NSASCIIStringEncoding]; NSData* imageData = [[NSData alloc]initWithContentsOfURL:[NSURL URLWithString:mapURL]]; UIImage* image = [[UIImage alloc]initWithData:imageData]; cell.productImageview.image = image; [imageData release]; [image release];*/ return cell; } I am also getting the following error in the console 2010-06-11 18:34:29.169 navigation[4109:207] * -[CartViewController tableView:numberOfRowsInSection:]: message sent to deallocated instance 0xcb4d4f90

    Read the article

  • Push notification not received in ios5 device

    - by Surender Rathore
    I am sending push notification on device which has iOS 5.0.1, but notification is not received on iOS5 device. If i try to send notification on iOS4.3.3 device, it received on this device. My server is developed in c# and apple push notification certificate is used in .p12 format. My code to register the notification is - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. // Set the navigation controller as the window's root view controller and display. deviceToken = nil; self.window.rootViewController = self.navigationController; [self.window makeKeyAndVisible]; [[UIApplication sharedApplication] enabledRemoteNotificationTypes]; [[UIApplication sharedApplication] registerForRemoteNotificationTypes: UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert]; return YES; } - (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)devToken { UIAlertView *alertView=[[UIAlertView alloc]initWithTitle:@"Succeeded in registering for APNS" message:@"Sucess" delegate:self cancelButtonTitle:@"Ok" otherButtonTitles:nil]; [alertView show]; [alertView release]; deviceToken = [devToken retain]; NSMutableString *dev = [[NSMutableString alloc] init]; NSRange r; r.length = 1; unsigned char c; for (int i = 0; i < [deviceToken length]; i++) { r.location = i; [deviceToken getBytes:&c range:r]; if (c < 10) { [dev appendFormat:@"0%x", c]; } else { [dev appendFormat:@"%x", c]; } } NSUserDefaults *def = [NSUserDefaults standardUserDefaults]; [def setObject:dev forKey:@"DeviceToken"]; [def synchronize]; NSLog(@"Registered for APNS %@\n%@", deviceToken, dev); [dev release]; } - (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error { NSLog(@"Failed to register %@", [error localizedDescription]); UIAlertView *alertView=[[UIAlertView alloc]initWithTitle:@"FAILED" message:@"Fail" delegate:self cancelButtonTitle:@"Ok" otherButtonTitles:nil]; [alertView show]; [alertView release]; deviceToken = nil; } - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo { NSLog(@"Recieved Remote Notification %@", userInfo); NSDictionary *aps = [userInfo objectForKey:@"aps"]; NSDictionary *alert = [aps objectForKey:@"alert"]; //NSString *actionLocKey = [alert objectForKey:@"action-loc-key"]; NSString *body = [alert objectForKey:@"body"]; // NSMutableArray *viewControllers = [NSMutableArray arrayWithArray:[self.navigationController viewControllers]]; // // if ([viewControllers count] > 2) { // NSRange r; // r.length = [viewControllers count] - 2; // r.location = 2; // [viewControllers removeObjectsInRange:r]; // // MapViewController *map = (MapViewController*)[viewControllers objectAtIndex:1]; // [map askDriver]; // } // // [self.navigationController setViewControllers:viewControllers]; // [viewControllers release]; //NewBooking,"BookingId",Passenger_latitude,Passenger_longitude,Destination_latitude,Destination_longitude,Distance,Time,comments NSArray *arr = [body componentsSeparatedByString:@","]; if ([arr count]>0) { MapViewController *map = (MapViewController*)[[self.navigationController viewControllers] objectAtIndex:1]; [map askDriver:arr]; [self.navigationController popToViewController:[[self.navigationController viewControllers] objectAtIndex:1] animated:YES]; } //NSString *sound = [userInfo objectForKey:@"sound"]; //UIAlertView *alertV = [[UIAlertView alloc] initWithTitle:actionLocKey // message:body delegate:nil // cancelButtonTitle:@"Reject" // otherButtonTitles:@"Accept", nil]; // // [alertV show]; // [alertV release]; } Can anyone help me out with this issue. Why notification received on iOS4.3 device but not on iOS5? Thank you very much!!! in advance

    Read the article

  • Undefined symbols after installing new xcode 3.2.3 build

    - by toofah
    I want to move to the new XCode 3.2.3 GM Seed build for development, but when I bring up my project I get 'base sdk missing' because my project is set to use iPhone SDK 3.0. If I change 'base SDK' to iPhone 3.2 or 4.0 and then compile I get a lot of errors that I don't understand. I dumped a few of them below. Can anyone tell me what I am missing? Also, can someone confirm that if I choose 'base sdk' of iPhone 3.2 or 4.0 that I can still choose 'target device' of iPhone 3.0 and not force my customers to install the new SDK. I really don't want to be the app that forces my customers to upgrade their OS. Thanks! Undefined symbols: ".objc_class_name_NSObject", referenced from: .objc_class_name_FlurryAPI in libFlurry.a(FlurryAPI.o) .objc_class_name_FlurrySession in libFlurry.a(FlurrySession.o) .objc_class_name_FlurryHTTPEater in libFlurry.a(FlurryHTTPEater.o) .objc_class_name_FlurryHTTPResponse in libFlurry.a(FlurryHTTPResponse.o) .objc_class_name_FlurryConnectionDelegate in libFlurry.a(FlurryConnectionDelegate.o) .objc_class_name_FlurryAd in libFlurry.a(FlurryAd.o) .objc_class_name_FlurryAdParser in libFlurry.a(FlurryAdParser.o) literal-pointer@_OBJC@_cls_refs@NSObject in libFlurry.a(FlurryAdView.o) .objc_class_name_FlurryAdImage in libFlurry.a(FlurryAdImage.o) .objc_class_name_FlurryAdImpression in libFlurry.a(FlurryAdImpression.o) .objc_class_name_FlurryPageViewDelegate in libFlurry.a(FlurryPageViewDelegate.o) .objc_class_name_FlurryAdTheme in libFlurry.a(FlurryAdTheme.o) .objc_class_name_FlurryAdHook in libFlurry.a(FlurryAdHook.o) .objc_class_name_FlurryAdProperties in libFlurry.a(FlurryAdProperties.o) .objc_class_name_FlurryFileCache in libFlurry.a(FlurryFileCache.o) .objc_class_name_FlurryEvent in libFlurry.a(FlurryEvent.o) .objc_class_name_FlurryProtocolData in libFlurry.a(FlurryProtocolData.o) .objc_class_name_FlurryAdAssignment in libFlurry.a(FlurryAdAssignment.o) .objc_class_name_FlurryAdAppStoreConnectionDelegate in libFlurry.a(FlurryAdAppStoreConnectionDelegate.o) .objc_class_name_FlurryHeartBeater in libFlurry.a(FlurryHeartBeater.o) .objc_class_name_FlurryImageCache in libFlurry.a(FlurryImageCache.o) .objc_class_name_FlurryUtil in libFlurry.a(FlurryUtil.o) .objc_class_name_FlurryAdNavigationDelegate in libFlurry.a(FlurryAdNavigationDelegate.o) .objc_class_name_FlurryAdLocation in libFlurry.a(FlurryAdLocation.o) .objc_class_name_FlurryAdDimension in libFlurry.a(FlurryAdDimension.o) .objc_class_name_FlurryAdTextStyle in libFlurry.a(FlurryAdTextStyle.o) ".objc_class_name_NSFileManager", referenced from: literal-pointer@_OBJC@_cls_refs@NSFileManager in libFlurry.a(FlurrySession.o) literal-pointer@_OBJC@_cls_refs@NSFileManager in libFlurry.a(FlurryFileCache.o) ".objc_class_name_NSString", referenced from: literal-pointer@_OBJC@_cls_refs@NSString in libFlurry.a(FlurrySession.o) literal-pointer@_OBJC@_cls_refs@NSString in libFlurry.a(FlurryHTTPEater.o) literal-pointer@_OBJC@_cls_refs@NSString in libFlurry.a(FlurryHTTPResponse.o) literal-pointer@_OBJC@_cls_refs@NSString in libFlurry.a(FlurryAd.o) literal-pointer@_OBJC@_cls_refs@NSString in libFlurry.a(FlurryAdParser.o) literal-pointer@_OBJC@_cls_refs@NSString in libFlurry.a(FlurryAdCanvasViewController.o) literal-pointer@_OBJC@_cls_refs@NSString in libFlurry.a(FlurryFileCache.o) literal-pointer@_OBJC@_cls_refs@NSString in libFlurry.a(FlurryImageCache.o) ".objc_class_name_NSError", referenced from: literal-pointer@_OBJC@_cls_refs@NSError in libFlurry.a(FlurryUtil.o) "_OBJC_METACLASS_$_FlurryAPI", referenced from: _OBJC_METACLASS_$_NFlurryAPI in NFlurryAPI.o ".objc_class_name_UIWindow", referenced from: literal-pointer@_OBJC@_cls_refs@UIWindow in libFlurry.a(FlurryAdCanvasViewController.o) ".objc_class_name_NSException", referenced from: literal-pointer@_OBJC@_cls_refs@NSException in libFlurry.a(FlurrySession.o) literal-pointer@_OBJC@_cls_refs@NSException in libFlurry.a(FlurryUtil.o) ".objc_class_name_UIColor", referenced from: literal-pointer@_OBJC@_cls_refs@UIColor in libFlurry.a(FlurryAdParser.o) literal-pointer@_OBJC@_cls_refs@UIColor in libFlurry.a(FlurryAdView.o) literal-pointer@_OBJC@_cls_refs@UIColor in libFlurry.a(FlurryAdCanvasViewController.o) literal-pointer@_OBJC@_cls_refs@UIColor in libFlurry.a(FlurryAdCanvasView.o) "_OBJC_CLASS_$_FlurryAPI", referenced from: _OBJC_CLASS_$_NFlurryAPI in NFlurryAPI.o ".objc_class_name_NSMutableSet", referenced from: literal-pointer@_OBJC@_cls_refs@NSMutableSet in libFlurry.a(FlurryAdAssignment.o) ".objc_class_name_UIFont", referenced from: literal-pointer@_OBJC@_cls_refs@UIFont in libFlurry.a(FlurryAdView.o) literal-pointer@_OBJC@_cls_refs@UIFont in libFlurry.a(FlurryAdCanvasView.o) ".objc_class_name_UIImage", referenced from: literal-pointer@_OBJC@_cls_refs@UIImage in libFlurry.a(FlurryAdParser.o) literal-pointer@_OBJC@_cls_refs@UIImage in libFlurry.a(FlurryAdImage.o) ".objc_class_name_UIApplication", referenced from: literal-pointer@_OBJC@_cls_refs@UIApplication in libFlurry.a(FlurryAdView.o) literal-pointer@_OBJC@_cls_refs@UIApplication in libFlurry.a(FlurryAdCanvasViewController.o) literal-pointer@_OBJC@_cls_refs@UIApplication in libFlurry.a(FlurryAdAppStoreConnectionDelegate.o) ".objc_class_name_UILabel", referenced from: literal-pointer@_OBJC@_cls_refs@UILabel in libFlurry.a(FlurryAdView.o) literal-pointer@_OBJC@_cls_refs@UILabel in libFlurry.a(FlurryAdCanvasViewController.o) literal-pointer@_OBJC@_cls_refs@UILabel in libFlurry.a(FlurryAdCanvasView.o) ".objc_class_name_UIView", referenced from: literal-pointer@_OBJC@_cls_refs@UIView in libFlurry.a(FlurryAdView.o) .objc_class_name_FlurryAdView in libFlurry.a(FlurryAdView.o) literal-pointer@_OBJC@_cls_refs@UIView in libFlurry.a(FlurryAdCanvasViewController.o) .objc_class_name_FlurryAdListView in libFlurry.a(FlurryAdListView.o) ".objc_class_name_NSMutableString", referenced from: literal-pointer@_OBJC@_cls_refs@NSMutableString in libFlurry.a(FlurrySession.o) literal-pointer@_OBJC@_cls_refs@NSMutableString in libFlurry.a(FlurryHTTPEater.o) literal-pointer@_OBJC@_cls_refs@NSMutableString in libFlurry.a(FlurryAdView.o) ".objc_class_name_NSTimer", referenced from: literal-pointer@_OBJC@_cls_refs@NSTimer in libFlurry.a(FlurryHeartBeater.o) ".objc_class_name_NSMutableData", referenced from: literal-pointer@_OBJC@_cls_refs@NSMutableData in libFlurry.a(FlurrySession.o) literal-pointer@_OBJC@_cls_refs@NSMutableData in libFlurry.a(FlurryConnectionDelegate.o) literal-pointer@_OBJC@_cls_refs@NSMutableData in libFlurry.a(FlurryAdImpression.o) literal-pointer@_OBJC@_cls_refs@NSMutableData in libFlurry.a(FlurryEvent.o) ".objc_class_name_NSNumber", referenced from: literal-pointer@_OBJC@_cls_refs@NSNumber in libFlurry.a(FlurryAPI.o) literal-pointer@_OBJC@_cls_refs@NSNumber in libFlurry.a(FlurrySession.o) literal-pointer@_OBJC@_cls_refs@NSNumber in libFlurry.a(FlurryAdParser.o) literal-pointer@_OBJC@_cls_refs@NSNumber in libFlurry.a(FlurryAdView.o) literal-pointer@_OBJC@_cls_refs@NSNumber in libFlurry.a(FlurryAdImpression.o) literal-pointer@_OBJC@_cls_refs@NSNumber in libFlurry.a(FlurryAdCanvasViewController.o) "_objc_exception_match", referenced from: +[FlurrySession createActiveFlurrySession:] in libFlurry.a(FlurrySession.o) +[FlurrySession dataForSessions:requestAds:] in libFlurry.a(FlurrySession.o) +[FlurrySession initialTimestamp] in libFlurry.a(FlurrySession.o) ".objc_class_name_UINavigationItem", referenced from: literal-pointer@_OBJC@_cls_refs@UINavigationItem in libFlurry.a(FlurryAdCanvasViewController.o) ".objc_class_name_UIViewController", referenced from: literal-pointer@_OBJC@_cls_refs@UIViewController in libFlurry.a(FlurryAdView.o) .objc_class_name_FlurryAdCanvasViewController in libFlurry.a(FlurryAdCanvasViewController.o) ".objc_class_name_NSMutableArray", referenced from: literal-pointer@_OBJC@_cls_refs@NSMutableArray in libFlurry.a(FlurrySession.o) literal-pointer@_OBJC@_cls_refs@NSMutableArray in libFlurry.a(FlurryHTTPEater.o) literal-pointer@_OBJC@_cls_refs@NSMutableArray in libFlurry.a(FlurryAdParser.o) literal-pointer@_OBJC@_cls_refs@NSMutableArray in libFlurry.a(FlurryImageCache.o) literal-pointer@_OBJC@_cls_refs@NSMutableArray in libFlurry.a(FlurryAdNavigationDelegate.o) ".objc_class_name_UIScreen", referenced from: literal-pointer@_OBJC@_cls_refs@UIScreen in libFlurry.a(FlurryAdCanvasViewController.o) ".objc_class_name_NSURLCache", referenced from: literal-pointer@_OBJC@_cls_refs@NSURLCache in libFlurry.a(FlurryHTTPEater.o) ".objc_class_name_NSNotificationCenter", referenced from: literal-pointer@_OBJC@_cls_refs@NSNotificationCenter in libFlurry.a(FlurryAPI.o) literal-pointer@_OBJC@_cls_refs@NSNotificationCenter in libFlurry.a(FlurryAdParser.o) literal-pointer@_OBJC@_cls_refs@NSNotificationCenter in libFlurry.a(FlurryAdView.o) literal-pointer@_OBJC@_cls_refs@NSNotificationCenter in libFlurry.a(FlurryHeartBeater.o) ".objc_class_name_NSInvocation", referenced from: literal-pointer@_OBJC@_cls_refs@NSInvocation in libFlurry.a(FlurryPageViewDelegate.o) ".objc_class_name_NSURL", referenced from: literal-pointer@_OBJC@_cls_refs@NSURL in libFlurry.a(FlurrySession.o) literal-pointer@_OBJC@_cls_refs@NSURL in libFlurry.a(FlurryHTTPEater.o) literal-pointer@_OBJC@_cls_refs@NSURL in libFlurry.a(FlurryAdView.o) literal-pointer@_OBJC@_cls_refs@NSURL in libFlurry.a(FlurryAdCanvasViewController.o) "_objc_exception_extract", referenced from: +[FlurryAPI startSession:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI startSession:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI endSession] in libFlurry.a(FlurryAPI.o) +[FlurryAPI endSession] in libFlurry.a(FlurryAPI.o) +[FlurryAPI pauseSession] in libFlurry.a(FlurryAPI.o) +[FlurryAPI pauseSession] in libFlurry.a(FlurryAPI.o) +[FlurryAPI resumeSession] in libFlurry.a(FlurryAPI.o) +[FlurryAPI resumeSession] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logEvent:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logEvent:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logEvent:withParameters:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logEvent:withParameters:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logEvent:timed:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logEvent:timed:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logEvent:withParameters:timed:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logEvent:withParameters:timed:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI endTimedEvent:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI endTimedEvent:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logError:message:exception:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logError:message:exception:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logError:message:error:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logError:message:error:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI countPageViews:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI countPageViews:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI countPageView] in libFlurry.a(FlurryAPI.o) +[FlurryAPI countPageView] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setUserID:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setUserID:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setEventLoggingEnabled:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setEventLoggingEnabled:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setServerURL:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setServerURL:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setCanvasURL:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setCanvasURL:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setLandscapeCanvasURL:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setLandscapeCanvasURL:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setAppStoreURL:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setAppStoreURL:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setSessionReportsOnCloseEnabled:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setSessionReportsOnCloseEnabled:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setAppVersion:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setAppVersion:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setGender:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setGender:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setAge:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setAge:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI getHook:xLoc:yLoc:view:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI getHook:xLoc:yLoc:view:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI getHook:xLoc:yLoc:view:attachToView:orientation:canvasOrientation:autoRefresh:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI getHook:xLoc:yLoc:view:attachToView:orientation:canvasOrientation:autoRefresh:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI updateHook:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI updateHook:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI removeHook:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI removeHook:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI openCatalog:canvasOrientation:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI openCatalog:canvasOrientation:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setAppCircleDelegate:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setAppCircleDelegate:] in libFlurry.a(FlurryAPI.o) +[FlurrySession createActiveFlurrySession:] in libFlurry.a(FlurrySession.o) +[FlurrySession createActiveFlurrySession:] in libFlurry.a(FlurrySession.o) +[FlurrySession sendSessionsToServerWithTimeout:useWebView:requestAds:] in libFlurry.a(FlurrySession.o) +[FlurrySession sendSessionsToServerWithTimeout:useWebView:requestAds:] in libFlurry.a(FlurrySession.o) +[FlurrySession dataForSessions:requestAds:] in libFlurry.a(FlurrySession.o) +[FlurrySession dataForSessions:requestAds:] in libFlurry.a(FlurrySession.o) +[FlurrySession initialTimestamp] in libFlurry.a(FlurrySession.o) +[FlurrySession initialTimestamp] in libFlurry.a(FlurrySession.o) +[FlurryAdParser oldInstance] in libFlurry.a(FlurryAdParser.o) +[FlurryAdParser instance] in libFlurry.a(FlurryAdParser.o) -[FlurryAdView initWithAd:hook:xLoc:yLoc:parent:attachToView:orientation:canvasOrientation:autoRefresh:] in libFlurry.a(FlurryAdView.o) -[FlurryAdView initWithAd:hook:xLoc:yLoc:parent:attachToView:orientation:canvasOrientation:autoRefresh:] in libFlurry.a(FlurryAdView.o) -[FlurryAdView refreshWithAd] in libFlurry.a(FlurryAdView.o) -[FlurryAdView refreshWithAd] in libFlurry.a(FlurryAdView.o) -[FlurryAdView updateToOrientation] in libFlurry.a(FlurryAdView.o) -[FlurryAdView updateToOrientation] in libFlurry.a(FlurryAdView.o) -[FlurryAdView touchesEnded:withEvent:] in libFlurry.a(FlurryAdView.o) -[FlurryAdView touchesEnded:withEvent:] in libFlurry.a(FlurryAdView.o) -[FlurryAdView alertView:clickedButtonAtIndex:] in libFlurry.a(FlurryAdView.o) -[FlurryAdView alertView:clickedButtonAtIndex:] in libFlurry.a(FlurryAdView.o) -[FlurryAdView checkBannerLocation] in libFlurry.a(FlurryAdView.o) -[FlurryAdView checkBannerLocation] in libFlurry.a(FlurryAdView.o) -[FlurryAdView dealloc] in libFlurry.a(FlurryAdView.o) -[FlurryAdView dealloc] in libFlurry.a(FlurryAdView.o) -[FlurryPageViewDelegate navigationController:didShowViewController:animated:] in libFlurry.a(FlurryPageViewDelegate.o) -[FlurryPageViewDelegate navigationController:didShowViewController:animated:] in libFlurry.a(FlurryPageViewDelegate.o) -[FlurryPageViewDelegate navigationController:willShowViewController:animated:] in libFlurry.a(FlurryPageViewDelegate.o) -[FlurryPageViewDelegate navigationController:willShowViewController:animated:] in libFlurry.a(FlurryPageViewDelegate.o) -[FlurryPageViewDelegate tabBarController:shouldSelectViewController:] in libFlurry.a(FlurryPageViewDelegate.o) -[FlurryPageViewDelegate tabBarController:shouldSelectViewController:] in libFlurry.a(FlurryPageViewDelegate.o) -[FlurryPageViewDelegate tabBarController:didSelectViewController:] in libFlurry.a(FlurryPageViewDelegate.o) -[FlurryPageViewDelegate tabBarController:didSelectViewController:] in libFlurry.a(FlurryPageViewDelegate.o) -[FlurryPageViewDelegate tabBarController:willBeginCustomizingViewControllers:] in libFlurry.a(FlurryPageViewDelegate.o) -[FlurryPageViewDelegate tabBarController:willBeginCustomizingViewControllers:] in libFlurry.a(FlurryPageViewDelegate.o) -[FlurryPageViewDelegate tabBarController:willEndCustomizingViewControllers:changed:] in libFlurry.a(FlurryPageViewDelegate.o) -[FlurryPageViewDelegate tabBarController:willEndCustomizingViewControllers:changed:] in libFlurry.a(FlurryPageViewDelegate.o) -[FlurryPageViewDelegate tabBarController:didEndCustomizingViewControllers:changed:] in libFlurry.a(FlurryPageViewDelegate.o) -[FlurryPageViewDelegate tabBarController:didEndCustomizingViewControllers:changed:] in libFlurry.a(FlurryPageViewDelegate.o) -[FlurryAdCanvasViewController dealloc] in libFlurry.a(FlurryAdCanvasViewController.o) -[FlurryAdCanvasViewController dealloc] in libFlurry.a(FlurryAdCanvasViewController.o) +[FlurryFileCache createInstanceWithApiKey:] in libFlurry.a(FlurryFileCache.o) +[FlurryAdAssignment createInstance] in libFlurry.a(FlurryAdAssignment.o) +[FlurryHeartBeater createAndStartInstance:] in libFlurry.a(FlurryHeartBeater.o) +[FlurryImageCache createInstanceWithFileCache:] in libFlurry.a(FlurryImageCache.o) ".objc_class_name_NSMutableURLRequest", referenced from: literal-pointer@_OBJC@_cls_refs@NSMutableURLRequest in libFlurry.a(FlurryHTTPEater.o) ".objc_class_name_NSRunLoop", referenced from: literal-pointer@_OBJC@_cls_refs@NSRunLoop in libFlurry.a(FlurryHTTPEater.o) ".objc_class_name_NSKeyedUnarchiver", referenced from: literal-pointer@_OBJC@_cls_refs@NSKeyedUnarchiver in libFlurry.a(FlurrySession.o) literal-pointer@_OBJC@_cls_refs@NSKeyedUnarchiver in libFlurry.a(FlurryFileCache.o) ".objc_class_name_NSData", referenced from: literal-pointer@_OBJC@_cls_refs@NSData in libFlurry.a(FlurrySession.o) literal-pointer@_OBJC@_cls_refs@NSData in libFlurry.a(FlurryAdParser.o) ".objc_class_name_NSDate", referenced from: literal-pointer@_OBJC@_cls_refs@NSDate in libFlurry.a(FlurrySession.o) literal-pointer@_OBJC@_cls_refs@NSDate in libFlurry.a(FlurryHTTPEater.o) literal-pointer@_OBJC@_cls_refs@NSDate in libFlurry.a(FlurryAdView.o) literal-pointer@_OBJC@_cls_refs@NSDate in libFlurry.a(FlurryAdImpression.o) literal-pointer@_OBJC@_cls_refs@NSDate in libFlurry.a(FlurryEvent.o) ".objc_class_name_UIBarButtonItem", referenced from: literal-pointer@_OBJC@_cls_refs@UIBarButtonItem in libFlurry.a(FlurryAdCanvasViewController.o) ".objc_class_name_NSURLRequest", referenced from: literal-pointer@_OBJC@_cls_refs@NSURLRequest in libFlurry.a(FlurryAdCanvasViewController.o) literal-pointer@_OBJC@_cls_refs@NSURLRequest in libFlurry.a(FlurryAdAppStoreConnectionDelegate.o) ".objc_class_name_UIDevice", referenced from: literal-pointer@_OBJC@_cls_refs@UIDevice in libFlurry.a(FlurrySession.o) literal-pointer@_OBJC@_cls_refs@UIDevice in libFlurry.a(FlurryAdView.o) ".objc_class_name_UIImageView", referenced from: literal-pointer@_OBJC@_cls_refs@UIImageView in libFlurry.a(FlurryAdView.o) literal-pointer@_OBJC@_cls_refs@UIImageView in libFlurry.a(FlurryAdCanvasViewController.o) literal-pointer@_OBJC@_cls_refs@UIImageView in libFlurry.a(FlurryAdCanvasView.o) "_objc_exception_try_exit", referenced from: +[FlurryAPI startSession:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI endSession] in libFlurry.a(FlurryAPI.o) +[FlurryAPI pauseSession] in libFlurry.a(FlurryAPI.o) +[FlurryAPI resumeSession] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logEvent:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logEvent:withParameters:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logEvent:timed:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logEvent:withParameters:timed:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI endTimedEvent:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logError:message:exception:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logError:message:error:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI countPageViews:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI countPageView] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setUserID:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setEventLoggingEnabled:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setServerURL:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setCanvasURL:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setLandscapeCanvasURL:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setAppStoreURL:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setSessionReportsOnCloseEnabled:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setAppVersion:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setGender:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setAge:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI getHook:xLoc:yLoc:view:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI getHook:xLoc:yLoc:view:attachToView:orientation:canvasOrientation:autoRefresh:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI updateHook:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI removeHook:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI openCatalog:canvasOrientation:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setAppCircleDelegate:] in libFlurry.a(FlurryAPI.o) +[FlurrySession createActiveFlurrySession:] in libFlurry.a(FlurrySession.o) +[FlurrySession createActiveFlurrySession:] in libFlurry.a(FlurrySession.o) +[FlurrySession sendSessionsToServerWithTimeout:useWebView:requestAds:] in libFlurry.a(FlurrySession.o) +[FlurrySession dataForSessions:requestAds:] in libFlurry.a(FlurrySession.o) +[FlurrySession dataForSessions:requestAds:] in libFlurry.a(FlurrySession.o) +[FlurrySession initialTimestamp] in libFlurry.a(FlurrySession.o) +[FlurrySession initialTimestamp] in libFlurry.a(FlurrySession.o) +[FlurrySession initialTimestamp] in libFlurry.a(FlurrySession.o) +[FlurryAdParser oldInstance] in libFlurry.a(FlurryAdParser.o) +[FlurryAdParser instance] in libFlurry.a(FlurryAdParser.o) -[FlurryAdView initWithAd:hook:xLoc:yLoc:parent:attachToView:orientation:canvasOrientation:autoRefresh:] in libFlurry.a(FlurryAdView.o) -[FlurryAdView refreshWithAd] in libFlurry.a(FlurryAdView.o) -[FlurryAdView updateToOrientation] in libFlurry.a(FlurryAdView.o) -[FlurryAdView touchesEnded:withEvent:] in libFlurry.a(FlurryAdView.o) -[FlurryAdView alertView:clickedButtonAtIndex:] in libFlurry.a(FlurryAdView.o) -[FlurryAdView checkBannerLocation] in libFlurry.a(FlurryAdView.o) -[FlurryAdView dealloc] in libFlurry.a(FlurryAdView.o) -[FlurryPageViewDelegate navigationController:didShowViewController:animated:] in libFlurry.a(FlurryPageViewDelegate.o) -[FlurryPageViewDelegate navigationController:willShowViewController:animated:] in libFlurry.a(FlurryPageViewDelegate.o) -[FlurryPageViewDelegate tabBarController:shouldSelectViewController:] in libFlurry.a(FlurryPageViewDelegate.o) -[FlurryPageViewDelegate tabBarController:didSelectViewController:] in libFlurry.a(FlurryPageViewDelegate.o) -[FlurryPageViewDelegate tabBarController:willBeginCustomizingViewControllers:] in libFlurry.a(FlurryPageViewDelegate.o) -[FlurryPageViewDelegate tabBarController:willEndCustomizingViewControllers:changed:] in libFlurry.a(FlurryPageViewDelegate.o) -[FlurryPageViewDelegate tabBarController:didEndCustomizingViewControllers:changed:] in libFlurry.a(FlurryPageViewDelegate.o) -[FlurryAdCanvasViewController dealloc] in libFlurry.a(FlurryAdCanvasViewController.o) +[FlurryFileCache createInstanceWithApiKey:] in libFlurry.a(FlurryFileCache.o) +[FlurryAdAssignment createInstance] in libFlurry.a(FlurryAdAssignment.o) +[FlurryHeartBeater createAndStartInstance:] in libFlurry.a(FlurryHeartBeater.o) +[FlurryImageCache createInstanceWithFileCache:] in libFlurry.a(FlurryImageCache.o) ".objc_class_name_NSDateFormatter", referenced from: literal-pointer@_OBJC@_cls_refs@NSDateFormatter in libFlurry.a(FlurrySession.o) "_objc_exception_try_enter", referenced from: +[FlurryAPI startSession:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI startSession:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI endSession] in libFlurry.a(FlurryAPI.o) +[FlurryAPI endSession] in libFlurry.a(FlurryAPI.o) +[FlurryAPI pauseSession] in libFlurry.a(FlurryAPI.o) +[FlurryAPI pauseSession] in libFlurry.a(FlurryAPI.o) +[FlurryAPI resumeSession] in libFlurry.a(FlurryAPI.o) +[FlurryAPI resumeSession] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logEvent:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logEvent:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logEvent:withParameters:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logEvent:withParameters:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logEvent:timed:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logEvent:timed:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logEvent:withParameters:timed:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logEvent:withParameters:timed:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI endTimedEvent:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI endTimedEvent:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logError:message:exception:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logError:message:exception:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logError:message:error:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI logError:message:error:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI countPageViews:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI countPageViews:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI countPageView] in libFlurry.a(FlurryAPI.o) +[FlurryAPI countPageView] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setUserID:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setUserID:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setEventLoggingEnabled:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setEventLoggingEnabled:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setServerURL:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setServerURL:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setCanvasURL:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setCanvasURL:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setLandscapeCanvasURL:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setLandscapeCanvasURL:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setAppStoreURL:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setAppStoreURL:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setSessionReportsOnCloseEnabled:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setSessionReportsOnCloseEnabled:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setAppVersion:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setAppVersion:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setGender:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setGender:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setAge:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setAge:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI getHook:xLoc:yLoc:view:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI getHook:xLoc:yLoc:view:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI getHook:xLoc:yLoc:view:attachToView:orientation:canvasOrientation:autoRefresh:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI getHook:xLoc:yLoc:view:attachToView:orientation:canvasOrientation:autoRefresh:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI updateHook:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI updateHook:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI removeHook:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI removeHook:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI openCatalog:canvasOrientation:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI openCatalog:canvasOrientation:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setAppCircleDelegate:] in libFlurry.a(FlurryAPI.o) +[FlurryAPI setAppCircleDelegate:] in libFlurry.a(FlurryAPI.o) +[FlurrySession createActiveFlurrySession:] in libFlurry.a(FlurrySession.o) +[FlurrySession createActiveFlurrySession:] in libFlurry.a(FlurrySession.o) +[FlurrySession sendSessionsToServerWithTimeout:useWebView:requestAds:] in libFlurry.a(FlurrySession.o)

    Read the article

  • iphone Dev - activity indicator with NSThread not working on Nav controller table view

    - by Frames84
    I really can't get this to work, basically when my JSON feeds loads I want the indicator to show, then hide when it's stopped. It loads top level menu items 1st "Publishing, Broadcasting, Marketing Services", then when Broadcasting is selected it loads a feed using the JSON framework hosted on Google. Round this load I call startIndicator and stopIndicator using the NSThread. Have I missed something? @implementation GeneralNewsTableViewController @synthesize dataList; @synthesize generalNewsDetailViewController; @synthesize atLevel; -(void) startIndicator { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc ] init ]; [(UIActivityIndicatorView *)[self navigationItem].rightBarButtonItem.customView startAnimating]; [pool release]; } -(void) stopIndicator { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc ] init ]; [(UIActivityIndicatorView *)[self navigationItem].rightBarButtonItem.customView stopAnimating]; [pool release]; } - (void)viewDidLoad { NSMutableArray *checker = self.dataList; if(checker == nil) { self.title = NSLocalizedString(@"General1",@"General News"); NSMutableArray *array = [[NSArray alloc] initWithObjects:@"Publishing", @"Broadcasting",@"Marketing Services",nil]; self.dataList = [array retain]; self.atLevel = @"level1"; [array release]; } UIActivityIndicatorView * activityIndicator = [[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(0, 0, 20, 20)]; //set the initial property [activityIndicator stopAnimating]; [activityIndicator hidesWhenStopped]; //Create an instance of Bar button item with custome view which is of activity indicator UIBarButtonItem * barButton = [[UIBarButtonItem alloc] initWithCustomView:activityIndicator]; //Set the bar button the navigation bar [self navigationItem].rightBarButtonItem = barButton; //Memory clean up [activityIndicator release]; [barButton release]; [super viewDidLoad]; } - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { NSString *level = self.atLevel; if([level isEqualToString:@"level2"]) { return 70.0f; } else { return 40.0f; } } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *FirstLevelCell = @"FirstLevelCell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:FirstLevelCell]; if(cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:FirstLevelCell] autorelease]; } NSInteger row = [indexPath row]; NSString *level = self.atLevel; if([level isEqualToString:@"level2"]) { NSMutableArray *stream = [self.dataList objectAtIndex:row]; NSString *newsTitle = [stream valueForKey:@"title"]; if( ![newsTitle isKindOfClass:[NSString class]] ) { cell.textLabel.text = @""; } else { cell.textLabel.text = [stream valueForKey:@"title"]; } cell.textLabel.numberOfLines = 2; cell.textLabel.font =[UIFont systemFontOfSize:10]; cell.detailTextLabel.numberOfLines = 1; cell.detailTextLabel.font= [UIFont systemFontOfSize:8]; cell.detailTextLabel.text = [stream valueForKey:@"created"]; NSData *imageURL = [[NSData alloc] initWithContentsOfURL:[NSURL URLWithString:@"http://www.how-do.co.uk/images/stories/Cimex.jpg"]]; UIImage *newsImage = [[UIImage alloc] initWithData:imageURL]; cell.imageView.image = newsImage; [imageURL release]; [newsImage release]; } else { cell.textLabel.text = [dataList objectAtIndex:row]; } return cell; } - (void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { NSUInteger row = [indexPath row]; NSMutableString *levelType = (NSMutableString *) [dataList objectAtIndex:row]; if(![levelType isKindOfClass:[NSString class]]) { if(self.generalNewsDetailViewController == nil) { GeneralNewsDetailViewController *generalDetail = [[GeneralNewsDetailViewController alloc] initWithNibName:@"GeneralNewsDetailView" bundle:nil]; self.generalNewsDetailViewController = generalDetail; [generalDetail release]; } NSDictionary *stream = [self.dataList objectAtIndex:row]; NSString *newsTitle = [stream valueForKey:@"title"]; if( ![newsTitle isKindOfClass:[NSString class]] ) { generalNewsDetailViewController.newsTitle = @""; } else { generalNewsDetailViewController.newsTitle =[stream valueForKey:@"title"]; } generalNewsDetailViewController.newsId = [stream valueForKey:@"id"]; generalNewsDetailViewController.fullText = [stream valueForKey:@"fulltext"]; generalNewsDetailViewController.newsImage = [stream valueForKey:@"images"]; generalNewsDetailViewController.created = [stream valueForKey:@"created"]; HowDo_v1AppDelegate *delegate = [[UIApplication sharedApplication] delegate]; [delegate.generalNewsNavController pushViewController:self.generalNewsDetailViewController animated:YES]; } else { GeneralNewsTableViewController *generalSubDetail = [[GeneralNewsTableViewController alloc] initWithNibName:@"GeneralNewsTableView" bundle:nil]; NSMutableArray *array; NSString *titleSelected = (NSString *) [dataList objectAtIndex:row]; if([titleSelected isEqualToString:@"Publishing"]) { generalSubDetail.title = @"Publishing news detail"; array = [[NSArray alloc] initWithObjects:@"pub News1", @"pub News2",@"pub News3",nil]; generalSubDetail.atLevel = @"level1"; } else if ([titleSelected isEqualToString:@"Broadcasting"]) { generalSubDetail.title = @"Broadcasting news detail"; /// START [self performSelectorOnMainThread:@selector(startIndicator) withObject:nil waitUntilDone:YES]; if(jSONDataAccessWrapper == nil) { jSONDataAccessWrapper = [JSON_DataAccess_Wrapper alloc]; } array = [jSONDataAccessWrapper downloadJSONFeed]; [self performSelectorOnMainThread:@selector(stopIndicator) withObject:nil waitUntilDone:YES]; generalSubDetail.atLevel = @"level2"; } else if ([titleSelected isEqualToString:@"Marketing Services"]) { generalSubDetail.title = @"Marketing Services news detail"; array = [[NSArray alloc] initWithObjects:@"Marketing News1", @"Marketing News2",@"Marketing News3",nil]; generalSubDetail.atLevel = @"level1"; } generalSubDetail.dataList = array; [self.navigationController pushViewController:generalSubDetail animated:YES]; [titleSelected release]; } } - (NSInteger)tableView:(UITableView *)table numberOfRowsInSection:(NSInteger)section //- (NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSIndexPath *) section { return [self.dataList count]; } Cheers for any feedback Frames

    Read the article

  • regular expression to read the string between <title> and </title>

    - by user262325
    Hello every one I hope to read the contents between and in a html string. I think it should be in objective-c @"<title([\\s\\S]*)</title>" below are the codes that rewrited for regular expression //source of NSStringCategory.h #import <Foundation/Foundation.h> #import <regex.h> @interface NSStringCategory:NSObject { regex_t preg; } -(id)initWithPattern:(NSString *)pattern options:(int)options; -(void)dealloc; -(BOOL)matchesString:(NSString *)string; -(NSString *)matchedSubstringOfString:(NSString *)string; -(NSArray *)capturedSubstringsOfString:(NSString *)string; +(NSStringCategory *)regexWithPattern:(NSString *)pattern options:(int)options; +(NSStringCategory *)regexWithPattern:(NSString *)pattern; +(NSString *)null; +(void)initialize; @end @interface NSString (NSStringCategory) -(BOOL)matchedByPattern:(NSString *)pattern options:(int)options; -(BOOL)matchedByPattern:(NSString *)pattern; -(NSString *)substringMatchedByPattern:(NSString *)pattern options:(int)options; -(NSString *)substringMatchedByPattern:(NSString *)pattern; -(NSArray *)substringsCapturedByPattern:(NSString *)pattern options:(int)options; -(NSArray *)substringsCapturedByPattern:(NSString *)pattern; -(NSString *)escapedPattern; @end and .m file #import "NSStringCategory.h" static NSString *nullstring=nil; @implementation NSStringCategory -(id)initWithPattern:(NSString *)pattern options:(int)options { if(self=[super init]) { int err=regcomp(&preg,[pattern UTF8String],options|REG_EXTENDED); if(err) { char errbuf[256]; regerror(err,&preg,errbuf,sizeof(errbuf)); [NSException raise:@"CSRegexException" format:@"Could not compile regex \"%@\": %s",pattern,errbuf]; } } return self; } -(void)dealloc { regfree(&preg); [super dealloc]; } -(BOOL)matchesString:(NSString *)string { if(regexec(&preg,[string UTF8String],0,NULL,0)==0) return YES; return NO; } -(NSString *)matchedSubstringOfString:(NSString *)string { const char *cstr=[string UTF8String]; regmatch_t match; if(regexec(&preg,cstr,1,&match,0)==0) { return [[[NSString alloc] initWithBytes:cstr+match.rm_so length:match.rm_eo-match.rm_so encoding:NSUTF8StringEncoding] autorelease]; } return nil; } -(NSArray *)capturedSubstringsOfString:(NSString *)string { const char *cstr=[string UTF8String]; int num=preg.re_nsub+1; regmatch_t *matches=calloc(sizeof(regmatch_t),num); if(regexec(&preg,cstr,num,matches,0)==0) { NSMutableArray *array=[NSMutableArray arrayWithCapacity:num]; int i; for(i=0;i<num;i++) { NSString *str; if(matches[i].rm_so==-1&&matches[i].rm_eo==-1) str=nullstring; else str=[[[NSString alloc] initWithBytes:cstr+matches[i].rm_so length:matches[i].rm_eo-matches[i].rm_so encoding:NSUTF8StringEncoding] autorelease]; [array addObject:str]; } free(matches); return [NSArray arrayWithArray:array]; } free(matches); return nil; } +(NSStringCategory *)regexWithPattern:(NSString *)pattern options:(int)options { return [[[NSStringCategory alloc] initWithPattern:pattern options:options] autorelease]; } +(NSStringCategory *)regexWithPattern:(NSString *)pattern { return [[[NSStringCategory alloc] initWithPattern:pattern options:0] autorelease]; } +(NSString *)null { return nullstring; } +(void)initialize { if(!nullstring) nullstring=[[NSString alloc] initWithString:@""]; } @end @implementation NSString (NSStringCategory) -(BOOL)matchedByPattern:(NSString *)pattern options:(int)options { NSStringCategory *re=[NSStringCategory regexWithPattern:pattern options:options|REG_NOSUB]; return [re matchesString:self]; } -(BOOL)matchedByPattern:(NSString *)pattern { return [self matchedByPattern:pattern options:0]; } -(NSString *)substringMatchedByPattern:(NSString *)pattern options:(int)options { NSStringCategory *re=[NSStringCategory regexWithPattern:pattern options:options]; return [re matchedSubstringOfString:self]; } -(NSString *)substringMatchedByPattern:(NSString *)pattern { return [self substringMatchedByPattern:pattern options:0]; } -(NSArray *)substringsCapturedByPattern:(NSString *)pattern options:(int)options { NSStringCategory *re=[NSStringCategory regexWithPattern:pattern options:options]; return [re capturedSubstringsOfString:self]; } -(NSArray *)substringsCapturedByPattern:(NSString *)pattern { return [self substringsCapturedByPattern:pattern options:0]; } -(NSString *)escapedPattern { int len=[self length]; NSMutableString *escaped=[NSMutableString stringWithCapacity:len]; for(int i=0;i<len;i++) { unichar c=[self characterAtIndex:i]; if(c=='^'||c=='.'||c=='['||c=='$'||c=='('||c==')' ||c=='|'||c=='*'||c=='+'||c=='?'||c=='{'||c=='\\') [escaped appendFormat:@"\\%C",c]; else [escaped appendFormat:@"%C",c]; } return [NSString stringWithString:escaped]; } @end I use the codes below to get the string between "" and "" NSStringCategory *a=[[NSStringCategory alloc] initWithPattern:@"<title([\s\S]*)</title>" options:0];// Unfortunately [a matchedSubstringOfString:response]] always returns nil I do not if the regular expression is wrong or any other reason. Welcome any comment Thanks interdev

    Read the article

  • Regarding xml parsing in iphone

    - by Prash.......
    hi... I am developing an applictaion in which i am doing xml parsing i found an error in [xmlparse parse] method. and the error for this is as follows: [NSCFString bytes]: unrecognized selector sent to instance 0x3df6310 2010-04-30 00:09:46.302 SPCiphone2[4234:1003] void SendDelegateMessage(NSInvocation*): delegate () failed to return after waiting 10 seconds. main run loop mode: kCFRunLoopDefaultMode code snippet for this as follows. responseOfWebResultData = [[NSMutableString alloc] initWithData:responseData encoding:NSUTF8StringEncoding]; NSLog(@"result: %@", responseOfWebResultData); //starting the XML parsing if(responseOfWebResultData) { @try { xmlParser = [[NSXMLParser alloc] initWithData:responseOfWebResultData]; [xmlParser setDelegate: self]; [xmlParser setShouldResolveExternalEntities: YES]; [xmlParser parse]; [responseOfWebResultData release]; } @catch(NSException *e) { UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Please " message:[e reason] delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil]; [alert show]; [alert release]; } }

    Read the article

  • search text in pdf in iphone

    - by Jaimin
    i m trying to do search funtionality in iphone.. i pass the page number and the string to be searched.. but it is not getting the proper output. in contentStream i get nothing.. i got this code by googling. i dont know what will be dere in contentStream object. -(BOOL)page:(CGPDFPageRef)inPage containsString:(NSString *)inSearchString; { [self setCurrentData:[NSMutableString string]]; CGPDFContentStreamRef contentStream = CGPDFContentStreamCreateWithPage(inPage); CGPDFScannerRef scanner = CGPDFScannerCreate(contentStream, table, self); bool ret = CGPDFScannerScan(scanner); CGPDFScannerRelease(scanner); CGPDFContentStreamRelease(contentStream); return ([[currentData uppercaseString] rangeOfString:[inSearchString uppercaseString]].location != NSNotFound); } need help urgently.. and if there is any other solution than also it is fine..

    Read the article

  • Couldn't I just pass an copied string to an Core Data property?

    - by dontWatchMyProfile
    The docs say: The default implementation does not copy attribute values. If the attribute value may be mutable and implements the NSCopying protocol (as is the case with NSString, for example), you can copy the value in a custom accessor to help preserve encapsulation (for example, in the case where an instance of NSMutableString is passed as a value). So instead of getting into trouble and inconvenience with overwriting accessors in my NSManagedObject subclass, couldn't I simply do something like this? myManagedObject.firstName = [[firstNameMutableStr copy] autorelease]; This would have the exact same effect, or not? The dynamic implementation would retain that anyways ... so.... why not the easy way?

    Read the article

  • const keyword in Objective-c

    - by user392412
    int main(int argc, char *argv[]) { @autoreleasepool { const int x = 1; const NSMutableArray *array1 = [NSMutableArray array]; const NSMutableString *str1 = @"1"; NSString * const str2 = @"2"; // x = 2; compile error [array1 addObject:@"2"]; // ok // [str1 appendString:@"2"]; // runtime error // Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Attempt to mutate immutable object with appendString:' // str2 = @"3"; compile error } } my Question is Why array1 addObject is legal and why str1 appendString is forbidden?

    Read the article

  • dialing on iphone/ipod touch not working with documented procedures

    - by dave
    I'm trying to set up an iphone app to the phone number of a various sports store using the tel:// url passing method- I am developing on an ipod touch- usually on the touch you see the error message "Unsupported URL - This URL wasn't loaded tel://99887766" when you try and dial a number. I cant get this message to appear on the simulator or the ipod touch. do I need to do some sort of fancy signing before the app will dial properly? I am using this code: [[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"tel:%@", [selectedBar phoneNumber]]]]; and I've tried adding the slashes: [[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"tel://%@", [selectedBar phoneNumber]]]]; but neither work. I have also tried this way: [[UIApplication application] openURL:[NSURL URLWithString:@"tel://99887766"]]; and this way: NSMutableString *phone = [[@"+ 12 34 567 89 01" mutableCopy] autorelease]; [phone replaceOccurrencesOfString:@" " withString:@"" options:NSLiteralSearch range:NSMakeRange(0, [phone length])]; [phone replaceOccurrencesOfString:@"(" withString:@"" options:NSLiteralSearch range:NSMakeRange(0, [phone length])]; [phone replaceOccurrencesOfString:@")" withString:@"" options:NSLiteralSearch range:NSMakeRange(0, [phone length])]; NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"tel:%@", phone]]; [[UIApplication sharedApplication] openURL:url]; No matter what i do i can't get any response from the simulator / ipod touch that it is dealing with a phone number- When I press the button associated with this code, it doesnt crash, it's like its processed it and decided not to do anything. i even put an NSLog(@"button called"); in just before the code to confirm the button was working, which it is.

    Read the article

  • Objective-C: Getting the True Class of Classes in Class Clusters

    - by TechZen
    Recently while trying to answer a questions here, I ran some test code to see how Xcode/gdb reported the class of instances in class clusters. (see below) In the past, I've expected to see something like: PrivateClusterClass:PublicSuperClass:NSObject Such as this (which still returns as expected): NSPathStore2:NSString:NSObject ... for a string created with +[NSString pathWithComponents:]. However, with NSSet and subclass the following code: - (void)applicationDidFinishLaunching:(UIApplication *)application { NSSet *s=[NSSet setWithObject:@"setWithObject"]; NSMutableSet *m=[NSMutableSet setWithCapacity:1]; [m addObject:@"Added String"]; NSMutableSet *n = [[NSMutableSet alloc] initWithCapacity:1]; [self showSuperClasses:s]; [self showSuperClasses:m]; [self showSuperClasses:n]; [self showSuperClasses:@"Steve"]; } - (void) showSuperClasses:(id) anObject{ Class cl = [anObject class]; NSString *classDescription = [cl description]; while ([cl superclass]) { cl = [cl superclass]; classDescription = [classDescription stringByAppendingFormat:@":%@", [cl description]]; } NSLog(@"%@ classes=%@",[anObject class], classDescription); } ... outputs: // NSSet *s NSCFSet classes=NSCFSet:NSMutableSet:NSSet:NSObject //NSMutableSet *m NSCFSet classes=NSCFSet:NSMutableSet:NSSet:NSObject //NSMutableSet *n NSCFSet classes=NSCFSet:NSMutableSet:NSSet:NSObject // NSString @"Steve" NSCFString classes=NSCFString:NSMutableString:NSString:NSObject The debugger shows the same class for all Set instances. I know that in the past the Set class cluster did not return like this. What has changed? (I suspect it is a change in the bridge from Core Foundation.) What class cluster report just a generic class e.g. NSCFSet and which report an actual subclass e.g. NSPathStore2? Most importantly, when debugging how do you determine the actual class of a NSSet cluster instance?

    Read the article

  • Passing NULL value

    - by FFXIII
    Hi. I use an instance of NSXMLParser. I store found chars in NSMutableStrings that are stored in an NSMutableDictionary and these Dicts are then added to an NSMutableArray. When I test this everything seems normal: I count 1 array, x dictionnaries and x strings. In a detailview controller file I want to show my parsed results. I call the class where everthing is stored but I get (null) returned. This is what I do (wrong): XMLParser.h @interface XMLParser : NSObject { NSMutableArray *array; NSMUtableDictionary *dictionary; NSSMutabletring *element; } @property (nonatomic, retain) NSMutableArray *array; @property (nonatomic, retain) NSMutableDictionary *dictionary; @property (nonatomic, retain) NSMutableString *element; XMLParser.m @synthesize array, dictionary, element; //parsing goes on here & works fine //so 'element' is filled with content and stored in a dict in an array //and released at the end of the file In my controller file I do this: controller.h @class XMLParser; @interface controller : UIViewController { XMLParser *aXMLParser; } @property (nonatomic, retain) XMLParser *aXMLParser; controller.m #import "XMLParser.h" @synthesize aXMLParser; - (void)viewDidLoad { NSLog(@"test array: %@", aXMLParser.array); NSLog(@"test dict: %@", aXMLParser.dictionary); NSLog(@"test element: %@", aXMLParser.element); } When I test the value of my array, a dict or an element in the XMLParser.h file I get my result. What am I doing wrong so I can't call my results in my controller file? Any help is welcome, because I'm pretty stuck right now :/

    Read the article

  • pdf page display problem in ipad

    - by mohsinpathan
    I am able to parse content of pdf. I am able to display pdf page as a image in scroll view. but pdf page is cut when width is more than scroll view. I want to display pdf whole page without lost its quality and contents. please give me hint.`NSArray *temp=[[contentsAtPath objectAtIndex:i]componentsSeparatedByString:@".pdf"]; NSString *c=[temp objectAtIndex:0]; filePath=[[NSString alloc] initWithString:[[NSBundle mainBundle] pathForResource:c ofType:@"pdf" inDirectory:@"appPdf"] ]; [pdfNames addObject:filePath]; initialPage=1; mainString=[[NSMutableString alloc] init]; myTable=nil; myTable = CGPDFOperatorTableCreate(); CGPDFOperatorTableSetCallback(myTable, "TJ", arrayCallback); CGPDFOperatorTableSetCallback(myTable, "Tj", stringCallback); CGRect pdfSize = GetPdfSize(UIGraphicsGetCurrentContext(), initialPage, [filePath UTF8String],myTable,mainString); //UIImageView *imgV=[[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 598,768)]; UIImageView *imgV=[[UIImageView alloc]initWithFrame:CGRectMake(0, 0, pdfSize.size.width,pdfSize.size.height)]; UIGraphicsBeginImageContext(CGSizeMake(pdfSize.size.width,pdfSize.size.height)); MyDisplayPDFPage(UIGraphicsGetCurrentContext(), initialPage, [filePath UTF8String],myTable,mainString); imgV.image=UIGraphicsGetImageFromCurrentImageContext(); imgV.image=[imgV.image rotate:UIImageOrientationDownMirrored]; UIButton *doneBtn = [UIButton buttonWithType:UIButtonTypeCustom]; doneBtn.frame=CGRectMake(0,0,598,pdfSize.size.height); [doneBtn setImage:imgV.image forState:UIControlStateNormal]; [doneBtn addTarget:self action:@selector(getDetail) forControlEvents:UIControlEventTouchDown]; doneBtn.tag=i+1; [scrollView addSubview:doneBtn];`

    Read the article

  • iOS: display modal view over the top of a UIWebView

    - by Sly
    Is it possible to display a modal view over the top of a UIWebView? I have a UIViewController that loads a WebView. I then want to push a Modal View Controller over the top so that a modal view covers up the WebView temporarily... The WebView is working fine; here's how it's loaded in the View Controller: - (void)loadView { // Initialize webview and add as a subview to LandscapeController's view myWebView = [[[UIWebView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]] autorelease]; myWebView.scalesPageToFit = YES; myWebView.autoresizesSubviews = YES; myWebView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight); myWebView.delegate = self; self.view = myWebView; } If I attempt to load a Modal View controller from within viewDidLoad, however, no modal view appears: - (void)viewDidLoad { [super viewDidLoad]; // Edit dcftable.html with updated figures NSMutableString *updated_html = [self _updateHTML:@"dcftable"]; // Load altered HTML file as an NSURL request [self.myWebView loadHTMLString:updated_html baseURL:nil]; // If user hasn't paid for dcftable, then invoke the covering modal view if (some_condition) { LandscapeCoverController *landscapeCoverController = [[[LandscapeCoverController alloc] init] autorelease ]; [self presentModalViewController:landscapeCoverController animated:YES]; } } I suspect that there's something that needs to be done with the UIWebView delegate to get it to receive the new modal view...but can't find any discussion or examples of this anywhere...again, the objective is to invoke a modal view that covers over the top of the WebView. Thanks for any thoughts in advance!

    Read the article

  • PDF search on the iPhone

    - by pt2ph8
    After two days trying to read annotations from a PDF using Quartz, I've managed to do it and posted my code. Now I'd like to do the same for another frequently asked question: searching PDF documents with Quartz. Same situation as before, this question has been asked many times with almost no practical answers. So I need some pointers first, as I still haven't implemented this myself. What I tried: I tried using CGPDFScannerScan handling the TJ and Tj operators - returns the right text on some PDF, whereas on other documents it returns mostly random letters. Maybe it's related to text encoding? Someone pointed out that text blocks (marked by BT/ET operators) should be handled instead, but I still haven't managed to do so. Anyone managed to extract text from any PDF? After that, searching should be easy by storing all the text in a NSMutableString and using rangeOfString (if there's a better way please let me know). But then how to highlight the result? I know there are a few operators to find the glyph sizes, so I could calculate the resulting rect based on those values, but I've been reading the spec for hours... it's a bloated mess and I'm going insane. Anyone with a practical explanation? Thanks.

    Read the article

  • Adding objects to an NSMutableArray, order seems odd when parsing from an XML file

    - by diatrevolo
    Hello: I am parsing an XML file for two elements: "title" and "noType". Once these are parsed, I am adding them to an object called aMaster, an instance of my own Master class that contains NSString variables. I am then adding these instances to an NSMutableArray on a singleton, in order to call them elsewhere in the program. The problem is that when I call them, they don't seem to be on the same NSMutableArray index... each index contains either the title OR the noType element, when it should be both... can anyone see what I may be doing wrong? Below is the code for the parser. Thanks so much!! #import "XMLParser.h" #import "Values.h" #import "Listing.h" #import "Master.h" @implementation XMLParser @synthesize sharedSingleton, aMaster; - (XMLParser *) initXMLParser { [super init]; sharedSingleton = [Values sharedValues]; aMaster = [[Master init] alloc]; return self; } - (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qualifiedName attributes:(NSDictionary *)attributeDict { aMaster = [[Master alloc] init]; //Extract the attribute here. if ([elementName isEqualToString:@"intro"]) { aMaster.intro = [attributeDict objectForKey:@"enabled"]; } else if ([elementName isEqualToString:@"item"]) { aMaster.item_type = [attributeDict objectForKey:@"type"]; //NSLog(@"Did find item with type %@", [attributeDict objectForKey:@"type"]); //NSLog(@"Reading id value :%@", aMaster.item_type); } else { //NSLog(@"No known elements"); } //NSLog(@"Processing Element: %@", elementName); //HERE } - (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string { if(!currentElementValue) currentElementValue = [[NSMutableString alloc] initWithString:string]; else { [currentElementValue appendString:string];//[tempString stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]]; CFStringTrimWhitespace((CFMutableStringRef)currentElementValue); } } - (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName { if ([elementName isEqualToString:@"item"]) { [sharedSingleton.master addObject:aMaster]; NSLog(@"Added %@ and %@ to the shared singleton", aMaster.title, aMaster.noType); //Only having one at a time added... don't know why [aMaster release]; aMaster = nil; } else if ([elementName isEqualToString:@"title"]) { [aMaster setValue:currentElementValue forKey:@"title"]; } else if ([elementName isEqualToString:@"noType"]) { [aMaster setValue:currentElementValue forKey:@"noType"]; //NSLog(@"%@ should load into the singleton", aMaster.noType); } NSLog(@"delimiter"); NSLog(@"%@ should load into the singleton", aMaster.title); NSLog(@"%@ should load into the singleton", aMaster.noType); [currentElementValue release]; currentElementValue = nil; } - (void) dealloc { [aMaster release]; [currentElementValue release]; [super dealloc]; } @end

    Read the article

  • problem with custom NSProtocol and caching on iPhone

    - by TomSwift
    My iPhone app embeds a UIWebView which loads html via a custom NSProtocol handler I have registered. My problem is that resources referenced in the returned html, which are also loaded via my custom protocol handler, are cached and never reloaded. In particular, my stylesheet is cached: <link rel="stylesheet" type="text/css" href="./styles.css" /> The initial request to load the html in the UIWebView looks like this: NSString* strUrl = [NSMutableString stringWithFormat: @"myprotocol:///entry?id=%d", entryID ]; NSURL* url = [NSURL URLWithString: strUrl]; [_pCurrentWebView loadRequest: [NSURLRequest requestWithURL: url cachePolicy: NSURLRequestReloadIgnoringLocalCacheData timeoutInterval: 60 ]]; (note the cache policy is set to ignore, and I've verified this cache policy carries through to subsequent requests for page resources on the initial load) The protocol handler loads the html from a database and returns it to the client using code like this: // create the response record NSURLResponse *response = [[NSURLResponse alloc] initWithURL: [request URL] MIMEType: mimeType expectedContentLength: -1 textEncodingName: textEncodingName]; // get a reference to the client so we can hand off the data id client = [self client]; // turn off caching for this response data [client URLProtocol: self didReceiveResponse:response cacheStoragePolicy: NSURLCacheStorageNotAllowed]; // set the data in the response to our jfif data [client URLProtocol: self didLoadData:data]; [data release]; (Note the response cache policy is "not allowed"). Any ideas how I can make it NOT cache my styles.css resource? I need to be able to dynamically alter the content of this resource on subsequent loads of html that references this file. I thought clearing the shared url cache would work, but it doesnt: [[NSURLCache sharedURLCache] removeAllCachedResponses]; One thing that does work, but it's terribly inefficient, is to dynamically cache-bust the url for the stylesheet by adding a timestamp parameter: <link rel="stylesheet" type="text/css" href="./styles.css?ts=1234567890" /> To make this work I have to load my html from the db, search and replace the url for the stylesheet with a cache-busting parameter that changes on each request. I'd rather not do this. My presumption is that there is no problem if I were to load my content via the built-in HTTP protocol. In that case, I'm guessing that the UIWebView looks at any Cache-Control flags in the NSURLHTTPResponse object's http headers and abides by them. Since my NSURLResponseObject has no http headers (it's not http...) then perhaps UIWebView just decides to cached the resource (ignoring the NSURLRequest caching directive?). Ideas???

    Read the article

  • How can I check the content of the arrays? Parsing XML file with ObjectiveC

    - by skiria
    I have 3 classes- video { nameVideo, id, description, user... } topic {nameTopic, topicID, NSMutableArray videos; } category {nameCategory, categoryID, NSMUtableArray topics} And then in my app delegate I defined- NSMutableArray categories; I parse an XML file with this code. I try the arrays hierachy, and i think that i don't add any object on the arrays. How can I check it? What's wrong? (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qualifiedName attributes:(NSDictionary *)attributeDict { if([elementName isEqualToString:@"Videos"]) { //Initialize the array. appDelegate.categories = [[NSMutableArray alloc] init]; } else if ([elementName isEqualToString:@"Category"]) { aCategory = [[Category alloc] init]; aCategory.categoryID = [[attributeDict objectForKey:@"id"] integerValue]; NSLog(@"Reading id category value: %i", aCategory.categoryID); } else if ([elementName isEqualToString:@"Topic"]) { aTopic = [[Topic alloc] init]; aTopic.topicID = [[attributeDict objectForKey:@"id"] integerValue]; NSLog(@"Reading id topic value: %i", aTopic.topicID); } else if ([elementName isEqualToString:@"video"]) { aVideo = [[Video alloc] init]; aVideo.videoID = [[attributeDict objectForKey:@"id"] integerValue]; aVideo.nameTopic = currentNameTopic; aVideo.nameCategory = currentNameCategory; NSLog(@"Reading id video value: %i", aVideo.videoID); } NSLog(@"Processing Element: %@", elementName); } (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string { if(!currentElementValue) currentElementValue = [[NSMutableString alloc] initWithString:string]; else [currentElementValue appendString:string]; NSLog(@"Processing Value: %@", currentElementValue); } (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName { if([elementName isEqualToString:@"Videos"]) return; if ([elementName isEqualToString:@"Category"]) { [appDelegate.categories addObject:aCategory]; [aCategory release]; aCategory = nil; } if ([elementName isEqualToString:@"Topic"]) { [aCategory.topics addObject:aTopic]; //NSLog(@"contador: %i", [aCategory.topics count]); //NSLog(@"contador: %@", aTopic.nameTopic); [aTopic release]; aTopic = nil; } if ([elementName isEqualToString:@"video"]) { [aTopic.videos addObject:aVideo]; NSLog(@"count number videos: %i", [aTopic.videos count]); -- always 0 NSLog(@"NOM CATEGORIA VIDEO: %@", aVideo.urlVideo); -- OK [aVideo release]; aVideo = nil; } if ([elementName isEqualToString:@"nameCategory"]) { //[aCategory setValue:currentElementValue forKey:elementName]; aCategory.nameCategory = currentElementValue; currentNameCategory = currentElementValue; } if ([elementName isEqualToString:@"nameTopic"]) { aTopic.nameTopic = currentElementValue; currentNameTopic = currentElementValue; } else [aVideo setValue:currentElementValue forKey:elementName]; [currentElementValue release]; currentElementValue = nil; }

    Read the article

  • UITableView crashes when trying to scroll

    - by Ondrej
    Hi, I have a problem with data in UITableView. I have UIViewController, that contains UITableView outlet and few more things I am using and ... It works :) ... it works lovely, but ... I've created an RSS reader class that is using delegates to deploy the data to the table ... and once again, If I'll just create dummy data in the main controller everything works! problem is with this line: rss.delegate = self; Preview looks a little bit broken than here are those RSS reader files on Google code: (Link to the header file on GoogleCode) (Link to the implementation file on Google code) viewDidLoad function of my controller: IGDataRss20 *rss = [[[IGDataRss20 alloc] init] autorelease]; rss.delegate = self; [rss initWithContentsOfUrl:@"http://rss.cnn.com/rss/cnn_topstories.rss"]; and my delegate methods: - (void)parsingEnded:(NSArray *)result { super.data = [[NSMutableArray alloc] initWithArray:result]; NSLog(@"My Items: %d", [super.data count]); [super.table reloadData]; NSLog(@"Parsing ended"); } (void)parsingError:(NSString *)message { NSLog(@"MyMessage: %@", message); } (void)parsingStarted:(NSXMLParser *)parser { NSLog(@"Parsing started"); } Just to clarify, NSLog(@"Parsing ended"); is being executed and I have 10 items in the array. Ok, here's my RSS reader header file: @class IGDataRss20; @protocol IGDataRss20Delegate @optional (void)parsingStarted:(NSXMLParser *)parser; (void)parsingError:(NSString *)message; (void)parsingEnded:(NSArray *)result; @end @interface IGDataRss20 : NSObject { NSXMLParser *rssParser; NSMutableArray *data; NSMutableDictionary *currentItem; NSString *currentElement; id <IGDataRss20Delegate> delegate; } @property (nonatomic, retain) NSMutableArray *data; @property (nonatomic, assign) id delegate; (void)initWithContentsOfUrl:(NSString *)rssUrl; (void)initWithContentsOfData:(NSData *)inputData; @end And this RSS reader implementation file: #import "IGDataRss20.h" @implementation IGDataRss20 @synthesize data, delegate; (void)initWithContentsOfUrl:(NSString *)rssUrl { self.data = [[NSMutableArray alloc] init]; NSURL *xmlURL = [NSURL URLWithString:rssUrl]; rssParser = [[NSXMLParser alloc] initWithContentsOfURL:xmlURL]; [rssParser setDelegate:self]; [rssParser setShouldProcessNamespaces:NO]; [rssParser setShouldReportNamespacePrefixes:NO]; [rssParser setShouldResolveExternalEntities:NO]; [rssParser parse]; } (void)initWithContentsOfData:(NSData *)inputData { self.data = [[NSMutableArray alloc] init]; rssParser = [[NSXMLParser alloc] initWithData:inputData]; [rssParser setDelegate:self]; [rssParser setShouldProcessNamespaces:NO]; [rssParser setShouldReportNamespacePrefixes:NO]; [rssParser setShouldResolveExternalEntities:NO]; [rssParser parse]; } (void)parserDidStartDocument:(NSXMLParser *)parser { [[self delegate] parsingStarted:parser]; } (void)parser:(NSXMLParser *)parser parseErrorOccurred:(NSError *)parseError { NSString * errorString = [NSString stringWithFormat:@"Unable to parse RSS feed (Error code %i )", [parseError code]]; NSLog(@"Error parsing XML: %@", errorString); if ([parseError code] == 31) NSLog(@"Error code 31 is usually caused by encoding problem."); [[self delegate] parsingError:errorString]; } (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName attributes:(NSDictionary *)attributeDict { currentElement = [elementName copy]; if ([elementName isEqualToString:@"item"]) currentItem = [[NSMutableDictionary alloc] init]; } (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName { if ([elementName isEqualToString:@"item"]) { [data addObject:(NSDictionary *)[currentItem copy]]; } } (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string { if (![currentItem objectForKey:currentElement]) [currentItem setObject:[[[NSMutableString alloc] init] autorelease] forKey:currentElement]; [[currentItem objectForKey:currentElement] appendString:string]; } (void)parserDidEndDocument:(NSXMLParser *)parser { //NSLog(@"RSS array has %d items: %@", [data count], data); [[self delegate] parsingEnded:(NSArray *)self.data]; } (void)dealloc { [data, delegate release]; [super dealloc]; } @end Hope someone will be able to help me as I am becoming to be quite desperate, and I thought I am not already such a greenhorn :) Thanks, Ondrej

    Read the article

  • Is Fast Enumeration messing with my text output?

    - by Dan Ray
    Here I am iterating through an array of NSDictionary objects (inside the parsed JSON response of the EXCELLENT MapQuest directions API). I want to build up an HTML string to put into a UIWebView. My code says: for (NSDictionary *leg in legs ) { NSString *thisLeg = [NSString stringWithFormat:@"<br>%@ - %@", [leg valueForKey:@"narrative"], [leg valueForKey:@"distance"]]; NSLog(@"This leg's string is %@", thisLeg); [directionsOutput appendString:thisLeg]; } The content of directionsOutput (which is an NSMutableString) contains ALL the values for [leg valueForKey:@"narrative"], wrapped up in parens, followed by a hyphen, followed by all the parenthesized values for [leg valueForKey:@"distance"]. So I put in that NSLog call... and I get the same thing there! It appears that the for() is somehow batching up our output values as we iterate, and putting out the output only once. How do I make it not do this but instead do what I actually want, which is an iterative output as I iterate? Here's what NSLog gets. Yes, I know I need to figure out NSNumberFormatter. ;-) This leg's string is ( "Start out going NORTH on INFINITE LOOP.", "Turn LEFT to stay on INFINITE LOOP.", "Turn RIGHT onto N DE ANZA BLVD.", "Merge onto I-280 S toward SAN JOSE.", "Merge onto CA-87 S via EXIT 3A.", "Take the exit on the LEFT.", "Merge onto CA-85 S via EXIT 1A on the LEFT toward GILROY.", "Merge onto US-101 S via EXIT 1A on the LEFT toward LOS ANGELES.", "Take the CA-152 E/10TH ST exit, EXIT 356.", "Turn LEFT onto CA-152/E 10TH ST/PACHECO PASS HWY. Continue to follow CA-152/PACHECO PASS HWY.", "Turn SLIGHT RIGHT.", "Turn SLIGHT RIGHT onto PACHECO PASS HWY/CA-152 E. Continue to follow CA-152 E.", "Merge onto I-5 S toward LOS ANGELES.", "Take the CA-46 exit, EXIT 278, toward LOST HILLS/WASCO.", "Turn LEFT onto CA-46/PASO ROBLES HWY. Continue to follow CA-46.", "Merge onto CA-99 S toward BAKERSFIELD.", "Merge onto CA-58 E via EXIT 24 toward TEHACHAPI/MOJAVE.", "Merge onto I-15 N via the exit on the LEFT toward I-40/LAS VEGAS.", "Keep RIGHT to take I-40 E via EXIT 140A toward NEEDLES (Passing through ARIZONA, NEW MEXICO, TEXAS, OKLAHOMA, and ARKANSAS, then crossing into TENNESSEE).", "Merge onto I-40 E via EXIT 12C on the LEFT toward NASHVILLE (Crossing into NORTH CAROLINA).", "Merge onto I-40 BR E/US-421 S via EXIT 188 on the LEFT toward WINSTON-SALEM.", "Take the CLOVERDALE AVE exit, EXIT 4.", "Turn LEFT onto CLOVERDALE AVE SW.", "Turn SLIGHT LEFT onto N HAWTHORNE RD.", "Turn RIGHT onto W NORTHWEST BLVD.", "1047 W NORTHWEST BLVD is on the LEFT." ) - ( 0.0020000000949949026, 0.07800000160932541, 0.14000000059604645, 7.827000141143799, 5.0329999923706055, 0.15299999713897705, 5.050000190734863, 20.871000289916992, 0.3050000071525574, 2.802999973297119, 0.10199999809265137, 37.78000259399414, 124.50700378417969, 0.3970000147819519, 25.264001846313477, 20.475000381469727, 125.8580093383789, 4.538000106811523, 1693.0350341796875, 628.8970336914062, 3.7990000247955322, 0.19099999964237213, 0.4099999964237213, 0.257999986410141, 0.5170000195503235, 0 )

    Read the article

  • iphone web service access

    - by malleswar
    Hi, I have .net webservice methods login and summary. After getting the result from login, I need to show second view and need to call summary method. I am following this tutorial. http://icodeblog.com/2008/11/03/iphone-programming-tutorial-intro-to-soap-web-services/ I created two new classes loginaccess.h and loginaccess.m. @implementation LoginAccess @synthesize ResultString,webData, soapResults, xmlParser; -(NSString*)LoginCheck:(NSString*)userName:(NSString*)pwd { NSString *soapMessage = [NSString stringWithFormat: @"\n" "\n" "\n" "\n" "%@" "%@" "" "\n" "\n",userName,pwd ]; NSLog(soapMessage); NSURL *url = [NSURL URLWithString:@"http://www.XXXXXXXXX.com/service.asmx"]; NSMutableURLRequest *theRequest = [NSMutableURLRequest requestWithURL:url]; NSString *msgLength = [NSString stringWithFormat:@"%d", [soapMessage length]]; [theRequest addValue: @"text/xml; charset=utf-8" forHTTPHeaderField:@"Content-Type"]; [theRequest addValue: @"http://XXXXXXXXm/Login" forHTTPHeaderField:@"SOAPAction"]; [theRequest addValue: msgLength forHTTPHeaderField:@"Content-Length"]; [theRequest setHTTPMethod:@"POST"]; [theRequest setHTTPBody: [soapMessage dataUsingEncoding:NSUTF8StringEncoding]]; NSURLConnection *theConnection = [[NSURLConnection alloc] initWithRequest:theRequest delegate:self]; if( theConnection ) { webData = [[NSMutableData data] retain]; } else { NSLog(@"theConnection is NULL"); } //[nameInput resignFirstResponder]; return ResultString; } -(void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response { [webData setLength: 0]; } -(void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data { [webData appendData:data]; } -(void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error { NSLog(@"ERROR with theConenction"); [connection release]; [webData release]; } -(void)connectionDidFinishLoading:(NSURLConnection *)connection { NSLog(@"DONE. Received Bytes: %d", [webData length]); NSString *theXML = [[NSString alloc] initWithBytes: [webData mutableBytes] length:[webData length] encoding:NSUTF8StringEncoding]; NSLog(theXML); [theXML release]; if( xmlParser ) { [xmlParser release]; } xmlParser = [[NSXMLParser alloc] initWithData: webData]; [xmlParser setDelegate: self]; [xmlParser setShouldResolveExternalEntities: YES]; [xmlParser parse]; [connection release]; [webData release]; } -(void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *) namespaceURI qualifiedName:(NSString *)qName attributes: (NSDictionary *)attributeDict { if( [elementName isEqualToString:@"LoginResult"]) { if(!soapResults) { soapResults = [[NSMutableString alloc] init]; } recordResults = TRUE; } } -(void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string { if( recordResults ) { [soapResults appendString: string]; } } -(void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName { if( [elementName isEqualToString:@"LoginResult"]) { recordResults = FALSE; ResultString = soapResults; NSLog(@"Login"); [VariableStore setStr:ResultString]; NSLog(soapResults); [soapResults release]; soapResults = nil; } } @end I am calling LoginCheck method and based on result I want to show the second view. Here after finishing of the button touch down event, it enter into did end element, so I am always getting nil value. If I use the same code controller it works fine as I push second view controller in didendelement. Please give me some samples to place the web service calls in differnt class and how to call them in viewcontrollers. Regards, Malleswar

    Read the article

  • UILabels NOT Updating

    - by Chris Calleja Urry
    i have a UITableView that is being populated by core data , now , when i click on a cell , it pushes me to another view where i can edit the data that is in that particular index , when i return , the system either crashes or else doesnt load the changes onto the labels , any ideas ? code below -(void)viewWillAppear:(BOOL)animated { searchCriteria = [[NSMutableString alloc] initWithString:@"clientName"]; NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init]; NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"clientName" ascending:YES]; NSArray *sortDescriptors = [[NSArray alloc] initWithObjects:sortDescriptor, nil]; [fetchRequest setSortDescriptors:sortDescriptors]; NSEntityDescription *entity = [NSEntityDescription entityForName:@"Client" inManagedObjectContext:managedObjectContext]; [fetchRequest setEntity:entity]; fetchedResultsController = [[NSFetchedResultsController alloc] initWithFetchRequest:fetchRequest managedObjectContext:managedObjectContext sectionNameKeyPath:nil cacheName:@"Root"]; [self.clientTableView reloadData]; [super viewWillAppear:animated]; } and -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; } Client * client = [self.fetchedResultsController objectAtIndexPath:indexPath]; clientNameLabel = [[UILabel alloc] initWithFrame:CGRectMake(0.0, 0.0, 250.00, 30.0)]; clientNameLabel.tag = 1; clientNameLabel.backgroundColor = [UIColor clearColor]; clientNameLabel.textColor = [UIColor whiteColor]; clientNameLabel.font = [UIFont boldSystemFontOfSize:13]; clientNameLabel.text = client.clientName; [cell.contentView addSubview:clientNameLabel]; clientAccountNumberLabel = [[UILabel alloc] initWithFrame:CGRectMake(15.0, 35.0, 250.00, 30.00)]; clientAccountNumberLabel.tag = 2; clientAccountNumberLabel.textColor = [UIColor whiteColor]; clientAccountNumberLabel.backgroundColor = [UIColor clearColor]; clientAccountNumberLabel.font = [UIFont boldSystemFontOfSize:13]; clientAccountNumberLabel.text = client.clientAccountNumber; [cell.contentView addSubview:clientAccountNumberLabel]; clientTelephoneNumberLabel = [[UILabel alloc] initWithFrame:CGRectMake(300.0, 0.0, 250, 30.00)]; clientTelephoneNumberLabel.tag = 3; clientTelephoneNumberLabel.textColor = [UIColor whiteColor]; clientTelephoneNumberLabel.backgroundColor = [UIColor clearColor]; clientTelephoneNumberLabel.font = [UIFont boldSystemFontOfSize:13]; [cell.contentView addSubview:clientTelephoneNumberLabel]; addressLine1Label = [[UILabel alloc] initWithFrame:CGRectMake(315.0, 35.0, 250, 30.00)]; addressLine1Label.tag = 4; addressLine1Label.textColor = [UIColor whiteColor]; addressLine1Label.backgroundColor = [UIColor clearColor]; addressLine1Label.font = [UIFont boldSystemFontOfSize:13]; addressLine1Label.text = client.addressLine1; [cell.contentView addSubview:addressLine1Label]; addressLine2Label = [[UILabel alloc] initWithFrame:CGRectMake(315.0, 35.0, 250, 30.00)]; addressLine2Label.tag = 5; addressLine2Label.textColor = [UIColor whiteColor]; addressLine2Label.backgroundColor = [UIColor clearColor]; addressLine2Label.text = client.addressLine2; addressLine2Label.font = [UIFont boldSystemFontOfSize:13]; [cell.contentView addSubview:addressLine2Label]; addressLine3Label = [[UILabel alloc] initWithFrame:CGRectMake(315.0, 35.0, 250, 30.00)]; addressLine3Label.tag = 6; addressLine3Label.textColor = [UIColor whiteColor]; addressLine3Label.backgroundColor = [UIColor clearColor]; addressLine3Label.font = [UIFont boldSystemFontOfSize:13]; addressLine3Label.text = client.addressLine3; [cell.contentView addSubview:addressLine3Label]; addressLine4Label = [[UILabel alloc] initWithFrame:CGRectMake(315.0, 35.0, 250, 30.00)]; addressLine4Label.tag = 7; addressLine4Label.textColor = [UIColor whiteColor]; addressLine4Label.backgroundColor = [UIColor clearColor]; addressLine4Label.font = [UIFont boldSystemFontOfSize:13]; addressLine4Label.text = client.addressLine4; [cell.contentView addSubview:addressLine4Label]; return cell; } The Crash Logs are as follows : 2012-06-23 17:08:05.541 iSalesForce[11773:15803] no object at index 1 in section at index 0 And some other code you might find useful are : - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 1; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return [fetchedObjects count]; } - (float)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { return 70.0; }

    Read the article

< Previous Page | 1 2 3 4 5  | Next Page >