Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Submit Unity games to the Mac App Store!

Discussion in 'Editor & General Support' started by Randy-Edmonds, Dec 20, 2010.

  1. Randy-Edmonds

    Randy-Edmonds

    Joined:
    Oct 10, 2005
    Posts:
    1,122
    First you must register with Apple to be an official Mac developer (costs $99).
    http://developer.apple.com/devcenter/mac
    Then you must download OS X 10.6.6, Xcode 3.2.5 and Application Tools 1.1
    And, of course, you have to create your own App ID, Mac App and Installer Certificates. http://developer.apple.com/certificates/

    After you are all setup as an Apple developer (see above) and have your Unity game developed, follow these steps to package your game for the Mac App Store....

    1. Build in Unity for Mac Intel Only

    2. Show Package Contents of the .app

    2.a. Edit Info.plist
    <key>CFBundleShortVersionString</key>
    <string>1.0.0</string>
    <key>LSApplicationCategoryType</key>
    <string>public.app-category.puzzle-games</string>
    <key>NSHumanReadableCopyright</key>
    <string>(c) 2010 Iterations Software LLC. All rights reserved.</string>
    <key>CFBundleIdentifier</key>
    <string>com.oneiteration.zenofclover</string>
    <key>CFBundleVersion</key>
    <string>1.0.0</string>

    2.b. Replace Resources/UnityPlayer.icns with one that is 512x512

    2.c. Change permissions on /Data for "everyone" from "no access" to be "Read only"

    3. In Terminal...

    3.a. codesign -f -s "3rd Party Mac Developer Application: randy edmonds" ZenOfClover.app

    3.b. productbuild --component ZenOfClover.app /Applications --sign "3rd Party Mac Developer Installer: randy edmonds" zenofclover.pkg

    3.c. Delete the .app file after productbuild has created the .pkg (or the installer test will not work).

    3.d. sudo installer -store -pkg ZenOfClover.pkg -target /

    4. Verify that your app is installed in Applications

    5. Ready to submit the .pkg to iTunes Connect!


    I have an app submitted and "waiting for review". Hope it is accepted!
     
    Last edited: Dec 23, 2010
  2. jtrencsenyi

    jtrencsenyi

    Joined:
    Aug 4, 2010
    Posts:
    15
    I have used the same process when I submitted the Fairy Cubes to the Mac Store. Waiting for review...
     
  3. Lab013

    Lab013

    Joined:
    Oct 22, 2008
    Posts:
    405
    You, my good sir, are awesome.
     
  4. Tetrad

    Tetrad

    Joined:
    Jul 22, 2009
    Posts:
    45
    I tried following the instructions presented here and it seems like my isntaller isn't working properly. My app isn't showing up under /Applications, and I'm getting a couple of weird errors in the installer test.

    installer: Installation Check: Passed
    installer: Volume Check: Passed
    installer: Starting install
    installer: Install 0.0% complete
    2010-12-20 19:03:45.248 installer[5772:2403] PackageKit: *** Missing bundle identifier: /Library/Receipts/fbx20100_2_fbxextensionssdk_macos.pkg
    2010-12-20 19:03:45.250 installer[5772:2403] PackageKit: *** Missing bundle identifier: /Library/Receipts/fbx20100_2_fbxsdk_macos.pkg
    2010-12-20 19:03:45.252 installer[5772:2403] PackageKit: *** Missing bundle identifier: /Library/Receipts/Flip4Mac QuickTime Components.pkg
    2010-12-20 19:03:45.253 installer[5772:2403] PackageKit: *** Missing bundle identifier: /Library/Receipts/Flip4Mac Web Plugins.pkg
    installer: Install 5.3% complete
    installer: Install 23.0% complete
    installer: Install 28.5% complete
    installer: Install 100.0% complete
    installer: Finished install

    Any help?
     
  5. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    Are you sure you setup the bundle identifier under your Mac Developer Account correctly (and that your payment for your yearly subscriptiong went through) and that you don't have typos in the plist?
     
  6. RenoRosco

    RenoRosco

    Joined:
    Dec 16, 2008
    Posts:
    67
    i got the same errors when i follow the guide. I read some where that the mac installer may be broken on snow leopard but have no proove for that and no fix. Just trying to get the package done on an other mac.

    But a solution for this bug would be very nice
     
  7. grobm

    grobm

    Joined:
    Aug 15, 2005
    Posts:
    217
    Nice!! I was wondering about this... shame Unity Tech has not add this into the build options yet. Some of us are lazy. :)
     
  8. RenoRosco

    RenoRosco

    Joined:
    Dec 16, 2008
    Posts:
    67
    an Update to the problem Tetrad and I had:

    I Updated Mac OS to the beta 10.6.6 build available in the Dev Center and now all works perfect.
     
  9. Artial

    Artial

    Joined:
    Dec 27, 2008
    Posts:
    22
    I can call codesign with the certificates but productbuild is not available in the terminal. I'm not a MAC pro...but I have XCode 3.2.5.

    Is there something basic I'm missing (like adding certificates in XCode and so on) ?
     
  10. Tetrad

    Tetrad

    Joined:
    Jul 22, 2009
    Posts:
    45
    So I think the errors I was getting when testing the installer are pretty meaningless. I managed to fix them but on my iMac the installer still failed (as in, the app didn't show up in /Applications). I tried doing the same thing on my Macbook Pro and it worked fine. But the pkg I made on the other computer (which worked there) still didn't work on the iMac. So I'm leaning towards there's some kind of bug.

    Also Artial, you have to log into the mac dev center and download the "Application Tools". They just updated to 1.1 yesterday so maybe that'll fix some issues people were having...
     
  11. Artial

    Artial

    Joined:
    Dec 27, 2008
    Posts:
    22
    Many thanks, the App Tools 1.1 gives me the productbuild command!
     
  12. Randy-Edmonds

    Randy-Edmonds

    Joined:
    Oct 10, 2005
    Posts:
    1,122
    The missing bundle identifier messages can be ignored... however if you are not seeing your app in /Applications, it is probably because you didn't do step "3.c".

    For whatever reason, if you .app is located anywhere else on your Mac, the installer does not write the app to /Applications... instead the installer will overwrite the .app in the location it already exists. From my experience, YOU HAVE TO DELETE every copy of the app from your machine or the installer will not write to /Applications. I suggest you use Spotlight to search for copies of your app and remove them all.
     
  13. Tetrad

    Tetrad

    Joined:
    Jul 22, 2009
    Posts:
    45
    Just got a rejection letter in regards to using a private API (thread_stack_pcs) and playerprefs being saved to the wrong place.
     
  14. karn9872

    karn9872

    Joined:
    Sep 26, 2010
    Posts:
    14
    Is this after you built with the latest 3.2.02b Unity beta build?
     
  15. Tetrad

    Tetrad

    Joined:
    Jul 22, 2009
    Posts:
    45
    That was with the latest released version. I'm not aware of any beta version.
     
  16. karn9872

    karn9872

    Joined:
    Sep 26, 2010
    Posts:
    14
  17. donlien

    donlien

    Joined:
    Apr 13, 2009
    Posts:
    229
  18. gigaplay

    gigaplay

    Joined:
    Feb 11, 2007
    Posts:
    15
    Hi, all. I'm putting together my first Mac App Store submission and I'm following the instructions Randy and every have put together here and everything goes fine until I get to the step where I create the signed installer:

    i.e. 3.b. productbuild --component ZenOfClover.app /Applications --sign "3rd Party Mac Developer Installer: randy edmonds" zenofclover.pkg

    When I enter this command int the terminal, it throws an error indicating that it doesn't recognize the --sign option, starting like this:

    e.g. productbuild: unrecognized option `--sign 3rd Party Mac Developer Installer: (etc.) ...

    I know that I have the strings right because they (or similar ones) worked when I used them in executing the codesign command in the terminal. And I do indeed have both my App and Installer certificates installed in the keychain.

    So, anyone have any idea what might be going on here? Oh, please? ;-)
     
    Last edited: May 12, 2011
  19. gigaplay

    gigaplay

    Joined:
    Feb 11, 2007
    Posts:
    15
    I think the problem may be that I don't have Application Tools 1.1 installed.

    Unfortunately, Apple pulled that download apparently when they released XCode 3.2.6 and SDK 4.3 - which doesn't like Unity so I can't upgrade to it.

    Does anyone have a copy of the Application Tools 1.1 installer lying around that they could share with me? :)
     
  20. marty

    marty

    Joined:
    Apr 27, 2005
    Posts:
    1,170
    I'm having what appears to be the same problem.

    When I enter the "productbuild --component ... -sign ..." line in the terminal to sign and build the package, I get an error stating that "--sign" is an unrecognized command.

    I'm using the last drop of XCode 3.x and SDK 4.3 but haven't installed Application Tools 1.1 since those files are no longer available. I assume that the stuff they added was incorporated into the final XCode 3.x build - is that wrong?

    Any help would be greatly appreciated!
     
  21. mindlube

    mindlube

    Joined:
    Oct 3, 2008
    Posts:
    993
    Here is the method I've been using. First I use the Finder to change the Info.plist and the .icns file.
    Then I wrote this shell script to do the signing and packaging. It's not fully automated, but it's fairly painless.

    Code (csharp):
    1.  
    2. #!/bin/sh
    3.  
    4. chmod -R a+xr  "Chickie Dominos.app"
    5. codesign -f -v -s "3rd Party Mac Developer Application: Alex Rice" "Chickie Dominos.app"
    6. productbuild --component "Chickie Dominos.app"  "/Applications" --sign "3rd Party Mac Developer Installer: Alex Rice" ChickieDominos2_03.pkg
    7. tar cvzf ChickieDominos.tar.gz  "Chickie Dominos.app"
    8. rm -rf  "Chickie Dominos.app"
    9. sudo installer -store -pkg ChickieDominos2_03.pkg -target /
    10.  
    11.  
    After it's installed into Applications, then I do a final test, then upload the .pkg file with Application Loader.
     
  22. Martin-Schultz

    Martin-Schultz

    Joined:
    Jan 10, 2006
    Posts:
    1,377
  23. donlien

    donlien

    Joined:
    Apr 13, 2009
    Posts:
    229
    seems great!!
     
  24. mindlube

    mindlube

    Joined:
    Oct 3, 2008
    Posts:
    993
    Thanks Martin! looks good- will give it a try next time I'm releasing an app.
     
  25. SolInvictus212

    SolInvictus212

    Joined:
    Aug 10, 2011
    Posts:
    50
    I followed the method laid out in the first post exactly, and had no errors, the pkg installed to my Applications folder, etc. But after uploading my pkg I got this in an e-mail from Apple:

    "Invalid Signature - the executable ChopperDown 1.0.app/Contents/Frameworks/MonoEmbedRuntime/osx/libmono.0.dylib 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."

    I thought perhaps maybe something went wrong with the certificate, so I did it over, deleted my certificates from my computer and from Apple's provisioning portal, requested another one, downloaded it, rebuilt the app, etc. but still got this e-mail again after uploading.

    Has anyone had this happen and know what might be going wrong? I don't get any errors while following the process outlined, I noticed the .provisionprofile file isn't mentioned in the provess, just the dev certificates... is there somewhere specific my .provisionprofile needs to be, or does that not matter?

    Any help with this would be really appreciated, because I have no idea what to do.

    Thanks,
    Sol
     
  26. TOO-TIDY-STUDIOS

    TOO-TIDY-STUDIOS

    Joined:
    Feb 26, 2011
    Posts:
    139
    For a week ago we uploaded our first app for the Mac App Store without any problems and got approved. Yesterday we did upload our second app and did the exact same procedure as with the first, and then we got this error message from Apple as you did. So it might be something Apple has changed on their part lately? We sat all night trying to fix it but nothing worked... always the same email "Invalid Signature..."

    Any help is much appreciated!! We are also completely stuck

    Thanks,
    Tore
     
    Last edited: Oct 8, 2011
  27. TOO-TIDY-STUDIOS

    TOO-TIDY-STUDIOS

    Joined:
    Feb 26, 2011
    Posts:
    139
    Maybe I found the solution... don't really know if this is the right procedure, but I only got the "Waiting for Review" email this time :)

    In terminal:

    codesign -f -s "3rd Party Mac Developer Application: YourCertName" /path to /Contents/Frameworks/MonoEmbedRuntime/osx/libmono.0.dylib

    and then codesign the app itself like in the tutorial both for Application and Installer.
     
  28. SolInvictus212

    SolInvictus212

    Joined:
    Aug 10, 2011
    Posts:
    50

    Ah nice, haha, I just got on to post the same thing. I got the idea from here: http://stackoverflow.com/questions/...esign-framework-bundles-for-the-mac-app-store .

    Uploaded it two hours ago and haven't gotten the "problem" email, so I think we're on the right track ;).

    Good luck with your app!
     
  29. TOO-TIDY-STUDIOS

    TOO-TIDY-STUDIOS

    Joined:
    Feb 26, 2011
    Posts:
    139
    That's really nice! Then it must be just the right procedure :) Signing just that file and not the whole framework.

    We are definitely on the right track ;)

    Thanks, and good luck with your app too!
     
  30. ben_QuantumSquid

    ben_QuantumSquid

    Joined:
    Aug 3, 2011
    Posts:
    25
    Anyone had trouble with using the built-in mac app store validation?

    After successfully installing the validation window pops up when I try to launch asking for app store login info. If I log in with a normal account it tells me I must use a test account. If I log in with a test account the app looks like it opens then immediately closes (or crashes, hard to tell).
     
  31. Martin-Schultz

    Martin-Schultz

    Joined:
    Jan 10, 2006
    Posts:
    1,377
    @ben_QuantumSquid

    This is expected behavior what you experienced. As the app is signed with the MAS signature it will try to check your account credentials to see if you bought the app. That's the login prompt. If you entered something and it closes immediately, that is the receipt validation kicking in (so it works!) because in the app folder there is no signature indicating that you bought the game. If you bought the game on the MAS, then the app folder contains the receipt signature.
     
  32. Martin-Schultz

    Martin-Schultz

    Joined:
    Jan 10, 2006
    Posts:
    1,377
  33. Wolfos

    Wolfos

    Joined:
    Mar 17, 2011
    Posts:
    950
  34. Martin-Schultz

    Martin-Schultz

    Joined:
    Jan 10, 2006
    Posts:
    1,377
    Yes, but the above postings seemed to me that this got overlooked.
     
  35. ben_QuantumSquid

    ben_QuantumSquid

    Joined:
    Aug 3, 2011
    Posts:
    25
    I found the problem, and the program not launching is NOT the expected behaviour when testing like this. The problem was that the app didn't have an iTunes Connect mac app registration. As soon as I added the app to iTunes Connect the validation went through just fine.
     
  36. mehware

    mehware

    Joined:
    Nov 19, 2007
    Posts:
    739
    hmm I submitted my app today and got this notice from apple shortly after:

    We have discovered one or more issues with your recent binary submission for "Zombie Biker". Your app has proceeded to review, but the following issues should be corrected in your next submission:
    Invalid Signature - the executable ZombieBiker.app/Contents/Frameworks/MonoEmbedRuntime/osx/libmono.0.dylib is not signed, the signature is invalid, or it is not signed with an Apple submission certificate.

    I thought I signed the build properly as per instructions above.

    The app is still "waiting for review", does this mean fix it in an update?

    I was using Unity 3.4.1f5

    Thanks,
    - Matt
     
  37. SolInvictus212

    SolInvictus212

    Joined:
    Aug 10, 2011
    Posts:
    50
    Hi Matt, yeah I'm not sure what they mean by correct in your next submission, but if you look above you'll see me and vonObstfelder had the same problem and fixed it. You have to sign libmono.0.dylib separately.
     
  38. mehware

    mehware

    Joined:
    Nov 19, 2007
    Posts:
    739
    I am confused, I signed the build through the terminal, why do i have to sign libmono.0.dylib? Again my app says "Waiting for Review" confused why it didn't get rejected but i did pass the application loader.

    - Matt
     
  39. SolInvictus212

    SolInvictus212

    Joined:
    Aug 10, 2011
    Posts:
    50
    Signing the build doesn't sign the frameworks inside, which is why Apple said "ZombieBiker.app/Contents/Frameworks/MonoEmbedRuntime/osx/libmono.0.dylib is not signed."

    It might not matter, but I didn't want to take the risk, so I signed the dylib (after signing the app, and before creating/signing the installer) and re-uploaded, which solved the problem.

    Why they don't reject it, but say to fix it in your next submission? Only Almighty Apple knows ;).
     
  40. XGameDev

    XGameDev

    Joined:
    Aug 14, 2011
    Posts:
    8
    I got same email when submitting last night, didnt get rejected, but they said to fix in next submission. Its in "waiting for review status", hope that doesnt mean its in limbo for months...now my concern is should I reject binary and apply fix above? or let it ride?
     
    Last edited: Oct 20, 2011
  41. mehware

    mehware

    Joined:
    Nov 19, 2007
    Posts:
    739
    XGameDev: let it ride, they approved ZombieBiker without that code signed, just fix it in an update.

    - Matt
     
  42. rebeccajones

    rebeccajones

    Joined:
    Nov 23, 2011
    Posts:
    1
    I have created App ID by registering and also upgraded my Mac and after so many efforts finally all the bugs get fixed.
     
  43. Jason-H

    Jason-H

    Joined:
    Nov 5, 2010
    Posts:
    87
    Hi I'm having an issue with point 3b. Product build.

    I don't have Xcode 3.2.5 or Application Tools 1.1 and I am getting the same error as Gigaplay and marty at the bottom of page one. The error in terminal reads as this (with the only changes being "Company Name" and "mygamesname") -

    productbuild: unrecognized option `--sign*3rd Party Mac Developer Installer: Company Name*/Applications/mygamesname.pkg'

    The first post states that I need Xcode 3.2.5 but I have Xcode 4.0.2 and I also don't have "Application Tools 1.1".



    I have tried using Martin Schultz's "Mac App Store PostProcessor" located here. Although for some reason when I build my game the info.plist is the same as it was before, it isn't signed properly and it isn't packaged up anywhere.

    These are the steps I've taken with the PostProcessor;

    I have copied and pasted the entire script starting with -

    Code (csharp):
    1. #!/usr/bin/perl
    2. use File::Copy;
    and ending with -

    Code (csharp):
    1. if ($doCreatePackage eq "true") {
    2.     system("productbuild --component \"" . $installPath . "\" /Applications --sign \"". $certificateInstaller . "\" \"" . getcwd . $outputDirectory . $packageName . "\"");
    3. }
    I've left the variables about signing and packaging both as true and changed the signing certificate from Martin Schultz to my one.

    It was copied and pasted into a text document and saved as .rtf then changed to .sh in the finder. I've placed the resulting file in "Assets/Editor" and built the project in Unity (not build and run).

    After right clicking the resulting .app file, showing the package contents and viewing info.plist nothing has changed between this one and one without the shell script in the editor folder nor is there any .pkg files.


    Any help on this would be greatly appreciated!

    Thanks.
     
  44. nw-admin

    nw-admin

    Joined:
    Jun 17, 2010
    Posts:
    53
  45. minevr

    minevr

    Joined:
    Mar 4, 2008
    Posts:
    1,018
  46. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,085
    What's the current process for building Unity projects for the Mac App Store? Has this been simplified/changed since this original procedure was put together?
     
  47. SolInvictus212

    SolInvictus212

    Joined:
    Aug 10, 2011
    Posts:
    50
    Nope, I just submitted an app today and the method outlined in this thread is still the best one I know and still works.
     
  48. LukaKotar

    LukaKotar

    Joined:
    Sep 25, 2011
    Posts:
    394
    I don't get the 2.c. part. How and where do I change permissions?
     
    Last edited: Mar 22, 2012
  49. LukaKotar

    LukaKotar

    Joined:
    Sep 25, 2011
    Posts:
    394
    Thank you so much! :D Uploading :D
     
  50. moinchdog

    moinchdog

    Joined:
    Apr 4, 2012
    Posts:
    15
    I tried this with Mac OS X Lion 10.7.3 but it docent work but it works with Snow Leopard

    Waiting for Review for my App Save Our Souls

    check it out

    http://www.sneezingcatp.com/