ios-simulator

The runtime for selected device is not installed error

送分小仙女□ 提交于 2019-12-30 04:02:27
问题 I am trying to run application using xcode 6 on ios8 simulator but I am getting error "The runtime for selected device is not installed ". I have set the command line tool in preferences but no luck. Please help. 回答1: This just happened to me right after a beta update to Yosemite 10.10 and Xcode 6.6. I still have XCode 5 installed, and I thought it may have been from deleting XCode 6.5, but putting it back in Applications did not help. First, make sure you have all devices installed in your

Take screenshots in the iOS simulator

帅比萌擦擦* 提交于 2019-12-29 10:09:13
问题 I want to take a screenshot of my iOS application when it is running in the simulator, and save the screenshot on my Mac. How can I do this? 回答1: It's just as simple as command + s or File > Save Screen Shot in iOS Simulator. It will appear on your desktop by default. 回答2: Use ⌘ + S to capture a screen shot. (Use window + s , if you are using windows/non-apple keyboard). See for more details: How to change simulator scale options with Xcode 9+. Tip 1: How do you get screen shot with 100% (a

How to run iPhone emulator WITHOUT starting Xcode?

旧时模样 提交于 2019-12-29 10:09:13
问题 On my old Mac running Snow Leopard, I could type "ios" into spotlight and it would start up the iPhone/iPad emulator by itself. I have since had to get a new machine running Lion. I have installed Xcode for Lion, I have installed the developer tool options from the preferences panel. But the "ios" option is no longer there :( The only way now seems to be to run Xcode, create an empty project and then launch emulator with the run option. I have searched and searched the intertubes and the

How to run iPhone emulator WITHOUT starting Xcode?

主宰稳场 提交于 2019-12-29 10:09:10
问题 On my old Mac running Snow Leopard, I could type "ios" into spotlight and it would start up the iPhone/iPad emulator by itself. I have since had to get a new machine running Lion. I have installed Xcode for Lion, I have installed the developer tool options from the preferences panel. But the "ios" option is no longer there :( The only way now seems to be to run Xcode, create an empty project and then launch emulator with the run option. I have searched and searched the intertubes and the

Error Running React Native App From Terminal (iOS)

只愿长相守 提交于 2019-12-29 10:08:14
问题 I am following the tutorial on the official React Native website. Using the following to build my project: react-native run-ios I get the error: Found Xcode project TestProject.xcodeproj xcrun: error: unable to find utility "instruments", not a developer tool or in PATH Command failed: xcrun instruments -s xcrun: error: unable to find utility "instruments", not a developer tool or in PATH Although, when I run the app from the .xcodeproj, everything works fine. Any suggestions? 回答1: Check out

wifi on iphone simulator

天涯浪子 提交于 2019-12-29 09:17:07
问题 can i disable wifi in iphone simultaor to test my app? I disconnect pc from network, but the icon of wifi on iphone simulator is always on. 回答1: After disabling your network connection, the icon is still present showing it as enabled, but the connection is of course dead. If you are using the Reachability class or just attempting to ping a URL to verify a connection, the simulator will respond the same way a device with disabled Wifi would, which makes testing on the simulator under these

Detox: iOS Simulator how to confirm alert message

扶醉桌前 提交于 2019-12-29 08:29:09
问题 I am using Alert from react-native. How do I get detox to press the "Log out" button on the alert message? I tried using await element(by.text('Log out')).tap(); But I get "Multiple elements were matched" error. Presumably it finds 3 elements with same label. The original button with label "Log out" used to trigger the alert message, the alert message title, and the alert message button I want detox to press. Error Trace: [ { "Description" : "Multiple elements were matched: ( "<UILabel

How do you set the default device in the iPhone simulator?

会有一股神秘感。 提交于 2019-12-29 08:27:11
问题 Every time I switch Xcode between debugging on my iPhone and running in the simulator it resets the simulated device. I want to run the simulator as an iPhone device, but it keeps changing back to iPad. Does anyone know how to set the configuration so that the simulator defaults to an iPhone device? I can switch the hardware to iPhone inside the Simulator, but when I go back to Xcode and run a "Build Debug" it reopens the app inside an iPad. The only way I can get it to switch is by using the

How to hide folders created in Document Directory in ios?

南笙酒味 提交于 2019-12-29 06:55:07
问题 I have created some PDF files programatically, which i am storing into the devices memory using the following code >>>> NSString *fileName = [NSString stringWithFormat:@"SampleTextFile.pdf",strFinalString]; NSArray *path = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *saveDirectory = [path objectAtIndex:0]; NSString *saveFileName = fileName; NSString *documentPath = [saveDirectory stringByAppendingPathComponent:saveFileName]; I can see the file in

iPhone: Failed to launch simulated application: Unknown error

徘徊边缘 提交于 2019-12-29 06:22:10
问题 This is a new iPhone project, only 1 target (different from this question) On build we get: Failed to launch simulated application: Unknown error. The google again gives us nothing, lots of people have encountered this and there are lots of crazy ideas to try "oh clean the build", "clear the cache", "twiddle this flag" and none of them work and work consistently. We can reproduce this on two different machines with SDK 2.2.1 and 3.0 beta. Not the install on the machines since other iphone