Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Mac App Store submission failed due to i386 architecture in plugins

Discussion in '2018.2 Beta' started by Foriero, Jun 16, 2018.

  1. Foriero

    Foriero

    Joined:
    Jan 24, 2012
    Posts:
    584
    Hi Guys,

    New Mac App Store rule is that we need to submit only 64bit plugin versions. We get rejected in application loader for libMonoPosixHelper.dylib and libmonobdwgc-2.0.dylib

    Thanks, Marek.
     
  2. joncham

    joncham

    Unity Technologies

    Joined:
    Dec 1, 2011
    Posts:
    276
    Do you have more details on the rejection? An app should not be rejected just because native binaries have a 32-bit slice.
     
  3. Foriero

    Foriero

    Joined:
    Jan 24, 2012
    Posts:
    584
    Hi Jon,

    I'm the author of https://assetstore.unity.com/packages/tools/utilities/mac-app-store-signed-54970

    So I monitor what Apple requires over the years and implement it into the tool.

    You are "not right" in your assumption that Apple does allow 32bit architecture in plugins. That rule changed recently since my customers reported this issue to me. So the thinning of a plugin is super easy

    sudo lipo xxx.dylib -thin x86_64 -output xxx.dylib

    given that you have that architecture in your fat plugin.

    Regarding the libMonoPosixHelper.dylib and libmonobdwgc-2.0.dylib. They are first fat and they are not signed at all. Our tool always has to sign them.

    Hope it helps. Thank you, Marek.
     
  4. joncham

    joncham

    Unity Technologies

    Joined:
    Dec 1, 2011
    Posts:
    276
    Marek,

    Thanks for the response. However, my contact at Apple has indicated the submission failure should not occur from simply having a 32bit slice present. Was there any additional information about the rejection?

    Thanks - Jonathan
     
  5. Foriero

    Foriero

    Joined:
    Jan 24, 2012
    Posts:
    584
    It is the Application Loader which will not let you pass. It is not review team.
     
  6. Foriero

    Foriero

    Joined:
    Jan 24, 2012
    Posts:
    584
    We have found one more issue. We have app that is not addressing GameCenter but apple review team declined our app since it contains reference to GameKit library and they ask us to remove that linked library. I checked all plugins with otool -L and the only binary that link this library is the app executable itself. So Unity had to change this or Apple had to change the rules. But that GameKit should not be included as standard with plain Unity build.

    So if you build clean scene app I guess Unity now as standard includes GameKit which is causing issues with apps that don't use GameKit.

    /System/Library/Frameworks/GameKit.framework/Versions/A/GameKit (compatibility version 1.0.0, current version 471.2.1)

    Code (CSharp):
    1. @executable_path/../Frameworks/libcrypto.dylib (compatibility version 1.0.0, current version 1.0.0)
    2.     @executable_path/../Frameworks/libssl.dylib (compatibility version 1.0.0, current version 1.0.0)
    3.     /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 157.0.0)
    4.     /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 22.0.0)
    5.     /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
    6.     /System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface (compatibility version 1.0.0, current version 1.0.0)
    7.     /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore (compatibility version 1.2.0, current version 1.11.0)
    8.     /System/Library/Frameworks/SecurityFoundation.framework/Versions/A/SecurityFoundation (compatibility version 1.0.0, current version 55132.20.1)
    9.     /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration (compatibility version 1.0.0, current version 888.20.5)
    10.     /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox (compatibility version 1.0.0, current version 492.0.0)
    11.     /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio (compatibility version 1.0.0, current version 1.0.0)
    12.     /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit (compatibility version 1.0.0, current version 1.0.0)
    13.     /System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 57740.20.22)
    14.     /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo (compatibility version 1.2.0, current version 1.5.0)
    15.     /System/Library/Frameworks/AVFoundation.framework/Versions/A/AVFoundation (compatibility version 1.0.0, current version 2.0.0)
    16.     /System/Library/Frameworks/CoreMedia.framework/Versions/A/CoreMedia (compatibility version 1.0.0, current version 1.0.0)
    17.     /System/Library/Frameworks/Quartz.framework/Versions/A/Quartz (compatibility version 1.0.0, current version 1.0.0)
    18.     /System/Library/Frameworks/MediaToolbox.framework/Versions/A/MediaToolbox (compatibility version 1.0.0, current version 1.0.0)
    19.     /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
    20.     /System/Library/Frameworks/GameKit.framework/Versions/A/GameKit (compatibility version 1.0.0, current version 471.2.1)
    21.     /System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics (compatibility version 64.0.0, current version 1070.6.0)
    22.     /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1348.15.0)
    23.     /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 1349.0.0)
    24.     /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 775.8.2)
    25.     /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 307.4.0)
    26.     /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.0.0)
    27.     /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 1504.59.0)
    28.     /System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork (compatibility version 1.0.0, current version 807.1.3)
    29.     /usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
     
  7. Foriero

    Foriero

    Joined:
    Jan 24, 2012
    Posts:
    584
    This is actually complete stopper for our app. :-(
     
  8. Foriero

    Foriero

    Joined:
    Jan 24, 2012
    Posts:
    584
    Hi, I tried this

    install_name_tool -change @rpath/GameKit.framework/Versions/A/GameKit @rpath/ "executable"

    But it will not completely remove the the line in listing with otool -L hence it will prevent to load the library.

    Now the only thing is how Apple is checking what Unity is linking. If Apple is checking rpaths then this should be enough.

    What do you think, Jon?
     
  9. Foriero

    Foriero

    Joined:
    Jan 24, 2012
    Posts:
    584
    Sorry. This seems to be the solution for the install_name_tool.

    install_name_tool -change /System/Library/Frameworks/GameKit.framework/Versions/A/GameKit @rpath/

    I will try to resubmit our app and see what apple will tell us. Hope Unity does not need GameKit in code so that we don't get any hard crashes.

    Thank you Marek.
     
  10. Foriero

    Foriero

    Joined:
    Jan 24, 2012
    Posts:
    584
    ok that @rpath didn't work since then I could not open the app but what worked well is to change the GameKit to other existing link and it will magically disappear from otool listing :) Which seems to be clean solution. I will update you what Apple will say about our submission. Thank you, Marek.

    install_name_tool -change /System/Library/Frameworks/GameKit.framework/Versions/A/GameKit /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
     
  11. Foriero

    Foriero

    Joined:
    Jan 24, 2012
    Posts:
    584
    Hi Jon, so I can confirm that this simple trick works for Apple's review team.

    install_name_tool -change /System/Library/Frameworks/GameKit.framework/Versions/A/GameKit /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation "xx.bundle/Contents/MacOS/xx"

    Cheers, Marek.

    For all Mac App Store publishers. Once 2018.2 is out I will update our tool with those fixes.

    https://assetstore.unity.com/packages/tools/utilities/mac-app-store-signed-54970

    Thank you, Marek.
     
  12. greg-harding

    greg-harding

    Joined:
    Apr 11, 2013
    Posts:
    524
    hey Jon, I can confirm that we had a Mac app rejected (by Application Loader) a few weeks ago because it had a 32bit slice in a plugin dll that was a universal binary. We used the 'lipo' command to strip the x86 architecture and then the upload was accepted. (ps. the build was from Unity 2017.4.x, not 2018.x.)


    We don't use Game Center inside our app but the review team passed it ok. We mentioned in our review notes that we don't use Game Center in the app and there were no entitlements set up for it, but that libraries for it might be linked anyway. They never mentioned it.
     
    Last edited: Jun 21, 2018