I have a project/workspace that I want to zip up and send to someone so they can compile it on their machine. It's an iOS app.
One thing I am noticing is when I zip the project directory it turns out to be over 1gb. I deleted the Derived Data folder in the project directory.
However, for some reason it's picking up derived data from ~/Librar/Developer/Xcode/DerivedData and putting it into the zip file.
There isn't, as far as I can tell, multiple projects.
What is the best approach to send someone the project with out it being huge?
Is there a way to turn off derived data?
Right click on "*.xcodeproj" and click on "Show package contents". Try to send the ".xcworkspace" included in it. Hope This is what you are expecting :) .
Related
What does it mean when Library files are shown in red, as in the screenshot below? Does it mean these files have been added, but there's something missing from them?
This means that the reference to those two files has been lost. Someone moved or deleted them behind Xcode's back, and it no longer knows where they are.
As matt said earlier, this is because the project (notably the project.pbxproj file) has a reference to these files/subprojects, but they’re not found in the location in question. This can happen if you deleted them, renamed them, or you cloned some repo where someone forgot to add these to source control even though they’re supposed to be. It’s hard to say what happened without more information, but Xcode merely is telling you that files are not where the main project.pbxproj file is expecting them to be.
this happens when location mismatches or actual file is not there . search for these files in your mac , if is there , click on info and find the location . And if it differs , drag the file to app's necessary folder and in the pop up select copy
I recently got a new hard drive and reinstalled Mac OS X on it. I copied my entire folder with all my Xcode projects over. However when I tried booting up one by clicking the project file, Xcode opens up with only the project file present. All of the files with actual code on them are not appearing.
I tried to add files but even that would leave most of the files with code on them greyed out in the finder.
Question, what is the proper way of transferring these projects specifically in Xcode 7? I have not been able to find anything concrete.
So, the only way I know of to do this efficiently is to load up the project file XML in your favorite editor and go manually fixup the paths. I don't recommend this.
Unfortunately, the way to do it through the UI is for each file, you need to open the Utilities Bar on the right, select the file, then update the path via the little folder icon in the Identity and Type section. Here's an illustration:
Then repeat for every file in your project. Sorry.
i had this same issue i mean you could always manually transfer code through word documents or notes, but for me i had copied the entire project folder and the document transferred just fine just make sure you transfer all of the files with it and not just the one file for the project itself
delete the xcode application and reinstall it from the Mac App Store.
I'm now developing my first iOS app, and I found that two of my classes (hence, four files) are located outside of my MyApp/.
So in my filesystem, here's the current situation:
My App
- ClassA.h
- ClassA.m
- ClassB.h
- ClassB.m
MyApp/
MyApp.xcodeproj/
MyAppTests/
Other than the two classes, all of my class files are located in MyApp subdirectory. The other resources, such as Core Data model file or images are saved in the same directory.
However, why are the two classes, and only the two classes, located in the outside of MyApp subdirectory? When I move those files to the supposedly correct location, those files are no more "valid" in Xcode with the color of the file name is converted to red.
So here's my question:
Why are those two files located there?
Do they have any issues if they remain to be located there?
Should I fix this issue and save it correctly? I think I haven't had any issues so far with the Simulator and the actual iPhone...
I use iOS 7 and Xcode 5.
•Why are those two files located there?
A: When you have created these files or imported from external directory, you may have not taken care of the group/folder these files are getting created/imported into. Hence they are inside the main app folder in the file system.
•Do they have any issues if they remain to be located there?
A: No, this is certainly not an issue in the correct functioning of your app, but it is always good to manage your files under groups/folders for better file structure and it is easier to find files when they become large in number.
•Should I fix this issue and save it correctly? I think I haven't had any issues so far with the Simulator and the actual iPhone...
A : This depends on you. If you like to keep your files in folders and like everythin arranged in some pattern, then yes you can divide the app into different folders. When you move the files in a folder, the reference of those in XCODE should change as well, and thats why you see those files in red in XCode. No worries. Just delete the files and add them again. Make sure you uncheck the option "Copy files under detsination group's folder".
Now, you may seem the option of creating New Groups inside XCode. But it is good to be aware that these groups do not create separate folders inside file system. These are just for Xcode refernce. So, a neat way is to create folders outside of XCode, and then import these folders(can be empty) in Xcode. Now when you add any file in these imported folders, even from XCode, it will go inside the correct folder in file system.
I am sorry I am not on my MAC right now, so cannot paste actual images, showing how to do it. Feel free to comment, if I have instead of solving the issue, have rather confused you more:D
You can put your source files wherever you want, as long as Xcode knows where to find them. You can leave them here, or organize it in another way, as you seem to be willing to do.
So, if you want to move these files in your Myapp/ subfolder, just move them there, and when Xcode complains it can't find them, highlight all those files in red in the navigator, and in the "File inspector" pane (right hand side of the window), click on the little Folder icon to browse to the new location. If you selected all files you don't need to do that 4 times, Xcode will find it out by itself.
I am trying to add the shareKit files like in the photo:
...but Xcode will only let me do the drag and drop only for single files! How can I solve this?
What you need to do is simple:
1) Right click the sharekit folder in the first project and you will see show in finder. Click that.
2) That will lead to the folder in your directory.
3) Next pull the whole directory into second project. Make sure you copy the files over.
Hope this helps...
In Xcode 4 it is different than older Xcode you have in the screenshot. To copy between projects, you have to open them in the same workspace (the same window). So
open the first project
drag the second one from finder to the same Xcode workspace
now drag the files you need
remove the second project from your workspace.
Lakesh's approach might have a risk in fact, that sometimes file structure you see in xcode might differ from what is actually on filesystem.
You might want to try ShareKit 2.0, it is already packaged as a static lib and has updated sharers to match newest api's. If you decide to use it, make sure to follow install wiki guide literally.
When I drop a .XCodeProj or .App file in DropBox (and there I am assuming, other packages)the files in the package seems to be randomly not copied--sometimes none of them are copied, sometimes some of them, never all of them.
This happens even when I zip the file, copy it to dropbox and unzip it there.
How could DropBox have this grave an error this far along in it's existence? Lost a whole day of work finding this out. Disastrous.
In particular the project.pbxproj file was NEVER successfully copied into dropbox, or at least never made it to any of my other drives that were synced with the first.
Does anyone know if there is a fix for this?
.app is essentially a directory, so Dropbox will see it as one and uploads each individual file in there.
You need to zip your project directory then sync to dropbox; same would go for the .app.
Maybe you need to delete previous version of the file you want to upload to Dropbox (.XCodeProj, .app or .zip) with the web interface and then try upload it again. You can do this in 3 easy steps:
Log in to Dropbox
Click the "Show Deleted Files" button
Find and delete the old version of the file you want to upload (The grey one)
Also: Dropbox doesn't upload the whole file everytime you upload a newer version of it, infact it only uploads the newer parts (But I'm not 100% sure about this).
I hope my answer can help you :-)