<p>The error I'm getting:</p>

<pre><code>in /Users/robert/Documents/funWithFrameworks/build/Debug-iphonesimulator/funWithFrameworks.framework/funWithFrameworks, can't link with a main executable
</code></pre>

<p>Cliff notes:</p>

<ul>
<li>trying to include framework</li>
<li>doesn't want to link</li>
</ul>

<p>More detail:
I'm developing for a <em>mobile device... hint, hint</em> using Xcode and I'm trying to make my
own custom framework which I can include from another application. So far, I've done the following:</p>

<ol>
<li>Create a new project; an iPhone OS window based app.</li>
<li>Go to target info-> under packaging, change the wrapper extension from app to framework</li>
<li>Go to Action->new build phase -> copy headers. Change roles of headers  to 'public'</li>
<li>From my application, I add the framework to the frameworks group.</li>
</ol>

[{'answer_id': 79109, 'author': 'amrox', 'author_id': 4468, 'author_profile': 'https://Stackoverflow.com/users/4468', 'pm_score': 0, 'selected': False, 'text': '<p>I haven\'t tried it for so called <em>mobile device</em>, but I would guess its very similar to the method for a regular Cocoa application.  Check out this tutorial:</p>\n\n<p><a href="http://rentzsch.com/cocoa/embeddedFrameworks" rel="nofollow noreferrer">Embedded Cocoa Frameworks</a></p>\n'}, {'answer_id': 81659, 'author': 'user8030', 'author_id': 8030, 'author_profile': 'https://Stackoverflow.com/users/8030', 'pm_score': 4, 'selected': True, 'text': '<p>Apple clearly said that you can <strong>not</strong> use dynamic libraries on their mobiles. And a private framework is just this.</p>\n\n<p>You can, however, use static libraries.</p>\n'}, {'answer_id': 383810, 'author': 'Tom Harrington', 'author_id': 43832, 'author_profile': 'https://Stackoverflow.com/users/43832', 'pm_score': 1, 'selected': False, 'text': '<p>Egil, that\'s usually considered as one of the implications of section 3.3.2 of the iPhone developer agreement, which (in part) forbids plug-in architectures or other frameworks.  The fact that they don\'t provide an Xcode project template for an iPhone-compatible framework tends to reinforce the idea, though of course it could just be an oversight or something they\'re discouraging without actually forbidding.</p>\n\n<p>Whether this is the intended meaning of that section is something you\'d have to ask Apple about, and possibly consult a lawyer, but this is where the oft-stated "no frameworks" idea comes from.</p>\n\n<p>For those who have framework code they\'d like to use in an iPhone app, an alternative approach is to use the framework code to build a static library.  That then gets compiled into the application instead of getting dynamically loaded at run time.  The fact that it\'s part of the application executable avoids any potential concerns about this part of the agreement.</p>\n'}, {'answer_id': 2879475, 'author': 'jbenet', 'author_id': 346736, 'author_profile': 'https://Stackoverflow.com/users/346736', 'pm_score': 1, 'selected': False, 'text': '<p>Though dynamic libraries are not allowed, you CAN create a framework (using static libraries and lipo). </p>\n\n<p>Check out: <a href="http://accu.org/index.php/journals/1594" rel="nofollow noreferrer">http://accu.org/index.php/journals/1594</a></p>\n'}]
['https://Stackoverflow.com/questions/78423', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/-1/']