How to completely rename Universal Framework in Xcode?

I am creating a Framework, originally named Iris .

When you try to publish it as Cocoapod, I find that the Iris framework already exists .

And while they have completely different goals and authors, I cannot publish it as a pod with that name. So I did the unthinkable !

I tried to rename all this in IrisKit .

My Xcode project, now called IrisKit, has 6 goals:

3 Framework goals

- IrisKit iOS - IrisKit tvOS - IrisKit macOS 

3 Project Examples

 - IrisKit Example iOS - IrisKit Example tvOS - IrisKit Example macOS 

Unfortunately, my sample projects do not allow me to import IrisKit with an error that states:

 warning: file 'FeedTableViewController.swift' is part of module 'IrisKit'; ignoring import 

What should a developer do?

+5
source share
1 answer

Create a backup of your project or, if you are under source control, create a new branch and work from there.

Here are the steps taken:

1. Renamed the project in the project "Identity and Type"

enter image description here

2. Renamed schemas in IrisKit

enter image description here

3. Renamed folders and groups in IrisKit

enter image description here

4. Updated info.plist links in "Build Settings"> "Packaging"

enter image description here

5. Updated package identifiers under Build Settings> Packaging

enter image description here

6. Updated general title for IrisKit.h

enter image description here

7. Updated import of project projects in IrisKit

enter image description here

8. Updated dependency management:

  - Swift Package Manager - Cocoapods specs 

9. Finally, and a good master, this is important :

Goals that should not be built using the framework should have a different product name than the framework they use. e.g. Project example showing structure

This may seem obvious, but it's easy to miss when mass renaming things

-

A structure with the same name for several assembly purposes:

enter image description here

enter image description here

enter image description here

And an example. Please note that the name is different from the target frames.

enter image description here

It's time to figure it out. Hope this helps.

+13
source

All Articles