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

    yuriythebest

    Joined:
    Nov 21, 2009
    Posts:
    1,121
    Hi! I'm stuck at the final step!


    $builderror1.jpg

    I've tried:

    Code (csharp):
    1. productbuild --component "appname.app" "/Applications" --sign*"3rd Party Mac Developer Installer: Name Name (111111111)" "Users/username/appname.pkg"
    2.  
    3. productbuild --component "appname.app" "/Applications" --sign*"3rd Party Mac Developer Installer: Name Name" "Users/username/appname.pkg"
    4.  
    5. productbuild --component "Users/username/appname.app" "/Applications" --sign*"3rd Party Mac Developer Installer: Name Name" "Users/username/appname.pkg"
    6.  
    7. productbuild --component "Users/username/appname.app" "/Applications" --sign*"3rd Party Mac Developer Installer: Name Name (111111111)" "Users/username/appname.pkg"
    8.  
    Also, I checked and double checked the directories and the validity of the certificate in the keychain - everything seems to be ok

    but nothing seems to work! please help!
     

    Attached Files:

    Last edited: Feb 26, 2014
  2. BrUnO-XaVIeR

    BrUnO-XaVIeR

    Joined:
    Dec 6, 2010
    Posts:
    1,687
    Did you try to use the "deep" command?
     
  3. yuriythebest

    yuriythebest

    Joined:
    Nov 21, 2009
    Posts:
    1,121
    Hi! I'm new to using the terminal - I've tried googling for this "deep" command but didn't find any such Apple Osx Command
    http://ss64.com/osx/

    Can you maybe give an example? thanks!
     
  4. BrUnO-XaVIeR

    BrUnO-XaVIeR

    Joined:
    Dec 6, 2010
    Posts:
    1,687
    On Mavericks I do it like this:
    Works fine for me; I am uploading a patch to iTunes right now...

    “XXXXXX” is your developer license name, the one you registered with Apple.
    The “GameName.entitlements” file is a text file with something like this:
    Code (csharp):
    1.  
    2. <?xml version="1.0" encoding="UTF-8"?>
    3. <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    4. <plist version="1.0">
    5. <dict>
    6.     <key>com.apple.security.app-sandbox</key>
    7.     <true/>
    8.     <key>com.apple.security.device.usb</key>
    9.     <true/>
    10. </dict>
    11. </plist>
    12.  
     
    Last edited: Feb 26, 2014
  5. yuriythebest

    yuriythebest

    Joined:
    Nov 21, 2009
    Posts:
    1,121
    Hi! Where do I place the --deep command here? this is the command that's causing me trouble

    I tried entering the command as quoted above (of course, with all of my info), but the result is still the same:
    Code (csharp):
    1.  
    2. *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** setObjectForKey: key cannot be nil'
    3. *** First throw call stack:
    4. (
    5.     0   CoreFoundation                      0x00007fff89fc2b06 __exceptionPreprocess + 198
    6.     1   libobjc.A.dylib                     0x00007fff867513f0 objc_exception_throw + 43
    7.     2   CoreFoundation                      0x00007fff8a0515b7 -[__NSDictionaryM setObject:forKey:] + 135
    8.     3   productbuild                        0x00000001021ca7fd productbuild + 51197
    9.     4   productbuild                        0x00000001021c03c3 productbuild + 9155
    10.     5   libdyld.dylib                       0x00007fff84aa77e1 start + 0
    11.  
     
    Last edited: Feb 26, 2014
  6. BrUnO-XaVIeR

    BrUnO-XaVIeR

    Joined:
    Dec 6, 2010
    Posts:
    1,687
    Maybe your app isn’t fully signed thus you recieve those errors; I would try to re-sign the .app before trying to package it, but this time signing with the “—deep” command to make sure the .dylib files are signed too.
    If the problem persists after that, than your problem is something else.
     
  7. Poculis

    Poculis

    Joined:
    Oct 21, 2012
    Posts:
    17
    Hello,

    Update: the 'Mac App Store Validation' check seems to don't be mandatory anymore to be accepted on the Mac App Store, my application is online !

    I'm having troubles making my pkg for Mac App Store. The pkg is created, the installation is ok and here is what I get when launching the installed program:
    The problem occurs when I check "Mac App Store Validation" before building. Otherwise it works well.
    Do you have any idea please ?

    Here is my procedure (Unity 4.3.4, Maverick 9.2, XCode 5.1)
    Thanks,

    Bernard
     
    Last edited: Mar 30, 2014
  8. MSFX

    MSFX

    Joined:
    Sep 3, 2009
    Posts:
    116
    I've followed this thread but when I try and actually run and test my build it opens and then immediately crashes/closes... is this expected?

    There is also now a tool that will help you do alot of the above...

    http://jemast.com/unity/unity-entitlements-tool
     
  9. TokyoDan

    TokyoDan

    Joined:
    Jun 16, 2012
    Posts:
    1,080
    @BrUnO XaVIeR Is the “3rd Party Mac Developer Application: XXXXXX” string literal (except for the XXXXXX part)?
    And what is the developer license name? Can you please give an example of what it looks like?
     
  10. yuriythebest

    yuriythebest

    Joined:
    Nov 21, 2009
    Posts:
    1,121
    The developer name can be something like "Johnny Appleseed" (it is your name that you registered)
     
  11. yuriythebest

    yuriythebest

    Joined:
    Nov 21, 2009
    Posts:
    1,121
    yes, after you enable mac app store validation the app shouldn't open anymore (it should open and immediately close/crash) - supposedly you can still "test" your app by imitating the installation from the mac app store using:

    sudo installer -store -pkg "/User/MyName/Desktop/helloWorld.pkg"-target /

    it works only if you have deleted your app from EVERYWHERE ELSE
     
  12. neomarian

    neomarian

    Joined:
    May 11, 2012
    Posts:
    43
    Hi,
    I have a big problem, I can't submit my app to Mac App Store.
    When I try to submit I get these errors on Application Loader:

    I did all steps several times during 3 days...don't know what to do to make it work :).
    Please help :(
     
  13. Akio-Sensei

    Akio-Sensei

    Joined:
    Nov 21, 2014
    Posts:
    8
    Hi
    I also have a same problem. I can't submit my app to Mac App Store.
    Mac App Store Toolset Lastest Version doesn't work at all.!!
    Please Help !!!
     
  14. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    Please post more details on what exactly errors you receive.. @neomarian, I can't see your posted image (getting http 403 error)
     
  15. neomarian

    neomarian

    Joined:
    May 11, 2012
    Posts:
    43
    I get "Invalid Signature. Code object is not signed at all. The binary at path ... contains an invalid signature. Make sure you have signed your application with a distribution certificate, not an ad hoc certificate or a developer certificate. Verify that the code signing settings in Xcode are correct at the target level (which override any values at the project level). If you are certain your code signing settings are correct, choose "Clean All" in Xcode, delete the "build" directory in the Finder, and rebuild your release target.
     
  16. sevensails

    sevensails

    Joined:
    Aug 22, 2013
    Posts:
    483
    I delivered a build using the instructions from here : http://docs.unity3d.com/Manual/HOWTO-PortToAppleMacStore.html

    But it was just rejected with no additionall info :

    "From Apple
    2.2 - Apps that exhibit bugs will be rejected
    2.2
    Here is how we found this bug:

    Empty instructions."

    Anybody was able to successfully submit a MacOS Store build recently?
     
  17. Gord10

    Gord10

    Joined:
    Mar 27, 2013
    Posts:
    142
    I followed the tutorials, but I receive an error when I try to upload my package. Now it says that it couldn't find com.apple.application-identifier.

     
  18. -Aymeric-

    -Aymeric-

    Joined:
    Oct 21, 2014
    Posts:
    110
  19. dilmerval

    dilmerval

    Joined:
    Jun 15, 2013
    Posts:
    232
    Well I went through a million post and none of them were valid as of today, I am running Unity 5.5.2 and Application Loader 3.6 and had to go through a lot of hoops to get this to work which is why I added a step by step process to do this for any game as well as created templates for plist, entitlements, and a script to handle the signing.

    Please be sure to follow the steps here.
    http://dilmergames.com/blog/2017/03/29/unity3d-how-deliver-application-apple-mac-store/

    If you have any additional questions let me know as I did this recently.
     
  20. toto2003

    toto2003

    Joined:
    Sep 22, 2010
    Posts:
    528
  21. toto2003

    toto2003

    Joined:
    Sep 22, 2010
    Posts:
    528
    i ll give it a try later today, I m really not familiar with all these terminal line, but thanks for sharing your tips.

    oh gosh... that s going to be a long day I m very not familiar with these

    1. Once your build is generated, go to the build file that was generated and right click "Show Package Contents" then browse to /Content/ and modify the Info.plist file with your own information. You can also use this template I created under github Plist Template and replace your original plist with my template, please be sure to update the values as needed.
    2. Now this part is critical and is what I was missing. Your distribution profile generated from the Member Center must be downloaded, make sure you download it and then rename it to "embedded.provisionprofile" then place it in the same location where your mac game build was generated under. In my own setup I have a folder called MACBuilds and inside I have [MyGameBuild] and on the same level I have "embedded.provisionprofile"
    3. Now we need to create an entitlements file which is required and validated once you upload your build to iTunesConnect. So for that step go to Entitlements to download an entitlements template, once you download it change its name and place it at the same level as on the previous step.
    4. Now here comes the signing piece and to avoid complexities about which commands to run and on which order, I'm providing you with bash script which should do the signing for you. Go to MAC Signing Script to download the script and just modify all the instances of [YourGameName] with your own game name and also [Your Name] with your own certificate name. Then make sure the script lives on the same directory as described on the previous step.
    5. Now make sure "MAC_Build_Sign_Game.sh" has +x (execution rights) and to run it simply type ./MAC_Build_Sign_Game.sh from the terminal which should start signing your game build and should also generate YourGameName.pkg
    6. This step is also critical, the latest version of Xcode 8.2.1 comes with Application Loader version 3.6 well this version does not work with what we're about to do, for some reason we need to download Application Loader 3.0 which is available through itunesconnect.apple.com and then by logging in and selecting one of your apps. Once you download it and install it proceed to the next step.
    7. Now open Application Loader 3.0 and upload YourGameName.pkg
     
    Last edited: Jun 3, 2017
    ilmario likes this.
  22. SaltwaterAssembly

    SaltwaterAssembly

    Joined:
    Mar 8, 2016
    Posts:
    95
    We followed the advice in thread and were able to successfully build for Mac and submit to Connect. We got approval on our game in FOUR HOURS! **

    So thanks for all of the tips.
     
    toto2003 likes this.
  23. toto2003

    toto2003

    Joined:
    Sep 22, 2010
    Posts:
    528
    hi you manage to follow the 7 step above? Could you detail step 4 and 5 i didn t manage to run the script
     
  24. SaltwaterAssembly

    SaltwaterAssembly

    Joined:
    Mar 8, 2016
    Posts:
    95
    We didn't follow all steps above but created our own steps based on our findings in the forum here and online at other locations. This is what we did:


    1. STEP ONE - BUILD APP
      • Build the app in unity, checking that the version and build number is correct, as is the Bundle Identifier - it must match what’s been created in iTunes Connect (case sensitive).
      • Mac App Store Validation must be checked.


    2. STEP TWO - UPDATE info.plist
      Check your info.plist to ensure its content is correct and includes: Application Category, Get info string, bundle version is correct. We also add Localizations as we handle that internally in-game, and we added Privacy - Photo Library and Privacy - Microphone Usage as those two are required in our game.
      To access info.plist, right click on the built app from Step One and reveal the contents of the app.


    3. STEP THREE - CODE SIGNING THE APP
      Open a terminal window and Change Directory (CD) to path where the app has been built to.
      For example: cd ~/Documents/BuildFolder/

      Make sure your ENTITLEMENTS file is in folder with the build app and its name matches the APP name.
      It MUST ALSO HAVE the Sandbox entitlement. If the app has Game Centre or other features, these may have to go into Entitlements as well. (Attached a screenie of ours)

      Then In Terminal, type in and enter the following, one at a time:
      i.
      (ONLY DO THIS ONE IF YOU HAVE IN-APP PURCHASING ENTITLEMENT - will also need to put game centre into entitlements)
      codesign -f --deep -s "3rd Party Mac Developer Application: " YOURGAMENAME.app/Contents/Plugins/unitypurchasing.bundle

      ii.
      codesign -f --deep -s "3rd Party Mac Developer Application: " --entitlements "./YOURGAMENAME.entitlements" ./YOURGAMENAME.app/Contents/Frameworks/MonoEmbedRuntime/osx/libmono.0.dylib

      iii.
      codesign -f --deep -s "3rd Party Mac Developer Application: " --entitlements ./YOURGAMENAME.entitlements ./YOURGAMENAME.app

    4. STEP FOUR - BUILD THE PACKAGE
      Now type into the Terminal window: (obviously change this to match the project app name)

      productbuild --component ".YOURGAMENAME.app" "/Applications" --sign "3rd Party Mac Developer Installer: " YOURGAMENAME.pkg


    5. INSTALL AND CHECK PACKAGE
      In order to install the package correctly you must delete the unpackaged .app file before running the newly created package, before running in Teriminal:

      sudo installer -store -pkg YOURGAMENAME.pkg -target /

    6. Uploaded to Apple via Application Loader v3.0 (downloaded this version from itunes connect when we made our app page in Connect for Mac build)
    7. Submit to Apple via iTunesConnect
    8. One hour later - approved! :)

    That's it!
     

    Attached Files:

    toto2003 likes this.
  25. SaltwaterAssembly

    SaltwaterAssembly

    Joined:
    Mar 8, 2016
    Posts:
    95
    Our kids educational game will be released 15 June.
     
    toto2003 likes this.
  26. toto2003

    toto2003

    Joined:
    Sep 22, 2010
    Posts:
    528
    thanks you so much for the detail tutorial, and good luck with your game! :)
     
  27. toto2003

    toto2003

    Joined:
    Sep 22, 2010
    Posts:
    528
    actually will you use the same process for amazon and facebook? i think u can just send them directly the build from unity without the whole pkg process.
     
  28. SaltwaterAssembly

    SaltwaterAssembly

    Joined:
    Mar 8, 2016
    Posts:
    95
    Not sure about Amazon yet - still trying to find updated info about Amazon's dev agreement since IGDA 6 years ago warned developers not to go near it. If anyone knows how things are with Amazon's dev agreements today, that would be great to know.

    Edit: Won't be doing Facebook - not applicable nor suitable for our target player audience.
     
    Last edited: Jun 9, 2017
    toto2003 likes this.
  29. toto2003

    toto2003

    Joined:
    Sep 22, 2010
    Posts:
    528
    mmmh I got some issue trying to make a pkg , I didn't t see any created pkg file in my directory, not sure what s going on . I manage to the steps until 3, and got stuck at step 4.
    any insight would be more than welcome...

    blablamyimacpath$ productbuild --component ".macbuild.app" "/Applications" --sign "3rd Party Mac Developer Installer: "mybuild.pkg

    Usage: productbuild [--product <requirements-plist>] {--component <component-path> <install-path>} <product-output-path>

    Build product with a self-contained bundle, e.g. for the Mac App Store


    Usage: productbuild {--content <content-path>} <product-output-path>

    Build product with in-app content


    Usage: productbuild [--product <requirements-plist>] {--root <root-path> <install-path>} <product-output-path>

    Build product with an xcodebuild destination root


    Usage: productbuild [options] --distribution <dist-path> [--package-path <search-path>] <product-output-path>

    Build product with a distribution and the packages it references


    Usage: productbuild --synthesize [--product <requirements-plist>] {--package <pkg-path>} <distribution-output-path>

    Synthesize and write a distribution from component packages
     
    Last edited: Jun 27, 2017
  30. losfulanitos

    losfulanitos

    Joined:
    Oct 6, 2016
    Posts:
    48
    hi ..
    Thanksfor thistutorial ...
    I make all steeps and working good until .... steep 5. INSTALL AND CHECK PACKAGE
    never use terminal , and dont understand when say :
    you must delete the unpackaged .app file before running the newly created package, before running in Teriminal:

    in fact , i didnot delet anything and the package was installed, on application folder, but NOT RUN !
    please help , i aill pareciate so much any help

    note:
    oviously giveme this error i think:
    .... picture below
    .
    error t.jpg
     
    Last edited: Jul 24, 2017
  31. losfulanitos

    losfulanitos

    Joined:
    Oct 6, 2016
    Posts:
    48
    i try several times ... around 8 times , and always the same error ..... i have 2 weeks trying to submit an educational apps to macstore......3differents tutorials, ..... today is 25 JULY 2017, since march 2017 any change , that i missing ? ........ maybe i am making the same mistake .... please help

    my error is this always:
    .
     
  32. losfulanitos

    losfulanitos

    Joined:
    Oct 6, 2016
    Posts:
    48
    I have this error ... please anyhelp or idea ...?
    submiting MAC APP STORE education app !

    error 2.jpg
    .
    i can pay for the help ! (inbox)
    thanks, i will apreciate so much any comment !
     
  33. fla-rar

    fla-rar

    Joined:
    May 1, 2014
    Posts:
    246
    any help please or idea why this ?
    I will apreciate so much
     
  34. RSH1

    RSH1

    Joined:
    Jul 9, 2012
    Posts:
    255
    I've followed all the steps, but at the 'Productbuild' stage after entering

    productbuild --component "/Applications/Unity Projects/GAME/Bin/GAME.app” /Application --sign "3rd Party Mac Developer Installer: ME" GAME.pkg


    I just get an input prompt in terminal. No error or anything, just a prompt which repeats no matter what I enter.

    Anyone know what's happening here?