.IPA files from MDTool

2019-03-20 18:08发布

问题:

How can I make MDTool create .IPA files for my MonoTouch project?

When I build from within the MonoDevelop GUI application, .IPA files are created.

But mdtool build --configuration:AppStore|iPhone --project:MyProject just creates .APP files and other things.

Or does it not create a signed IPA because the user running MDTool does not have the certificates etc in their keychain?

回答1:

mdtool build automatically produces IPA files if this is enabled in the project settings, so you don't need to do anything special to make it happen.

The problem in this case is that the codesign step which mdtool runs to produce an IPA file was failing with the error message "User interaction is not allowed" (it wasn't immediately obvious from the mdtool output that this was an error).

This, in turn, is because the codesign tool cannot access the keychain containing the distribution certificate and provisioning file.

To remedy this, you need to run security unlock-keychain /Users/user/Library/Keychains/login.keychain - or whichever keychain contains the keys.

After this, mdtool build will produce IPA files automatically.