Home > front end >  Integrate two massive apps as frameworks into one Xcode project
Integrate two massive apps as frameworks into one Xcode project

Time:06-17

I've been told to make the difficult task of integrating basically two massive apps into one. With all the dependencies they both have integrated with Cocoapods. They want to convert these two massive big apps into separated frameworks. Apps which have been developed during 5/6 years and they count with thousand of users.

Any of you have had to tackle such a difficult task?

I'm fighting with Xcode because all the configurations schemes, pods dependencies, and framework configuration. And I can't figure out what I'm missing, because I'm trying to integrate one of the apps as framework but Xcode doesn't recognize any class from the project, it says 'out of scope', even I configured the 'public' keyword for the required class and added for its initializer and I tried every posible solution found out there.

I understood that such Frameworks you integrate into Xcode are normally composed by a chunk number of files, not a big project of that scale.

Do you think that Apple will reject the app considering the idea proponed for this project?

Regards and thanks in advance

CodePudding user response:

Too big for a comment, will post here. I did something like that in the past, and the steps were something like this:

Step 1: Turn each heavy app into light app (heavy) framework within the same workspace.

Make your light app depend on heavy framework and get that to work. I would start from creating an empty framework, getting it as dependency to the app, and then gradually migrating classes - group by group, merging each group (even if it's not final).

You won't be able to migrate everything from the app, but it will tell you how you will have to integrate with that framework. For example things like entitlements, AppDelegate etc will remain in the App. But most of the code will be in the framework, buildable as a separate framework target.

Step 2: Once each app is converted, you can create a completely new app, drag & drop your frameworks into that app (to begin with, you can do something better later), and use code from both "light" apps to integrate with your frameworks.

You will need to bring all the pods, and may need to resolve some conflicts at this point too.

Step 3: Once your new app is working, you can figure out how you will actually deliver frameworks to that app: is it going to be private pod, or drag & drop, or anything else.

  • Related