I am learning XCode with Swift by writing a basic iPhone app. I run the app in the simulator by pressing the 'play' button. However, when I change the code and then click play (without shutting down the simulator), I don't think the latest app code gets executed in the simulator. Any advice as to what's happening?
Related
I have a problem with Xcode 4.4.1 .
My Simulator becomes translucent black and hangs without any proper log message when I pressed a login button of my application after app launch.
Sometimes application or Simulator hangs just after the launch when I pressed the button or Sometimes it hangs after few second I request a network call with in application.
No pattern .. no message to trace. Tried many things like Xcode restart ,System restart and Clear logs and deleting temporary iPhone Simulator files in Library like that .
I am not able to get what is happening . Does anyone suggest me solution to get out of this.
Or Does somebody know the reason why this is happening. I mean its the application problem i.e in code or the Xcode or iPhone Simulator App problem.
Any help would be really appreciated.
I faced the same problem last day. I got it working after I have done the following, not sure which step did the trick.
Reset the simulator contents.
Quit simulator
Delete derived data of the project from xcode.
Restart xcode.
When I close my app (double tap home button and touch the X) on my iPhone, it crashes and I get this error:
objc[9337]: class `ADManager' not linked into application
objc[9337]: class `ADSessionManager' not linked into application
objc[9337]: class `ADSession' not linked into application
(lldb)
-Deployment target: iOS 5.1
-Iphone iOS 5.1.1
-Testing with Xcode on iPhone
How can I fix it?
This is the default behavior of all iOS apps in iOS4 and later.
Um, it's not a good idea to be running the app connected to Xcode debugger and then terminate it in the middle of the process. It can very easily lead to the bootstrap error.
The debugger is constantly monitoring your app when you run it in iTunes, terminating it would obviously cause a crash =/
You can see a spinning icon in the "debug" tab in Xcode 4 (the tab with the icon that looks like a speech button and some lines in it in your project navigator) when you're in the middle of debugging.
Not sure what you're trying to achieve by terminating your app, a registered background process such as location service?
Whenever I re-run my application by selecting the run button in xcode for, it says simulator already in use. So I have to stop it every time before re-running.
So my question is, is there any option or setting to avoid this. I want to run the application without stopping it like we used to do in xcode 3.
The issue is that pressing the Home button, even in the simulator, does not stop your app under iOS 4. You can either stop your app in the debugger, or in the simulator, or you can modify your app such that it doesn't run in the background. See Opting Out of Background Execution.
In Application PLIST file, we have a flag of “Application does not run in background”.
If you set this flag to “YES” and press home button, application will not maintain its status or perform any background tasks.
This is a bug in Xcode 4 which occurs sometimes. Usually you can make it go away by quitting the Simulator and restarting Xcode. If that still doesn't fix the problem, I would report the issue at bugreport.apple.com and see if the engineers at Apple can help.
I'm developing an iOS app with core data.
Every time I kill the app (by pressing the home button twice and kill)
then when I load the app again, the view is the same as before (maybe because it was restored successfully) but it's stuck without any error... if I press home button again then the screen becomes black and I can't see anything....
just the threads in Xcode and the status is "running"...
Anyone has an idea? or somewhere to start digging in?
Thank you!
I know this problem. It is because of Xcode 4. Here's the deal => Try running the App in the iPhone/iPad and you will not have that problem.
From my experience, the problem exists with the iPhone simulator and it works on the device !!
My app works fine on iOS 3.3, but after I upgraded my iPhone to iOS 4.2.1, I started to see some weird behaviour.
When I start my app on the upgraded iPhone, it goes blank. I have to tap the Home button to close the app.
The problem is, the app did not crash. It just showed me a blank screen. So I don't have any crash report to track this issue down.
Has anyone seen this before? Is it an iOS 4.2-specific issue? What steps can I take to determine the cause so that I can fix my code?
The behaviour of iOS did change between iOS3 and iOS4. As a first step, try walking through your code with the debugger. Also check your application:didFinishLaunchingWithOptions: method in your main App Delegate class.
A quick search also turned up some useful info about a similar issue: App shows white screen on startup after upgrading to iOS 4.2
The link also has info on how they managed to find out what was happening.