How do I get mdtool to build an iOS archive that is as small as the Xamarin Studio's menu option (Build > Archive)?
I've got a project build archives from script that are coming out much larger than what Xamarin Studio is producing manually from the menu command.
Steps
For Xamarin Studio, I just set it to AppStore|iPhone and hit the Build > Archive menu item.
For command-line, here's the command line call the RAKE script is making to mdtool:
.../mdtool -v archive \"--configuration:AppStore|iPhone\" -p:SomeProject.iOS SomeSolution.sln
The "AppStore|iPhone" build configuration they both use is set to "Link SDK assemblies only" under the iOS Build project settings.
While the command line archiving runs, it definitely prints LinkMode: SdkOnly
in the MTouch Task
portion of the console output.
Resulting Archives
On the project giving me trouble, the resulting xcarchive files are 102MB for command line and 66MB for Xamarin Studio (difference: 36MB), with Xcode estimates of 69MB and 35MB in App Store size, respectively.
Inside the xcarchive files, it gets more confusing. There are two files with differences and those two files are different by ~60MB (which doesn't match the above difference):
- dSYM file: 17kb vs. 29.2MB (weird)
- [within the .app file] app executable: 30.1MB vs. 65.7MB (where I expected the difference)