"Missing load commands" e-mail when uploading an app with own static framework and bundle
<p>I work on an ObjC framework which we provide to our clients for their own apps. It's a static library which generates .framework files (simulator and iphoneos) which we then lipo create to a fat library. For using CoreData and be compatible with iOS 7, we needed to put the .momd part in a seperate .bundle file which we provide to the client also.</p>

<p>Now when I create a sample Swift app with that framework and bundle, and upload it to the App Store, I get an e-mail after complaining about load commands for the .bundle:</p>

<blockquote>
  <p>Missing load commands - The executable at '/Payload/TestSwift.app/TheBundle.bundle/TheBundle' does not have the necessary load commands. Try rebuilding the app with the latest Xcode version. If you are using third party development tools, contact the provider.</p>
</blockquote>

<p>I have no idea what it wants. Unfortunately I <em>am</em> the provider and contacting myself didn't help.</p>

<p>I have googled around and followed the few instructions available:</p>

<ul>
<li><a href="https://github.com/UrbanApps/Armchair/issues/24" rel="nofollow">remove generic versioning</a></li>
<li>update to latest Xcode (mail)</li>
<li>upload to app store without Bitcode</li>
<li>put the framework in Embedded frameworks instead of Linked Frameworks and Libraries</li>
<li>use the framework in an ObjC app instead</li>
</ul>

<p>But still the mail comes back with the warning, and the build is not uploaded.</p>

<p>Any idea how to solve this?</p>

<p><strong>Important note</strong>: I'd like to avoid the <a href="http://xyproblem.info/" rel="nofollow">XY problem</a>, but here's more info:</p>

<ul>
<li>we are dropping iOS7 permanently</li>
<li>with iOS8 it should be possible to create a dynamic .framework file which includes the CoreData directly, removing a .bundle file and easing the process for our client.</li>
</ul>

<p>Before I dive in, is this an interesting solution? If yes, how does one properly convert a static library to a dynamic library?
Current code within the .framework for loading the .bundle:</p>

<pre><code>NSBundle *bundle = [NSBundle bundleWithPath:[[NSBundle mainBundle] pathForResource:@"TheBundle" ofType:@"bundle"]];   
NSString *modelPath = [bundle pathForResource:@"TheCache" ofType:@"momd"];
NSURL *modelURL = [NSURL fileURLWithPath:modelPath];
</code></pre>

<p>Assumed code if the TheCache schema is within the .framework:</p>

<pre><code>NSBundle *bundle = [NSBundle mainBundle];
NSURL *modelURL = [bundle URLForResource:@"TheCache" withExtension:@"momd"];
</code></pre>

<p>Thank you.</p>