Can I change the output path of the IPA file?
- PDF for offline use
Let us know how you feel about this
Translation Quality
0/250
last updated: 2017-03
For Cycle 7 and higher
Yes, you can use customized MSBuild targets to achieve this. The easiest option is probably to copy the .ipa file after it has been built.
These steps will work for any iOS project that uses the MSBuild build engine on either Mac or Windows. (Note: all Unified API projects use the MSBuild build engine.)
- Open the
.csprojfile for the iOS app project in a text editor and then add the following lines at the end (immediately before the closing</Project>tag):
<PropertyGroup>
<CreateIpaDependsOn>
$(CreateIpaDependsOn);
CopyIpa
</CreateIpaDependsOn>
</PropertyGroup>
<Target Name="CopyIpa"
Condition="'$(OutputType)' == 'Exe'
And '$(ComputedPlatform)' == 'iPhone'
And '$(BuildIpa)' == 'true'">
<Copy
SourceFiles="$(IpaPackagePath)"
DestinationFolder="$(OutputPath)"
/>
</Target>
- Set the DestinationFolder to the desired output folder. As usual you may use MSBuild properties (like $(OutputPath)) within this argument if you wish.
Notes
The
CreateIpaDependsOnproperty is defined in theXamarin.iOS.Common.targetsfile that is part of Xamarin.iOS. It behaves as described under Overriding 'DependsOn' Properties on https://msdn.microsoft.com/en-us/library/ms366724.aspx.You could use a Move Task rather than a Copy Task if you preferred. If you choose that option and you are building on Windows, you will need to use the fully-qualified task name
<Microsoft.Build.Tasks.Move>to avoid an ambiguity with the XamarinVS build tasks.
Contact information
This document discusses the current behavior as of Xamarin 4.1.1 for Visual Studio and Xamarin.iOS 9.8.1 on the Mac build host. The technique described in this document is not part of the stable testing suite for Xamarin, so it could break in the future.
If you notice that the technique no longer works on a more recent version, or if you notice any other mistakes in the document, please let us know by writing to hello@xamarin.com. Thanks!
For versions before Cycle 7
Yes, you can use customized MSBuild targets to achieve this. The easiest option is probably to copy the .ipa file after it has been built.
These steps will work for any iOS project that uses the MSBuild build engine on either Mac or Windows. (Note: all Unified API projects use the MSBuild build engine.)
- Open the
.csprojfile for the iOS app project in a text editor and then add the following lines at the end (immediately before the closing</Project>tag).
<PropertyGroup>
<CreateIpaDependsOn>
$(CreateIpaDependsOn);
CopyIpa
</CreateIpaDependsOn>
</PropertyGroup>
<Target Name="CopyIpa"
Condition="'$(OutputType)' == 'Exe'
And '$(ComputedPlatform)' == 'iPhone'
And '$(BuildIpa)' == 'true'">
<Copy
SourceFiles="$(OutputPath)$(IpaPackageName)"
DestinationFolder="/Users/macuser/Desktop/"
/>
</Target>
- Set the
DestinationFolderto the desired output folder. As usual you may use MSBuild properties (like$(OutputPath)) within this argument if you wish.
Notes
The
CreateIpaDependsOnproperty is defined in theXamarin.iOS.Common.targetsfile that is part of Xamarin.iOS. It behaves as described under Overriding "DependsOn" Properties on https://msdn.microsoft.com/en-us/library/ms366724.aspx.You could use a Move Task rather than a Copy Task if you preferred. If you choose that option and you are building on Windows, you will need to use the fully-qualified task name
<Microsoft.Build.Tasks.Move>to avoid an ambiguity with the XamarinVS build tasks.
Let us know how you feel about this
Translation Quality
0/250
Xamarin Workbook
If it's not already installed, install the Xamarin Workbooks app first. The workbook file should download automatically, but if it doesn't, just click to start the workbook download manually.

