ios-simulator

How do I test a camera in the iPhone simulator?

此生再无相见时 提交于 2019-11-27 11:59:31
Is there any way to test the iPhone camera in the simulator without having to deploy on a device? This seems awfully tedious. Tim 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... I needed to test some custom overlays for photos. The overlays needed to be adjusted based on the size

error: failed to attach to process ID 0

江枫思渺然 提交于 2019-11-27 11:45:02
I have been reading the forums and so far none of the solutions suggested works for me. I'm running Xcode 4.4.1 and testing in iPhone 5.1 simulator. The simulator won't open the apps anymore and I'm getting the above error. Any thoughts or solutions pls? juan I've met the same problem 1.you can delete the App directy under ~/Library/Application Support/iPhone Simulator/6.0/Applications and ~/Library/Developer/Xcode/DerivedData 2.then you can start Xcode ; in the menubar you can find Project -> Clean EDIT: before copy/pasting 1 above change the Simulator Version to what you are using! Go to IOS

Xcode 4.6 zXing compile error after Xcode update (4H127)

浪尽此生 提交于 2019-11-27 11:43:24
问题 Different projects using ZXing have error after last Xcode update: Error messages are: private field 'cached_y_' is not used Private field 'bits_' is not used Private field 'cached_row_num_' is not used Private field 'dataHeight_' is not used Any compiler flag I have to set up? 回答1: Just add this flag -Wno-unused-private-field under ZXingWidget target -> Build Settings -> Other Warning Flags. Click the + button and paste the flag, clean and build again. (No need to remove any other flag, just

flutter run: No connected devices

↘锁芯ラ 提交于 2019-11-27 11:37:33
I am trying to create a sample application with flutter (fresh installation) android studio is also installed (fresh installation) Here is the output of flutter run flutter run No connected devices. the output of flutter doctor Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel beta, v0.1.5, on Linux, locale en_US.UTF-8) [✓] Android toolchain - develop for Android devices (Android SDK 27.0.3) [✓] Android Studio (version 3.0) [!] VS Code (version 1.20.1) [!] Connected devices ! No devices available ! Doctor found issues in 2 categories. Is there is a solution ?

Run logic tests in Xcode 4 without launching the simulator

孤街醉人 提交于 2019-11-27 11:10:41
问题 I want to run tests in Xcode 4 using OCUnit without launching the simulator. Please, don't try and convince me I am doing unit testing wrong or anything like that. I like to do TDD the traditional way: write the API for the class in the tests, then make the class pass the tests. I will write separate tests that are end-to-end that run in the simulator. If there's no way to do this, then please can someone tell me how to have the test harness not instantiate the whole app? My app is event

iphone - How do I add videos to iPad simulator?

久未见 提交于 2019-11-27 10:58:17
No, dropping the videos to ~/Library/Application Support/iPhone Simulator/3.2/Media/DCIM/100APPLE does not work totally, because the simulator can see the video on Photos.app, but when I try to pick a video using UIImagePickerController my application crashes. I think this may have some relation to the format the video has to have. I am using QuickTime to generate the video. I am using the settings "for iPhone"... so it is generating a M4V with 480x360 pixels H264. I have tried to create a MOV with the same characteristics and one with 640x480 but nothing works. I have also dropped a movie

Destination toolbar disappeared on XCode 6.4

∥☆過路亽.° 提交于 2019-11-27 10:41:33
问题 Today in the morning I tried to compile my project to run in my device and I found the destination toolbar disappeared and I cannot choose my IOS device or IOS Simulator device as target. (I can do it in the Product/Destination Menu) After some research I found the >> at the right on the screen and when I pushed a Scheme option appeared but it is disabled and I can't enable again. This is what I tried with no success: Open an old project to see if the problem was in my project Create a new

UIDevice Orientation

二次信任 提交于 2019-11-27 10:38:28
问题 I have the following code in a method. When I run this in the simulator the debugger skips right over the code?? What am I missing? if (([[UIDevice currentDevice] orientation] == UIDeviceOrientationLandscapeLeft) || ([[UIDevice currentDevice] orientation] == UIDeviceOrientationLandscapeRight)) { } else { } 回答1: Update 2 This shouldn't matter, but try turning on orientation notifications: [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications]; [[NSNotificationCenter

Importing AddressBook data into the iPhone Simulator

社会主义新天地 提交于 2019-11-27 10:33:11
问题 Is there an easy way to import AddressBook data into the iPhone Simulator? Right now my only assumption is to manually modify the SQLite files found in the /Library/Application Support/iPhone Simulator/User/Library/AddressBook . 回答1: I was looking for the exact solution, and this worked perfectly for me on a non-jailbroken phone. It works by extracting your iPhone address book from an unencrypted backup. Quit the iOS Simulator Download iPhone/iPod Touch Backup Extractor Run it, and select the

Dial a phone number with an access code programmatically in iOS

你说的曾经没有我的故事 提交于 2019-11-27 10:29:39
How can I dial a phone number that includes a number and access code programmatically in iOS? For example: number: 900-3440-567 Access Code: 65445 vijay adhikari UIDevice *device = [UIDevice currentDevice]; if ([[device model] isEqualToString:@"iPhone"] ) { [[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"tel:130-032-2837"]]]; } else { UIAlertView *notPermitted=[[UIAlertView alloc] initWithTitle:@"Alert" message:@"Your device doesn't support this feature." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil]; [notPermitted show]; [notPermitted