Member-only story

Swift: Universal Framework

The Blue Prototype
3 min readApr 30, 2020

--

As a developer, write reusable code as much as possible so that it can be used by multiple applications.

Advantages of Universal Framework:

  1. Easy to distribute
  2. Easy to integrate
  3. Reuse your code
  4. Hide your code
  5. Modularize your code

Getting Started

Let’s start with creating a custom framework and make it universal so that it can be used on simulators as well as devices.

Step 1: Choose a template for your framework project

Step 2: Enter your framework name & some other details

Step 3: Write down your own code in your framework

Step 4: Write a script to make your framework universal to be used on both simulators & devices.

Create new scheme, Select Project Target → Edit Scheme

--

--

Responses (2)