ios-simulator

Implementing Unit Testing with iOS

妖精的绣舞 提交于 2019-11-27 17:20:41
I've followed this tutorial to setup unit testing on my app when I got a little stuck. At bullet point 8 in that tutorial it shows this image, which is what I should be expecting when I build: alt text http://developer.apple.com/library/ios/documentation/Xcode/Conceptual/iphone_development/art/logic_test_failure_text_editor.jpg However this isn't what I get when I build. I get this error message: Command /bin/sh failed with exit code 1 as well as the error message the unit test has created. Then, when I expand on the first error I get this: PhaseScriptExecution "Run Script" "build/3D Pool

FBSOpenApplicationErrorDomain code =4 error

半城伤御伤魂 提交于 2019-11-27 17:11:11
When I'm trying to run iOS application in Xcode 6 in iPhone 6 simulator, I'm getting error Unable to run app in Simulator . And error code is: An error was encountered while running (Domain = FBSOpenApplicationErrorDomain, Code = 4) Can any one suggest how to resolve it? Jeff Walters This worked for me: iOS Simulator -> Reset Contents and Settings... -> Reset referenced from Qiita: Unable to run app in Simulator エラーの対応方法 . Just closing the iOS Simulator worked for me. There is not always the need to reset the iOS Simulator. I did not even had to close Xcode. Matferib This happened to me once

How to build a library for both iPhone simulator and device?

好久不见. 提交于 2019-11-27 17:08:15
I want to build a static library for iphone. I want to give my users the .a library which they can use for both simulator test and device test. Do I have to build two library in simulator mode and device mode? Is there any way to build a single one that can be used for both platforms? Jasarien Compile your library twice. Once using the device SDK, and again using the Simulator SDK. Then use the lipo command line tool to create a "fat" library. lipo -create libdevice.a libsimulator.a -output libcombined.a That should give you what you need. 来源: https://stackoverflow.com/questions/2996235/how-to

ios simulator: how to close an app

为君一笑 提交于 2019-11-27 16:56:18
When you "run" the simulator from xCode, the app automatically launches, and then you can click the home button to suspend the app. What I want to do is close the app from within the simulator. So, how can this be done? lehn0058 You can also do it with the keyboard shortcut shown under the simulator menu bar (Hardware-> Home). The shortcut is ⌘ + ⇧ + H , but you need to hit H twice in a row for it to simulate the double press that shows the apps. For iOS 7 & above: shift+command+H twice to simulate the double tap of home button swipe your app's screenshot upward to close it You'll see

Xcode 6.4 showing duplicate 'Simulators' with Unique Id

耗尽温柔 提交于 2019-11-27 16:55:46
Till yesterday, everything was normal with Xcode. It was showing simulators as : But today, when I opened it, simulator list changed to : Every simulator can be seen twice, name followed by a unique id. I have also observed that same named Simulator are also two different instances. Can anyone help me, how to get rid of this ? Or how to reset it. It gives a weird look. Any suggestion will be helpful. I have an easier way to fix this. Run the following: xcrun simctl list devices | grep -v '^[-=]' | cut -d "(" -f2 | cut -d ")" -f1 | xargs -I {} xcrun simctl delete "{}" Solution from sunnyxx's

iPhone Simulator suddenly started running very slow

点点圈 提交于 2019-11-27 16:51:47
I have been working on an app in iphone simulator for a number of weeks and it has been running well up until now, but all of a sudden has begun running very slow both when loading content and animations. I have not made any changes to my code since I last tested it successfully. I tried restarting the simulator (multiple times) and removing the app and doing a completely clean rebuild, but no luck. I also checked my cpu usage through the monitor while the simulator is running and I am only using about 30% of my cpu and 40% of memory. I fully understand that the simulator is never a quick as

How to programmatically display version/build number of target in iOS app?

亡梦爱人 提交于 2019-11-27 16:44:10
How can I programmatically get the value of the target version , like in the image below? As seen in the Properties window of the target of my Xcode project. I want to display this in the splash screen of my app so I know which version the people are currently using? There are 2 Numbers! The marketing release number is for the customers, called version number . It starts with 1.0 and goes up for major updates to 2.0 , 3.0 , for minor updates to 1.1 , 1.2 and for bug fixes to 1.0.1 , 1.0.2 . This number is oriented about releases and new features. It does not have to stop at 9, 1.11.23 is a

Getting mp3 artwork crashes on iOS 8 but works on iOS 7

柔情痞子 提交于 2019-11-27 16:26:18
问题 EDIT: The culprit was iOS 8, not the simulator (which I didn't realize was already running iOS 8) I've renamed the title to reflect this. I was happily using the code from this SO question to load album artwork from mp3 files. This was on my iPhone 5 with iOS 7.1. But then I traced crashing in the iOS simulator to this code. Further investigation revealed that this code also crashed on my iPad. It crashed on my iPad after upgrading it to iOS 8. It appears the dictionary containing the image

Slow app performance under iOS 8 simulator with Xcode 6

纵饮孤独 提交于 2019-11-27 16:12:48
问题 After upgraded to xcode 6 I found that when I run my app under iOS 8 in iOS simulator, it ran very slowly, no matter when I choose iPhone or iPad. But if I choose it to run under iOS 7 it ran normally. I was thinking that it was an app/coding related problem so then I tried to deploy it on my ipad with iOS8 and strangely the app run normally, not as slow as simulator does Does anybody on SO experience this issue? 回答1: Performance in the iOS Simulator is not expected to match performance on

xcode simulator not coming up - reinstall possible?

霸气de小男生 提交于 2019-11-27 15:57:38
问题 I ran out of disk space and had to clean up the folders on my hard disk. After the cleanup, when I run Xcode, the simulator is not coming up. I am not able to select a simulator to run, on Xcode. Most likely I deleted some folder required by simulator, in my cleanup. Xcode runs onto the device correctly. Anybody came across such a situation? I deleted my Xcode and re-installed, but that did not solve the issue. As I can see, Simulator is a separate application (since we can close simulator