What's the best way to backup a project?
To be more specific: I have a DropBox account and I prefer to have a copy of the project over there.
I assume I should copy all the h+m files.
Can I copy all the xib files? does it make any sense?
Can/Should I copy all the jpg/png/mp3 files that I use for resources?
Is there a proper way to do that, like a "backup project" button where I can select the target and it compresses the project in some smart way?
You need all of those and the project files, etc. Look in the project file to see all files referenced. Check to see if you have everything by making a copy and trying to build from the copy. You'll get complaints if you missed any thing.
The best way to backup a project is source control. There are many options available to get free or very cheap remote source control repositories where you can store a copy (and history) of your source. Checkout http://www.beanstalkapp.com or http://www.github.com for a start.
Best thing is to copy the entire directory where all your project exists. Copy this directory to your dropbox folder. To open the project open yourproject.xcodeproj with xcode.
Although this method is okay for one time thing or when you are the only one working on your project but in the long run you should look at trying to adopt a source control versioning system like GIT. Xcode has wonderful integration with GIT.
Hope this helps...
Related
First of all, I am a complete beginner. I am always using 'export to zip file' to save my flutter code (I am not familiarized with Github right now ;-) ). The overall filesize of the zip is now around 1.2 gigabyte - Android folder: 60mb, iOS folder: 1.1gb.
It is a simple chat app without much graphics etc.
Is it normal? Don't want that the final app size is that large. Any idea how to save my code without that much overload?
Best,
Alex
Yes, that's normal - you have a whole bunch of intermediate build artifacts under your source folder.
The purpose of those .gitignore files that you find in your source tree is to tell git which files are the temporary build files or other configuration files specific to your machine. Git uses then to decide which files should be saved for posterity in source control, and which ones it should ignore.
If you are not going to use git, use the gitignore files to see which folders you can manually exclude from your zip file. (The build folder will probably be the main culprit.)
I highly suggest you use git. You can use dropbox or google drive folders for your project, this way they can auto sync your files. Try to compress your project folder from your operating system's file manager and compare the sizes. I don't think 1.1gb ios folder is normal.
Usually this must not happen (until u have used large media files).
One reason of file size increase is,
"apk / aab" files in "app\release" folder are not deleted while project is build,
like they are deleted in "app\build\outputs\apk\debug" folder.
You can delete previous signed apk from "app\release",
(if you have published them).
As these "apk / aab" are safely stored on google developer account.
Also don't forget to export your ".zip"
out of the project folder other wise it be like "zip in zip and zip in zip and so on ..."
I have studied https://blog.bazel.build/2017/02/27/protocol-buffers.html . The project I want to hack on is written in Go. At the moment, if I run the build command I can see the compiled binary but I don't see the *.pb.go files anywhere. I want to keep the generated *.pb.go files in the same folder where *.proto files are so that my IDE (Intellij Goland) can find and index them.
Can you please help me how to get this working? If you can show me how to do that for the github.com/cgrushko/proto_library project, I should be able to try that in my particular project.
Bazel will not output generated files (such as .pb.go) into the source tree. They go into the output directories (bazel-out/<config> or bazel-genfiles/<config>). Temporary solution might be to add those as source roots to goland. The real solution is to use https://ij.bazel.build/. It has some Go support, and the team is actively working on improving it.
I am working on a MASSIVE project with about 10 thousand files in it. The files are nicely arranged in Xcode's directory system but not so on the disk. Is there a tool that I could use that would make the folder structure on my disk represent the folder structure in Xcode?
Personally, I know two ways to do it:
Do it manually (rearrange your folder first, and then drag and drop your directories in xcode). That will do the job.
Use an external library, I suggest you synx. It does the job well
I don't know why you want to do that, but I don't think it's really important if your folder isn't ordering with your xcodeproj since you will always open it with xcode. Just separate assets is enough, isn't it?
It seems that the files should indeed be copied into the destination folder...no? What am I missing here?
Most of the time various tutorials seem to say that button should be unchecked. But it seems like that is better to check.
Could someone please explain the distinction to me?
This is just about project management. If you download some files from the web say, then add them to your project, you probably want to copy them. Then you can delete the originals and you will still have a copy in your project. Alternatively, you download a folder of code and move it to a folder on your machine where you keep 3rd party code. Now when you add the code to your project you probably do not want to copy the code so that in the future if you fix a bug in the code it is available in all projects where you're using that (shared) code.
It's very much about personal preference and how you're managing the code files on your machine, in and between projects.
Not copying == leave the files where they are.
Copying == save the files inside the project so I don't loose them.
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.