Xcode 12 doesn't support new iOS version - xcode

Trying to build on iPhone, but here's what it shows..
How to fix it?

Check out this repo https://github.com/iGhibli/iOS-DeviceSupport
Download this folder:
Move it into:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
Close Xcode and open again.
Build and run 😀

Just to run the damn thing, I managed to do this without having to download any new profiles as per the other answer. Just took 14.4 renamed to 14.6 and it worked on Catalina XCode 12.4.

Right-click on /Applications/Xcode & choose Show Package Contents
Make a duplicate of 14.5 directory by copy and pasting it into the same directory (into DeviceSupport) then rename the directory to 14.6
Now Quite Xcode and try again.
It will work 100% sure.

Related

"Add Documentation" is disabled in Xcode 9.1 (9B55)

For example:
Any ideas?
MacOS High Sierra 10.13.1
Xcode 9.1 9B55
As KellyTheDude mentioned, renaming or moving the Xcode.app will fix the issue on OSX 10.13 (High Sierra) since /usr/libexec/xpccachectl (the preferred solution) does not seem to exist under this version of the OS. To fix quickly:
Rename Xcode in the applications folder temporarily.
Name it back to Xcode
UPDATE: This fix also works on macOS Mojave (10.14) and Xcode 10
UPDATE: This also fixes the Xcode Source Editor not showing up in System Preferences under Extensions (for Swiftify, etc.)
Oddly I was able to fix this by moving my Xcode.app to Applications. I originally had it nested in a subdirectory under there to version it, but alas, someone must have hardcoded a path somewhere.
I fixed this by quitting Xcode and deleting all the files in directory ~/Library/Developer/Xcode/DerivedData/.
This happens to me once in awhile and deleting derived data and restarting Xcode doesn't work for me. I usually have to do the following:
Close Xcode
Execute command in terminal: sudo /usr/libexec/xpccachectl
Restart my computer.
Restarting the computer is a required step.
Source: Apple Forum
I had the same issue with Xcode10.1.
All Answers here did not work for me.
I was able to solve this issue only by reinstalling Xcode.
Delete Xcode10.1 and empty trash.
Delete all files in ~/Library/Developer/Xcode/DerivedData/ directory and empty trash.
Restart Mac.
Download and install Xcode10.1.
Step 1:
Xcode > Preferences > Key bindinds > Now Search for "Documentation" in search bar you will see key for Add Documentation
Step 2:
Double click and assign new key as "Alt + Control + /"
Result: It will work now but if you want to change it back to what it was (Alt + command + /) you can do that.
Also, this will enable the Add Documentation in Editor > Structure
Its a hack and worked for me.

where is the plugins folder of xcode 6.1

Where can I find the plugins folder for Xcode 6.1?
Recently, I installed the dash app in my mac, here is the link: https://github.com/omz/Dash-Plugin-for-Xcode
But I don't really like it, then I try to uninstall it. Then I found that the link given from the link above doesn't work for my xcode. My xcode version is 6.1, and operating system is Yosemite GM. So where can I find the plugins folder of xcode, then I can remove this plugins?
Thanks guys.
I was able to install and build the Dash plugin for Xcode 6.1 / Yosemite, and it installed correctly in ~/Library/Application Support/Developer/Shared/Xcode/Plug-ins. Notice that it begins with ~, the /Library/ folder is not the correct one.
I have Xcode 6.1.1, here's what I did and it worked.
Right click on plugin file > Show Package Contents
Find and edit the Info.plist file.
In DVTPlugInCompatibilityUUIDs add the key C4A681B0-4A26-480E-93EC-1218098B9AA0
Save your Info.plist file.
Then go to /Applications/Xcode.app/Contents/PlugIns folder, and copy your plugin file there (the administrator password will be required).
You can now launch Xcode and use your plugins ;-)
It should be here ~/Library/Application Support/Xcode/Plug-ins.

Fixing file 'project.pch' has been modified since the precompiled header was built error in Xcode

I was recently working on my application messing around in the info.plist section, and since that my application will not run on my test device:
file 'project.pch' has been modified since the precompiled header was built
Something to note is that the app runs fine in the simulator.
Edit: Now I am getting this error instead of the other one:
No such file or directory (/Users/Me/Library/Developer/Xcode/DerivedData/MyProject-abcdefghijklmnopqrstuvwxyz/Build/Products/Debug-iphoneos/MyApp./MyApp)
How to regenerate the info.plist file?
You could try a deep clean (not the same as Product > Clean) - Option+Command+Shift+K
Note: this means the clean the build folder (by pressing Option + Product -> clean folder)
Close your project or workspace.
In Finder: ⇧shift+⌘cmd+G
Paste: ~/Library/Developer/Xcode/DerivedData/
Delete the ModuleCache folder and empty trash.
Open up your project.
Clean: ⇧shift+⌘cmd+K
Build: ⌘cmd+B
In my case the error message had a small hint:
note: after modifying system headers, please delete the module cache
at
'~/Library/Developer/Xcode/DerivedData/ModuleCache/5CYAJ91AZCB7'
I tried and it worked.
Simply touching the project's pch file solved this issue it for me :
touch Test.pch
Product -> Clean
Product + Option -> Clean Build Folder
Close Project or Workspace
Clean 'ModuleCache' path in Finder.
Worked for me in Xcode6 GM and iOS 8.0.
When the .h file of a Library Provided with Xcode is changed (even a space), this error could occur.
The following maybe tried in order to fix this issue
In, Project -> Build Settings, change Precompile Prefix Header to NO
OR
Run rm -rf ~/Library/Developer/Xcode/DerivedData and Clean Build
I constantly had this since upgrading from Xcode 4.6 to Xcode 5 with iOS projects when using command line build (xcodebuild).
What worked for me is to use this as command line build command:
xcodebuild -project path/to/my.xcodeproj -configuration Debug clean build
Before this, I've tried:
Clean the project in Xcode GUI.
Delete the offending pch file.
Delete the offending pch file's parent folder.
Delete the DerivedData project folder.
None of the above worked for me under Xcode 5.0.2, Mavericks, iOS7.
Note that the problem didn't happen to me when using Xcode GUI.
I just go to directory "/$HOME/Library/Developer/Xcode/DerivedData/", delete everything there
Just Click Product from the menu and select Clean
Product>Clean
Worked fine for me.
I got the same problem. My error said like I need to delete the cache in the below locaition,
Users/myusername/Library/Developer/Xcode/DerivedData/ModuleCache/3FGETKFCU0N0W
3FGETKFCU0N0W was a folder, when I deleted it and then clean build the project. Then the error disappears.
rm -rf ~/Library/Developer/Xcode/DerivedData/
If you use AppCode you can try remove content form:
/Users/[Username]/Library/Caches/appCode30/DerivedData/
Worked for me :)
Also, just open terminal, and delete the .pcm file that has been generated (Xcode 6 onwards)
rm <path-to-pcm-file>
If you get this when switching between git branches, try adding this post-checkout hook which will clean your project every time you change branch.
!/bin/sh
xcodebuild clean -configuration Debug
Save as .git/hooks/post-checkout relative to your project root and don't forget chmod +x .git/hooks/post-checkout
For me, this problem is only occurring in Xcode 6 beta version, So I switch back to Xcode 5, and now problem is solved.
I tried all the steps suggested by all users here, but no one worked for me.
So, if you have both versions of Xcode and have issue only in Xcode 6 beta, then switch to Xcode 5 and clean the project, problem will be solved.
I tried these one by one but failed to build and run my project. So I changed Precompile Prefix Header to NO as mentioned by #Abhilash Gopal, then I reset the simulator,deleted the derived data, removed the corresponding .pcm file(In my case it was the UIImage.h from UIKit framework, so removed the UIKit.pcm).Then I cleaned the project and only then I was able to build it successfully. In earlier versions of Xcode these files were locked basically and were not allowed to edit. But its not the case now. Hope this helps someone who face the same situation.
The only solution there worked for me was running the following command:
sudo rm -R /var/folders/
But that gave me a lot of troubles in OS X.
I thought because /var/folders/ is for temporary files it should be okay to just empty anything in it.
But I was wrong see the following post: link
And the problem you described occurred every-time I tried to build my Xcode project - I'm building it from the CLI though Jenkins.
Which means I couldn't run the rm command every-time. So I found some inspirations and wrote the following ruby script which solved my problem:
#!/usr/bin/env ruby
require 'fileutils'
cache = Dir.glob("/var/folders/**/com.apple.DeveloperTools*")
FileUtils.rm_rf(cache)
I hope it would be helpful to someone.
Deleting project.xcworkspace did a trick for me.
project.xcworkspace is a directory which describes schema of current Xcode workspace state. Each time Xcode is launched it will regenerate project.xcworkspace if not exist already.
In order to delete project.xcworkspace:
Right click on your project file yourProject.xcodeproj
From drop-down menu choose Show Package Content
Purge xcworkspace file
If you are building on command line using xcodebuild remove '-parallelizeTargets' option passed to the command. That fixed the issue for me
After going through a lot of answers and helpful suggestions, I found out the solution to be: Uninstall Xcode 6 and reinstall it through the available dmg file and then install all the components for Xcode.
Product + Option -> Clean Build Folder, Clean Build Project, Deleting Module Cache files and Derived data files, using touch .pch, deleting pcm file, using command line to remove var/folders (Surprisingly, all of this did not help in my case)
Was stuck at it for more than 3 hours before finding the solution. Hope this helps someone.
Thanks.
Just open terminal and fire below command:
rm /Users/pratik/Library/Developer/Xcode/DerivedData/ModuleCache/LKL48GNAN6S7/UIKit-2X95M2Q1NPNPL.pcm
give your file path which return .pcm error. and then Clean Project and Run...Enjoy!!!

XCode 4.3.2 Settings.bundle missing files

Env: XCode 4.3.2, IOS 5.1
I am trying to add a setting.bundle for my project.
File->New->File->IOS Resource->Setting.bundle->Next->Create
There are no files in this bundle. I tried "cd" in the terminal, but I still cannot see anything — it is an empty directory.
There should be 3 files and 1 directory in the bundle. Can anyone please tell me why I am missing all these files, or has Apple changed the concept for settings.bundle or something?
I tried this with several my projects and even re-installed xcode and lion, no luck at all.
P.S: Changing the file type for the setting.bundle does not help; no such option in 4.3.2.
A clean install solved this issue.

How to fix: Xcode cannot be opened because of a problem?

After installing Xcode 4.0.2, I get this error when I try to launch it by double-clicking on an existing project:
Dyld Error Message:
Library not loaded: #rpath/DevToolsFoundation.framework/Versions/A/DevToolsFoundation
Referenced from: /Developer/Developer/Applications/Xcode.app/Contents/MacOS/Xcode
Reason: image not found
Launching Xcode via the dock and opening the project from inside Xcode works fine. Also note that doing a repair install of Xcode did not resolve the issue. I haven't tried completely uninstalling Xcode and installing from scratch, but I would prefer to avoid that as I have my IDE nicely customized the way I like it.
Update: I just tried a complete uninstall of Xcode via sudo Developer/Library/uninstall-devtools --mode=all then rebooted and reinstalled. Still having the same issue.
Before you reinstall, make sure your project file is set to open with the expected copy of Xcode 4. Select it in Finder, press Cmd-I, and make sure the Open With... popup is set to the right copy of Xcode 4.
According to the discussion below, the problem is that it is not in the /Developer/Applications/ folder. However, I think that is just a clue to the source of the problem, because Xcode is supposed to work in multiple locations. It is possible that Xcode sets fixed paths when installed and can't be moved. Did you happen to move it after installing?
http://www.iphonedevsdk.com/forum/off-topic/35948-xcode-crash.html
It is the ALIAS that is busted, not Xcode. If you reinstalled Xcode, you should make a new alias for your Dock or Desktop or wherever. Delete the old alias as it is no good any more.
Xcode (should) install in /Developer . You can get to that by going to your hard drive named something like "Macintosh HD". Make a new alias from there.

Resources