Home Creating a Framework for iOS
Post
Cancel

Creating a Framework for iOS

Learn how to build an iOS framework, which lets you share code between apps, modularize your code or distribute it as a third-party library.

Published in Kodeco the New Raywenderlich.com

Using Swift 5, iOS 14, Xcode 12

Have you ever wanted to share a chunk of code between two of your apps or wanted to share a part of your program with other developers?

Maybe you wanted to modularize your code like the iOS SDK separates its API by functionality. Or perhaps you want to distribute your code the same way popular third party libraries do.

In this tutorial

You’ll extract CalendarControl, developed in Creating a Custom CalendarControl for iOS into a separate reusable framework. Along the way, you’ll:

  • Create a new framework for **CalendarControl**.
  • Migrate the existing code.
  • Import everything back to the app.
  • Build a binary framework, XCFramework.
  • Pack it as an uber-portable Swift Package.
  • Set up a repository for your Swift Package and publish it.

By the time you’re done, the app will behave as it did before while using the portable XCFramework you developed!

Learn more on Kodeco the New Raywenderlich.com

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

Vision Framework Tutorial for iOS: Scanning Barcodes

Multi-Language Support with Localization in iOS

Comments powered by Disqus.