Xcode 9.4 not showing unit tests - swift

I've a project that uses Swift 4.1, Cocoapods and has some unit tests. These tests were visible on Xcode 9.3, after I updated it to Xcode 9.4 the test navigator gets stuck and even deleting the derived folder, cleaning the project, reinstalling the software and restarting the Mac does not solve this issue. Must be a misconfiguration on the project (but I didn't change anything).
Any idea what I can do?
(Image has been resized)

Managed to solve the issue:
Simply uninstall all entries of Xcode following this answer this answer and install Xcode 9.4 again.

I came across this issue with Xcode 10.2.1 and solved it by making sure all my code was checked in and pushed, then creating a new sandbox (I'm using git).
That was easier than trying to figure out what Xcode files were causing the issue.

Check if you have disabled xcode indexing. if you have delete it using the terminal command
defaults delete com.apple.dt.Xcode IDEIndexDisable
Then restart your xcode. It worked for me.

Related

Xcode stops recognizing installed Cocoapods

I am currently working on an iPhone app using Xcode 11.3.1 (Swift 5) running on a Catalina virtual machine. Periodically, when I build I will get errors that Xcode can't find modules that it had no trouble finding a few minutes ago. If I close the workspace and re-open, Xcode says it's indexing. Most of the time this fixes the problem. Sometimes I have close/re-open more than once.
The modules that I've had trouble with are GoogleSignIn and iOSDropDown. I also have Firebase installed, but so far I haven't seen the error from that one.
I have deleted derived data, and deintegrated/reinstalled my cocoapods. Since I closed the workspace to do both of those the problem was fixed temporarily, but returned.
Doing a clean build (shift-cmd-K) does not fix the problem.
Does anyone know how to prevent this from happening or at least how I can force a re-index (assuming that's what fixes things temporarily) without closing the workspace?
Thanks for any help.
Maybe try: go to your podfile, then there's a line use_frameworks! make that a comment I assume this would solve your issue.

Xcode not displaying compile errors

I'm working in a specific Xcode project and deliberatly making errors in my code (like using undeclared variables), but Xcode doesnt seem to show any compile errors in my code.
It shows errors only when its build or clean.
Tried clean and build, cleaning derived data and restarted both Xcode and system, none of it works.
Using Xcode 8.2.1 (8C1002) and Swift 3
Besides the DerivedData folder, also try cleaning Xcode caches completely:
rm -rf $HOME/Library/Caches/com.apple.dt.Xcode/
I would recommend also killing the SourceKit process — always a source of issues these days! — but since you are already did a full reboot, so looks like you are good there.
If everything fails, you might consider upgrading to the latest Xcode, version 8.3. Just be aware that:
Xcode 8.3 no longer supports Swift 2.3. Please migrate your projects containing Swift 2.3 code to Swift 3 syntax by opening the project and choosing Edit > Convert > To Current Swift Syntax.
Project Settings, "Show all issues" fixed it for me.
For me, I had to first ensure all of my Xcode Targets had valid Signing & Capabilities like a development Team selected... then I was able to update all of my Targets to Swift 5 using the warning that was presented to me. Immediately after all of the targets were all updated to Swift 5 and the Provisioning was fixed, the red errors were flagged again!
I had the same problem using Xcode 13.3 with Swift version 5.5
Upgrading to Xcode version 14.1 (14B47b) which also upgrades Swift tools to version 5.7.1 fixed the problem.

XCode 7.3.1 hangs on "copying swift standard libraries"

Since I have updated to XCode 7.3.1, I'm not able to run my project because it hangs on the "Copying Swift standard libraries" step (both from IDE and command line).
It also crashes if I try to open the project configuration file or if I create a new Swift project.
Does anyone have idea why this is happening?
I'm running XCode on Mac mini (late 2012) with OSX 10.11.6
SOLVED
Finally solved reinstalling XCode and SDK.
Thank you all for the answers.
Open Keychain Access
You may find a LOT of appleid certificates (1000+ of them)
Delete all of those appleid certificates.
Problem solved.
I had this problem on Xcode Version 8.0 (8A218a) and OSX Sierra 10.12.1.
It turned out that Keychain access had been messed up with the OSX upgrade. For some reason Xcode was not surfacing the problem and was happily building but hanging on the "Copying Swift standard libraries..." leading me to do the usual fixes detailed here
In the end what fixed it was resetting the Keychain (a pain I know!) and re-creating the developer certificates. There may be a better way which is less destructive but this is how I solved it.
open x-code
-> window -> projects -> Derived Data click on the arrow there you will get the path of all your derived data.,
now first force quit your x-code and then delete this derived data folder found..
now reopen xcode n clean and try to build hope it works...
Kudos

Xcode 4.2 edited project is not opening into Xcode 4.0.2

At my work I gave my project to a colleague for some issue solving who has Xcode 4.2 installed on his machine. After making changes he sent the same project folder to me and with a surprise I was not able to open that project on my machine running Xcode 4.0.2. It gave me error of .xcodeproj file does not exists. When I tried to open the same project on other colleague's machine with Xcode 4.2 installed it works fine but on my machine in Xcode 4.0.2 it is not opening. I have faced this version incompatibility issue so many times. And also so many times Xcode 4.2 is creating issues while creating ipas.
What's really wrong here?
Screen:
Ok.. After asking the question in iPhone Chat-Room of SO I got an answer from One fellow to change deployment target. So I changed deployment target in XCode 4.2 to 4.0 and it worked like a charm.

Xcode not building app with changes incorporated

After upgrading to Lion, Xcode 4.1 is no longer building my iOS apps with the latest changes incorporated (i.e code, bundle name, icon changes).
Before the upgrade, when I was using Snow Leopard, no matter what the change, or even if I replaced a file outside of Xcode with Finder or used an external text editor, Xcode would always build a fresh copy with all of the changes incorporated, without having to do any extra steps.
Now, Xcode seems to insist on using a previous version, and the only way I can be sure that it will build with all of the changes incorporated is do a Product > Clean from the main menu and then restart Xcode.
What's going on here? Is there a simple setting that I am missing? I never had to anything except click Run when I was on Snow Leopard, and all changes were always incorporated without a glitch. If I can't fix this I am going to revert to Snow Leopard.
Delete the "Build" folder in your app's folder on your computer and try running the app again. That should fix it.
Lion is known to have this issues with Xcode. I solved this by installing the newest beta available. If you don't have access to the newest beta try uninstalling and reinstalling. To uniinstall:
sudo /Developer/Library/uninstall-devtools --mode=all
Go the folder
/Users/%yourusername%/Library/Developer/Xcode/DerivedData/%yourworkplacename%/Build/Intermediates/
delete the projects that you want them to rebuild.
It works for me to make the modified file take in effect after I run it.
I faced same problem and I solved this.
On creating build and after installation of app if you don't get the changes that you made in it, means '.app' was not updated properly.
To fix this problem:->
First delete '.app' from project in Product folder and then make
archive (Xcode-> Menu Bar-> Product-> Archive, we dont do any thing of
this archive, Now close that organizer window)
Now clean your project and then make build by taping build option.
Now build is updated with your latest work.
I've experienced plenty of issues with taking "old" projects into newer versions of Xcode. If it's not TOO painful, I'd make a new project and just add all your classes and resources to it to make sure it's fresh for Xcode. This isn't trivial in some cases, but it's more likely to fix your issue.
Had a similar effect where every change appeared to be ignored, Xcode said it compiled but the simulator showed a previous version. Even when I did a clean and rebuild.
The problem was in the simulator, I noticed 2 icons of the same project. I uninstalled them both in the emulator and run it again, this time correctly with all my changes.
Guess the problem appeared because of changes in the name of the project bundle, this must have confused the simulator. so deleting the apps in the simulator did the trick.