Now let’s add Playground to our repository. In Xcode, select File -> New -> Playground.
Screenshot of Xcode Playground template selection screen
Select iOS and Blank for the Playground and click the Next button.
Screenshot of Xcode Playground save location
On the next screen, you get to select where the Playground will be saved. You want to save the Playground in the week-1 folder located in your repository. You must get this location correct; otherwise, your Playground may not be added to your repository.
Select the folder for this week’s homework and click Create. Depending on where your homework folder is located, you may get a dialog asking to allow Xcode to write to the folder. Click Allow.
Screenshot of GitHub Desktop Repository info screen after saving the Playground
Back in GitHub Desktop, you should have noticed that two changes are listed. These are the results of saving the Playground to the repository.
Let’s commit the changes. Provide a summary such as “added Playground to repo” and click the blue button with Commit 2 files to week 1.
Screenshot of GitHub Desktop Repository info screen push changes to origin
After the commit is complete, click the blue Push origin to put our changes on GitHub. We can verify the changes have been pushed by looking at our repo on GitHub.
Screenshot of GitHub with changes pushed
Clicking the drop-down labeled Main, we can see our branch. Selecting that branch will take you to the branch, and you will see the homework folder and the playground.
You are now at the point where you can complete the assignment for the week.
These steps are equivalent to staging the playground addition, committing those changes, and pushing the changes to origin.
Previous: Creating a Branch for Homework Assignments
Next: Adding a Mentor as a Collaborator to the Repository
All videos. All books.
One low price.
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.