Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error "Archive for In-App Purchase ... is invalid. The package contains an executable at 'Contents/xyz.m4a'"

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".

like image 827
Joe Mujarreb Avatar asked Dec 13 '12 04:12

Joe Mujarreb


2 Answers

try ls -l xyz.m4a and chmod -x xyz.m4a

like image 99
pebble8888 Avatar answered Oct 14 '22 18:10

pebble8888


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.

like image 31
ObjectiveTC Avatar answered Oct 14 '22 17:10

ObjectiveTC