Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Mac app store error: The application is invalid

Discussion in 'Editor & General Support' started by EricD, Mar 22, 2012.

  1. EricD

    EricD

    Joined:
    Sep 7, 2011
    Posts:
    128
    Hi everyone, I'm trying to get my game on the mac app store but I'm getting the following error while uploading via Application Loader

    "The executable ((null)) is missing a required architecture. At lease one of the following architecture(s) must be present: i386,x84_64."

    Steps I took to get to this point:
    1) Build intel only, with app store validation on in unity 3.4
    2) Replace icon and change info.plist
    3) sign with terminal (is says it is signed)
    4) make a..pkg
    5) Sign the .pkg
    6) upload through application loader <ERROR>

    Does anyone know what I'm doing wrong?
     
  2. tonyd

    tonyd

    Joined:
    Jun 2, 2009
    Posts:
    1,224
    I don't know what's causing that error, but I do know you have to use Unity 3.5 or Apple will reject your app.

    Make sure you make a backup before opening your project in 3.5. It should import fine, but you never know.
     
  3. EricD

    EricD

    Joined:
    Sep 7, 2011
    Posts:
    128
    Why would you need 3.5? There are many games on the mac app store that were build before 3.5. That makes no sense.
     
  4. NomadKing

    NomadKing

    Joined:
    Feb 11, 2010
    Posts:
    1,461
    He's referring to some rejections people are getting with pre 3.5 Unity builds based on the lack of a close option in windowed mode, however that doesn't look like the issue your getting.

    What properties do you have in your plist and whats the codesign line your using? Have you got valid certificates?
     
  5. EricD

    EricD

    Joined:
    Sep 7, 2011
    Posts:
    128
    Code (csharp):
    1. <?xml version="1.0" encoding="UTF-8"?>
    2. <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    3. <plist version="1.0">
    4. <dict>
    5.     <key>CFBundleDevelopmentRegion</key>
    6.     <string>English</string>
    7.     <key>CFBundleExecutable</key>
    8.     <string>KidsvsGoblins</string>
    9.     <key>CFBundleGetInfoString</key>
    10.     <string>Kids vs Goblins v3</string>
    11.     <key>CFBundleIconFile</key>
    12.     <string>UnityPlayer.icns</string>
    13.     <key>CFBundleIdentifier</key>
    14.     <string>com.crescentmoongames.kidsvsgoblinsmac</string>
    15.     <key>CFBundleInfoDictionaryVersion</key>
    16.     <string>6.0</string>
    17.     <key>CFBundleName</key>
    18.     <string>kidsvsgoblinsmac</string>
    19.     <key>CFBundlePackageType</key>
    20.     <string>APPL</string>
    21.     <key>CFBundleShortVersionString</key>
    22.     <string>3</string>
    23.     <key>CFBundleSignature</key>
    24.     <string>????</string>
    25.     <key>CFBundleVersion</key>
    26.     <string>3</string>
    27.     <key>NSMainNibFile</key>
    28.     <string>MainMenu</string>
    29.     <key>NSPrincipalClass</key>
    30.     <string>PlayerApplication</string>
    31.     <key>LSApplicationCategoryType</key>
    32.     <string>public.app-category.action-games</string>
    33.     <key>NSHumanReadableCopyright</key>
    34.     <string>Kids vs Goblins v3 by Stolen Couch Games v.o.f.</string>
    35. </dict>
    36. </plist>
    37.  
    Codesign
    Code (csharp):
    1. codesign -f -v -s "3rd Party Mac Developer Application: Crescent Moon Games LLC" "KidsvsGoblins.app"
    after that I make a pkg and I re-sign that pkg the same way as the .app.
     
  6. NomadKing

    NomadKing

    Joined:
    Feb 11, 2010
    Posts:
    1,461
    At a glance the PLIST looks fine - I'd lose the CFBundleSignature cause the data given isn't useful anyway, but I don't see that causing the error.

    You shouldn't have to codesign the pkg file, it should be ready for upload at that point. I do however do a 2nd codesign before the pkg to make sure the framework lib gets signed (there was some errors with this not getting picked up sometimes - I don't know if it's still doing that but I like to make sure).

    So try:
    1. codesign with your above line
    2. codesign the monolib (Same as above line but with “AppName/Contents/Frameworks/MonoEmbedRuntime/osx/libmono.0.dylib” as your 2nd parameter
    3. package the file
    4. try upload

    Edit: At a 2nd glance you don't appear to have a UnityBuildNumber key in your PLIST. Not sure how important that is, but I usually leave it in there. Here's mine from version 3.4.2f3 :
    Code (csharp):
    1. <key>UnityBuildNumber</key>
    2. <string>f32ac5d0ce76</string>
     
    Last edited: Mar 23, 2012
  7. EricD

    EricD

    Joined:
    Sep 7, 2011
    Posts:
    128
    I can't sign libmono

    Code (csharp):
    1. libmono.0.dylib: object file format unrecognized, invalid, or unsuitable
     
  8. NomadKing

    NomadKing

    Joined:
    Feb 11, 2010
    Posts:
    1,461
    Hmm, that's very odd... if you browse the contents of the .app file, is the libmono there?

    When you built the project from Unity, did you select 'Mac OS X Intel Only' as the target build?
     
  9. EricD

    EricD

    Joined:
    Sep 7, 2011
    Posts:
    128
    Yep yep :)
     
  10. NomadKing

    NomadKing

    Joined:
    Feb 11, 2010
    Posts:
    1,461
    Ok, I'm officially stumped! The only thing I can suggest is re-installing/Updating XCode in case there's an issue with the installation.

    Sorry EricD :(
     
    Last edited: Mar 23, 2012
  11. EricD

    EricD

    Joined:
    Sep 7, 2011
    Posts:
    128
    Crap. I'll update to unity 3.4.2 and try again :)
     
  12. tonyd

    tonyd

    Joined:
    Jun 2, 2009
    Posts:
    1,224
    Again, Apple will likely reject your app if it's not built with 3.5. The close button doesn't work properly with previous versions of Unity.

    Also, when I submitted an App last week Apple didn't require signing libmono. They gave me a warning, but accepted the App anyway.
     
  13. EricD

    EricD

    Joined:
    Sep 7, 2011
    Posts:
    128
    tried in 3.4.0 3.4.2. Also tried with xcode 4.4 4.3. Same error.

    One thing is weird: When I change the info.plist my icon get a white cross through it. It happens if I change the "Executable file" string. When I use "Kids vs Goblins" I can't sign, but when I use "KidsvsGoblins" I can sign, but I get a white cross and get an error that the app is damaged or corrupt.
     
  14. EricD

    EricD

    Joined:
    Sep 7, 2011
    Posts:
    128
    So what you're saying is that no-one could submit a app before februari? Because thats when 3.5 was released. There are many, many unity 3.x games on the app store.
     
  15. tonyd

    tonyd

    Joined:
    Jun 2, 2009
    Posts:
    1,224
    No, what I'm saying is, Apple's policy has gotten stricter, and many of our apps were rejected for not having a close button (including mine). You want to risk it, be my guest, but there is really no reason NOT to build with 3.5.
     
  16. NomadKing

    NomadKing

    Joined:
    Feb 11, 2010
    Posts:
    1,461
    While this is true, it still doesn't explain the errors that EricD is having as real rejection errors are pretty easy to understand.

    It could be the name of the built .app vs the name in the PLIST - I do remember there being some fields where the name has to be identical (It might have to match the itunesconnect info too).

    Unfortunately I'm not at the office now to check the specifics of this.
     
  17. tonyd

    tonyd

    Joined:
    Jun 2, 2009
    Posts:
    1,224
    Yeah, I get that, but his original problem might also get fixed with 3.5, since it no longer does universal builds. Can't see how the executable would be "missing a required architecture", when it's the only architecture now allowed for Mac builds.

    It also sounds like he's got spaces in his app name, and that can cause issues if you're not careful.
     
  18. NomadKing

    NomadKing

    Joined:
    Feb 11, 2010
    Posts:
    1,461
    After noticing the ((null)) part of the error message, I'm convinced it's a naming issue too (can't check the architecture if it can't find the executable)
     
  19. EricD

    EricD

    Joined:
    Sep 7, 2011
    Posts:
    128
    I'll try using 1 name without spaces everywhere.

    Also I'd rather not update to unity 3.5 cause it causes problems we need to fix. And we really don't have time to fix them. But If thats the only option I'll try it after the name change failed.
     
    Last edited: Mar 25, 2012
  20. EricD

    EricD

    Joined:
    Sep 7, 2011
    Posts:
    128
    Updated to unity 3.5 No change. Still getting the same error.
     
  21. NomadKing

    NomadKing

    Joined:
    Feb 11, 2010
    Posts:
    1,461
    Hmmm, one again I'm stumped Eric! Sorry :(
     
  22. tonyd

    tonyd

    Joined:
    Jun 2, 2009
    Posts:
    1,224
  23. NomadKing

    NomadKing

    Joined:
    Feb 11, 2010
    Posts:
    1,461
    Nice find tonyd :)
     
  24. EricD

    EricD

    Joined:
    Sep 7, 2011
    Posts:
    128
    Now I need to find a mac that can actually run Application Loader 1.4. I've tried a mac with mountain lion and one with lion, no success.
     
  25. tonyd

    tonyd

    Joined:
    Jun 2, 2009
    Posts:
    1,224
    Which version of Application Loader are you running?

    2.4.1 works fine on Snow Leopard, don't know about Lion.
     
  26. EricD

    EricD

    Joined:
    Sep 7, 2011
    Posts:
    128
    2.5.1 on Mountain Lion 2.4.1 on lion. Can't install xcode 3.x on lion. It's pretty hard to find a mac that runs app loader 1.4 :(.

    If any of you have it, please let me know.
     
  27. EricD

    EricD

    Joined:
    Sep 7, 2011
    Posts:
    128
    I've gone back to Unity 3.4 and got it uploaded through Application Loader. Only on iTunes Connect it says "invalid binary". No reason why.

    So I'm stuck again.
     
  28. EricD

    EricD

    Joined:
    Sep 7, 2011
    Posts:
    128
    Found the reason why: "Invalid Signature - the main app bundle is not signed, the signature is invalid, or it is not signed with an Apple submission certificate. Refer to the Code Signing and Application Sandboxing Guide for more information."

    But I did sign the .app, the .pkg the .lib file with a valid signature.. Arrgg
     
  29. EricD

    EricD

    Joined:
    Sep 7, 2011
    Posts:
    128
    I'm still struggeling with the submission.

    I had the game uploaded and it was in review. But it got rejected because I had "mac" in the filename.... So I changed the filename and now after I upload it I get rejected because the code-signing is wrong.... I can't see any fault. The files are codesigned according to terminal.
     
  30. goodhustle

    goodhustle

    Joined:
    Jun 4, 2009
    Posts:
    310
    Did you ever figure this out? I keep getting the same "object file format unrecognized, invalid, or unsuitable" on both libmono and app codesign commands.
     
  31. blueflame

    blueflame

    Joined:
    Oct 5, 2011
    Posts:
    6
    I have same problem with Mountain Lion, but it works nicely with Lion.
     
  32. Vuto

    Vuto

    Joined:
    Aug 3, 2012
    Posts:
    2
    I have same problem with Mountain Lion, "Invalid binary" after upload.
     
  33. Selosoft

    Selosoft

    Joined:
    Jun 22, 2012
    Posts:
    69
    I'm submitting my first app to the Mac App Store and got it all signed correctly via the terminal. I'm using Unity v. 3.5.5 and Mountain Lion. I'm getting this error when trying to submit the app via ApplicationLoader (v2.7):

    "The Application is Invalid. The executable ((null)) is missing a required architecture. At least one of the following architecture(s) must be present: i386, x86_64"

    The original post by EricD had this issue. Anyone have any suggestions? I'll be contacting Apple as well to see if I can identify the issue.
     
  34. arkon

    arkon

    Joined:
    Jun 27, 2011
    Posts:
    1,122
    I'm having the same issue. Only yesterday I uploaded an update to one of my mac games and it all went through fine. Today I updated xcode from 4.4 to 4.4.1 and just now needed to submit a second app with an update that has failed with the same error as Eric and stingman. Very frustrating.
    Can we all contact unity support for a fix? last time there was a mass failing of the submission process unity got involved and issued a patch.
     
  35. arkon

    arkon

    Joined:
    Jun 27, 2011
    Posts:
    1,122
    Anyone solved this yet?
     
  36. Selosoft

    Selosoft

    Joined:
    Jun 22, 2012
    Posts:
    69
    Nope not solved. I decided to take the time to make some improvements on the app and I even paid $15 for a tutorial on how to upload Mac Apps assuming something I was doing could quite possibly be wrong. Nope, nothing wrong at all. And even with the support of the tutorial I STILL cannot upload an app to the mac app store. I keep getting the same error. Definitely a little frustrating at this point. I'll update if I resolve the issue
     
  37. Selosoft

    Selosoft

    Joined:
    Jun 22, 2012
    Posts:
    69
    I don't know where the error lies but I think I figured out what the problem is. It's Unity not building correctly for Mountain Lion. Here's what I mean: Every single time I build the app I edit the PLIST file appropriately and I attempt to code sign. Code signing will not work because there is a space in my game title name. As soon as I remove the space and edit the executable bundle name in the PLIST without a space the code sign works. I can then build the app and test the installation and everything passes. Then I go to application loader and it fails returning me the same error every time. So I decided to go back into Unity and I built the app again but this time I changed the app title name in the player settings so that it did not have any spaces in it. I then edited the PLIST and tried to code sign. Code sign failed so then I edited the executable file name and put the space back in the name. I also opened up the PLIST file and edited the executable name and put a space back in. Then I tried code signing and it worked. How odd is this? So then I could build and sudo install and then attempt to upload via application loader. Same error... so I assume that either Unity is not building the app correctly for the OS to recognize or the OS is bugged. Either way I think I'm at a loss unless I revert to a previous version of Unity or a previous operating system. Considering this is my only Mac, I hate to do this but I may have no choice. If anyone has any further information regarding this that would be great. I contacted Apple customer support as well. I'll be contacting Unity too.
     
  38. arkon

    arkon

    Joined:
    Jun 27, 2011
    Posts:
    1,122
    Stingman see my answer here http://forum.unity3d.com/threads/126390-Can-t-submit-app-to-the-Mac-app-store

    I'm pretty sure your problem isn't going to be unity or the OS. I've had this problem twice now and each time I was convinced as you are that Unity or application loader was at fault but each time it was me, pilot error. PM me your commands you type in terminal to codesign and package. IF you remove the space MAKE SURE you remove the space in Product name in Unity too.
     
  39. mattSydney

    mattSydney

    Joined:
    Nov 10, 2011
    Posts:
    171
    Anyone got any further with this??
     
  40. josemauriciob

    josemauriciob

    Joined:
    Mar 5, 2009
    Posts:
    662
    hi
    anyone solved this error please ?

    thanks
     
  41. mikolo

    mikolo

    Joined:
    Nov 27, 2009
    Posts:
    249
  42. justin_iSO

    justin_iSO

    Joined:
    Jan 10, 2013
    Posts:
    18
    I realize this is old but I had the same issue when using the Application Loader. What fixed it for me was removing "illegal" characters from the .pkg name. I had the superscript ™ on the name. Removed those little letters and it worked fine.

    Hope this helps someone.

    ~Justin