Home Create Libraries, frameworks, and swift packages for iOS
Post
Cancel

Create Libraries, frameworks, and swift packages for iOS

Libraries vs Frameworks vs SwiftPackage vs Modules, which one is better and how you can work with those in Apple universe.

Learn how to build an iOS framework, which lets you share code between apps, modularise your code or distribute it as a third-party library. You could also organise your code into different packages locally to increase maintainability and reusability of your code.

What to expect

In this workshop/talk we will work on a sample project and follow this list together:

  • Libraries vs Frameworks vs SwiftPackage vs Modules
  • Create a new framework for an existing project
  • Migrate different codes and classes to the framework.
  • Import everything back into the app.
  • Pack it as a Swift Package.
  • Use your package using Swift Package Manager.
  • Build a binary framework, XCFramework.
  • Document your package using DocC

What you will take home

By the end of this talk/workshop, when you are developing an app you know how to structure your code better or how to migrate your legacy code into a package. It will also allow you to document your code better and distribute it through Github pages. After all you can decide when/how you can work with Libraries vs Frameworks vs SwiftPackage vs Modules.

Technical Requirements

The attendees need to have a basic understanding of developing iOS apps. They don’t need to be experts, however there will be some advanced code snippet in there as well.

Workshops

1-Create Libraries, Frameworks, and Swift Packages for iOS

2-Create Libraries, Frameworks, and Swift Packages for iOS

Material

Here is the link to the workshop presentation slides: GitHub - Emadgnia/tryswift-workshop-material

All the workshop materials you can find it here:

StarCharles

NetworkingFramework

NetworkingPackage

ModelPackage

This post is licensed under CC BY 4.0 by the author.

DocC Tutorial for Swift : Getting Started

Apple Health Frameworks

Comments powered by Disqus.