Edit GUI without using base internationalization - xcode

I set my Xcode 5 project to use a build target of OSX 10.6, unchecked "Use Autolayout" for MainMenu.xib and followed this answer to turn off base internationalization. This resulted in my MainMenu.xib file being removed from my project. When I build and run my project the window layout is how I left it, but going into finder, opening MainMenu.xib in Interface Builder and changing it's layout does not effect my project when I go to build and run it again.
How do I change the GUI for projects set to a build target of 10.6?

Can be added again to the project by:
Drag MainMenu.xib from Finder to the project files panel in Xcode.
A dialog will open, select copy items (if needed), created folder references, and add to the project's target (not "test"), click Finish and it should work!
If a more complete answer is added, I will best answer it instead of my own.

Related

How do I embed projects using Xcode 10?

I've been searching the internet for hours trying to figure this out. In previous versions of Xcode, I could drag a .xcodeproj file onto my workspace, and the groups, etc. of that project would be in the main one. That is, its sources and products would be accessible in the parent project. I mean to do this for a new private framework of mine, but it seems that in Xcode 10.2.1, this behavior is changed.
When I follow the instructions found in Apple's archived documentation (all that seems to survive), the .xcodeproj file sits alone in my file inspector. No reference hierarchy, and nothing happens when I click on it. On top of that, that project's frameworks are not accessible to the parent project.
Has anyone here figured out how this changed in Xcode 10, and what we are to do about it now? Many thanks!
This certainly feels like a workaround, but it does seem to work:
Open one of the projects you want to be in the final workspace
From the "File" menu choose "Save As Workspace…" and save it somewhere on disk
This will create a new workspace that looks identical to the Xcode project you originally opened.
From the "File" menu choose "Add files to “WorkspaceName“…" and select the next project you want in the workspace
At this point it will probably put the newly added project "inside" of the existing one in the file navigator pane. Simply drag it out to the top level and it will be on the same level as the original project. You should be able to twirl open the disclosure triangle and see the source files it contains. Clicking on the project will show the targets it contains.
Repeat as necessary for the remaining Xcode projects
As you add projects, the schemes from each project will show up in the popup menu under the scheme button in the toolbar.

In Xcode, how do you re-add the Mac app's product back to the Project navigator?

I accidentally removed from my Xcode Project Navigator the reference to the product of my Mac app target. Is there a way to re-add it to the Project navigator?
(I tried dragging in the actual built app, but that's a reference to that build's specific folder, which isn't the same thing.)
Follow these steps to find the Products directory:
Create a new Finder window, via Cmd+N
Select the Go menu and hold down the option key
You should see Library
Select Library and navigate to the directory below
Try adding this folder to your project navigator:
/Library/Developer/Xcode/DerivedData/[APPLICATION_NAME]-[RANDOMLY-GENERATED_SUFFIX]/Build/Products
Ensure Copy items if needed is not checked
Ensure Create groups is selected
Ensure a target is selected
I hope that helps!

Base Internationalization and "Could not find a storyboard named […]"

I am using iOS 6 and trying to use base internationalization. But when I flip the switch and run, I get a "Could not find a storyboard named […]" exception.
I tried removing and adding the storyboard file both from the build phases and from the project itself to no avail. I notice in the build phases, that the storyboard is there but it is red.
Is there a trick to get this working?
Select the red storyboard entry in your project navigation, go to the file inspector use the button beside the file name to navigate to the file on disk:
<-- the button at bottom right
If this is not enough or not possible try these strategies:
Clean project, holding down the shift key (this will clean the entire directory).
Restart Xcode.
Check the target in the file inspector rather than setting it in build phases.
Try to verify that the file is not corrupted. (Change something in IB and save.)

How do you completely delete projects in Xcode?

So if I go into my selected save folder for my projects and delete my project it no longer shows up in Xcode. However I can still find some other files if I look under my user name/Library/Developer/Xcode/DerivedData. There are other files Xcode creates and I'm afraid if I make, and delete a bunch of projects, it is just gonna clutter my Mac with a mess of unneeded files. So how do I completely remove a project in Xcode?
Appreciate the help.
Xcode 9
In Finder, delete the project folder. (If you don't know where it is, open the project in Xcode and right click on project name in the Project Navigator. Choose Show in Finder.)
In Xcode, remove the deleted project from the menu. (Go to File > Open Recent > Clear Menu. This will clear all of your recent projects from this menu and the startup menu.)
For Xcode projects in version 11:
Open Xcode
Click on File
Open recent: Clear menu
It will remove all the projects that you have on your Xcode.
For Xcode 4, you can go to the Organizer by clicking the button at the top right, and then you'll see your projects. Right click the one you want to remove, and choose "Remove from Organizer..." This will remove all the associated data. I don't know if this is an option in previous versions of Xcode.
Solution for Xcode 7.3
To delete Xcode project:
Locate the project directory in finder, right-click, and select Move to Trash
To delete Xcode project data:
(From the Xcode welcome screen) Go to Window > Projects, select the project, then click Delete next to the derived data and/or snapshots
Note: deleting project data can free 50+ MB even from simple projects!
The easiest way I found to do this in Xcode 9.1 was to open Xcode (which may "open" only as an icon on the dock if there are no current projects) and select 'Window' from the Xcode application menu.
Select the 'Welcome to Xcode' option, then click on 'Open another project...' in the right pane of the window. This should take you to the root of your projects folder in a Finder window. (Mine end up in /Applications by default.) From there you should be able to select the project name and 'Move to Trash'. Empty your trash to get rid of it entirely.
Physical deletion : Go to where project folder is. Simply delete folder
By default it is Documents/[Project name]
To remove as start-up choice list :
On Terminal: open /Applications/Xcode.app
Then
File -> Open Recent -> Clear Menu
Cheers
/Users/User/Library/Developer/Xcode/DerivedData/ProjectName-UI
this is the build folder for your project. You can delete it in finder or in Xcode by pressing Command-Option-Shift-K before delete the project itself.
For Xcode Version 8.2 (8C38), you can remove the projects completely (project name in Xcode, programs, data, etc.) one by one by doing the following: [Note: the instructions are not for just remove the project names from the Welcome Window]
Launch the Xocde and wait until the Welcome window is displayed. The projects will be shown on the right hand side (see below)
Xcode Welcome Window
Right click the project you want to remove completely and a pop window [Show in Folder] jumps out; selec it to find out where is the project in the [Finder] (see below)
Find the project folder
Right click the project folder in the Finder to find it’s path through [Get Info]; use path in the Info window to go to the parent folder, and go to there[Locate the project folder path][3]
Right click the Project Folder (e.g. DemoProject01) and Porject file (DemoProject01.xcodeproj) and select [Move to Trash] ; you will see that (a) the folder in finder is removed AND (b) the Project in the Xcode Welcome Window’s Project List is removed.
To Delete XCode Projects in Ver.7.3 you must:
Open up the Project you would like to delete
Select the 'Window' option from the Active App Menu for Mac programs. The one where you find - File, Edit, View etc..
Select the Projects option
Then you will see a full list of projects
Highlight the ones you want to remove - Shift + Click >>> Click
Then Right Click and Select Remove projects

In Xcode, how to exclude a file with a set name from being put in the app bundle

When I start an Xcode project I drag in a blank readme.txt file that I use to take notes with while I'm figuring things out. The thing is, the file gets put in the app bundle at build time. Then I have to deselect it in the Detail view so that won't happen.
Is there a way to automatically exclude a file with a known name from every build?
I know Xcode is automatable, but I don't know where to look.
Using the latest non-beta Xcode version.
In the project outline view (by default this is the left hand pane when you open Xcode) locate your application under the 'Targets' section. Expand the subheadings, one of which will be 'Copy bundle resources'. You will probably find your unwanted text file has been placed here automatically. Highlight the file here and delete it - this will leave the file in your project but will prevent Xcode from copying it to your App bundle when you perform a build. To finish off, select 'Clean & Build' from the Xcode build menu to clear out your old bundle completely and recreate it with your new setting.

Resources