Some files on my Swift project, like circle.yml and .gitignore, aren't shown in the Xcode 9 Navigator. How do I get them so show up?
The Xcode project navigator is not a file browser. Just because something is in your project folder, doesn't mean the project is aware of it. The project isn't magically watching the project folder to see what's put in there. It knows about the stuff that it put in there, of course.
But you want something to be seen by the project, and you yourself put it into the project folder without telling the project that you did so, then just drag it into the project navigator to bring it to Xcode's attention. Note that you should decline Xcode's offer to make this part of the target. You don't want a .gitignore file to be built into your app; you just want the convenience of accessing it thru Xcode and the project window.
Related
I just started learning SwiftUI and trying to follow the steps of the Building lists and navigation example from Apple. Although copied and existing on the project directory, I noticed the Resources directory is not visible in my project navigation on Xcode.
The build is successful, but since the app tries to read landmarkData.json file from that directory, it throws:
Could not find landmarkData.json in main bundle.
Why doesn't the Resources show up on Xcode? How can I fix this issue?
Thank you so much
Here's some things you can verify :
Verify if the clock is selected in the search bar. If so, de-select it.
Try deleting the Ressources folder in your projet files. Then, drag and drop it in your files navigator (left panel in xcode).
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.
using CocoStudio 2.0.6 and Xcode 6.1.1 on MAC inside VMware. After publishing in CocoStudio I open Xcode and "Add Files to myProject" with the "Copy items if needed" option checked. Then I have the folder myProject/res created by CocoStudio inside the myProject/Resources folder used by Xcode. Using CSLoader in HelloWorldScene.cpp works fine and I see the scene in the simulator. Runs ok also in Eclipse on Android emulator.
If I go back to CocoStudio and make changes like adding a sprite to the scene then I need to repeat the whole process of publishing, delete them Resources/res folder in Xcode and add it again. It is faster to delete the whole folder instead of adding new files into it and delete the ones not used any more.
My question is: am I doing it the right way or is it there a better way for Xcode to automatically see modifications to the resources made by CocoStudio?
Like when I use Eclipse and build the project, the resources in the myProject/proj.android/assets folder are automatically updated with the resources from the myProject/Resources folder.
Thank you.
You can make a resources folder in iOS app a symbolic link to the main Resources folder.
Remove the proj.ios_mac/Resources folder. Then go to your main app folder and execute:
ln -s ../Resources proj.ios_mac/Resources
I needed to make a project bundle with which has several small projects. When I try to add them into resources I get several errors. dont know where I am going wrong
The feature is called workspaces. You have to create an Xcode workspace (there’s a special command in the File menu for it) and then you can drag other projects into the left project sidebar. I suggest that you google for some Xcode workspace tutorial to walk you through.
I have a couple of projects that I had started under Xcode 3.2.x some time ago. I switched to Xcode 4 a few days ago and want to make use of the Workspace feature as both projects. Basically, my plan is to extract some common features out of the two projects and make them a common library that both projects depend on. However, before I even get to the tricky bit of dependencies I get stuck just adding my two projects to the workspace.
I tried creating a new workspace and selecting "Adding files to " from the context menu; I then select the .xcodeproj file from my first project and it appears in the left-hand side tree browser in my workspace. However, it's just the file, not the project that I get. That is, rather than getting a two-line entry in the tree browser where the first line states the project name and the second line says something like "1 target, iOS SDK 4.3" like in the Apple documentation, I get a single line simply stating the name of the .xcodeproj file including the extension. There is also no triangle on the left to expand the node. It's like I just dragged some file in the workspace, not a project. The same goes for the second project.
I have also created a new Project "Foo" from scratch in Xcode 4 and added it to my workspace, with the same result. I looked at Apple documentation and watched the 16 second video about a dozen times now, but cannot work out what I am doing wrong (if the problem is indeed in the chair and not in the computer).
I had this exact same problem. I think it stems from having another workspace already open referencing the project you want to add. I got it working by:
shutdown xcode completely
double-click the workspace to launch Xcode and open just that workspace
drag and drop the project file from the Finder
Worked fine. I have many workspaces all referencing an openssl project, and it seems to work OK when you only have one workspace open at a time in Xcode.
Actually, I made it work without exiting Xcode.
All you have to do is make sure the projects you want to add are closed, since Xcode is having trouble adding open projects to a workspace.
So:
Close the projects you want to add
In the Workspace window, choose "Add Files to MyWorkspace"
Add the .xcodeproj file of the project you want to add
I had the same problem. SO I just exit xcode, restart it. Then I can see the files under the project.
Exiting Xcode completely and then double-clicking the .xcodeproj file to open the project.
It works but when you add an activity to the project than r.java file is automatically removed and errors are coming.