views:

145

answers:

2

I have an open-source iPhone API that I downloaded, and that is a standalone app with its own app delegate and applicationDidFinishLaunching: method. How do I merge this into my own app, and keep all the methods in the app delegate?

+2  A: 

Long Answer: It is not as easy as a button press, I am afraid. You will need to inspect the open source app, figure out how it works and where the important hooks are, and self-merge the code. For example, only 1 applicationDidFinishLaunching will be called so put all code from both in this method. You probably need to remove duplicate lines and such.

Short Answer: you need to understand what each line does and do it by hand.

coneybeare
+1  A: 

Which open-source iPhone API?

A good API may provide an app delegate, but only for example purposes. It probably isn't their intention that you directly merge it into your own app; rather, you could use it as a guideline for how to use the API, by reading the code and seeing how it works. Then, you add the API calls to your own app yourself.

Elliot