xCode snapshots don't appear to work - xcode

Having the same issue as this guy it seems:
Xcode restoring snapshot does nothing
I've been creating snapshots before I try certain things and have never had to restore one.
I tried a couple of days ago and xCode presents me with the differences between the code, great.
I click restore and it says it's completed the task, however the code is the same as it was before! I now click to restore again and xCode says there is no code difference! Very frustrating and worrying if I do require a restoration!
Help!
I'm using xCode 4.6

Related

Opening Storyboard fails with "An internal error occurred. Editing functionality may be limited"

Im running Xcode 9.2. My storyboards are completely useless now. Ive
experienced what this article shows and have tried everything the
article suggested.
My issue occurred when I tried to add a single swift file to an existing
objective C project with about 320 files in it already. I removed the
.swift file entirely from the project, then did everything in the article
link above and still nothing fixed it including removing/reloading XCode
several times trying different things.
I filed a bug with apple but haven't received any replies in a week (of course). Apple seems to be slammed with tons of bugs lately they keep
creating.
Now I cannot work on this project's storyboards at all and Im dead in the
water. Really not happy with Apple lately!
Is there anything more that anyone has had success in fixing this issue?
Im completely dead in the water on this application now.
Fixed this by setting the command line tools version to the correct one. Mine was blank in Preferences / Locations
For my case, whenever I open a storyboard from a workspace, this happens. So I got rid of cocoapods and workspace, then just use carthage for thirdparty libraries. Storyboards opens faster and without this error.
Note that the storyboard I am testing is empty.
This turned out to be stupidity on my part. I had a script that was killing certain processes on my Mac over and over and it turns out that was my issue. When I removed it everything worked as normal again.

Latest release not appearing in Xcode Crashes Organizer

I released a new version 6 days ago. I see some crashes in iTunesConnect analytics, but none in the crashes organizer, nor does my release even appear in the "version" dropdown within the crashes organizer.
Normally it takes a day or two after a release for crash reports to make their way into the Xcode Crashes organizer, and anecdotally I've seen the crashes appear in the Xcode Crashes organizer about the same time as in the iTunesConnect analytics website.
Interestingly, the previous versions still show in the "version" dropdown and I can see reports continue to trickle in for them. There is a steep decline in crash reports for that previous version, presumably as most folks have moved to the latest version.
On a new machine, with a fresh XCode install (but linked to the same developer account) I see the same behavior. Maybe it's a problem with my developer account?
Update 2016.09.01: Two months later, new releases are still not showing up in the releases dropdown automatically. The workaround posted below to manually add them has been working great, but hopefully I don't have to do it forever. I have to assume this is a problem with my local setup as this can't be happening to everyone. Let me know if you figure out a long term fix.
Update 2016.10.13: The work around isn't working for my most recent release. I again see crashes in ITC, but after manually adding an entry for the release in Info.json, I see "No crash information is available for this release."
Update 2016.10.15: I guess the work around is continuing to work, the crash reports were just delayed by an extra 48 hours.
Update 2016.1.20: At some point, (maybe around mid december, XCode 8.2?), I started to see new releases appear automatically again, and no longer have the joy of manually editing my XCode config data every time I push a build. Other than updating XCode, I can't think of any way I might have "fixed" it.
It's likely a bug with Xcode/ITC services. I filed a radar (#27277793) yesterday and was on ITC tech support today. If you're having this issue please report it to Apple and reference the existing radar (#27277793) so Apple can recognize we're having the same problem and prioritize a fix.
A workaround to get the crash reports for my latest release was to manually add a new entry in the crash organizers Info.json.
In: $HOME/Library/Developer/Xcode/Products/<bundle.id> edit the Info.json and add a new entry to the beginning of the "productVersions" array based on the existing entries, but change the build number to whatever build the crash reports are for.
You also must update the appStoreStatus field depending on whether your app is in TestFlight or in the AppStore. appStoreStatus: 1 for TestFlight and appStoreStatus: 3 for AppStore.
After relaunching Xcode and going to the crashes organizer I watched as the last 6 days of crash reports came in.
Yay for human readable configuration data!
Had similar issue where Xcode crash reports stopped updating after we increased our deployment target iOS version. Fix was to edit Info.json like mentioned above and remove all unsupported OS versions from "supportedOSVersions" array of latest build that was appearing in "productVersions" array.
This worked for me when none of the above answers did.
Find the Info.json file as described above in mkirk's answer. Make a copy as a backup. In the productVersions section remove any unneeded versions. As you can see below, "productVersions" is a json array, and it will contain a series of json objects, each of which represents one of your versions. I desperately needed crash reports for a recent release to the app store and after deleting all versions preceding that (below it) and restarting Xcode, voila! the Organizer suddenly began showing all my crash reports.
"productVersions" : [
{
"version" : "4.0.45",
"productType" : 1,
...
Remove the entire $HOME/Library/Developer/Xcode/Products/ directory. Quit and restart Xcode and then run Organizer. They all come through after that.
Please follow below steps,
Remove bundle from Xcode products using,
rm -rf ~/Library/Developer/Xcode/Products/com.yourapp.bunlde
Restart you Xcode and open Organizer
Make sure that itunesconnect sites are accessible
Xcode->Organizer is supposed to download all crashlogs from beginning. Hope that helps.

Xcode 6.4 crashes in Swift breakpoint

In one project I'm using I can't set breakpoints in Swift code, Xcode always crashes when reaching one of them, doesn't matter if it's a "manual" or an exception breakpoint.
In other projects everything works as expected, only for one project Xcode 6.4 (6E35b) always crashes.
I tried cleaning, deleting derived data, resetting simulator, restarting Xcode/Mac - nothing helped at all.
Anyone else experiencing this problem and hopefully knows what helps?
EDIT
Seems only to be the case on one machine (Xcode 6.4, 10.10.5), but not on the other (Xcode 6.4, El Capitan). But as I mentioned in the comments, reinstalling Xcode didn't help, are there some other preferences I could reset/delete?
EDIT2
Here's the Xcode crash log file:
https://dl.dropboxusercontent.com/u/119600/Xcode_2015-08-12-074655_Stefans-iMac.crash
I would try uninstalling and reinstalling Xcode to see if it helps... I've heard of successes with this technique for similar issues.
Just delete the entire Xcode.app from /Applications, and reinstall from the .dmg. If you're not certain of the binaries and have time / bandwidth, consider re-downloading the .dmg.
If that doesn't work, try the following source control tricks (substitute "your favorite revision control" for "git"):
Try purging all objects not in source code control
Another approach: Check out the app again into a fresh repository (this will get even the files that may have been committed but ignored later).
If not under source code control, grab a .gitignore from here and add it to git, then check out into another directory (this will leave everything but source, interface builder, project files and resources/assets behind).
I'd suggest moving the breakpoint code to another location (such as making a function call and breaking either before or inside the function). However, if all Swift code has this problem, that may not work.
Finally, after making an interim commit (to roll back to), try it in Xcode 7 beta. Bit of a hassle because you have to upgrade to Swift 2.0, but if you keep the deployment target the same no iOS target changes are needed.
If this really is a burden and/or it's a small project, you could try creating a new project and migrating the files and storyboard over, but likely this is too much effort.
Either way, since you note it's pretty much all breakpoints in Swift code, file a bug with Apple's bug reporter. They really need to hear about issues such as this, since you don't seem to be alone in having this issue.
EDIT: Where are others seeing this issue?
Maybe we can see commonality -- since this is only reported in Swift projects (so far). A colleague has seen this problem with breakpoints (as well as stepping through code) in Xcode 6.4 on 10.10.4. (I've seen Xcode 6.4 crashes in the past as well).
I see OS version 10.10.5 mentioned as a target where this happens (#swalkner); is this a beta? If OS 10.10.4/5 is the only place we see this, it might be significant. If it's a project/OS interaction, it might be tricky to reproduce / fix, but I'd encourage everyone to submit detailed bug reports to Apple (maybe even link this post).
Some points to note if you're seeing this:
Operating System Version
Hardware
Target: Simulator vs. Hardware; iOS vs WatchKit app.
Target SDK version(s)
Swift only? Or on an Objective-C only project? Mixed?
Only one project, or several?
It's a longshot, but let me know if it's working:
uncheck the "Always show Dissasembly" check
Debug > Debug Workflow > Always Show Disassembly
In older versions of Xcode (<6.1):
Product > Debug Workflow > Show Disassembly When Debugging
I've just spent the past few hours trying to solve exactly the same issue.
I thought at first, it had started due to installing Xcode 7 on the same machine as Xcode 6.4. The problem certainly coincided.
However, due to having version control, I could look and see what files had changed since opening the project with Xcode 7.
The images.xcassets file had changed. Reverting this file back has stopped Xcode from crashing each time it hit a breakpoint.
I'm not sure whether this helps at all, but definitely look at images.xcassets and if needs be, delete it, recreate it and ensure it's setup 100%. It certainly fixed my issue.

Xcode 4.1.1 constantly reindexing after a refactor

Currently splitting an App into a (hopefully) reusable library for other games of the same franchise, and the game specifics, i do a 'lot' of refactoring. It seems that as i advance in this monk work, Xcode is creeping to a stall because it spends more and more time on reindexing the project after each refactoring action.
Any thoughts ?
MBP quadCore 2.3Ghz, 8GB, Lion, xCode 4.1.1
PS. I've had to step out of Xcode because of this, currently doing my refactoring with JetBrains' AppCode ... immature but promising product, but good enough for that work. Beats the pants out of Xcode on many code intensive usages.
It sounds like your project index might be a little messed up. Have you tried deleting the project's Derived Data?
Open the Projects organizer window (Command-Shift-2, click the Projects tab). Select your project and click the Delete button next to the Derived Data path. Xcode will recreate the derived data (it'll index one more time and your next build will be a full build from scratch).
ok, i think this is what is happening (after comparing what AppCode does with Xcode). Xcode reindexes all files modified by the refactoring AND their dependancies, whilst AppCode only reindexes the affected files. a bug in Xcode imho ...

Xcode 4 - Error Starting Executable

I've been working on a project in Xcode 3.2.5 and today I tried migrating it up to Xcode 4.0. It compiles just fine; I can navigate to and execute the .app without a hitch (as expected). The only thing that is screwy is the fact that Xcode cannot launch the application, and displays the following error when it tries:
"Error starting executable. No executable file specified. Use the "file" or "exec-file" command" (image not available)
I've scoured the Project and Xcode settings and have been googling for half the day, but all I can find are dead ends and people bashing other people about breaking Apple NDA. FYI Xcode 4 has been released, and is no longer under NDA.
Should I just start a new project and copy in my source? Sounds wrong to me, but brute force works when brute force works.
Thanks in advance
At a guess, the schemes it set up for you based on your v3 targets and build settings might not be quite right. From the schemes menu, choose to edit the current scheme, then select the Run action from the list and make sure the appropriate exectuable is selected.
I ran into the same issue this question came up so I spent my time identifying the issue, reproducing the issue, narrowing it down and explaining as best I could how to not make it happen - as well as the general frustration that comes with an issue like this (it hit me on 2 different versions of Xcode in 2 weeks).
If you're going to delete my post then at least take the time to try and answer the question as I had tried to do.
Now, on to the reply that actually tells how this issue may be created and how to avoid that.
I JUST had this happen creating an app for iOS. Why? I renamed my target executable.
Just tested this by checking out a new copy of the source and rebuilding.
The app ran fine on my device.
Went in to Xcode 4.2, renamed the target. Ran the app. "Error starting Executable..."
I changed the filename back. Same error.
Cleaned and ran the app again and it launched.
Renamed the app, cleaned and ran it again. Not so much luck.
Don't rename your app by renaming the target.
This is such a stupid limitation. Apple lets you rename your target app, but by doing so, this prevents your app from launching on the device.
EDIT: I haven't checked in any code, but now I can't check out and build and run any app without this happening. How do you get the device/xCode out of this state once you've gotten it in to it?
Even the app now crashes on launch at int retVal = UIApplicationMain(argc, argv, nil, nil);
This is in Xcode 4.2 on Snow Leopard, but I got into the same state with Xcode 3 on another Machine last week.
Edit 2: Rebooted the device, rebooted my Mac. Built and ran in the simulator first, then on the Gen4 iPod touch. It works.
I had this issue when migrating a project from Xcode 4 to 4.1, and it ended up being due to the Target's "Product Name" being different in the debug and release configurations. A holdover from when I changed the name of the product many versions ago. So check that...
I've downgraded Xcode from 4.2 to 4.1 only to encounter an error at build and run on device: "Error starting executable. Don't know how to run ...". I've cleaned the project (Xcode > Project > Clean) and cleaned the build folder (Xcode > Project > (hold option key) Clean Build Folder). After that I had to build again and it built okay on iPod touch 4g running iOS 5.
Well, it sure sounds like a whole family of bugs behind that error message!
I got the error after loading up an Xcode 3 project under 4.2.x for the first time.
None of the above tips worked for me, however what I eventually did was switching from GDB to LLDB.
That fixed it.
It looked like the new path to the executable wasn't properly recognized by GDB (i.e. once locally at PROJECT/build/Debug/... in Xcode3 but now in the usual temp. folder location with Xcode 4 it was still looking for the executable in the build folder relative to the project sources)
I duplicated the target and rename the copied on to different name, I got this error message. What I did is to clean the project, exit Xcode, restart the Xcode, then it can run on my device.

Resources