Search code examples
iosxamarin.iosmonodevelopinfo-plist

Multiple Info.plist files in MonoTouch solution


I'm trying to write two separate submittable apps: one for iPad and the other for iPhone. This necessitates having two separate plists to allow independently specifying different app icons, launch images, etc.

When I try to rename my Info.plist, MonoDevelop autocreates a new empty Info.plist and uses that instead. By the same token, I can't seem to move my Info.plist to the iPad/ subfolder and have MD pick it up there.

Currently we have 3 projects in 1 solution: iPad, iPhone, common files and libraries.

Is the only solution to have separate .sln files in the appropriate subfolders, or can I still somehow build two separate apps from one .sln?

EDIT: Project structure is below if that helps visualise the problem.

MyApp.sln
MyApp-iPad.csproj
MyApp-iPhone.csproj
MyApp-Common.csproj

Main.cs
AppDelegate-iPad.cs
AppDelegate-iPhone.cs

Info.plist (MD currently uses this for both projects)
Common/
iPad/
iPad/Info.plist (for -iPad.csproj)
iPhone/
iPhone/Info.plist (for -iPhone.csproj)

Solution

  • Here's my current and very ordinary solution: Add a custom command that runs Before Build

    cp iPad/Info.plist Info.plist
    

    And for iPhone:

    cp iPhone/Info.plist Info.plist