iphone-simulator

Unique identifier for an iPhone app.

For an iPhone app that submits images to a server I need somehow to tie all the images from a particular phone together. With every submit I'd like to send some unique phone id. Looked at [[UIDevice mainDevice] uniqueIdentifier] and [[NSUserDefaults standardDefaults] stringForKey:@"SBFormattedPhoneNumber"] but getting errors in ...

Trying to play sound through iPhone Simulator

I'm trying to play a sound file from an iPhone program. Here's the code: NSString *path = [[NSBundle mainBundle] pathForResource:@"play" ofType:@"caf"]; NSFileHandle *bodyf = [NSFileHandle fileHandleForReadingAtPath:path]; NSData *body = [bodyf availableData]; NSLog( @"length of play.caf %d",[body length] ); NSURL *url = [NSURL fileURL...

how to keep the iphone simulator application directory be the same when run it everytime

i met a problem with iphone simulator application directory, when i run the application everytime, the name of application directory was changed each of time,can anyone tell me how to keep a static application directory ? ...

Screen Off event or property on iPhone

Hello, Is there a way to determine if the screen has been shut off via the top Power button? I just need to know if the screen has been somehow set to off to kill a loop that updates location. Thanks ...

Why does Xcode keep changing its active executable?

Something really weird is going on with Xcode and an iPhone project I'm working on, when I'm building for the simulator, the project has 2 active executables (MyApp - iPhone Simulator (2.0) and MyApp - iPhone Simulator (2.1)) Almost all of the time, I want to use the the 2.1 active executable, but Xcode will occasionally silently change...

iPhone Simulator: SpringBoard failed to launch application with error: 7

Building an iPhone project results in: Failed to launch simulated application: SpringBoard failed to launch application with error: 7 And the app doesn't install on the simulator. What's this all about? What's SpringBoard and what is error 7? ...

Sound not working in iPhone Simulator?

Somehow my iPhone Simulator is unable to play sounds. First an app I'm working on using AudioServicesPlaySystemSound() stopped working.. I spent a while debugging this but sound is still working on the iPhone when I run the app on the device. I get the same results with other iPhone apps such as the sample Crash Landing app. I can't f...

Is any Windows simulator available to test iPhone application?

Hi, Is there any windows simulator availabe through which I can test (only testing) my iPhone application on Windows XP? Thanks & regards, Khushi ...

iPhone simulator and applicationWillTerminate()

When my app is run in the iPhone simulator, the delegate method - (void)applicationWillTerminate:(UIApplication *)application is only called the first time I hit the iPhone simulator's home button. After the home button is pressed and the app is launched again, hitting the home button does not call the delegate method. What is going...

iPhone Simulator Default Hardware Version

I have been playing around with the iPhone SDK recently. At first I wasn't taking advantage of anything that required version SDK version 2.2. However, I recently started using some features that were added or modified in 2.1 and 2.2. I installed the new 2.2 SDK and changed my project settings to target SDK 2.2. However, when I hit "Bui...

How can I run two instances of the iPhone simulator (Aspen) to try out the WiTap example?

Has anyone had any luck running two instances of the iPhone simulator to test network code between the two? ...

Automated testing for iPhone

I know this one is going to be a long-shot, but I thought I'd try. Does anyone know of any automated test anything for the iPhone simulator? I'd love it if there was something like Selenium but for the iPhone simulator. I don't need anything fancy like assertions, just something that can fake out taps on a screen so I can stop abusing...

Running Apple Store Apps on iPhone simulator?

Can i run download applications from Apple Store on iPhone simulator? ...

How can I programmatically determine if my app is running in the iphone simulator?

As the question states, I would mainly like to know whether or not my code is running in the simulator, but would also be interested in knowing the specific iphone version that is running or being simulated. EDIT: I added the word 'programmatically' to the question name. The point of my question is to be able to dynamically include / ex...

Adding images to iPhone Simulator

I am trying to use UIImagePickerController with UIImagePickerControllerSourceTypePhotoLibrary, but it says, "No photos". Where does the simulator get the images from? Where should I copy the images so that they are displayed in the simulator? ...

inconsistant defaults (NSUserDefaults) behavior in iPhone simulator defaults

I've been experiencing very inconsistent results while developing an iPhone app and trying to save preferences via the standard NSUserDefaults mechanism. I am using code almost straight out of the iPhone Developer's Cookbook by Erica Sadun (fantastic book btw), it looks like this: (void) updateDefaults { NSMutableArray *spells = ...

How can I test landscape view using the iPhone Simulator?

I wonder if I can test landscape view using simulator? ...

Creating CGImageContext for resizing UIImage fails in simulator

I've got some code to resize a UIImage (in a category to UIImage), that first generates an Image Context: CGImageRef oldImage = [self CGImage]; CGSize oldSize = [self size]; CGContextRef context = CGBitmapContextCreate(NULL, //Data newSize.width, //Width newSize.height, //Height CGImageGetBitsPerComponent(oldImage), // Bits...

UIView Clipped By Statusbar until Autorotate

Hi There, Ive created a multiview application that uses multiple controllers to display and control views. The problem Im having is, when the simulator initially loads the view the header is partially covered by the bar at top of screen and the tool bar at the base is not touching the base of the screen. I used the Interface builder size...

Uploading image issue (UIImageJPEGRepresentation vs UIImagePNGRepresentation)

I have stored a few pictures using Safari's "Hold + Save Image" option to my Photo Library in simulator. When I pick an image from the library, I have to convert it to JPEG or PNG so I can upload it to the server. Issue is that the size of original image is around 200 KB but the image after converting to PNG is around 2 MB. I'm using UII...