ERROR: ERROR ITMS-90047: "Disallowed paths ( "iTunesMetadata.plist" ) found at: Payload/iPhoneApp1.app"
This error is the result of a change in Apple's App Store verification process to prevent users from hitting issues like Bug 29180. This specific error is not related to the particular version of Xamarin you have installed, so downgrading will not help.
Use these steps if you have upgraded to the following versions (or higher). If using older versions of Xamarin see the "old workaround" section below.
Since Apple now requires 64-bit support for all uploads the App Store, these steps also assume the use of the Unified API.
Create an archive using the "Build -> Archive for Publishing" menu item.
Use the "Sign and Distribute" button in Xamarin Studio as described in the docs to create the .ipa
.
Submit the .ipa
file using Application Loader.
Ensure "Project Options -> iOS IPA Options -> Include iTunesArtwork images" is not checked and "Build ad-hoc/enterprise package (IPA)" is checked.
If you prefer, you can instead edit the .csproj
file in a text editor and manually add the 2 corresponding properties to the PropertyGroup
for the configuration that will be used to build the app:
<BuildIpa>true</BuildIpa> <IpaIncludeArtwork>false</IpaIncludeArtwork>
Build the app from the command line using either mdtool
or xbuild
.
Submit the .ipa
file using Application Loader.
Ensure "Project Properties -> iOS IPA Options -> Include Artwork in IPA" is not checked. (Or manually set the BuildIpa
and IpaIncludeArtwork
properties as mentioned above.)
Build the app.
Submit the .ipa
file using Application Loader.
.xcarchive
using Xcode rather than Application LoaderIf you wish to use Xcode to submit the app after running "Build -> Archive for Publishing", then you will either need to use the "Old workaround" or manually remove the iTunesMetadata.plist
file from the .xcarchive
bundle. This behavior is intentional for now: it allows the same .xcarchive
bundle to be used both for App Store distribution as well as Ad Hoc distribution.
(From Bug 29180, Comment 0.)
Using a text editor, add the following lines at the bottom of your iOS app project's .csproj
(before the closing </Project>
line):
<Target Name="_CompileITunesMetadata" DependsOnTargets="_DetectSdkLocations;_DetectAppManifest;_GenerateBundleName;_CompileAppManifest"> <Message Text="Skipping CompileITunesMetadata task to prevent inclusion of iTunesMetadata.plist in the IPA" /> </Target>
This will stop the iTunesMetadata.plist
file from being included in the .ipa
in the first place.
EDIT July 06: Remove outdated content.
Posts
We have just come across this and will be keen to get the fix. Thanks
Thanks, I've been able to submit successfully by following your detailed instructions and simplified method. Appreciate the support - it's handy to know these alternative methods too.
when you think you can release a fix for this problem?
I tried the VS workaround with no success.
I managed to use the workaround for xamarin studio but then I had some problems with Apple validation on some images (it's strange because on VS I had no problems, so there can be some difference between iOS icon under VS and XS).
Anyway, it's seems really an easy thing to fix for you, please do it as soon as possible!
One thing to note, make sure that when you are submitting through XCode that you sign with the provision which is associated to your administrator Apple account. I mistakenly tried to submit with a development provision, which was quickly slapped down.
Just thought I'd cross-post my bash script here:
If you're lazy like me, you like to have the computer do things for you. Here's a (very LIGHTLY tested) bash script to have it yank the iTunesMetadata.plist file from the most recent archive, an then open XCode so you can submit it. Important notes: it only checks the most recent .xarchive folder, and it's written with the assumption that you're not publishing more than one app (you'd have to tweak the script to take a name as input to support that); it's meant to be used in a "Archive for Publish" -> script -> "Submit from XCode" workflow.
Hope it's useful to someone!
Note: I could not get the markdown to allow me to properly escape the shebang and comment, so make sure you replace any \# characters with #.
\#!/usr/bin/env bash archives="$HOME/Library/Developer/Xcode/Archives/*"; IFS=$'\n' dates=($(find $archives -maxdepth 0 -type d)) lastIndex=${#dates[@]}-1; lastDateFolder=${dates[lastIndex]} echo "Looking in $lastDateFolder for the most recent archive..." archiveGlob="$lastDateFolder/*"; archives=($(find $archiveGlob -maxdepth 0 -type d)) lastArchiveIndex=${#archives[@]}-1; lastArchive=${archives[lastArchiveIndex]} echo "Found $lastArchive." appGlob="$lastArchive/Products/Applications/*" apps=($(find $appGlob -maxdepth 0 -type d)) \# We only expect to find one app. Sorry, no edge-case checks. appFolder=${apps[0]} echo "Found application '$appFolder'." echo "Checking ${appFolder##*/} for the existence of iTunesMetadata.plist..." iTunesMetadataPath="$appFolder/iTunesMetadata.plist" if [ -f $iTunesMetadataPath ]; then echo "Found iTunesMetadata.plist. Removing..." rm "$iTunesMetadataPath" echo "File deleted." fi echo "Opening archive in XCode." open $lastArchive
In case anyone might have been hitting "Invalid Signature. A sealed resource is missing or invalid.", I've updated the first post in the thread with some additional information about that error plus a troubleshooting step with
codesign --verify
.Thanks for the workaround @BrendanZagaeski
If you are running into this problem, try this build:
http://storage.bos.internalx.com/monodevelop-lion-monodevelop-5.9-ipa-submit-fixes/41/4115c44ba4efcf24b8452c54bdf1ffb5e31c164e/XamarinStudio-5.9.1.4.dmgUpdate: try this build instead: http://storage.bos.internalx.com/monodevelop-lion-monodevelop-5.9-ipa-submit-fixes/ec/ecd51ce543c2ad1b1499db64ada89cb70f852c9b/XamarinStudio-5.9.1.5.dmg
I build my final distribution builds with my CI automated build system using xbuild. Since xbuild comes from the Mono.framework and not XamStudio, will a new XamStudio fix this for me too? I do not use the new publishing workflow since I have my automated CI build system.
I installed XS 5.9.1.5 and re-built my app but iTunesMetadata.plist is still there. Did anyone get this working with this new version? Am I doing something wrong?
@ShawnCastrianni.5525 no, installing Xamarin Studio 5.9.1.5 will not change anything for you.
@ShawnCastrianni.5525,
For CI (and other command-line builds), there's actually a simpler workaround from Bug 29180, Comment 0 that I forgot to include in the first post on this thread (I'll add it now).
Using a text editor, add the following lines at the bottom of your iOS app project's
.csproj
(before the closing</Project>
line):@panoramicsoft This build of Xamarin Studio does not change the build at all, it only patches the dialog that creates an IPA from an archive in order to submit to the AppStore (or AdHoc/Enterprise distribution).
Ok that worked, thank you.
Thanks BrendanZagaeski,
I can confirm that a CI build can be fixed by adding the dummy target to the bottom of your .csproj file. I successfully submitted to Itunes connect.
Including the target : _CompileITunesMetadata in the iOS project, then building, zipping, and uploading to iTunes using Application Loader worked
Edit: Using zip option now works... but not sure why.
This build of Xamarin.iOS should theoretically fix command-line builds:
http://storage.bos.internalx.com/macios-mac-macios-cycle5/ef/efa88a77bcda8a432f1d5b9b6291d1d8b7f29b98/monotouch-8.10.1.40.pkgUpdate: http://storage.bos.internalx.com/macios-mac-macios-cycle5/ca/cafedd6e44deeed99c977a10a4b6beca80714037/monotouch-8.10.1.41.pkg
I got this error in the 1.40 build:
Error: Error initializing task _ITunesSourceFile: Not registered task _ITunesSourceFile. (WordsEye)
which disappeared in the 1.41 build, but now I'm getting this:
Error: Error building target _CreateIpa: Can not evaluate "'$(IpaIncludeArtwork)' And Exists ('$(IntermediateOutputPath)ipa\iTunesMetadata.plist')" to bool. (WordsEye)
Sorry about that, try this build: http://storage.bos.internalx.com/macios-mac-macios-cycle5/13/134f5c041d9d603fea5f5d5aa72f461f17cd7a42/monotouch-8.10.1.45.pkg
we are still facing the issue after installing latest monotouch-8.10.1.45.pkg
We are facing this issue too. I was able to archive last week with out any issues. But now I get this error. We did not update Xamarin studio also from the last week.
Eagerly waiting for a proper build/steps to fix this issue.
The fix explained earlier about going into the IPA folder and deleting the iTunes file worked for me. Xamarin studios build: 5.8.3. after deleting the file I verified the IPA using Xcode and submitted the build to the iStore. my app build works just as intended. Testflight's users reported zero errors with the build.
I also just submitted a TestFlight build by manually deleting the iTunesMetadata file and also had to manually add an AppIcons29x29.png file.
I know you guy are working hard at this and thank you so much! please keep us updated on the status on this, since seems not only me, but a lot of people is having the same issue.
Note: The workaround of remove the iTunesMetadata.plist file from the archive file, worked fine, I was able to submit to TestFlight without problems.
Thanks again
The workaround doesn't work for me. I downgraded to 3.9.547 but I keep getting a 0 byte ipa file.
@TomyRobinson, there are 3 known causes of 0 byte IPA files:
All 3 bugs are fixed in the current Alpha channel version of XamarinVS.
Until this latest Alpha release, Bug 24416 and 24417 had been unchanged compared to XamarinVS 3.7. (Before XamarinVS 3.7, XamarinVS did not attempt to copy the
.ipa
file to Windows from the Mac build host at all. The "Alternate workaround for Visual Studio" in the first post in this thread hints at the "old, pre-XamarinVS 3.7" way to get the IPA file: take the IPA file directly from the Mac build host. This "old" technique completely side-steps the problem of getting a 0 byte IPA file on Windows.)Bug 29822 was a regression between XVS 3.9 and XVS 3.11 (from here). It is now fixed in the Alpha service release for XVS 3.11.
The fix for the Xamarin Studio "Build -> Archive for Publishing" workflow on Mac (from earlier in the thread) has now been published to the Stable Channel as a hotfix against the previous Stable Channel version Xamarin Studio 5.9.0 (build 431).
I have updated the first post in this thread accordingly.
Hotfixes for both Visual Studio and command line builds on Mac are being prepared for release over the next few days.
Unfortunately after installing version 5.9.1 (build 3) the problem is still present and I am unable to submit to the Apple store.
Followed VS workaround. Now it doesn't complain about iTunesMetadat.plist but iTunesArtwork... I'll try again the workaround but I'll delete that file as well.
it seems to have worked after deleting iTunesArtwork as well.
I am also still having the problem with itunesmetadata.plist after installing 5.9.1.
Still a problem with itunesmetadata.plist . just upgraded today. not cool. what a waste of my time.
At least you posted a work around.
@breps how are you creating the IPA that still has the iTunesMetadata.plist file in it? If you are using the Publishing Workflow in Xamarin Studio, that won't happen anymore. That's what was fixed.
I did a clean, then a build. I then chose Build Archive for publishing.
I then load XCode, open Organizer. Choose the archive I just created and hit submit.
I had to manually edit the archive and remove the plist file. After that it submitted ok.
@FranoisMouchati
Setting the
IpaIncludeArtwork
property tofalse
will remove the iTunesArtwork and iTunesMetadata.plist files from the resulting IPA.Any idea when this is going to be fixed via an update for Xamarin for Visual Studio? So we do not have to perform a workaround?
I have added the following clarifying note about the Xamarin Studio hotfix in the first post in the thread:
I to am effected. Since there's this whole hullabaloo to fixing it at this time I will stick with the work around. Till then I will waiting for a proper update/fix....
Unfortunately the work around doesn't work so well for me but I will give it another shot later--I'm exhausted trying get around this. Basically I can remove the file in question, but when I do and re-package everything the Application Loader complains there is a sealed resource missing or invalid..
I was able to proceed using the following work around.
Add the following block of XML to your project file (.csproj) just before the closing project tag.