iphone

Crashes when in simulator when button pressed

I have 3 views and the first view has a motion background (sequence of pictures), music, and two buttons. When I push either button it crashes. I have a feeling its a memory problem but I'm not sure how to fix this. I'm rather new to Xcode. ...

How do i test my app data persistence during development?

Hi, My question is related to the following three questions. http://stackoverflow.com/questions/2099747/iphone-what-happens-to-previous-data-when-app-is-upgraded-to-new-version http://stackoverflow.com/questions/1223696/how-the-application-upgrade-works-in-iphone http://stackoverflow.com/questions/941479/upgrading-iphone-application-v...

Get frontmost subview

I know UIView's hitTest:withEvent: method digs down to the far-most view that gets the touch event, but how would you get the opposite result? The first view to get an event at a certain CGPoint? EDIT As zem pointed out, that hitTest method returns the farthest descendent in the view hierarchy. In my case, I have a mapView with a bunch ...

Core Data max storage iPhone

Is there a limit to how much persistent storage a single iPhone app may consume? What does save set the error argument to if the iPhone hits a per-app limit? What if it hits the hardware limit? Is it possible to limit the number of objects stored for certain entities? If so, what's a good approach to doing this? acani, an iPhone app I...

socket never accept bytes to write

Hi, I'm trying to write a client. I am able to open a socket to the server and the server acknowledges the connection, but for some reason, the write stream is never ready to accept data, i.e. it seems to always be blocked. What am I doing wrong? I'm new to socket programming, so it might be something in the wrong place, but here's w...

ASSETWriterInput for making Video from UIImages on Iphone Issues

I try the following 2 methods of appending UIIMages pixelbuffer to ASSETWriterInput. Everything looks good except there's No data in the video file. What's wrong? 1)Adaptor class AVAssetWriterInputPixelBufferAdaptor * avAdaptor = [AVAssetWriterInputPixelBufferAdaptor assetWriterInputPixelBufferAdaptorWithAssetWriterI nput:writerInput...

HTML5 with Web Services

Now the case, I want to develop a iPhone apps/web apps using Phonegap. Ok, imagine the app can do all sort of thing include data processing, transaction, login, video streaming, display data from the web services, so to do this I need use JavaScript (Ajax) to call the web services, then only put it into the HTML? HTML5 now come with sup...

Simple timer in iPhone

I'm trying to use timeIntervalSinceReferenceDate and I'm not quite sure if I understand it correctly. I basically have a button to calculate the difference in time between when the start and stop button is pressed. - (IBAction)startButtonPressed { startButtonFlag = !startButtonFlag; // first time through, startButtonFlag turns on ...

Problem with Presenting a ModalViewController containing a TabBarController

Hey guys. I have a problem with presenting and dismissing a modalViewController that contains a tabBarView controller (with two viewControllers). I have no problem in presenting and dismissing the modal, but I have a navbar setup at the top of each view controller with a done button that will dismiss the modal and return the user back ...

IPad Core Data Leak ?

Im using XCode 3.2.3 and have created an app using the SplitView template with Core Data. When i run the default app on the device (3.2) in debug mode with instruments running i am seeing a leak. When the default app has no items added to the table view within the split view there is no leak. But after adding items and running the app a ...

Updating/Deleting relationships using Core Data

I have the following relationship defined in Core Data Person --> Worked <-- Job I have a view that shows Person information in a tableview. The user can then click on Worked Items to see all worked items for that person (Worked entity shows hours worked and related job). I then push a view showing worked jobs for that person. I also s...

NSUserDefaults synchronize does not work when synchonizing archived data

I have a Mutable Array of objects, NSStrings, NSArrays, NSDictionaries, NSNumbers. These I archive this array and add it to NSUserDefaults without any problem, however when I call synchronize the method returns NO. Code: [[NSUserDefaults standardUserDefaults] setObject:[NSKeyedArchiver archivedDataWithRootObject:statusUpdates] forKey:t...

[self setNeedsDisplay:YES] crashes?

when I try to run [self setNeedsDisplay:YES] in my ViewController it crashes with unrecognized selector sent to instance... is there something I'm doing wrong? I'm using: -(void) drawRect: (CGRect)rect { ///code... } ...

Facing Following Issues When Submitting App to App Store

When I submit the application to app store I get the following errors: 1) Apple's web service operation was not successful 2) Unable to authenticate the package 444.itmsp 3) The filename -23Pop.isa in the package contains an invalid character(s). The valid characters are A-Z (and so on). ...

Tips for an iOS developer to learn Mac programming?

As Apple announces the Mac App Store, I'm going to learn Mac programming. I am typically one of those who read the Beginning iPhone 3 Development book before the Cocoa Programming for Mac OS X book. The reason I bought a MacBook was due to the fact that Xcode runs only on OS X. So, what's your tips for an existing iOS programmer who is a...

help needed on writing NSData to output stream using NSStream in objective c

Hi, i using the following code which writes the file from a path to an output stream but every time i run the code, it always write 131768 bytes to the stream regards of my file size(8MB or 5MB or etc). Can someone please check for me? i can't seems to find the problem. Or it there other ways to do it? I'm using NSStream with the follow...

How can I implement a strobe light on my iPhone 4

I would like to implement a strobe light on my iphone 4 I already have the code to turn on and off the LED. I figure I should use an NSTimer to repeat the method that turn the light on and off, also i figure i would use a UISlider to change the rate at which the strobe flashes. I just need to know what the best way to implement the str...

Why does this only detect touches in the center of the CCSprites?

I am trying to let the finger drag CCSprite with the following code: -(BOOL)ccTouchBegan:(UITouch *)touch withEvent:(UIEvent *)event { CGPoint location = [touch locationInView: [touch view]]; CGPoint convertedCoordinate = [[CCDirector sharedDirector] convertToGL:location]; CGRect redCircleRect = CGRectMake(redCircle.positio...

OAuth Consumer Library for Obj-c that works with many service providers

Hello, I'm developing an iOS app that needs to connect to Twitter, Facebook, Google, Yahoo, Gowalla and Foursquare via OAuth. I have been using http://github.com/dbloete/oauth-objc and that works fine with Twitter (OAuth v.1, basic implementation), but has problems with everything else (it seems that each provider has different standards...

Show a view as a splash screen in didFinishLaunchingWithOptions

I have a Tab Bar Application and I want to simply display a view (splash screen) once the didFinishLaunchingWithOptions method loads up the tab bar controller. Why is this so hard? Please show me how I'd load up and show a Xib file called SplashView.xib below and display it: - (BOOL)application:(UIApplication *)application didFinishL...