I've recently updated my XCode from 4.2 to 4.6 as I had an outdated iOS SDK.
However, after performing the update, When I try to run the app and press buttons, the iPhone app freezes, and returns me back to the XCode window with the errors. These are errors I have never seen before, as the App was working perfectly fine before the update. As I have never seen these errors before, I do not know what Information is needed for this error to be fixed. If I need more than these screenshots, please do tell.
What can I do to fix these errors?
I don't have the rep to post pictures, this is why I am just posting the links.
http://imgur.com/DIorBXp
http://imgur.com/t7DrRwA (One of the threads)
If the app freezes after you try to press a button then I would assume it's a problem with the linking between your an IBAction function and the onclick event of the button.
Unless I'm misunderstanding the issue, try setting a breakpoint in the function that's called when the button is cliked.
Beside suggestions of nchinda Check "Enable Zombie Objects" under Edit Scheme as this will report issues caused by bad excess or pre-releasing of an object, and check the Logs for issues. Also set break points on your IBAction to inspect more.
Related
It's really weird for Xcode (Version 8.1 (8B62)) to act like this, not helping me to auto complete the callbacks, let me give you a specific example:
See the photo, when I double click or enter in that suggested call back, which is the SingleRequestCallBack, Xcode should give me a block. But it's not. Instead Xcode just completing that statement which is FirebaseSingleRequest.SingleRequestCallBack, and if you double click on the suggested call back, Xcode would give you a bug report in your editor and making all the codes white.
That happens too in the Firebase library and even in the UIViewController functions (such as dismiss). See the second screenshot.
Steps I already made:
Clean and Clean the Build of the project.
Restart Xcode
Shut down the machine.
So the question is: How to fix this? What causes this issue?
I have read some articles like app freeze with BKSendHIDEvent error:
iOS 9 App freeze with console log "BKSendHIDEvent", but my problem is slightly different from this one. Since I use ionic to build the ios app, I don't know how to trouble shoot the detailed error in xCode.
My problem is that when the app first runs within the xcode, everything works fine, but if I stop the debug and reopen the app from the simulator, no button responses at all. The whole app stucks at this stage.
I checked the simulator system log, it shows this:
BTW, when I kill the app(flick up the app) while it is still debugging, the xcode says this, I don't know if this was the issue:
I have also tried to get further information from the web inspector, but this does not response either. I could not reload the page by
window.location.reload();
There are no window object at all...:
So I'm totally lost here. I don't know how to further trouble shoot this error. Can anyone please point me to a correct direction? I have no idea why the web inspector shows nothing here and how to get the detailed error info in xCode.
Thanks in advance!
After several search, here is the fix:
App Freeze
But I still do not know how to trouble shoot, in the issues above, they mentioned race condition, how to debug this?
I got a warning in Xcode 5.01 indicating that I needed to validate components. I clicked the button to do the validation and since then my app doesn't actually start on the simulator. I know I'm being vague but I do recall a message about validating components.
Xcode says the app is running on the simulator but I don't see my app ever appearing on the simulator any more.
I've cleaned the app and reset the simulator. I put a breakpoint in main.m but it never executes. And the breakpoint buttons to step into, over, etc are not highlighted so it is as if it has not reached the main.m breakpoint.
I also don't see any messages in the debug console.
Any idea what happened and what I can do?
Thanks
Ok, the problem was that the app had added arm64 when it did a Validate Project. However, I had an API, that I think only supports 32-bit. So I followed the instructions here which resolved the problem.
I'm developing for iPad (iOS 7), using Xcode 5.0.2.
Yesterday morning I was playing around with the app (my first app) and every time I ran it, it was displayed in the emulator perfectly. But after some 5/6 runs Xcode just stopped launching my app in the simulator. I started to receive this message:
MagazineManager exited unexpectedly - lost connection
Image:
I've been researching since yesterday morning for a solution with no luck. I even uninstalled and reinstalled Xcode, cleared the cache, delete folders... all that drama thinking it could be some sort of cache problem.
Then, going online I've tried lots of "solutions", none worked.
I've tried all listed here: Xcode suddenly stopped running project on hardware: "Could not launch xxx.app: .. No such file.."
and here:https://discussions.apple.com/message/23431537#23431537
and in more places.
After all my "try this, try that" I'm stuck with the same problem. I can only see a black screen at the simulator (image below) and that message at Xcode!
In my extensive research I've read that people are still able to debug using their iPad's. The problem is that I got the new iPad air, that's only getting here dec, 20th!! So I don't have a place to test my app[s].
Thanks!
UPDATE
Just got this message in the debugger console:
013-12-09 20:23:25.902 sim[607:303] /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/usr/bin/sim: Did not find an executable file at the path: '/Users//Library/Developer/Xcode/DerivedData/MagMan-bvhhiijesvrvuteunbmpsxcqgsst/Build/Products/Debug-iphonesimulator/MagMan.app'
My problem was the debugger. Actually, it still is.
The way I solved, and have been doing for every new project, was to disable the debugger and then run the project. That way I'm able to use the app on the simulator but without the debugging functionality.
I don't know what the problem is, what is causing this debugger issue in my case, but for now that's the best I could come up with. Thanks to the friends that replied to my question and helped my research I was able to test it and disable it.
This is how I disabled the debugger:
Project > Edit scheme
Set Debugger to None
If anyone knows a solution for this, feel free to answer this question and I'll make sure to update the selected answer accordingly.
Again, thanks for all your time and patience, specially #Popeye and #HotLicks that spent a lot of their time trying to help me.
Sometimes the simulator can be a bit flaky and just needs resetting. In the navigation bar at the top of the screen when the simulator is visible try:
iOS Simulator --> Reset Content and Settings...
This should reset all the settings and remove the content so all data, images, apps etc will be removed, its like it has never run before.
UPDATE
The answer on XCode5 can't install app on iOS simulator indicates the following
I found a "Fix" for this. After trying everything and getting the same error on "My App", I opened and tried to run "My App 2". "My App 2" ran fine, so I went back to "My App", tried again and this time everything worked fine. Crazy
If that doesn't work leave a comment and I will have another look.
Delete the app and restart your iPad it will work
I just set up a new PhoneGap project for android, which worked perfectly fine without any problems, there were almost no changes to the template project.
Then I wanted to move that exact project to iOS, and the woes began.
When I start the project, suddenly a bunch of alter dialogs pop up, with device information, network status. Each offer me "ok" and "cancel". When I press "ok" on any of them, execution is halted, and nothing happens further.
When I cancel them all, I get to the project screen, where it says "connecting to device". Obviously, deviceready is never fired on this.
Since this project is merely the template offered by Cordova themselves, I find it hard to believe it is not supposed to run. I suspect the console.log messages get popped up on screen rather than the XCode debug window.
I am completely new to XCode or any iOS programming (hence PhoneGap), and I would appreciate any help.
Using Cordova 2.8.1.
Reason was I mistakenly copies the cordova.js for android into the ios project, see here.