Search Results

Search found 63 results on 3 pages for 'ios4'.

Page 1/3 | 1 2 3  | Next Page >

  • iPhone iOS4: API for AVRCP (ff/rewind commands on Bluetooth headsets)

    - by Michael Kessler
    Hi, I know that AVRCP abilities were added to iOS 4.1 (in iPod application now you can forward and rewind songs by using hardware buttons on supporting headsets). I am trying to find any API for using these abilities in a music application that I work on. The requirement is to catch play/stop, forward and rewind buttons events from the headset. Any information will be more than welcome. Thank you.

    Read the article

  • Download data in background with iOS4

    - by Sagar
    As per the latest update of Kindle V2.5, it has support of "continue downloading books while the app is in the background on iOS 4 devices". How is it possible to download content in background? As per the iOS multitasking documentation, only audio, voip & location updates are possible in background. And I've also maken sure that NSURLConnection doesn't download new data work while app goes background. Then how's it possible with Kindle app? Edit: I haven't checked Kindle App in iOS4 multitasking enabled device. So if anyone let me (& community) know what exactly Kindle app does to download, that would be very much helpful.

    Read the article

  • IOS4 UISplitViewController in Portrait Orientation with RootViewController showing like Landscape

    - by magic-c0d3r
    In IOS 3.2 I was able to display my UISplitViewController side by side like in landscape mode. In IOS 4.2 the RootViewController (MasterView) is not showing up in portrait mode. Does anyone know if we need to display the rootviewcontroll in a popover? Can we display it side by side like how it is in landscape mode? I want to avoid having to click on a button to show the masterview (when in portrait mode)

    Read the article

  • Multitasking on iOS4 and its stated battery efficiency

    - by eml
    Apple stated that the reason multitasking didn't arrive before iOS4 is because they hadn't figured out how to do it right. Jobs stated at Apple WWDC 2010 that they now do and that they solved the problem of preserving battery performance regarding multitasking. Is iOS4's multitasking "feature" indeed more efficient regarding battery performance compared to Android? Have the Android developers managed to "do it right" too?

    Read the article

  • iphone ios4 is not working

    - by asad26
    hi every one i am iphone developer as standard registered, i installed SDK4 seed version is fine and i alos instal ios4 for my ipod touch that is register in apple for development use, so i used xcode organizer to update my ipodtouch to new ios4 every this was fine and working to upload data , but in middle is crash and didn't work , now my ipod touch is dead is not working at all and i try to restore my ipad from backup i have in itune it didn't work? so any one has solution for my problem for installing ios4 in my ipodtouch ? thanks

    Read the article

  • What could cause this difference in behaviour from iphone OS3.0 to iOS4.0?

    - by frankodwyer
    I am getting a strange EXC_BAD_ACCESS error when running my app on iOS4. The app has been pretty solid on OS3.x for some time - not even seeing crash logs in this area of the code (or many at all) in the wild. I've tracked the error down to this code: main class: - (void) sendPost:(PostRequest*)request { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSURLResponse* response; NSError* error; NSData *serverReply = [NSURLConnection sendSynchronousRequest:request.request returningResponse:&response error:&error]; ServerResponse* serverResponse=[[ServerResponse alloc] initWithResponse:response error:error data:serverReply]; [request.objectToNotifyWhenDone performSelectorOnMainThread:request.targetToNotifyWhenDone withObject:serverResponse waitUntilDone:YES]; [pool drain]; } (Note: sendPost is run on a separate thread for each invocation of it. PostRequest is just a class to encapsulate a request and a selector to notify when complete) ServerResponse.m: @synthesize response; @synthesize replyString; @synthesize error; @synthesize plist; - (ServerResponse*) initWithResponse:(NSURLResponse*)resp error:(NSError*)err data:(NSData*)serverReply { self.response=resp; self.error=err; self.plist=nil; self.replyString=nil; if (serverReply) { self.replyString = [[[NSString alloc] initWithBytes:[serverReply bytes] length:[serverReply length] encoding: NSASCIIStringEncoding] autorelease]; NSPropertyListFormat format; NSString *errorStr; plist = [NSPropertyListSerialization propertyListFromData:serverReply mutabilityOption:NSPropertyListImmutable format:&format errorDescription:&errorStr]; } return self; } ServerResponse.h: @property (nonatomic, retain) NSURLResponse* response; @property (nonatomic, retain) NSString* replyString; @property (nonatomic, retain) NSError* error; @property (nonatomic, retain) NSDictionary* plist; - (ServerResponse*) initWithResponse:(NSURLResponse*)response error:(NSError*)error data:(NSData*)serverReply; This reliably crashes with a bad access in the line: self.error=err; ...i.e. in the synthesized property setter! I'm stumped as to why this should be, given the code worked on the previous OS and hasn't changed since (even the binary compiled with the previous SDK crashes the same way, but not on OS3.0) - and given it is a simple property method. Any ideas? Could the NSError implementation have changed between releases or am I missing something obvious?

    Read the article

  • Playing videos in UIWebView broken in iOS4?

    - by rforte
    I have an app that's worked since version 2.0 of the SDK where I create and add a UIWebView and then load the URL of an .mov to play a movie. Ever since the early version of the 4.0 beta up until the 4.0 GM this has stopped working. When I load a movie now I get the following error: :Plug-in handled load" and the movie never displays. Is this a known issue? Am I doing something wrong in 4.0?

    Read the article

  • iOS4.2: TouchBegan does not draw more then one circle per sensed touch

    - by Christian
    Hi all, quick question (which might be a no-brainer for most here) :) My code below should draw a circle for every time touch that is recognised but although more than ones touches are sensed only one circle will drawn up at a time. Can anyone see any obvious issues? This method sits in the XYZViewControler.m class. TouchPoint.m is the class that defines the circle. Thanks a bundle for your help and redirects. Chris - (void) touchesBegan: (NSSet *) touches withEvent: (UIEvent *)event { NSSet * allTouches = [event allTouches]; // get all events for (UITouch * touch in touches) { TouchPoint * touchPoint = [[TouchPoint alloc] initWithFrame:CGRectMake(0, 0, circleWidth, circleWidth)]; touchPoint.center = [touch locationInView:[self view]]; touchPoint.color = [UIColor redColor]; touchPoint.backgroundColor = [UIColor whiteColor]; [[self view] addSubview: touchPoint]; [touchPoint release]; CFDictionarySetValue(touchMap, touch , touchPoint); } [[self view] setNeedsDisplay]; }

    Read the article

  • Implementing Multitasking on an iPhone/iOS4 Web App

    - by Peter Watts
    I am looking to build a web app that implements background audio and fast app switching. These features work out of the box, when run as regular Safari web pages, but as soon as you add the web-app-capable tag, and try to run in full screen mode, this functionality breaks. I did some testing and even the most basic web app will reload every time when you switch back to it. And seeing as it's a web app, we can't exactly implement the multitasking API. Has anyone found a work around? This isn't a deal-breaker, as you can just avoid full screen mode, but then you also lose the ability to use your own icon in the app switch tray. Perhaps this explains a lack of full screen mode in YouTube's new web app....

    Read the article

  • How To Make iPhone App For Multiple Firmwares

    - by Dyldo42
    With iOS4 coming out soon, I have already planned to include an iAd in a future update of an app of mine. I assume that this will make my app unusable for anyone on a firmware lower than 4.0. Is there a way to change that variables and the .xib file based on the user's firmware? Cheers.

    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

  • AVFoundation: Video to OpenGL texture working - How to play and sync audio?

    - by j00hi
    I've managed to load a video-track of a movie frame by frame into a OpenGL texture with AVFoundation. I followed the steps described in the answer here: iOS4: how do I use video file as an OpenGL texture? and took some code from the GLVideoFrame sample from WWDC2010 which can be downloaded here: http://bit.ly/cEf0rM How do I play the audio-track of the movie synchronously to the video. I think it would not be a good idea to play it in a separate player, but to use the audio-track of the same AVAsset. AVAssetTrack* audioTrack = [[asset tracksWithMediaType:AVMediaTypeAudio] objectAtIndex:0]; I retrieve a videoframe and it's timestamp in the CADisplayLink-callback via CMSampleBufferRef sampleBuffer = [self.readerOutput copyNextSampleBuffer]; CMTime timestamp = CMSampleBufferGetPresentationTimeStamp( sampleBuffer ); where readerOutput is of type AVAssetReaderTrackOutput* How to get the corresponding audio-samples? And how to play them? Edit: I've looked around a bit and I think, best would be to use AudioQueue from the AudioToolbox.framework using the approach described here: AVAssetReader and Audio Queue streaming problem There is also an audio-player in the AVFoundation: AVAudioPlayer. But I don't know exactly how I should pass data to it's initWithData-initializer which expects NSData. Furthermore I don't think it's the best choice for my case because a new AVAudioPlayer-instance would have to be created for every new chunk of audio samples, as I understand it. Any other suggestions? What's the best way to play the raw audio samples which i get from the AVAssetReaderTrackOutput?

    Read the article

  • Terminating app due to uncaught exception 'NSGenericException', reason: '*** Collection <CALayerArray: 0x66522e0> was mutated while being enumerated

    - by fahu
    some times my app crashed by showing * Collection was mutated while being enumerated . This is occurring in same line of code all the time.please help me on this issue. i stuck on this. the app is crashing at pushing view controller line of my code.but it is not frequent one. my error console Terminating app due to uncaught exception 'NSGenericException', reason: '* Collection CALayerArray: 0x1030c730 was mutated while being enumerated. "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" )' my code: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { ServiceDetails *service=[[ServiceDetails alloc] initWithNibName:@"ServiceDetails" bundle:nil]; CompanyListingForm *list=[[CompanyListingForm alloc]initWithNibName:@"CompanyListingForm" bundle:nil]; [category_company_text resignFirstResponder]; if(viewHoldingTable) { [viewHoldingTable removeFromSuperview]; } if (category_clicked_flag==0) { if (location_or_cat_com==0) { NSMutableArray *get=[district_array objectAtIndex:indexPath.row]; locationid=[[get objectAtIndex:0]intValue]; [location_textfield resignFirstResponder]; location_textfield.text=[get objectAtIndex:1]; } else { if (draggingView) { [draggingView removeFromSuperview]; } if (viewHoldingTable) { [viewHoldingTable removeFromSuperview]; } NSMutableArray *get=[company_array objectAtIndex:indexPath.row]; category_company_text.text=[get objectAtIndex:1]; service.ida=[NSString stringWithFormat:@"%d",[[get objectAtIndex:0] intValue]]; service.idloc=[NSString stringWithFormat:@"%d",locationid]; [self.navigationController pushViewController:service animated:YES];//getting error at this point. //[emer release]; } } else { if (location_or_cat_com==0) { NSMutableArray *get=[district_array objectAtIndex:indexPath.row]; locationid=[[get objectAtIndex:0]intValue]; [location_textfield resignFirstResponder]; location_textfield.text=[get objectAtIndex:1]; } else { NSMutableArray *get=[category_array objectAtIndex:indexPath.row]; category_company_text.text=[get objectAtIndex:1]; int catid=[[get objectAtIndex:0]intValue]; list.IDForLoc=[NSString stringWithFormat:@"%d",locationid]; list.IDForCat=[NSString stringWithFormat:@"%d",catid]; list.companydetails=[get objectAtIndex:1]; [self.navigationController pushViewController:list animated:YES];//getting error at this point. } } [service release]; [list release]; }

    Read the article

  • networkActivityIndicatorVisible on iOS 4

    - by user365660
    Hi, I just downloaded xcode 3.2.3 (seperate directory installation) and ios 4 to my iphone. I'm having a problem with networkActivityIndicatorVisible. This works on 3.1.3, both phone and simulator. My code is (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; UIApplication* app2 = [UIApplication sharedApplication]; app2.networkActivityIndicatorVisible = YES; [self loadSources]; // Loads data in table view app2.networkActivityIndicatorVisible = NO; } I get the same effect in the simulator and on the phone both with ios 4.o The networkActivity indicator becomes visible for a fraction of a second and then invisible and this is done after loading the data for the tableView. Has something changed with this? Teo

    Read the article

  • Crash when trying to get NSManagedObject from NSFetchedResultsController after 25 objects?

    - by Jeremy
    Hey everyone, I'm relatively new to Core Data on iOS, but I think I've been getting better with it. I've been experiencing a bizarre crash, however, in one of my applications and have not been able to figure it out. I have approximately 40 objects in Core Data, presented in a UITableView. When tapping on a cell, a UIActionSheet appears, presenting the user with a UIActionSheet with options related to the cell that was selected. So that I can reference the selected object, I declare an NSIndexPath in my header called "lastSelection" and do the following when the UIActionSheet is presented: // Each cell has a tag based on its row number (i.e. first row has tag 0) lastSelection = [NSIndexPath indexPathForRow:[sender tag] inSection:0]; NSManagedObject *managedObject = [self.fetchedResultsController objectAtIndexPath:lastSelection]; BOOL onDuty = [[managedObject valueForKey:@"onDuty"] boolValue]; UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Status" delegate:self cancelButtonTitle:nil destructiveButtonTitle:nil otherButtonTitles:nil]; if(onDuty) { [actionSheet addButtonWithTitle:@"Off Duty"]; } else { [actionSheet addButtonWithTitle:@"On Duty"]; } actionSheet.actionSheetStyle = UIActionSheetStyleBlackOpaque; // Override the typical UIActionSheet behavior by presenting it overlapping the sender's frame. This makes it more clear which cell is selected. CGRect senderFrame = [sender frame]; CGPoint point = CGPointMake(senderFrame.origin.x + (senderFrame.size.width / 2), senderFrame.origin.y + (senderFrame.size.height / 2)); CGRect popoverRect = CGRectMake(point.x, point.y, 1, 1); [actionSheet showFromRect:popoverRect inView:[sender superview] animated:NO]; [actionSheet release]; When the UIActionSheet is dismissed with a button, the following code is called: - (void)actionSheet:(UIActionSheet *)actionSheet willDismissWithButtonIndex:(NSInteger)buttonIndex { // Set status based on UIActionSheet button pressed if(buttonIndex == -1) { return; } NSManagedObject *managedObject = [self.fetchedResultsController objectAtIndexPath:lastSelection]; if([actionSheet.title isEqualToString:@"Status"]) { if([[actionSheet buttonTitleAtIndex:buttonIndex] isEqualToString:@"On Duty"]) { [managedObject setValue:[NSNumber numberWithBool:YES] forKey:@"onDuty"]; [managedObject setValue:@"onDuty" forKey:@"status"]; } else { [managedObject setValue:[NSNumber numberWithBool:NO] forKey:@"onDuty"]; [managedObject setValue:@"offDuty" forKey:@"status"]; } } NSError *error; [self.managedObjectContext save:&error]; [tableView reloadData]; } This might not be the most efficient code (sorry, I'm new!), but it does work. That is, for the first 25 items in the list. Selecting the 26th item or beyond, the UIActionSheet will appear, but if it is dismissed with a button, I get a variety of errors, including any one of the following: [__NSCFArray section]: unrecognized selector sent to instance 0x4c6bf90 Program received signal: “EXC_BAD_ACCESS” [_NSObjectID_48_0 section]: unrecognized selector sent to instance 0x4c54710 [__NSArrayM section]: unrecognized selector sent to instance 0x4c619a0 [NSComparisonPredicate section]: unrecognized selector sent to instance 0x6088790 [NSKeyPathExpression section]: unrecognized selector sent to instance 0x4c18950 If I comment out NSManagedObject *managedObject = [self.fetchedResultsController objectAtIndexPath:lastSelection]; it doesn't crash anymore, so I believe it has something do do with that. Can anyone offer any insight? Please let me know if I need to include any other information. Thanks! EDIT: Interestingly, my fetchedResultsController code returns a different object every time. Is this expected, or could this be a cause of my issue? The code looks like this: - (NSFetchedResultsController *)fetchedResultsController { /* Set up the fetched results controller. */ // Create the fetch request for the entity. NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init]; // Edit the entity name as appropriate. NSEntityDescription *entity = [NSEntityDescription entityForName:@"Employee" inManagedObjectContext:self.managedObjectContext]; [fetchRequest setEntity:entity]; // Set the batch size to a suitable number. [fetchRequest setFetchBatchSize:80]; // Edit the sort key as appropriate. NSString *sortKey; BOOL ascending; if(sortControl.selectedSegmentIndex == 0) { sortKey = @"startTime"; ascending = YES; } else if(sortControl.selectedSegmentIndex == 1) { sortKey = @"name"; ascending = YES; } else { sortKey = @"onDuty"; ascending = NO; } NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:sortKey ascending:ascending]; NSArray *sortDescriptors = [[NSArray alloc] initWithObjects:sortDescriptor, nil]; [fetchRequest setSortDescriptors:sortDescriptors]; // Edit the section name key path and cache name if appropriate. NSFetchedResultsController *aFetchedResultsController = [[NSFetchedResultsController alloc] initWithFetchRequest:fetchRequest managedObjectContext:self.managedObjectContext sectionNameKeyPath:nil cacheName:@"Root"]; aFetchedResultsController.delegate = self; self.fetchedResultsController = aFetchedResultsController; [aFetchedResultsController release]; [fetchRequest release]; [sortDescriptor release]; [sortDescriptors release]; NSError *error = nil; if (![fetchedResultsController_ performFetch:&error]) { /* Replace this implementation with code to handle the error appropriately. abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. If it is not possible to recover from the error, display an alert panel that instructs the user to quit the application by pressing the Home button. */ //NSLog(@"Unresolved error %@, %@", error, [error userInfo]); abort(); } return fetchedResultsController_; } This happens when I set a breakpoint: (gdb) po [self fetchedResultsController] <NSFetchedResultsController: 0x61567c0> (gdb) po [self fetchedResultsController] <NSFetchedResultsController: 0x4c83630>

    Read the article

  • UIImageWriteToSavedPhotosAlbum not working in iOS 4?

    - by nickthedude
    Ive been using this function: (http://developer.apple.com/iphone/library/documentation/uikit/reference/UIKitFunctionReference/Reference/reference.html#//apple_ref/c/func/UIImageWriteToSavedPhotosAlbum) ...to save a uiimage to the users photo album and it works great on everything except a 4.0 simulator, dont have a device to test on so it may be boned there as well. ive also tried it in both the latest xcode (3.2.3 gm seed) and a previous build of 3.2.3. can anyone confirm that this is still function is still "functional" in iOS 4. the documentation gives no indication that it would be removed and I havent seen anything in searches related to it. Thanks, Nick

    Read the article

  • [IOS SDK] Sending Data to Other Players - Game Center

    - by mohacs
    Hi guys, I am developing a simple game center multiplayer game. i did manage almost everything except sending messeage to players. what i mean, i can invite player to play game, game is starts etc. regarding apple documentation i am using following method to send data but it' doesn't work at all. const char *bytes = "123"; NSData *packet = [NSData dataWithBytes:&bytes length:3]; [myMatch sendDataToAllPlayers: packet withDataMode: GKMatchSendDataUnreliable error:nil]; if possible a working sample would be great. many thanks.

    Read the article

  • Offline iOS web app: loads my manifest, but doesn't work offline

    - by Ken
    I'm writing a web app to be used offline on iOS. I've created a manifest, am serving it up as text/cache-manifest, and it usually works fine, when running inside Safari. If I add it as an app to my home screen, then turn on Airplane mode, it can't open the app at all -- I get an error and it offers to close the app. (I thought this was the entire purpose of an offline app!) When I load the app a first time when online, I can see in my logs that it's requesting every page listed in the manifest. If I turn off Airplane mode, and load the app, I can see the first file it's requesting is my main.html file (which is both listed in the manifest, and has the manifest=... attribute). It then requests the manifest, and all my other files, getting 200's for all (and 304's for anything requested a second time during this load). When I load the page in Chrome, and click around, the logs show the only thing it's trying to reach on the server is "/favicon.ico" (which is a 404, and which I don't think iOS Safari tries to load, anyway). All of the files listed in the manifest are valid and served without error. The Chrome inspector lists, under "APPLICATION CACHE", all the cached files I've listed which I expect. The entire set of files is about 50 KB, way under any limit on offline resources that I've found. Is this supposed to work, i.e., am I supposed to be able to create an offline iOS app using only HTML/CSS/JS? And where do I go about figuring out why it's failing to work offline? (Related but doesn't sound quite the same to me, since it's about Safari and not a standalone app: "Can't get a web app to work offline on iPod")

    Read the article

  • CMBufferQueueCreate fail, required parameters?

    - by Agustin
    Reading the documentation about iOS SDK CMBufferQueueCreate, it says that getDuration and version are required, all the others callbacks can be NULL. but running the following code: CFAllocatorRef allocator; CMBufferCallbacks *callbacks; callbacks = malloc(sizeof(CMBufferCallbacks)); callbacks->version = 0; callbacks->getDuration = timeCallback; callbacks->refcon = NULL; callbacks->getDecodeTimeStamp = NULL; callbacks->getPresentationTimeStamp = NULL; callbacks->isDataReady = NULL; callbacks->compare = NULL; callbacks->dataBecameReadyNotification = NULL; CMItemCount capacity = 4; OSStatus s = CMBufferQueueCreate(allocator, capacity, callbacks, queue); NSLog(@"QUEUE: %x", queue); NSLog(@"STATUS: %i", s); with timeCallback: CMTime timeCallback(CMBufferRef buf, void *refcon){ return CMTimeMake(1, 1); } and queue is: CMBufferQueueRef* queue; queue creations fails (queue = 0) and returns a status of: kCMBufferQueueError_RequiredParameterMissing = -12761, The callbacks variable is correctly initialized, at least the debugger says so. Somebody have played arround with CMBufferQueue? google doesn't know about that! Thanks

    Read the article

  • merging UIImagePickerController image with cameraOverlayView

    - by GameDev
    Im really in the need for some help and advice. Spent the last week on this and have now just become frustrated as i cant get it to work! Basically, im trying to merge two images into one image to display/save. First the user picks an image from album, it goes to edit image screen where user can move and scale the image. On this screen is an overlay image (320x480) for the person to align there eyes in. Once aligned I want to save this image (edited and overlay) into one and pass the image onto my next screen. It works fine when the image is filling the edit/crop box, but when the image is widescreen with top and bottom not filling the box, then when i save the image the coords of the overlay dont get saved correctly! Heres my code, ive tried various ways of doing this but have failed at every attempt :( - (void) imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { // Access the cropped image from info dictionary UIImage *image = [info objectForKey:@"UIImagePickerControllerEditedImage"]; // Combine image with overlay before saving!! image = [self addOverlayToImage:image]; overlayGraphicView.image = nil; // Take the picture image to the post picture view controller postPictureView = [[PostPictureViewController alloc] init:image Company:companyName withLink:buyButtonLink]; [picker pushViewController:postPictureView animated:YES]; [picker release],picker = nil; } The problem is that the image picked (originalImage) could be of any height, my overlayImage is however always 320x480, its almost all transparent with just two eye images in center which i want to save over the original images eyes! - (UIImage*) addOverlayToImage:(UIImage*)originalImage { CGRect cgRect =[[UIScreen mainScreen] bounds]; CGSize size = cgRect.size; UIGraphicsBeginImageContext(size); [originalImage drawInRect:CGRectMake(0, 0, size.width, size.height)]; UIImage* overlayImage = [UIImage imageNamed:overlayGraphicName]; [(UIImage *)overlayImage drawInRect:CGRectMake(0, 0, size.width, size.height)]; UIImage *finalImage = UIGraphicsGetImageFromCurrentImageContext(); [finalImage retain]; UIGraphicsEndImageContext(); return finalImage; } I wish there was just an easy way to take a screenshot of whatever is in the edit crop box :( Please if someone could help me with this ASAP as I need to finish this in 1-2 days time! Thank you. EDIT:- I should also mention that with this I get the correct center of the screen and placement of the overlay on my next screen: [(UIImage *)overlayImage drawInRect:CGRectMake(0, 0, size.width, size.height)]; However, I am unable to work out the correct position of the main image especially as the height is different for every image if not fullscreen! I tried this to center it into the correct position but it doesnt work: [originalImage drawInRect:CGRectMake(0,(size.height/2 - originalImage.size.height/2), originalImage.size.width, originalImage.size.height)];

    Read the article

  • NSStream on Background didn't call

    - by Iphone Developer
    - (void)applicationDidEnterBackground:(UIApplication *)application { NSOutputStream *outputStream; NSInputStream *inputStream; dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ [inputStream setDelegate:self]; [outputStream setDelegate:self]; [inputStream scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSRunLoopCommonModes]; [outputStream scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSRunLoopCommonModes]; [app endBackgroundTask:bgTask]; bgTask = UIBackgroundTaskInvalid; }); } Input,OutputStream delegate didn't call.What i am doing wrong.

    Read the article

  • MPMoviePlayerView fade in/out of overlay

    - by therobot
    I've got a MPMoviePlayerViewController, and I've added an overlay as a subview to the MPMoviePlayerController.view that it controls. Does anyone know if there's an easy way to make my added overlay fade in and out with the rest of the controls? My code to initialize and present the player is: LandscapeMPVC * theMovieViewController = [[LandscapeMPVC alloc] initWithContentURL:sourceURL]; MPMoviePlayerController * theMoviePlayer = [theMovieViewController moviePlayer]; [theMoviePlayer setRepeatMode:MPMovieRepeatModeOne]; [theMoviePlayer setScalingMode:MPMovieScalingModeAspectFit]; [theMoviePlayer setFullscreen:YES]; // Attemps at overlays MPViewOverlayController * overlayCont = [[MPViewOverlayController alloc] init]; [[theMovieViewController view] addSubview:overlayCont.view]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(resetToolbar:) name:MPMoviePlayerPlaybackDidFinishNotification object:theMoviePlayer]; [self presentMoviePlayerViewControllerAnimated:theMovieViewController]; LandscapeMPVC is just a subclass of MoviePlayerViewController where I overwrite the orientation code. When the rest of the controls fade in the movie player, my custom overlay does not. Is there some code in the controller that I need to add, or some notification that is sent? Any input would be greatly appreciated.

    Read the article

  • viewDidLoad never called in Sub-classed UIViewController

    - by Steve
    I've run into some trouble with loading a sub-classed UIViewController from a nib. My viewDidLoad function is never called. The super-class has no nib, but the sub-classes each have their own. i.e. @interface SuperClass : UIViewController { } @end @interface SubClass : SuperClass{ } @end @implementation SubClass - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; if (self) { } return self; } - (void)viewDidLoad{ // Never called } The view is loaded from a nib as follows: SubClass *scvc = [[SubClass alloc] initWithNibName:@"SubClass" bundle:nil]; [self.navigationController pushViewController:scvc animated:YES]; [scvc release]; There is a nib file with this name and it has it's file owner's class set properly. viewDidLoad is not called in the child or super. Any ideas?

    Read the article

  • Advice and resources for Apple iOS 4 development

    - by mlambie
    I'm looking for resources, screencasts, books, courses, sites and the like to assist with learning Objective-C with the intention of developing applications for Apple's iOS 4. My development team has access to Apple's development program, and is largely coming from a similar background: they're Comp Sci graduates that have experience with Ruby and web languages, but haven't written any C since university. Considering Apple's announcement regarding limited programming language support for developers, what's the current best avenue for learning Objective-C with the desire for developing iPad and iPhone applications?

    Read the article

1 2 3  | Next Page >