I installed Xcode 4 and now cannot run one of my iPhone projects.
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin".sharedlibrary apply-load-rules all
Waiting for process 'AppName' to launch.
On the top status bar I see 'Attaching to AppName'.
The only weird thing about the project is it has a dependency on ZXingWidget for QR code scans.
Weirder that it works on a co-workers computer, but not mine.
Tried removing my build directory, no dice.
I can run other iPhone projects from source in Xcode 4 with no problem.
Has anyone else seen this?
I ran into the same issue. Go to Product -> Edit Scheme and select the Run scheme on the lefthand side. Go to the info tab, and next to launch there will be two options (neither of them selected): 'Automatically' and 'Wait for XXXX.app to Launch'. Select the Automatically one and it should clear up your issue.
I had actually built and used my projects using xcode 4 for a few days with no issues, and then this popped up randomly. Hope the this helps.
A tip I found at the Apple Developer Forums:
Go into your ProjectName.xcodeproj/
directory and delete anything named
with your userid. Re-open the
project in xcode and all that will get
recreated and it should work. At least
it did for me.
Another tip is to manually delete the build directory.
Yet another tip is to navigate to the Organizer (Shift ⇧ Command ⌘ 2 in xcode 4), select Projects, select you application in the left hand side and then the Delete...-button to the right of Derived Data.
And never forget the universally useful tip: restart your computer and try again.
Good luck!
Yes, you need to set it to automatic but doing that alone won't be enough. Like Chris says, you will need to exit your simulator manually and then run.
for me it was already set on automatic and still had this problem.
The problem solved after I changed the build configuration to Distribution in the product -> scheme
Quit Xcode. Find the App_Name.xcodeproj, "Show Package Contents" and remove the folder "xcuserdata".
This will clean the "cache" of breakpoints. Start Xcode, compile and done :)
You may be click the bottom of Product>scheme>edit scheme >Waitting for executable to be launched.And you should click the Automatically choose.
Related
I'm using IntelliJ IDEA on my Mac to work on a project, and I keep on coming across an issue where I can't type. Occasionally when I switch to another application and then switch back to IntelliJ I can't type anything, and the cursor doesn't appear on text when I click on things. Does anyone know what causes this? After 1-2 minutes it goes back to normal, but it's started happening more frequently and it's pretty frustrating to not be able to type and have no way to fix it.
This is the version of IntelliJ I'm using:
IntelliJ IDEA 2016.1.3
Build #IC-145.1617, built on June 3, 2016
JRE: 1.8.0_76-release-b198 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Turn off Vim Emulator from Tools in the IntelliJ, like this picture:
I am encountering this issue aswell, ...
MAC os Mojave 10.14.2, Inteliij Community 2018.3.5
Aside from restarting / clearing caches, I found that cmd + leftShift + F still opens the search window, and all my keystrokes appeared in the searchbox!
After the searchshortcut, I was able to close the searchbox and work again!
The answer here helped me https://intellij-support.jetbrains.com/hc/en-us/community/posts/206152119-Can-t-type-in-editor-window
Quoting the author of the answer:
I had the same problem. It goes away after I click the icon at top of
the scroll bar. it happens frequently on windows 7/10, and
occasionally on mac. my colleagues said they have experienced it too
Have the same issue occasionally, can't type in any Intellij windows. My temporary/quick fix, is to:
Close any terminal windows in intellij
Use cmd+shift+f to pull up the search window.
Seems to fix it, for a while.
Closed IDEA, all IDEA projects! Even though in other IDEA windows I could type.
Removed .idea folder in the project I could not edit.
Restarted IDEA.
Then I was able to type!
Maybe you entered Vim emulator as said. Maybe only by mistake :).
Control-V is a frequently used shortcut. And Control-Alt_V is the shortcut to enable Vim mode so you can see the problem...
How to know in five seconds: type a ":" (colon) and if the cursor jump to end of the screen, that is vim. If so enter q to quit and then Control-Alt-V (on windows) to go back to IDEA standard mode.
vi is a powerful text editor since ever. But only if you pretend and know how to use it... There is even a warning on the IDEA install saying like "do not install unless you are familiar with Vim" in yellow bold text, iirc.
[Follows historic data, that you may find boring off-topic or interesting]
Today's editors opens the code in edit mode right away so you can start typing over existing code. Vim by the other hand opens the code in, let us say, browsing mode: there is a set of navigation keys to browse the code. Everything you type is supposed to be a command. When you want to edit you enter INSERT mode and then you can type new text. Only then.
Just for more historic data: vi navigation mode is great for studying code you do not know, using IDEA, since it does not change the text unless you tell it to, and some vi commands are clever.
One example:
"/" (forward slash) is one search command, and "z" is a smart scroll command so that:
/setCellFactory will search for the next match of "setCellFactory" and put the cursor there
Then if you type "z" the code will be positioned so that line is the first on screen. And if you type "." the line will be at the middle. And if you type "-" that line will be at the last position at the screen. And you can use these commands again and again. And new slash will go for the next match, like F3
This "z" thing is a feature I miss in Visual Studio, IDEA, Eclipse, Word, WordPad: these commands to scroll text AROUND a pattern... /pattern, z, z., z-. The alternative is the mouse wheel...
I am used to vi since the 80's and is the editor I still use today on Linux terminals so when this happened to me on IDEA I was lucky to remember and suspect of that on the first time.
Sorry if these details are boring
Ensure you haven't unintentionally enabled vim emulation. Go to IntelliJ Idea -> Preferences and select Plugins. Scroll down and look for the vim emulation plugin and if it's checked, then either uncheck it or uninstall it completely.
Ran into same issue with intelliJ 2017.1.2, but no VIM Plugin. However, I had just created an empty project with some .groovy files. I could edit the files in the groovy project, but not java projects.
Only way I could fix java projects, was blow-away workspace.xml files in each, then I could edit again. However, had to re-create tomcat configs, breakpoints, other IDE settings. etc.
I had a problem with entering characters when working with .story files. When I tried to type in any character, it appeared for a short while and immediately disappeared. The cause of the problem was jbehave plugin I was using. After uninstalling it and restarting IntelliJ everything was fine.
It seems to be because another window has the cursor and is not giving it back.
Check any open floated windows, click on them & then click back to your intellij instance
alternatively, if you have multiple intellij instances open the cursor could be there...
Go to the most recently opened IntelliJ instance
Check if the cursor has become stuck in that project's terminal window, or another window
no? check all other open IntelliJ instances
For me it happened because of vim
Om Mac, I solved it by navigating to File → Reload All from Disk.
Keyboard shortcut: ⌥ ⌘ Y
IntelliJ IDEA 2020.1.4
Try disabling plugins one at a time. It was the "BashSupport Pro" plugin that caused it for me. Disabled it and I could type again right away.
I read other comments saying some other plugins caused the issue as well.
Using Xcode 6 GM seed my code completion has stopped working. It was working the other day. I was trying to get the unwind segue work around to work. I had made an Objc header file and assigned it as a header for a Swift class.
At this point I get code completion with an Objective-c project. But, not with a Swift project.
I have tried restarting Xcode, making a new empty project.
Just go in user->Library->Developer->Xcode->DerivedData and delete the Data of folder(Derived data) and restart Xcode.
This fix from apple dev forums works for me. I have had autocomplete issues with Xcode 6.1/Yosemite.
Quit Xcode.
Restart the computer (this is to clear any in-memory caches).
Delete the contents of the DerivedData folder (~/Library/Developer/Xcode/DerivedData), precisely run, a) cd ~/Library/Developer/Xcode/DerivedData/
b) rm -rf *
(Try this if Steps 1-3 dont really work as it rebuilds the cache later on restart which takes time) Delete the contents of folder ~/Library/Caches/com.apple.dt.Xcode, i.e., a) cd ~/Library/Caches/com.apple.dt.Xcode b) rm -rf *
Now launch Xcode once more…
I experienced a serious breakdown of code completion because I had some 'notes' after the #end statement of my .m file which were as follows:
/*
NSAlertFirstButtonReturn, NSAlertSecondButtonReturn, NSAlertThirdButtonReturn
*/
These lines can appear before the #end statement without destroying code completion.
There's an easier way to delete the Derived Data from within Xcode (no need to open finder or restart):
Xcode Organizer -> Projects -> (Your Project) -> Delete Derived Data
I just recently had this problem. Autocomplete did not work ...and when i typed for example tableView.... it did not give me the different functions available.
I tried the following and it worked for me.
Xcode Organizer -> Projects -> (Your Project) -> Delete Derived Data
delete the file ~/Library/Developer/Xcode/DerivedData/ModuleCache
Restart xcode
Hope this works
Another possible reason why it isn't working is because it's not part of the target membership. To fix this, select the file you're working on. Then, go to the File Inspector and in the Target Membership section, make sure your project is checked.
Try the following - as silly as it may sound:
Change Device to iPhone 6, close Xcode, Reopen Xcode and wait for the indexing to finish.
Go to Xcode menu, then Window -> Organizer, then select Projects. Pick your project and press on delete button beside dervied data
Then restart Xcode
That solution worked with me on Xcode 6.1
If your code completion problem is only with UI classes (e.g. UIImage, UIDevice), then you just need to add "import UIKit".
Swift files will NOT have code completion for UI classes unless there is an "import UIKit".
I had the same issue but under different circumstances,
I have 2 projects in my workspace
Swift framework for iOS and OSX
iOS Project (which uses the swift framework)
My code completion works fine in iOS but it keeps failing in the swift framework. I tried all the about solution and had no luck and was killing my productivity.
Finally i figured out the solution to this problem.
Select the file you are editing (in the framework )
Select the 'utilities' tab on the right
uncheck the Mac target (just keep the target you are working for
currently)
Thats it, this solved my problem.
hope it helps someone who is in this kinda situation.
user/Library/Developer/Xcode/DerivedData Delete all the files shown in this folder. after that go to your project name and clean project then come back to the file where you wanna see suggestions. Type any word and its done.
So all you have to do is make sure, in the file inspector view on the right side, under Target Membership, the first box is checked. I'm not sure why this changes things but I'm sure someone can come along and give a more complete answer.
In my case Some File(s) were deleted in File System but were still referenced in the Project i.e. in Red Color. Just delete those from Project and everything was fine. Code Completion started working.
Also Like to point that all the above answers about Clearing/Deleting Derived Data folder seems to work momentarily but whenever there was a new pull or update the problem started again, so the root cause was the unreferenced/moved/deleted files which show up as RED in the project, they needs to be manually cleared.
Initially I thought it was Apple's fault. My Xcode 5 dp crashes every time when I tried to type any code.
Launch Terminal
cd ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/
cd ~/Library/Developer/Xcode/Third-Party\ Plug-ins/
Rename/Delete your Plug-ins one by one until XCode 5 works.
In Xcode 5 go to Preferences > Source Control > Uncheck the Enable Source control
This problem has something to do with auto completion. I remembered I installed a plugin KSImageNamed. It will auto complete your image name when typing -[UIImage imageNamed:]. And most importantly, I saw its name in crash report.
Solution: Go to ~/Library/Application Support/Developer/Shared/Xcode and delete KSImageNamed.xcplugin.
Great Post. For my case, it is another type of xcode plugin name called "lin" which will do the similar thing. After the plugin is moved to trash, works fine.
Additionally you should also remove any plug-ins that are located at ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/
If all fails, you might have to uninstall Xcode
I had same problem. If you go to XCode -> Preferences -> Source Control and turn OFF Source Control everything works like a charm and there are no more crashes!!! :) Hope this help ;)
In my case the problem was in user defined code snippets, located at ~/Library/Developer/Xcode/UserData/CodeSnippets. Two different snippets had same Completion Shortcut.
I'm following this tutorial about Instruments. The tutorial provides a sample project to test the steps described on it.
The problem is that, when I check "Show Obj-c Only" and "Hide System Libraries" flags, all the lines in call tree list is hidden, but the code in the project is written in Obj-C. Is there something I have to change in the configuration to see the project lines as in the tutorial?
Call tree list image taken from the tutorial showing how it must to be:
Screenshot of my instruments execution:
Ok, I don`t really know what happens here, but now it works. How?
What I did:
Erase the app in the device
Kill xCode ( using activity monitor )
Restart the computer ( Only restarting xcode didn't work )
Restart the device.
Clean the project
Try again.
May be is not the best answer, but it worked for me.
[UPDATE] The issue is there again, so I try this: Xcode 4 Instruments doesn't show source lines
And it works!
How to do so?
What URL is the documentation of version editor?
If I click version editor toolbutton I just see an empty screen to the right
The quasi-answer (workaround) to your question (I think) is that.. there IS NO such thing as a "turn on" for this feature. If it isn't showing up right - which I've seen many times - means Xcode is having a debatably-temporary mental lapse. Chances are - it (Xcode) is about to crash… but if you just want to be done with it / seal the deal / put the horse out of it's misery, etc..
quit Xcode.
reopen Xcode.
and you should be able to browse your versions, á la Time Machine, as usual.
EDIT Ripley's believe it or not ® I think I'm wrong!
More likely is that your git "arrangement" has become "f-ed up", somehow-or-other.
For me no amount of committing in the GitHub client for Mac would remedy the situation (for some files)… However, thanks to this hint, i guess forcing Xcode to "take a good, long look at itself in the mirror" via the "actual" Xcode File -> Source control => commit command does seem to bring back the version-editing functionality of problematic source files.