Search Results

Search found 19072 results on 763 pages for 'iphone sdk 4'.

Page 112/763 | < Previous Page | 108 109 110 111 112 113 114 115 116 117 118 119  | Next Page >

  • Error when deploying app to the device in iphone

    - by Rafael
    Hi, I'm developing an app with SDK 3.1.2 and it runs in the simulator, but when I try to deploy it in the device it arise de following error: 2010-06-17 17:40:39.592 MyApp[2143:207] *** -[__NSCFDate dateInformation]: unrecognized selector sent to instance 0x21e6a0 2010-06-17 17:40:39.608 MyApp[2143:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSCFDate dateInformation]: Why this doesn't happen for the simulator? Thanks in advanced for your help.

    Read the article

  • is background audio playing enabled in iPhone?

    - by Nareshkumar
    I was able to play the audio in background of the application in iPhone. However I would like to know if there is any service that enables the playback of audio after the user exits the application? I know that SDK 4.0 promises multitasking and background processes of the application. But i would like to know if this is enabled for audio playback in the earlier versions?

    Read the article

  • Xcode: iPhone screenshots no longer work

    - by Chris Newman
    I can't be sure when this stopped working because I haven't used it for a while, but it was possibly since I upgraded to the 3.2 SDK. In Organizer, when I select the "Screenshots" tab and press "Capture", nothing happens. I've tried this with three different devices and I've restarted my Mac. What's happened, and how can I fix it?

    Read the article

  • *iPhone* Unable to symbolicate in Object Allocations instrument

    - by AkademiksQc
    Hi there, i run a C++ app from objective-c I can successfully symbolicate my function names using Shark profiler but not with the Object Allocations instrument.à In the detailed pane, i only see my C++ app name with the hexadecimal value for my C++ functions. I tried to do a "File/Re-Symbolicate Document", selecting my app folder containing both my app and my Dsym file but nothing change. Any clues? My config: xCode 3.2.2 iPhonoe SDK 3.2 Snowleopard (10.6.3) Thx.

    Read the article

  • iphone app rejection question

    - by adam d.
    My iPhone app was rejected with the following note: "The following non-public APIs are included in your application: Spi Symbols __memset_chk __memmove_chk" These symbols appear in a small number of apparently cocos2d related object files: Grid.o Primitives.o TextureAtlas.o Curiously, this app had already been approved under the previous SDK, but under 3.2 it's being rejected, though that may have nothing to do with it. I'm not at all sure how to resolve this and appreciate any help anyone can offer. Thanks.

    Read the article

  • UIWebView is ignoring cookies?!

    - by A. Miladinovic
    Hello everybody, I am creating an app for the iPhone that fetches a specific page from a website, but to be able to view this site you need to log in with a username and a password. I've created this code: NSString *urlAddress = @"http://www.wdg-hamburg.de"; NSURL *url = [NSURL URLWithString:urlAddress]; NSString *post = @"name=loginname&pass=pass&form_id=user_login&op=Anmelden"; NSData *postData = [post dataUsingEncoding:NSASCIIStringEncoding]; NSString *postLength = [NSString stringWithFormat:@"%d", [postData length]]; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; [request setHTTPMethod: @"POST"]; [request setValue:postLength forHTTPHeaderField:@"Content-Length"]; [request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"]; [request setHTTPBody:postData]; [vPlan loadRequest:request]; But I am not logged in at the UIWebView! I am logging NSHTTPCookieStorage to the console and it shows me the necessary cookie, but I dont get logged in. Does anybody knows how I can fix that? Kind regards, A. Miladinovic

    Read the article

  • Apple Push Notification-Unable to callback didRegisterForRemoteNotificationsWithDeviceToken

    - by Shailesh Kanzariya
    I have been simply trying to get deviceToken from my iPhone application using Apple Push Notification Service. I don't have any implementation on server side for the time being. I have created APP Id, got SSL certificate, Provision Profile with APN and calling - (void)applicationDidFinishLaunching:(UIApplication *)application { //view init and add sub view to window [[UIApplication sharedApplication] registerForRemoteNotificationTypes:UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound]; } method. When I execute the application it pop ups action box to allow Push Notification (means my request for APN registration is working) but my callback is not executed. Neither didRegisterForRemoteNotificationsWithDeviceToken nor didFailToRegisterForRemoteNotificationsWithError is called? can anybody help me to resolve the issue? Following are my callbacs for reference. - (void)application:(UIApplication *)app didFailToRegisterForRemoteNotificationsWithError:(NSError *)err { UIAlertView *myAlert = [[UIAlertView alloc] initWithTitle:@"APNClient" message:@"Entered into Error Method" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; [myAlert show]; [myAlert release]; NSLog(@"Error in registration. Error: %@", err); } - (void)application:(UIApplication *)app didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)devToken { UIAlertView *myAlert = [[UIAlertView alloc] initWithTitle:@"APNClient" message:@"Got the deviceToken..!" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; [myAlert show]; [myAlert release]; }

    Read the article

  • How to allow tap-to-focus on the camera using an overlay

    - by AJJ
    The standard 3GS iPhone camera includes tap-to-focus (I can tap to the region I want to focus on). However when I use a custom overlay using the UIImagePickerController class, the tap to focus does not seem to work. Everything else in terms of capturing images programmatically etc is working btw. Note that my overlay view is only a small rectangle (UIView) at the bottom of the screen. It does not cover the other areas of the camera. So I believe the taps should go through (unless I am missing something). I have seen other apps use an overlay and still provide a tap-to-focus functionality, so there must be a way to do this. I use all the default controls set to be hidden as: imagePicker.showsCameraControls = NO; imagePicker.toolbarHidden = YES; imagePicker.navigationBarHidden = YES; Of course changing the above does not let me tap-to-focus (it just enables the toolbars, etc). I could not find any answers on the UIImagePickerController class reference. Any help would be greatly appreciated. Thanks!

    Read the article

  • View Controller's viewDidLoad method finishing before applicationDidFinishLaunching

    - by mwt
    I'm creating a fairly complex iPhone app using Core Data. Up until now, things have been working fine. As the app has been getting more complex, however, a new problem has come up: the first view controller is finishing its viewDidLoad method before the AppDelegate gets even halfway through its applicationDidFinishLaunching method. The view controller is not the root, which is a tab bar controller. The VC in question is the one for the default selected tab on the tab bar. It's getting instantiated by IB. Nothing like this has occurred before in my experience, and it's throwing off the important initialization I'm doing in the AppDelegate (getting objects from Core Data and preparing them for use) . Furthermore, it's intermittent -- sometimes the delegate does finish first. Has anyone else noticed a difficulty like this? Any sample code that deals with such an issue? I suppose that the answer is to make the VC load the data that the AppDelegate is getting ready only when the AppDelegate sends a message that it's ready. I'm a bit concerned that this is adding something that will just end up biting me in the butt later on.

    Read the article

  • ABAddressBookGetPersonCount(ab) problem

    - by prathumca
    Why the call to ABAddressBookGetPersonCount(ab); is giving the problem? I have around 2000 contacts in my address book. When my app gets started I'm trying to read the entire address book. This works perfectly on simulator but causing crash on IPhone. The crash report is pointing to 9 AppSupport 0x31fbca1e 0x31fb6000 + 27166 // CPRecordStoreGetCountOfInstancesOfClassWhere + 0x7e 10 AddressBook 0x318df668 0x318d5000 + 42600 // ABCGetPersonCountInStore + 0x88 11 AddressBook 0x318ea450 0x318d5000 + 87120 // ABAddressBookGetPersonCount + 0x8 12 MyAddressBook 0x0000ad30 0x1000 + 40240 // -[MyAddressBookController readAB] + 0x2c0 13 MyAddressBook 0x0000a8ce 0x1000 + 39118 // -[MyAddressBookController start] + 0x4a What I'm doing in "readAB"? - (void) readAB { ABAddressBookRef ab = ABAddressBookCreate(); CFArrayRef contacts = ABAddressBookCopyArrayOfAllPeople(ab); CFIndex count = ABAddressBookGetPersonCount(ab); for(int i = 0; i < count; i++) { //doing some thing... } } If you observe the above crash report, it is clearly pointing to CFIndex count = ABAddressBookGetPersonCount(ab);. Whats wrong with this code? I'm sure that this code works perfectly on firmware 3.1.2. But now I upgraded firmware to 3.1.3. Is this upgrade is causing any trouble? Regards, prathumca.

    Read the article

  • OpenGL ES, UIView and Status Bar mess

    - by sfider
    I have iPhone (iPhoneOS 3.x) OpenGL ES app that: can be in landscape/portrait orientation can be with/without status bar shown I do this by changing status bar orientation and hidden state, then updating OpenGL view frame so it won't overlap status bar and setting projection matrix appropriately. OpenGL view is in portrait orientation at all time. View controller's shouldAutorotateToInterfaceOrientation: method returns false always, so the status bar won't start autorotating when app is in landscape mode. The problem I have is that I want to use some other UIViews, like: UIWebView, MFMailComposeView, MPMediaPicker. I could show them as modals, but this this have some drawbacks: views will always show in portrait orientation, even if they support landscape orientation views will not autorotate, even if they support it What I do is I take OpenGL view of the window with removeFromSuperview, set transform to the other view so it will be in portrait/landscape orientation when it shows up and place the other view on the window with addSubview:. This works fine without the status bar, but with it there are some problems I cannot work out: MPMediaPicker is sized to fit under status bar, but it slides under it anyway MFMailComposeView does not show navigation bar until it autorotates on device orientation change Does anyone has an idea how can I get it to work?

    Read the article

  • What is the proper way to align UITableViewCells when only some have an imageView?

    - by Topher Fangio
    Hello all, I am new to iPhone programming and working on my first real application (i.e. one not written in a book or online) and I've run into a small problem which I could solve a multitude of ways, but feel like there should be a good solution that perhaps I am just missing. Here is the scenario: I have a UITableView with a bunch of standard UITableViewCells in it. What I want to do is toggle a green check mark when the cell is selected and I have that part working (note: I'm already using the accessoryType for something else, so I can't use it for the checkmark...besides, it's not as pretty). Unfortunately, when I toggle the checkmark like so: if (...) { cell.imageView.image = [UIImage imageNamed:@"checkmark.png"]; } else { cell.imageView.image = nil; } It makes the cell's label bounce back and forth depending on whether it is checked or not. What is the proper way to align the cell's text (set via cell.textLabel.text) regardless of whether or not it has an image set? The solutions I have come up with are: Create a blank 40x40 png image in Photoshop and set the unchecked to that Create a blank 40x40 image solely in code Set some setting that I don't know about that will align it for me Create a subclass of UITableCellView that does what I need (which would be stupid, I'd just go with option 1...) Suggestions? Thoughts? Comments? Thank you very much :-) P.S. I'd like the solution to work with OS 3.0 and 4.0 if that makes any sort of difference.

    Read the article

  • Object created in Interface Builder getting dealloc'ed too soon

    - by Collin Allen
    The Project I'm working on a relatively simple iPhone OS project that's navigation controller based, with a root table view and a detail table view. Tap an item in the main list to see its details in a pushed table view. The Setup I broke out the data source for both views into their own objects so as not to muddy the purpose of a view controller. Having done this, the table views no longer have data sources since those methods are now in separate files, so I created an instance of each data source class in the appropriate XIB files with the Object item (dragged it in, then set its class). Then, to actually connect the tableviews to their data sources, I set the dataSource outlet of each tableview to the yellow data source object in Interface Builder. The table view delegates are still set to their view controllers. The Problem The root table view works just fine, but when you tap a row to push to the detail view, the data source object gets instantiated as expected, then immediately dealloc'ed, causing a crash (numberOfSectionsInTableView: gets called on the freed object). I can't figure out why the data source is getting automatically dealloc-ed when I need it right then and there for the detail view, as indicated by my data source object creation and tableview connection in Interface Builder. What's more perplexing is that the very approach works fine for the root tableview! The Question Is there anything obvious I'm missing that would cause this to happen? Or, is this even the right way to instantiate a data source for a table view controller? It seems like poor object oriented programming to do it from within the view controller, which should only be concerned with the view. I could cram everything in two table view controller classes and it would probably work, but it would not be as modular as I'd like. Thanks!

    Read the article

  • Troubleshooting FORM POST problems

    - by brettr
    I'm using the following code to submit to a WCF service. I keep getting an error that the key is invalid. I have a webpage on the same server that I submit the same data (but different key) using a FORM POST. It works fine that way. I put the URL below all in a URL (including valid key from server webpage) and get the key is invalid error. I'm thinking the data I'm submitting through the iPhone isn't really going across as a FORM POST but rather as a URL. Is there anything I may be doing wrong in the following code or any other suggestions? NSString *stringForURL = @"https://abc.com/someservice.aspx"; NSURL *URL=[[NSURL alloc] initWithString:stringForURL]; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:URL]; NSString *request_body = [NSString stringWithFormat:@"prop1=value1&key=%@", [@"r2xHEuzgDTQEWA5Xe6+k9BSVrgsMX2mWQBW/39nqT4s=" stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; NSData *postData = [request_body dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES]; NSString *postLength = [NSString stringWithFormat:@"%d", [postData length]]; [request setValue:postLength forHTTPHeaderField:@"Content-Length"]; [request setHTTPMethod:@"POST"]; [request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"]; [request setHTTPBody:postData]; NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request delegate:self]; [NSThread sleepForTimeInterval:1]; self.receivedData = [[NSMutableData data] retain];

    Read the article

  • Dragging an UIView inside UIScrollView

    - by Sergey Mikhanov
    Hello community! I am trying to solve a basic problem with drag and drop on iPhone. Here's my setup: I have a UIScrollView which has one large content subview (I'm able to scroll and zoom it) Content subview has several small tiles as subviews that should be dragged around inside it. My UIScrollView subclass has this method: - (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event { UIView *tile = [contentView pointInsideTiles:[self convertPoint:point toView:contentView] withEvent:event]; if (tile) { return tile; } else { return [super hitTest:point withEvent:event]; } } Content subview has this method: - (UIView *)pointInsideTiles:(CGPoint)point withEvent:(UIEvent *)event { for (TileView *tile in tiles) { if ([tile pointInside:[self convertPoint:point toView:tile] withEvent:event]) return tile; } return nil; } And tile view has this method: - (void)touchesMoved:(NSSet*)touches withEvent:(UIEvent*)event { UITouch *touch = [touches anyObject]; CGPoint location = [touch locationInView:self.superview]; self.center = location; } This works, but not fully correct: the tile sometimes "falls down" during the drag process. More precisely, it stops receiving touchesMoved: invocations, and scroll view starts scrolling instead. I noticed that this depends on the drag speed: the faster I drag, the quicker the tile "falls". Any ideas on how to keep the tile glued to the dragging finger? Thanks in advance!

    Read the article

  • Why MKMapView region is different than requested?

    - by Kamil
    Greetings! I'm saving map region into user defaults when my iPhone app is closing like this: MKCoordinateRegion region = mapView.region; [[NSUserDefaults standardUserDefaults] setDouble:region.center.latitude forKey:@"map.location.center.latitude"]; [[NSUserDefaults standardUserDefaults] setDouble:region.center.longitude forKey:@"map.location.center.longitude"]; [[NSUserDefaults standardUserDefaults] setDouble:region.span.latitudeDelta forKey:@"map.location.span.latitude"]; [[NSUserDefaults standardUserDefaults] setDouble:region.span.longitudeDelta forKey:@"map.location.span.longitude"]; When app launches again, i read those values back the same way, so that the user can see exactly the same map view as it was last time: MKCoordinateRegion region; region.center.latitude = [[NSUserDefaults standardUserDefaults] doubleForKey:@"map.location.center.latitude"]; region.center.longitude = [[NSUserDefaults standardUserDefaults] doubleForKey:@"map.location.center.longitude"]; region.span.latitudeDelta = [[NSUserDefaults standardUserDefaults] doubleForKey:@"map.location.span.latitude"]; region.span.longitudeDelta = [[NSUserDefaults standardUserDefaults] doubleForKey:@"map.location.span.longitude"]; NSLog([NSString stringWithFormat:@"Region read : %f %f %f %f", region.center.latitude, region.center.longitude, region.span.latitudeDelta, region.span.longitudeDelta]); [mapView setRegion:region]; NSLog([NSString stringWithFormat:@"Region on map: %f %f %f %f", mapView.region.center.latitude, mapView.region.center.longitude, mapView.region.span.latitudeDelta, mapView.region.span.longitudeDelta]); The region I read from user defaults is (not surprisingly) exactly the same as when it was saved. Notice that what is saved comes directly from the map, so it's not transformed in any way. I set it back on map with setRegion: method, but then it is different! Example results: Region read : 50.241110 8.891555 0.035683 0.042915 Region on map: 50.241057 8.891544 0.050499 0.054932 Does anybody know why this happens?

    Read the article

  • Displaying timecode using NSTimer and NSDateFormatter

    - by Chris B
    Hi. I am very close to completing my first iphone app and it has been a joy. I am trying to add running timecode using the current time via an NSTimer displaying the current time (NSDate) on a UILabel. NSDate is working fine for me, showing hour, minute, second, milliseconds. But instead of milliseconds, I need to show 24 frames per second. The problem is that I need the frames per second to be synced 100% with the hour, minute and second, so I can't add the frames in a separate timer. I tried that and had it working but the frame timer was not running in sync with the date timer. Can anyone help me out with this? Is there a way to customize NSDateFormatter so that I can have a date timer formatted with 24 frames per second? Right now I'm limited to formatting just hours, minutes, seconds, and milliseconds. Here's the code I'm using right now -(void)runTimer { // This starts the timer which fires the displayCount method every 0.01 seconds runTimer = [NSTimer scheduledTimerWithTimeInterval: .01 target: self selector: @selector(displayCount) userInfo: nil repeats: YES]; } //This formats the timer using the current date and sets text on UILabels - (void)displayCount; { NSDateFormatter *formatter = [[[NSDateFormatter alloc] init] autorelease]; NSDate *date = [NSDate date]; // This will produce a time that looks like "12:15:07:75" using 4 separate labels // I could also have this on just one label but for now they are separated // This sets the Hour Label and formats it in hours [formatter setDateFormat:@"HH"]; [timecodeHourLabel setText:[formatter stringFromDate:date]]; // This sets the Minute Label and formats it in minutes [formatter setDateFormat:@"mm"]; [timecodeMinuteLabel setText:[formatter stringFromDate:date]]; // This sets the Second Label and formats it in seconds [formatter setDateFormat:@"ss"]; [timecodeSecondLabel setText:[formatter stringFromDate:date]]; //This sets the Frame Label and formats it in milliseconds //I need this to be 24 frames per second [formatter setDateFormat:@"SS"]; [timecodeFrameLabel setText:[formatter stringFromDate:date]]; }

    Read the article

  • How can I programmatically add more than just one view object to my view controller?

    - by BeachRunnerJoe
    I'm diving into iPhone OS development and I'm trying to understand how I can add multiple view objects to the "Left/Root" view of my SplitView iPad app. I've figured out how to programmatically add a TableView to that view based on the example code I found in Apple's online documentation... RootViewController.h @interface RootViewController : UITableViewController <NSFetchedResultsControllerDelegate, UITableViewDelegate, UITableViewDataSource> { DetailViewController *detailViewController; UITableView *tableView; NSFetchedResultsController *fetchedResultsController; NSManagedObjectContext *managedObjectContext; } RootViewController.m - (void)loadView { UITableView *newTableView = [[UITableView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame] style:UITableViewStylePlain]; newTableView.autoresizingMask = UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth; newTableView.delegate = self; newTableView.dataSource = self; [newTableView reloadData]; self.view = newTableView; [newTableView release]; } but there are a few things I don't understand about it and I was hoping you veterans could help clear up some confusion. In the statement self.view = newTableView, I assume I'm setting the entire view to a single UITableView. If that's the case, then how can I add additional view objects to that view alongside the table view? For example, if I wanted to have a DatePicker view object and the TableView object instead of just the TableView object, then how would I programmatically add that? Referencing the code above, how can I resize the table view to make room for the DatePicker view object that I'd like to add? Thanks so much in advance for your help! I'm going to continue researching these questions right now.

    Read the article

< Previous Page | 108 109 110 111 112 113 114 115 116 117 118 119  | Next Page >