Skip to content

Workshop handbook

Pedro Piñera Buendía edited this page Jan 26, 2018 · 15 revisions

Emoji cheatsheet

  • 📖: Theory, introduction of concepts.
  • ❓: Questions for the attendees.
  • 👨‍💻: Developers working on their own.
  • 👭: Attendees and mentor pairing together.

1. Workshop introduction

📖 About the workshop

  • Encourage people to participate.
  • Invite them to give feedback after the workshop.
  • Ask them to raise their hands if they get lost or can't follow.

📖 Modular apps

  • Why modular apps.
  • What are the advantages and disadvantages of modular apps.
  • Multi-target vs multi-project.
  • Static and dynamic linking.
  • Embedding dynamic frameworks.

📖 Goals

  • Have a better understanding of a modular architecture (frameworks, libraries, linking, dependencies)
  • Getting rid of Xcode projects in your repos using XcodeGen
  • Sharing code and UI components across different products.
  • Automate tasks in Swift using Sake

📖 How

  • Building Issues app.
  • Features and structure.
  • External dependencies.
  • Workshop plan.

2. Getting the project running

  • 👭 Checkout the project and go to tag 0.1.0.
  • 👭 Install bundle dependencies bundle install.
  • 👭 Fetch dependencies with bundle exec rake dependencies.
  • 👭 Register a new app on GitHub and update Constants.swift.
  • 👭 Check the App Groups settings (entitlements file) and app signing.
  • 👭 Run the app using Xcode.

Am I ready to continue?

  • ✅ Your app compiles.
  • ✅ You are able to login using GitHub.
  • ✅ You see the issues assigned to you on the screen.

3. Automating the generation of the GitHubKit project

  • 👭 Install XcodeGen if they don't have it installed.
  • 👭 Create a base Projects/project.yml file.
  • 👭 Create a Projects/GitHubKit/project.yml file.
  • 👭 Add a Rake task to generate projects.
  • 👭 Add the Xcode project to the .gitignore.

Am I ready to continue?

  • ✅ GitHubKit project is not part of the git repository anymore (git rm -r --cached .).
  • ✅ GitHubKit scheme compiles and the tests run.
  • ✅ Issues app compiles and runs on the simulator.

If you couldn't complete this step, you can checkout the tag 0.2.0 and continue the workshop.

4. Automating the generation of the IssuesKit project

  • 👨‍💻 Automate the generation of IssuesKit:
    • 👨‍💻 Create a project.yml.
    • 👨‍💻 Update the Rake task.
    • 👨‍💻 Add the project to the .gitignore.
  • 👭 Define the dependency between IssuesKit and GitHubKit.

Am I ready to continue?

  • ✅ IssuesKit project is not part of the git repository anymore (git rm -r --cached .).
  • ✅ IssuesKit scheme compiles and the tests run.
  • ✅ Issues app compiles and runs on the simulator.

If you couldn't complete this step, you can checkout the tag 0.3.0 and continue the workshop.

5. Automating the generation of the App project

  • 👨‍💻 Automate the generation of the App:
    • 👨‍💻 Create a project.yml.
    • 👨‍💻 Update the Rake task.
    • 👨‍💻 Add the project to the .gitignore.

Am I ready to continue?

  • ✅ App project is not part of the git repository anymore (git rm -r --cached .).
  • ✅ App scheme compiles and the tests run.

If you couldn't complete this step, you can checkout the tag 0.4.0 and continue the workshop.

6. Creating an iMessage application

  • Create a new target using Xcode.
  • Enable app groups to generate the iMessage.entitlements file.
  • Reorganize target sources and resources.
  • Add the new target to the app project.yml. Before jumping to the next step: Everyone should be able to generate the project, and compile and run the iMessage extension.

7. Creating IssuesUI

  • 🌱 Ask them to do create an IssuesUI framework that depends on IssuesKit:
    • Copy IssuesKit.
    • Remove sources and tests.
    • Remove the test target.
    • Move the cell from the main app.
    • Link the framework from the main app.
    • Update the imports and make sure that the cell can be used from the app.
    • Update Rakefile to include the new project. Before jumping to the next step: Everyone should be able to compile and run the main iOS application.

8. Creating ShareIssue view controller

  • Update SecureStore's keychain to use the shared group.
  • Verify that the entitlements and signing are ok.
  • Implement the view controller. Before jumping to the next step: Everyone should be able to compile, and run a functional iMessage extension that can share issues with other people.

Common issues.

  • Crashes because of an invalid group.
  • The app cannot be built right now.
    • Ensure the info.plist is properly setup.
Clone this wiki locally