How to get multiple targets into one binary for app store submission?

877 views Asked by At

I have split my iPhone app into two targets one for the ipad and one for the iphone. When I upload to the appstore I can only have one binary. But I have two targets?

I think I am missing a step. Thanks in advance for any help.

2

There are 2 answers

0
Moshe On BEST ANSWER

A "target" encompasses all of the instructions that Xcode uses to build your app.

You can have two targets inside of one binary, although this is not always done. This is how Universal Binaries are made. The two apps are bundled together inside of one binary. If you open up a Mac app "bundle" you will notice a few meta files, like icons and such, and there will be the actual compiled binary code. An iOS Universal Binary has both apps inside of it. (If you watch your compilation carefully, you'll notice that Xcode actually builds your app twice. It does one build for iPhone/iPod and one for iPad.)

Provided that your Xcode project is set up properly, you will get the intended results.

0
Jesse Naugher On

The binary will be fine, the "targets" refer to what runs when it is run on an iPhone vs iPad. If the project is setup correctly for universal it should work fine.