Morry
Morry

Reputation: 21

How do you zip a Xcode project?

I tried sending my friend an Xcode project, but all the other files are missing, I have no idea why this happens when sending my project!

Is there any way to send it without all the other files being missing?

Upvotes: 2

Views: 17654

Answers (5)

Josiah
Josiah

Reputation: 33

Only using the .zip on/sending the .xcodeproj file will fail, you should zip the whole directory and send it.

Where is my Xcode project directory?

Well, you'll be asked for a location to put the project in before you actually make the project, if you remember, you can locate it there, like for example, you save it at ~/Desktop/XcodeProjects. It would be the directory with your Xcode Project Name, like Test. If you don't know, the directory name is the Xcode project name. For example, Test.

How do I even zip a folder?

Well, click on the folder in 3 ways:

Trackpad: Click with 2 Fingers on any side

Magic Mouse: Click On Right Side

External Bluetooth/USB Mouse: Right Button

Then, Click "Compress Test" and it should output a .zip file. The file name would be, for example, "Test.zip". If you extract it, There goes the test folder! If that's the same that happened to your project folder, it's good to send!

If you have these kinds of questions too...

"Um, My mouse doesn't work like that."/"Where's my mouse?"

Don't worry if it doesn't work like that or not listed. Just grab another mouse... obviously.

"There's no other mouse though."

Control click on the folder. This works.

Upvotes: 0

Noel M
Noel M

Reputation: 16116

Assuming you understand how to use the Terminal app:

In the directory above your project:

tar cvzf <name_of_project>.tar.gz <directory_of_project>

This will create a .tar.gz file for your project, which is another of compressed archive format, similar to .zip.

Your friend can then run tar xvzf <name_of_project>.tar.gz in their terminal to expand to a directory on their computer.

If you run man tar from the command line, this will explain what all the command line arguments for tar do.

Upvotes: 0

Naishta
Naishta

Reputation: 12363

There is nothing wrong with this question although some of the guys have sort of downvoted it. Most of us who come from Windows background + learning Objective C or Swift will have this issue.

( ref: latest Xcode 7, but should be the same in other versions too)

So, first LOCATE the project. say you have opened ViewController.swift on Xcode. If you look towards the right menu, there is this 'Identity and Type' section which has the 'Full Path' of you project.

eg: /Desktop/CLASS ASSIGNMENT/Registration App Ver 1.2 2 2 2/Registration App Ver 1.2/LoginVC.swift.

Now if you go to this location via the 'Finder' in your dock( 1 folder up), thats where your project is.

-- Second: Right click and select 'Compress your_folder_name' option which zips the project and keeps it in the same location.

You can now attach this in your email and share.

Upvotes: 1

Avalanchis
Avalanchis

Reputation: 4559

Right click (Ctrl-Click with a single button mouse) on the project's root folder and choose compress.

A zip file will be created with the compressed contents of the project folder.

Send this file to your friend.

Upvotes: 4

Silverlock
Silverlock

Reputation: 91

Make sure you're zipping the entire directory that contains the project. Just sending the .xcodeproj file and the source won't do it. You need the whole set of data.

Upvotes: 1

Related Questions