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.

Before jumping to the next step: Everyone should be able to generate the project, compile the GitHubKit target and compile and run the application.

4. Automating the generation of the IssuesKit project

  • 🌱 Ask them to do something similar with IssuesKit:
    • Create a project.yml.
    • Update the Rake task.
    • Add the project to the .gitignore.
  • Define the dependency between IssuesKit and GitHubKit.

Before jumping to the next step: Everyone should be able to generate the project, compile the IssuesKit target and compile and run the application.

5. Automating the generation of the App project

  • 🌱 Ask them to do something similar with the App:
    • Create a project.yml.
    • Update the Rake task.
    • Add the project to the .gitignore. Before jumping to the next step: Everyone should be able to generate the project, and compile and run the App.

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