Search Unity

Unity Appstore Distribution Workflow & Guide

Discussion in 'macOS' started by UNSH, Jul 28, 2018.

  1. UNSH

    UNSH

    Joined:
    Jul 2, 2012
    Posts:
    51
    I’ve been able to sign a few days ago with the script and xcode 11, but haven’t got to upload to the Appstore yet. Things changed and I have a very annoying update to do first. I’ll update the docs when I get through this new ordeal.
     
  2. UNSH

    UNSH

    Joined:
    Jul 2, 2012
    Posts:
    51

    20 years late to the party and probably you got it but all plugins need to get signed. The script looks for dylibs and .plugin files in /Lugins and /Frameworks But if anything else needs signing somwhere else those files are not found. Then you can sign with deep, which is the way we got our signed build to the store. In any case if you add a plugin and things didn’t get signed then I would assume that’s the culprit and if you delete the plugin and it’s still there then I would think there is still a leftover of that plugin. A lot of if’s and some enigma but that’s basically the general experience.
     
    Zimbres likes this.
  3. UNSH

    UNSH

    Joined:
    Jul 2, 2012
    Posts:
    51
    Script has been updated to work with names with spaces. Let me know if it works!
     
  4. UNSH

    UNSH

    Joined:
    Jul 2, 2012
    Posts:
    51
    UPDATE
    - Updated readme with workaround for disappearance of application loader
    - Fixed scripts to allow app names with spaces.

    Also I have just sent a signed build to Apple with the script & Xcode 11 so can confirm that it works for a basic build without iCloud,...

    Also you can always read the latest full guide here
    https://unsh.github.io/Unity-Apple-Distribution-Workflow/
     
    Last edited: Oct 10, 2019
    Zimbres likes this.
  5. UNSH

    UNSH

    Joined:
    Jul 2, 2012
    Posts:
    51
    1.8
    - Added .so in plugin search for steam
    - Added check for product build
    - FIX Deepsign was nested in Dev id build
    - FIX Appstore builds were being signed with --timestamp and --options=runtime
    - FIX entitlements are now correctly in .entitlements
    - FIX show in codesign which entitlements are taken
    - Readme : extra info on iap & steam entitlements bacon on post HiddenJason
    - Readme : More keychain troubleshooting & certificates
    - Readme : replace bundle id is required
    - Readme : fixed DIY codesign
    - Readme : removed our and referenced guide dpid for notarisation
     
  6. KrcKung

    KrcKung

    Joined:
    Jul 18, 2017
    Posts:
    56
    Thanks for the good works. Help us a lot when trying to submit mac build to the appstore. I encountered a little bit of issues when trying to submit the build via this new updated workflow. It seem like it is not replacing the CFBundleIdentifier properly when trying to pack an appstore build.

    Does the replacing CFBundleIdenfier code changed significantly? Because it works before the update.
     
  7. KrcKung

    KrcKung

    Joined:
    Jul 18, 2017
    Posts:
    56
    Somehow able to fix it by replace the CFBundleIdentifier manually, now I got a new problem, is there anyone encounter iCloud not sync issue in mac build?
     
  8. yudizArjun

    yudizArjun

    Joined:
    May 21, 2018
    Posts:
    3
    I appreciate your excellent work.

    I need to open the application after installation process without any searching the app or double-clicking on the app icon. Do you have any idea regarding that? I have googled a bit and found that we can achieve it via preinstall and postinstall scripts.

    I don't know how and where to add those scripts in signandpackage script. please guide me through this

    P.S. Is there any way we can customize the installer component to display our own description for Intro, summary, license agreement, etc?

    P.S. Tried to add the postinstall scripts in probuctbuild command line with --scripts "path/to/script" but still It does not open the application after installing. Any help will be appreciated
     
    Last edited: Jun 10, 2020
  9. HiddenJason

    HiddenJason

    Joined:
    Apr 18, 2016
    Posts:
    23
    One workflow improvement I might suggest here: You can use the SHA-1 fingerprint of the signing certificate instead of the Name and Team ID. That avoids a lot of problems with scripts having to handle special characters (spaces and parentheses). You can find that using Keychain Access and opening the info on the certificate - it's at the very bottom. Copy that and remove the spaces from the hex string.
     
  10. fla-rar

    fla-rar

    Joined:
    May 1, 2014
    Posts:
    246
    hi ... bless
    is there a tutorial to delivery to apple store but using:
    UNITY 2019.4 and Xcode 10.1 please ?
    thanks
     
  11. makaka-org

    makaka-org

    Joined:
    Dec 1, 2013
    Posts:
    1,024
    What the problem?
     
  12. ufulio

    ufulio

    Joined:
    May 7, 2013
    Posts:
    88
    first thanks for answer ...... i apreciate so much.
    i upload to MAC store on 2016, using FORIERO plugin,
    and this program did everything from signing the application to the sandbox.
    I never uploaded an application via XCODE, so my question for beginners is:
    if there is a tutorial to do it from unity 2019.4 or unity 2020
    and then export to xcode and deliver it complete and functional.
    I already have my certificates and my provision profiles.
    but I don't know how to deliver it.
    and the program that I used is obsolete with the new versions.
    I would appreciate a lot and look for how to compensate, any help that works for me.
    blessings and thanks
     
  13. ufulio

    ufulio

    Joined:
    May 7, 2013
    Posts:
    88
    i am done .... thanks GOD !!!
    -
    -
    waiting for review .... and I achieved it using:
    UNITY 2019.4 and xcode 10.1
    -
    upload_2020-9-16_7-53-54.png
     
    pamelacook likes this.
  14. greay

    greay

    Joined:
    Mar 23, 2011
    Posts:
    88
    Is there any way to add this build to the Xcode Organizer? (for crash reports, etc.)
     
  15. UNSH

    UNSH

    Joined:
    Jul 2, 2012
    Posts:
    51
    Not like an Xcode project, you send the final build to the appstore with the organiser but that’s about it. Debugging is a mess. We have moved on to unity xcode builds.
     
  16. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,276
    Hi this guide would have been useful in my own days wasted trying to fix apple builds!
    But to add my own notes:

    Build to XCode and get it to do certification & notarization, I never could make it work for all plugins with the terminal (& terminal commands in 2021?!)

    Make sure to use a Developer ID certificate for notarization (not a Mac development one!?)

    Xcode build settings needed:
    - Set architecture to x86_64 (unless your unity version handles silicon) because now the default is silicon & intel which did not work for me
    - Add --deep to code signing if needed for sub-components
    - Enable hardened runtime if signing for notarization, but turn on most of the runtime exceptions else your app will immediately crash on running!!

    - To send to apple for notarization -> archive and distribute

    Regarding Application.Quit causing app to crash - seems to still exist in 2020 so will try your fix (Unity on it?)

    Finally after all this - if you distribute the app in a zip file it will not be trusted and run in quarantine when downloaded!! Thanks Apple :mad: (recommend WhiteBox - Packages (free.fr))
     
    Last edited: Jan 7, 2021
  17. Radiangames2

    Radiangames2

    Joined:
    Aug 22, 2012
    Posts:
    45
    I'm trying to make a universal build (x86_64 and arm64) and it doesn't work on either platform. If I make a non-universal build (x86_64 only) it works fine on macOS 10.15.4. I'd previously been using Unity 2018.4.7, but have now upgraded to Unity 2020.2.7 in order to get M1 Macs working.

    Anyone have recommendations/tips for getting the Workflow working with Universal builds? I think I should focus on the macOS version crashing (shortly after startup) first, but have no idea what to look for. I've used console.app to kind of narrow down issues before, but it's been a while and I haven't found anything obviously wrong yet when searching through it.

    Also generally curious if anyone has successfully used the Workflow for silicon and intel builds?

    Thanks!
     
  18. Radiangames2

    Radiangames2

    Joined:
    Aug 22, 2012
    Posts:
    45
    Update: I was able to get it working with an IL2CPP build in 2020.2.7. Didn't have to change anything with my workflow script (it signed everything for both architectures without trouble). I made sure all the plugins/bundles were to set "Any CPU" in the Unity inspector settings. Also realized I had forgotten to update the provisioning profile to include the M1 Mac. Once all those were done, I ran it from Applications and it ran fine (built on a 2017 iMac).