I am creating a .pkg file for a couple of game levels using iOS 6 and Xcode 4.5.2. When validating the Xcode .pkg for the IAP content, it complained about m4a audio files that I have in the package for sound. The strange thing is that it says: "The archive for In-App Purchase ... is invalid. The package contains an executable at 'Contents/xyz.m4a'." I know that I have some audio files in the package (with extension .m4a) but I don't understand why it's referring to those as 'executable".
3 Answers
try ls -l xyz.m4a
and chmod -x xyz.m4a
-
1I had the same issue with mp3-Files. Removing the executable bit (-x) solved the issue for me also. Thanks!– helli99Jul 5, 2013 at 14:37
-
1
-
1@Rookie Open Terminal, type 'cd ' then drag the folder containing your mp3s into the Terminal window and hit enter, then use the commands above to edit your files.– BongehJan 17, 2014 at 10:31
-
thanks already got it! Very much appreciate the reply though thanks Jan 17, 2014 at 16:14
Same issue, but the answers listed as of 10/28/13 did not resolve the error for me. I was able to resolve the errors by chmod 444 inside the generated archive, and then resubmitting for validation. It then passed validation.
Additional Info:
I have a bunch of .mov videos that I wanted to upload as hosted content on ItunesConnect. In Xcode: File->NewProject->Other->HostedContent; make sure the product identifier matches the one in iTunesConnect (case sensitive), (Don't add to any project or workspace), and then saved the file OUTSIDE my project directory. Then, in the newly created project, within the first folder (having the name of my in-app purchase - but NOT in the Supporting Files folder), I moved all the .mov video files, selecting the "copy files into folder" option.
*note - this step applies the answers that others posted in this thread, but did not work for me.
Next, in terminal, I navigated over to where these videos were copied. Then I changed all videos to read only with this command: chmod 444 ./
Back in Xcode, from the menu: Product->Archive. Organizer opens, with the new Archive listed. Chose Validate and selected the ITunesConnect "In-App-Purchase Content". Here is where validation failed with the error "the archive for in-app purchase is invalid. the package contains an executable at 'xxxxxxx'.mov"
I then Right-Clicked the Archive Package, and "Show in Finder". Right-Clicked the "xxxxxxx.xcarchve" file and chose "show package contents". Then went into this folder: products->Library->InAppPurchaseContent->xxxx-nameofmycontent-xxxx->Contents
The archive contained a copy of all my video files. Now I navigated to this "Contents" folder in Terminal (in terminal, typed "cd " and then dragged the folder into terminal to auto-fill the directory path), and hit enter. In this directory, I made all the video files "read only" with the command: "chmod 444 ./*".
Back in Organizer, hit Validate, selected the hosted content product identified by ITunesConnect, and Validation Success!
Hope this helps someone else in my situation.
-
this is helpful with using the following commands from the bottom answer, thanks Jan 12, 2014 at 3:21
Inspect the package contents. Most likely you have your build setup such that you don't have a vaild audio file in there, but compiled code. You cannot have compiled code in IAP
bundles.
-
Thanks @Cocoanetics. I will double check. But the strange thing is that it points out the m4a files and says 'executable'. Dec 13, 2012 at 17:27
-
yeah, as I said: check it. You probably have something other than media files in there. Or maybe the media file has the executable flag set? Dec 13, 2012 at 18:07
-
4THANK YOU!! That was it! I used the terminal to chmod a-x on all m4a files and that solved the problem. Dec 15, 2012 at 5:27
-
@Cocoanetics How to Inspect the package contents. I mean where to do change to get rid of this issue. Feb 10, 2013 at 13:48
-
@Cocoanetics how can I check this for PDF files.I am getting the same error while validating the package. Feb 12, 2013 at 8:48