Remove issues from Issue Navigator in Xcode 4? - debugging

Having some trouble with Xcode 4 here. Sometimes I hit ⌘-U (Launch Tests) instead of ⌘-R (Build and Run) and it's frustrating for a perfectionist like me when error "Unit tests are not implemented yet in XXXXXtests" remains in the Issue Navigator even after a successful Build & Run.
The question, in a nutshell, is how do I remove or ignore individual issues in the Issue Navigator in Xcode 4?

click on your project in the project navigator, in your Project View you should now have a left view with
Project
your project name
Targets
your target name
your target name tests
you know, where u have all the build settings and stuff
right click on the tests one and delete it

Related

XCode Unit Tests - Cannot find viewcontroller in scope

At some point in my app's development, my Unit Tests and UI Tests lost access to my app's main module:
🛑 Cannot find type 'FileVacuumViewController' in scope
They worked with the xctestplan before. I don't know at what point it happened. I tried not importing #testable, including the tests.swift in the main module's "Target Membership".
Maybe I need to open the workspace instead of the xcproject?
When I try to open the workspace there was an error message and no files show in the tree:
Here's my xctestplan config:
When I clicked to run one the UI tests individually, about 20 of these code sign dialogs showed:
Looks like your test file is included in both your app target and test bundle. Make sure to uncheck it from app target and try clean & build.
I ran into this recently with XCode 13 while following a blog post on creating unit tests. For some reason, XCode didn't automatically add the ViewController to the Test target.
My solution was to make sure that the ViewController was included in the Target Membership for the test suite. I had to also make the same Target Membership change for the Main storyboard.
Select file "FileVacuumViewController" in Project Navigator and, in File Inspector, in the section Target Membership, check field which ends with Tests and UITests. Clean and build project, if necessary.
I just ran into this issue myself after upgrading to Xcode 13.
The solution for me was to remove the file from both XCTest AND XCUITest Target dependencies:
Project Settings -> <Target>Tests -> Build Phases -> select file and click "-"
Project Settings -> <Target>UITests -> Build Phases -> select file and click "-"
Now try to run your test and add #testable import <Target> to the top of your XCTest files that error out. NOTE: you should not have to add this at all to your UITests files at all.

Cannot see build phases, general settings in Xcode 6.1

I just downloaded the XCode 6.1 seed.
I am have this issue with one specific project.
The project information view is absolutely different.
The General, Build phases sections are all missing.
All I can see is info and build setting.
Anyone else faced this issue?
None of my other old projects has this issue.
It's a sneaky one - you click the show/hide Project Targets List icon and it pops out the Project name and its targets underneath.
Click one of those and you'll get the Build Phases option showing up.
OP's problem was that the Build Phases did not show up when opening the project settings.
Simple Fix:
Expand the left side bar.
Your project file is selected. (in my case it's called "opengl-series")
This is the problem.
You want to select the App. (in my case "CGTutorial")
Build phases now shows, along with the other settings.

The selected device specifies an unsupported architecture

I'm trying to launch an Objective C app built on Xcode5 on Xcode6 beta (Version 6.0 (6A215l)). I get the following message when trying to build for any platform except for iPhone 5s:
Xcode cannot run using the selected device.
The selected device specifies an unsupported architecture.
It's not even obvious how to begin troubleshoting this as I can't get to the point where the console is activated. Any pointers?
I just had this myself.
I tried a few things (closing simulator before running, having it open, resetting), but what seemed to fix it was a simple clean, build and then run
If that's not it then I have a couple of other things I did but I don't think they were responsible
I was getting the same issue when the Xcode-> Targets-> General-> Deployment->Devices selected is iPad. but I am going to run this project on iPhone. check your project.
I bumped into this issue after changing the Executable file field in the info tab of my target settings - changing this back to the default ${EXECUTABLE_NAME} fixed it for me.
I was getting the same issue and no amount of cleaning solved it. I had to remove all Swift files from my project. Then I re-added them, but made sure to unselect the "Add to Target" option in the file add dialog. Finally, manually added them to the "Compile Sources" section of your project's "Build Phases". This did it for me. (Also make sure no Swift files end up in the "Copy Bundle Resources" section of Build Phases).
Close simulator if it is opend
Press Command + shift + k (or clean the project by selecting product menu item from xcode menu) and then press Command + r (or run the project)...
iPhone3gs-->iPhone4s:armv7
iPhone5/iPhone5c: armv7s
iPhone5s --> iPhone6Plus :arm64
add architecture to BuildSetting -> Architecture

Running emulator not working (iOS and Phonegap)

I'm trying to run a project on Xcode (4.6.2) with Phonegap (2.7).
I create the project using the create command in the terminal window, and then when I open it in Xcode and click the run button on the top left corner it builds successfully, but does not launch the emulator. Also, when I click the project tab, the "Run" button is not an option.
Any ideas as to why Xcode is not letting me run this project?
Note, I can run other projects in Xcode perfectly, it's just this one I'm having difficulty with.
When you use the create_project script and open the project for the first time in XCode, the CordovaLib sub-project is selected as the Run scheme so it builds CordovaLib OK but there's nothing to run. This has caught me out a few times and left me wondering why my project built but didn't run until I remembered to look at the scheme.
On the main toolbar at the top of Xcode, make sure the Scheme (next to Run and Stop buttons) is set to your project's name (the parent project) and not "CordovaLib" (the child project). The Scheme should read something like "My Project > iPhone" not "CordovaLib > iPhone".

Xcode - AudioToolbox/AudioToolbox.h file not found

I'm getting started with Xcode and a i'm studying the way to play sound. I have implemented a small project that play a sound using AudioToolbox framework. Everything was fine: i could Build and run normally, the application also functioned normal but today when i reopen the project i have this bug " file not found". It's strange, i didn't modify anything in my project, the framework was linked in my project too. Anyone has the same problem like me?
First try to clean your project by going to the menu bar (the very top) under "Product" and click "Clean". If it still doesn't work: go into the Build Phases, delete the frameworks, then re-add them.
If this happens when you take an old project and try to build with a new Xcode version, it could bet due to saving ".framework" files locally within your project. Do check the project folder for such files and remove them, and then use the "Build Phases" tab to link the new frameworks.

Resources