ios-simulator

iPhone - Save UIImage to desktop on simulator

不羁岁月 提交于 2019-12-17 18:49:09
问题 I'm currently working on the simulator. I'd like to save an UIImage to a jpg file, on my desktop. It seems that I have a problems with paths or something. Thank you for your help :) 回答1: The following should get you started... myImage is an UIImage object. NSFileManager *fileManager = [NSFileManager defaultManager]; NSData *myImageData = UIImagePNGRepresentation(myImage); [fileManager createFileAtPath:@"/Users/Me/Desktop/myimage.png" contents:myImageData attributes:nil]; Edit: Just noticed

nw_host_stats_add_src recv too small, received 24, expected 28

喜夏-厌秋 提交于 2019-12-17 18:25:17
问题 nw_host_stats_add_src recv too small, received 24, expected 28 So I'm getting this appear in the console and I'm not sure whether it is an issue that I should be bothered about or not. I noticed it after attaching my app to Firebase and writing to the database with anonymous sign in. Just wondering whether I need to do anything about this and if so what those actions would be. Thanks! 回答1: This is a bug with logs in Xcode8 + iOS10. We can get round it in this way: When on simulator , add the

The Simulator can't be launched because it is already in use

╄→尐↘猪︶ㄣ 提交于 2019-12-17 17:54:16
问题 I'm working with xcode 5, and often get The Simulator can't be launched because it is already in use. when it's not running or open (i.e. after i do: quit simulator). I stopped the application & don't have any other project that is open, running or using the simulator (please avoid these kind of suggestions). this happens after i get and exception. how can I "free" the simulator process without having to reboot my computer (right now that is the only solution i found) I've tried: simulator --

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

假如想象 提交于 2019-12-17 17:42:16
问题 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? 回答1: I had the exact same problem - I reset the iphone simulator and then quit the simulator (i.e. command q) then started it again. Worked. 回答2: Boy, is the answer to this one hard to find, but I came up with a workaround. The simulator gives this error

iOS 8.1 Simulator Localization broken (NSLocalizedString)

回眸只為那壹抹淺笑 提交于 2019-12-17 17:27:23
问题 TL;DR: It seems localization does not work with xCode 6.1 and 8.1 simulator. Workaround: Go to "edit schemes" >> "Run" (side bar) >> "Options" tab >> "Application Language" Select the language you wish to run the app on the simulator. Long Story: I've updated xCode to 6.1. The update deleted the iOS 7.x simulators and left me only with 8.x simulator. I've done the following steps: I've installed the 7.x simulator Cleaned the project Deleted the app from the simulators Deleted the derived

How to know the apps installed in iPhone

纵饮孤独 提交于 2019-12-17 16:33:13
问题 I am developing an application in which i need to find the apps which are already installed in iphone device such as Skype, facebook. I need to check it. Please give me code snippet if possible otherwise a link to get the solution. Is it possible or not. If this is possible, then how to disable the app also... Thanks in advance...... 回答1: You can't check for any application, but you can actually check for applications which officialy shared their url scheme. You can find the biggest database

iPhone 6 (Plus) screen size

情到浓时终转凉″ 提交于 2019-12-17 16:06:09
问题 There were many articles written and questions asked about iPhone 6 and iPhone 6 Plus screen sizes. This article provides a great explanation. However, I am confused when testing my app in the simulator. I have the following code in AppDelegate . - (BOOL) application: (UIApplication *) application didFinishLaunchingWithOptions: (NSDictionary *) launchOptions { UIScreen *screen = [UIScreen mainScreen]; NSLog(@"Screen width %.0f px, height %.0f px, scale %.1fx", (double) screen.bounds.size

Is it possible to test iOS4 multitasking/background music playing on the simulator?

一世执手 提交于 2019-12-17 11:03:21
问题 I have added the UIBackgroundModes property in Info.plist to have an array entry of " audio " and have added the call to setup the audio session: [session setCategory: AVAudioSessionCategoryPlayback error: &error]; . However, the only test device I have is the iPod Touch 2G which doesn't support multitasking. I've tried the simulator but the music stops playing when I switch to Safari. But when I switch back to my app, the song continues playing to a farther location than when I left the app.

Is it possible to test iOS4 multitasking/background music playing on the simulator?

为君一笑 提交于 2019-12-17 11:01:23
问题 I have added the UIBackgroundModes property in Info.plist to have an array entry of " audio " and have added the call to setup the audio session: [session setCategory: AVAudioSessionCategoryPlayback error: &error]; . However, the only test device I have is the iPod Touch 2G which doesn't support multitasking. I've tried the simulator but the music stops playing when I switch to Safari. But when I switch back to my app, the song continues playing to a farther location than when I left the app.

How do I test a camera in the iPhone simulator?

喜夏-厌秋 提交于 2019-12-17 10:35:24
问题 Is there any way to test the iPhone camera in the simulator without having to deploy on a device? This seems awfully tedious. 回答1: There are a number of device specific features that you have to test on the device, but it's no harder than using the simulator. Just build a debug target for the device and leave it attached to the computer. List of actions that require an actual device: the actual phone the camera the accelerometer real GPS data the compass vibration push notifications... 回答2: I