AnswerBun.com

Combine two Xcode targets into one distributable app

Stack Overflow Asked by thecoolwinter on December 8, 2020

I created two targets in my Xcode project. One for an iOS app, and the other for the iPadOS companion. Now I’d like to distribute them under one name and App Store link, but I can’t submit different builds for iOS and iPadOS through App Store Connect.

I can’t combine the targets into one, because I have some UI libraries that won’t work on iPadOS and/or won’t work on iOS. I’m also planning on making the iPadOS target into a Mac-Catalyst app, so I’d like to keep the targets separate for that as well.

Is there a way to archive these two targets together so App Store Connect sees both apps in the one upload? Or do I need to distribute the iOS and iPadOS apps under different bundle IDs.

One Answer

You certainly could distribute them under different bundle IDs. It's very easy to make two targets share code, as you are probably already doing.

However, it is more usual to have just one app, a so-called "universal" app, that runs on both iPhone and iPad (and so is built using just one app target). It is quite normal for these to have some functionality that differs by device type; resources such as images or nibs can automatically load different versions depending on whether we're running on an iPhone or an iPad, and the traitCollection has a userInterfaceIdiom property that lets your code decide in real time what to do depending on that same distinction.

So just go ahead and load all your "UI libraries" for both device types, and just don't call into one of them if it isn't supported by the current circumstances in which the app finds itself running.

Correct answer by matt on December 8, 2020

Add your own answers!

Related Questions

Braintree payment form not working | Django

4  Asked on January 5, 2022 by felipe-dourado

     

a more general version of `ifelse` in R?

4  Asked on January 3, 2022 by indrajeet-patil

   

Pandas sorting data in a dataframe with multiple headers

1  Asked on January 3, 2022 by sophia-deng

   

How to merge same Ids data with mysql?

1  Asked on January 3, 2022

       

sum for id’sin python

4  Asked on January 3, 2022 by maddy6

   

How to synchronously change state within useState

2  Asked on January 3, 2022 by michael-gee

     

‘List’ is not a subtype of type ‘Map’

2  Asked on January 3, 2022 by uchenna-ndukwe

   

Javascript load Array from Text File

1  Asked on January 3, 2022 by crapcoder

       

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP, SolveDir