Search code examples
iosipamdtool

mdtool creates IPA file when using release but not when using debug configuration


I want to create an IPA file for both the release and debug for my app created in xamarin. I created the release IPA file with the following command in Bamboo:

-v build -t:Build "-c:Release|iPhone" CustomerApp.sln

This can be replicated on the terminal too by doing this:

/path-to-/mdtool -v build -t:Build "-c:Release|iPhone" CustomerApp.sln

But when I try to use the "-c:Debug|iPhone" this will not create the ipa file, when trying to use the terminal or Bamboo. I then tried different configurations like "-c:Release|iPhoneSimulator", "-c:Debug|iPhoneSimulator", "-c:Ad Hoc|iPhone" and "-c:Debug|iPhoneSimulator" but all of these will not create the IPA file. Why is this?

I know that the path to mdtool and the solution are fine because it works for the Release IPA but is it to do with the configuration in either Xamarin or Xcode?


Solution

  • If you are on the same Mac as the one you are running Xamarin Studio, it should mimic the provisioning profile setup you have in the IDE. If the build in Xamarin Studio builds with that combination with no drop down change on the main project, I would expect the mdtool to work. Note that now in Visual Studio 2017 for Mac it will be vstool under the /Applications/Visual Studio.app folder.

    My build line looks like this:

    /Applications/Visual\ Studio.app/Contents/MacOS/vstool --verbose build --f --target:Build --configuration:"Debug|iPhone" --buildfile:my.sln > $BuildResults
    

    Update January 2019, I have found very little guidance on the web about what exactly vstool can do and how to use it. I believe it to be the Microsoft version of the mdtool, which is part of the Monodevelop project at Github (mono/monodevelop). The mdtool source code is under monodevelop/main/src/tools folder. It appears to be a runner for a variety of tools available in the Monodevelop / Visual Studio installation. Running

    /Applications/Visual\ Studio.app/Contents/MacOS/vstool -q 
    

    will list out the available tools. There is also a man page as part of the Monodevelop build process, at monodevelop/main/man which provides a bit more enlightenment. I was shown how to use the specific command by someone who was very familiar with the project.