Anything you use to distribute your framework requires a specific version to reference. In this video, learn how to specify a version of your camera for this. Git tagging is easy, and learning this is a great segue into learning how to properly plan out these versions.
- [Instructor] Now that we've explained how semantic versioning works inside of our framework, lets go into a little bit of detail in how we can keep track of that version, in Git. We won't be covering everything that has to do with Git in this particular video. If your looking for information on how to use Git with source control, or to set up a Git Hub account, check out some of our other courses on source control or Git or Git Hub. We've made a version of our framework titled version 1.0.1. Lets go into our terminal and navigate to the folder where our file is.
We're now at the root folder where we have our workspace, our sample application sources, and our camera framework sources. So far we haven't worked with the git repository so we need to add one here. For this, we can type git init. This will make an empty git repository and you can start to version your files. We'll start by doing git add space dot. This will stage all of the files that you've changed so far to be committed into your git repository. To check this, type git status. And you'll see a lot of files get checked in.
Now we want to type git commit dash m initial commit. Again, you need to make sure that you've set up your name and email address as part of your git repository. If you've ever worked with git hub it's likely that you've already done this. After you make your commit, lets go ahead and check out what tags we have already made. Type git tag dash l and you'll notice that nothing is output. A tag is an immutable copy of your git repository at any given point in time.
And it's the best way to keep track of releases of your software. In order to create a tag, at any point in time you'll type git tag dash a open quotes one dot zero dot one and then dash m with an explanatory message of what you've created. This explains that we're going to create a tag called one dot zero dot one. And the caption for this tag will simply be, first version. After you do this, if you type git tag l again you'll see the list of tags that you have available to you.
This keeps track, again, of all of the immutable copies of code, at any given point in time. If you have this set up with a git hub repository, or any kind of of source control that uses git, in order to push that to your origin you would type git push origin one dot zero dot one. This will not work in this video, but if you were to run this, this would push your tag to git hub and your release would be ready for anybody to download.
Along the way, he explains the differences and nuances between writing code for an application and for a reusable framework, as well as some of the fundamentals of AVFoundation, one of the core camera frameworks in iOS. David also shows how to refactor your code, understand Swift access control, develop an interface, and handle memory leaks, so your framework is ready to share with other developers.
- Creating your first build
- Making the camera work
- Creating a framework delegate
- Adding media
- Capturing images
- Correcting orientation
- Versioning and tagging releases in Git