David van Dugteren
David van Dugteren

Reputation: 4109

Implementing an iPhone App within an App

I have two apps, I want to merge them, by bringing the smaller app in to the main application, such that instead of the smaller app originally being instantiated from it's App Delegate, is instead pushed via the existing navigation controller of the main controller.

But the original developer has got various dependencies on the structure of the app and the original app delegate singleton, making it non trivial to push it's main View controller without re arranging code.. which takes time.

How do people normally take a standard cocoa project and turn it into a feature of some other existing application, while retaining the ability to keep things nicely decoupled?

XCode Project 1 - Does X features
XCode Project 2 - Does YZ features, but also want it to do the X features. Such that it does XYZ features :)

Upvotes: 2

Views: 103

Answers (2)

Cephi
Cephi

Reputation: 221

If an application is not designed and constructed to facilitate this then you will probably be doing some rewriting.

The real answer is to plan for this ahead of time using principles like encapsulation, and loose coupling, and employing an architectural pattern like Model–view–controller.

I ran across this website with a ton of links to articles covering OO Design Principles.

Upvotes: 1

Cyprian
Cyprian

Reputation: 9453

You would convert your project A to a static lib and use it in project B.

Upvotes: 0

Related Questions